omniroute 2.0.16 → 2.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +9 -9
- package/app/.env +122 -0
- package/app/.next/BUILD_ID +1 -1
- package/app/.next/app-path-routes-manifest.json +45 -45
- package/app/.next/build-manifest.json +3 -3
- package/app/.next/prerender-manifest.json +3 -3
- package/app/.next/required-server-files.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/a2a/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/a2a/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/a2a/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/agents/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/agents/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/agents/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/analytics/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/api-manager/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/audit-log/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/auto-combo/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +4 -4
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/costs/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/costs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/limits/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/limits/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/logs/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/logs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mcp/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/mcp/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/mcp/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/media/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/media/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/onboarding/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/playground/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/settings/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js +3 -3
- package/app/.next/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js +2 -2
- package/app/.next/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/.well-known/agent.json/route.js +1 -1
- package/app/.next/server/app/.well-known/agent.json/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/400/page.js +2 -2
- package/app/.next/server/app/400/page.js.nft.json +1 -1
- package/app/.next/server/app/400/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/401/page.js +2 -2
- package/app/.next/server/app/401/page.js.nft.json +1 -1
- package/app/.next/server/app/401/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/403/page.js +2 -2
- package/app/.next/server/app/403/page.js.nft.json +1 -1
- package/app/.next/server/app/403/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/408/page.js +2 -2
- package/app/.next/server/app/408/page.js.nft.json +1 -1
- package/app/.next/server/app/408/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/429/page.js +2 -2
- package/app/.next/server/app/429/page.js.nft.json +1 -1
- package/app/.next/server/app/429/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/500/page.js +2 -2
- package/app/.next/server/app/500/page.js.nft.json +1 -1
- package/app/.next/server/app/500/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/502/page.js +2 -2
- package/app/.next/server/app/502/page.js.nft.json +1 -1
- package/app/.next/server/app/502/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/503/page.js +2 -2
- package/app/.next/server/app/503/page.js.nft.json +1 -1
- package/app/.next/server/app/503/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error/page.js +3 -3
- package/app/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/_global-error.html +2 -2
- package/app/.next/server/app/_global-error.rsc +5 -5
- package/app/.next/server/app/_global-error.segments/_full.segment.rsc +5 -5
- package/app/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next/server/app/_global-error.segments/_index.segment.rsc +4 -4
- package/app/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next/server/app/_not-found/page.js +2 -2
- package/app/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/a2a/route.js +2 -2
- package/app/.next/server/app/a2a/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/a2a/status/route.js +1 -1
- package/app/.next/server/app/api/a2a/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/[id]/cancel/route.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/[id]/cancel/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/[id]/route.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/route.js +1 -1
- package/app/.next/server/app/api/a2a/tasks/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/acp/agents/route.js +1 -1
- package/app/.next/server/app/api/acp/agents/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/login/route.js +1 -1
- package/app/.next/server/app/api/auth/login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/logout/route.js +1 -1
- package/app/.next/server/app/api/auth/logout/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/auth/status/route.js +1 -1
- package/app/.next/server/app/api/auth/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/route.js +1 -1
- package/app/.next/server/app/api/cache/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cache/stats/route.js +1 -1
- package/app/.next/server/app/api/cache/stats/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/antigravity-mitm/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/backups/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/backups/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/claude-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/cline-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-profiles/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/codex-profiles/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/codex-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/droid-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/guide-settings/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/kilo-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw/auto-order/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw/auto-order/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route.js +1 -1
- package/app/.next/server/app/api/cli-tools/openclaw-settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/runtime/[toolId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cli-tools/status/route.js +2 -2
- package/app/.next/server/app/api/cli-tools/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route.js +1 -1
- package/app/.next/server/app/api/cloud/auth/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route.js +1 -1
- package/app/.next/server/app/api/cloud/credentials/update/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route.js +1 -1
- package/app/.next/server/app/api/cloud/model/resolve/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route.js +1 -1
- package/app/.next/server/app/api/cloud/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next/server/app/api/combos/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/auto/route.js +1 -1
- package/app/.next/server/app/api/combos/auto/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/metrics/route.js +1 -1
- package/app/.next/server/app/api/combos/metrics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/route.js +1 -1
- package/app/.next/server/app/api/combos/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/combos/test/route.js +1 -1
- package/app/.next/server/app/api/combos/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/compliance/audit-log/route.js +1 -1
- package/app/.next/server/app/api/compliance/audit-log/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/export/route.js +1 -1
- package/app/.next/server/app/api/db-backups/export/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/exportAll/route.js +1 -1
- package/app/.next/server/app/api/db-backups/exportAll/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/import/route.js +1 -1
- package/app/.next/server/app/api/db-backups/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/db-backups/route.js +1 -1
- package/app/.next/server/app/api/db-backups/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/evals/[suiteId]/route.js +1 -1
- package/app/.next/server/app/api/evals/[suiteId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/evals/route.js +1 -1
- package/app/.next/server/app/api/evals/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/fallback/chains/route.js +2 -2
- package/app/.next/server/app/api/fallback/chains/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/init/route.js +1 -1
- package/app/.next/server/app/api/init/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next/server/app/api/keys/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/keys/route.js +1 -1
- package/app/.next/server/app/api/keys/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/logs/console/route.js +1 -1
- package/app/.next/server/app/api/logs/console/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/audit/route.js +2 -2
- package/app/.next/server/app/api/mcp/audit/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/audit/stats/route.js +2 -2
- package/app/.next/server/app/api/mcp/audit/stats/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/sse/route.js +1 -1
- package/app/.next/server/app/api/mcp/sse/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/status/route.js +1 -1
- package/app/.next/server/app/api/mcp/status/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/stream/route.js +1 -1
- package/app/.next/server/app/api/mcp/stream/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/mcp/tools/route.js +1 -1
- package/app/.next/server/app/api/mcp/tools/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/alias/route.js +1 -1
- package/app/.next/server/app/api/models/alias/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/availability/route.js +1 -1
- package/app/.next/server/app/api/models/availability/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/catalog/route.js +1 -1
- package/app/.next/server/app/api/models/catalog/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/openrouter-catalog/route.js +1 -1
- package/app/.next/server/app/api/models/openrouter-catalog/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/models/route.js +2 -2
- package/app/.next/server/app/api/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/monitoring/health/route.js +2 -2
- package/app/.next/server/app/api/monitoring/health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next/server/app/api/oauth/[provider]/[action]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/cursor/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/auto-import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/import/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-authorize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next/server/app/api/oauth/kiro/social-exchange/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/policies/route.js +2 -2
- package/app/.next/server/app/api/policies/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/defaults/route.js +1 -1
- package/app/.next/server/app/api/pricing/defaults/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/models/route.js +1 -1
- package/app/.next/server/app/api/pricing/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/pricing/route.js +1 -1
- package/app/.next/server/app/api/pricing/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-metrics/route.js +2 -2
- package/app/.next/server/app/api/provider-metrics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-models/route.js +1 -1
- package/app/.next/server/app/api/provider-models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/route.js +2 -2
- package/app/.next/server/app/api/provider-nodes/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next/server/app/api/provider-nodes/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next/server/app/api/providers/[id]/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/client/route.js +1 -1
- package/app/.next/server/app/api/providers/client/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/route.js +2 -2
- package/app/.next/server/app/api/providers/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next/server/app/api/providers/test-batch/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/providers/validate/route.js +1 -1
- package/app/.next/server/app/api/providers/validate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/rate-limit/route.js +1 -1
- package/app/.next/server/app/api/rate-limit/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/rate-limits/route.js +1 -1
- package/app/.next/server/app/api/rate-limits/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/resilience/reset/route.js +1 -1
- package/app/.next/server/app/api/resilience/reset/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/resilience/route.js +1 -1
- package/app/.next/server/app/api/resilience/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/restart/route.js +1 -1
- package/app/.next/server/app/api/restart/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sessions/route.js +1 -1
- package/app/.next/server/app/api/sessions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/background-degradation/route.js +1 -1
- package/app/.next/server/app/api/settings/background-degradation/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/combo-defaults/route.js +1 -1
- package/app/.next/server/app/api/settings/combo-defaults/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/ip-filter/route.js +1 -1
- package/app/.next/server/app/api/settings/ip-filter/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/model-aliases/route.js +1 -1
- package/app/.next/server/app/api/settings/model-aliases/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy/route.js +1 -1
- package/app/.next/server/app/api/settings/proxy/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/proxy/test/route.js +1 -1
- package/app/.next/server/app/api/settings/proxy/test/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next/server/app/api/settings/require-login/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/route.js +1 -1
- package/app/.next/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/system-prompt/route.js +1 -1
- package/app/.next/server/app/api/settings/system-prompt/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/settings/thinking-budget/route.js +1 -1
- package/app/.next/server/app/api/settings/thinking-budget/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/shutdown/route.js +1 -1
- package/app/.next/server/app/api/shutdown/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/storage/health/route.js +1 -1
- package/app/.next/server/app/api/storage/health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/cloud/route.js +1 -1
- package/app/.next/server/app/api/sync/cloud/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/sync/initialize/route.js +1 -1
- package/app/.next/server/app/api/sync/initialize/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/tags/route.js +1 -1
- package/app/.next/server/app/api/tags/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/telemetry/summary/route.js +1 -1
- package/app/.next/server/app/api/telemetry/summary/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/token-health/route.js +1 -1
- package/app/.next/server/app/api/token-health/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/detect/route.js +1 -1
- package/app/.next/server/app/api/translator/detect/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/history/route.js +1 -1
- package/app/.next/server/app/api/translator/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/load/route.js +1 -1
- package/app/.next/server/app/api/translator/load/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/save/route.js +1 -1
- package/app/.next/server/app/api/translator/save/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/send/route.js +1 -1
- package/app/.next/server/app/api/translator/send/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/translator/translate/route.js +1 -1
- package/app/.next/server/app/api/translator/translate/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/[connectionId]/route.js +2 -2
- package/app/.next/server/app/api/usage/[connectionId]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/analytics/route.js +1 -1
- package/app/.next/server/app/api/usage/analytics/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/budget/route.js +2 -2
- package/app/.next/server/app/api/usage/budget/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/[id]/route.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/[id]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/route.js +1 -1
- package/app/.next/server/app/api/usage/call-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/history/route.js +1 -1
- package/app/.next/server/app/api/usage/history/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/logs/route.js +1 -1
- package/app/.next/server/app/api/usage/logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/proxy-logs/route.js +1 -1
- package/app/.next/server/app/api/usage/proxy-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/quota/route.js +1 -1
- package/app/.next/server/app/api/usage/quota/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next/server/app/api/usage/request-logs/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next/server/app/api/v1/api/chat/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/speech/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/app/.next/server/app/api/v1/audio/transcriptions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next/server/app/api/v1/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next/server/app/api/v1/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/images/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/count_tokens/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/messages/route.js +1 -1
- package/app/.next/server/app/api/v1/messages/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/models/route.js +1 -1
- package/app/.next/server/app/api/v1/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/moderations/route.js +1 -1
- package/app/.next/server/app/api/v1/moderations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/music/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/music/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/chat/completions/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/embeddings/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route.js.nft.json +1 -1
- package/app/.next/server/app/api/v1/providers/[provider]/images/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/rerank/route.js +1 -1
- package/app/.next/server/app/api/v1/rerank/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/responses/route.js +1 -1
- package/app/.next/server/app/api/v1/responses/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/route.js +1 -1
- package/app/.next/server/app/api/v1/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next/server/app/api/v1/videos/generations/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/[...path]/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next/server/app/api/v1beta/models/route_client-reference-manifest.js +1 -1
- package/app/.next/server/app/callback/page.js +2 -2
- package/app/.next/server/app/callback/page.js.nft.json +1 -1
- package/app/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/docs/page.js +4 -4
- package/app/.next/server/app/docs/page.js.nft.json +1 -1
- package/app/.next/server/app/docs/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forbidden/page.js +2 -2
- package/app/.next/server/app/forbidden/page.js.nft.json +1 -1
- package/app/.next/server/app/forbidden/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/forgot-password/page.js +2 -2
- package/app/.next/server/app/forgot-password/page.js.nft.json +1 -1
- package/app/.next/server/app/forgot-password/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/landing/page.js +2 -2
- package/app/.next/server/app/landing/page.js.nft.json +1 -1
- package/app/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/login/page.js +2 -2
- package/app/.next/server/app/login/page.js.nft.json +1 -1
- package/app/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/maintenance/page.js +2 -2
- package/app/.next/server/app/maintenance/page.js.nft.json +1 -1
- package/app/.next/server/app/maintenance/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/offline/page.js +2 -2
- package/app/.next/server/app/offline/page.js.nft.json +1 -1
- package/app/.next/server/app/offline/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/page.js +2 -2
- package/app/.next/server/app/page.js.nft.json +1 -1
- package/app/.next/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/privacy/page.js +2 -2
- package/app/.next/server/app/privacy/page.js.nft.json +1 -1
- package/app/.next/server/app/privacy/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/status/page.js +2 -2
- package/app/.next/server/app/status/page.js.nft.json +1 -1
- package/app/.next/server/app/status/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app/terms/page.js +2 -2
- package/app/.next/server/app/terms/page.js.nft.json +1 -1
- package/app/.next/server/app/terms/page_client-reference-manifest.js +1 -1
- package/app/.next/server/app-paths-manifest.json +45 -45
- package/app/.next/server/chunks/1909.js +2 -0
- package/app/.next/server/chunks/2910.js +1 -1
- package/app/.next/server/chunks/3648.js +2 -2
- package/app/.next/server/chunks/438.js +1 -1
- package/app/.next/server/chunks/4488.js +1 -1
- package/app/.next/server/chunks/5419.js +1 -1
- package/app/.next/server/chunks/6743.js +1 -1
- package/app/.next/server/chunks/7109.js +1 -1
- package/app/.next/server/chunks/7167.js +1 -0
- package/app/.next/server/chunks/8020.js +3 -3
- package/app/.next/server/chunks/9548.js +1 -1
- package/app/.next/server/chunks/9854.js +1 -1
- package/app/.next/server/middleware-build-manifest.js +1 -1
- package/app/.next/server/middleware.js +3 -3
- package/app/.next/server/next-font-manifest.js +1 -1
- package/app/.next/server/next-font-manifest.json +1 -1
- package/app/.next/server/pages/500.html +2 -2
- package/app/.next/server/server-reference-manifest.js +1 -1
- package/app/.next/server/server-reference-manifest.json +1 -1
- package/app/.next/static/chunks/{5846-a5372beacc2c78c4.js → 5846-b1c617f6f02b4a57.js} +1 -1
- package/app/.next/static/chunks/{647-ffe8ad14f7499725.js → 647-549907058cdc88c1.js} +2 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/a2a/page-ed1f5b1ae0e01c02.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/agents/page-61e2a711247280a5.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-6a2bb3ad980b05b9.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/{page-bef5c045e7eae657.js → page-6ab7701da3357bb9.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-027b3eb09d2d46e0.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-c9b98846b8479f3f.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/auto-combo/{page-8e609f4c9b26a901.js → page-851063ded34ab7a6.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-86acc32f9984a4e2.js +15 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-ac5dcffbe54f77f9.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/costs/{page-7a233357dfbd2e05.js → page-8f6233f59f5277e9.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-36f33de29eb978a1.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/health/{page-66ee4e631429e0d8.js → page-1e1eb2f79d606ab2.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-65334129a8e63369.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/logs/{page-6e4bcb48b8731915.js → page-95e4b5e0bf023d76.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/mcp/page-d9b5c3282ec5d809.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-72b768421394b42c.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/onboarding/{page-d424641c7e428be9.js → page-5378e9473a20cd6a.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-40d20c1273f57206.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/playground/{page-25e333c3c3c88920.js → page-a8b59a29fb924d18.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-350aed2e86512c23.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{error-0400f175dd1372fa.js → error-a5ae03ba05400b04.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/loading-7deaa9f550841465.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-3ef302da4b756e50.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/{page-87f0d43ce6cca0cb.js → page-cd0feb6c545b8a49.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{error-c39d18f10fb7d3f6.js → error-ec9643134a96bbcd.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{loading-b5faf05c78a2cc54.js → loading-3519a633b514f31a.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/{page-6b38a30bfddf3b89.js → page-cbaa4b638a583fe9.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/settings/pricing/{page-a4b8b03ffb39da1d.js → page-69eb8b0eb0e9de00.js} +1 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/translator/{page-9168bf910743b2f5.js → page-10c186a0db5fde20.js} +2 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-8c8f2d59d0cbb516.js +1 -0
- package/app/.next/static/chunks/app/(dashboard)/{layout-6d0afc53f5f2a538.js → layout-7ae0c66c22bee8a1.js} +1 -1
- package/app/.next/static/chunks/app/400/{page-3b77bf358909019a.js → page-3b9079ea400ca287.js} +1 -1
- package/app/.next/static/chunks/app/401/{page-3b77bf358909019a.js → page-3b9079ea400ca287.js} +1 -1
- package/app/.next/static/chunks/app/403/{page-3b77bf358909019a.js → page-3b9079ea400ca287.js} +1 -1
- package/app/.next/static/chunks/app/408/{page-3b77bf358909019a.js → page-3b9079ea400ca287.js} +1 -1
- package/app/.next/static/chunks/app/429/page-3b9079ea400ca287.js +1 -0
- package/app/.next/static/chunks/app/500/page-3b9079ea400ca287.js +1 -0
- package/app/.next/static/chunks/app/502/page-3b9079ea400ca287.js +1 -0
- package/app/.next/static/chunks/app/503/page-3b9079ea400ca287.js +1 -0
- package/app/.next/static/chunks/app/callback/{page-585a53f7dc6a30f1.js → page-0f0ebc0820dd18a5.js} +1 -1
- package/app/.next/static/chunks/app/docs/{page-9624e5fb8cabf7d8.js → page-dc88e0a01d291518.js} +1 -1
- package/app/.next/static/chunks/app/{error-f7f595c541537e63.js → error-32c03f14529d3920.js} +1 -1
- package/app/.next/static/chunks/app/forbidden/page-8d8e1709a1e32585.js +1 -0
- package/app/.next/static/chunks/app/forgot-password/page-d5c9b77748aa9deb.js +1 -0
- package/app/.next/static/chunks/app/global-error-5840b1caa830f2ec.js +1 -0
- package/app/.next/static/chunks/app/landing/page-75b0c988db383cfc.js +1 -0
- package/app/.next/static/chunks/app/{layout-108592eafb959363.js → layout-070972eb026af319.js} +1 -1
- package/app/.next/static/chunks/app/{loading-e063375d5b12a2f7.js → loading-da2f6e1471afc070.js} +1 -1
- package/app/.next/static/chunks/app/login/{page-cf6b82187b09a701.js → page-26d717c652d56032.js} +1 -1
- package/app/.next/static/chunks/app/maintenance/page-3b9079ea400ca287.js +1 -0
- package/app/.next/static/chunks/app/not-found-faf36d2a9a452506.js +1 -0
- package/app/.next/static/chunks/app/offline/page-bf68bf461af876a3.js +1 -0
- package/app/.next/static/chunks/app/privacy/{page-9624e5fb8cabf7d8.js → page-dc88e0a01d291518.js} +1 -1
- package/app/.next/static/chunks/app/status/page-29a433b40631ce12.js +1 -0
- package/app/.next/static/chunks/app/terms/{page-9624e5fb8cabf7d8.js → page-dc88e0a01d291518.js} +1 -1
- package/app/.next/static/chunks/{main-app-c9da11a8061df107.js → main-app-ae230f6bf51a5edb.js} +1 -1
- package/app/.next/static/css/6c29b0b06ee238ca.css +1 -0
- package/app/package.json +1 -1
- package/app/server.js +1 -1
- package/package.json +1 -1
- package/app/.next/server/chunks/5248.js +0 -1
- package/app/.next/server/chunks/7889.js +0 -2
- package/app/.next/static/chunks/app/(dashboard)/dashboard/a2a/page-43d6fa6b75cca497.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/agents/page-19a12c8a9e5ddcd0.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/analytics/loading-49ae846d72948391.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/api-manager/page-16f886b3711a6a50.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/audit-log/page-e5bf8955e7b9a4f5.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/page-d1e5ed188e14c618.js +0 -15
- package/app/.next/static/chunks/app/(dashboard)/dashboard/combos/page-8d4d2f071d114b90.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-7b1037d65eef97a8.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/limits/page-2def921499d2ce60.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/mcp/page-8e35334b9f393139.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/media/page-1d0ca9b5d3eaf7cd.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/page-d75ccdb976b36258.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-7aa887699971d87f.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/loading-9552383fd2e11282.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/providers/new/page-d57908b59d4b482c.js +0 -1
- package/app/.next/static/chunks/app/(dashboard)/dashboard/usage/page-9e20463252daf023.js +0 -1
- package/app/.next/static/chunks/app/429/page-3b77bf358909019a.js +0 -1
- package/app/.next/static/chunks/app/500/page-3b77bf358909019a.js +0 -1
- package/app/.next/static/chunks/app/502/page-3b77bf358909019a.js +0 -1
- package/app/.next/static/chunks/app/503/page-3b77bf358909019a.js +0 -1
- package/app/.next/static/chunks/app/forbidden/page-b33079c1573b0bfa.js +0 -1
- package/app/.next/static/chunks/app/forgot-password/page-90cd6259c75badfc.js +0 -1
- package/app/.next/static/chunks/app/global-error-1dfd1c91ad5199fe.js +0 -1
- package/app/.next/static/chunks/app/landing/page-9d540ab1716f8e3e.js +0 -1
- package/app/.next/static/chunks/app/maintenance/page-3b77bf358909019a.js +0 -1
- package/app/.next/static/chunks/app/not-found-511518956bcae7bc.js +0 -1
- package/app/.next/static/chunks/app/offline/page-9d6ea493783a0219.js +0 -1
- package/app/.next/static/chunks/app/status/page-4e5e9b5a513aa474.js +0 -1
- package/app/.next/static/css/778938813292961d.css +0 -1
- /package/app/.next/static/{piuY84EaxcZW0JuCL2lkI → qsTBENTqLIvbRFZuxtqz5}/_buildManifest.js +0 -0
- /package/app/.next/static/{piuY84EaxcZW0JuCL2lkI → qsTBENTqLIvbRFZuxtqz5}/_ssgManifest.js +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=4488,exports.ids=[4488],exports.modules={44488:(a,b,c)=>{c.d(b,{G6:()=>y,getDbInstance:()=>A,kB:()=>x});var d=c(87550),e=c.n(d),f=c(76760),g=c.n(f),h=c(73024),i=c.n(h),j=c(48161),k=c.n(j);let l="omniroute";function m(){try{return k().homedir()}catch{return process.cwd()}}function n(a){if("string"!=typeof a)return null;let b=a.trim();return b?g().resolve(b):null}function o(){return g().join(m(),`.${l}`)}var p=c(73136);let q=function(){try{let a="file:///home/
|
|
1
|
+
"use strict";exports.id=4488,exports.ids=[4488],exports.modules={44488:(a,b,c)=>{c.d(b,{G6:()=>y,getDbInstance:()=>A,kB:()=>x});var d=c(87550),e=c.n(d),f=c(76760),g=c.n(f),h=c(73024),i=c.n(h),j=c(48161),k=c.n(j);let l="omniroute";function m(){try{return k().homedir()}catch{return process.cwd()}}function n(a){if("string"!=typeof a)return null;let b=a.trim();return b?g().resolve(b):null}function o(){return g().join(m(),`.${l}`)}var p=c(73136);let q=function(){try{let a="file:///home/diegosouzapw/dev/proxys/9router/src/lib/db/migrationRunner.ts";if(a&&a.startsWith("file://")){let b=(0,p.fileURLToPath)(a);return g().join(g().dirname(b),"migrations")}}catch{}return g().join(process.cwd(),"src","lib","db","migrations")}(),r="object"==typeof globalThis.caches&&null!==globalThis.caches,s="phase-production-build"===process.env.NEXT_PHASE,t=function({isCloud:a=!1}={}){if(a)return"/tmp";let b=n(process.env.DATA_DIR);if(b)return b;let c=m();if("win32"===process.platform){let a=process.env.APPDATA||g().join(c,"AppData","Roaming");return g().join(a,l)}let d=n(process.env.XDG_CONFIG_HOME);return d?g().join(d,l):o()}({isCloud:r});r||o();let u=r?null:g().join(t,"storage.sqlite"),v=r?null:g().join(t,"db.json");if(r||g().join(t,"db_backups"),!r&&!i().existsSync(t))try{i().mkdirSync(t,{recursive:!0})}catch(b){let a=b instanceof Error?b.message:String(b);console.warn(`[DB] Cannot create data directory '${t}': ${a}
|
|
2
2
|
[DB] Set the DATA_DIR environment variable to a writable path, e.g.:
|
|
3
3
|
[DB] DATA_DIR=/path/to/writable/dir omniroute`)}let w=`
|
|
4
4
|
CREATE TABLE IF NOT EXISTS provider_connections (
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";exports.id=5419,exports.ids=[5419],exports.modules={647:(a,b,c)=>{c.d(b,{Bm:()=>x,DZ:()=>u,h$:()=>y,nX:()=>t,ne:()=>z,nq:()=>v,yL:()=>s,zl:()=>w});var d=c(64926),e=c(13419);let f=process.env.OMNIROUTE_BASE_URL||"http://localhost:20128",g=process.env.OMNIROUTE_API_KEY||"";async function h(a,b={}){let c=`${f}${a}`,d={"Content-Type":"application/json",...g?{Authorization:`Bearer ${g}`}:{},...b.headers||{}},e=await fetch(c,{...b,headers:d,signal:AbortSignal.timeout(3e4)});if(!e.ok){let a=await e.text().catch(()=>"Unknown error");throw Error(`API [${e.status}]: ${a}`)}return e.json()}function i(a){return!!a&&"object"==typeof a&&!Array.isArray(a)}function j(a){return i(a)?a:{}}function k(a){return Array.isArray(a)?a.filter(i):[]}function l(a,b=""){return"string"==typeof a?a:b}function m(a,b=0){let c="number"==typeof a?a:"string"==typeof a&&a.trim().length>0?Number(a):NaN;return Number.isFinite(c)?c:b}function n(a){let b=k(a.models),c=k(j(a.data).models);return(b.length>0?b:c).map(a=>({provider:l(a.provider,"unknown"),model:l(a.model,""),inputCostPer1M:m(a.inputCostPer1M,3)}))}function o(a){if(Array.isArray(a))return a.filter(i);let b=j(a);return Array.isArray(b.combos)?b.combos.filter(i):[]}let p=null,q={aggressive:{profiles:{oauth:{transientCooldown:3e3,rateLimitCooldown:3e4,maxBackoffLevel:4,circuitBreakerThreshold:2,circuitBreakerReset:3e4},apikey:{transientCooldown:2e3,rateLimitCooldown:0,maxBackoffLevel:3,circuitBreakerThreshold:3,circuitBreakerReset:15e3}},defaults:{requestsPerMinute:180,minTimeBetweenRequests:100,concurrentRequests:16}},balanced:{profiles:{oauth:{transientCooldown:5e3,rateLimitCooldown:6e4,maxBackoffLevel:8,circuitBreakerThreshold:3,circuitBreakerReset:6e4},apikey:{transientCooldown:3e3,rateLimitCooldown:0,maxBackoffLevel:5,circuitBreakerThreshold:5,circuitBreakerReset:3e4}},defaults:{requestsPerMinute:100,minTimeBetweenRequests:200,concurrentRequests:10}},conservative:{profiles:{oauth:{transientCooldown:8e3,rateLimitCooldown:12e4,maxBackoffLevel:10,circuitBreakerThreshold:8,circuitBreakerReset:12e4},apikey:{transientCooldown:5e3,rateLimitCooldown:3e4,maxBackoffLevel:8,circuitBreakerThreshold:8,circuitBreakerReset:6e4}},defaults:{requestsPerMinute:60,minTimeBetweenRequests:350,concurrentRequests:6}}},r={coding:{preferred:["claude","deepseek","codex"],traits:["fast","code-optimized"]},review:{preferred:["claude","gemini","openai"],traits:["analytical","thorough"]},planning:{preferred:["gemini","claude","openai"],traits:["reasoning","structured"]},analysis:{preferred:["gemini","claude"],traits:["deep-reasoning","large-context"]},debugging:{preferred:["claude","deepseek","codex"],traits:["code-aware","fast"]},documentation:{preferred:["gemini","claude","openai"],traits:["clear","structured"]}};async function s(a){let b=Date.now();try{let[c,f,g]=await Promise.allSettled([h("/api/combos"),h("/api/monitoring/health"),h("/api/usage/quota")]),i="fulfilled"===c.status?o(c.value):[],m="fulfilled"===f.status?j(f.value):{},p="fulfilled"===g.status?(0,e.H)(g.value):(0,e.H)({}),q=a.combo?i.find(b=>l(b.id)===a.combo||l(b.name)===a.combo):i.find(a=>!1!==a.enabled);if(!q)return{content:[{type:"text",text:JSON.stringify({error:"No matching combo found"})}],isError:!0};let r=n(q),s=k(m.circuitBreakers),t=p.providers,u=r.map((b,c)=>{let d=s.find(a=>l(a.provider)===b.provider),e=t.find(a=>a.provider===b.provider),f=a.promptTokenEstimate/1e6*b.inputCostPer1M;return{provider:b.provider,model:b.model||a.model,probability:0===c?.85:.15/Math.max(r.length-1,1),estimatedCost:Math.round(1e4*f)/1e4,healthStatus:l(d?.state,"CLOSED"),quotaAvailable:e?.percentRemaining??100}}),v=u.map(a=>a.estimatedCost),w={simulatedPath:u,fallbackTree:{primary:u[0]?.provider||"unknown",fallbacks:u.slice(1).map(a=>a.provider),worstCaseCost:Math.max(...v,0),bestCaseCost:Math.min(...v,0)}};return await (0,d.Bv)("omniroute_simulate_route",a,w,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(w,null,2)}]}}catch(e){let c=e instanceof Error?e.message:String(e);return await (0,d.Bv)("omniroute_simulate_route",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function t(a){let b=Date.now();try{let c=0;try{let a=j(await h("/api/usage/analytics?period=session"));c=m(a.totalCost,0)}catch{}p={sessionId:`budget_${Date.now()}`,maxCost:a.maxCost,action:a.action,degradeToTier:a.degradeToTier,spent:c,createdAt:new Date().toISOString()};let e=Math.max(0,a.maxCost-c),f={sessionId:p.sessionId,budgetTotal:a.maxCost,budgetSpent:Math.round(1e4*c)/1e4,budgetRemaining:Math.round(1e4*e)/1e4,action:a.action,status:e<=0?"exceeded":e<.2*a.maxCost?"warning":"active"};return await (0,d.Bv)("omniroute_set_budget_guard",{maxCost:a.maxCost,action:a.action},f,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(f,null,2)}]}}catch(e){let c=e instanceof Error?e.message:String(e);return await (0,d.Bv)("omniroute_set_budget_guard",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function u(a){let b=Date.now();try{let c=q[a.profile];if(!c)return{content:[{type:"text",text:`Error: Invalid profile "${a.profile}"`}],isError:!0};await h("/api/resilience",{method:"PATCH",body:JSON.stringify({profiles:c.profiles,defaults:c.defaults})});let e={applied:!0,profile:a.profile,settings:c};return await (0,d.Bv)("omniroute_set_resilience_profile",a,e,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(e,null,2)}]}}catch(e){let c=e instanceof Error?e.message:String(e);return await (0,d.Bv)("omniroute_set_resilience_profile",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function v(a){let b=Date.now();try{let c=o(await h("/api/combos")).find(b=>l(b.id)===a.comboId||l(b.name)===a.comboId);if(!c)return{content:[{type:"text",text:JSON.stringify({error:`Combo "${a.comboId}" not found`})}],isError:!0};let e=n(c),f=(a.testPrompt||"Say hello").slice(0,200),g=(await Promise.allSettled(e.map(async a=>{let b=Date.now();try{let c=j(await h("/v1/chat/completions",{method:"POST",body:JSON.stringify({model:a.model||"auto",messages:[{role:"user",content:f}],max_tokens:50,stream:!1,"x-provider":a.provider})})),d=j(c.usage);return{provider:a.provider,model:a.model||l(c.model,"unknown"),success:!0,latencyMs:Date.now()-b,cost:m(c.cost,0),tokenCount:m(d.prompt_tokens,0)+m(d.completion_tokens,0)}}catch(c){return{provider:a.provider,model:a.model||"unknown",success:!1,latencyMs:Date.now()-b,cost:0,tokenCount:0,error:c instanceof Error?c.message:String(c)}}}))).map(a=>"fulfilled"===a.status?a.value:{provider:"unknown",model:"unknown",success:!1,latencyMs:0,cost:0,tokenCount:0,error:"Promise rejected"}),i=g.filter(a=>a.success),k=i.sort((a,b)=>a.latencyMs-b.latencyMs)[0],p=i.sort((a,b)=>a.cost-b.cost)[0],q={results:g,summary:{totalProviders:g.length,successful:i.length,fastestProvider:k?.provider||"none",cheapestProvider:p?.provider||"none"}};return await (0,d.Bv)("omniroute_test_combo",{comboId:a.comboId},q.summary,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(q,null,2)}]}}catch(e){let c=e instanceof Error?e.message:String(e);return await (0,d.Bv)("omniroute_test_combo",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function w(a){let b=Date.now();try{let[c,f,g]=await Promise.allSettled([h("/api/monitoring/health"),h(`/api/usage/quota?provider=${encodeURIComponent(a.provider)}`),h(`/api/usage/analytics?period=session&provider=${encodeURIComponent(a.provider)}`)]),i="fulfilled"===c.status?j(c.value):{},n="fulfilled"===f.status?(0,e.H)(f.value,{provider:a.provider}):(0,e.H)({}),o="fulfilled"===g.status?j(g.value):{},p=k(i.circuitBreakers).find(b=>l(b.provider)===a.provider),q=n.providers.find(b=>b.provider===a.provider)||null,r={provider:a.provider,successRate:m(o.successRate,1),requestCount:m(o.requestCount,0),avgLatencyMs:m(o.avgLatencyMs,0),p50LatencyMs:m(o.p50LatencyMs,0),p95LatencyMs:m(o.p95LatencyMs,0),p99LatencyMs:m(o.p99LatencyMs,0),errorRate:m(o.errorRate,0),lastError:l(o.lastError)||null,circuitBreakerState:l(p?.state,"CLOSED"),quotaInfo:q?{used:q.quotaUsed,total:q.quotaTotal,resetAt:q.resetAt}:{used:0,total:null,resetAt:null}};return await (0,d.Bv)("omniroute_get_provider_metrics",a,r,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(r,null,2)}]}}catch(e){let c=e instanceof Error?e.message:String(e);return await (0,d.Bv)("omniroute_get_provider_metrics",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function x(a){let b=Date.now();try{let c=r[a.taskType]||r.coding,e=o(await h("/api/combos")).filter(a=>!1!==a.enabled);if(0===e.length)return{content:[{type:"text",text:JSON.stringify({error:"No enabled combos available"})}],isError:!0};let f=e.map(a=>{let b=n(a),d=0;for(let a of b){let b=c.preferred.indexOf(a.provider);b>=0&&(d+=(c.preferred.length-b)*10)}let e=l(a.name).toLowerCase();for(let a of c.traits)e.includes(a)&&(d+=5);let f=e.includes("free")||b.every(a=>a.provider.toLowerCase().includes("free"));return{combo:a,score:d,isFree:f}});f.sort((a,b)=>b.score-a.score);let g=f[0],i=f.slice(1,4).map(a=>({id:a.combo.id,name:a.combo.name,tradeoff:a.isFree?"free but may have limits":a.score<.5*g.score?"cheaper but slower":"similar quality, different providers"})),j=f.find(a=>a.isFree&&a!==g),k={recommendedCombo:{id:g.combo.id,name:g.combo.name,reason:`Best match for "${a.taskType}": preferred providers (${c.preferred.slice(0,3).join(", ")})`},alternatives:i,freeAlternative:j?{id:j.combo.id,name:j.combo.name}:null};return await (0,d.Bv)("omniroute_best_combo_for_task",a,k.recommendedCombo,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(k,null,2)}]}}catch(e){let c=e instanceof Error?e.message:String(e);return await (0,d.Bv)("omniroute_best_combo_for_task",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function y(a){let b=Date.now();try{let c=null;try{c=j(await h(`/api/routing/decisions/${encodeURIComponent(a.requestId)}`))}catch{}let e=c?{requestId:a.requestId,decision:{comboUsed:c.comboUsed||"default",providerSelected:c.providerSelected||"unknown",modelUsed:c.modelUsed||"unknown",score:c.score||0,factors:c.factors||[{name:"health",value:1,weight:.3,contribution:.3},{name:"quota",value:1,weight:.25,contribution:.25},{name:"cost",value:.8,weight:.2,contribution:.16},{name:"latency",value:.9,weight:.15,contribution:.135},{name:"task_fit",value:.7,weight:.1,contribution:.07}],fallbacksTriggered:c.fallbacksTriggered||[],costActual:c.costActual||0,latencyActual:c.latencyActual||0}}:{requestId:a.requestId,decision:{comboUsed:"unknown",providerSelected:"unknown",modelUsed:"unknown",score:0,factors:[],fallbacksTriggered:[],costActual:0,latencyActual:0},note:"Routing decision not found. The /api/routing/decisions endpoint may not be implemented yet, or the requestId is invalid."};return await (0,d.Bv)("omniroute_explain_route",a,{requestId:a.requestId},Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(e,null,2)}]}}catch(e){let c=e instanceof Error?e.message:String(e);return await (0,d.Bv)("omniroute_explain_route",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function z(){let a=Date.now();try{let b=j(await h("/api/usage/analytics?period=session").catch(()=>({}))),c=j(b.tokenCount),e=k(b.byModel),f=k(b.byProvider),g={sessionStart:l(b.sessionStart,new Date().toISOString()),duration:l(b.duration,"unknown"),requestCount:m(b.requestCount,0),costTotal:m(b.totalCost,0),tokenCount:{prompt:m(c.prompt,0),completion:m(c.completion,0)},topModels:e.slice(0,5).map(a=>({model:l(a.model,"unknown"),count:m(a.requests,0)})),topProviders:f.slice(0,5).map(a=>({provider:l(a.name,"unknown"),count:m(a.requests,0)})),errors:m(b.errorCount,0),fallbacks:m(b.fallbackCount,0),budgetGuard:p?{active:!0,remaining:Math.max(0,p.maxCost-p.spent),action:p.action}:null};return await (0,d.Bv)("omniroute_get_session_snapshot",{},{requestCount:g.requestCount},Date.now()-a,!0),{content:[{type:"text",text:JSON.stringify(g,null,2)}]}}catch(c){let b=c instanceof Error?c.message:String(c);return await (0,d.Bv)("omniroute_get_session_snapshot",{},null,Date.now()-a,!1,b),{content:[{type:"text",text:`Error: ${b}`}],isError:!0}}}},13234:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Z:()=>i,x:()=>h});var e=c(2306),f=a([e]);function g(a){if(!Array.isArray(a))return[];let b=a.filter(a=>"string"==typeof a).map(a=>a.trim()).filter(Boolean);return Array.from(new Set(b))}function h(a,b=[]){let c="string"==typeof a?.authInfo?.clientId&&a.authInfo.clientId.trim()||"string"==typeof a?.sessionId&&a.sessionId.trim()||"anonymous",d=g(a?.authInfo?.scopes);if(d.length>0)return{callerId:c,scopes:d,source:"authInfo"};let e=function(a){if(!a||"object"!=typeof a)return[];let b=g(a.scopes);if(b.length>0)return b;let c=a.auth;if(c&&"object"==typeof c){let a=g(c.scopes);if(a.length>0)return a}let d=a.omniroute;if(d&&"object"==typeof d){let a=g(d.scopes);if(a.length>0)return a}return[]}(a?._meta);if(e.length>0)return{callerId:c,scopes:e,source:"meta"};let f=g(b);return f.length>0?{callerId:c,scopes:f,source:"env"}:{callerId:c,scopes:[],source:"none"}}function i(a,b,c){let d=e.Dk[a];if(!d)return{allowed:!1,required:[],provided:Array.from(b),missing:[],reason:"tool_definition_missing"};let f=Array.isArray(d.scopes)?Array.from(d.scopes):[],h=g(b);if(!c||0===f.length)return{allowed:!0,required:f,provided:h,missing:[]};let i=f.filter(a=>!h.some(b=>(function(a,b){if("*"===a||a===b)return!0;if(a.endsWith("*")){let c=a.slice(0,-1);return b.startsWith(c)}return!1})(b,a)));return{allowed:0===i.length,required:f,provided:h,missing:i,reason:i.length>0?"missing_scopes":void 0}}e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},13419:(a,b,c)=>{c.d(b,{H:()=>h,J:()=>g});let d=["valid","expiring","expired","refreshing"];function e(a){if("number"==typeof a&&Number.isFinite(a))return a;if("string"==typeof a&&""!==a.trim()){let b=Number(a);if(Number.isFinite(b))return b}return null}function f(a,b,c){return Math.min(c,Math.max(b,a))}function g(a){var b;let c=a&&"object"==typeof a?a:{},g="string"==typeof c.provider?c.provider:"unknown",h="string"==typeof c.name&&c.name.trim()?c.name:g,i="string"==typeof c.connectionId&&c.connectionId.trim()?c.connectionId:"unknown",j=e(c.quotaTotal),k=null!==j&&j>=0?j:null,l=e(c.quotaUsed)??0,m=null!==k?f(l,0,k):Math.max(0,l),n=e(c.percentRemaining);return null===n&&(n=k&&k>0?(k-m)/k*100:100),{name:h,provider:g,connectionId:i,quotaUsed:m,quotaTotal:k,percentRemaining:f(n,0,100),resetAt:"string"==typeof c.resetAt&&c.resetAt.trim()?c.resetAt:null,tokenStatus:"string"==typeof(b=c.tokenStatus)&&d.includes(b)?b:"valid"}}function h(a,b={}){let c=a&&"object"==typeof a?a:{},d=(Array.isArray(c.providers)?c.providers:Array.isArray(a)?a:[]).map(a=>g(a)),e=c.meta&&"object"==typeof c.meta?c.meta:{},f=e.filters&&"object"==typeof e.filters?e.filters:{},i=b.provider??("string"==typeof f.provider&&f.provider.trim()?f.provider:null),j=b.connectionId??("string"==typeof f.connectionId&&f.connectionId.trim()?f.connectionId:null);return{providers:d,meta:{generatedAt:"string"==typeof e.generatedAt&&e.generatedAt.trim()?e.generatedAt:new Date().toISOString(),filters:{provider:i||null,connectionId:j||null},totalProviders:d.length}}}},25755:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{c:()=>B});var e=c(10610),f=c(92827),g=c(2306),h=c(43620),i=c(64926),j=c(13234),k=c(647),l=c(13419),m=a([e,f,g,j]);[e,f,g,j]=m.then?(await m)():m;let D=process.env.OMNIROUTE_BASE_URL||"http://localhost:20128",E=process.env.OMNIROUTE_API_KEY||"",F="true"===process.env.OMNIROUTE_MCP_ENFORCE_SCOPES,G=new Set((process.env.OMNIROUTE_MCP_SCOPES||"").split(",").map(a=>a.trim()).filter(Boolean));function n(a){return a&&"object"==typeof a&&!Array.isArray(a)?a:{}}function o(a){return Array.isArray(a)?a:[]}function p(a,b=""){return"string"==typeof a?a:b}function q(a,b=0){return"number"==typeof a&&Number.isFinite(a)?a:b}async function r(a,b={}){let c=`${D}${a}`,d={"Content-Type":"application/json",...E?{Authorization:`Bearer ${E}`}:{},...b.headers||{}},e=await fetch(c,{...b,headers:d,signal:AbortSignal.timeout(1e4)});if(!e.ok){let a=await e.text().catch(()=>"Unknown error");throw Error(`OmniRoute API error [${e.status}]: ${a}`)}return e.json()}function s(a,b){return async(c,d)=>{let e=(0,j.x)(d,Array.from(G)),f=(0,j.Z)(a,e.scopes,F);if(!f.allowed){let b=f.missing.length>0?f.missing.join(", "):"unavailable",d=f.reason||"scope_check_failed",g=`Insufficient MCP scopes for ${a}. Missing: ${b}. Caller=${e.callerId}, source=${e.source}.`,h=c&&"object"==typeof c?n(c):{rawArgs:c};return await (0,i.Bv)(a,{...h,_scopeCheck:{callerId:e.callerId,source:e.source,required:f.required,provided:f.provided,missing:f.missing}},null,0,!1,`scope_denied:${d}`),{content:[{type:"text",text:`Error: ${g}`}],isError:!0}}return b(c,d)}}async function t(){let a=Date.now();try{let[b,c,d]=await Promise.allSettled([r("/api/monitoring/health"),r("/api/resilience"),r("/api/rate-limits")]),e="fulfilled"===b.status?n(b.value):{},f="fulfilled"===c.status?n(c.value):{},g="fulfilled"===d.status?n(d.value):{},h=n(e.memoryUsage),j=n(e.cacheStats),k=o(f.circuitBreakers),l=o(g.limits),m={uptime:p(e.uptime,"unknown"),version:p(e.version,"unknown"),memoryUsage:{heapUsed:q(h.heapUsed,0),heapTotal:q(h.heapTotal,0)},circuitBreakers:k,rateLimits:l,cacheStats:Object.keys(j).length>0?{hits:q(j.hits,0),misses:q(j.misses,0),hitRate:q(j.hitRate,0)}:void 0};return await (0,i.Bv)("omniroute_get_health",{},m,Date.now()-a,!0),{content:[{type:"text",text:JSON.stringify(m,null,2)}]}}catch(c){let b=c instanceof Error?c.message:String(c);return await (0,i.Bv)("omniroute_get_health",{},null,Date.now()-a,!1,b),{content:[{type:"text",text:`Error: ${b}`}],isError:!0}}}async function u(a){let b=Date.now();try{let c=await r("/api/combos"),d=n(c),e=Array.isArray(d.combos)?d.combos:Array.isArray(c)?c:[],f={};a.includeMetrics&&(f=n(await r("/api/combos/metrics").catch(()=>({}))));let g={combos:o(e).map(b=>{let c=n(b),d=n(c.data),e=p(c.id,""),g=Array.isArray(c.models)&&c.models.length>0?c.models:d.models;return{id:e,name:p(c.name,e||"unnamed"),models:o(g).map((a,b)=>{let c=n(a);return{provider:p(c.provider,"unknown"),model:p(c.model,"unknown"),priority:q(c.priority,b+1)}}),strategy:p(c.strategy,p(d.strategy,"priority")),enabled:!1!==c.enabled,...a.includeMetrics?{metrics:f[e]??null}:{}}})};return await (0,i.Bv)("omniroute_list_combos",a,g,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(g,null,2)}]}}catch(d){let c=d instanceof Error?d.message:String(d);return await (0,i.Bv)("omniroute_list_combos",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function v(a){let b=Date.now();try{let c=await r(`/api/combos/metrics?comboId=${encodeURIComponent(a.comboId)}`);return await (0,i.Bv)("omniroute_get_combo_metrics",a,c,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(c,null,2)}]}}catch(d){let c=d instanceof Error?d.message:String(d);return await (0,i.Bv)("omniroute_get_combo_metrics",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function w(a){let b=Date.now();try{let c=await r(`/api/combos/${encodeURIComponent(a.comboId)}`,{method:"PUT",body:JSON.stringify({isActive:a.active})});return await (0,i.Bv)("omniroute_switch_combo",a,c,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(c,null,2)}]}}catch(d){let c=d instanceof Error?d.message:String(d);return await (0,i.Bv)("omniroute_switch_combo",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function x(a){let b=Date.now();try{let c="/api/usage/quota";a.connectionId?c+=`?connectionId=${encodeURIComponent(a.connectionId)}`:a.provider&&(c+=`?provider=${encodeURIComponent(a.provider)}`);let d=(0,l.H)(await r(c),{provider:a.provider||null,connectionId:a.connectionId||null});return await (0,i.Bv)("omniroute_check_quota",a,d,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(d,null,2)}]}}catch(d){let c=d instanceof Error?d.message:String(d);return await (0,i.Bv)("omniroute_check_quota",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function y(a){let b=Date.now();try{let c={model:a.model,messages:a.messages,stream:!1};a.combo&&(c["x-combo"]=a.combo);let d=await r("/v1/chat/completions",{method:"POST",body:JSON.stringify(c)}),e=o(d.choices),f=n(e[0]),g=n(f.message),h=n(d.usage),j={response:{content:p(g.content,""),model:p(d.model,a.model),tokens:{prompt:q(h.prompt_tokens,0),completion:q(h.completion_tokens,0)}},routing:{provider:p(d.provider,"unknown"),combo:d.combo??null,fallbacksTriggered:q(d.fallbacksTriggered,0),cost:q(d.cost,0),latencyMs:Date.now()-b,routingExplanation:p(d.routingExplanation,"Request routed through primary provider")}};return await (0,i.Bv)("omniroute_route_request",{model:a.model,messageCount:a.messages.length},j.routing,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(j,null,2)}]}}catch(d){let c=d instanceof Error?d.message:String(d);return await (0,i.Bv)("omniroute_route_request",{model:a.model},null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function z(a){let b=Date.now();try{let c=a.period||"session",d={session:"1d",day:"1d",week:"7d",month:"30d"}[c]||"30d",e=n(await r(`/api/usage/analytics?range=${encodeURIComponent(d)}`)),f=n(e.tokenCount),g=n(e.budget),h={period:c,totalCost:q(e.totalCost,0),requestCount:q(e.requestCount,0),tokenCount:{prompt:q(f.prompt,0),completion:q(f.completion,0)},byProvider:o(e.byProvider),byModel:o(e.byModel),budget:{limit:g.limit??null,remaining:g.remaining??null}};return await (0,i.Bv)("omniroute_cost_report",a,h,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(h,null,2)}]}}catch(d){let c=d instanceof Error?d.message:String(d);return await (0,i.Bv)("omniroute_cost_report",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function A(a){let b=Date.now();try{let c="/v1/models",d=new URLSearchParams;a.provider&&d.set("provider",a.provider),a.capability&&d.set("capability",a.capability),d.toString()&&(c+=`?${d.toString()}`);let e=n(await r(c)),f={models:o(e.data).map(a=>{let b=n(a);return{id:p(b.id,""),provider:p(b.owned_by,p(b.provider,"unknown")),capabilities:function(a,b=[]){let c=o(a).filter(a=>"string"==typeof a);return c.length>0?c:b}(b.capabilities,["chat"]),status:p(b.status,"available"),pricing:b.pricing}})};return await (0,i.Bv)("omniroute_list_models_catalog",a,{modelCount:f.models.length},Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(f,null,2)}]}}catch(d){let c=d instanceof Error?d.message:String(d);return await (0,i.Bv)("omniroute_list_models_catalog",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}function B(){let a=new e._({name:"omniroute",version:process.env.npm_package_version||"1.8.1"});return a.registerTool("omniroute_get_health",{description:"Returns OmniRoute health status including uptime, memory, circuit breakers, rate limits, and cache stats",inputSchema:g.nu},s("omniroute_get_health",async a=>(g.nu.parse(a??{}),t()))),a.registerTool("omniroute_list_combos",{description:"Lists all configured combos (model chains) with strategies and optional metrics",inputSchema:g.ME},s("omniroute_list_combos",a=>u(g.ME.parse(a)))),a.registerTool("omniroute_get_combo_metrics",{description:"Returns detailed performance metrics for a specific combo",inputSchema:g.Gs},s("omniroute_get_combo_metrics",a=>v(g.Gs.parse(a)))),a.registerTool("omniroute_switch_combo",{description:"Activates or deactivates a combo for routing",inputSchema:g.B1},s("omniroute_switch_combo",a=>w(g.B1.parse(a)))),a.registerTool("omniroute_check_quota",{description:"Checks remaining API quota for one or all providers",inputSchema:g.Fp},s("omniroute_check_quota",a=>x(g.Fp.parse(a)))),a.registerTool("omniroute_route_request",{description:"Sends a chat completion request through OmniRoute intelligent routing",inputSchema:g.fL},s("omniroute_route_request",a=>y(g.fL.parse(a)))),a.registerTool("omniroute_cost_report",{description:"Generates a cost report for the specified period",inputSchema:g.c},s("omniroute_cost_report",a=>z(g.c.parse(a)))),a.registerTool("omniroute_list_models_catalog",{description:"Lists all available AI models across providers with capabilities and pricing",inputSchema:g._v},s("omniroute_list_models_catalog",a=>A(g._v.parse(a)))),a.registerTool("omniroute_simulate_route",{description:"Simulates the routing path a request would take without executing it (dry-run)",inputSchema:g.gl},s("omniroute_simulate_route",a=>(0,k.yL)(g.gl.parse(a)))),a.registerTool("omniroute_set_budget_guard",{description:"Sets a session budget limit with configurable action when exceeded (degrade/block/alert)",inputSchema:g.b9},s("omniroute_set_budget_guard",a=>(0,k.nX)(g.b9.parse(a)))),a.registerTool("omniroute_set_resilience_profile",{description:"Applies a resilience profile controlling circuit breakers, retries, timeouts, and fallback depth",inputSchema:g.dE},s("omniroute_set_resilience_profile",a=>(0,k.DZ)(g.dE.parse(a)))),a.registerTool("omniroute_test_combo",{description:"Tests each provider in a combo with a real prompt, reporting latency, cost, and success per provider",inputSchema:g.n0},s("omniroute_test_combo",a=>(0,k.nq)(g.n0.parse(a)))),a.registerTool("omniroute_get_provider_metrics",{description:"Returns detailed metrics for a specific provider including latency percentiles and circuit breaker state",inputSchema:g.xs},s("omniroute_get_provider_metrics",a=>(0,k.zl)(g.xs.parse(a)))),a.registerTool("omniroute_best_combo_for_task",{description:"Recommends the best combo for a task type based on provider fitness and constraints",inputSchema:g.h0},s("omniroute_best_combo_for_task",a=>(0,k.Bm)(g.h0.parse(a)))),a.registerTool("omniroute_explain_route",{description:"Explains why a request was routed to a specific provider, showing scoring factors and fallbacks",inputSchema:g.t7},s("omniroute_explain_route",a=>(0,k.h$)(g.t7.parse(a)))),a.registerTool("omniroute_get_session_snapshot",{description:"Returns a full snapshot of the current working session: cost, tokens, top models, errors, budget status",inputSchema:g.ne},s("omniroute_get_session_snapshot",async a=>(g.ne.parse(a??{}),(0,k.ne)()))),a}async function C(){let a=B(),b=new f.S,c=process.env.npm_package_version||"1.8.1",d=(0,h.rs)({version:c,scopesEnforced:F,allowedScopes:Array.from(G),toolCount:g.nS.length}),e=()=>{d()};process.once("exit",e),process.once("SIGINT",e),process.once("SIGTERM",e),console.error("[MCP] OmniRoute MCP Server starting (stdio transport)...");try{await a.connect(b),console.error("[MCP] OmniRoute MCP Server connected and ready.")}finally{e(),process.off("exit",e),process.off("SIGINT",e),process.off("SIGTERM",e)}}process.argv[1]&&"file:///home/runner/work/OmniRoute/OmniRoute/open-sse/mcp-server/server.ts".endsWith(process.argv[1].replace(/\\/g,"/"))&&C().catch(a=>{console.error("[MCP] Fatal error:",a),process.exit(1)}),d()}catch(a){d(a)}})},43620:(a,b,c)=>{c.d(b,{Im:()=>n,c7:()=>i,h6:()=>l,jW:()=>m,rs:()=>k});var d=c(73024),e=c(48161),f=c(76760);let g="runtime";function h(){let a=process.env.DATA_DIR;return"string"==typeof a&&a.trim().length>0?a.trim():(0,f.join)((0,e.homedir)(),".omniroute")}function i(){return(0,f.join)(h(),g,"mcp-heartbeat.json")}async function j(a){let b=i(),c=(0,f.join)(h(),g);await d.promises.mkdir(c,{recursive:!0}),await d.promises.writeFile(b,JSON.stringify(a,null,2),"utf-8")}function k(a){let b=new Date().toISOString(),c=null,d=!1,e="number"==typeof a.intervalMs&&a.intervalMs>0?a.intervalMs:5e3,f=async()=>{if(d)return;let c={pid:process.pid,startedAt:b,lastHeartbeatAt:new Date().toISOString(),version:a.version,transport:"stdio",scopesEnforced:a.scopesEnforced,allowedScopes:[...a.allowedScopes],toolCount:a.toolCount};try{await j(c)}catch(a){console.error("[MCP Heartbeat] Failed to write heartbeat:",a instanceof Error?a.message:String(a))}};return f(),c=setInterval(()=>{f()},e),()=>{d||(d=!0,c&&(clearInterval(c),c=null),f())}}async function l(){let a=i();try{let b=await d.promises.readFile(a,"utf-8"),c=JSON.parse(b);if(!c||"object"!=typeof c||"number"!=typeof c.pid||"string"!=typeof c.startedAt||"string"!=typeof c.lastHeartbeatAt||"string"!=typeof c.version||"stdio"!==c.transport||"boolean"!=typeof c.scopesEnforced||!Array.isArray(c.allowedScopes)||"number"!=typeof c.toolCount)return null;let e=c.allowedScopes.filter(a=>"string"==typeof a);return{pid:c.pid,startedAt:c.startedAt,lastHeartbeatAt:c.lastHeartbeatAt,version:c.version,transport:"stdio",scopesEnforced:c.scopesEnforced,allowedScopes:e,toolCount:c.toolCount}}catch{return null}}function m(a){if(!Number.isFinite(a)||a<=0)return!1;try{return process.kill(a,0),!0}catch{return!1}}function n(a,b){if(!a)return!1;let c="number"==typeof b?.staleAfterMs&&b.staleAfterMs>0?b.staleAfterMs:15e3,d=Date.now()-new Date(a.lastHeartbeatAt).getTime();return!!Number.isFinite(d)&&!(d>c)&&(b?.requireLivePid===!1||m(a.pid))}},45419:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{V6:()=>j,e5:()=>k,lJ:()=>l});var e=c(77598),f=c(25755),g=c(60021),h=a([f,g]);[f,g]=h.then?(await h)():h;let m=null,n=null,o=null,p=null;function i(a){if(m&&n&&p===a)return{server:m,transport:n};if(n)try{n.close()}catch{}return m=(0,f.c)(),n=new g.a({sessionIdGenerator:()=>(0,e.randomUUID)()}),p=a,o=Date.now(),m.connect(n),console.log(`[MCP] HTTP transport started (${a})`),{server:m,transport:n}}async function j(a){let{transport:b}=i("streamable-http");try{return await b.handleRequest(a)}catch(a){return console.error("[MCP] Streamable HTTP error:",a),new Response(JSON.stringify({error:"MCP transport error"}),{status:500,headers:{"Content-Type":"application/json"}})}}async function k(a){let{transport:b}=i("sse");try{return await b.handleRequest(a)}catch(a){return console.error("[MCP] SSE error:",a),new Response(JSON.stringify({error:"MCP SSE transport error"}),{status:500,headers:{"Content-Type":"application/json"}})}}function l(){return{online:null!==n&&null!==p,transport:p,startedAt:o,uptime:o?`${Math.floor((Date.now()-o)/1e3)}s`:null}}d()}catch(a){d(a)}})},64926:(a,b,c)=>{async function d(a){let b=JSON.stringify(a),c=new TextEncoder;return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",c.encode(b)))).map(a=>a.toString(16).padStart(2,"0")).join("")}function e(a){return"string"==typeof a?a:null}function f(a,b){let c=i(a,b);return Number.isFinite(c)?Math.max(0,Math.floor(c)):b}function g(a){return{id:f(a.id,0),toolName:j(a.tool_name),inputHash:j(a.input_hash),outputSummary:j(a.output_summary),durationMs:i(a.duration_ms,0),apiKeyId:e(a.api_key_id),success:function(a,b=!1){return"boolean"==typeof a?a:1===a||"1"===a||0!==a&&"0"!==a&&b}(a.success,!1),errorCode:e(a.error_code),createdAt:j(a.created_at)}}c.d(b,{JY:()=>n,Bv:()=>l,Gj:()=>m});let h=null;function i(a,b=0){let c="number"==typeof a?a:"string"==typeof a&&a.trim().length>0?Number(a):NaN;return Number.isFinite(c)?c:b}function j(a){return"string"==typeof a?a:""}async function k(){if(h)return h;try{let{homedir:a}=await Promise.resolve().then(c.t.bind(c,48161,23)),{join:b}=await Promise.resolve().then(c.t.bind(c,76760,23)),{existsSync:d}=await Promise.resolve().then(c.t.bind(c,73024,23)),e=process.env.DATA_DIR?b(process.env.DATA_DIR,"storage.sqlite"):b(a(),".omniroute","storage.sqlite");if(!d(e))return console.error(`[MCP Audit] Database not found at ${e} — audit logging disabled`),null;return h=new(await Promise.resolve().then(c.t.bind(c,87550,23))).default(e)}catch(a){return console.error("[MCP Audit] Failed to connect to database:",a instanceof Error?a.message:String(a)),null}}async function l(a,b,c,e,f,g){try{let h=await k();if(!h)return;let i=await d(b),j=function(a,b=200){if(null==a)return"(null)";let c="string"==typeof a?a:JSON.stringify(a);return c.length<=b?c:c.slice(0,b)+"…"}(c),l=process.env.OMNIROUTE_API_KEY_ID||null;h.prepare(`INSERT INTO mcp_tool_audit (tool_name, input_hash, output_summary, duration_ms, api_key_id, success, error_code)
|
|
1
|
+
"use strict";exports.id=5419,exports.ids=[5419],exports.modules={647:(a,b,c)=>{c.d(b,{Bm:()=>x,DZ:()=>u,h$:()=>y,nX:()=>t,ne:()=>z,nq:()=>v,yL:()=>s,zl:()=>w});var d=c(64926),e=c(13419);let f=process.env.OMNIROUTE_BASE_URL||"http://localhost:20128",g=process.env.OMNIROUTE_API_KEY||"";async function h(a,b={}){let c=`${f}${a}`,d={"Content-Type":"application/json",...g?{Authorization:`Bearer ${g}`}:{},...b.headers||{}},e=await fetch(c,{...b,headers:d,signal:AbortSignal.timeout(3e4)});if(!e.ok){let a=await e.text().catch(()=>"Unknown error");throw Error(`API [${e.status}]: ${a}`)}return e.json()}function i(a){return!!a&&"object"==typeof a&&!Array.isArray(a)}function j(a){return i(a)?a:{}}function k(a){return Array.isArray(a)?a.filter(i):[]}function l(a,b=""){return"string"==typeof a?a:b}function m(a,b=0){let c="number"==typeof a?a:"string"==typeof a&&a.trim().length>0?Number(a):NaN;return Number.isFinite(c)?c:b}function n(a){let b=k(a.models),c=k(j(a.data).models);return(b.length>0?b:c).map(a=>({provider:l(a.provider,"unknown"),model:l(a.model,""),inputCostPer1M:m(a.inputCostPer1M,3)}))}function o(a){if(Array.isArray(a))return a.filter(i);let b=j(a);return Array.isArray(b.combos)?b.combos.filter(i):[]}let p=null,q={aggressive:{profiles:{oauth:{transientCooldown:3e3,rateLimitCooldown:3e4,maxBackoffLevel:4,circuitBreakerThreshold:2,circuitBreakerReset:3e4},apikey:{transientCooldown:2e3,rateLimitCooldown:0,maxBackoffLevel:3,circuitBreakerThreshold:3,circuitBreakerReset:15e3}},defaults:{requestsPerMinute:180,minTimeBetweenRequests:100,concurrentRequests:16}},balanced:{profiles:{oauth:{transientCooldown:5e3,rateLimitCooldown:6e4,maxBackoffLevel:8,circuitBreakerThreshold:3,circuitBreakerReset:6e4},apikey:{transientCooldown:3e3,rateLimitCooldown:0,maxBackoffLevel:5,circuitBreakerThreshold:5,circuitBreakerReset:3e4}},defaults:{requestsPerMinute:100,minTimeBetweenRequests:200,concurrentRequests:10}},conservative:{profiles:{oauth:{transientCooldown:8e3,rateLimitCooldown:12e4,maxBackoffLevel:10,circuitBreakerThreshold:8,circuitBreakerReset:12e4},apikey:{transientCooldown:5e3,rateLimitCooldown:3e4,maxBackoffLevel:8,circuitBreakerThreshold:8,circuitBreakerReset:6e4}},defaults:{requestsPerMinute:60,minTimeBetweenRequests:350,concurrentRequests:6}}},r={coding:{preferred:["claude","deepseek","codex"],traits:["fast","code-optimized"]},review:{preferred:["claude","gemini","openai"],traits:["analytical","thorough"]},planning:{preferred:["gemini","claude","openai"],traits:["reasoning","structured"]},analysis:{preferred:["gemini","claude"],traits:["deep-reasoning","large-context"]},debugging:{preferred:["claude","deepseek","codex"],traits:["code-aware","fast"]},documentation:{preferred:["gemini","claude","openai"],traits:["clear","structured"]}};async function s(a){let b=Date.now();try{let[c,f,g]=await Promise.allSettled([h("/api/combos"),h("/api/monitoring/health"),h("/api/usage/quota")]),i="fulfilled"===c.status?o(c.value):[],m="fulfilled"===f.status?j(f.value):{},p="fulfilled"===g.status?(0,e.H)(g.value):(0,e.H)({}),q=a.combo?i.find(b=>l(b.id)===a.combo||l(b.name)===a.combo):i.find(a=>!1!==a.enabled);if(!q)return{content:[{type:"text",text:JSON.stringify({error:"No matching combo found"})}],isError:!0};let r=n(q),s=k(m.circuitBreakers),t=p.providers,u=r.map((b,c)=>{let d=s.find(a=>l(a.provider)===b.provider),e=t.find(a=>a.provider===b.provider),f=a.promptTokenEstimate/1e6*b.inputCostPer1M;return{provider:b.provider,model:b.model||a.model,probability:0===c?.85:.15/Math.max(r.length-1,1),estimatedCost:Math.round(1e4*f)/1e4,healthStatus:l(d?.state,"CLOSED"),quotaAvailable:e?.percentRemaining??100}}),v=u.map(a=>a.estimatedCost),w={simulatedPath:u,fallbackTree:{primary:u[0]?.provider||"unknown",fallbacks:u.slice(1).map(a=>a.provider),worstCaseCost:Math.max(...v,0),bestCaseCost:Math.min(...v,0)}};return await (0,d.Bv)("omniroute_simulate_route",a,w,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(w,null,2)}]}}catch(e){let c=e instanceof Error?e.message:String(e);return await (0,d.Bv)("omniroute_simulate_route",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function t(a){let b=Date.now();try{let c=0;try{let a=j(await h("/api/usage/analytics?period=session"));c=m(a.totalCost,0)}catch{}p={sessionId:`budget_${Date.now()}`,maxCost:a.maxCost,action:a.action,degradeToTier:a.degradeToTier,spent:c,createdAt:new Date().toISOString()};let e=Math.max(0,a.maxCost-c),f={sessionId:p.sessionId,budgetTotal:a.maxCost,budgetSpent:Math.round(1e4*c)/1e4,budgetRemaining:Math.round(1e4*e)/1e4,action:a.action,status:e<=0?"exceeded":e<.2*a.maxCost?"warning":"active"};return await (0,d.Bv)("omniroute_set_budget_guard",{maxCost:a.maxCost,action:a.action},f,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(f,null,2)}]}}catch(e){let c=e instanceof Error?e.message:String(e);return await (0,d.Bv)("omniroute_set_budget_guard",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function u(a){let b=Date.now();try{let c=q[a.profile];if(!c)return{content:[{type:"text",text:`Error: Invalid profile "${a.profile}"`}],isError:!0};await h("/api/resilience",{method:"PATCH",body:JSON.stringify({profiles:c.profiles,defaults:c.defaults})});let e={applied:!0,profile:a.profile,settings:c};return await (0,d.Bv)("omniroute_set_resilience_profile",a,e,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(e,null,2)}]}}catch(e){let c=e instanceof Error?e.message:String(e);return await (0,d.Bv)("omniroute_set_resilience_profile",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function v(a){let b=Date.now();try{let c=o(await h("/api/combos")).find(b=>l(b.id)===a.comboId||l(b.name)===a.comboId);if(!c)return{content:[{type:"text",text:JSON.stringify({error:`Combo "${a.comboId}" not found`})}],isError:!0};let e=n(c),f=(a.testPrompt||"Say hello").slice(0,200),g=(await Promise.allSettled(e.map(async a=>{let b=Date.now();try{let c=j(await h("/v1/chat/completions",{method:"POST",body:JSON.stringify({model:a.model||"auto",messages:[{role:"user",content:f}],max_tokens:50,stream:!1,"x-provider":a.provider})})),d=j(c.usage);return{provider:a.provider,model:a.model||l(c.model,"unknown"),success:!0,latencyMs:Date.now()-b,cost:m(c.cost,0),tokenCount:m(d.prompt_tokens,0)+m(d.completion_tokens,0)}}catch(c){return{provider:a.provider,model:a.model||"unknown",success:!1,latencyMs:Date.now()-b,cost:0,tokenCount:0,error:c instanceof Error?c.message:String(c)}}}))).map(a=>"fulfilled"===a.status?a.value:{provider:"unknown",model:"unknown",success:!1,latencyMs:0,cost:0,tokenCount:0,error:"Promise rejected"}),i=g.filter(a=>a.success),k=i.sort((a,b)=>a.latencyMs-b.latencyMs)[0],p=i.sort((a,b)=>a.cost-b.cost)[0],q={results:g,summary:{totalProviders:g.length,successful:i.length,fastestProvider:k?.provider||"none",cheapestProvider:p?.provider||"none"}};return await (0,d.Bv)("omniroute_test_combo",{comboId:a.comboId},q.summary,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(q,null,2)}]}}catch(e){let c=e instanceof Error?e.message:String(e);return await (0,d.Bv)("omniroute_test_combo",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function w(a){let b=Date.now();try{let[c,f,g]=await Promise.allSettled([h("/api/monitoring/health"),h(`/api/usage/quota?provider=${encodeURIComponent(a.provider)}`),h(`/api/usage/analytics?period=session&provider=${encodeURIComponent(a.provider)}`)]),i="fulfilled"===c.status?j(c.value):{},n="fulfilled"===f.status?(0,e.H)(f.value,{provider:a.provider}):(0,e.H)({}),o="fulfilled"===g.status?j(g.value):{},p=k(i.circuitBreakers).find(b=>l(b.provider)===a.provider),q=n.providers.find(b=>b.provider===a.provider)||null,r={provider:a.provider,successRate:m(o.successRate,1),requestCount:m(o.requestCount,0),avgLatencyMs:m(o.avgLatencyMs,0),p50LatencyMs:m(o.p50LatencyMs,0),p95LatencyMs:m(o.p95LatencyMs,0),p99LatencyMs:m(o.p99LatencyMs,0),errorRate:m(o.errorRate,0),lastError:l(o.lastError)||null,circuitBreakerState:l(p?.state,"CLOSED"),quotaInfo:q?{used:q.quotaUsed,total:q.quotaTotal,resetAt:q.resetAt}:{used:0,total:null,resetAt:null}};return await (0,d.Bv)("omniroute_get_provider_metrics",a,r,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(r,null,2)}]}}catch(e){let c=e instanceof Error?e.message:String(e);return await (0,d.Bv)("omniroute_get_provider_metrics",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function x(a){let b=Date.now();try{let c=r[a.taskType]||r.coding,e=o(await h("/api/combos")).filter(a=>!1!==a.enabled);if(0===e.length)return{content:[{type:"text",text:JSON.stringify({error:"No enabled combos available"})}],isError:!0};let f=e.map(a=>{let b=n(a),d=0;for(let a of b){let b=c.preferred.indexOf(a.provider);b>=0&&(d+=(c.preferred.length-b)*10)}let e=l(a.name).toLowerCase();for(let a of c.traits)e.includes(a)&&(d+=5);let f=e.includes("free")||b.every(a=>a.provider.toLowerCase().includes("free"));return{combo:a,score:d,isFree:f}});f.sort((a,b)=>b.score-a.score);let g=f[0],i=f.slice(1,4).map(a=>({id:a.combo.id,name:a.combo.name,tradeoff:a.isFree?"free but may have limits":a.score<.5*g.score?"cheaper but slower":"similar quality, different providers"})),j=f.find(a=>a.isFree&&a!==g),k={recommendedCombo:{id:g.combo.id,name:g.combo.name,reason:`Best match for "${a.taskType}": preferred providers (${c.preferred.slice(0,3).join(", ")})`},alternatives:i,freeAlternative:j?{id:j.combo.id,name:j.combo.name}:null};return await (0,d.Bv)("omniroute_best_combo_for_task",a,k.recommendedCombo,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(k,null,2)}]}}catch(e){let c=e instanceof Error?e.message:String(e);return await (0,d.Bv)("omniroute_best_combo_for_task",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function y(a){let b=Date.now();try{let c=null;try{c=j(await h(`/api/routing/decisions/${encodeURIComponent(a.requestId)}`))}catch{}let e=c?{requestId:a.requestId,decision:{comboUsed:c.comboUsed||"default",providerSelected:c.providerSelected||"unknown",modelUsed:c.modelUsed||"unknown",score:c.score||0,factors:c.factors||[{name:"health",value:1,weight:.3,contribution:.3},{name:"quota",value:1,weight:.25,contribution:.25},{name:"cost",value:.8,weight:.2,contribution:.16},{name:"latency",value:.9,weight:.15,contribution:.135},{name:"task_fit",value:.7,weight:.1,contribution:.07}],fallbacksTriggered:c.fallbacksTriggered||[],costActual:c.costActual||0,latencyActual:c.latencyActual||0}}:{requestId:a.requestId,decision:{comboUsed:"unknown",providerSelected:"unknown",modelUsed:"unknown",score:0,factors:[],fallbacksTriggered:[],costActual:0,latencyActual:0},note:"Routing decision not found. The /api/routing/decisions endpoint may not be implemented yet, or the requestId is invalid."};return await (0,d.Bv)("omniroute_explain_route",a,{requestId:a.requestId},Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(e,null,2)}]}}catch(e){let c=e instanceof Error?e.message:String(e);return await (0,d.Bv)("omniroute_explain_route",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function z(){let a=Date.now();try{let b=j(await h("/api/usage/analytics?period=session").catch(()=>({}))),c=j(b.tokenCount),e=k(b.byModel),f=k(b.byProvider),g={sessionStart:l(b.sessionStart,new Date().toISOString()),duration:l(b.duration,"unknown"),requestCount:m(b.requestCount,0),costTotal:m(b.totalCost,0),tokenCount:{prompt:m(c.prompt,0),completion:m(c.completion,0)},topModels:e.slice(0,5).map(a=>({model:l(a.model,"unknown"),count:m(a.requests,0)})),topProviders:f.slice(0,5).map(a=>({provider:l(a.name,"unknown"),count:m(a.requests,0)})),errors:m(b.errorCount,0),fallbacks:m(b.fallbackCount,0),budgetGuard:p?{active:!0,remaining:Math.max(0,p.maxCost-p.spent),action:p.action}:null};return await (0,d.Bv)("omniroute_get_session_snapshot",{},{requestCount:g.requestCount},Date.now()-a,!0),{content:[{type:"text",text:JSON.stringify(g,null,2)}]}}catch(c){let b=c instanceof Error?c.message:String(c);return await (0,d.Bv)("omniroute_get_session_snapshot",{},null,Date.now()-a,!1,b),{content:[{type:"text",text:`Error: ${b}`}],isError:!0}}}},13234:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{Z:()=>i,x:()=>h});var e=c(2306),f=a([e]);function g(a){if(!Array.isArray(a))return[];let b=a.filter(a=>"string"==typeof a).map(a=>a.trim()).filter(Boolean);return Array.from(new Set(b))}function h(a,b=[]){let c="string"==typeof a?.authInfo?.clientId&&a.authInfo.clientId.trim()||"string"==typeof a?.sessionId&&a.sessionId.trim()||"anonymous",d=g(a?.authInfo?.scopes);if(d.length>0)return{callerId:c,scopes:d,source:"authInfo"};let e=function(a){if(!a||"object"!=typeof a)return[];let b=g(a.scopes);if(b.length>0)return b;let c=a.auth;if(c&&"object"==typeof c){let a=g(c.scopes);if(a.length>0)return a}let d=a.omniroute;if(d&&"object"==typeof d){let a=g(d.scopes);if(a.length>0)return a}return[]}(a?._meta);if(e.length>0)return{callerId:c,scopes:e,source:"meta"};let f=g(b);return f.length>0?{callerId:c,scopes:f,source:"env"}:{callerId:c,scopes:[],source:"none"}}function i(a,b,c){let d=e.Dk[a];if(!d)return{allowed:!1,required:[],provided:Array.from(b),missing:[],reason:"tool_definition_missing"};let f=Array.isArray(d.scopes)?Array.from(d.scopes):[],h=g(b);if(!c||0===f.length)return{allowed:!0,required:f,provided:h,missing:[]};let i=f.filter(a=>!h.some(b=>(function(a,b){if("*"===a||a===b)return!0;if(a.endsWith("*")){let c=a.slice(0,-1);return b.startsWith(c)}return!1})(b,a)));return{allowed:0===i.length,required:f,provided:h,missing:i,reason:i.length>0?"missing_scopes":void 0}}e=(f.then?(await f)():f)[0],d()}catch(a){d(a)}})},13419:(a,b,c)=>{c.d(b,{H:()=>h,J:()=>g});let d=["valid","expiring","expired","refreshing"];function e(a){if("number"==typeof a&&Number.isFinite(a))return a;if("string"==typeof a&&""!==a.trim()){let b=Number(a);if(Number.isFinite(b))return b}return null}function f(a,b,c){return Math.min(c,Math.max(b,a))}function g(a){var b;let c=a&&"object"==typeof a?a:{},g="string"==typeof c.provider?c.provider:"unknown",h="string"==typeof c.name&&c.name.trim()?c.name:g,i="string"==typeof c.connectionId&&c.connectionId.trim()?c.connectionId:"unknown",j=e(c.quotaTotal),k=null!==j&&j>=0?j:null,l=e(c.quotaUsed)??0,m=null!==k?f(l,0,k):Math.max(0,l),n=e(c.percentRemaining);return null===n&&(n=k&&k>0?(k-m)/k*100:100),{name:h,provider:g,connectionId:i,quotaUsed:m,quotaTotal:k,percentRemaining:f(n,0,100),resetAt:"string"==typeof c.resetAt&&c.resetAt.trim()?c.resetAt:null,tokenStatus:"string"==typeof(b=c.tokenStatus)&&d.includes(b)?b:"valid"}}function h(a,b={}){let c=a&&"object"==typeof a?a:{},d=(Array.isArray(c.providers)?c.providers:Array.isArray(a)?a:[]).map(a=>g(a)),e=c.meta&&"object"==typeof c.meta?c.meta:{},f=e.filters&&"object"==typeof e.filters?e.filters:{},i=b.provider??("string"==typeof f.provider&&f.provider.trim()?f.provider:null),j=b.connectionId??("string"==typeof f.connectionId&&f.connectionId.trim()?f.connectionId:null);return{providers:d,meta:{generatedAt:"string"==typeof e.generatedAt&&e.generatedAt.trim()?e.generatedAt:new Date().toISOString(),filters:{provider:i||null,connectionId:j||null},totalProviders:d.length}}}},25755:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{c:()=>B});var e=c(10610),f=c(92827),g=c(2306),h=c(43620),i=c(64926),j=c(13234),k=c(647),l=c(13419),m=a([e,f,g,j]);[e,f,g,j]=m.then?(await m)():m;let D=process.env.OMNIROUTE_BASE_URL||"http://localhost:20128",E=process.env.OMNIROUTE_API_KEY||"",F="true"===process.env.OMNIROUTE_MCP_ENFORCE_SCOPES,G=new Set((process.env.OMNIROUTE_MCP_SCOPES||"").split(",").map(a=>a.trim()).filter(Boolean));function n(a){return a&&"object"==typeof a&&!Array.isArray(a)?a:{}}function o(a){return Array.isArray(a)?a:[]}function p(a,b=""){return"string"==typeof a?a:b}function q(a,b=0){return"number"==typeof a&&Number.isFinite(a)?a:b}async function r(a,b={}){let c=`${D}${a}`,d={"Content-Type":"application/json",...E?{Authorization:`Bearer ${E}`}:{},...b.headers||{}},e=await fetch(c,{...b,headers:d,signal:AbortSignal.timeout(1e4)});if(!e.ok){let a=await e.text().catch(()=>"Unknown error");throw Error(`OmniRoute API error [${e.status}]: ${a}`)}return e.json()}function s(a,b){return async(c,d)=>{let e=(0,j.x)(d,Array.from(G)),f=(0,j.Z)(a,e.scopes,F);if(!f.allowed){let b=f.missing.length>0?f.missing.join(", "):"unavailable",d=f.reason||"scope_check_failed",g=`Insufficient MCP scopes for ${a}. Missing: ${b}. Caller=${e.callerId}, source=${e.source}.`,h=c&&"object"==typeof c?n(c):{rawArgs:c};return await (0,i.Bv)(a,{...h,_scopeCheck:{callerId:e.callerId,source:e.source,required:f.required,provided:f.provided,missing:f.missing}},null,0,!1,`scope_denied:${d}`),{content:[{type:"text",text:`Error: ${g}`}],isError:!0}}return b(c,d)}}async function t(){let a=Date.now();try{let[b,c,d]=await Promise.allSettled([r("/api/monitoring/health"),r("/api/resilience"),r("/api/rate-limits")]),e="fulfilled"===b.status?n(b.value):{},f="fulfilled"===c.status?n(c.value):{},g="fulfilled"===d.status?n(d.value):{},h=n(e.memoryUsage),j=n(e.cacheStats),k=o(f.circuitBreakers),l=o(g.limits),m={uptime:p(e.uptime,"unknown"),version:p(e.version,"unknown"),memoryUsage:{heapUsed:q(h.heapUsed,0),heapTotal:q(h.heapTotal,0)},circuitBreakers:k,rateLimits:l,cacheStats:Object.keys(j).length>0?{hits:q(j.hits,0),misses:q(j.misses,0),hitRate:q(j.hitRate,0)}:void 0};return await (0,i.Bv)("omniroute_get_health",{},m,Date.now()-a,!0),{content:[{type:"text",text:JSON.stringify(m,null,2)}]}}catch(c){let b=c instanceof Error?c.message:String(c);return await (0,i.Bv)("omniroute_get_health",{},null,Date.now()-a,!1,b),{content:[{type:"text",text:`Error: ${b}`}],isError:!0}}}async function u(a){let b=Date.now();try{let c=await r("/api/combos"),d=n(c),e=Array.isArray(d.combos)?d.combos:Array.isArray(c)?c:[],f={};a.includeMetrics&&(f=n(await r("/api/combos/metrics").catch(()=>({}))));let g={combos:o(e).map(b=>{let c=n(b),d=n(c.data),e=p(c.id,""),g=Array.isArray(c.models)&&c.models.length>0?c.models:d.models;return{id:e,name:p(c.name,e||"unnamed"),models:o(g).map((a,b)=>{let c=n(a);return{provider:p(c.provider,"unknown"),model:p(c.model,"unknown"),priority:q(c.priority,b+1)}}),strategy:p(c.strategy,p(d.strategy,"priority")),enabled:!1!==c.enabled,...a.includeMetrics?{metrics:f[e]??null}:{}}})};return await (0,i.Bv)("omniroute_list_combos",a,g,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(g,null,2)}]}}catch(d){let c=d instanceof Error?d.message:String(d);return await (0,i.Bv)("omniroute_list_combos",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function v(a){let b=Date.now();try{let c=await r(`/api/combos/metrics?comboId=${encodeURIComponent(a.comboId)}`);return await (0,i.Bv)("omniroute_get_combo_metrics",a,c,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(c,null,2)}]}}catch(d){let c=d instanceof Error?d.message:String(d);return await (0,i.Bv)("omniroute_get_combo_metrics",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function w(a){let b=Date.now();try{let c=await r(`/api/combos/${encodeURIComponent(a.comboId)}`,{method:"PUT",body:JSON.stringify({isActive:a.active})});return await (0,i.Bv)("omniroute_switch_combo",a,c,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(c,null,2)}]}}catch(d){let c=d instanceof Error?d.message:String(d);return await (0,i.Bv)("omniroute_switch_combo",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function x(a){let b=Date.now();try{let c="/api/usage/quota";a.connectionId?c+=`?connectionId=${encodeURIComponent(a.connectionId)}`:a.provider&&(c+=`?provider=${encodeURIComponent(a.provider)}`);let d=(0,l.H)(await r(c),{provider:a.provider||null,connectionId:a.connectionId||null});return await (0,i.Bv)("omniroute_check_quota",a,d,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(d,null,2)}]}}catch(d){let c=d instanceof Error?d.message:String(d);return await (0,i.Bv)("omniroute_check_quota",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function y(a){let b=Date.now();try{let c={model:a.model,messages:a.messages,stream:!1};a.combo&&(c["x-combo"]=a.combo);let d=await r("/v1/chat/completions",{method:"POST",body:JSON.stringify(c)}),e=o(d.choices),f=n(e[0]),g=n(f.message),h=n(d.usage),j={response:{content:p(g.content,""),model:p(d.model,a.model),tokens:{prompt:q(h.prompt_tokens,0),completion:q(h.completion_tokens,0)}},routing:{provider:p(d.provider,"unknown"),combo:d.combo??null,fallbacksTriggered:q(d.fallbacksTriggered,0),cost:q(d.cost,0),latencyMs:Date.now()-b,routingExplanation:p(d.routingExplanation,"Request routed through primary provider")}};return await (0,i.Bv)("omniroute_route_request",{model:a.model,messageCount:a.messages.length},j.routing,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(j,null,2)}]}}catch(d){let c=d instanceof Error?d.message:String(d);return await (0,i.Bv)("omniroute_route_request",{model:a.model},null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function z(a){let b=Date.now();try{let c=a.period||"session",d={session:"1d",day:"1d",week:"7d",month:"30d"}[c]||"30d",e=n(await r(`/api/usage/analytics?range=${encodeURIComponent(d)}`)),f=n(e.tokenCount),g=n(e.budget),h={period:c,totalCost:q(e.totalCost,0),requestCount:q(e.requestCount,0),tokenCount:{prompt:q(f.prompt,0),completion:q(f.completion,0)},byProvider:o(e.byProvider),byModel:o(e.byModel),budget:{limit:g.limit??null,remaining:g.remaining??null}};return await (0,i.Bv)("omniroute_cost_report",a,h,Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(h,null,2)}]}}catch(d){let c=d instanceof Error?d.message:String(d);return await (0,i.Bv)("omniroute_cost_report",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}async function A(a){let b=Date.now();try{let c="/v1/models",d=new URLSearchParams;a.provider&&d.set("provider",a.provider),a.capability&&d.set("capability",a.capability),d.toString()&&(c+=`?${d.toString()}`);let e=n(await r(c)),f={models:o(e.data).map(a=>{let b=n(a);return{id:p(b.id,""),provider:p(b.owned_by,p(b.provider,"unknown")),capabilities:function(a,b=[]){let c=o(a).filter(a=>"string"==typeof a);return c.length>0?c:b}(b.capabilities,["chat"]),status:p(b.status,"available"),pricing:b.pricing}})};return await (0,i.Bv)("omniroute_list_models_catalog",a,{modelCount:f.models.length},Date.now()-b,!0),{content:[{type:"text",text:JSON.stringify(f,null,2)}]}}catch(d){let c=d instanceof Error?d.message:String(d);return await (0,i.Bv)("omniroute_list_models_catalog",a,null,Date.now()-b,!1,c),{content:[{type:"text",text:`Error: ${c}`}],isError:!0}}}function B(){let a=new e._({name:"omniroute",version:process.env.npm_package_version||"1.8.1"});return a.registerTool("omniroute_get_health",{description:"Returns OmniRoute health status including uptime, memory, circuit breakers, rate limits, and cache stats",inputSchema:g.nu},s("omniroute_get_health",async a=>(g.nu.parse(a??{}),t()))),a.registerTool("omniroute_list_combos",{description:"Lists all configured combos (model chains) with strategies and optional metrics",inputSchema:g.ME},s("omniroute_list_combos",a=>u(g.ME.parse(a)))),a.registerTool("omniroute_get_combo_metrics",{description:"Returns detailed performance metrics for a specific combo",inputSchema:g.Gs},s("omniroute_get_combo_metrics",a=>v(g.Gs.parse(a)))),a.registerTool("omniroute_switch_combo",{description:"Activates or deactivates a combo for routing",inputSchema:g.B1},s("omniroute_switch_combo",a=>w(g.B1.parse(a)))),a.registerTool("omniroute_check_quota",{description:"Checks remaining API quota for one or all providers",inputSchema:g.Fp},s("omniroute_check_quota",a=>x(g.Fp.parse(a)))),a.registerTool("omniroute_route_request",{description:"Sends a chat completion request through OmniRoute intelligent routing",inputSchema:g.fL},s("omniroute_route_request",a=>y(g.fL.parse(a)))),a.registerTool("omniroute_cost_report",{description:"Generates a cost report for the specified period",inputSchema:g.c},s("omniroute_cost_report",a=>z(g.c.parse(a)))),a.registerTool("omniroute_list_models_catalog",{description:"Lists all available AI models across providers with capabilities and pricing",inputSchema:g._v},s("omniroute_list_models_catalog",a=>A(g._v.parse(a)))),a.registerTool("omniroute_simulate_route",{description:"Simulates the routing path a request would take without executing it (dry-run)",inputSchema:g.gl},s("omniroute_simulate_route",a=>(0,k.yL)(g.gl.parse(a)))),a.registerTool("omniroute_set_budget_guard",{description:"Sets a session budget limit with configurable action when exceeded (degrade/block/alert)",inputSchema:g.b9},s("omniroute_set_budget_guard",a=>(0,k.nX)(g.b9.parse(a)))),a.registerTool("omniroute_set_resilience_profile",{description:"Applies a resilience profile controlling circuit breakers, retries, timeouts, and fallback depth",inputSchema:g.dE},s("omniroute_set_resilience_profile",a=>(0,k.DZ)(g.dE.parse(a)))),a.registerTool("omniroute_test_combo",{description:"Tests each provider in a combo with a real prompt, reporting latency, cost, and success per provider",inputSchema:g.n0},s("omniroute_test_combo",a=>(0,k.nq)(g.n0.parse(a)))),a.registerTool("omniroute_get_provider_metrics",{description:"Returns detailed metrics for a specific provider including latency percentiles and circuit breaker state",inputSchema:g.xs},s("omniroute_get_provider_metrics",a=>(0,k.zl)(g.xs.parse(a)))),a.registerTool("omniroute_best_combo_for_task",{description:"Recommends the best combo for a task type based on provider fitness and constraints",inputSchema:g.h0},s("omniroute_best_combo_for_task",a=>(0,k.Bm)(g.h0.parse(a)))),a.registerTool("omniroute_explain_route",{description:"Explains why a request was routed to a specific provider, showing scoring factors and fallbacks",inputSchema:g.t7},s("omniroute_explain_route",a=>(0,k.h$)(g.t7.parse(a)))),a.registerTool("omniroute_get_session_snapshot",{description:"Returns a full snapshot of the current working session: cost, tokens, top models, errors, budget status",inputSchema:g.ne},s("omniroute_get_session_snapshot",async a=>(g.ne.parse(a??{}),(0,k.ne)()))),a}async function C(){let a=B(),b=new f.S,c=process.env.npm_package_version||"1.8.1",d=(0,h.rs)({version:c,scopesEnforced:F,allowedScopes:Array.from(G),toolCount:g.nS.length}),e=()=>{d()};process.once("exit",e),process.once("SIGINT",e),process.once("SIGTERM",e),console.error("[MCP] OmniRoute MCP Server starting (stdio transport)...");try{await a.connect(b),console.error("[MCP] OmniRoute MCP Server connected and ready.")}finally{e(),process.off("exit",e),process.off("SIGINT",e),process.off("SIGTERM",e)}}process.argv[1]&&"file:///home/diegosouzapw/dev/proxys/9router/open-sse/mcp-server/server.ts".endsWith(process.argv[1].replace(/\\/g,"/"))&&C().catch(a=>{console.error("[MCP] Fatal error:",a),process.exit(1)}),d()}catch(a){d(a)}})},43620:(a,b,c)=>{c.d(b,{Im:()=>n,c7:()=>i,h6:()=>l,jW:()=>m,rs:()=>k});var d=c(73024),e=c(48161),f=c(76760);let g="runtime";function h(){let a=process.env.DATA_DIR;return"string"==typeof a&&a.trim().length>0?a.trim():(0,f.join)((0,e.homedir)(),".omniroute")}function i(){return(0,f.join)(h(),g,"mcp-heartbeat.json")}async function j(a){let b=i(),c=(0,f.join)(h(),g);await d.promises.mkdir(c,{recursive:!0}),await d.promises.writeFile(b,JSON.stringify(a,null,2),"utf-8")}function k(a){let b=new Date().toISOString(),c=null,d=!1,e="number"==typeof a.intervalMs&&a.intervalMs>0?a.intervalMs:5e3,f=async()=>{if(d)return;let c={pid:process.pid,startedAt:b,lastHeartbeatAt:new Date().toISOString(),version:a.version,transport:"stdio",scopesEnforced:a.scopesEnforced,allowedScopes:[...a.allowedScopes],toolCount:a.toolCount};try{await j(c)}catch(a){console.error("[MCP Heartbeat] Failed to write heartbeat:",a instanceof Error?a.message:String(a))}};return f(),c=setInterval(()=>{f()},e),()=>{d||(d=!0,c&&(clearInterval(c),c=null),f())}}async function l(){let a=i();try{let b=await d.promises.readFile(a,"utf-8"),c=JSON.parse(b);if(!c||"object"!=typeof c||"number"!=typeof c.pid||"string"!=typeof c.startedAt||"string"!=typeof c.lastHeartbeatAt||"string"!=typeof c.version||"stdio"!==c.transport||"boolean"!=typeof c.scopesEnforced||!Array.isArray(c.allowedScopes)||"number"!=typeof c.toolCount)return null;let e=c.allowedScopes.filter(a=>"string"==typeof a);return{pid:c.pid,startedAt:c.startedAt,lastHeartbeatAt:c.lastHeartbeatAt,version:c.version,transport:"stdio",scopesEnforced:c.scopesEnforced,allowedScopes:e,toolCount:c.toolCount}}catch{return null}}function m(a){if(!Number.isFinite(a)||a<=0)return!1;try{return process.kill(a,0),!0}catch{return!1}}function n(a,b){if(!a)return!1;let c="number"==typeof b?.staleAfterMs&&b.staleAfterMs>0?b.staleAfterMs:15e3,d=Date.now()-new Date(a.lastHeartbeatAt).getTime();return!!Number.isFinite(d)&&!(d>c)&&(b?.requireLivePid===!1||m(a.pid))}},45419:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.d(b,{V6:()=>j,e5:()=>k,lJ:()=>l});var e=c(77598),f=c(25755),g=c(60021),h=a([f,g]);[f,g]=h.then?(await h)():h;let m=null,n=null,o=null,p=null;function i(a){if(m&&n&&p===a)return{server:m,transport:n};if(n)try{n.close()}catch{}return m=(0,f.c)(),n=new g.a({sessionIdGenerator:()=>(0,e.randomUUID)()}),p=a,o=Date.now(),m.connect(n),console.log(`[MCP] HTTP transport started (${a})`),{server:m,transport:n}}async function j(a){let{transport:b}=i("streamable-http");try{return await b.handleRequest(a)}catch(a){return console.error("[MCP] Streamable HTTP error:",a),new Response(JSON.stringify({error:"MCP transport error"}),{status:500,headers:{"Content-Type":"application/json"}})}}async function k(a){let{transport:b}=i("sse");try{return await b.handleRequest(a)}catch(a){return console.error("[MCP] SSE error:",a),new Response(JSON.stringify({error:"MCP SSE transport error"}),{status:500,headers:{"Content-Type":"application/json"}})}}function l(){return{online:null!==n&&null!==p,transport:p,startedAt:o,uptime:o?`${Math.floor((Date.now()-o)/1e3)}s`:null}}d()}catch(a){d(a)}})},64926:(a,b,c)=>{async function d(a){let b=JSON.stringify(a),c=new TextEncoder;return Array.from(new Uint8Array(await crypto.subtle.digest("SHA-256",c.encode(b)))).map(a=>a.toString(16).padStart(2,"0")).join("")}function e(a){return"string"==typeof a?a:null}function f(a,b){let c=i(a,b);return Number.isFinite(c)?Math.max(0,Math.floor(c)):b}function g(a){return{id:f(a.id,0),toolName:j(a.tool_name),inputHash:j(a.input_hash),outputSummary:j(a.output_summary),durationMs:i(a.duration_ms,0),apiKeyId:e(a.api_key_id),success:function(a,b=!1){return"boolean"==typeof a?a:1===a||"1"===a||0!==a&&"0"!==a&&b}(a.success,!1),errorCode:e(a.error_code),createdAt:j(a.created_at)}}c.d(b,{JY:()=>n,Bv:()=>l,Gj:()=>m});let h=null;function i(a,b=0){let c="number"==typeof a?a:"string"==typeof a&&a.trim().length>0?Number(a):NaN;return Number.isFinite(c)?c:b}function j(a){return"string"==typeof a?a:""}async function k(){if(h)return h;try{let{homedir:a}=await Promise.resolve().then(c.t.bind(c,48161,23)),{join:b}=await Promise.resolve().then(c.t.bind(c,76760,23)),{existsSync:d}=await Promise.resolve().then(c.t.bind(c,73024,23)),e=process.env.DATA_DIR?b(process.env.DATA_DIR,"storage.sqlite"):b(a(),".omniroute","storage.sqlite");if(!d(e))return console.error(`[MCP Audit] Database not found at ${e} — audit logging disabled`),null;return h=new(await Promise.resolve().then(c.t.bind(c,87550,23))).default(e)}catch(a){return console.error("[MCP Audit] Failed to connect to database:",a instanceof Error?a.message:String(a)),null}}async function l(a,b,c,e,f,g){try{let h=await k();if(!h)return;let i=await d(b),j=function(a,b=200){if(null==a)return"(null)";let c="string"==typeof a?a:JSON.stringify(a);return c.length<=b?c:c.slice(0,b)+"…"}(c),l=process.env.OMNIROUTE_API_KEY_ID||null;h.prepare(`INSERT INTO mcp_tool_audit (tool_name, input_hash, output_summary, duration_ms, api_key_id, success, error_code)
|
|
2
2
|
VALUES (?, ?, ?, ?, ?, ?, ?)`).run(a,i,j,e,l,+!!f,g||null)}catch(a){console.error("[MCP Audit] Failed to log:",a instanceof Error?a.message:String(a))}}async function m(a={}){try{let b,c,d=await k(),e=Math.max(1,Math.min(500,f(a.limit,50))),h=Math.max(0,f(a.offset,0));if(!d)return{entries:[],total:0,limit:e,offset:h};let{whereSql:i,params:j}=(b=[],c=[],"string"==typeof a.tool&&a.tool.trim().length>0&&(b.push("tool_name = ?"),c.push(a.tool.trim())),"boolean"==typeof a.success&&(b.push("success = ?"),c.push(+!!a.success)),"string"==typeof a.apiKeyId&&a.apiKeyId.trim().length>0&&(b.push("api_key_id = ?"),c.push(a.apiKeyId.trim())),{whereSql:b.length>0?`WHERE ${b.join(" AND ")}`:"",params:c}),l=d.prepare(`SELECT COUNT(*) as total FROM mcp_tool_audit ${i}`).get(...j);return{entries:d.prepare(`SELECT
|
|
3
3
|
id,
|
|
4
4
|
tool_name,
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
exports.id=6743,exports.ids=[6743],exports.modules={300:(a,b,c)=>{"use strict";c.d(b,{Zr:()=>e});let d=a=>b=>{try{let c=a(b);if(c instanceof Promise)return c;return{then:a=>d(a)(c),catch(a){return this}}}catch(a){return{then(a){return this},catch:b=>d(b)(a)}}},e=(a,b)=>(c,e,f)=>{let g,h={storage:function(a,b){let c;try{c=a()}catch(a){return}return{getItem:a=>{var b;let d=a=>null===a?null:JSON.parse(a,void 0),e=null!=(b=c.getItem(a))?b:null;return e instanceof Promise?e.then(d):d(e)},setItem:(a,b)=>c.setItem(a,JSON.stringify(b,void 0)),removeItem:a=>c.removeItem(a)}}(()=>window.localStorage),partialize:a=>a,version:0,merge:(a,b)=>({...b,...a}),...b},i=!1,j=0,k=new Set,l=new Set,m=h.storage;if(!m)return a((...a)=>{console.warn(`[zustand persist middleware] Unable to update item '${h.name}', the given storage is currently unavailable.`),c(...a)},e,f);let n=()=>{let a=h.partialize({...e()});return m.setItem(h.name,{state:a,version:h.version})},o=f.setState;f.setState=(a,b)=>(o(a,b),n());let p=a((...a)=>(c(...a),n()),e,f);f.getInitialState=()=>p;let q=()=>{var a,b;if(!m)return;let f=++j;i=!1,k.forEach(a=>{var b;return a(null!=(b=e())?b:p)});let o=(null==(b=h.onRehydrateStorage)?void 0:b.call(h,null!=(a=e())?a:p))||void 0;return d(m.getItem.bind(m))(h.name).then(a=>{if(a)if("number"!=typeof a.version||a.version===h.version)return[!1,a.state];else{if(h.migrate){let b=h.migrate(a.state,a.version);return b instanceof Promise?b.then(a=>[!0,a]):[!0,b]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(a=>{var b;if(f!==j)return;let[d,i]=a;if(c(g=h.merge(i,null!=(b=e())?b:p),!0),d)return n()}).then(()=>{f===j&&(null==o||o(g,void 0),g=e(),i=!0,l.forEach(a=>a(g)))}).catch(a=>{f===j&&(null==o||o(void 0,a))})};return f.persist={setOptions:a=>{h={...h,...a},a.storage&&(m=a.storage)},clearStorage:()=>{null==m||m.removeItem(h.name)},getOptions:()=>h,rehydrate:()=>q(),hasHydrated:()=>i,onHydrate:a=>(k.add(a),()=>{k.delete(a)}),onFinishHydration:a=>(l.add(a),()=>{l.delete(a)})},h.skipHydration||q(),g||p}},3575:(a,b,c)=>{"use strict";c.d(b,{I:()=>f,a:()=>g,b:()=>h,c:()=>k,m:()=>i});var d,e=c(14462);class f extends Error{constructor(a,b){let c=a;b&&(c+=": "+b),super(c),this.code=a,b&&(this.originalMessage=b)}}var g=((d=g||{}).MISSING_MESSAGE="MISSING_MESSAGE",d.MISSING_FORMAT="MISSING_FORMAT",d.ENVIRONMENT_FALLBACK="ENVIRONMENT_FALLBACK",d.INSUFFICIENT_PATH="INSUFFICIENT_PATH",d.INVALID_MESSAGE="INVALID_MESSAGE",d.INVALID_KEY="INVALID_KEY",d.FORMATTING_ERROR="FORMATTING_ERROR",d);function h(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function i(a,b){return(0,e.B)(a,{cache:{create:()=>({get:a=>b[a],set(a,c){b[a]=c}})},strategy:e.W.variadic})}function j(a,b){return i((...b)=>new a(...b),b)}function k(a){return{getDateTimeFormat:j(Intl.DateTimeFormat,a.dateTime),getNumberFormat:j(Intl.NumberFormat,a.number),getPluralRules:j(Intl.PluralRules,a.pluralRules),getRelativeTimeFormat:j(Intl.RelativeTimeFormat,a.relativeTime),getListFormat:j(Intl.ListFormat,a.list),getDisplayNames:j(Intl.DisplayNames,a.displayNames)}}},14462:(a,b,c)=>{"use strict";function d(a,b){let c=b&&b.cache?b.cache:i,d=b&&b.serializer?b.serializer:g;return(b&&b.strategy?b.strategy:function(a,b){var c,d;let g=1===a.length?e:f;return c=b.cache.create(),d=b.serializer,g.bind(this,a,c,d)})(a,{cache:c,serializer:d})}function e(a,b,c,d){let e=null==d||"number"==typeof d||"boolean"==typeof d?d:c(d),f=b.get(e);return void 0===f&&(f=a.call(this,d),b.set(e,f)),f}function f(a,b,c){let d=Array.prototype.slice.call(arguments,3),e=c(d),f=b.get(e);return void 0===f&&(f=a.apply(this,d),b.set(e,f)),f}c.d(b,{B:()=>d,W:()=>j});let g=function(){return JSON.stringify(arguments)};class h{cache;constructor(){this.cache=Object.create(null)}get(a){return this.cache[a]}set(a,b){this.cache[a]=b}}let i={create:function(){return new h}},j={variadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,f.bind(this,a,c,d)},monadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,e.bind(this,a,c,d)}}},23807:(a,b,c)=>{"use strict";c.d(b,{A:()=>r});var d=c(91986),e=c(3575),f=c(92207);function g(a){return"function"==typeof a.then}var h=c(65573);let i=(0,d.cache)(function(){return{locale:void 0}}),j=(0,d.cache)(async function(){let a=(0,h.b3)();return g(a)?await a:a}),k=(0,d.cache)(async function(){let a;try{a=(await j()).get("X-NEXT-INTL-LOCALE")||void 0}catch(a){if(a instanceof Error&&"DYNAMIC_SERVER_USAGE"===a.digest){let b=Error("Usage of next-intl APIs in Server Components currently opts into dynamic rendering. This limitation will eventually be lifted, but as a stopgap solution, you can use the `setRequestLocale` API to enable static rendering, see https://next-intl.dev/docs/routing/setup#static-rendering",{cause:a});throw b.digest=a.digest,b}throw a}return a});async function l(){return i().locale||await k()}var m=c(79803);let n=(0,d.cache)(function(){return Intl.DateTimeFormat().resolvedOptions().timeZone}),o=(0,d.cache)(async function(a,b){let c=a({locale:b,get requestLocale(){return b?Promise.resolve(b):l()}});if(g(c)&&(c=await c),!c.locale)throw Error("No locale was returned from `getRequestConfig`.\n\nSee https://next-intl.dev/docs/usage/configuration#i18n-request");return c}),p=(0,d.cache)(e.c),q=(0,d.cache)(e.b),r=(0,d.cache)(async function(a){let b=await o(m.A,a);return{...(0,f.i)(b),_formatters:p(q()),timeZone:b.timeZone||n()}})},28440:(a,b,c)=>{"use strict";c.d(b,{A:()=>g});var d=c(91986),e=c(23807);let f=(0,d.cache)(async function(a){var b=await (0,e.A)(a);if(!b.messages)throw Error("No messages found. Have you configured them correctly? See https://next-intl.dev/docs/configuration#messages");return b.messages});async function g(a){return f(a?.locale)}},29389:(a,b,c)=>{"use strict";function d(a){return a}c.d(b,{A:()=>d})},31417:(a,b,c)=>{"use strict";c.d(b,{v:()=>g});var d=c(67484);let e=a=>{let b,c=new Set,d=(a,d)=>{let e="function"==typeof a?a(b):a;if(!Object.is(e,b)){let a=b;b=(null!=d?d:"object"!=typeof e||null===e)?e:Object.assign({},b,e),c.forEach(c=>c(b,a))}},e=()=>b,f={setState:d,getState:e,getInitialState:()=>g,subscribe:a=>(c.add(a),()=>c.delete(a))},g=b=a(d,e,f);return f},f=a=>{let b=a?e(a):e,c=a=>(function(a,b=a=>a){let c=d.useSyncExternalStore(a.subscribe,d.useCallback(()=>b(a.getState()),[a,b]),d.useCallback(()=>b(a.getInitialState()),[a,b]));return d.useDebugValue(c),c})(b,a);return Object.assign(c,b),c},g=a=>a?f(a):f},50609:a=>{a.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},62026:(a,b,c)=>{"use strict";c.d(b,{A:()=>f});var d=c(91986),e=c(23807);let f=(0,d.cache)(async function(){return(await (0,e.A)()).locale})},62626:(a,b,c)=>{"use strict";c.d(b,{default:()=>f});var d=c(89400),e=c(48249);function f({locale:a,...b}){if(!a)throw Error(void 0);return(0,e.jsx)(d.Dk,{locale:a,...b})}},68625:(a,b,c)=>{"use strict";c.d(b,{A:()=>n});var d=c(91986),e=c(23807);let f=(0,d.cache)(async function(a){return(await (0,e.A)(a)).now}),g=(0,d.cache)(async function(){return(await (0,e.A)()).formats});var h=c(86392),i=c(5735);let j=(0,d.cache)(async function(a){return(await (0,e.A)(a)).timeZone});async function k(a){return j(a?.locale)}var l=c(28440),m=c(62026);async function n({formats:a,locale:b,messages:c,now:d,timeZone:e,...j}){return(0,i.jsx)(h.default,{formats:void 0===a?await g():a,locale:b??await (0,m.A)(),messages:void 0===c?await (0,l.A)():c,now:d??await f(),timeZone:e??await k(),...j})}},86392:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/runner/work/OmniRoute/OmniRoute/node_modules/next-intl/dist/esm/production/shared/NextIntlClientProvider.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/runner/work/OmniRoute/OmniRoute/node_modules/next-intl/dist/esm/production/shared/NextIntlClientProvider.js","default")},89400:(a,b,c)=>{"use strict";c.d(b,{Dk:()=>av,kc:()=>aB,Ym:()=>aA,c3:()=>az});var d,e,f,g,h,i,j=c(67484);function k(a,b){let c=b&&b.cache?b.cache:p,d=b&&b.serializer?b.serializer:n;return(b&&b.strategy?b.strategy:function(a,b){var c,d;let e=1===a.length?l:m;return c=b.cache.create(),d=b.serializer,e.bind(this,a,c,d)})(a,{cache:c,serializer:d})}function l(a,b,c,d){let e=null==d||"number"==typeof d||"boolean"==typeof d?d:c(d),f=b.get(e);return void 0===f&&(f=a.call(this,d),b.set(e,f)),f}function m(a,b,c){let d=Array.prototype.slice.call(arguments,3),e=c(d),f=b.get(e);return void 0===f&&(f=a.apply(this,d),b.set(e,f)),f}let n=function(){return JSON.stringify(arguments)};class o{cache;constructor(){this.cache=Object.create(null)}get(a){return this.cache[a]}set(a,b){this.cache[a]=b}}let p={create:function(){return new o}},q={variadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,m.bind(this,a,c,d)},monadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,l.bind(this,a,c,d)}};class r extends Error{constructor(a,b){let c=a;b&&(c+=": "+b),super(c),this.code=a,b&&(this.originalMessage=b)}}var s=((d=s||{}).MISSING_MESSAGE="MISSING_MESSAGE",d.MISSING_FORMAT="MISSING_FORMAT",d.ENVIRONMENT_FALLBACK="ENVIRONMENT_FALLBACK",d.INSUFFICIENT_PATH="INSUFFICIENT_PATH",d.INVALID_MESSAGE="INVALID_MESSAGE",d.INVALID_KEY="INVALID_KEY",d.FORMATTING_ERROR="FORMATTING_ERROR",d);function t(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function u(a,b){return k(a,{cache:{create:()=>({get:a=>b[a],set(a,c){b[a]=c}})},strategy:q.variadic})}function v(a,b){return u((...b)=>new a(...b),b)}function w(a){return{getDateTimeFormat:v(Intl.DateTimeFormat,a.dateTime),getNumberFormat:v(Intl.NumberFormat,a.number),getPluralRules:v(Intl.PluralRules,a.pluralRules),getRelativeTimeFormat:v(Intl.RelativeTimeFormat,a.relativeTime),getListFormat:v(Intl.ListFormat,a.list),getDisplayNames:v(Intl.DisplayNames,a.displayNames)}}let x=((e={})[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag",e),y=((f={})[f.number=0]="number",f[f.dateTime=1]="dateTime",f);function z(a){return a.type===x.literal}function A(a){return a.type===x.number}function B(a){return a.type===x.date}function C(a){return a.type===x.time}function D(a){return a.type===x.select}function E(a){return a.type===x.plural}function F(a){return a.type===x.tag}function G(a){return!!(a&&"object"==typeof a&&a.type===y.number)}function H(a){return!!(a&&"object"==typeof a&&a.type===y.dateTime)}let I=((g={})[g.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",g[g.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",g[g.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",g[g.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",g[g.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",g[g.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",g[g.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",g[g.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",g[g.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",g[g.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",g[g.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",g[g.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",g[g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",g[g.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",g[g.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",g[g.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",g[g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",g[g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",g[g.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",g[g.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",g[g.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",g[g.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",g[g.INVALID_TAG=23]="INVALID_TAG",g[g.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",g[g.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",g[g.UNCLOSED_TAG=27]="UNCLOSED_TAG",g),J=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,K=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,L=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,M=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,N=/^(@+)?(\+|#+)?[rs]?$/g,O=/(\*)(0+)|(#+)(0+)|(0+)/g,P=/^(0+)$/;function Q(a){let b={};return"r"===a[a.length-1]?b.roundingPriority="morePrecision":"s"===a[a.length-1]&&(b.roundingPriority="lessPrecision"),a.replace(N,function(a,c,d){return"string"!=typeof d?(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length):"+"===d?b.minimumSignificantDigits=c.length:"#"===c[0]?b.maximumSignificantDigits=c.length:(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length+("string"==typeof d?d.length:0)),""}),b}function R(a){switch(a){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function S(a){let b=R(a);return b||{}}let T={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]},U=RegExp(`^${J.source}*`),V=RegExp(`${J.source}*$`);function W(a,b){return{start:a,end:b}}let X=!!Object.fromEntries,Y=!!String.prototype.trimStart,Z=!!String.prototype.trimEnd,$=X?Object.fromEntries:function(a){let b={};for(let[c,d]of a)b[c]=d;return b},_=Y?function(a){return a.trimStart()}:function(a){return a.replace(U,"")},aa=Z?function(a){return a.trimEnd()}:function(a){return a.replace(V,"")},ab=RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");class ac{message;position;locale;ignoreTag;requiresOtherClause;shouldParseSkeletons;constructor(a,b={}){this.message=a,this.position={offset:0,line:1,column:1},this.ignoreTag=!!b.ignoreTag,this.locale=b.locale,this.requiresOtherClause=!!b.requiresOtherClause,this.shouldParseSkeletons=!!b.shouldParseSkeletons}parse(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)}parseMessage(a,b,c){let d=[];for(;!this.isEOF();){let e=this.char();if(123===e){let b=this.parseArgument(a,c);if(b.err)return b;d.push(b.val)}else if(125===e&&a>0)break;else if(35===e&&("plural"===b||"selectordinal"===b)){let a=this.clonePosition();this.bump(),d.push({type:x.pound,location:W(a,this.clonePosition())})}else if(60!==e||this.ignoreTag||47!==this.peek())if(60===e&&!this.ignoreTag&&ad(this.peek()||0)){let c=this.parseTag(a,b);if(c.err)return c;d.push(c.val)}else{let c=this.parseLiteral(a,b);if(c.err)return c;d.push(c.val)}else if(!c)return this.error(I.UNMATCHED_CLOSING_TAG,W(this.clonePosition(),this.clonePosition()));else break}return{val:d,err:null}}parseTag(a,b){let c=this.clonePosition();this.bump();let d=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:x.literal,value:`<${d}/>`,location:W(c,this.clonePosition())},err:null};if(!this.bumpIf(">"))return this.error(I.INVALID_TAG,W(c,this.clonePosition()));{let e=this.parseMessage(a+1,b,!0);if(e.err)return e;let f=e.val,g=this.clonePosition();if(!this.bumpIf("</"))return this.error(I.UNCLOSED_TAG,W(c,this.clonePosition()));{if(this.isEOF()||!ad(this.char()))return this.error(I.INVALID_TAG,W(g,this.clonePosition()));let a=this.clonePosition();return d!==this.parseTagName()?this.error(I.UNMATCHED_CLOSING_TAG,W(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">"))?{val:{type:x.tag,value:d,children:f,location:W(c,this.clonePosition())},err:null}:this.error(I.INVALID_TAG,W(g,this.clonePosition()))}}}parseTagName(){var a;let b=this.offset();for(this.bump();!this.isEOF()&&(45===(a=this.char())||46===a||a>=48&&a<=57||95===a||a>=97&&a<=122||a>=65&&a<=90||183==a||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=893||a>=895&&a<=8191||a>=8204&&a<=8205||a>=8255&&a<=8256||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533||a>=65536&&a<=983039);)this.bump();return this.message.slice(b,this.offset())}parseLiteral(a,b){let c=this.clonePosition(),d="";for(;;){let c=this.tryParseQuote(b);if(c){d+=c;continue}let e=this.tryParseUnquoted(a,b);if(e){d+=e;continue}let f=this.tryParseLeftAngleBracket();if(f){d+=f;continue}break}let e=W(c,this.clonePosition());return{val:{type:x.literal,value:d,location:e},err:null}}tryParseLeftAngleBracket(){var a;return this.isEOF()||60!==this.char()||!this.ignoreTag&&(ad(a=this.peek()||0)||47===a)?null:(this.bump(),"<")}tryParseQuote(a){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===a||"selectordinal"===a)break;return null;default:return null}this.bump();let b=[this.char()];for(this.bump();!this.isEOF();){let a=this.char();if(39===a)if(39===this.peek())b.push(39),this.bump();else{this.bump();break}else b.push(a);this.bump()}return String.fromCodePoint(...b)}tryParseUnquoted(a,b){if(this.isEOF())return null;let c=this.char();return 60===c||123===c||35===c&&("plural"===b||"selectordinal"===b)||125===c&&a>0?null:(this.bump(),String.fromCodePoint(c))}parseArgument(a,b){let c=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(c,this.clonePosition()));if(125===this.char())return this.bump(),this.error(I.EMPTY_ARGUMENT,W(c,this.clonePosition()));let d=this.parseIdentifierIfPossible().value;if(!d)return this.error(I.MALFORMED_ARGUMENT,W(c,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(c,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:x.argument,value:d,location:W(c,this.clonePosition())},err:null};case 44:if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(c,this.clonePosition()));return this.parseArgumentOptions(a,b,d,c);default:return this.error(I.MALFORMED_ARGUMENT,W(c,this.clonePosition()))}}parseIdentifierIfPossible(){var a;let b=this.clonePosition(),c=this.offset(),d=(a=this.message,ab.lastIndex=c,ab.exec(a)[1]??""),e=c+d.length;return this.bumpTo(e),{value:d,location:W(b,this.clonePosition())}}parseArgumentOptions(a,b,c,d){let e=this.clonePosition(),f=this.parseIdentifierIfPossible().value,g=this.clonePosition();switch(f){case"":return this.error(I.EXPECT_ARGUMENT_TYPE,W(e,g));case"number":case"date":case"time":{this.bumpSpace();let a=null;if(this.bumpIf(",")){this.bumpSpace();let b=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;let d=aa(c.val);if(0===d.length)return this.error(I.EXPECT_ARGUMENT_STYLE,W(this.clonePosition(),this.clonePosition()));a={style:d,styleLocation:W(b,this.clonePosition())}}let b=this.tryParseArgumentClose(d);if(b.err)return b;let e=W(d,this.clonePosition());if(a&&a.style.startsWith("::")){let b=_(a.style.slice(2));if("number"===f){let d=this.parseNumberSkeletonFromString(b,a.styleLocation);if(d.err)return d;return{val:{type:x.number,value:c,location:e,style:d.val},err:null}}{let d;if(0===b.length)return this.error(I.EXPECT_DATE_TIME_SKELETON,e);let g=b;this.locale&&(g=function(a,b){let c="";for(let d=0;d<a.length;d++){let e=a.charAt(d);if("j"===e){let f=0;for(;d+1<a.length&&a.charAt(d+1)===e;)f++,d++;let g=1+(1&f),h=f<2?1:3+(f>>1),i=function(a){let b,c=a.hourCycle;if(void 0===c&&a.hourCycles&&a.hourCycles.length&&(c=a.hourCycles[0]),c)switch(c){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw Error("Invalid hourCycle")}let d=a.language;return"root"!==d&&(b=a.maximize().region),(T[b||""]||T[d||""]||T[`${d}-001`]||T["001"])[0]}(b);for(("H"==i||"k"==i)&&(h=0);h-- >0;)c+="a";for(;g-- >0;)c=i+c}else"J"===e?c+="H":c+=e}return c}(b,this.locale));let h={type:y.dateTime,pattern:g,location:a.styleLocation,parsedOptions:this.shouldParseSkeletons?(d={},g.replace(K,a=>{let b=a.length;switch(a[0]){case"G":d.era=4===b?"long":5===b?"narrow":"short";break;case"y":d.year=2===b?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":d.month=["numeric","2-digit","short","long","narrow"][b-1];break;case"w":case"W":throw RangeError("`w/W` (week) patterns are not supported");case"d":d.day=["numeric","2-digit"][b-1];break;case"D":case"F":case"g":throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":d.weekday=4===b?"long":5===b?"narrow":"short";break;case"e":if(b<4)throw RangeError("`e..eee` (weekday) patterns are not supported");d.weekday=["short","long","narrow","short"][b-4];break;case"c":if(b<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");d.weekday=["short","long","narrow","short"][b-4];break;case"a":d.hour12=!0;break;case"b":case"B":throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":d.hourCycle="h12",d.hour=["numeric","2-digit"][b-1];break;case"H":d.hourCycle="h23",d.hour=["numeric","2-digit"][b-1];break;case"K":d.hourCycle="h11",d.hour=["numeric","2-digit"][b-1];break;case"k":d.hourCycle="h24",d.hour=["numeric","2-digit"][b-1];break;case"j":case"J":case"C":throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":d.minute=["numeric","2-digit"][b-1];break;case"s":d.second=["numeric","2-digit"][b-1];break;case"S":case"A":throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":d.timeZoneName=b<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),d):{}};return{val:{type:"date"===f?x.date:x.time,value:c,location:e,style:h},err:null}}}return{val:{type:"number"===f?x.number:"date"===f?x.date:x.time,value:c,location:e,style:a?.style??null},err:null}}case"plural":case"selectordinal":case"select":{let e=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(I.EXPECT_SELECT_ARGUMENT_OPTIONS,W(e,{...e}));this.bumpSpace();let g=this.parseIdentifierIfPossible(),h=0;if("select"!==f&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(I.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,W(this.clonePosition(),this.clonePosition()));this.bumpSpace();let a=this.tryParseDecimalInteger(I.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,I.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(a.err)return a;this.bumpSpace(),g=this.parseIdentifierIfPossible(),h=a.val}let i=this.tryParsePluralOrSelectOptions(a,f,b,g);if(i.err)return i;let j=this.tryParseArgumentClose(d);if(j.err)return j;let k=W(d,this.clonePosition());if("select"===f)return{val:{type:x.select,value:c,options:$(i.val),location:k},err:null};return{val:{type:x.plural,value:c,options:$(i.val),offset:h,pluralType:"plural"===f?"cardinal":"ordinal",location:k},err:null}}default:return this.error(I.INVALID_ARGUMENT_TYPE,W(e,g))}}tryParseArgumentClose(a){return this.isEOF()||125!==this.char()?this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(a,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let a=0,b=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(I.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,W(a,this.clonePosition()));this.bump();break}case 123:a+=1,this.bump();break;case 125:if(!(a>0))return{val:this.message.slice(b.offset,this.offset()),err:null};a-=1;break;default:this.bump()}return{val:this.message.slice(b.offset,this.offset()),err:null}}parseNumberSkeletonFromString(a,b){let c=[];try{c=function(a){if(0===a.length)throw Error("Number skeleton cannot be empty");let b=a.split(L).filter(a=>a.length>0),c=[];for(let a of b){let b=a.split("/");if(0===b.length)throw Error("Invalid number skeleton");let[d,...e]=b;for(let a of e)if(0===a.length)throw Error("Invalid number skeleton");c.push({stem:d,options:e})}return c}(a)}catch{return this.error(I.INVALID_NUMBER_SKELETON,b)}return{val:{type:y.number,tokens:c,location:b,parsedOptions:this.shouldParseSkeletons?function(a){let b={};for(let c of a){switch(c.stem){case"percent":case"%":b.style="percent";continue;case"%x100":b.style="percent",b.scale=100;continue;case"currency":b.style="currency",b.currency=c.options[0];continue;case"group-off":case",_":b.useGrouping=!1;continue;case"precision-integer":case".":b.maximumFractionDigits=0;continue;case"measure-unit":case"unit":b.style="unit",b.unit=c.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":b.notation="compact",b.compactDisplay="short";continue;case"compact-long":case"KK":b.notation="compact",b.compactDisplay="long";continue;case"scientific":b={...b,notation:"scientific",...c.options.reduce((a,b)=>({...a,...S(b)}),{})};continue;case"engineering":b={...b,notation:"engineering",...c.options.reduce((a,b)=>({...a,...S(b)}),{})};continue;case"notation-simple":b.notation="standard";continue;case"unit-width-narrow":b.currencyDisplay="narrowSymbol",b.unitDisplay="narrow";continue;case"unit-width-short":b.currencyDisplay="code",b.unitDisplay="short";continue;case"unit-width-full-name":b.currencyDisplay="name",b.unitDisplay="long";continue;case"unit-width-iso-code":b.currencyDisplay="symbol";continue;case"scale":b.scale=parseFloat(c.options[0]);continue;case"rounding-mode-floor":b.roundingMode="floor";continue;case"rounding-mode-ceiling":b.roundingMode="ceil";continue;case"rounding-mode-down":b.roundingMode="trunc";continue;case"rounding-mode-up":b.roundingMode="expand";continue;case"rounding-mode-half-even":b.roundingMode="halfEven";continue;case"rounding-mode-half-down":b.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":b.roundingMode="halfExpand";continue;case"integer-width":if(c.options.length>1)throw RangeError("integer-width stems only accept a single optional option");c.options[0].replace(O,function(a,c,d,e,f,g){if(c)b.minimumIntegerDigits=d.length;else if(e&&f)throw Error("We currently do not support maximum integer digits");else if(g)throw Error("We currently do not support exact integer digits");return""});continue}if(P.test(c.stem)){b.minimumIntegerDigits=c.stem.length;continue}if(M.test(c.stem)){if(c.options.length>1)throw RangeError("Fraction-precision stems only accept a single optional option");c.stem.replace(M,function(a,c,d,e,f,g){return"*"===d?b.minimumFractionDigits=c.length:e&&"#"===e[0]?b.maximumFractionDigits=e.length:f&&g?(b.minimumFractionDigits=f.length,b.maximumFractionDigits=f.length+g.length):(b.minimumFractionDigits=c.length,b.maximumFractionDigits=c.length),""});let a=c.options[0];"w"===a?b={...b,trailingZeroDisplay:"stripIfInteger"}:a&&(b={...b,...Q(a)});continue}if(N.test(c.stem)){b={...b,...Q(c.stem)};continue}let a=R(c.stem);a&&(b={...b,...a});let d=function(a){let b;if("E"===a[0]&&"E"===a[1]?(b={notation:"engineering"},a=a.slice(2)):"E"===a[0]&&(b={notation:"scientific"},a=a.slice(1)),b){let c=a.slice(0,2);if("+!"===c?(b.signDisplay="always",a=a.slice(2)):"+?"===c&&(b.signDisplay="exceptZero",a=a.slice(2)),!P.test(a))throw Error("Malformed concise eng/scientific notation");b.minimumIntegerDigits=a.length}return b}(c.stem);d&&(b={...b,...d})}return b}(c):{}},err:null}}tryParsePluralOrSelectOptions(a,b,c,d){let e=!1,f=[],g=new Set,{value:h,location:i}=d;for(;;){if(0===h.length){let a=this.clonePosition();if("select"!==b&&this.bumpIf("=")){let b=this.tryParseDecimalInteger(I.EXPECT_PLURAL_ARGUMENT_SELECTOR,I.INVALID_PLURAL_ARGUMENT_SELECTOR);if(b.err)return b;i=W(a,this.clonePosition()),h=this.message.slice(a.offset,this.offset())}else break}if(g.has(h))return this.error("select"===b?I.DUPLICATE_SELECT_ARGUMENT_SELECTOR:I.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,i);"other"===h&&(e=!0),this.bumpSpace();let d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===b?I.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:I.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,W(this.clonePosition(),this.clonePosition()));let j=this.parseMessage(a+1,b,c);if(j.err)return j;let k=this.tryParseArgumentClose(d);if(k.err)return k;f.push([h,{value:j.val,location:W(d,this.clonePosition())}]),g.add(h),this.bumpSpace(),{value:h,location:i}=this.parseIdentifierIfPossible()}return 0===f.length?this.error("select"===b?I.EXPECT_SELECT_ARGUMENT_SELECTOR:I.EXPECT_PLURAL_ARGUMENT_SELECTOR,W(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!e?this.error(I.MISSING_OTHER_CLAUSE,W(this.clonePosition(),this.clonePosition())):{val:f,err:null}}tryParseDecimalInteger(a,b){let c=1,d=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(c=-1);let e=!1,f=0;for(;!this.isEOF();){let a=this.char();if(a>=48&&a<=57)e=!0,f=10*f+(a-48),this.bump();else break}let g=W(d,this.clonePosition());return e?Number.isSafeInteger(f*=c)?{val:f,err:null}:this.error(b,g):this.error(a,g)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let a=this.position.offset;if(a>=this.message.length)throw Error("out of bound");let b=this.message.codePointAt(a);if(void 0===b)throw Error(`Offset ${a} is at invalid UTF-16 code unit boundary`);return b}error(a,b){return{val:null,err:{kind:a,message:this.message,location:b}}}bump(){if(this.isEOF())return;let a=this.char();10===a?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=a<65536?1:2)}bumpIf(a){if(this.message.startsWith(a,this.offset())){for(let b=0;b<a.length;b++)this.bump();return!0}return!1}bumpUntil(a){let b=this.offset(),c=this.message.indexOf(a,b);return c>=0?(this.bumpTo(c),!0):(this.bumpTo(this.message.length),!1)}bumpTo(a){if(this.offset()>a)throw Error(`targetOffset ${a} must be greater than or equal to the current offset ${this.offset()}`);for(a=Math.min(a,this.message.length);;){let b=this.offset();if(b===a)break;if(b>a)throw Error(`targetOffset ${a} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(var a;!this.isEOF()&&((a=this.char())>=9&&a<=13||32===a||133===a||a>=8206&&a<=8207||8232===a||8233===a);)this.bump()}peek(){if(this.isEOF())return null;let a=this.char(),b=this.offset();return this.message.charCodeAt(b+(a>=65536?2:1))??null}}function ad(a){return a>=97&&a<=122||a>=65&&a<=90}function ae(a,b={}){let c=new ac(a,b={shouldParseSkeletons:!0,requiresOtherClause:!0,...b}).parse();if(c.err){let a=SyntaxError(I[c.err.kind]);throw a.location=c.err.location,a.originalMessage=c.err.message,a}return b?.captureLocation||function a(b){b.forEach(b=>{if(delete b.location,D(b)||E(b))for(let c in b.options)delete b.options[c].location,a(b.options[c].value);else A(b)&&G(b.style)||(B(b)||C(b))&&H(b.style)?delete b.style.location:F(b)&&a(b.children)})}(c.val),c.val}let af=((h={}).MISSING_VALUE="MISSING_VALUE",h.INVALID_VALUE="INVALID_VALUE",h.MISSING_INTL_API="MISSING_INTL_API",h);class ag extends Error{code;originalMessage;constructor(a,b,c){super(a),this.code=b,this.originalMessage=c}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}}class ah extends ag{constructor(a,b,c,d){super(`Invalid values for "${a}": "${b}". Options are "${Object.keys(c).join('", "')}"`,af.INVALID_VALUE,d)}}class ai extends ag{constructor(a,b,c){super(`Value for "${a}" must be of type ${b}`,af.INVALID_VALUE,c)}}class aj extends ag{constructor(a,b){super(`The intl string context variable "${a}" was not provided to the string "${b}"`,af.MISSING_VALUE,b)}}let ak=((i={})[i.literal=0]="literal",i[i.object=1]="object",i);function al(a){return{create:()=>({get:b=>a[b],set(b,c){a[b]=c}})}}class am{ast;locales;resolvedLocale;formatters;formats;message;formatterCache={number:{},dateTime:{},pluralRules:{}};constructor(a,b=am.defaultLocale,c,d){if(this.locales=b,this.resolvedLocale=am.resolveLocale(b),"string"==typeof a){if(this.message=a,!am.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...b}=d||{};this.ast=am.__parse(a,{...b,locale:this.resolvedLocale})}else this.ast=a;if(!Array.isArray(this.ast))throw TypeError("A message must be provided as a String or AST.");this.formats=function(a,b){return b?Object.keys(a).reduce((c,d)=>{var e,f;return c[d]=(e=a[d],(f=b[d])?{...e,...f,...Object.keys(e).reduce((a,b)=>(a[b]={...e[b],...f[b]},a),{})}:e),c},{...a}):a}(am.formats,c),this.formatters=d&&d.formatters||function(a={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:k((...a)=>new Intl.NumberFormat(...a),{cache:al(a.number),strategy:q.variadic}),getDateTimeFormat:k((...a)=>new Intl.DateTimeFormat(...a),{cache:al(a.dateTime),strategy:q.variadic}),getPluralRules:k((...a)=>new Intl.PluralRules(...a),{cache:al(a.pluralRules),strategy:q.variadic})}}(this.formatterCache)}format=a=>{let b=this.formatToParts(a);if(1===b.length)return b[0].value;let c=b.reduce((a,b)=>(a.length&&b.type===ak.literal&&"string"==typeof a[a.length-1]?a[a.length-1]+=b.value:a.push(b.value),a),[]);return c.length<=1?c[0]||"":c};formatToParts=a=>(function a(b,c,d,e,f,g,h){if(1===b.length&&z(b[0]))return[{type:ak.literal,value:b[0].value}];let i=[];for(let j of b){if(z(j)){i.push({type:ak.literal,value:j.value});continue}if(j.type===x.pound){"number"==typeof g&&i.push({type:ak.literal,value:d.getNumberFormat(c).format(g)});continue}let{value:b}=j;if(!(f&&b in f))throw new aj(b,h);let k=f[b];if(j.type===x.argument){k&&"string"!=typeof k&&"number"!=typeof k&&"bigint"!=typeof k||(k="string"==typeof k||"number"==typeof k||"bigint"==typeof k?String(k):""),i.push({type:"string"==typeof k?ak.literal:ak.object,value:k});continue}if(B(j)){let a="string"==typeof j.style?e.date[j.style]:H(j.style)?j.style.parsedOptions:void 0;i.push({type:ak.literal,value:d.getDateTimeFormat(c,a).format(k)});continue}if(C(j)){let a="string"==typeof j.style?e.time[j.style]:H(j.style)?j.style.parsedOptions:e.time.medium;i.push({type:ak.literal,value:d.getDateTimeFormat(c,a).format(k)});continue}if(A(j)){let a="string"==typeof j.style?e.number[j.style]:G(j.style)?j.style.parsedOptions:void 0;if(a&&a.scale){let b=a.scale||1;if("bigint"==typeof k){if(!Number.isInteger(b))throw TypeError(`Cannot apply fractional scale ${b} to bigint value. Scale must be an integer when formatting bigint.`);k*=BigInt(b)}else k*=b}i.push({type:ak.literal,value:d.getNumberFormat(c,a).format(k)});continue}if(F(j)){let{children:b,value:k}=j,l=f[k];if("function"!=typeof l)throw new ai(k,"function",h);let m=l(a(b,c,d,e,f,g).map(a=>a.value));Array.isArray(m)||(m=[m]),i.push(...m.map(a=>({type:"string"==typeof a?ak.literal:ak.object,value:a})))}if(D(j)){let b=k,g=(Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0)||j.options.other;if(!g)throw new ah(j.value,k,Object.keys(j.options),h);i.push(...a(g.value,c,d,e,f));continue}if(E(j)){let b=`=${k}`,g=Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0;if(!g){if(!Intl.PluralRules)throw new ag(`Intl.PluralRules is not available in this environment.
|
|
1
|
+
exports.id=6743,exports.ids=[6743],exports.modules={300:(a,b,c)=>{"use strict";c.d(b,{Zr:()=>e});let d=a=>b=>{try{let c=a(b);if(c instanceof Promise)return c;return{then:a=>d(a)(c),catch(a){return this}}}catch(a){return{then(a){return this},catch:b=>d(b)(a)}}},e=(a,b)=>(c,e,f)=>{let g,h={storage:function(a,b){let c;try{c=a()}catch(a){return}return{getItem:a=>{var b;let d=a=>null===a?null:JSON.parse(a,void 0),e=null!=(b=c.getItem(a))?b:null;return e instanceof Promise?e.then(d):d(e)},setItem:(a,b)=>c.setItem(a,JSON.stringify(b,void 0)),removeItem:a=>c.removeItem(a)}}(()=>window.localStorage),partialize:a=>a,version:0,merge:(a,b)=>({...b,...a}),...b},i=!1,j=0,k=new Set,l=new Set,m=h.storage;if(!m)return a((...a)=>{console.warn(`[zustand persist middleware] Unable to update item '${h.name}', the given storage is currently unavailable.`),c(...a)},e,f);let n=()=>{let a=h.partialize({...e()});return m.setItem(h.name,{state:a,version:h.version})},o=f.setState;f.setState=(a,b)=>(o(a,b),n());let p=a((...a)=>(c(...a),n()),e,f);f.getInitialState=()=>p;let q=()=>{var a,b;if(!m)return;let f=++j;i=!1,k.forEach(a=>{var b;return a(null!=(b=e())?b:p)});let o=(null==(b=h.onRehydrateStorage)?void 0:b.call(h,null!=(a=e())?a:p))||void 0;return d(m.getItem.bind(m))(h.name).then(a=>{if(a)if("number"!=typeof a.version||a.version===h.version)return[!1,a.state];else{if(h.migrate){let b=h.migrate(a.state,a.version);return b instanceof Promise?b.then(a=>[!0,a]):[!0,b]}console.error("State loaded from storage couldn't be migrated since no migrate function was provided")}return[!1,void 0]}).then(a=>{var b;if(f!==j)return;let[d,i]=a;if(c(g=h.merge(i,null!=(b=e())?b:p),!0),d)return n()}).then(()=>{f===j&&(null==o||o(g,void 0),g=e(),i=!0,l.forEach(a=>a(g)))}).catch(a=>{f===j&&(null==o||o(void 0,a))})};return f.persist={setOptions:a=>{h={...h,...a},a.storage&&(m=a.storage)},clearStorage:()=>{null==m||m.removeItem(h.name)},getOptions:()=>h,rehydrate:()=>q(),hasHydrated:()=>i,onHydrate:a=>(k.add(a),()=>{k.delete(a)}),onFinishHydration:a=>(l.add(a),()=>{l.delete(a)})},h.skipHydration||q(),g||p}},3575:(a,b,c)=>{"use strict";c.d(b,{I:()=>f,a:()=>g,b:()=>h,c:()=>k,m:()=>i});var d,e=c(14462);class f extends Error{constructor(a,b){let c=a;b&&(c+=": "+b),super(c),this.code=a,b&&(this.originalMessage=b)}}var g=((d=g||{}).MISSING_MESSAGE="MISSING_MESSAGE",d.MISSING_FORMAT="MISSING_FORMAT",d.ENVIRONMENT_FALLBACK="ENVIRONMENT_FALLBACK",d.INSUFFICIENT_PATH="INSUFFICIENT_PATH",d.INVALID_MESSAGE="INVALID_MESSAGE",d.INVALID_KEY="INVALID_KEY",d.FORMATTING_ERROR="FORMATTING_ERROR",d);function h(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function i(a,b){return(0,e.B)(a,{cache:{create:()=>({get:a=>b[a],set(a,c){b[a]=c}})},strategy:e.W.variadic})}function j(a,b){return i((...b)=>new a(...b),b)}function k(a){return{getDateTimeFormat:j(Intl.DateTimeFormat,a.dateTime),getNumberFormat:j(Intl.NumberFormat,a.number),getPluralRules:j(Intl.PluralRules,a.pluralRules),getRelativeTimeFormat:j(Intl.RelativeTimeFormat,a.relativeTime),getListFormat:j(Intl.ListFormat,a.list),getDisplayNames:j(Intl.DisplayNames,a.displayNames)}}},14462:(a,b,c)=>{"use strict";function d(a,b){let c=b&&b.cache?b.cache:i,d=b&&b.serializer?b.serializer:g;return(b&&b.strategy?b.strategy:function(a,b){var c,d;let g=1===a.length?e:f;return c=b.cache.create(),d=b.serializer,g.bind(this,a,c,d)})(a,{cache:c,serializer:d})}function e(a,b,c,d){let e=null==d||"number"==typeof d||"boolean"==typeof d?d:c(d),f=b.get(e);return void 0===f&&(f=a.call(this,d),b.set(e,f)),f}function f(a,b,c){let d=Array.prototype.slice.call(arguments,3),e=c(d),f=b.get(e);return void 0===f&&(f=a.apply(this,d),b.set(e,f)),f}c.d(b,{B:()=>d,W:()=>j});let g=function(){return JSON.stringify(arguments)};class h{cache;constructor(){this.cache=Object.create(null)}get(a){return this.cache[a]}set(a,b){this.cache[a]=b}}let i={create:function(){return new h}},j={variadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,f.bind(this,a,c,d)},monadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,e.bind(this,a,c,d)}}},23807:(a,b,c)=>{"use strict";c.d(b,{A:()=>r});var d=c(91986),e=c(3575),f=c(92207);function g(a){return"function"==typeof a.then}var h=c(65573);let i=(0,d.cache)(function(){return{locale:void 0}}),j=(0,d.cache)(async function(){let a=(0,h.b3)();return g(a)?await a:a}),k=(0,d.cache)(async function(){let a;try{a=(await j()).get("X-NEXT-INTL-LOCALE")||void 0}catch(a){if(a instanceof Error&&"DYNAMIC_SERVER_USAGE"===a.digest){let b=Error("Usage of next-intl APIs in Server Components currently opts into dynamic rendering. This limitation will eventually be lifted, but as a stopgap solution, you can use the `setRequestLocale` API to enable static rendering, see https://next-intl.dev/docs/routing/setup#static-rendering",{cause:a});throw b.digest=a.digest,b}throw a}return a});async function l(){return i().locale||await k()}var m=c(79803);let n=(0,d.cache)(function(){return Intl.DateTimeFormat().resolvedOptions().timeZone}),o=(0,d.cache)(async function(a,b){let c=a({locale:b,get requestLocale(){return b?Promise.resolve(b):l()}});if(g(c)&&(c=await c),!c.locale)throw Error("No locale was returned from `getRequestConfig`.\n\nSee https://next-intl.dev/docs/usage/configuration#i18n-request");return c}),p=(0,d.cache)(e.c),q=(0,d.cache)(e.b),r=(0,d.cache)(async function(a){let b=await o(m.A,a);return{...(0,f.i)(b),_formatters:p(q()),timeZone:b.timeZone||n()}})},28440:(a,b,c)=>{"use strict";c.d(b,{A:()=>g});var d=c(91986),e=c(23807);let f=(0,d.cache)(async function(a){var b=await (0,e.A)(a);if(!b.messages)throw Error("No messages found. Have you configured them correctly? See https://next-intl.dev/docs/configuration#messages");return b.messages});async function g(a){return f(a?.locale)}},29389:(a,b,c)=>{"use strict";function d(a){return a}c.d(b,{A:()=>d})},31417:(a,b,c)=>{"use strict";c.d(b,{v:()=>g});var d=c(67484);let e=a=>{let b,c=new Set,d=(a,d)=>{let e="function"==typeof a?a(b):a;if(!Object.is(e,b)){let a=b;b=(null!=d?d:"object"!=typeof e||null===e)?e:Object.assign({},b,e),c.forEach(c=>c(b,a))}},e=()=>b,f={setState:d,getState:e,getInitialState:()=>g,subscribe:a=>(c.add(a),()=>c.delete(a))},g=b=a(d,e,f);return f},f=a=>{let b=a?e(a):e,c=a=>(function(a,b=a=>a){let c=d.useSyncExternalStore(a.subscribe,d.useCallback(()=>b(a.getState()),[a,b]),d.useCallback(()=>b(a.getInitialState()),[a,b]));return d.useDebugValue(c),c})(b,a);return Object.assign(c,b),c},g=a=>a?f(a):f},50609:a=>{a.exports={style:{fontFamily:"'Inter', 'Inter Fallback'",fontStyle:"normal"},className:"__className_f367f3",variable:"__variable_f367f3"}},62026:(a,b,c)=>{"use strict";c.d(b,{A:()=>f});var d=c(91986),e=c(23807);let f=(0,d.cache)(async function(){return(await (0,e.A)()).locale})},62626:(a,b,c)=>{"use strict";c.d(b,{default:()=>f});var d=c(89400),e=c(48249);function f({locale:a,...b}){if(!a)throw Error(void 0);return(0,e.jsx)(d.Dk,{locale:a,...b})}},68625:(a,b,c)=>{"use strict";c.d(b,{A:()=>n});var d=c(91986),e=c(23807);let f=(0,d.cache)(async function(a){return(await (0,e.A)(a)).now}),g=(0,d.cache)(async function(){return(await (0,e.A)()).formats});var h=c(86392),i=c(5735);let j=(0,d.cache)(async function(a){return(await (0,e.A)(a)).timeZone});async function k(a){return j(a?.locale)}var l=c(28440),m=c(62026);async function n({formats:a,locale:b,messages:c,now:d,timeZone:e,...j}){return(0,i.jsx)(h.default,{formats:void 0===a?await g():a,locale:b??await (0,m.A)(),messages:void 0===c?await (0,l.A)():c,now:d??await f(),timeZone:e??await k(),...j})}},86392:(a,b,c)=>{"use strict";c.d(b,{default:()=>d});let d=(0,c(77943).registerClientReference)(function(){throw Error("Attempted to call the default export of \"/home/diegosouzapw/dev/proxys/9router/node_modules/next-intl/dist/esm/production/shared/NextIntlClientProvider.js\" from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"/home/diegosouzapw/dev/proxys/9router/node_modules/next-intl/dist/esm/production/shared/NextIntlClientProvider.js","default")},89400:(a,b,c)=>{"use strict";c.d(b,{Dk:()=>av,kc:()=>aB,Ym:()=>aA,c3:()=>az});var d,e,f,g,h,i,j=c(67484);function k(a,b){let c=b&&b.cache?b.cache:p,d=b&&b.serializer?b.serializer:n;return(b&&b.strategy?b.strategy:function(a,b){var c,d;let e=1===a.length?l:m;return c=b.cache.create(),d=b.serializer,e.bind(this,a,c,d)})(a,{cache:c,serializer:d})}function l(a,b,c,d){let e=null==d||"number"==typeof d||"boolean"==typeof d?d:c(d),f=b.get(e);return void 0===f&&(f=a.call(this,d),b.set(e,f)),f}function m(a,b,c){let d=Array.prototype.slice.call(arguments,3),e=c(d),f=b.get(e);return void 0===f&&(f=a.apply(this,d),b.set(e,f)),f}let n=function(){return JSON.stringify(arguments)};class o{cache;constructor(){this.cache=Object.create(null)}get(a){return this.cache[a]}set(a,b){this.cache[a]=b}}let p={create:function(){return new o}},q={variadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,m.bind(this,a,c,d)},monadic:function(a,b){var c,d;return c=b.cache.create(),d=b.serializer,l.bind(this,a,c,d)}};class r extends Error{constructor(a,b){let c=a;b&&(c+=": "+b),super(c),this.code=a,b&&(this.originalMessage=b)}}var s=((d=s||{}).MISSING_MESSAGE="MISSING_MESSAGE",d.MISSING_FORMAT="MISSING_FORMAT",d.ENVIRONMENT_FALLBACK="ENVIRONMENT_FALLBACK",d.INSUFFICIENT_PATH="INSUFFICIENT_PATH",d.INVALID_MESSAGE="INVALID_MESSAGE",d.INVALID_KEY="INVALID_KEY",d.FORMATTING_ERROR="FORMATTING_ERROR",d);function t(){return{dateTime:{},number:{},message:{},relativeTime:{},pluralRules:{},list:{},displayNames:{}}}function u(a,b){return k(a,{cache:{create:()=>({get:a=>b[a],set(a,c){b[a]=c}})},strategy:q.variadic})}function v(a,b){return u((...b)=>new a(...b),b)}function w(a){return{getDateTimeFormat:v(Intl.DateTimeFormat,a.dateTime),getNumberFormat:v(Intl.NumberFormat,a.number),getPluralRules:v(Intl.PluralRules,a.pluralRules),getRelativeTimeFormat:v(Intl.RelativeTimeFormat,a.relativeTime),getListFormat:v(Intl.ListFormat,a.list),getDisplayNames:v(Intl.DisplayNames,a.displayNames)}}let x=((e={})[e.literal=0]="literal",e[e.argument=1]="argument",e[e.number=2]="number",e[e.date=3]="date",e[e.time=4]="time",e[e.select=5]="select",e[e.plural=6]="plural",e[e.pound=7]="pound",e[e.tag=8]="tag",e),y=((f={})[f.number=0]="number",f[f.dateTime=1]="dateTime",f);function z(a){return a.type===x.literal}function A(a){return a.type===x.number}function B(a){return a.type===x.date}function C(a){return a.type===x.time}function D(a){return a.type===x.select}function E(a){return a.type===x.plural}function F(a){return a.type===x.tag}function G(a){return!!(a&&"object"==typeof a&&a.type===y.number)}function H(a){return!!(a&&"object"==typeof a&&a.type===y.dateTime)}let I=((g={})[g.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",g[g.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",g[g.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",g[g.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",g[g.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",g[g.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",g[g.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",g[g.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",g[g.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",g[g.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",g[g.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",g[g.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",g[g.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",g[g.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",g[g.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",g[g.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",g[g.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",g[g.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",g[g.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",g[g.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",g[g.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",g[g.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",g[g.INVALID_TAG=23]="INVALID_TAG",g[g.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",g[g.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",g[g.UNCLOSED_TAG=27]="UNCLOSED_TAG",g),J=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,K=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,L=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,M=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,N=/^(@+)?(\+|#+)?[rs]?$/g,O=/(\*)(0+)|(#+)(0+)|(0+)/g,P=/^(0+)$/;function Q(a){let b={};return"r"===a[a.length-1]?b.roundingPriority="morePrecision":"s"===a[a.length-1]&&(b.roundingPriority="lessPrecision"),a.replace(N,function(a,c,d){return"string"!=typeof d?(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length):"+"===d?b.minimumSignificantDigits=c.length:"#"===c[0]?b.maximumSignificantDigits=c.length:(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length+("string"==typeof d?d.length:0)),""}),b}function R(a){switch(a){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function S(a){let b=R(a);return b||{}}let T={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]},U=RegExp(`^${J.source}*`),V=RegExp(`${J.source}*$`);function W(a,b){return{start:a,end:b}}let X=!!Object.fromEntries,Y=!!String.prototype.trimStart,Z=!!String.prototype.trimEnd,$=X?Object.fromEntries:function(a){let b={};for(let[c,d]of a)b[c]=d;return b},_=Y?function(a){return a.trimStart()}:function(a){return a.replace(U,"")},aa=Z?function(a){return a.trimEnd()}:function(a){return a.replace(V,"")},ab=RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");class ac{message;position;locale;ignoreTag;requiresOtherClause;shouldParseSkeletons;constructor(a,b={}){this.message=a,this.position={offset:0,line:1,column:1},this.ignoreTag=!!b.ignoreTag,this.locale=b.locale,this.requiresOtherClause=!!b.requiresOtherClause,this.shouldParseSkeletons=!!b.shouldParseSkeletons}parse(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)}parseMessage(a,b,c){let d=[];for(;!this.isEOF();){let e=this.char();if(123===e){let b=this.parseArgument(a,c);if(b.err)return b;d.push(b.val)}else if(125===e&&a>0)break;else if(35===e&&("plural"===b||"selectordinal"===b)){let a=this.clonePosition();this.bump(),d.push({type:x.pound,location:W(a,this.clonePosition())})}else if(60!==e||this.ignoreTag||47!==this.peek())if(60===e&&!this.ignoreTag&&ad(this.peek()||0)){let c=this.parseTag(a,b);if(c.err)return c;d.push(c.val)}else{let c=this.parseLiteral(a,b);if(c.err)return c;d.push(c.val)}else if(!c)return this.error(I.UNMATCHED_CLOSING_TAG,W(this.clonePosition(),this.clonePosition()));else break}return{val:d,err:null}}parseTag(a,b){let c=this.clonePosition();this.bump();let d=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:x.literal,value:`<${d}/>`,location:W(c,this.clonePosition())},err:null};if(!this.bumpIf(">"))return this.error(I.INVALID_TAG,W(c,this.clonePosition()));{let e=this.parseMessage(a+1,b,!0);if(e.err)return e;let f=e.val,g=this.clonePosition();if(!this.bumpIf("</"))return this.error(I.UNCLOSED_TAG,W(c,this.clonePosition()));{if(this.isEOF()||!ad(this.char()))return this.error(I.INVALID_TAG,W(g,this.clonePosition()));let a=this.clonePosition();return d!==this.parseTagName()?this.error(I.UNMATCHED_CLOSING_TAG,W(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">"))?{val:{type:x.tag,value:d,children:f,location:W(c,this.clonePosition())},err:null}:this.error(I.INVALID_TAG,W(g,this.clonePosition()))}}}parseTagName(){var a;let b=this.offset();for(this.bump();!this.isEOF()&&(45===(a=this.char())||46===a||a>=48&&a<=57||95===a||a>=97&&a<=122||a>=65&&a<=90||183==a||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=893||a>=895&&a<=8191||a>=8204&&a<=8205||a>=8255&&a<=8256||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533||a>=65536&&a<=983039);)this.bump();return this.message.slice(b,this.offset())}parseLiteral(a,b){let c=this.clonePosition(),d="";for(;;){let c=this.tryParseQuote(b);if(c){d+=c;continue}let e=this.tryParseUnquoted(a,b);if(e){d+=e;continue}let f=this.tryParseLeftAngleBracket();if(f){d+=f;continue}break}let e=W(c,this.clonePosition());return{val:{type:x.literal,value:d,location:e},err:null}}tryParseLeftAngleBracket(){var a;return this.isEOF()||60!==this.char()||!this.ignoreTag&&(ad(a=this.peek()||0)||47===a)?null:(this.bump(),"<")}tryParseQuote(a){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===a||"selectordinal"===a)break;return null;default:return null}this.bump();let b=[this.char()];for(this.bump();!this.isEOF();){let a=this.char();if(39===a)if(39===this.peek())b.push(39),this.bump();else{this.bump();break}else b.push(a);this.bump()}return String.fromCodePoint(...b)}tryParseUnquoted(a,b){if(this.isEOF())return null;let c=this.char();return 60===c||123===c||35===c&&("plural"===b||"selectordinal"===b)||125===c&&a>0?null:(this.bump(),String.fromCodePoint(c))}parseArgument(a,b){let c=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(c,this.clonePosition()));if(125===this.char())return this.bump(),this.error(I.EMPTY_ARGUMENT,W(c,this.clonePosition()));let d=this.parseIdentifierIfPossible().value;if(!d)return this.error(I.MALFORMED_ARGUMENT,W(c,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(c,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:x.argument,value:d,location:W(c,this.clonePosition())},err:null};case 44:if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(c,this.clonePosition()));return this.parseArgumentOptions(a,b,d,c);default:return this.error(I.MALFORMED_ARGUMENT,W(c,this.clonePosition()))}}parseIdentifierIfPossible(){var a;let b=this.clonePosition(),c=this.offset(),d=(a=this.message,ab.lastIndex=c,ab.exec(a)[1]??""),e=c+d.length;return this.bumpTo(e),{value:d,location:W(b,this.clonePosition())}}parseArgumentOptions(a,b,c,d){let e=this.clonePosition(),f=this.parseIdentifierIfPossible().value,g=this.clonePosition();switch(f){case"":return this.error(I.EXPECT_ARGUMENT_TYPE,W(e,g));case"number":case"date":case"time":{this.bumpSpace();let a=null;if(this.bumpIf(",")){this.bumpSpace();let b=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;let d=aa(c.val);if(0===d.length)return this.error(I.EXPECT_ARGUMENT_STYLE,W(this.clonePosition(),this.clonePosition()));a={style:d,styleLocation:W(b,this.clonePosition())}}let b=this.tryParseArgumentClose(d);if(b.err)return b;let e=W(d,this.clonePosition());if(a&&a.style.startsWith("::")){let b=_(a.style.slice(2));if("number"===f){let d=this.parseNumberSkeletonFromString(b,a.styleLocation);if(d.err)return d;return{val:{type:x.number,value:c,location:e,style:d.val},err:null}}{let d;if(0===b.length)return this.error(I.EXPECT_DATE_TIME_SKELETON,e);let g=b;this.locale&&(g=function(a,b){let c="";for(let d=0;d<a.length;d++){let e=a.charAt(d);if("j"===e){let f=0;for(;d+1<a.length&&a.charAt(d+1)===e;)f++,d++;let g=1+(1&f),h=f<2?1:3+(f>>1),i=function(a){let b,c=a.hourCycle;if(void 0===c&&a.hourCycles&&a.hourCycles.length&&(c=a.hourCycles[0]),c)switch(c){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw Error("Invalid hourCycle")}let d=a.language;return"root"!==d&&(b=a.maximize().region),(T[b||""]||T[d||""]||T[`${d}-001`]||T["001"])[0]}(b);for(("H"==i||"k"==i)&&(h=0);h-- >0;)c+="a";for(;g-- >0;)c=i+c}else"J"===e?c+="H":c+=e}return c}(b,this.locale));let h={type:y.dateTime,pattern:g,location:a.styleLocation,parsedOptions:this.shouldParseSkeletons?(d={},g.replace(K,a=>{let b=a.length;switch(a[0]){case"G":d.era=4===b?"long":5===b?"narrow":"short";break;case"y":d.year=2===b?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":d.month=["numeric","2-digit","short","long","narrow"][b-1];break;case"w":case"W":throw RangeError("`w/W` (week) patterns are not supported");case"d":d.day=["numeric","2-digit"][b-1];break;case"D":case"F":case"g":throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":d.weekday=4===b?"long":5===b?"narrow":"short";break;case"e":if(b<4)throw RangeError("`e..eee` (weekday) patterns are not supported");d.weekday=["short","long","narrow","short"][b-4];break;case"c":if(b<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");d.weekday=["short","long","narrow","short"][b-4];break;case"a":d.hour12=!0;break;case"b":case"B":throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":d.hourCycle="h12",d.hour=["numeric","2-digit"][b-1];break;case"H":d.hourCycle="h23",d.hour=["numeric","2-digit"][b-1];break;case"K":d.hourCycle="h11",d.hour=["numeric","2-digit"][b-1];break;case"k":d.hourCycle="h24",d.hour=["numeric","2-digit"][b-1];break;case"j":case"J":case"C":throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":d.minute=["numeric","2-digit"][b-1];break;case"s":d.second=["numeric","2-digit"][b-1];break;case"S":case"A":throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":d.timeZoneName=b<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),d):{}};return{val:{type:"date"===f?x.date:x.time,value:c,location:e,style:h},err:null}}}return{val:{type:"number"===f?x.number:"date"===f?x.date:x.time,value:c,location:e,style:a?.style??null},err:null}}case"plural":case"selectordinal":case"select":{let e=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(I.EXPECT_SELECT_ARGUMENT_OPTIONS,W(e,{...e}));this.bumpSpace();let g=this.parseIdentifierIfPossible(),h=0;if("select"!==f&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(I.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,W(this.clonePosition(),this.clonePosition()));this.bumpSpace();let a=this.tryParseDecimalInteger(I.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,I.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(a.err)return a;this.bumpSpace(),g=this.parseIdentifierIfPossible(),h=a.val}let i=this.tryParsePluralOrSelectOptions(a,f,b,g);if(i.err)return i;let j=this.tryParseArgumentClose(d);if(j.err)return j;let k=W(d,this.clonePosition());if("select"===f)return{val:{type:x.select,value:c,options:$(i.val),location:k},err:null};return{val:{type:x.plural,value:c,options:$(i.val),offset:h,pluralType:"plural"===f?"cardinal":"ordinal",location:k},err:null}}default:return this.error(I.INVALID_ARGUMENT_TYPE,W(e,g))}}tryParseArgumentClose(a){return this.isEOF()||125!==this.char()?this.error(I.EXPECT_ARGUMENT_CLOSING_BRACE,W(a,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let a=0,b=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(I.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,W(a,this.clonePosition()));this.bump();break}case 123:a+=1,this.bump();break;case 125:if(!(a>0))return{val:this.message.slice(b.offset,this.offset()),err:null};a-=1;break;default:this.bump()}return{val:this.message.slice(b.offset,this.offset()),err:null}}parseNumberSkeletonFromString(a,b){let c=[];try{c=function(a){if(0===a.length)throw Error("Number skeleton cannot be empty");let b=a.split(L).filter(a=>a.length>0),c=[];for(let a of b){let b=a.split("/");if(0===b.length)throw Error("Invalid number skeleton");let[d,...e]=b;for(let a of e)if(0===a.length)throw Error("Invalid number skeleton");c.push({stem:d,options:e})}return c}(a)}catch{return this.error(I.INVALID_NUMBER_SKELETON,b)}return{val:{type:y.number,tokens:c,location:b,parsedOptions:this.shouldParseSkeletons?function(a){let b={};for(let c of a){switch(c.stem){case"percent":case"%":b.style="percent";continue;case"%x100":b.style="percent",b.scale=100;continue;case"currency":b.style="currency",b.currency=c.options[0];continue;case"group-off":case",_":b.useGrouping=!1;continue;case"precision-integer":case".":b.maximumFractionDigits=0;continue;case"measure-unit":case"unit":b.style="unit",b.unit=c.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":b.notation="compact",b.compactDisplay="short";continue;case"compact-long":case"KK":b.notation="compact",b.compactDisplay="long";continue;case"scientific":b={...b,notation:"scientific",...c.options.reduce((a,b)=>({...a,...S(b)}),{})};continue;case"engineering":b={...b,notation:"engineering",...c.options.reduce((a,b)=>({...a,...S(b)}),{})};continue;case"notation-simple":b.notation="standard";continue;case"unit-width-narrow":b.currencyDisplay="narrowSymbol",b.unitDisplay="narrow";continue;case"unit-width-short":b.currencyDisplay="code",b.unitDisplay="short";continue;case"unit-width-full-name":b.currencyDisplay="name",b.unitDisplay="long";continue;case"unit-width-iso-code":b.currencyDisplay="symbol";continue;case"scale":b.scale=parseFloat(c.options[0]);continue;case"rounding-mode-floor":b.roundingMode="floor";continue;case"rounding-mode-ceiling":b.roundingMode="ceil";continue;case"rounding-mode-down":b.roundingMode="trunc";continue;case"rounding-mode-up":b.roundingMode="expand";continue;case"rounding-mode-half-even":b.roundingMode="halfEven";continue;case"rounding-mode-half-down":b.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":b.roundingMode="halfExpand";continue;case"integer-width":if(c.options.length>1)throw RangeError("integer-width stems only accept a single optional option");c.options[0].replace(O,function(a,c,d,e,f,g){if(c)b.minimumIntegerDigits=d.length;else if(e&&f)throw Error("We currently do not support maximum integer digits");else if(g)throw Error("We currently do not support exact integer digits");return""});continue}if(P.test(c.stem)){b.minimumIntegerDigits=c.stem.length;continue}if(M.test(c.stem)){if(c.options.length>1)throw RangeError("Fraction-precision stems only accept a single optional option");c.stem.replace(M,function(a,c,d,e,f,g){return"*"===d?b.minimumFractionDigits=c.length:e&&"#"===e[0]?b.maximumFractionDigits=e.length:f&&g?(b.minimumFractionDigits=f.length,b.maximumFractionDigits=f.length+g.length):(b.minimumFractionDigits=c.length,b.maximumFractionDigits=c.length),""});let a=c.options[0];"w"===a?b={...b,trailingZeroDisplay:"stripIfInteger"}:a&&(b={...b,...Q(a)});continue}if(N.test(c.stem)){b={...b,...Q(c.stem)};continue}let a=R(c.stem);a&&(b={...b,...a});let d=function(a){let b;if("E"===a[0]&&"E"===a[1]?(b={notation:"engineering"},a=a.slice(2)):"E"===a[0]&&(b={notation:"scientific"},a=a.slice(1)),b){let c=a.slice(0,2);if("+!"===c?(b.signDisplay="always",a=a.slice(2)):"+?"===c&&(b.signDisplay="exceptZero",a=a.slice(2)),!P.test(a))throw Error("Malformed concise eng/scientific notation");b.minimumIntegerDigits=a.length}return b}(c.stem);d&&(b={...b,...d})}return b}(c):{}},err:null}}tryParsePluralOrSelectOptions(a,b,c,d){let e=!1,f=[],g=new Set,{value:h,location:i}=d;for(;;){if(0===h.length){let a=this.clonePosition();if("select"!==b&&this.bumpIf("=")){let b=this.tryParseDecimalInteger(I.EXPECT_PLURAL_ARGUMENT_SELECTOR,I.INVALID_PLURAL_ARGUMENT_SELECTOR);if(b.err)return b;i=W(a,this.clonePosition()),h=this.message.slice(a.offset,this.offset())}else break}if(g.has(h))return this.error("select"===b?I.DUPLICATE_SELECT_ARGUMENT_SELECTOR:I.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,i);"other"===h&&(e=!0),this.bumpSpace();let d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===b?I.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:I.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,W(this.clonePosition(),this.clonePosition()));let j=this.parseMessage(a+1,b,c);if(j.err)return j;let k=this.tryParseArgumentClose(d);if(k.err)return k;f.push([h,{value:j.val,location:W(d,this.clonePosition())}]),g.add(h),this.bumpSpace(),{value:h,location:i}=this.parseIdentifierIfPossible()}return 0===f.length?this.error("select"===b?I.EXPECT_SELECT_ARGUMENT_SELECTOR:I.EXPECT_PLURAL_ARGUMENT_SELECTOR,W(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!e?this.error(I.MISSING_OTHER_CLAUSE,W(this.clonePosition(),this.clonePosition())):{val:f,err:null}}tryParseDecimalInteger(a,b){let c=1,d=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(c=-1);let e=!1,f=0;for(;!this.isEOF();){let a=this.char();if(a>=48&&a<=57)e=!0,f=10*f+(a-48),this.bump();else break}let g=W(d,this.clonePosition());return e?Number.isSafeInteger(f*=c)?{val:f,err:null}:this.error(b,g):this.error(a,g)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let a=this.position.offset;if(a>=this.message.length)throw Error("out of bound");let b=this.message.codePointAt(a);if(void 0===b)throw Error(`Offset ${a} is at invalid UTF-16 code unit boundary`);return b}error(a,b){return{val:null,err:{kind:a,message:this.message,location:b}}}bump(){if(this.isEOF())return;let a=this.char();10===a?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=a<65536?1:2)}bumpIf(a){if(this.message.startsWith(a,this.offset())){for(let b=0;b<a.length;b++)this.bump();return!0}return!1}bumpUntil(a){let b=this.offset(),c=this.message.indexOf(a,b);return c>=0?(this.bumpTo(c),!0):(this.bumpTo(this.message.length),!1)}bumpTo(a){if(this.offset()>a)throw Error(`targetOffset ${a} must be greater than or equal to the current offset ${this.offset()}`);for(a=Math.min(a,this.message.length);;){let b=this.offset();if(b===a)break;if(b>a)throw Error(`targetOffset ${a} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(var a;!this.isEOF()&&((a=this.char())>=9&&a<=13||32===a||133===a||a>=8206&&a<=8207||8232===a||8233===a);)this.bump()}peek(){if(this.isEOF())return null;let a=this.char(),b=this.offset();return this.message.charCodeAt(b+(a>=65536?2:1))??null}}function ad(a){return a>=97&&a<=122||a>=65&&a<=90}function ae(a,b={}){let c=new ac(a,b={shouldParseSkeletons:!0,requiresOtherClause:!0,...b}).parse();if(c.err){let a=SyntaxError(I[c.err.kind]);throw a.location=c.err.location,a.originalMessage=c.err.message,a}return b?.captureLocation||function a(b){b.forEach(b=>{if(delete b.location,D(b)||E(b))for(let c in b.options)delete b.options[c].location,a(b.options[c].value);else A(b)&&G(b.style)||(B(b)||C(b))&&H(b.style)?delete b.style.location:F(b)&&a(b.children)})}(c.val),c.val}let af=((h={}).MISSING_VALUE="MISSING_VALUE",h.INVALID_VALUE="INVALID_VALUE",h.MISSING_INTL_API="MISSING_INTL_API",h);class ag extends Error{code;originalMessage;constructor(a,b,c){super(a),this.code=b,this.originalMessage=c}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}}class ah extends ag{constructor(a,b,c,d){super(`Invalid values for "${a}": "${b}". Options are "${Object.keys(c).join('", "')}"`,af.INVALID_VALUE,d)}}class ai extends ag{constructor(a,b,c){super(`Value for "${a}" must be of type ${b}`,af.INVALID_VALUE,c)}}class aj extends ag{constructor(a,b){super(`The intl string context variable "${a}" was not provided to the string "${b}"`,af.MISSING_VALUE,b)}}let ak=((i={})[i.literal=0]="literal",i[i.object=1]="object",i);function al(a){return{create:()=>({get:b=>a[b],set(b,c){a[b]=c}})}}class am{ast;locales;resolvedLocale;formatters;formats;message;formatterCache={number:{},dateTime:{},pluralRules:{}};constructor(a,b=am.defaultLocale,c,d){if(this.locales=b,this.resolvedLocale=am.resolveLocale(b),"string"==typeof a){if(this.message=a,!am.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...b}=d||{};this.ast=am.__parse(a,{...b,locale:this.resolvedLocale})}else this.ast=a;if(!Array.isArray(this.ast))throw TypeError("A message must be provided as a String or AST.");this.formats=function(a,b){return b?Object.keys(a).reduce((c,d)=>{var e,f;return c[d]=(e=a[d],(f=b[d])?{...e,...f,...Object.keys(e).reduce((a,b)=>(a[b]={...e[b],...f[b]},a),{})}:e),c},{...a}):a}(am.formats,c),this.formatters=d&&d.formatters||function(a={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:k((...a)=>new Intl.NumberFormat(...a),{cache:al(a.number),strategy:q.variadic}),getDateTimeFormat:k((...a)=>new Intl.DateTimeFormat(...a),{cache:al(a.dateTime),strategy:q.variadic}),getPluralRules:k((...a)=>new Intl.PluralRules(...a),{cache:al(a.pluralRules),strategy:q.variadic})}}(this.formatterCache)}format=a=>{let b=this.formatToParts(a);if(1===b.length)return b[0].value;let c=b.reduce((a,b)=>(a.length&&b.type===ak.literal&&"string"==typeof a[a.length-1]?a[a.length-1]+=b.value:a.push(b.value),a),[]);return c.length<=1?c[0]||"":c};formatToParts=a=>(function a(b,c,d,e,f,g,h){if(1===b.length&&z(b[0]))return[{type:ak.literal,value:b[0].value}];let i=[];for(let j of b){if(z(j)){i.push({type:ak.literal,value:j.value});continue}if(j.type===x.pound){"number"==typeof g&&i.push({type:ak.literal,value:d.getNumberFormat(c).format(g)});continue}let{value:b}=j;if(!(f&&b in f))throw new aj(b,h);let k=f[b];if(j.type===x.argument){k&&"string"!=typeof k&&"number"!=typeof k&&"bigint"!=typeof k||(k="string"==typeof k||"number"==typeof k||"bigint"==typeof k?String(k):""),i.push({type:"string"==typeof k?ak.literal:ak.object,value:k});continue}if(B(j)){let a="string"==typeof j.style?e.date[j.style]:H(j.style)?j.style.parsedOptions:void 0;i.push({type:ak.literal,value:d.getDateTimeFormat(c,a).format(k)});continue}if(C(j)){let a="string"==typeof j.style?e.time[j.style]:H(j.style)?j.style.parsedOptions:e.time.medium;i.push({type:ak.literal,value:d.getDateTimeFormat(c,a).format(k)});continue}if(A(j)){let a="string"==typeof j.style?e.number[j.style]:G(j.style)?j.style.parsedOptions:void 0;if(a&&a.scale){let b=a.scale||1;if("bigint"==typeof k){if(!Number.isInteger(b))throw TypeError(`Cannot apply fractional scale ${b} to bigint value. Scale must be an integer when formatting bigint.`);k*=BigInt(b)}else k*=b}i.push({type:ak.literal,value:d.getNumberFormat(c,a).format(k)});continue}if(F(j)){let{children:b,value:k}=j,l=f[k];if("function"!=typeof l)throw new ai(k,"function",h);let m=l(a(b,c,d,e,f,g).map(a=>a.value));Array.isArray(m)||(m=[m]),i.push(...m.map(a=>({type:"string"==typeof a?ak.literal:ak.object,value:a})))}if(D(j)){let b=k,g=(Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0)||j.options.other;if(!g)throw new ah(j.value,k,Object.keys(j.options),h);i.push(...a(g.value,c,d,e,f));continue}if(E(j)){let b=`=${k}`,g=Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0;if(!g){if(!Intl.PluralRules)throw new ag(`Intl.PluralRules is not available in this environment.
|
|
2
2
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
3
3
|
`,af.MISSING_INTL_API,h);let a="bigint"==typeof k?Number(k):k,b=d.getPluralRules(c,{type:j.pluralType}).select(a-(j.offset||0));g=(Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0)||j.options.other}if(!g)throw new ah(j.value,k,Object.keys(j.options),h);let l="bigint"==typeof k?Number(k):k;i.push(...a(g.value,c,d,e,f,l-(j.offset||0)));continue}}return i.length<2?i:i.reduce((a,b)=>{let c=a[a.length-1];return c&&c.type===ak.literal&&b.type===ak.literal?c.value+=b.value:a.push(b),a},[])})(this.ast,this.locales,this.formatters,this.formats,a,void 0,this.message);resolvedOptions=()=>({locale:this.resolvedLocale?.toString()||Intl.NumberFormat.supportedLocalesOf(this.locales)[0]});getAst=()=>this.ast;static memoizedDefaultLocale=null;static get defaultLocale(){return am.memoizedDefaultLocale||(am.memoizedDefaultLocale=new Intl.NumberFormat().resolvedOptions().locale),am.memoizedDefaultLocale}static resolveLocale=a=>{if(void 0===Intl.Locale)return;let b=Intl.NumberFormat.supportedLocalesOf(a);return new Intl.Locale(b.length>0?b[0]:"string"==typeof a?a:a[0])};static __parse=ae;static formats={number:{integer:{maximumFractionDigits:0},currency:{style:"currency"},percent:{style:"percent"}},date:{short:{month:"numeric",day:"numeric",year:"2-digit"},medium:{month:"short",day:"numeric",year:"numeric"},long:{month:"long",day:"numeric",year:"numeric"},full:{weekday:"long",month:"long",day:"numeric",year:"numeric"}},time:{short:{hour:"numeric",minute:"numeric"},medium:{hour:"numeric",minute:"numeric",second:"numeric"},long:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"},full:{hour:"numeric",minute:"numeric",second:"numeric",timeZoneName:"short"}}}}function an(...[a,b,c,d]){let e;if(Array.isArray(b))throw new r(s.INVALID_MESSAGE,void 0);if("object"==typeof b)throw new r(s.INSUFFICIENT_PATH,void 0);if("string"==typeof b){let a=c||/'[{}]/.test(b)?void 0:b;if(a)return a}let{cache:f,formats:g,formatters:h,globalFormats:i,locale:k,timeZone:l}=d;h.getMessageFormat||(h.getMessageFormat=u((...a)=>new am(a[0],a[1],a[2],{formatters:h,...a[3]}),f.message));try{let a,c,d,f;e=h.getMessageFormat(b,k,(a=am.formats.date,c=am.formats.time,d={...i?.dateTime,...g?.dateTime},f={date:{...a,...d},time:{...c,...d},number:{...i?.number,...g?.number}},l&&["date","time"].forEach(a=>{let b=f[a];for(let[a,c]of Object.entries(b))b[a]={timeZone:l,...c}}),f),{formatters:{...h,getDateTimeFormat:(a,b)=>h.getDateTimeFormat(a,{...b,timeZone:b?.timeZone??l})}})}catch(a){throw new r(s.INVALID_MESSAGE,void 0)}let m=e.format(c);return(0,j.isValidElement)(m)||Array.isArray(m)||"string"==typeof m?m:String(m)}function ao(...a){return a.filter(Boolean).join(".")}function ap(a){return ao(a.namespace,a.key)}function aq(a){console.error(a)}function ar(a,b,c,d){let e=ao(d,c);if(!b)throw Error(e);let f=b;return c.split(".").forEach(b=>{let c=f[b];if(null==b||null==c)throw Error(e+` (${a})`);f=c}),f}an.raw=!0;let as={second:1,seconds:1,minute:60,minutes:60,hour:3600,hours:3600,day:86400,days:86400,week:604800,weeks:604800,month:2628e3,months:2628e3,quarter:7884e3,quarters:7884e3,year:31536e3,years:31536e3};var at=c(48249);let au=(0,j.createContext)(void 0);function av({children:a,formats:b,getMessageFallback:c,locale:d,messages:e,now:f,onError:g,timeZone:h}){let i=(0,j.useContext)(au),k=(0,j.useMemo)(()=>i?.cache||t(),[d,i?.cache]),l=(0,j.useMemo)(()=>i?.formatters||w(k),[k,i?.formatters]),m=(0,j.useMemo)(()=>({...function({formats:a,getMessageFallback:b,messages:c,onError:d,...e}){return{...e,formats:a||void 0,messages:c||void 0,onError:d||aq,getMessageFallback:b||ap}}({locale:d,formats:void 0===b?i?.formats:b,getMessageFallback:c||i?.getMessageFallback,messages:void 0===e?i?.messages:e,now:f||i?.now,onError:g||i?.onError,timeZone:h||i?.timeZone}),formatters:l,cache:k}),[k,b,l,c,d,e,f,g,i,h]);return(0,at.jsx)(au.Provider,{value:m,children:a})}function aw(){let a=(0,j.useContext)(au);if(!a)throw Error(void 0);return a}let ax=!1,ay="u"<typeof window;function az(a){return function(a,b,c){let{cache:d,formats:e,formatters:f,getMessageFallback:g,locale:h,onError:i,timeZone:k}=aw(),l=a["!"],m="!"===b?void 0:b.slice(2);return k||ax||!ay||(ax=!0,i(new r(s.ENVIRONMENT_FALLBACK,void 0))),(0,j.useMemo)(()=>{var a;let b;return b=function(a,b,c){try{if(!b)throw Error(void 0);let d=c?ar(a,b,c):b;if(!d)throw Error(c);return d}catch(a){return new r(s.MISSING_MESSAGE,a.message)}}((a={cache:d,formatters:f,getMessageFallback:g,messages:l,namespace:m,onError:i,formats:e,locale:h,timeZone:k}).locale,a.messages,a.namespace),function({cache:a,formats:b,formatters:c,getMessageFallback:d=ap,locale:e,messagesOrError:f,namespace:g,onError:h,timeZone:i}){let k=f instanceof r;function l(a,b,c,e){let f=new r(b,c);return h(f),e??d({error:f,key:a,namespace:g})}function m(m,n,o,p){let q;if(k){if(!p)return h(f),d({error:f,key:m,namespace:g});q=p}else try{q=ar(e,f,m,g)}catch(a){if(!p)return l(m,s.MISSING_MESSAGE,a.message,p);q=p}try{let d,f=ao(g,m);return an(f,q,n?(d={},Object.keys(n).forEach(a=>{let b,c=0,e=n[a];b="function"==typeof e?b=>{let d=e(b);return(0,j.isValidElement)(d)?(0,j.cloneElement)(d,{key:a+c++}):d}:e,d[a]=b}),d):n,{cache:a,formatters:c,globalFormats:b,formats:o,locale:e,timeZone:i})}catch(c){let a,b;return c instanceof r?(a=c.code,b=c.originalMessage):(a=s.FORMATTING_ERROR,b=c.message),l(m,a,b,p)}}function n(a,b,c,d){let e=m(a,b,c,d);return"string"!=typeof e?l(a,s.INVALID_MESSAGE,void 0):e}return n.rich=m,n.markup=(a,b,c,d)=>m(a,b,c,d),n.raw=a=>{if(k)return h(f),d({error:f,key:a,namespace:g});try{return ar(e,f,a,g)}catch(b){return l(a,s.MISSING_MESSAGE,b.message)}},n.has=a=>{if(k)return!1;try{return ar(e,f,a,g),!0}catch{return!1}},n}({...a,messagesOrError:b})},[d,f,g,l,m,i,e,h,k])}({"!":aw().messages},a?`!.${a}`:"!",0)}function aA(){return aw().locale}function aB(){let{formats:a,formatters:b,locale:c,now:d,onError:e,timeZone:f}=aw();return(0,j.useMemo)(()=>(function(a){let{_cache:b=t(),_formatters:c=w(b),formats:d,locale:e,onError:f=aq,timeZone:g}=a;function h(a){return a?.timeZone||(g?a={...a,timeZone:g}:f(new r(s.ENVIRONMENT_FALLBACK,void 0))),a}function i(a,b,c,d,e){let g;try{g=function(a,b,c){let d;if("string"==typeof b){if(!(d=a?.[b])){let a=new r(s.MISSING_FORMAT,void 0);throw f(a),a}}else d=b;return c&&(d={...d,...c}),d}(c,a,b)}catch{return e()}try{return d(g)}catch(a){return f(new r(s.FORMATTING_ERROR,a.message)),e()}}function j(a,b,f){return i(b,f,d?.dateTime,b=>(b=h(b),c.getDateTimeFormat(e,b).format(a)),()=>String(a))}function k(){return a.now?a.now:(f(new r(s.ENVIRONMENT_FALLBACK,void 0)),new Date)}return{dateTime:j,number:function(a,b,f){return i(b,f,d?.number,b=>c.getNumberFormat(e,b).format(a),()=>String(a))},relativeTime:function(a,b){try{var d;let f,g,h,i={};b instanceof Date||"number"==typeof b?f=new Date(b):b&&(f=null!=b.now?new Date(b.now):k(),g=b.unit,i.style=b.style,i.numberingSystem=b.numberingSystem),f||(f=k());let j=(new Date(a).getTime()-f.getTime())/1e3;g||(g=(h=Math.abs(j))<60?"second":h<3600?"minute":h<86400?"hour":h<604800?"day":h<2628e3?"week":h<31536e3?"month":"year"),i.numeric="second"===g?"auto":"always";let l=(d=g,Math.round(j/as[d]));return c.getRelativeTimeFormat(e,i).format(l,g)}catch(b){return f(new r(s.FORMATTING_ERROR,b.message)),String(a)}},list:function(a,b,f){let g=[],h=new Map,j=0;for(let b of a){let a;"object"==typeof b?(a=String(j),h.set(a,b)):a=String(b),g.push(a),j++}return i(b,f,d?.list,a=>{let b=c.getListFormat(e,a).formatToParts(g).map(a=>"literal"===a.type?a.value:h.get(a.value)||a.value);return h.size>0?b:b.join("")},()=>String(a))},dateTimeRange:function(a,b,f,g){return i(f,g,d?.dateTime,d=>(d=h(d),c.getDateTimeFormat(e,d).formatRange(a,b)),()=>[j(a),j(b)].join(" – "))}}})({formats:a,locale:c,now:d,onError:e,timeZone:f,_formatters:b}),[a,b,d,c,e,f])}},92207:(a,b,c)=>{"use strict";c.d(b,{a:()=>ag,b:()=>ae,d:()=>ad,i:()=>ai,r:()=>ah});var d,e,f,g,h,i=c(91986),j=c(14462);let k=((d={})[d.literal=0]="literal",d[d.argument=1]="argument",d[d.number=2]="number",d[d.date=3]="date",d[d.time=4]="time",d[d.select=5]="select",d[d.plural=6]="plural",d[d.pound=7]="pound",d[d.tag=8]="tag",d),l=((e={})[e.number=0]="number",e[e.dateTime=1]="dateTime",e);function m(a){return a.type===k.literal}function n(a){return a.type===k.number}function o(a){return a.type===k.date}function p(a){return a.type===k.time}function q(a){return a.type===k.select}function r(a){return a.type===k.plural}function s(a){return a.type===k.tag}function t(a){return!!(a&&"object"==typeof a&&a.type===l.number)}function u(a){return!!(a&&"object"==typeof a&&a.type===l.dateTime)}let v=((f={})[f.EXPECT_ARGUMENT_CLOSING_BRACE=1]="EXPECT_ARGUMENT_CLOSING_BRACE",f[f.EMPTY_ARGUMENT=2]="EMPTY_ARGUMENT",f[f.MALFORMED_ARGUMENT=3]="MALFORMED_ARGUMENT",f[f.EXPECT_ARGUMENT_TYPE=4]="EXPECT_ARGUMENT_TYPE",f[f.INVALID_ARGUMENT_TYPE=5]="INVALID_ARGUMENT_TYPE",f[f.EXPECT_ARGUMENT_STYLE=6]="EXPECT_ARGUMENT_STYLE",f[f.INVALID_NUMBER_SKELETON=7]="INVALID_NUMBER_SKELETON",f[f.INVALID_DATE_TIME_SKELETON=8]="INVALID_DATE_TIME_SKELETON",f[f.EXPECT_NUMBER_SKELETON=9]="EXPECT_NUMBER_SKELETON",f[f.EXPECT_DATE_TIME_SKELETON=10]="EXPECT_DATE_TIME_SKELETON",f[f.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE=11]="UNCLOSED_QUOTE_IN_ARGUMENT_STYLE",f[f.EXPECT_SELECT_ARGUMENT_OPTIONS=12]="EXPECT_SELECT_ARGUMENT_OPTIONS",f[f.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE=13]="EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE",f[f.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE=14]="INVALID_PLURAL_ARGUMENT_OFFSET_VALUE",f[f.EXPECT_SELECT_ARGUMENT_SELECTOR=15]="EXPECT_SELECT_ARGUMENT_SELECTOR",f[f.EXPECT_PLURAL_ARGUMENT_SELECTOR=16]="EXPECT_PLURAL_ARGUMENT_SELECTOR",f[f.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT=17]="EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT",f[f.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT=18]="EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT",f[f.INVALID_PLURAL_ARGUMENT_SELECTOR=19]="INVALID_PLURAL_ARGUMENT_SELECTOR",f[f.DUPLICATE_PLURAL_ARGUMENT_SELECTOR=20]="DUPLICATE_PLURAL_ARGUMENT_SELECTOR",f[f.DUPLICATE_SELECT_ARGUMENT_SELECTOR=21]="DUPLICATE_SELECT_ARGUMENT_SELECTOR",f[f.MISSING_OTHER_CLAUSE=22]="MISSING_OTHER_CLAUSE",f[f.INVALID_TAG=23]="INVALID_TAG",f[f.INVALID_TAG_NAME=25]="INVALID_TAG_NAME",f[f.UNMATCHED_CLOSING_TAG=26]="UNMATCHED_CLOSING_TAG",f[f.UNCLOSED_TAG=27]="UNCLOSED_TAG",f),w=/[ \xA0\u1680\u2000-\u200A\u202F\u205F\u3000]/,x=/(?:[Eec]{1,6}|G{1,5}|[Qq]{1,5}|(?:[yYur]+|U{1,5})|[ML]{1,5}|d{1,2}|D{1,3}|F{1}|[abB]{1,5}|[hkHK]{1,2}|w{1,2}|W{1}|m{1,2}|s{1,2}|[zZOvVxX]{1,4})(?=([^']*'[^']*')*[^']*$)/g,y=/[\t-\r \x85\u200E\u200F\u2028\u2029]/i,z=/^\.(?:(0+)(\*)?|(#+)|(0+)(#+))$/g,A=/^(@+)?(\+|#+)?[rs]?$/g,B=/(\*)(0+)|(#+)(0+)|(0+)/g,C=/^(0+)$/;function D(a){let b={};return"r"===a[a.length-1]?b.roundingPriority="morePrecision":"s"===a[a.length-1]&&(b.roundingPriority="lessPrecision"),a.replace(A,function(a,c,d){return"string"!=typeof d?(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length):"+"===d?b.minimumSignificantDigits=c.length:"#"===c[0]?b.maximumSignificantDigits=c.length:(b.minimumSignificantDigits=c.length,b.maximumSignificantDigits=c.length+("string"==typeof d?d.length:0)),""}),b}function E(a){switch(a){case"sign-auto":return{signDisplay:"auto"};case"sign-accounting":case"()":return{currencySign:"accounting"};case"sign-always":case"+!":return{signDisplay:"always"};case"sign-accounting-always":case"()!":return{signDisplay:"always",currencySign:"accounting"};case"sign-except-zero":case"+?":return{signDisplay:"exceptZero"};case"sign-accounting-except-zero":case"()?":return{signDisplay:"exceptZero",currencySign:"accounting"};case"sign-never":case"+_":return{signDisplay:"never"}}}function F(a){let b=E(a);return b||{}}let G={"001":["H","h"],419:["h","H","hB","hb"],AC:["H","h","hb","hB"],AD:["H","hB"],AE:["h","hB","hb","H"],AF:["H","hb","hB","h"],AG:["h","hb","H","hB"],AI:["H","h","hb","hB"],AL:["h","H","hB"],AM:["H","hB"],AO:["H","hB"],AR:["h","H","hB","hb"],AS:["h","H"],AT:["H","hB"],AU:["h","hb","H","hB"],AW:["H","hB"],AX:["H"],AZ:["H","hB","h"],BA:["H","hB","h"],BB:["h","hb","H","hB"],BD:["h","hB","H"],BE:["H","hB"],BF:["H","hB"],BG:["H","hB","h"],BH:["h","hB","hb","H"],BI:["H","h"],BJ:["H","hB"],BL:["H","hB"],BM:["h","hb","H","hB"],BN:["hb","hB","h","H"],BO:["h","H","hB","hb"],BQ:["H"],BR:["H","hB"],BS:["h","hb","H","hB"],BT:["h","H"],BW:["H","h","hb","hB"],BY:["H","h"],BZ:["H","h","hb","hB"],CA:["h","hb","H","hB"],CC:["H","h","hb","hB"],CD:["hB","H"],CF:["H","h","hB"],CG:["H","hB"],CH:["H","hB","h"],CI:["H","hB"],CK:["H","h","hb","hB"],CL:["h","H","hB","hb"],CM:["H","h","hB"],CN:["H","hB","hb","h"],CO:["h","H","hB","hb"],CP:["H"],CR:["h","H","hB","hb"],CU:["h","H","hB","hb"],CV:["H","hB"],CW:["H","hB"],CX:["H","h","hb","hB"],CY:["h","H","hb","hB"],CZ:["H"],DE:["H","hB"],DG:["H","h","hb","hB"],DJ:["h","H"],DK:["H"],DM:["h","hb","H","hB"],DO:["h","H","hB","hb"],DZ:["h","hB","hb","H"],EA:["H","h","hB","hb"],EC:["h","H","hB","hb"],EE:["H","hB"],EG:["h","hB","hb","H"],EH:["h","hB","hb","H"],ER:["h","H"],ES:["H","hB","h","hb"],ET:["hB","hb","h","H"],FI:["H"],FJ:["h","hb","H","hB"],FK:["H","h","hb","hB"],FM:["h","hb","H","hB"],FO:["H","h"],FR:["H","hB"],GA:["H","hB"],GB:["H","h","hb","hB"],GD:["h","hb","H","hB"],GE:["H","hB","h"],GF:["H","hB"],GG:["H","h","hb","hB"],GH:["h","H"],GI:["H","h","hb","hB"],GL:["H","h"],GM:["h","hb","H","hB"],GN:["H","hB"],GP:["H","hB"],GQ:["H","hB","h","hb"],GR:["h","H","hb","hB"],GS:["H","h","hb","hB"],GT:["h","H","hB","hb"],GU:["h","hb","H","hB"],GW:["H","hB"],GY:["h","hb","H","hB"],HK:["h","hB","hb","H"],HN:["h","H","hB","hb"],HR:["H","hB"],HU:["H","h"],IC:["H","h","hB","hb"],ID:["H"],IE:["H","h","hb","hB"],IL:["H","hB"],IM:["H","h","hb","hB"],IN:["h","H"],IO:["H","h","hb","hB"],IQ:["h","hB","hb","H"],IR:["hB","H"],IS:["H"],IT:["H","hB"],JE:["H","h","hb","hB"],JM:["h","hb","H","hB"],JO:["h","hB","hb","H"],JP:["H","K","h"],KE:["hB","hb","H","h"],KG:["H","h","hB","hb"],KH:["hB","h","H","hb"],KI:["h","hb","H","hB"],KM:["H","h","hB","hb"],KN:["h","hb","H","hB"],KP:["h","H","hB","hb"],KR:["h","H","hB","hb"],KW:["h","hB","hb","H"],KY:["h","hb","H","hB"],KZ:["H","hB"],LA:["H","hb","hB","h"],LB:["h","hB","hb","H"],LC:["h","hb","H","hB"],LI:["H","hB","h"],LK:["H","h","hB","hb"],LR:["h","hb","H","hB"],LS:["h","H"],LT:["H","h","hb","hB"],LU:["H","h","hB"],LV:["H","hB","hb","h"],LY:["h","hB","hb","H"],MA:["H","h","hB","hb"],MC:["H","hB"],MD:["H","hB"],ME:["H","hB","h"],MF:["H","hB"],MG:["H","h"],MH:["h","hb","H","hB"],MK:["H","h","hb","hB"],ML:["H"],MM:["hB","hb","H","h"],MN:["H","h","hb","hB"],MO:["h","hB","hb","H"],MP:["h","hb","H","hB"],MQ:["H","hB"],MR:["h","hB","hb","H"],MS:["H","h","hb","hB"],MT:["H","h"],MU:["H","h"],MV:["H","h"],MW:["h","hb","H","hB"],MX:["h","H","hB","hb"],MY:["hb","hB","h","H"],MZ:["H","hB"],NA:["h","H","hB","hb"],NC:["H","hB"],NE:["H"],NF:["H","h","hb","hB"],NG:["H","h","hb","hB"],NI:["h","H","hB","hb"],NL:["H","hB"],NO:["H","h"],NP:["H","h","hB"],NR:["H","h","hb","hB"],NU:["H","h","hb","hB"],NZ:["h","hb","H","hB"],OM:["h","hB","hb","H"],PA:["h","H","hB","hb"],PE:["h","H","hB","hb"],PF:["H","h","hB"],PG:["h","H"],PH:["h","hB","hb","H"],PK:["h","hB","H"],PL:["H","h"],PM:["H","hB"],PN:["H","h","hb","hB"],PR:["h","H","hB","hb"],PS:["h","hB","hb","H"],PT:["H","hB"],PW:["h","H"],PY:["h","H","hB","hb"],QA:["h","hB","hb","H"],RE:["H","hB"],RO:["H","hB"],RS:["H","hB","h"],RU:["H"],RW:["H","h"],SA:["h","hB","hb","H"],SB:["h","hb","H","hB"],SC:["H","h","hB"],SD:["h","hB","hb","H"],SE:["H"],SG:["h","hb","H","hB"],SH:["H","h","hb","hB"],SI:["H","hB"],SJ:["H"],SK:["H"],SL:["h","hb","H","hB"],SM:["H","h","hB"],SN:["H","h","hB"],SO:["h","H"],SR:["H","hB"],SS:["h","hb","H","hB"],ST:["H","hB"],SV:["h","H","hB","hb"],SX:["H","h","hb","hB"],SY:["h","hB","hb","H"],SZ:["h","hb","H","hB"],TA:["H","h","hb","hB"],TC:["h","hb","H","hB"],TD:["h","H","hB"],TF:["H","h","hB"],TG:["H","hB"],TH:["H","h"],TJ:["H","h"],TL:["H","hB","hb","h"],TM:["H","h"],TN:["h","hB","hb","H"],TO:["h","H"],TR:["H","hB"],TT:["h","hb","H","hB"],TW:["hB","hb","h","H"],TZ:["hB","hb","H","h"],UA:["H","hB","h"],UG:["hB","hb","H","h"],UM:["h","hb","H","hB"],US:["h","hb","H","hB"],UY:["h","H","hB","hb"],UZ:["H","hB","h"],VA:["H","h","hB"],VC:["h","hb","H","hB"],VE:["h","H","hB","hb"],VG:["h","hb","H","hB"],VI:["h","hb","H","hB"],VN:["H","h"],VU:["h","H"],WF:["H","hB"],WS:["h","H"],XK:["H","hB","h"],YE:["h","hB","hb","H"],YT:["H","hB"],ZA:["H","h","hb","hB"],ZM:["h","hb","H","hB"],ZW:["H","h"],"af-ZA":["H","h","hB","hb"],"ar-001":["h","hB","hb","H"],"ca-ES":["H","h","hB"],"en-001":["h","hb","H","hB"],"en-HK":["h","hb","H","hB"],"en-IL":["H","h","hb","hB"],"en-MY":["h","hb","H","hB"],"es-BR":["H","h","hB","hb"],"es-ES":["H","h","hB","hb"],"es-GQ":["H","h","hB","hb"],"fr-CA":["H","h","hB"],"gl-ES":["H","h","hB"],"gu-IN":["hB","hb","h","H"],"hi-IN":["hB","h","H"],"it-CH":["H","h","hB"],"it-IT":["H","h","hB"],"kn-IN":["hB","h","H"],"ku-SY":["H","hB"],"ml-IN":["hB","h","H"],"mr-IN":["hB","hb","h","H"],"pa-IN":["hB","hb","h","H"],"ta-IN":["hB","h","hb","H"],"te-IN":["hB","h","H"],"zu-ZA":["H","hB","hb","h"]},H=RegExp(`^${w.source}*`),I=RegExp(`${w.source}*$`);function J(a,b){return{start:a,end:b}}let K=!!Object.fromEntries,L=!!String.prototype.trimStart,M=!!String.prototype.trimEnd,N=K?Object.fromEntries:function(a){let b={};for(let[c,d]of a)b[c]=d;return b},O=L?function(a){return a.trimStart()}:function(a){return a.replace(H,"")},P=M?function(a){return a.trimEnd()}:function(a){return a.replace(I,"")},Q=RegExp("([^\\p{White_Space}\\p{Pattern_Syntax}]*)","yu");class R{message;position;locale;ignoreTag;requiresOtherClause;shouldParseSkeletons;constructor(a,b={}){this.message=a,this.position={offset:0,line:1,column:1},this.ignoreTag=!!b.ignoreTag,this.locale=b.locale,this.requiresOtherClause=!!b.requiresOtherClause,this.shouldParseSkeletons=!!b.shouldParseSkeletons}parse(){if(0!==this.offset())throw Error("parser can only be used once");return this.parseMessage(0,"",!1)}parseMessage(a,b,c){let d=[];for(;!this.isEOF();){let e=this.char();if(123===e){let b=this.parseArgument(a,c);if(b.err)return b;d.push(b.val)}else if(125===e&&a>0)break;else if(35===e&&("plural"===b||"selectordinal"===b)){let a=this.clonePosition();this.bump(),d.push({type:k.pound,location:J(a,this.clonePosition())})}else if(60!==e||this.ignoreTag||47!==this.peek())if(60===e&&!this.ignoreTag&&S(this.peek()||0)){let c=this.parseTag(a,b);if(c.err)return c;d.push(c.val)}else{let c=this.parseLiteral(a,b);if(c.err)return c;d.push(c.val)}else if(!c)return this.error(v.UNMATCHED_CLOSING_TAG,J(this.clonePosition(),this.clonePosition()));else break}return{val:d,err:null}}parseTag(a,b){let c=this.clonePosition();this.bump();let d=this.parseTagName();if(this.bumpSpace(),this.bumpIf("/>"))return{val:{type:k.literal,value:`<${d}/>`,location:J(c,this.clonePosition())},err:null};if(!this.bumpIf(">"))return this.error(v.INVALID_TAG,J(c,this.clonePosition()));{let e=this.parseMessage(a+1,b,!0);if(e.err)return e;let f=e.val,g=this.clonePosition();if(!this.bumpIf("</"))return this.error(v.UNCLOSED_TAG,J(c,this.clonePosition()));{if(this.isEOF()||!S(this.char()))return this.error(v.INVALID_TAG,J(g,this.clonePosition()));let a=this.clonePosition();return d!==this.parseTagName()?this.error(v.UNMATCHED_CLOSING_TAG,J(a,this.clonePosition())):(this.bumpSpace(),this.bumpIf(">"))?{val:{type:k.tag,value:d,children:f,location:J(c,this.clonePosition())},err:null}:this.error(v.INVALID_TAG,J(g,this.clonePosition()))}}}parseTagName(){var a;let b=this.offset();for(this.bump();!this.isEOF()&&(45===(a=this.char())||46===a||a>=48&&a<=57||95===a||a>=97&&a<=122||a>=65&&a<=90||183==a||a>=192&&a<=214||a>=216&&a<=246||a>=248&&a<=893||a>=895&&a<=8191||a>=8204&&a<=8205||a>=8255&&a<=8256||a>=8304&&a<=8591||a>=11264&&a<=12271||a>=12289&&a<=55295||a>=63744&&a<=64975||a>=65008&&a<=65533||a>=65536&&a<=983039);)this.bump();return this.message.slice(b,this.offset())}parseLiteral(a,b){let c=this.clonePosition(),d="";for(;;){let c=this.tryParseQuote(b);if(c){d+=c;continue}let e=this.tryParseUnquoted(a,b);if(e){d+=e;continue}let f=this.tryParseLeftAngleBracket();if(f){d+=f;continue}break}let e=J(c,this.clonePosition());return{val:{type:k.literal,value:d,location:e},err:null}}tryParseLeftAngleBracket(){var a;return this.isEOF()||60!==this.char()||!this.ignoreTag&&(S(a=this.peek()||0)||47===a)?null:(this.bump(),"<")}tryParseQuote(a){if(this.isEOF()||39!==this.char())return null;switch(this.peek()){case 39:return this.bump(),this.bump(),"'";case 123:case 60:case 62:case 125:break;case 35:if("plural"===a||"selectordinal"===a)break;return null;default:return null}this.bump();let b=[this.char()];for(this.bump();!this.isEOF();){let a=this.char();if(39===a)if(39===this.peek())b.push(39),this.bump();else{this.bump();break}else b.push(a);this.bump()}return String.fromCodePoint(...b)}tryParseUnquoted(a,b){if(this.isEOF())return null;let c=this.char();return 60===c||123===c||35===c&&("plural"===b||"selectordinal"===b)||125===c&&a>0?null:(this.bump(),String.fromCodePoint(c))}parseArgument(a,b){let c=this.clonePosition();if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,J(c,this.clonePosition()));if(125===this.char())return this.bump(),this.error(v.EMPTY_ARGUMENT,J(c,this.clonePosition()));let d=this.parseIdentifierIfPossible().value;if(!d)return this.error(v.MALFORMED_ARGUMENT,J(c,this.clonePosition()));if(this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,J(c,this.clonePosition()));switch(this.char()){case 125:return this.bump(),{val:{type:k.argument,value:d,location:J(c,this.clonePosition())},err:null};case 44:if(this.bump(),this.bumpSpace(),this.isEOF())return this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,J(c,this.clonePosition()));return this.parseArgumentOptions(a,b,d,c);default:return this.error(v.MALFORMED_ARGUMENT,J(c,this.clonePosition()))}}parseIdentifierIfPossible(){var a;let b=this.clonePosition(),c=this.offset(),d=(a=this.message,Q.lastIndex=c,Q.exec(a)[1]??""),e=c+d.length;return this.bumpTo(e),{value:d,location:J(b,this.clonePosition())}}parseArgumentOptions(a,b,c,d){let e=this.clonePosition(),f=this.parseIdentifierIfPossible().value,g=this.clonePosition();switch(f){case"":return this.error(v.EXPECT_ARGUMENT_TYPE,J(e,g));case"number":case"date":case"time":{this.bumpSpace();let a=null;if(this.bumpIf(",")){this.bumpSpace();let b=this.clonePosition(),c=this.parseSimpleArgStyleIfPossible();if(c.err)return c;let d=P(c.val);if(0===d.length)return this.error(v.EXPECT_ARGUMENT_STYLE,J(this.clonePosition(),this.clonePosition()));a={style:d,styleLocation:J(b,this.clonePosition())}}let b=this.tryParseArgumentClose(d);if(b.err)return b;let e=J(d,this.clonePosition());if(a&&a.style.startsWith("::")){let b=O(a.style.slice(2));if("number"===f){let d=this.parseNumberSkeletonFromString(b,a.styleLocation);if(d.err)return d;return{val:{type:k.number,value:c,location:e,style:d.val},err:null}}{let d;if(0===b.length)return this.error(v.EXPECT_DATE_TIME_SKELETON,e);let g=b;this.locale&&(g=function(a,b){let c="";for(let d=0;d<a.length;d++){let e=a.charAt(d);if("j"===e){let f=0;for(;d+1<a.length&&a.charAt(d+1)===e;)f++,d++;let g=1+(1&f),h=f<2?1:3+(f>>1),i=function(a){let b,c=a.hourCycle;if(void 0===c&&a.hourCycles&&a.hourCycles.length&&(c=a.hourCycles[0]),c)switch(c){case"h24":return"k";case"h23":return"H";case"h12":return"h";case"h11":return"K";default:throw Error("Invalid hourCycle")}let d=a.language;return"root"!==d&&(b=a.maximize().region),(G[b||""]||G[d||""]||G[`${d}-001`]||G["001"])[0]}(b);for(("H"==i||"k"==i)&&(h=0);h-- >0;)c+="a";for(;g-- >0;)c=i+c}else"J"===e?c+="H":c+=e}return c}(b,this.locale));let h={type:l.dateTime,pattern:g,location:a.styleLocation,parsedOptions:this.shouldParseSkeletons?(d={},g.replace(x,a=>{let b=a.length;switch(a[0]){case"G":d.era=4===b?"long":5===b?"narrow":"short";break;case"y":d.year=2===b?"2-digit":"numeric";break;case"Y":case"u":case"U":case"r":throw RangeError("`Y/u/U/r` (year) patterns are not supported, use `y` instead");case"q":case"Q":throw RangeError("`q/Q` (quarter) patterns are not supported");case"M":case"L":d.month=["numeric","2-digit","short","long","narrow"][b-1];break;case"w":case"W":throw RangeError("`w/W` (week) patterns are not supported");case"d":d.day=["numeric","2-digit"][b-1];break;case"D":case"F":case"g":throw RangeError("`D/F/g` (day) patterns are not supported, use `d` instead");case"E":d.weekday=4===b?"long":5===b?"narrow":"short";break;case"e":if(b<4)throw RangeError("`e..eee` (weekday) patterns are not supported");d.weekday=["short","long","narrow","short"][b-4];break;case"c":if(b<4)throw RangeError("`c..ccc` (weekday) patterns are not supported");d.weekday=["short","long","narrow","short"][b-4];break;case"a":d.hour12=!0;break;case"b":case"B":throw RangeError("`b/B` (period) patterns are not supported, use `a` instead");case"h":d.hourCycle="h12",d.hour=["numeric","2-digit"][b-1];break;case"H":d.hourCycle="h23",d.hour=["numeric","2-digit"][b-1];break;case"K":d.hourCycle="h11",d.hour=["numeric","2-digit"][b-1];break;case"k":d.hourCycle="h24",d.hour=["numeric","2-digit"][b-1];break;case"j":case"J":case"C":throw RangeError("`j/J/C` (hour) patterns are not supported, use `h/H/K/k` instead");case"m":d.minute=["numeric","2-digit"][b-1];break;case"s":d.second=["numeric","2-digit"][b-1];break;case"S":case"A":throw RangeError("`S/A` (second) patterns are not supported, use `s` instead");case"z":d.timeZoneName=b<4?"short":"long";break;case"Z":case"O":case"v":case"V":case"X":case"x":throw RangeError("`Z/O/v/V/X/x` (timeZone) patterns are not supported, use `z` instead")}return""}),d):{}};return{val:{type:"date"===f?k.date:k.time,value:c,location:e,style:h},err:null}}}return{val:{type:"number"===f?k.number:"date"===f?k.date:k.time,value:c,location:e,style:a?.style??null},err:null}}case"plural":case"selectordinal":case"select":{let e=this.clonePosition();if(this.bumpSpace(),!this.bumpIf(","))return this.error(v.EXPECT_SELECT_ARGUMENT_OPTIONS,J(e,{...e}));this.bumpSpace();let g=this.parseIdentifierIfPossible(),h=0;if("select"!==f&&"offset"===g.value){if(!this.bumpIf(":"))return this.error(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,J(this.clonePosition(),this.clonePosition()));this.bumpSpace();let a=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE,v.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);if(a.err)return a;this.bumpSpace(),g=this.parseIdentifierIfPossible(),h=a.val}let i=this.tryParsePluralOrSelectOptions(a,f,b,g);if(i.err)return i;let j=this.tryParseArgumentClose(d);if(j.err)return j;let l=J(d,this.clonePosition());if("select"===f)return{val:{type:k.select,value:c,options:N(i.val),location:l},err:null};return{val:{type:k.plural,value:c,options:N(i.val),offset:h,pluralType:"plural"===f?"cardinal":"ordinal",location:l},err:null}}default:return this.error(v.INVALID_ARGUMENT_TYPE,J(e,g))}}tryParseArgumentClose(a){return this.isEOF()||125!==this.char()?this.error(v.EXPECT_ARGUMENT_CLOSING_BRACE,J(a,this.clonePosition())):(this.bump(),{val:!0,err:null})}parseSimpleArgStyleIfPossible(){let a=0,b=this.clonePosition();for(;!this.isEOF();)switch(this.char()){case 39:{this.bump();let a=this.clonePosition();if(!this.bumpUntil("'"))return this.error(v.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE,J(a,this.clonePosition()));this.bump();break}case 123:a+=1,this.bump();break;case 125:if(!(a>0))return{val:this.message.slice(b.offset,this.offset()),err:null};a-=1;break;default:this.bump()}return{val:this.message.slice(b.offset,this.offset()),err:null}}parseNumberSkeletonFromString(a,b){let c=[];try{c=function(a){if(0===a.length)throw Error("Number skeleton cannot be empty");let b=a.split(y).filter(a=>a.length>0),c=[];for(let a of b){let b=a.split("/");if(0===b.length)throw Error("Invalid number skeleton");let[d,...e]=b;for(let a of e)if(0===a.length)throw Error("Invalid number skeleton");c.push({stem:d,options:e})}return c}(a)}catch{return this.error(v.INVALID_NUMBER_SKELETON,b)}return{val:{type:l.number,tokens:c,location:b,parsedOptions:this.shouldParseSkeletons?function(a){let b={};for(let c of a){switch(c.stem){case"percent":case"%":b.style="percent";continue;case"%x100":b.style="percent",b.scale=100;continue;case"currency":b.style="currency",b.currency=c.options[0];continue;case"group-off":case",_":b.useGrouping=!1;continue;case"precision-integer":case".":b.maximumFractionDigits=0;continue;case"measure-unit":case"unit":b.style="unit",b.unit=c.options[0].replace(/^(.*?)-/,"");continue;case"compact-short":case"K":b.notation="compact",b.compactDisplay="short";continue;case"compact-long":case"KK":b.notation="compact",b.compactDisplay="long";continue;case"scientific":b={...b,notation:"scientific",...c.options.reduce((a,b)=>({...a,...F(b)}),{})};continue;case"engineering":b={...b,notation:"engineering",...c.options.reduce((a,b)=>({...a,...F(b)}),{})};continue;case"notation-simple":b.notation="standard";continue;case"unit-width-narrow":b.currencyDisplay="narrowSymbol",b.unitDisplay="narrow";continue;case"unit-width-short":b.currencyDisplay="code",b.unitDisplay="short";continue;case"unit-width-full-name":b.currencyDisplay="name",b.unitDisplay="long";continue;case"unit-width-iso-code":b.currencyDisplay="symbol";continue;case"scale":b.scale=parseFloat(c.options[0]);continue;case"rounding-mode-floor":b.roundingMode="floor";continue;case"rounding-mode-ceiling":b.roundingMode="ceil";continue;case"rounding-mode-down":b.roundingMode="trunc";continue;case"rounding-mode-up":b.roundingMode="expand";continue;case"rounding-mode-half-even":b.roundingMode="halfEven";continue;case"rounding-mode-half-down":b.roundingMode="halfTrunc";continue;case"rounding-mode-half-up":b.roundingMode="halfExpand";continue;case"integer-width":if(c.options.length>1)throw RangeError("integer-width stems only accept a single optional option");c.options[0].replace(B,function(a,c,d,e,f,g){if(c)b.minimumIntegerDigits=d.length;else if(e&&f)throw Error("We currently do not support maximum integer digits");else if(g)throw Error("We currently do not support exact integer digits");return""});continue}if(C.test(c.stem)){b.minimumIntegerDigits=c.stem.length;continue}if(z.test(c.stem)){if(c.options.length>1)throw RangeError("Fraction-precision stems only accept a single optional option");c.stem.replace(z,function(a,c,d,e,f,g){return"*"===d?b.minimumFractionDigits=c.length:e&&"#"===e[0]?b.maximumFractionDigits=e.length:f&&g?(b.minimumFractionDigits=f.length,b.maximumFractionDigits=f.length+g.length):(b.minimumFractionDigits=c.length,b.maximumFractionDigits=c.length),""});let a=c.options[0];"w"===a?b={...b,trailingZeroDisplay:"stripIfInteger"}:a&&(b={...b,...D(a)});continue}if(A.test(c.stem)){b={...b,...D(c.stem)};continue}let a=E(c.stem);a&&(b={...b,...a});let d=function(a){let b;if("E"===a[0]&&"E"===a[1]?(b={notation:"engineering"},a=a.slice(2)):"E"===a[0]&&(b={notation:"scientific"},a=a.slice(1)),b){let c=a.slice(0,2);if("+!"===c?(b.signDisplay="always",a=a.slice(2)):"+?"===c&&(b.signDisplay="exceptZero",a=a.slice(2)),!C.test(a))throw Error("Malformed concise eng/scientific notation");b.minimumIntegerDigits=a.length}return b}(c.stem);d&&(b={...b,...d})}return b}(c):{}},err:null}}tryParsePluralOrSelectOptions(a,b,c,d){let e=!1,f=[],g=new Set,{value:h,location:i}=d;for(;;){if(0===h.length){let a=this.clonePosition();if("select"!==b&&this.bumpIf("=")){let b=this.tryParseDecimalInteger(v.EXPECT_PLURAL_ARGUMENT_SELECTOR,v.INVALID_PLURAL_ARGUMENT_SELECTOR);if(b.err)return b;i=J(a,this.clonePosition()),h=this.message.slice(a.offset,this.offset())}else break}if(g.has(h))return this.error("select"===b?v.DUPLICATE_SELECT_ARGUMENT_SELECTOR:v.DUPLICATE_PLURAL_ARGUMENT_SELECTOR,i);"other"===h&&(e=!0),this.bumpSpace();let d=this.clonePosition();if(!this.bumpIf("{"))return this.error("select"===b?v.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT:v.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT,J(this.clonePosition(),this.clonePosition()));let j=this.parseMessage(a+1,b,c);if(j.err)return j;let k=this.tryParseArgumentClose(d);if(k.err)return k;f.push([h,{value:j.val,location:J(d,this.clonePosition())}]),g.add(h),this.bumpSpace(),{value:h,location:i}=this.parseIdentifierIfPossible()}return 0===f.length?this.error("select"===b?v.EXPECT_SELECT_ARGUMENT_SELECTOR:v.EXPECT_PLURAL_ARGUMENT_SELECTOR,J(this.clonePosition(),this.clonePosition())):this.requiresOtherClause&&!e?this.error(v.MISSING_OTHER_CLAUSE,J(this.clonePosition(),this.clonePosition())):{val:f,err:null}}tryParseDecimalInteger(a,b){let c=1,d=this.clonePosition();this.bumpIf("+")||this.bumpIf("-")&&(c=-1);let e=!1,f=0;for(;!this.isEOF();){let a=this.char();if(a>=48&&a<=57)e=!0,f=10*f+(a-48),this.bump();else break}let g=J(d,this.clonePosition());return e?Number.isSafeInteger(f*=c)?{val:f,err:null}:this.error(b,g):this.error(a,g)}offset(){return this.position.offset}isEOF(){return this.offset()===this.message.length}clonePosition(){return{offset:this.position.offset,line:this.position.line,column:this.position.column}}char(){let a=this.position.offset;if(a>=this.message.length)throw Error("out of bound");let b=this.message.codePointAt(a);if(void 0===b)throw Error(`Offset ${a} is at invalid UTF-16 code unit boundary`);return b}error(a,b){return{val:null,err:{kind:a,message:this.message,location:b}}}bump(){if(this.isEOF())return;let a=this.char();10===a?(this.position.line+=1,this.position.column=1,this.position.offset+=1):(this.position.column+=1,this.position.offset+=a<65536?1:2)}bumpIf(a){if(this.message.startsWith(a,this.offset())){for(let b=0;b<a.length;b++)this.bump();return!0}return!1}bumpUntil(a){let b=this.offset(),c=this.message.indexOf(a,b);return c>=0?(this.bumpTo(c),!0):(this.bumpTo(this.message.length),!1)}bumpTo(a){if(this.offset()>a)throw Error(`targetOffset ${a} must be greater than or equal to the current offset ${this.offset()}`);for(a=Math.min(a,this.message.length);;){let b=this.offset();if(b===a)break;if(b>a)throw Error(`targetOffset ${a} is at invalid UTF-16 code unit boundary`);if(this.bump(),this.isEOF())break}}bumpSpace(){for(var a;!this.isEOF()&&((a=this.char())>=9&&a<=13||32===a||133===a||a>=8206&&a<=8207||8232===a||8233===a);)this.bump()}peek(){if(this.isEOF())return null;let a=this.char(),b=this.offset();return this.message.charCodeAt(b+(a>=65536?2:1))??null}}function S(a){return a>=97&&a<=122||a>=65&&a<=90}function T(a,b={}){let c=new R(a,b={shouldParseSkeletons:!0,requiresOtherClause:!0,...b}).parse();if(c.err){let a=SyntaxError(v[c.err.kind]);throw a.location=c.err.location,a.originalMessage=c.err.message,a}return b?.captureLocation||function a(b){b.forEach(b=>{if(delete b.location,q(b)||r(b))for(let c in b.options)delete b.options[c].location,a(b.options[c].value);else n(b)&&t(b.style)||(o(b)||p(b))&&u(b.style)?delete b.style.location:s(b)&&a(b.children)})}(c.val),c.val}let U=((g={}).MISSING_VALUE="MISSING_VALUE",g.INVALID_VALUE="INVALID_VALUE",g.MISSING_INTL_API="MISSING_INTL_API",g);class V extends Error{code;originalMessage;constructor(a,b,c){super(a),this.code=b,this.originalMessage=c}toString(){return`[formatjs Error: ${this.code}] ${this.message}`}}class W extends V{constructor(a,b,c,d){super(`Invalid values for "${a}": "${b}". Options are "${Object.keys(c).join('", "')}"`,U.INVALID_VALUE,d)}}class X extends V{constructor(a,b,c){super(`Value for "${a}" must be of type ${b}`,U.INVALID_VALUE,c)}}class Y extends V{constructor(a,b){super(`The intl string context variable "${a}" was not provided to the string "${b}"`,U.MISSING_VALUE,b)}}let Z=((h={})[h.literal=0]="literal",h[h.object=1]="object",h);function $(a){return{create:()=>({get:b=>a[b],set(b,c){a[b]=c}})}}class _{ast;locales;resolvedLocale;formatters;formats;message;formatterCache={number:{},dateTime:{},pluralRules:{}};constructor(a,b=_.defaultLocale,c,d){if(this.locales=b,this.resolvedLocale=_.resolveLocale(b),"string"==typeof a){if(this.message=a,!_.__parse)throw TypeError("IntlMessageFormat.__parse must be set to process `message` of type `string`");const{...b}=d||{};this.ast=_.__parse(a,{...b,locale:this.resolvedLocale})}else this.ast=a;if(!Array.isArray(this.ast))throw TypeError("A message must be provided as a String or AST.");this.formats=function(a,b){return b?Object.keys(a).reduce((c,d)=>{var e,f;return c[d]=(e=a[d],(f=b[d])?{...e,...f,...Object.keys(e).reduce((a,b)=>(a[b]={...e[b],...f[b]},a),{})}:e),c},{...a}):a}(_.formats,c),this.formatters=d&&d.formatters||function(a={number:{},dateTime:{},pluralRules:{}}){return{getNumberFormat:(0,j.B)((...a)=>new Intl.NumberFormat(...a),{cache:$(a.number),strategy:j.W.variadic}),getDateTimeFormat:(0,j.B)((...a)=>new Intl.DateTimeFormat(...a),{cache:$(a.dateTime),strategy:j.W.variadic}),getPluralRules:(0,j.B)((...a)=>new Intl.PluralRules(...a),{cache:$(a.pluralRules),strategy:j.W.variadic})}}(this.formatterCache)}format=a=>{let b=this.formatToParts(a);if(1===b.length)return b[0].value;let c=b.reduce((a,b)=>(a.length&&b.type===Z.literal&&"string"==typeof a[a.length-1]?a[a.length-1]+=b.value:a.push(b.value),a),[]);return c.length<=1?c[0]||"":c};formatToParts=a=>(function a(b,c,d,e,f,g,h){if(1===b.length&&m(b[0]))return[{type:Z.literal,value:b[0].value}];let i=[];for(let j of b){if(m(j)){i.push({type:Z.literal,value:j.value});continue}if(j.type===k.pound){"number"==typeof g&&i.push({type:Z.literal,value:d.getNumberFormat(c).format(g)});continue}let{value:b}=j;if(!(f&&b in f))throw new Y(b,h);let l=f[b];if(j.type===k.argument){l&&"string"!=typeof l&&"number"!=typeof l&&"bigint"!=typeof l||(l="string"==typeof l||"number"==typeof l||"bigint"==typeof l?String(l):""),i.push({type:"string"==typeof l?Z.literal:Z.object,value:l});continue}if(o(j)){let a="string"==typeof j.style?e.date[j.style]:u(j.style)?j.style.parsedOptions:void 0;i.push({type:Z.literal,value:d.getDateTimeFormat(c,a).format(l)});continue}if(p(j)){let a="string"==typeof j.style?e.time[j.style]:u(j.style)?j.style.parsedOptions:e.time.medium;i.push({type:Z.literal,value:d.getDateTimeFormat(c,a).format(l)});continue}if(n(j)){let a="string"==typeof j.style?e.number[j.style]:t(j.style)?j.style.parsedOptions:void 0;if(a&&a.scale){let b=a.scale||1;if("bigint"==typeof l){if(!Number.isInteger(b))throw TypeError(`Cannot apply fractional scale ${b} to bigint value. Scale must be an integer when formatting bigint.`);l*=BigInt(b)}else l*=b}i.push({type:Z.literal,value:d.getNumberFormat(c,a).format(l)});continue}if(s(j)){let{children:b,value:k}=j,l=f[k];if("function"!=typeof l)throw new X(k,"function",h);let m=l(a(b,c,d,e,f,g).map(a=>a.value));Array.isArray(m)||(m=[m]),i.push(...m.map(a=>({type:"string"==typeof a?Z.literal:Z.object,value:a})))}if(q(j)){let b=l,g=(Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0)||j.options.other;if(!g)throw new W(j.value,l,Object.keys(j.options),h);i.push(...a(g.value,c,d,e,f));continue}if(r(j)){let b=`=${l}`,g=Object.prototype.hasOwnProperty.call(j.options,b)?j.options[b]:void 0;if(!g){if(!Intl.PluralRules)throw new V(`Intl.PluralRules is not available in this environment.
|
|
4
4
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|