@neurouter/server 0.0.0-stage → 0.1.0
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/LICENSE +202 -0
- package/NOTICE +10 -0
- package/dist/.tsbuildinfo +1 -0
- package/dist/app.d.ts +29 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +79 -0
- package/dist/app.js.map +1 -0
- package/dist/console.d.ts +16 -0
- package/dist/console.d.ts.map +1 -0
- package/dist/console.js +149 -0
- package/dist/console.js.map +1 -0
- package/dist/controlplane/api/context.d.ts +64 -0
- package/dist/controlplane/api/context.d.ts.map +1 -0
- package/dist/controlplane/api/context.js +7 -0
- package/dist/controlplane/api/context.js.map +1 -0
- package/dist/controlplane/api/plugin.d.ts +8 -0
- package/dist/controlplane/api/plugin.d.ts.map +1 -0
- package/dist/controlplane/api/plugin.js +36 -0
- package/dist/controlplane/api/plugin.js.map +1 -0
- package/dist/controlplane/api/ports.d.ts +40 -0
- package/dist/controlplane/api/ports.d.ts.map +1 -0
- package/dist/controlplane/api/ports.js +2 -0
- package/dist/controlplane/api/ports.js.map +1 -0
- package/dist/controlplane/api/problem.d.ts +15 -0
- package/dist/controlplane/api/problem.d.ts.map +1 -0
- package/dist/controlplane/api/problem.js +80 -0
- package/dist/controlplane/api/problem.js.map +1 -0
- package/dist/controlplane/api/routes/audit.d.ts +6 -0
- package/dist/controlplane/api/routes/audit.d.ts.map +1 -0
- package/dist/controlplane/api/routes/audit.js +139 -0
- package/dist/controlplane/api/routes/audit.js.map +1 -0
- package/dist/controlplane/api/routes/auth.d.ts +10 -0
- package/dist/controlplane/api/routes/auth.d.ts.map +1 -0
- package/dist/controlplane/api/routes/auth.js +125 -0
- package/dist/controlplane/api/routes/auth.js.map +1 -0
- package/dist/controlplane/api/routes/environments.d.ts +5 -0
- package/dist/controlplane/api/routes/environments.d.ts.map +1 -0
- package/dist/controlplane/api/routes/environments.js +118 -0
- package/dist/controlplane/api/routes/environments.js.map +1 -0
- package/dist/controlplane/api/routes/evals.d.ts +5 -0
- package/dist/controlplane/api/routes/evals.d.ts.map +1 -0
- package/dist/controlplane/api/routes/evals.js +348 -0
- package/dist/controlplane/api/routes/evals.js.map +1 -0
- package/dist/controlplane/api/routes/inbox.d.ts +5 -0
- package/dist/controlplane/api/routes/inbox.d.ts.map +1 -0
- package/dist/controlplane/api/routes/inbox.js +226 -0
- package/dist/controlplane/api/routes/inbox.js.map +1 -0
- package/dist/controlplane/api/routes/keys.d.ts +5 -0
- package/dist/controlplane/api/routes/keys.d.ts.map +1 -0
- package/dist/controlplane/api/routes/keys.js +176 -0
- package/dist/controlplane/api/routes/keys.js.map +1 -0
- package/dist/controlplane/api/routes/metrics.d.ts +5 -0
- package/dist/controlplane/api/routes/metrics.d.ts.map +1 -0
- package/dist/controlplane/api/routes/metrics.js +197 -0
- package/dist/controlplane/api/routes/metrics.js.map +1 -0
- package/dist/controlplane/api/routes/overlays.d.ts +36 -0
- package/dist/controlplane/api/routes/overlays.d.ts.map +1 -0
- package/dist/controlplane/api/routes/overlays.js +244 -0
- package/dist/controlplane/api/routes/overlays.js.map +1 -0
- package/dist/controlplane/api/routes/public.d.ts +7 -0
- package/dist/controlplane/api/routes/public.d.ts.map +1 -0
- package/dist/controlplane/api/routes/public.js +71 -0
- package/dist/controlplane/api/routes/public.js.map +1 -0
- package/dist/controlplane/api/routes/servers.d.ts +45 -0
- package/dist/controlplane/api/routes/servers.d.ts.map +1 -0
- package/dist/controlplane/api/routes/servers.js +423 -0
- package/dist/controlplane/api/routes/servers.js.map +1 -0
- package/dist/controlplane/api/routes/settings.d.ts +21 -0
- package/dist/controlplane/api/routes/settings.d.ts.map +1 -0
- package/dist/controlplane/api/routes/settings.js +408 -0
- package/dist/controlplane/api/routes/settings.js.map +1 -0
- package/dist/controlplane/api/routes/tasks.d.ts +12 -0
- package/dist/controlplane/api/routes/tasks.d.ts.map +1 -0
- package/dist/controlplane/api/routes/tasks.js +144 -0
- package/dist/controlplane/api/routes/tasks.js.map +1 -0
- package/dist/controlplane/api/routes/tools.d.ts +14 -0
- package/dist/controlplane/api/routes/tools.d.ts.map +1 -0
- package/dist/controlplane/api/routes/tools.js +174 -0
- package/dist/controlplane/api/routes/tools.js.map +1 -0
- package/dist/controlplane/api/routes.d.ts +25 -0
- package/dist/controlplane/api/routes.d.ts.map +1 -0
- package/dist/controlplane/api/routes.js +43 -0
- package/dist/controlplane/api/routes.js.map +1 -0
- package/dist/controlplane/api/views.d.ts +53 -0
- package/dist/controlplane/api/views.d.ts.map +1 -0
- package/dist/controlplane/api/views.js +290 -0
- package/dist/controlplane/api/views.js.map +1 -0
- package/dist/controlplane/auth/guards.d.ts +40 -0
- package/dist/controlplane/auth/guards.d.ts.map +1 -0
- package/dist/controlplane/auth/guards.js +87 -0
- package/dist/controlplane/auth/guards.js.map +1 -0
- package/dist/controlplane/auth/local-link.d.ts +28 -0
- package/dist/controlplane/auth/local-link.d.ts.map +1 -0
- package/dist/controlplane/auth/local-link.js +41 -0
- package/dist/controlplane/auth/local-link.js.map +1 -0
- package/dist/controlplane/auth/login.d.ts +51 -0
- package/dist/controlplane/auth/login.d.ts.map +1 -0
- package/dist/controlplane/auth/login.js +115 -0
- package/dist/controlplane/auth/login.js.map +1 -0
- package/dist/controlplane/auth/oidc.d.ts +63 -0
- package/dist/controlplane/auth/oidc.d.ts.map +1 -0
- package/dist/controlplane/auth/oidc.js +76 -0
- package/dist/controlplane/auth/oidc.js.map +1 -0
- package/dist/controlplane/auth/sessions.d.ts +46 -0
- package/dist/controlplane/auth/sessions.d.ts.map +1 -0
- package/dist/controlplane/auth/sessions.js +65 -0
- package/dist/controlplane/auth/sessions.js.map +1 -0
- package/dist/controlplane/config-sync/reconcile.d.ts +88 -0
- package/dist/controlplane/config-sync/reconcile.d.ts.map +1 -0
- package/dist/controlplane/config-sync/reconcile.js +287 -0
- package/dist/controlplane/config-sync/reconcile.js.map +1 -0
- package/dist/controlplane/environments/environments.service.d.ts +46 -0
- package/dist/controlplane/environments/environments.service.d.ts.map +1 -0
- package/dist/controlplane/environments/environments.service.js +209 -0
- package/dist/controlplane/environments/environments.service.js.map +1 -0
- package/dist/controlplane/evals/evals.service.d.ts +126 -0
- package/dist/controlplane/evals/evals.service.d.ts.map +1 -0
- package/dist/controlplane/evals/evals.service.js +551 -0
- package/dist/controlplane/evals/evals.service.js.map +1 -0
- package/dist/controlplane/evals/model-keys.d.ts +37 -0
- package/dist/controlplane/evals/model-keys.d.ts.map +1 -0
- package/dist/controlplane/evals/model-keys.js +43 -0
- package/dist/controlplane/evals/model-keys.js.map +1 -0
- package/dist/controlplane/keys/api-key-format.d.ts +19 -0
- package/dist/controlplane/keys/api-key-format.d.ts.map +1 -0
- package/dist/controlplane/keys/api-key-format.js +39 -0
- package/dist/controlplane/keys/api-key-format.js.map +1 -0
- package/dist/controlplane/keys/api-keys.service.d.ts +42 -0
- package/dist/controlplane/keys/api-keys.service.d.ts.map +1 -0
- package/dist/controlplane/keys/api-keys.service.js +91 -0
- package/dist/controlplane/keys/api-keys.service.js.map +1 -0
- package/dist/controlplane/oauth/authorize.d.ts +101 -0
- package/dist/controlplane/oauth/authorize.d.ts.map +1 -0
- package/dist/controlplane/oauth/authorize.js +172 -0
- package/dist/controlplane/oauth/authorize.js.map +1 -0
- package/dist/controlplane/oauth/cimd.d.ts +52 -0
- package/dist/controlplane/oauth/cimd.d.ts.map +1 -0
- package/dist/controlplane/oauth/cimd.js +173 -0
- package/dist/controlplane/oauth/cimd.js.map +1 -0
- package/dist/controlplane/oauth/clients.service.d.ts +101 -0
- package/dist/controlplane/oauth/clients.service.d.ts.map +1 -0
- package/dist/controlplane/oauth/clients.service.js +269 -0
- package/dist/controlplane/oauth/clients.service.js.map +1 -0
- package/dist/controlplane/oauth/metadata.d.ts +27 -0
- package/dist/controlplane/oauth/metadata.d.ts.map +1 -0
- package/dist/controlplane/oauth/metadata.js +35 -0
- package/dist/controlplane/oauth/metadata.js.map +1 -0
- package/dist/controlplane/oauth/pkce.d.ts +8 -0
- package/dist/controlplane/oauth/pkce.d.ts.map +1 -0
- package/dist/controlplane/oauth/pkce.js +16 -0
- package/dist/controlplane/oauth/pkce.js.map +1 -0
- package/dist/controlplane/oauth/redirect-uri.d.ts +15 -0
- package/dist/controlplane/oauth/redirect-uri.d.ts.map +1 -0
- package/dist/controlplane/oauth/redirect-uri.js +61 -0
- package/dist/controlplane/oauth/redirect-uri.js.map +1 -0
- package/dist/controlplane/oauth/resource.d.ts +28 -0
- package/dist/controlplane/oauth/resource.d.ts.map +1 -0
- package/dist/controlplane/oauth/resource.js +49 -0
- package/dist/controlplane/oauth/resource.js.map +1 -0
- package/dist/controlplane/oauth/routes.d.ts +28 -0
- package/dist/controlplane/oauth/routes.d.ts.map +1 -0
- package/dist/controlplane/oauth/routes.js +191 -0
- package/dist/controlplane/oauth/routes.js.map +1 -0
- package/dist/controlplane/oauth/session.d.ts +36 -0
- package/dist/controlplane/oauth/session.d.ts.map +1 -0
- package/dist/controlplane/oauth/session.js +38 -0
- package/dist/controlplane/oauth/session.js.map +1 -0
- package/dist/controlplane/oauth/tokens.service.d.ts +105 -0
- package/dist/controlplane/oauth/tokens.service.d.ts.map +1 -0
- package/dist/controlplane/oauth/tokens.service.js +209 -0
- package/dist/controlplane/oauth/tokens.service.js.map +1 -0
- package/dist/controlplane/servers/builds.service.d.ts +54 -0
- package/dist/controlplane/servers/builds.service.d.ts.map +1 -0
- package/dist/controlplane/servers/builds.service.js +173 -0
- package/dist/controlplane/servers/builds.service.js.map +1 -0
- package/dist/controlplane/servers/fetch-spec.d.ts +13 -0
- package/dist/controlplane/servers/fetch-spec.d.ts.map +1 -0
- package/dist/controlplane/servers/fetch-spec.js +30 -0
- package/dist/controlplane/servers/fetch-spec.js.map +1 -0
- package/dist/controlplane/servers/servers.service.d.ts +87 -0
- package/dist/controlplane/servers/servers.service.d.ts.map +1 -0
- package/dist/controlplane/servers/servers.service.js +168 -0
- package/dist/controlplane/servers/servers.service.js.map +1 -0
- package/dist/controlplane/traces/traces.service.d.ts +38 -0
- package/dist/controlplane/traces/traces.service.d.ts.map +1 -0
- package/dist/controlplane/traces/traces.service.js +189 -0
- package/dist/controlplane/traces/traces.service.js.map +1 -0
- package/dist/controlplane/upstream-oauth/upstream-oauth.service.d.ts +70 -0
- package/dist/controlplane/upstream-oauth/upstream-oauth.service.d.ts.map +1 -0
- package/dist/controlplane/upstream-oauth/upstream-oauth.service.js +208 -0
- package/dist/controlplane/upstream-oauth/upstream-oauth.service.js.map +1 -0
- package/dist/controlplane/users/users.service.d.ts +33 -0
- package/dist/controlplane/users/users.service.d.ts.map +1 -0
- package/dist/controlplane/users/users.service.js +68 -0
- package/dist/controlplane/users/users.service.js.map +1 -0
- package/dist/dataplane/auth/authenticate.d.ts +58 -0
- package/dist/dataplane/auth/authenticate.d.ts.map +1 -0
- package/dist/dataplane/auth/authenticate.js +152 -0
- package/dist/dataplane/auth/authenticate.js.map +1 -0
- package/dist/dataplane/auth/external-jwt.d.ts +30 -0
- package/dist/dataplane/auth/external-jwt.d.ts.map +1 -0
- package/dist/dataplane/auth/external-jwt.js +78 -0
- package/dist/dataplane/auth/external-jwt.js.map +1 -0
- package/dist/dataplane/code/executor-health.d.ts +24 -0
- package/dist/dataplane/code/executor-health.d.ts.map +1 -0
- package/dist/dataplane/code/executor-health.js +49 -0
- package/dist/dataplane/code/executor-health.js.map +1 -0
- package/dist/dataplane/code/run-script.d.ts +90 -0
- package/dist/dataplane/code/run-script.d.ts.map +1 -0
- package/dist/dataplane/code/run-script.js +320 -0
- package/dist/dataplane/code/run-script.js.map +1 -0
- package/dist/dataplane/code/tokenize.d.ts +44 -0
- package/dist/dataplane/code/tokenize.d.ts.map +1 -0
- package/dist/dataplane/code/tokenize.js +267 -0
- package/dist/dataplane/code/tokenize.js.map +1 -0
- package/dist/dataplane/code/validate.d.ts +30 -0
- package/dist/dataplane/code/validate.d.ts.map +1 -0
- package/dist/dataplane/code/validate.js +94 -0
- package/dist/dataplane/code/validate.js.map +1 -0
- package/dist/dataplane/code/wrap.d.ts +20 -0
- package/dist/dataplane/code/wrap.d.ts.map +1 -0
- package/dist/dataplane/code/wrap.js +108 -0
- package/dist/dataplane/code/wrap.js.map +1 -0
- package/dist/dataplane/http/circuit-breaker.d.ts +23 -0
- package/dist/dataplane/http/circuit-breaker.d.ts.map +1 -0
- package/dist/dataplane/http/circuit-breaker.js +53 -0
- package/dist/dataplane/http/circuit-breaker.js.map +1 -0
- package/dist/dataplane/http/credentials.d.ts +59 -0
- package/dist/dataplane/http/credentials.d.ts.map +1 -0
- package/dist/dataplane/http/credentials.js +93 -0
- package/dist/dataplane/http/credentials.js.map +1 -0
- package/dist/dataplane/http/errors.d.ts +16 -0
- package/dist/dataplane/http/errors.d.ts.map +1 -0
- package/dist/dataplane/http/errors.js +32 -0
- package/dist/dataplane/http/errors.js.map +1 -0
- package/dist/dataplane/http/invoker.d.ts +56 -0
- package/dist/dataplane/http/invoker.d.ts.map +1 -0
- package/dist/dataplane/http/invoker.js +114 -0
- package/dist/dataplane/http/invoker.js.map +1 -0
- package/dist/dataplane/http/request-builder.d.ts +39 -0
- package/dist/dataplane/http/request-builder.d.ts.map +1 -0
- package/dist/dataplane/http/request-builder.js +162 -0
- package/dist/dataplane/http/request-builder.js.map +1 -0
- package/dist/dataplane/mcp/challenge.d.ts +14 -0
- package/dist/dataplane/mcp/challenge.d.ts.map +1 -0
- package/dist/dataplane/mcp/challenge.js +25 -0
- package/dist/dataplane/mcp/challenge.js.map +1 -0
- package/dist/dataplane/mcp/dispatch.d.ts +64 -0
- package/dist/dataplane/mcp/dispatch.d.ts.map +1 -0
- package/dist/dataplane/mcp/dispatch.js +165 -0
- package/dist/dataplane/mcp/dispatch.js.map +1 -0
- package/dist/dataplane/mcp/event-bus.d.ts +19 -0
- package/dist/dataplane/mcp/event-bus.d.ts.map +1 -0
- package/dist/dataplane/mcp/event-bus.js +39 -0
- package/dist/dataplane/mcp/event-bus.js.map +1 -0
- package/dist/dataplane/mcp/inflight.d.ts +66 -0
- package/dist/dataplane/mcp/inflight.d.ts.map +1 -0
- package/dist/dataplane/mcp/inflight.js +135 -0
- package/dist/dataplane/mcp/inflight.js.map +1 -0
- package/dist/dataplane/mcp/origin.d.ts +7 -0
- package/dist/dataplane/mcp/origin.d.ts.map +1 -0
- package/dist/dataplane/mcp/origin.js +27 -0
- package/dist/dataplane/mcp/origin.js.map +1 -0
- package/dist/dataplane/mcp/route.d.ts +43 -0
- package/dist/dataplane/mcp/route.d.ts.map +1 -0
- package/dist/dataplane/mcp/route.js +280 -0
- package/dist/dataplane/mcp/route.js.map +1 -0
- package/dist/dataplane/mcp/surface.d.ts +43 -0
- package/dist/dataplane/mcp/surface.d.ts.map +1 -0
- package/dist/dataplane/mcp/surface.js +133 -0
- package/dist/dataplane/mcp/surface.js.map +1 -0
- package/dist/dataplane/mcp/translate.d.ts +16 -0
- package/dist/dataplane/mcp/translate.d.ts.map +1 -0
- package/dist/dataplane/mcp/translate.js +33 -0
- package/dist/dataplane/mcp/translate.js.map +1 -0
- package/dist/dataplane/mock/mock-upstream.d.ts +23 -0
- package/dist/dataplane/mock/mock-upstream.d.ts.map +1 -0
- package/dist/dataplane/mock/mock-upstream.js +26 -0
- package/dist/dataplane/mock/mock-upstream.js.map +1 -0
- package/dist/dataplane/ops/ops.d.ts +66 -0
- package/dist/dataplane/ops/ops.d.ts.map +1 -0
- package/dist/dataplane/ops/ops.js +315 -0
- package/dist/dataplane/ops/ops.js.map +1 -0
- package/dist/dataplane/pipeline/arg-validate.d.ts +19 -0
- package/dist/dataplane/pipeline/arg-validate.d.ts.map +1 -0
- package/dist/dataplane/pipeline/arg-validate.js +61 -0
- package/dist/dataplane/pipeline/arg-validate.js.map +1 -0
- package/dist/dataplane/pipeline/context.d.ts +78 -0
- package/dist/dataplane/pipeline/context.d.ts.map +1 -0
- package/dist/dataplane/pipeline/context.js +13 -0
- package/dist/dataplane/pipeline/context.js.map +1 -0
- package/dist/dataplane/pipeline/errors.d.ts +53 -0
- package/dist/dataplane/pipeline/errors.d.ts.map +1 -0
- package/dist/dataplane/pipeline/errors.js +61 -0
- package/dist/dataplane/pipeline/errors.js.map +1 -0
- package/dist/dataplane/pipeline/pipeline.d.ts +128 -0
- package/dist/dataplane/pipeline/pipeline.d.ts.map +1 -0
- package/dist/dataplane/pipeline/pipeline.js +443 -0
- package/dist/dataplane/pipeline/pipeline.js.map +1 -0
- package/dist/dataplane/pipeline/policy.d.ts +24 -0
- package/dist/dataplane/pipeline/policy.d.ts.map +1 -0
- package/dist/dataplane/pipeline/policy.js +93 -0
- package/dist/dataplane/pipeline/policy.js.map +1 -0
- package/dist/dataplane/rate-limit/limiter.d.ts +42 -0
- package/dist/dataplane/rate-limit/limiter.d.ts.map +1 -0
- package/dist/dataplane/rate-limit/limiter.js +34 -0
- package/dist/dataplane/rate-limit/limiter.js.map +1 -0
- package/dist/dataplane/rate-limit/stores.d.ts +56 -0
- package/dist/dataplane/rate-limit/stores.d.ts.map +1 -0
- package/dist/dataplane/rate-limit/stores.js +95 -0
- package/dist/dataplane/rate-limit/stores.js.map +1 -0
- package/dist/dataplane/rate-limit/token-bucket.d.ts +19 -0
- package/dist/dataplane/rate-limit/token-bucket.d.ts.map +1 -0
- package/dist/dataplane/rate-limit/token-bucket.js +16 -0
- package/dist/dataplane/rate-limit/token-bucket.js.map +1 -0
- package/dist/dataplane/search/document.d.ts +22 -0
- package/dist/dataplane/search/document.d.ts.map +1 -0
- package/dist/dataplane/search/document.js +45 -0
- package/dist/dataplane/search/document.js.map +1 -0
- package/dist/dataplane/search/embed-worker.d.ts +2 -0
- package/dist/dataplane/search/embed-worker.d.ts.map +1 -0
- package/dist/dataplane/search/embed-worker.js +55 -0
- package/dist/dataplane/search/embed-worker.js.map +1 -0
- package/dist/dataplane/search/embedder.d.ts +113 -0
- package/dist/dataplane/search/embedder.d.ts.map +1 -0
- package/dist/dataplane/search/embedder.js +216 -0
- package/dist/dataplane/search/embedder.js.map +1 -0
- package/dist/dataplane/search/hybrid.d.ts +28 -0
- package/dist/dataplane/search/hybrid.d.ts.map +1 -0
- package/dist/dataplane/search/hybrid.js +45 -0
- package/dist/dataplane/search/hybrid.js.map +1 -0
- package/dist/dataplane/search/indexer.d.ts +62 -0
- package/dist/dataplane/search/indexer.d.ts.map +1 -0
- package/dist/dataplane/search/indexer.js +105 -0
- package/dist/dataplane/search/indexer.js.map +1 -0
- package/dist/dataplane/search/keyword-index.d.ts +26 -0
- package/dist/dataplane/search/keyword-index.d.ts.map +1 -0
- package/dist/dataplane/search/keyword-index.js +60 -0
- package/dist/dataplane/search/keyword-index.js.map +1 -0
- package/dist/dataplane/search/model-profiles.d.ts +12 -0
- package/dist/dataplane/search/model-profiles.d.ts.map +1 -0
- package/dist/dataplane/search/model-profiles.js +12 -0
- package/dist/dataplane/search/model-profiles.js.map +1 -0
- package/dist/dataplane/search/search.service.d.ts +39 -0
- package/dist/dataplane/search/search.service.d.ts.map +1 -0
- package/dist/dataplane/search/search.service.js +69 -0
- package/dist/dataplane/search/search.service.js.map +1 -0
- package/dist/dataplane/search/suggest.d.ts +15 -0
- package/dist/dataplane/search/suggest.d.ts.map +1 -0
- package/dist/dataplane/search/suggest.js +76 -0
- package/dist/dataplane/search/suggest.js.map +1 -0
- package/dist/dataplane/search/vector-index.d.ts +49 -0
- package/dist/dataplane/search/vector-index.d.ts.map +1 -0
- package/dist/dataplane/search/vector-index.js +72 -0
- package/dist/dataplane/search/vector-index.js.map +1 -0
- package/dist/dataplane/shaping/result-pages.d.ts +19 -0
- package/dist/dataplane/shaping/result-pages.d.ts.map +1 -0
- package/dist/dataplane/shaping/result-pages.js +37 -0
- package/dist/dataplane/shaping/result-pages.js.map +1 -0
- package/dist/dataplane/shaping/sanitize.d.ts +6 -0
- package/dist/dataplane/shaping/sanitize.d.ts.map +1 -0
- package/dist/dataplane/shaping/sanitize.js +31 -0
- package/dist/dataplane/shaping/sanitize.js.map +1 -0
- package/dist/dataplane/tasks/tracker.d.ts +60 -0
- package/dist/dataplane/tasks/tracker.d.ts.map +1 -0
- package/dist/dataplane/tasks/tracker.js +178 -0
- package/dist/dataplane/tasks/tracker.js.map +1 -0
- package/dist/dataplane/tasks/usage.d.ts +8 -0
- package/dist/dataplane/tasks/usage.d.ts.map +1 -0
- package/dist/dataplane/tasks/usage.js +35 -0
- package/dist/dataplane/tasks/usage.js.map +1 -0
- package/dist/deps.d.ts +133 -0
- package/dist/deps.d.ts.map +1 -0
- package/dist/deps.js +356 -0
- package/dist/deps.js.map +1 -0
- package/dist/health/routes.d.ts +22 -0
- package/dist/health/routes.d.ts.map +1 -0
- package/dist/health/routes.js +40 -0
- package/dist/health/routes.js.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +8 -0
- package/dist/index.js.map +1 -0
- package/dist/instrumentation.d.ts +10 -0
- package/dist/instrumentation.d.ts.map +1 -0
- package/dist/instrumentation.js +72 -0
- package/dist/instrumentation.js.map +1 -0
- package/dist/jobs.d.ts +5 -0
- package/dist/jobs.d.ts.map +1 -0
- package/dist/jobs.js +96 -0
- package/dist/jobs.js.map +1 -0
- package/dist/kernel/audit/archive/azure.d.ts +42 -0
- package/dist/kernel/audit/archive/azure.d.ts.map +1 -0
- package/dist/kernel/audit/archive/azure.js +80 -0
- package/dist/kernel/audit/archive/azure.js.map +1 -0
- package/dist/kernel/audit/archive/gcs.d.ts +27 -0
- package/dist/kernel/audit/archive/gcs.d.ts.map +1 -0
- package/dist/kernel/audit/archive/gcs.js +42 -0
- package/dist/kernel/audit/archive/gcs.js.map +1 -0
- package/dist/kernel/audit/archive/index.d.ts +20 -0
- package/dist/kernel/audit/archive/index.d.ts.map +1 -0
- package/dist/kernel/audit/archive/index.js +90 -0
- package/dist/kernel/audit/archive/index.js.map +1 -0
- package/dist/kernel/audit/archive/local-fs.d.ts +10 -0
- package/dist/kernel/audit/archive/local-fs.d.ts.map +1 -0
- package/dist/kernel/audit/archive/local-fs.js +24 -0
- package/dist/kernel/audit/archive/local-fs.js.map +1 -0
- package/dist/kernel/audit/archive/s3.d.ts +49 -0
- package/dist/kernel/audit/archive/s3.d.ts.map +1 -0
- package/dist/kernel/audit/archive/s3.js +85 -0
- package/dist/kernel/audit/archive/s3.js.map +1 -0
- package/dist/kernel/audit/archive/store.d.ts +34 -0
- package/dist/kernel/audit/archive/store.d.ts.map +1 -0
- package/dist/kernel/audit/archive/store.js +27 -0
- package/dist/kernel/audit/archive/store.js.map +1 -0
- package/dist/kernel/audit/chain.d.ts +33 -0
- package/dist/kernel/audit/chain.d.ts.map +1 -0
- package/dist/kernel/audit/chain.js +64 -0
- package/dist/kernel/audit/chain.js.map +1 -0
- package/dist/kernel/audit/checkpoints.d.ts +30 -0
- package/dist/kernel/audit/checkpoints.d.ts.map +1 -0
- package/dist/kernel/audit/checkpoints.js +33 -0
- package/dist/kernel/audit/checkpoints.js.map +1 -0
- package/dist/kernel/audit/export.d.ts +14 -0
- package/dist/kernel/audit/export.d.ts.map +1 -0
- package/dist/kernel/audit/export.js +88 -0
- package/dist/kernel/audit/export.js.map +1 -0
- package/dist/kernel/audit/partitions.d.ts +29 -0
- package/dist/kernel/audit/partitions.d.ts.map +1 -0
- package/dist/kernel/audit/partitions.js +58 -0
- package/dist/kernel/audit/partitions.js.map +1 -0
- package/dist/kernel/audit/query.d.ts +28 -0
- package/dist/kernel/audit/query.d.ts.map +1 -0
- package/dist/kernel/audit/query.js +114 -0
- package/dist/kernel/audit/query.js.map +1 -0
- package/dist/kernel/audit/recorder.d.ts +53 -0
- package/dist/kernel/audit/recorder.d.ts.map +1 -0
- package/dist/kernel/audit/recorder.js +71 -0
- package/dist/kernel/audit/recorder.js.map +1 -0
- package/dist/kernel/audit/redact.d.ts +69 -0
- package/dist/kernel/audit/redact.d.ts.map +1 -0
- package/dist/kernel/audit/redact.js +202 -0
- package/dist/kernel/audit/redact.js.map +1 -0
- package/dist/kernel/audit/redaction-rules.service.d.ts +34 -0
- package/dist/kernel/audit/redaction-rules.service.d.ts.map +1 -0
- package/dist/kernel/audit/redaction-rules.service.js +53 -0
- package/dist/kernel/audit/redaction-rules.service.js.map +1 -0
- package/dist/kernel/audit/retention.d.ts +54 -0
- package/dist/kernel/audit/retention.d.ts.map +1 -0
- package/dist/kernel/audit/retention.js +119 -0
- package/dist/kernel/audit/retention.js.map +1 -0
- package/dist/kernel/audit/sinks/dispatcher.d.ts +38 -0
- package/dist/kernel/audit/sinks/dispatcher.d.ts.map +1 -0
- package/dist/kernel/audit/sinks/dispatcher.js +68 -0
- package/dist/kernel/audit/sinks/dispatcher.js.map +1 -0
- package/dist/kernel/audit/sinks/otel-logs.d.ts +25 -0
- package/dist/kernel/audit/sinks/otel-logs.d.ts.map +1 -0
- package/dist/kernel/audit/sinks/otel-logs.js +51 -0
- package/dist/kernel/audit/sinks/otel-logs.js.map +1 -0
- package/dist/kernel/audit/sinks/sink.d.ts +14 -0
- package/dist/kernel/audit/sinks/sink.d.ts.map +1 -0
- package/dist/kernel/audit/sinks/sink.js +9 -0
- package/dist/kernel/audit/sinks/sink.js.map +1 -0
- package/dist/kernel/audit/sinks/webhook.d.ts +29 -0
- package/dist/kernel/audit/sinks/webhook.d.ts.map +1 -0
- package/dist/kernel/audit/sinks/webhook.js +49 -0
- package/dist/kernel/audit/sinks/webhook.js.map +1 -0
- package/dist/kernel/audit/store.d.ts +158 -0
- package/dist/kernel/audit/store.d.ts.map +1 -0
- package/dist/kernel/audit/store.js +155 -0
- package/dist/kernel/audit/store.js.map +1 -0
- package/dist/kernel/audit/types.d.ts +136 -0
- package/dist/kernel/audit/types.d.ts.map +1 -0
- package/dist/kernel/audit/types.js +2 -0
- package/dist/kernel/audit/types.js.map +1 -0
- package/dist/kernel/audit/verify.d.ts +22 -0
- package/dist/kernel/audit/verify.d.ts.map +1 -0
- package/dist/kernel/audit/verify.js +96 -0
- package/dist/kernel/audit/verify.js.map +1 -0
- package/dist/kernel/audit/writer.d.ts +85 -0
- package/dist/kernel/audit/writer.d.ts.map +1 -0
- package/dist/kernel/audit/writer.js +255 -0
- package/dist/kernel/audit/writer.js.map +1 -0
- package/dist/kernel/config/env.d.ts +119 -0
- package/dist/kernel/config/env.d.ts.map +1 -0
- package/dist/kernel/config/env.js +173 -0
- package/dist/kernel/config/env.js.map +1 -0
- package/dist/kernel/config/load.d.ts +51 -0
- package/dist/kernel/config/load.d.ts.map +1 -0
- package/dist/kernel/config/load.js +102 -0
- package/dist/kernel/config/load.js.map +1 -0
- package/dist/kernel/coordination/memory.d.ts +20 -0
- package/dist/kernel/coordination/memory.d.ts.map +1 -0
- package/dist/kernel/coordination/memory.js +92 -0
- package/dist/kernel/coordination/memory.js.map +1 -0
- package/dist/kernel/coordination/postgres.d.ts +47 -0
- package/dist/kernel/coordination/postgres.d.ts.map +1 -0
- package/dist/kernel/coordination/postgres.js +111 -0
- package/dist/kernel/coordination/postgres.js.map +1 -0
- package/dist/kernel/coordination/types.d.ts +37 -0
- package/dist/kernel/coordination/types.d.ts.map +1 -0
- package/dist/kernel/coordination/types.js +2 -0
- package/dist/kernel/coordination/types.js.map +1 -0
- package/dist/kernel/coordination/wait.d.ts +4 -0
- package/dist/kernel/coordination/wait.d.ts.map +1 -0
- package/dist/kernel/coordination/wait.js +38 -0
- package/dist/kernel/coordination/wait.js.map +1 -0
- package/dist/kernel/db/columns.d.ts +25 -0
- package/dist/kernel/db/columns.d.ts.map +1 -0
- package/dist/kernel/db/columns.js +32 -0
- package/dist/kernel/db/columns.js.map +1 -0
- package/dist/kernel/db/empty-in-plugin.d.ts +7 -0
- package/dist/kernel/db/empty-in-plugin.d.ts.map +1 -0
- package/dist/kernel/db/empty-in-plugin.js +28 -0
- package/dist/kernel/db/empty-in-plugin.js.map +1 -0
- package/dist/kernel/db/index.d.ts +67 -0
- package/dist/kernel/db/index.d.ts.map +1 -0
- package/dist/kernel/db/index.js +72 -0
- package/dist/kernel/db/index.js.map +1 -0
- package/dist/kernel/db/migrations/audit/0006_audit.d.ts +7 -0
- package/dist/kernel/db/migrations/audit/0006_audit.d.ts.map +1 -0
- package/dist/kernel/db/migrations/audit/0006_audit.js +125 -0
- package/dist/kernel/db/migrations/audit/0006_audit.js.map +1 -0
- package/dist/kernel/db/migrations/audit/0007_metrics.d.ts +6 -0
- package/dist/kernel/db/migrations/audit/0007_metrics.d.ts.map +1 -0
- package/dist/kernel/db/migrations/audit/0007_metrics.js +38 -0
- package/dist/kernel/db/migrations/audit/0007_metrics.js.map +1 -0
- package/dist/kernel/db/migrations/index.d.ts +10 -0
- package/dist/kernel/db/migrations/index.d.ts.map +1 -0
- package/dist/kernel/db/migrations/index.js +15 -0
- package/dist/kernel/db/migrations/index.js.map +1 -0
- package/dist/kernel/db/migrations/main/0001_core.d.ts +4 -0
- package/dist/kernel/db/migrations/main/0001_core.d.ts.map +1 -0
- package/dist/kernel/db/migrations/main/0001_core.js +178 -0
- package/dist/kernel/db/migrations/main/0001_core.js.map +1 -0
- package/dist/kernel/db/migrations/main/0002_servers.d.ts +4 -0
- package/dist/kernel/db/migrations/main/0002_servers.d.ts.map +1 -0
- package/dist/kernel/db/migrations/main/0002_servers.js +240 -0
- package/dist/kernel/db/migrations/main/0002_servers.js.map +1 -0
- package/dist/kernel/db/migrations/main/0003_auth.d.ts +4 -0
- package/dist/kernel/db/migrations/main/0003_auth.d.ts.map +1 -0
- package/dist/kernel/db/migrations/main/0003_auth.js +125 -0
- package/dist/kernel/db/migrations/main/0003_auth.js.map +1 -0
- package/dist/kernel/db/migrations/main/0004_ops.d.ts +4 -0
- package/dist/kernel/db/migrations/main/0004_ops.d.ts.map +1 -0
- package/dist/kernel/db/migrations/main/0004_ops.js +196 -0
- package/dist/kernel/db/migrations/main/0004_ops.js.map +1 -0
- package/dist/kernel/db/migrations/main/0005_evals.d.ts +4 -0
- package/dist/kernel/db/migrations/main/0005_evals.d.ts.map +1 -0
- package/dist/kernel/db/migrations/main/0005_evals.js +117 -0
- package/dist/kernel/db/migrations/main/0005_evals.js.map +1 -0
- package/dist/kernel/db/migrations/types.d.ts +17 -0
- package/dist/kernel/db/migrations/types.d.ts.map +1 -0
- package/dist/kernel/db/migrations/types.js +7 -0
- package/dist/kernel/db/migrations/types.js.map +1 -0
- package/dist/kernel/db/migrator.d.ts +29 -0
- package/dist/kernel/db/migrator.d.ts.map +1 -0
- package/dist/kernel/db/migrator.js +64 -0
- package/dist/kernel/db/migrator.js.map +1 -0
- package/dist/kernel/db/postgres.d.ts +35 -0
- package/dist/kernel/db/postgres.d.ts.map +1 -0
- package/dist/kernel/db/postgres.js +44 -0
- package/dist/kernel/db/postgres.js.map +1 -0
- package/dist/kernel/db/schema.d.ts +936 -0
- package/dist/kernel/db/schema.d.ts.map +1 -0
- package/dist/kernel/db/schema.js +61 -0
- package/dist/kernel/db/schema.js.map +1 -0
- package/dist/kernel/db/sqlite.d.ts +20 -0
- package/dist/kernel/db/sqlite.d.ts.map +1 -0
- package/dist/kernel/db/sqlite.js +31 -0
- package/dist/kernel/db/sqlite.js.map +1 -0
- package/dist/kernel/db/tools-fts.d.ts +11 -0
- package/dist/kernel/db/tools-fts.d.ts.map +1 -0
- package/dist/kernel/db/tools-fts.js +17 -0
- package/dist/kernel/db/tools-fts.js.map +1 -0
- package/dist/kernel/db/url.d.ts +17 -0
- package/dist/kernel/db/url.d.ts.map +1 -0
- package/dist/kernel/db/url.js +30 -0
- package/dist/kernel/db/url.js.map +1 -0
- package/dist/kernel/jobs/jobs.service.d.ts +24 -0
- package/dist/kernel/jobs/jobs.service.d.ts.map +1 -0
- package/dist/kernel/jobs/jobs.service.js +65 -0
- package/dist/kernel/jobs/jobs.service.js.map +1 -0
- package/dist/kernel/jobs/scheduler.d.ts +34 -0
- package/dist/kernel/jobs/scheduler.d.ts.map +1 -0
- package/dist/kernel/jobs/scheduler.js +70 -0
- package/dist/kernel/jobs/scheduler.js.map +1 -0
- package/dist/kernel/lib/clock.d.ts +11 -0
- package/dist/kernel/lib/clock.d.ts.map +1 -0
- package/dist/kernel/lib/clock.js +15 -0
- package/dist/kernel/lib/clock.js.map +1 -0
- package/dist/kernel/lib/crypto.d.ts +12 -0
- package/dist/kernel/lib/crypto.d.ts.map +1 -0
- package/dist/kernel/lib/crypto.js +48 -0
- package/dist/kernel/lib/crypto.js.map +1 -0
- package/dist/kernel/lib/errors.d.ts +29 -0
- package/dist/kernel/lib/errors.d.ts.map +1 -0
- package/dist/kernel/lib/errors.js +40 -0
- package/dist/kernel/lib/errors.js.map +1 -0
- package/dist/kernel/lib/histogram.d.ts +28 -0
- package/dist/kernel/lib/histogram.d.ts.map +1 -0
- package/dist/kernel/lib/histogram.js +70 -0
- package/dist/kernel/lib/histogram.js.map +1 -0
- package/dist/kernel/lib/ids.d.ts +3 -0
- package/dist/kernel/lib/ids.d.ts.map +1 -0
- package/dist/kernel/lib/ids.js +6 -0
- package/dist/kernel/lib/ids.js.map +1 -0
- package/dist/kernel/lib/jcs.d.ts +5 -0
- package/dist/kernel/lib/jcs.d.ts.map +1 -0
- package/dist/kernel/lib/jcs.js +14 -0
- package/dist/kernel/lib/jcs.js.map +1 -0
- package/dist/kernel/lib/json.d.ts +9 -0
- package/dist/kernel/lib/json.d.ts.map +1 -0
- package/dist/kernel/lib/json.js +21 -0
- package/dist/kernel/lib/json.js.map +1 -0
- package/dist/kernel/lib/keyset.d.ts +25 -0
- package/dist/kernel/lib/keyset.d.ts.map +1 -0
- package/dist/kernel/lib/keyset.js +36 -0
- package/dist/kernel/lib/keyset.js.map +1 -0
- package/dist/kernel/lib/logger.d.ts +12 -0
- package/dist/kernel/lib/logger.d.ts.map +1 -0
- package/dist/kernel/lib/logger.js +41 -0
- package/dist/kernel/lib/logger.js.map +1 -0
- package/dist/kernel/lib/net/safe-fetch.d.ts +36 -0
- package/dist/kernel/lib/net/safe-fetch.d.ts.map +1 -0
- package/dist/kernel/lib/net/safe-fetch.js +106 -0
- package/dist/kernel/lib/net/safe-fetch.js.map +1 -0
- package/dist/kernel/lib/net/ssrf-guard.d.ts +30 -0
- package/dist/kernel/lib/net/ssrf-guard.d.ts.map +1 -0
- package/dist/kernel/lib/net/ssrf-guard.js +78 -0
- package/dist/kernel/lib/net/ssrf-guard.js.map +1 -0
- package/dist/kernel/lib/pagination.d.ts +14 -0
- package/dist/kernel/lib/pagination.d.ts.map +1 -0
- package/dist/kernel/lib/pagination.js +40 -0
- package/dist/kernel/lib/pagination.js.map +1 -0
- package/dist/kernel/observability/metrics.d.ts +53 -0
- package/dist/kernel/observability/metrics.d.ts.map +1 -0
- package/dist/kernel/observability/metrics.js +95 -0
- package/dist/kernel/observability/metrics.js.map +1 -0
- package/dist/kernel/observability/tracing.d.ts +32 -0
- package/dist/kernel/observability/tracing.d.ts.map +1 -0
- package/dist/kernel/observability/tracing.js +116 -0
- package/dist/kernel/observability/tracing.js.map +1 -0
- package/dist/kernel/principal.d.ts +16 -0
- package/dist/kernel/principal.d.ts.map +1 -0
- package/dist/kernel/principal.js +9 -0
- package/dist/kernel/principal.js.map +1 -0
- package/dist/kernel/runtime-config.d.ts +194 -0
- package/dist/kernel/runtime-config.d.ts.map +1 -0
- package/dist/kernel/runtime-config.js +192 -0
- package/dist/kernel/runtime-config.js.map +1 -0
- package/dist/kernel/secrets/builtin.provider.d.ts +26 -0
- package/dist/kernel/secrets/builtin.provider.d.ts.map +1 -0
- package/dist/kernel/secrets/builtin.provider.js +65 -0
- package/dist/kernel/secrets/builtin.provider.js.map +1 -0
- package/dist/kernel/secrets/envelope.d.ts +16 -0
- package/dist/kernel/secrets/envelope.d.ts.map +1 -0
- package/dist/kernel/secrets/envelope.js +44 -0
- package/dist/kernel/secrets/envelope.js.map +1 -0
- package/dist/kernel/secrets/envelope.service.d.ts +38 -0
- package/dist/kernel/secrets/envelope.service.d.ts.map +1 -0
- package/dist/kernel/secrets/envelope.service.js +86 -0
- package/dist/kernel/secrets/envelope.service.js.map +1 -0
- package/dist/kernel/secrets/keyring.d.ts +30 -0
- package/dist/kernel/secrets/keyring.d.ts.map +1 -0
- package/dist/kernel/secrets/keyring.js +32 -0
- package/dist/kernel/secrets/keyring.js.map +1 -0
- package/dist/kernel/secrets/named-secrets.d.ts +33 -0
- package/dist/kernel/secrets/named-secrets.d.ts.map +1 -0
- package/dist/kernel/secrets/named-secrets.js +63 -0
- package/dist/kernel/secrets/named-secrets.js.map +1 -0
- package/dist/kernel/secrets/provider.d.ts +17 -0
- package/dist/kernel/secrets/provider.d.ts.map +1 -0
- package/dist/kernel/secrets/provider.js +2 -0
- package/dist/kernel/secrets/provider.js.map +1 -0
- package/dist/kernel/secrets/rotation.d.ts +25 -0
- package/dist/kernel/secrets/rotation.d.ts.map +1 -0
- package/dist/kernel/secrets/rotation.js +32 -0
- package/dist/kernel/secrets/rotation.js.map +1 -0
- package/dist/kernel/settings/settings.service.d.ts +98 -0
- package/dist/kernel/settings/settings.service.d.ts.map +1 -0
- package/dist/kernel/settings/settings.service.js +92 -0
- package/dist/kernel/settings/settings.service.js.map +1 -0
- package/dist/main.d.ts +2 -0
- package/dist/main.d.ts.map +1 -0
- package/dist/main.js +39 -0
- package/dist/main.js.map +1 -0
- package/dist/routes.d.ts +5 -0
- package/dist/routes.d.ts.map +1 -0
- package/dist/routes.js +58 -0
- package/dist/routes.js.map +1 -0
- package/dist/scripts/fetch-model.d.ts +2 -0
- package/dist/scripts/fetch-model.d.ts.map +1 -0
- package/dist/scripts/fetch-model.js +34 -0
- package/dist/scripts/fetch-model.js.map +1 -0
- package/dist/scripts/gen-schema.d.ts +2 -0
- package/dist/scripts/gen-schema.d.ts.map +1 -0
- package/dist/scripts/gen-schema.js +71 -0
- package/dist/scripts/gen-schema.js.map +1 -0
- package/dist/scripts/keys.d.ts +2 -0
- package/dist/scripts/keys.d.ts.map +1 -0
- package/dist/scripts/keys.js +24 -0
- package/dist/scripts/keys.js.map +1 -0
- package/dist/scripts/migrate.d.ts +2 -0
- package/dist/scripts/migrate.d.ts.map +1 -0
- package/dist/scripts/migrate.js +45 -0
- package/dist/scripts/migrate.js.map +1 -0
- package/dist/server.d.ts +30 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +129 -0
- package/dist/server.js.map +1 -0
- package/dist/version.d.ts +3 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +13 -0
- package/dist/version.js.map +1 -0
- package/dist/web/static.d.ts +30 -0
- package/dist/web/static.d.ts.map +1 -0
- package/dist/web/static.js +65 -0
- package/dist/web/static.js.map +1 -0
- package/package.json +106 -4
- package/web-dist/assets/CompositeItem-B2Bd2eM-.js +2 -0
- package/web-dist/assets/CompositeItem-B2Bd2eM-.js.map +1 -0
- package/web-dist/assets/DialogRoot-h0udFiba.js +2 -0
- package/web-dist/assets/DialogRoot-h0udFiba.js.map +1 -0
- package/web-dist/assets/DialogTitle-fTXvJGbH.js +2 -0
- package/web-dist/assets/DialogTitle-fTXvJGbH.js.map +1 -0
- package/web-dist/assets/DirectionContext-CRBE3EOa.js +2 -0
- package/web-dist/assets/DirectionContext-CRBE3EOa.js.map +1 -0
- package/web-dist/assets/FieldItemContext-B4r08RkZ.js +2 -0
- package/web-dist/assets/FieldItemContext-B4r08RkZ.js.map +1 -0
- package/web-dist/assets/FloatingPortal-D_eDEbvZ.js +2 -0
- package/web-dist/assets/FloatingPortal-D_eDEbvZ.js.map +1 -0
- package/web-dist/assets/FloatingPortalLite-DWlDzoqv.js +2 -0
- package/web-dist/assets/FloatingPortalLite-DWlDzoqv.js.map +1 -0
- package/web-dist/assets/Separator-DDDyVkeP.js +2 -0
- package/web-dist/assets/Separator-DDDyVkeP.js.map +1 -0
- package/web-dist/assets/_app-BY6-IpyI.js +2 -0
- package/web-dist/assets/_app-BY6-IpyI.js.map +1 -0
- package/web-dist/assets/_app-Ba10rJVa.js +2 -0
- package/web-dist/assets/_app-Ba10rJVa.js.map +1 -0
- package/web-dist/assets/_app-Bv2dBVot.js +2 -0
- package/web-dist/assets/_app-Bv2dBVot.js.map +1 -0
- package/web-dist/assets/_groupId-ENiG99V5.js +2 -0
- package/web-dist/assets/_groupId-ENiG99V5.js.map +1 -0
- package/web-dist/assets/_issueId-CAHjIiZ8.js +2 -0
- package/web-dist/assets/_issueId-CAHjIiZ8.js.map +1 -0
- package/web-dist/assets/_runId-XmmZmpWa.js +4 -0
- package/web-dist/assets/_runId-XmmZmpWa.js.map +1 -0
- package/web-dist/assets/_serverId-C9y6ztaL.js +2 -0
- package/web-dist/assets/_serverId-C9y6ztaL.js.map +1 -0
- package/web-dist/assets/_taskId-D8fVBV_H.js +2 -0
- package/web-dist/assets/_taskId-D8fVBV_H.js.map +1 -0
- package/web-dist/assets/_toolId-CnbF7zls.js +6 -0
- package/web-dist/assets/_toolId-CnbF7zls.js.map +1 -0
- package/web-dist/assets/alert-OPOFnW2X.js +2 -0
- package/web-dist/assets/alert-OPOFnW2X.js.map +1 -0
- package/web-dist/assets/api-client-CnTzbAbK.js +56 -0
- package/web-dist/assets/api-client-CnTzbAbK.js.map +1 -0
- package/web-dist/assets/appearance-D7nZLK7y.js +2 -0
- package/web-dist/assets/appearance-D7nZLK7y.js.map +1 -0
- package/web-dist/assets/arrow-up-Dop2Zfy9.js +2 -0
- package/web-dist/assets/arrow-up-Dop2Zfy9.js.map +1 -0
- package/web-dist/assets/audit-Cws4Sb1Z.js +2 -0
- package/web-dist/assets/audit-Cws4Sb1Z.js.map +1 -0
- package/web-dist/assets/button-0-kx6BS-.js +2 -0
- package/web-dist/assets/button-0-kx6BS-.js.map +1 -0
- package/web-dist/assets/card-bOMGzWND.js +2 -0
- package/web-dist/assets/card-bOMGzWND.js.map +1 -0
- package/web-dist/assets/chevron-right-jlmAjiMj.js +2 -0
- package/web-dist/assets/chevron-right-jlmAjiMj.js.map +1 -0
- package/web-dist/assets/client-snippet-DyzxqQDv.js +2 -0
- package/web-dist/assets/client-snippet-DyzxqQDv.js.map +1 -0
- package/web-dist/assets/code-view-Dp3S3g6k.js +4 -0
- package/web-dist/assets/code-view-Dp3S3g6k.js.map +1 -0
- package/web-dist/assets/compare-CHKwYuEP.js +2 -0
- package/web-dist/assets/compare-CHKwYuEP.js.map +1 -0
- package/web-dist/assets/components-CNkWqS3X.js +2 -0
- package/web-dist/assets/components-CNkWqS3X.js.map +1 -0
- package/web-dist/assets/components-DYbjYUzw.js +2 -0
- package/web-dist/assets/components-DYbjYUzw.js.map +1 -0
- package/web-dist/assets/composite-Bfwhy6qy.js +2 -0
- package/web-dist/assets/composite-Bfwhy6qy.js.map +1 -0
- package/web-dist/assets/confirm-dialog-BY5FJuQC.js +2 -0
- package/web-dist/assets/confirm-dialog-BY5FJuQC.js.map +1 -0
- package/web-dist/assets/connect-DEWuCUqH.js +2 -0
- package/web-dist/assets/connect-DEWuCUqH.js.map +1 -0
- package/web-dist/assets/core-CveQFPAO.js +13 -0
- package/web-dist/assets/core-CveQFPAO.js.map +1 -0
- package/web-dist/assets/create-key-dialog-DbtnDlv9.js +3 -0
- package/web-dist/assets/create-key-dialog-DbtnDlv9.js.map +1 -0
- package/web-dist/assets/createLucideIcon-4wkYGrAu.js +2 -0
- package/web-dist/assets/createLucideIcon-4wkYGrAu.js.map +1 -0
- package/web-dist/assets/crumbs-CFOzyevD.js +2 -0
- package/web-dist/assets/crumbs-CFOzyevD.js.map +1 -0
- package/web-dist/assets/data-table-DL8nsehq.js +2 -0
- package/web-dist/assets/data-table-DL8nsehq.js.map +1 -0
- package/web-dist/assets/download-BJL2mMMG.js +2 -0
- package/web-dist/assets/download-BJL2mMMG.js.map +1 -0
- package/web-dist/assets/download-Ct9K1Blk.js +2 -0
- package/web-dist/assets/download-Ct9K1Blk.js.map +1 -0
- package/web-dist/assets/draft-bar-DQo326FN.js +2 -0
- package/web-dist/assets/draft-bar-DQo326FN.js.map +1 -0
- package/web-dist/assets/engine-javascript-C30F4iNc.js +142 -0
- package/web-dist/assets/engine-javascript-C30F4iNc.js.map +1 -0
- package/web-dist/assets/env-summary-C8OSGAi1.js +2 -0
- package/web-dist/assets/env-summary-C8OSGAi1.js.map +1 -0
- package/web-dist/assets/environments-xDHrvcC0.js +2 -0
- package/web-dist/assets/environments-xDHrvcC0.js.map +1 -0
- package/web-dist/assets/evals-D103yj9M.js +2 -0
- package/web-dist/assets/evals-D103yj9M.js.map +1 -0
- package/web-dist/assets/file-drop-BUz7NVu0.js +2 -0
- package/web-dist/assets/file-drop-BUz7NVu0.js.map +1 -0
- package/web-dist/assets/file-text-BzSWwAXx.js +2 -0
- package/web-dist/assets/file-text-BzSWwAXx.js.map +1 -0
- package/web-dist/assets/file-up-DhxoycHf.js +2 -0
- package/web-dist/assets/file-up-DhxoycHf.js.map +1 -0
- package/web-dist/assets/gauge-DB20Sf_v.js +2 -0
- package/web-dist/assets/gauge-DB20Sf_v.js.map +1 -0
- package/web-dist/assets/github-dark-default-DXG-b-1a.js +2 -0
- package/web-dist/assets/github-dark-default-DXG-b-1a.js.map +1 -0
- package/web-dist/assets/github-light-default-BXViO-2h.js +2 -0
- package/web-dist/assets/github-light-default-BXViO-2h.js.map +1 -0
- package/web-dist/assets/graphql-CSsyTQ1B.js +2 -0
- package/web-dist/assets/graphql-CSsyTQ1B.js.map +1 -0
- package/web-dist/assets/inbox--axfoemS.js +2 -0
- package/web-dist/assets/inbox--axfoemS.js.map +1 -0
- package/web-dist/assets/inbox-Bg9XxN9I.js +2 -0
- package/web-dist/assets/inbox-Bg9XxN9I.js.map +1 -0
- package/web-dist/assets/index-CI-LmJP7.css +2 -0
- package/web-dist/assets/index-EqRZkjd6.js +17 -0
- package/web-dist/assets/index-EqRZkjd6.js.map +1 -0
- package/web-dist/assets/inertValue-BEKHztUQ.js +2 -0
- package/web-dist/assets/inertValue-BEKHztUQ.js.map +1 -0
- package/web-dist/assets/json-qhed-kSA.js +2 -0
- package/web-dist/assets/json-qhed-kSA.js.map +1 -0
- package/web-dist/assets/json-viewer-DFAY-JaC.js +2 -0
- package/web-dist/assets/json-viewer-DFAY-JaC.js.map +1 -0
- package/web-dist/assets/key-round-CPrc1zQr.js +2 -0
- package/web-dist/assets/key-round-CPrc1zQr.js.map +1 -0
- package/web-dist/assets/keys-D2H6bYnB.js +2 -0
- package/web-dist/assets/keys-D2H6bYnB.js.map +1 -0
- package/web-dist/assets/labels-B8sf8Hg_.js +2 -0
- package/web-dist/assets/labels-B8sf8Hg_.js.map +1 -0
- package/web-dist/assets/link-CByMaQfX.js +3 -0
- package/web-dist/assets/link-CByMaQfX.js.map +1 -0
- package/web-dist/assets/link-tabs-C06q3Y1p.js +2 -0
- package/web-dist/assets/link-tabs-C06q3Y1p.js.map +1 -0
- package/web-dist/assets/link-xDlPECzC.js +2 -0
- package/web-dist/assets/link-xDlPECzC.js.map +1 -0
- package/web-dist/assets/list-tree-Cq6aoA_B.js +2 -0
- package/web-dist/assets/list-tree-Cq6aoA_B.js.map +1 -0
- package/web-dist/assets/logged-out-Cia2QO9r.js +2 -0
- package/web-dist/assets/logged-out-Cia2QO9r.js.map +1 -0
- package/web-dist/assets/login-DgDPuB_V.js +2 -0
- package/web-dist/assets/login-DgDPuB_V.js.map +1 -0
- package/web-dist/assets/mode-recommendation-DoHGuZUm.js +2 -0
- package/web-dist/assets/mode-recommendation-DoHGuZUm.js.map +1 -0
- package/web-dist/assets/models-DPi2Bzvy.js +2 -0
- package/web-dist/assets/models-DPi2Bzvy.js.map +1 -0
- package/web-dist/assets/navigation-Crt8lW1m.js +2 -0
- package/web-dist/assets/navigation-Crt8lW1m.js.map +1 -0
- package/web-dist/assets/new-Ccw0Hlfl.js +5 -0
- package/web-dist/assets/new-Ccw0Hlfl.js.map +1 -0
- package/web-dist/assets/overlay-C_UeOJOw.js +2 -0
- package/web-dist/assets/overlay-C_UeOJOw.js.map +1 -0
- package/web-dist/assets/page-header-CHk7bso7.js +2 -0
- package/web-dist/assets/page-header-CHk7bso7.js.map +1 -0
- package/web-dist/assets/permissions-Bf3wb1Jv.js +2 -0
- package/web-dist/assets/permissions-Bf3wb1Jv.js.map +1 -0
- package/web-dist/assets/plug-CrM5MZO2.js +2 -0
- package/web-dist/assets/plug-CrM5MZO2.js.map +1 -0
- package/web-dist/assets/plus-C6_H380k.js +2 -0
- package/web-dist/assets/plus-C6_H380k.js.map +1 -0
- package/web-dist/assets/progress-DaZnZarb.js +2 -0
- package/web-dist/assets/progress-DaZnZarb.js.map +1 -0
- package/web-dist/assets/python-gzcpVVnB.js +2 -0
- package/web-dist/assets/python-gzcpVVnB.js.map +1 -0
- package/web-dist/assets/queries-3DiENdpp.js +2 -0
- package/web-dist/assets/queries-3DiENdpp.js.map +1 -0
- package/web-dist/assets/queries-CJD0QpGi.js +2 -0
- package/web-dist/assets/queries-CJD0QpGi.js.map +1 -0
- package/web-dist/assets/queries-CaU3gifI.js +2 -0
- package/web-dist/assets/queries-CaU3gifI.js.map +1 -0
- package/web-dist/assets/queries-DOMFJPBg.js +2 -0
- package/web-dist/assets/queries-DOMFJPBg.js.map +1 -0
- package/web-dist/assets/queries-DzYj_ZKK.js +2 -0
- package/web-dist/assets/queries-DzYj_ZKK.js.map +1 -0
- package/web-dist/assets/queries-O4X2594T.js +2 -0
- package/web-dist/assets/queries-O4X2594T.js.map +1 -0
- package/web-dist/assets/queries-iauKjcDt.js +2 -0
- package/web-dist/assets/queries-iauKjcDt.js.map +1 -0
- package/web-dist/assets/queries-yxFwGLDb.js +2 -0
- package/web-dist/assets/queries-yxFwGLDb.js.map +1 -0
- package/web-dist/assets/reason-parts-B6nt3n-F.js +2 -0
- package/web-dist/assets/reason-parts-B6nt3n-F.js.map +1 -0
- package/web-dist/assets/redirect-B4OxYbs2.js +2 -0
- package/web-dist/assets/redirect-B4OxYbs2.js.map +1 -0
- package/web-dist/assets/refresh-cw-Dk41furN.js +2 -0
- package/web-dist/assets/refresh-cw-Dk41furN.js.map +1 -0
- package/web-dist/assets/rolldown-runtime-XKyaHtl9.js +1 -0
- package/web-dist/assets/route-Ba10rJVa.js +2 -0
- package/web-dist/assets/route-Ba10rJVa.js.map +1 -0
- package/web-dist/assets/route-DFvqBlRc.js +2 -0
- package/web-dist/assets/route-DFvqBlRc.js.map +1 -0
- package/web-dist/assets/score-ring-D3Ff8hXt.js +2 -0
- package/web-dist/assets/score-ring-D3Ff8hXt.js.map +1 -0
- package/web-dist/assets/section-Bq1blJ9c.js +2 -0
- package/web-dist/assets/section-Bq1blJ9c.js.map +1 -0
- package/web-dist/assets/segmented-RsFdV9xJ.js +2 -0
- package/web-dist/assets/segmented-RsFdV9xJ.js.map +1 -0
- package/web-dist/assets/separator-CcxDVEHH.js +2 -0
- package/web-dist/assets/separator-CcxDVEHH.js.map +1 -0
- package/web-dist/assets/server-BvD6BIlz.js +2 -0
- package/web-dist/assets/server-BvD6BIlz.js.map +1 -0
- package/web-dist/assets/server-switcher-hOm8Popx.js +2 -0
- package/web-dist/assets/server-switcher-hOm8Popx.js.map +1 -0
- package/web-dist/assets/servers-DBjU_qiZ.js +2 -0
- package/web-dist/assets/servers-DBjU_qiZ.js.map +1 -0
- package/web-dist/assets/settings-DCmODejD.js +2 -0
- package/web-dist/assets/settings-DCmODejD.js.map +1 -0
- package/web-dist/assets/settings-zp4uTZ2u.js +2 -0
- package/web-dist/assets/settings-zp4uTZ2u.js.map +1 -0
- package/web-dist/assets/sheet-CZ77BIgN.js +2 -0
- package/web-dist/assets/sheet-CZ77BIgN.js.map +1 -0
- package/web-dist/assets/skeleton-CuU6NqIG.js +2 -0
- package/web-dist/assets/skeleton-CuU6NqIG.js.map +1 -0
- package/web-dist/assets/sparkles-DMF5S9tx.js +2 -0
- package/web-dist/assets/sparkles-DMF5S9tx.js.map +1 -0
- package/web-dist/assets/spec-Bhk7L9IF.js +2 -0
- package/web-dist/assets/spec-Bhk7L9IF.js.map +1 -0
- package/web-dist/assets/spinner-BLf8_Ajk.js +2 -0
- package/web-dist/assets/spinner-BLf8_Ajk.js.map +1 -0
- package/web-dist/assets/states-Z2xH3pUB.js +2 -0
- package/web-dist/assets/states-Z2xH3pUB.js.map +1 -0
- package/web-dist/assets/storage-CuUK35fn.js +2 -0
- package/web-dist/assets/storage-CuUK35fn.js.map +1 -0
- package/web-dist/assets/store-SrwTVjPk.js +2 -0
- package/web-dist/assets/store-SrwTVjPk.js.map +1 -0
- package/web-dist/assets/switch-C_lbqEIt.js +2 -0
- package/web-dist/assets/switch-C_lbqEIt.js.map +1 -0
- package/web-dist/assets/tasks-CRKt_Suy.js +2 -0
- package/web-dist/assets/tasks-CRKt_Suy.js.map +1 -0
- package/web-dist/assets/timeline-Cye1s7g_.js +2 -0
- package/web-dist/assets/timeline-Cye1s7g_.js.map +1 -0
- package/web-dist/assets/tools-C5I1npEn.js +2 -0
- package/web-dist/assets/tools-C5I1npEn.js.map +1 -0
- package/web-dist/assets/tooltip--tDonqxM.js +2 -0
- package/web-dist/assets/tooltip--tDonqxM.js.map +1 -0
- package/web-dist/assets/use-cursor-stack-DIOApcfL.js +2 -0
- package/web-dist/assets/use-cursor-stack-DIOApcfL.js.map +1 -0
- package/web-dist/assets/use-debounced-value-CSowsQHr.js +2 -0
- package/web-dist/assets/use-debounced-value-CSowsQHr.js.map +1 -0
- package/web-dist/assets/use-min-width-b55txtG6.js +2 -0
- package/web-dist/assets/use-min-width-b55txtG6.js.map +1 -0
- package/web-dist/assets/use-mobile-R850ZQZG.js +2 -0
- package/web-dist/assets/use-mobile-R850ZQZG.js.map +1 -0
- package/web-dist/assets/useAriaLabelledBy-DjHYrmeF.js +2 -0
- package/web-dist/assets/useAriaLabelledBy-DjHYrmeF.js.map +1 -0
- package/web-dist/assets/useBaseQuery-BoQjiPOp.js +2 -0
- package/web-dist/assets/useBaseQuery-BoQjiPOp.js.map +1 -0
- package/web-dist/assets/useBaseUiId-BUBV7JiZ.js +2 -0
- package/web-dist/assets/useBaseUiId-BUBV7JiZ.js.map +1 -0
- package/web-dist/assets/useButton-DQ6Sgg7h.js +2 -0
- package/web-dist/assets/useButton-DQ6Sgg7h.js.map +1 -0
- package/web-dist/assets/useControlled-B9BFcdfh.js +2 -0
- package/web-dist/assets/useControlled-B9BFcdfh.js.map +1 -0
- package/web-dist/assets/useNavigate-CrwlTILa.js +2 -0
- package/web-dist/assets/useNavigate-CrwlTILa.js.map +1 -0
- package/web-dist/assets/useOpenChangeComplete-DUM-_E2z.js +2 -0
- package/web-dist/assets/useOpenChangeComplete-DUM-_E2z.js.map +1 -0
- package/web-dist/assets/usePositioner-BQnDdcQL.js +2 -0
- package/web-dist/assets/usePositioner-BQnDdcQL.js.map +1 -0
- package/web-dist/assets/useQuery-BkgWvtTa.js +2 -0
- package/web-dist/assets/useQuery-BkgWvtTa.js.map +1 -0
- package/web-dist/assets/useRegisterFieldControl-DuodOtnM.js +2 -0
- package/web-dist/assets/useRegisterFieldControl-DuodOtnM.js.map +1 -0
- package/web-dist/assets/useRouterState-DeGPqG1m.js +2 -0
- package/web-dist/assets/useRouterState-DeGPqG1m.js.map +1 -0
- package/web-dist/assets/useScrollLock-BWBVawYJ.js +2 -0
- package/web-dist/assets/useScrollLock-BWBVawYJ.js.map +1 -0
- package/web-dist/assets/useTimeout-SGSgaiy1.js +2 -0
- package/web-dist/assets/useTimeout-SGSgaiy1.js.map +1 -0
- package/web-dist/assets/useTransitionStatus-Dy_zd4z2.js +2 -0
- package/web-dist/assets/useTransitionStatus-Dy_zd4z2.js.map +1 -0
- package/web-dist/assets/useTriggerFocusGuards-9VjGYE1p.js +2 -0
- package/web-dist/assets/useTriggerFocusGuards-9VjGYE1p.js.map +1 -0
- package/web-dist/assets/useValueChanged-BqSvidps.js +2 -0
- package/web-dist/assets/useValueChanged-BqSvidps.js.map +1 -0
- package/web-dist/assets/utils-BFSetRo1.js +2 -0
- package/web-dist/assets/utils-BFSetRo1.js.map +1 -0
- package/web-dist/assets/wrench-CIdGHcvJ.js +2 -0
- package/web-dist/assets/wrench-CIdGHcvJ.js.map +1 -0
- package/web-dist/assets/x-5OcgPlDp.js +2 -0
- package/web-dist/assets/x-5OcgPlDp.js.map +1 -0
- package/web-dist/assets/yaml-rwi0_p6S.js +2 -0
- package/web-dist/assets/yaml-rwi0_p6S.js.map +1 -0
- package/web-dist/favicon.svg +1 -0
- package/web-dist/index.html +55 -0
- package/web-dist/theme-init.js +44 -0
- package/README.md +0 -3
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server-switcher-hOm8Popx.js","names":["platform.engine.webkit","REASONS.listNavigation","REASONS.focusOut","_formatErrorMessage","_formatErrorMessage","_formatErrorMessage","REASONS.itemPress","platform.os.mac","MenuCheckboxItemDataAttributes.checked","MenuCheckboxItemDataAttributes.unchecked","_formatErrorMessage","_formatErrorMessage","REASONS.siblingOpen","_formatErrorMessage","_formatErrorMessage","REASONS.itemPress","_formatErrorMessage","REASONS.none","REASONS.keyboard","REASONS.pointer","platform.engine.webkit","REASONS.imperativeAction","listNavigation","REASONS.keyboard","REASONS.none","ownerWindow","platform.env.jsdom","_formatErrorMessage","REASONS.cancelOpen","MenuPrimitive.Root","MenuPrimitive.Trigger","MenuPrimitive.Portal","MenuPrimitive.Positioner","MenuPrimitive.Popup","MenuPrimitive.Group","MenuPrimitive.GroupLabel","MenuPrimitive.Item","MenuPrimitive.RadioGroup","MenuPrimitive.RadioItem","MenuPrimitive.RadioItemIndicator","CheckIcon","MenuPrimitive.Separator","ChevronDownIcon","CheckIcon","__toESM","require_react","require_jsx_runtime","cn","getMinListIndex","isIndexOutOfListBounds","isListIndexDisabled","activeElement","getNextListIndex","useAnimationsFinished","transitionStatusMapping","getMaxListIndex","useOpenChangeComplete","isElementVisible","contains","useAnimationFrame","getTarget","useNavigate","useRouterState","Check","useQuery","createLucideIcon","writeStorage","readStorage","EMPTY_OBJECT","NOOP","useIsoLayoutEffect","useRefWithInit","EMPTY_ARRAY","getWindow","unwrapLazyRenderProp","isHTMLElement","useMergedRefs","getParentNode","useCompositeRootContext","formatErrorMessage","dispatchClickWithModifiers","useRenderElement","mergeProps","useButton","isLastTraversableNode","createChangeEventDetails","focusOut","keyboard","pointer","listNavigation","imperativeAction","siblingOpen","itemPress","cancelOpen","none","createGenericEventDetails","ARROW_DOWN","jsdom","fastComponentRef","webkit","ARROW_RIGHT","ARROW_UP","isTypeableElement","ReactStore","ownerDocument","fastComponent","DROPDOWN_COLLISION_AVOIDANCE","FocusGuard","ARROW_LEFT","FloatingPortal","POPUP_COLLISION_AVOIDANCE","isTypeableCombobox","getFloatingFocusElement","mac","useTimeout","FloatingTreeStore","isVirtualPointerEvent","isVirtualClick","popupTransitionStateMapping","pressableTriggerOpenStateMapping","stopEvent","useFloatingTree","useDismiss","PopupHandleAttachment","useFloatingNodeId","useOpenStateTransitions","usePopupInteractionProps","useSyncedFloatingRootContext","useTriggerDataForwarding","FOCUSABLE_POPUP_PROPS","createPopupOpenState","popupStoreSelectors","PopupTriggerMap","attachPreventUnmountOnClose","createInitialPopupStoreState","useImplicitActiveTrigger","FloatingNode","useValueAsRef","useFloatingParentNodeId","FloatingTree","useHoverReferenceInteraction","useFocus","safePolygon","usePopupHandleStore","getDisabledMountTransitionStyles","useHoverFloatingInteraction","useAnchorPositioning","usePositioner","inertValue","enqueueFocus","InternalBackdrop","FloatingFocusManager","useOpenInteractionType","useToolbarRootContext","useAnchoredPopupScrollLock","useTriggerSwitchTransition","useClick","useTriggerFocusGuards","useTransitionStatus","useDirection","useBaseUiId","serversQuery","COMPOSITE_KEYS","useControlled","Separator","CompositeList","useCompositeListItem","CompositeItem","import_react","isStationaryWebKitPointer","event","doSwitch","orientation","vertical","horizontal","isMainOrientationKey","key","isMainOrientationToEndKey","rtl","isCrossOrientationOpenKey","isCrossOrientationCloseKey","grid","useListNavigation","onNavigateProp","navigateGrid","props","isGrid","open","store","floatingElement","domReferenceElement","dataRef","floatingFocusElement","typeableComboboxReference","floatingFocusElementRef","parentId","tree","externalTree","focusItemOnOpenRef","focusItemOnOpen","indexRef","selectedIndex","keyRef","isPointerModalityRef","onNavigate","useStableCallback","previousMountedRef","previousOpenRef","forceSyncFocusRef","forceScrollIntoViewRef","cancelQueuedFocusRef","disabledIndicesRef","disabledIndices","latestOpenRef","selectedIndexRef","resetOnPointerLeaveRef","resetOnPointerLeave","focusFrame","waitForListPopulatedFrame","focusItem","runFocus","virtual","item","initialItem","listRef","forceScrollIntoView","callback","waitedItem","enabled","activeIndex","runs","waitForListPopulated","triggerOrientation","nested","nodes","parent","node","activeEl","treeContainsActiveEl","hasActiveIndex","syncCurrentTarget","index","getParentOrientation","parentOrientation","getMinEnabledIndex","commonOnKeyDown","returnElement","nestedReturnFocusRef","currentIndex","minIndex","maxIndex","loopFocus","focusedElement","wrapped","currentTarget","focusItemOnHover","relatedTarget","floatingFocusEl","ariaActiveDescendantProp","id","floating","target","details","trigger","openOnNavigationKeyDown","checkVirtualMouse","checkVirtualPointer","currentOpen","isArrowKey","isParentCrossOpenKey","isMainKey","isNavigationKey","openOnArrowKeyDown","isParentMainKey","reference","useTypeahead","onMatchProp","onTypingProp","onTyping","timeout","stringRef","prevIndexRef","matchIndexRef","onKeyDown","getElement","elementsRef","isItemAvailable","element","getMatchingIndex","list","normalizedStartIndex","startIndex","lowerString","string","offset","listContent","isNewSession","text","resetMs","onBlur","next","currentDomReferenceElement","currentFloatingElement","sharedProps","__iconData","ChevronDown","import_jsx_runtime","MenuPositionerContext","useMenuPositionerContext","context","optional","MenuRootContext","useMenuRootContext","ContextMenuRootContext","useContextMenuRootContext","MenuFilterImplContext","useMenuFilterImpl","impl","root","scope","UNFILTERED","useUnfilteredItem","useMenuFilterItem","ref","forwardedRef","preventMouseDownDefault","useMenuItemCommonProps","params","rootContext","contextMenuContext","isSubmenuTrigger","itemMetadata","virtualFocus","ariaSelected","highlighted","menuEvents","isContextMenu","tabIndex","typingRef","nodeId","closeOnClick","initialCursorPoint","itemRef","REGULAR_ITEM","useMenuItem","nativeButton","commonProps","getItemProps","externalProps","getButtonProps","mergedRef","buttonRef","checked","unchecked","itemMapping","value","MenuGroupContext","useMenuGroupRootContext","MenuGroupPlain","elementProps","componentProps","labelId","setLabelId","MenuGroup","Group","MenuGroupLabel","idProp","currentId","MenuItemPlain","disabledProp","listItem","rootDisabled","itemProps","disabled","MenuItem","filterItem","MenuSubmenuRootContext","useMenuSubmenuRootContext","resolveRenderedId","render","renderProps","fallbackId","useRenderedId","defaultId","registeredId","setId","resolvePopupLabel","renderedElementProps","ariaLabel","ariaLabelledBy","activeTriggerElement","activeTriggerId","MenuPopupPlain","initialFocusProp","inheritedSubmenuRootContext","insideToolbar","transitionStatus","popupProps","mounted","instantType","lastOpenChangeReason","rootId","floatingContext","floatingTreeRoot","closeDelay","hoverEnabled","openMethod","listElement","registerIdRef","defaultFloatingId","setRenderedFloatingId","submenuRootContext","initialFocus","handleClose","setPopupElement","useNoParentHandoff","state","handleFocus","returnFocus","dynamicReturnFocus","parentVirtualFocusRef","finalFocus","NO_PARENT_HANDOFF","MenuPopup","Popup","MenuPortalContext","useMenuPortalContext","MenuPortal","portalProps","keepMounted","portalOwnerRole","MenuPositioner","anchorProp","positionMethodProp","alignProp","sideOffsetProp","alignOffsetProp","collisionAvoidanceProp","floatingRootContext","modal","triggerElement","positionerElement","adaptiveOrigin","floatingNodeId","floatingParentNodeId","domReference","anchor","sideOffset","alignOffset","align","collisionAvoidance","side","computedSide","computedAlign","contextMenu","positioner","arrowPadding","onMenuOpenChange","onParentClose","reason","closeTimeout","onItemHover","delay","eventDetails","menubarModal","shouldRenderBackdrop","backdropCutout","syncHighlightedItem","MenuRadioGroupContext","useMenuRadioGroupContext","MenuRadioGroupPlain","valueProp","onValueChangeProp","ariaLabelledByProp","setValueUnwrapped","defaultValue","setValue","newValue","MenuRadioGroup","RadioGroup","MenuRadioItemContext","useMenuRadioItemContext","MenuRadioItemPlain","selectedValue","setSelectedValue","groupDisabled","handleClick","MenuRadioItem","MenuRadioItemIndicator","indicatorRef","setMounted","MenubarContext","useMenubarContext","getHighlightReason","selectors","popupId","triggerId","itemIndex","MenuStore","triggerElements","createInitialState","floatingId","initialState","createInitialContext","keyboardEventRelay","nextRootId","nextFloatingTreeRoot","nextKeyboardEventRelay","isWriteBack","MenuFilterProviderContext","isKeyboardClick","isKeyboardOpen","MenuRootInternal","openProp","onItemHighlightedProp","modalProp","triggerIdProp","defaultTriggerIdProp","parentMenuRootContext","menubarContext","enclosingMenuStore","parentVirtualFocus","parentFromContext","isSubmenu","renderedFloatingId","floatingParentNodeIdFromContext","parentMenuStore","animateInitialOpen","defaultOpen","seededInstantType","menuStore","virtualFocusRef","onOpenChangeComplete","floatingNodeIdFromContext","keyboardOpen","payload","openEventRef","allowOutsidePressDismissalRef","allowOutsidePressDismissalTimeout","allowTouchToCloseRef","allowTouchToCloseTimeout","interactionTypeProps","runOnceAnimationsFinish","clearSeededInstantType","abortController","setOpen","nextOpen","shouldPreventUnmountOnClose","onOpenChange","nativeEvent","isDismissClose","popupOpenState","floatingEvents","handleSetOpenEvent","handleImperativeClose","actionsRef","forceUnmount","ctx","dismiss","closeParentOnEsc","direction","listNavigation$1","allowEscape","nextActiveIndex","highlightItemOnHover","nextTyping","typeahead","onItemHighlighted","lastHighlightIndexRef","highlightReason","highlightEvent","openTriggerProps","rest","activeTriggerProps","mergedProps","inactiveTriggerProps","relay","renderedChildren","children","content","handle","MenuRoot","filterProvider","FilterRoot","BOUNDARY_OFFSET","isMouseWithinBounds","bounds","getPseudoElementBounds","elementRect","win","beforeStyles","afterStyles","beforeWidth","beforeHeight","afterWidth","afterHeight","totalWidth","totalHeight","widthDiff","heightDiff","findRootOwnerId","useMixedToggleClickHandler","ignoreClickRef","mouseDownAction","MenuTrigger","openOnHoverProp","thisTriggerId","isTriggerActive","isOpenedByThisTrigger","controlsId","triggerElementRef","useMenuParent","compositeRootContext","floatingTreeRootFromContext","isInMenubar","triggerRef","allowMouseUpTriggerTimeout","handleDocumentMouseUp","mouseUpTarget","mouseEvent","doc","parentMenubarHasSubmenuOpen","hoverProps","isMountedByThisTrigger","stickIfOpen","useStickIfOpen","click","focus","mixedToggleHandlers","localInteractionProps","rootTriggerProps","filterTriggerProps","registerTrigger","handlePreFocusGuardFocus","handleFocusTargetFocus","stickIfOpenTimeout","setStickIfOpen","openReason","DropdownMenu","DropdownMenuTrigger","DropdownMenuContent","className","DropdownMenuGroup","DropdownMenuLabel","inset","DropdownMenuItem","variant","DropdownMenuRadioGroup","DropdownMenuRadioItem","DropdownMenuSeparator","SERVER_STORAGE_KEY","FILTERED","rememberedServer","ServerSwitcher","navigate","loc","s","servers","data","match","onServerPage","filtered","p","search","current","pick","prev"],"sources":["../../../../node_modules/@base-ui/react/floating-ui-react/hooks/useListNavigation.mjs","../../../../node_modules/@base-ui/react/floating-ui-react/hooks/useTypeahead.mjs","../../../../node_modules/lucide-react/dist/esm/icons/chevron-down.mjs","../../../../node_modules/@base-ui/react/menu/positioner/MenuPositionerContext.mjs","../../../../node_modules/@base-ui/react/menu/root/MenuRootContext.mjs","../../../../node_modules/@base-ui/react/context-menu/root/ContextMenuRootContext.mjs","../../../../node_modules/@base-ui/react/menu/filter-root/MenuFilterContext.mjs","../../../../node_modules/@base-ui/react/menu/item/useMenuItemCommonProps.mjs","../../../../node_modules/@base-ui/react/menu/item/useMenuItem.mjs","../../../../node_modules/@base-ui/react/menu/checkbox-item/MenuCheckboxItemDataAttributes.mjs","../../../../node_modules/@base-ui/react/menu/utils/stateAttributesMapping.mjs","../../../../node_modules/@base-ui/react/menu/group/MenuGroupContext.mjs","../../../../node_modules/@base-ui/react/menu/group/MenuGroup.mjs","../../../../node_modules/@base-ui/react/menu/group-label/MenuGroupLabel.mjs","../../../../node_modules/@base-ui/react/menu/item/MenuItem.mjs","../../../../node_modules/@base-ui/react/menu/submenu-root/MenuSubmenuRootContext.mjs","../../../../node_modules/@base-ui/react/internals/resolveRenderedId.mjs","../../../../node_modules/@base-ui/react/internals/resolvePopupLabel.mjs","../../../../node_modules/@base-ui/react/menu/popup/MenuPopup.mjs","../../../../node_modules/@base-ui/react/menu/portal/MenuPortalContext.mjs","../../../../node_modules/@base-ui/react/menu/portal/MenuPortal.mjs","../../../../node_modules/@base-ui/react/menu/positioner/MenuPositioner.mjs","../../../../node_modules/@base-ui/react/menu/radio-group/MenuRadioGroupContext.mjs","../../../../node_modules/@base-ui/react/menu/radio-group/MenuRadioGroup.mjs","../../../../node_modules/@base-ui/react/menu/radio-item/MenuRadioItemContext.mjs","../../../../node_modules/@base-ui/react/menu/radio-item/MenuRadioItem.mjs","../../../../node_modules/@base-ui/react/menu/radio-item-indicator/MenuRadioItemIndicator.mjs","../../../../node_modules/@base-ui/react/menubar/MenubarContext.mjs","../../../../node_modules/@base-ui/react/utils/getHighlightReason.mjs","../../../../node_modules/@base-ui/react/menu/store/MenuStore.mjs","../../../../node_modules/@base-ui/react/menu/filter-provider/MenuFilterProviderContext.mjs","../../../../node_modules/@base-ui/react/menu/utils/isKeyboardOpen.mjs","../../../../node_modules/@base-ui/react/menu/root/MenuRoot.mjs","../../../../node_modules/@base-ui/react/utils/getPseudoElementBounds.mjs","../../../../node_modules/@base-ui/react/menu/utils/findRootOwnerId.mjs","../../../../node_modules/@base-ui/react/utils/useMixedToggleClickHandler.mjs","../../../../node_modules/@base-ui/react/menu/trigger/MenuTrigger.mjs","../../src/components/ui/dropdown-menu.tsx","../../src/components/layout/server-switcher.tsx"],"sourcesContent":["'use client';\n\nimport * as React from 'react';\nimport { useAnimationFrame } from '@base-ui/utils/useAnimationFrame';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useValueAsRef } from '@base-ui/utils/useValueAsRef';\nimport { platform } from '@base-ui/utils/platform';\nimport { isHTMLElement } from '@floating-ui/utils/dom';\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useFloatingParentNodeId, useFloatingTree } from \"../components/FloatingTree.mjs\";\nimport { getMaxListIndex, getMinListIndex, getNextListIndex, isIndexOutOfListBounds } from \"../utils/composite.mjs\";\nimport { ARROW_DOWN, ARROW_LEFT, ARROW_RIGHT, ARROW_UP } from \"../utils/constants.mjs\";\nimport { activeElement, contains, getFloatingFocusElement, getTarget, isTypeableCombobox, isTypeableElement } from \"../utils/element.mjs\";\nimport { enqueueFocus } from \"../utils/enqueueFocus.mjs\";\nimport { isVirtualClick, isVirtualPointerEvent, stopEvent } from \"../utils/event.mjs\";\n\n// WebKit fires zero-delta `mousemove`/`pointermove` events when the list scrolls\n// beneath a stationary pointer, moving the highlight during keyboard navigation.\n// https://github.com/mui/base-ui/issues/4002\nfunction isStationaryWebKitPointer(event) {\n return platform.engine.webkit && event.movementX === 0 && event.movementY === 0;\n}\nfunction doSwitch(orientation, vertical, horizontal) {\n switch (orientation) {\n case 'vertical':\n return vertical;\n case 'horizontal':\n return horizontal;\n default:\n return vertical || horizontal;\n }\n}\nexport function isMainOrientationKey(key, orientation) {\n const vertical = key === ARROW_UP || key === ARROW_DOWN;\n const horizontal = key === ARROW_LEFT || key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal);\n}\nexport function isMainOrientationToEndKey(key, orientation, rtl) {\n const vertical = key === ARROW_DOWN;\n const horizontal = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n return doSwitch(orientation, vertical, horizontal) || key === 'Enter' || key === ' ' || key === '';\n}\nexport function isCrossOrientationOpenKey(key, orientation, rtl) {\n const vertical = rtl ? key === ARROW_LEFT : key === ARROW_RIGHT;\n const horizontal = key === ARROW_DOWN;\n return doSwitch(orientation, vertical, horizontal);\n}\nexport function isCrossOrientationCloseKey(key, orientation, rtl, grid) {\n const vertical = rtl ? key === ARROW_RIGHT : key === ARROW_LEFT;\n const horizontal = key === ARROW_UP;\n if (orientation === 'both' || orientation === 'horizontal' && grid) {\n return key === 'Escape';\n }\n return doSwitch(orientation, vertical, horizontal);\n}\n/**\n * Adds arrow key-based navigation of a list of items, either using real DOM\n * focus or virtual focus.\n * @see https://floating-ui.com/docs/useListNavigation\n */\nexport function useListNavigation(store, props) {\n const {\n listRef,\n activeIndex,\n onNavigate: onNavigateProp = () => {},\n enabled = true,\n selectedIndex = null,\n allowEscape = false,\n loopFocus = false,\n nested = false,\n rtl = false,\n virtual = false,\n focusItemOnOpen = 'auto',\n focusItemOnHover = true,\n openOnArrowKeyDown = true,\n disabledIndices = undefined,\n orientation = 'vertical',\n triggerOrientation = orientation,\n parentOrientation,\n id,\n resetOnPointerLeave = true,\n externalTree,\n nestedReturnFocusRef,\n grid: navigateGrid\n } = props;\n const isGrid = navigateGrid != null;\n if (process.env.NODE_ENV !== 'production') {\n if (allowEscape) {\n if (!loopFocus) {\n console.warn('`useListNavigation` looping must be enabled to allow escaping.');\n }\n if (!virtual) {\n console.warn('`useListNavigation` must be virtual to allow escaping.');\n }\n }\n if (orientation === 'vertical' && isGrid) {\n console.warn('In grid list navigation mode, the `orientation` should', 'be either \"horizontal\" or \"both\".');\n }\n }\n const open = store.useState('open');\n const floatingElement = store.useState('floatingElement');\n const domReferenceElement = store.useState('domReferenceElement');\n const dataRef = store.context.dataRef;\n const floatingFocusElement = getFloatingFocusElement(floatingElement);\n const typeableComboboxReference = isTypeableCombobox(domReferenceElement);\n const floatingFocusElementRef = useValueAsRef(floatingFocusElement);\n const parentId = useFloatingParentNodeId();\n const tree = useFloatingTree(externalTree);\n const focusItemOnOpenRef = React.useRef(focusItemOnOpen);\n const indexRef = React.useRef(selectedIndex ?? -1);\n const keyRef = React.useRef(null);\n const isPointerModalityRef = React.useRef(true);\n const onNavigate = useStableCallback(event => {\n onNavigateProp(indexRef.current === -1 ? null : indexRef.current, event);\n });\n const previousMountedRef = React.useRef(!!floatingElement);\n const previousOpenRef = React.useRef(open);\n const forceSyncFocusRef = React.useRef(false);\n const forceScrollIntoViewRef = React.useRef(false);\n const cancelQueuedFocusRef = React.useRef(null);\n const disabledIndicesRef = useValueAsRef(disabledIndices);\n const latestOpenRef = useValueAsRef(open);\n const selectedIndexRef = useValueAsRef(selectedIndex);\n const resetOnPointerLeaveRef = useValueAsRef(resetOnPointerLeave);\n const focusFrame = useAnimationFrame();\n const waitForListPopulatedFrame = useAnimationFrame();\n const focusItem = useStableCallback(() => {\n // Synchronous navigation must also supersede any deferred focus from an earlier update.\n focusFrame.cancel();\n function runFocus(item) {\n if (!virtual) {\n cancelQueuedFocusRef.current = enqueueFocus(item, {\n sync: forceSyncFocusRef.current,\n preventScroll: true\n });\n }\n }\n const initialItem = listRef.current[indexRef.current];\n const forceScrollIntoView = forceScrollIntoViewRef.current;\n if (initialItem) {\n runFocus(initialItem);\n }\n const scheduler = forceSyncFocusRef.current ? callback => callback() : callback => focusFrame.request(callback);\n scheduler(() => {\n const waitedItem = listRef.current[indexRef.current] || initialItem;\n if (!waitedItem) {\n return;\n }\n if (!initialItem) {\n runFocus(waitedItem);\n }\n const shouldScrollIntoView =\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n item && (forceScrollIntoView || !isPointerModalityRef.current);\n if (shouldScrollIntoView) {\n // JSDOM doesn't support `.scrollIntoView()` but it's widely supported\n // by all browsers.\n waitedItem.scrollIntoView?.({\n block: 'nearest',\n inline: 'nearest'\n });\n }\n });\n });\n useIsoLayoutEffect(() => {\n dataRef.current.orientation = orientation;\n }, [dataRef, orientation]);\n useIsoLayoutEffect(() => {\n if (!open) {\n keyRef.current = null;\n }\n // Explicit values can change with the opening interaction. Keep an inferred 'auto' value\n // from the trigger event, but apply a boolean before the initial highlight is synchronized.\n if (!open || focusItemOnOpen !== 'auto') {\n focusItemOnOpenRef.current = focusItemOnOpen;\n }\n }, [open, focusItemOnOpen]);\n\n // Sync `selectedIndex` to be the `activeIndex` upon opening the floating\n // element. Also, reset `activeIndex` upon closing the floating element.\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n if (open && floatingElement) {\n indexRef.current = selectedIndex ?? -1;\n if (focusItemOnOpenRef.current && selectedIndex != null) {\n // Regardless of the pointer modality, we want to ensure the selected\n // item comes into view when the floating element is opened.\n forceScrollIntoViewRef.current = true;\n onNavigate();\n }\n } else if (previousMountedRef.current) {\n // Reset the active index when the list is no longer open and mounted (closing or\n // unmounting). `onNavigate` is a stable callback that always forwards to the latest\n // `onNavigate` prop.\n indexRef.current = -1;\n onNavigate();\n }\n }, [enabled, open, floatingElement, selectedIndex, onNavigate]);\n\n // Sync `activeIndex` to be the focused item while the floating element is\n // open.\n useIsoLayoutEffect(() => {\n if (!enabled) {\n return;\n }\n if (!open) {\n forceSyncFocusRef.current = false;\n return;\n }\n if (!floatingElement) {\n return;\n }\n if (activeIndex == null) {\n forceSyncFocusRef.current = false;\n if (selectedIndexRef.current != null) {\n return;\n }\n\n // Reset while the floating element was open (e.g. the list changed).\n if (previousMountedRef.current) {\n indexRef.current = -1;\n focusItem();\n }\n\n // Initial sync.\n if ((!previousOpenRef.current || !previousMountedRef.current) && focusItemOnOpenRef.current && (keyRef.current != null || focusItemOnOpenRef.current === true && keyRef.current == null)) {\n let runs = 0;\n const waitForListPopulated = () => {\n if (listRef.current[0] == null) {\n // Avoid letting the browser paint if possible on the first try,\n // otherwise use rAF. Don't try more than twice, since something\n // is wrong otherwise.\n if (runs < 2) {\n const scheduler = runs ? callback => waitForListPopulatedFrame.request(callback) : queueMicrotask;\n scheduler(waitForListPopulated);\n }\n runs += 1;\n } else {\n // Initially focus the first non-disabled item. `disabledIndices` is deliberately\n // omitted here so attribute-disabled items (`disabled`/`aria-disabled`) are skipped\n // on open even when the consumer passes an empty `disabledIndices` array. Passing it\n // would regress that behavior (see mui/base-ui#2604).\n // The key came from the trigger, so it is read on the trigger's orientation.\n indexRef.current = keyRef.current == null || isMainOrientationToEndKey(keyRef.current, triggerOrientation, rtl) || nested ? getMinListIndex(listRef) : getMaxListIndex(listRef);\n keyRef.current = null;\n onNavigate();\n }\n };\n waitForListPopulated();\n }\n } else if (!isIndexOutOfListBounds(listRef.current, activeIndex)) {\n indexRef.current = activeIndex;\n focusItem();\n forceScrollIntoViewRef.current = false;\n }\n }, [enabled, open, floatingElement, activeIndex, selectedIndexRef, nested, listRef, triggerOrientation, rtl, onNavigate, focusItem, waitForListPopulatedFrame]);\n\n // Ensure the parent floating element has focus when a nested child closes\n // to allow arrow key navigation to work after the pointer leaves the child.\n useIsoLayoutEffect(() => {\n if (!enabled || floatingElement || !tree || virtual || !previousMountedRef.current) {\n return;\n }\n const nodes = tree.nodesRef.current;\n const parent = nodes.find(node => node.id === parentId)?.context?.elements.floating;\n // `floatingElement` is null here (see the guard above), so resolve the owner document from an\n // in-DOM element for realm-safety (shadow DOM/iframes): the reference element, falling back to\n // the parent floating element when the reference is virtual (`domReferenceElement` is null).\n const activeEl = activeElement(ownerDocument(domReferenceElement ?? parent ?? null));\n const treeContainsActiveEl = nodes.some(node => node.context && contains(node.context.elements.floating, activeEl));\n if (parent && !treeContainsActiveEl && isPointerModalityRef.current) {\n parent.focus({\n preventScroll: true\n });\n }\n }, [enabled, floatingElement, domReferenceElement, tree, parentId, virtual]);\n useIsoLayoutEffect(() => {\n previousOpenRef.current = open;\n previousMountedRef.current = !!floatingElement;\n });\n const hasActiveIndex = activeIndex != null;\n const syncCurrentTarget = useStableCallback(event => {\n if (!latestOpenRef.current) {\n return;\n }\n const index = listRef.current.indexOf(event.currentTarget);\n if (index !== -1 && (indexRef.current !== index || activeIndex !== index)) {\n indexRef.current = index;\n onNavigate(event);\n }\n });\n const getParentOrientation = useStableCallback(() => {\n return parentOrientation ?? tree?.nodesRef.current.find(node => node.id === parentId)?.context?.dataRef?.current.orientation;\n });\n const getMinEnabledIndex = useStableCallback(() => {\n return getMinListIndex(listRef, disabledIndicesRef.current);\n });\n const commonOnKeyDown = useStableCallback(event => {\n isPointerModalityRef.current = false;\n forceSyncFocusRef.current = true;\n\n // When composing a character, Chrome fires ArrowDown twice. Firefox/Safari\n // don't appear to suffer from this. `event.isComposing` is avoided due to\n // Safari not supporting it properly (although it's not needed in the first\n // place for Safari, just avoiding any possible issues).\n if (event.which === 229) {\n return;\n }\n\n // If the floating element is animating out, ignore navigation. Otherwise,\n // the `activeIndex` gets set to 0 despite not being open so the next time\n // the user ArrowDowns, the first item won't be focused.\n if (!latestOpenRef.current && event.currentTarget === floatingFocusElementRef.current) {\n return;\n }\n if (nested && isCrossOrientationCloseKey(event.key, orientation, rtl, isGrid)) {\n // If the nested list's close key is also the parent navigation key,\n // let the parent navigate. Otherwise, stop propagating the event.\n if (!isMainOrientationKey(event.key, getParentOrientation())) {\n stopEvent(event);\n }\n store.setOpen(false, createChangeEventDetails(REASONS.listNavigation, event.nativeEvent));\n const returnElement = nestedReturnFocusRef?.current ?? domReferenceElement;\n if (isHTMLElement(returnElement)) {\n returnElement.focus();\n }\n return;\n }\n\n // The consumer owns `activeIndex` and may decline a navigation this hook proposed, such as a\n // virtual list keeping its highlight when the reference is refocused. Declining produces no\n // re-render, so reconcile here: otherwise the cursor drifts from the rendered highlight and\n // this key moves from the wrong position.\n if (activeIndex != null && activeIndex !== indexRef.current && !isIndexOutOfListBounds(listRef.current, activeIndex)) {\n indexRef.current = activeIndex;\n }\n const currentIndex = indexRef.current;\n const minIndex = getMinListIndex(listRef, disabledIndices);\n const maxIndex = getMaxListIndex(listRef, disabledIndices);\n if (!typeableComboboxReference) {\n if (event.key === 'Home') {\n stopEvent(event);\n indexRef.current = minIndex;\n onNavigate(event);\n }\n if (event.key === 'End') {\n stopEvent(event);\n indexRef.current = maxIndex;\n onNavigate(event);\n }\n }\n\n // Grid navigation is injected by grid-capable consumers so non-grid\n // consumers (menu, select) tree-shake the grid helpers out.\n if (navigateGrid != null) {\n const index = navigateGrid(event, indexRef.current, listRef, orientation, loopFocus, rtl, disabledIndices, minIndex, maxIndex);\n\n // The grid navigator returns the unchanged index for keys it does not handle, and\n // reporting that as a navigation would re-emit the current highlight on every keydown.\n if (index != null && index !== indexRef.current) {\n indexRef.current = index;\n onNavigate(event);\n }\n if (orientation === 'both') {\n return;\n }\n }\n if (isMainOrientationKey(event.key, orientation)) {\n stopEvent(event);\n\n // Reset the index if no item is focused. Focus can also rest on a container inside the\n // popup, such as a list that holds the `menu` role. Keys bubbling from a portaled nested\n // popup are not in this popup's DOM, so they navigate from the current index.\n const focusedElement = activeElement(event.currentTarget.ownerDocument);\n if (open && !virtual && contains(event.currentTarget, focusedElement) && !listRef.current.some(item => item != null && contains(item, focusedElement))) {\n indexRef.current = isMainOrientationToEndKey(event.key, orientation, rtl) ? minIndex : maxIndex;\n onNavigate(event);\n // The boundary item may already be highlighted, so `activeIndex` won't change and the\n // effect that moves focus to the highlighted item won't run.\n if (activeIndex === indexRef.current) {\n focusItem();\n }\n return;\n }\n const {\n index,\n wrapped\n } = getNextListIndex(listRef.current, currentIndex, {\n decrement: !isMainOrientationToEndKey(event.key, orientation, rtl),\n loopFocus,\n allowEscape,\n disabledIndices,\n minIndex,\n maxIndex\n });\n if (wrapped) {\n // Give time for virtualizers to update the listRef.\n forceSyncFocusRef.current = false;\n }\n indexRef.current = index;\n onNavigate(event);\n }\n });\n const item = React.useMemo(() => {\n const itemProps = {\n onFocus(event) {\n forceSyncFocusRef.current = true;\n syncCurrentTarget(event);\n },\n onClick({\n currentTarget\n }) {\n // Safari. Skipped under virtual focus, which must keep real focus on the reference.\n if (!virtual) {\n currentTarget.focus({\n preventScroll: true\n });\n }\n },\n onMouseMove(event) {\n if (isStationaryWebKitPointer(event)) {\n return;\n }\n forceSyncFocusRef.current = true;\n forceScrollIntoViewRef.current = false;\n if (focusItemOnHover) {\n syncCurrentTarget(event);\n }\n },\n onPointerLeave(event) {\n if (!latestOpenRef.current || !isPointerModalityRef.current || event.pointerType === 'touch') {\n return;\n }\n forceSyncFocusRef.current = true;\n const relatedTarget = event.relatedTarget;\n if (!focusItemOnHover || listRef.current.includes(relatedTarget)) {\n return;\n }\n if (!resetOnPointerLeaveRef.current) {\n return;\n }\n cancelQueuedFocusRef.current?.();\n cancelQueuedFocusRef.current = null;\n indexRef.current = -1;\n onNavigate(event);\n if (!virtual) {\n const floatingFocusEl = floatingFocusElementRef.current;\n const activeEl = activeElement(ownerDocument(floatingFocusEl));\n if (floatingFocusEl && contains(floatingFocusEl, activeEl)) {\n floatingFocusEl.focus({\n preventScroll: true\n });\n }\n }\n }\n };\n return itemProps;\n }, [syncCurrentTarget, latestOpenRef, floatingFocusElementRef, focusItemOnHover, listRef, onNavigate, resetOnPointerLeaveRef, virtual]);\n const ariaActiveDescendantProp = React.useMemo(() => {\n return virtual && open && hasActiveIndex && {\n 'aria-activedescendant': `${id}-${activeIndex}`\n };\n }, [virtual, open, hasActiveIndex, id, activeIndex]);\n const floating = React.useMemo(() => {\n return {\n ...(!typeableComboboxReference ? ariaActiveDescendantProp : {}),\n onKeyDown(event) {\n // Close submenu on Shift+Tab\n if (event.key === 'Tab' && event.shiftKey && open && !virtual) {\n // If the event originated from within a nested element (e.g., a Dialog opened from\n // within the menu), don't close the menu. The nested element has its own focus\n // management and should handle the Tab key.\n const target = getTarget(event.nativeEvent);\n if (target && !contains(floatingFocusElementRef.current, target)) {\n return;\n }\n stopEvent(event);\n const details = createChangeEventDetails(REASONS.focusOut, event.nativeEvent);\n store.setOpen(false, details);\n const returnElement = nestedReturnFocusRef?.current ?? domReferenceElement;\n if (!details.isCanceled && isHTMLElement(returnElement)) {\n returnElement.focus();\n }\n return;\n }\n commonOnKeyDown(event);\n },\n onPointerMove(event) {\n if (isStationaryWebKitPointer(event)) {\n return;\n }\n isPointerModalityRef.current = true;\n }\n };\n }, [ariaActiveDescendantProp, commonOnKeyDown, floatingFocusElementRef, typeableComboboxReference, store, open, virtual, domReferenceElement, nestedReturnFocusRef]);\n const trigger = React.useMemo(() => {\n function openOnNavigationKeyDown(event) {\n store.setOpen(true, createChangeEventDetails(REASONS.listNavigation, event.nativeEvent, event.currentTarget));\n }\n function checkVirtualMouse(event) {\n if (focusItemOnOpen === 'auto' && isVirtualClick(event.nativeEvent)) {\n focusItemOnOpenRef.current = !virtual;\n }\n }\n function checkVirtualPointer(event) {\n // `pointerdown` fires first, reset the state then perform the checks.\n focusItemOnOpenRef.current = focusItemOnOpen;\n if (focusItemOnOpen === 'auto' && isVirtualPointerEvent(event.nativeEvent)) {\n focusItemOnOpenRef.current = true;\n }\n }\n return {\n onKeyDown(event) {\n // non-reactive open state (to prevent re-creation of the handler)\n const currentOpen = store.select('open');\n isPointerModalityRef.current = false;\n const isArrowKey = event.key.startsWith('Arrow');\n const isParentCrossOpenKey = isCrossOrientationOpenKey(event.key, getParentOrientation(), rtl);\n const isMainKey = isMainOrientationKey(event.key, currentOpen ? orientation : triggerOrientation);\n const isNavigationKey = (nested ? isParentCrossOpenKey : isMainKey) || event.key === 'Enter' || event.key.trim() === '';\n if (virtual && currentOpen && (!nested || isTypeableElement(event.currentTarget))) {\n return commonOnKeyDown(event);\n }\n\n // If a floating element should not open on arrow key down, avoid\n // setting `activeIndex` while it's closed.\n if (!currentOpen && !openOnArrowKeyDown && isArrowKey) {\n return undefined;\n }\n if (isNavigationKey) {\n const isParentMainKey = isMainOrientationKey(event.key, getParentOrientation());\n keyRef.current = nested && isParentMainKey ? null : event.key;\n }\n if (nested) {\n if (isParentCrossOpenKey) {\n stopEvent(event);\n if (currentOpen) {\n indexRef.current = getMinEnabledIndex();\n onNavigate(event);\n if (virtual) {\n floatingFocusElementRef.current?.focus();\n }\n } else {\n openOnNavigationKeyDown(event);\n }\n }\n return undefined;\n }\n if (isMainKey) {\n if (selectedIndexRef.current != null) {\n indexRef.current = selectedIndexRef.current;\n }\n stopEvent(event);\n if (!currentOpen && openOnArrowKeyDown) {\n openOnNavigationKeyDown(event);\n } else {\n commonOnKeyDown(event);\n }\n if (currentOpen) {\n onNavigate(event);\n }\n }\n return undefined;\n },\n onFocus(event) {\n if (event.target !== event.currentTarget) {\n return;\n }\n if (store.select('open') && !virtual) {\n indexRef.current = -1;\n onNavigate(event);\n }\n },\n onPointerDown: checkVirtualPointer,\n onPointerEnter: checkVirtualPointer,\n onMouseDown: checkVirtualMouse,\n onClick: checkVirtualMouse\n };\n }, [commonOnKeyDown, focusItemOnOpen, getMinEnabledIndex, nested, onNavigate, store, openOnArrowKeyDown, orientation, triggerOrientation, getParentOrientation, rtl, selectedIndexRef, virtual, floatingFocusElementRef]);\n const reference = React.useMemo(() => {\n return {\n ...ariaActiveDescendantProp,\n ...trigger\n };\n }, [ariaActiveDescendantProp, trigger]);\n return React.useMemo(() => enabled ? {\n reference,\n floating,\n item,\n trigger\n } : {}, [enabled, reference, floating, trigger, item]);\n}","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { EMPTY_ARRAY } from '@base-ui/utils/empty';\nimport { isElementVisible, isListIndexDisabled } from \"../utils/composite.mjs\";\nimport { contains } from \"../utils/element.mjs\";\nimport { stopEvent } from \"../utils/event.mjs\";\n/**\n * Provides a matching callback that can be used to focus an item as the user\n * types, often used in tandem with `useListNavigation()`.\n * @see https://floating-ui.com/docs/useTypeahead\n */\nexport function useTypeahead(store, props) {\n const {\n listRef,\n elementsRef,\n activeIndex,\n onMatch: onMatchProp,\n disabledIndices,\n onTyping: onTypingProp,\n enabled = true,\n resetMs = 750,\n selectedIndex = null\n } = props;\n const onTyping = useStableCallback(onTypingProp);\n const open = store.useState('open');\n const timeout = useTimeout();\n const stringRef = React.useRef('');\n const prevIndexRef = React.useRef(selectedIndex ?? activeIndex ?? -1);\n const matchIndexRef = React.useRef(null);\n const onKeyDown = useStableCallback(event => {\n function getElement(index) {\n return elementsRef?.current[index];\n }\n function isItemAvailable(index) {\n const element = getElement(index);\n if (element && !isElementVisible(element) || element?.matches(':disabled')) {\n return false;\n }\n // Visibility and native disabled state are handled above; pass an empty\n // element list so `isListIndexDisabled` resolves only the explicit\n // `disabledIndices` (array/predicate) and skips its own fallbacks.\n // Consumers that don't pass `disabledIndices` keep matching every visible\n // item except native disabled elements provided through `elementsRef`.\n return disabledIndices == null || !isListIndexDisabled(EMPTY_ARRAY, index, disabledIndices);\n }\n function getMatchingIndex(list, string, startIndex = 0) {\n if (list.length === 0) {\n return -1;\n }\n const normalizedStartIndex = (startIndex % list.length + list.length) % list.length;\n const lowerString = string.toLowerCase();\n for (let offset = 0; offset < list.length; offset += 1) {\n const index = (normalizedStartIndex + offset) % list.length;\n const text = list[index];\n if (!text?.toLowerCase().startsWith(lowerString) || !isItemAvailable(index)) {\n continue;\n }\n return index;\n }\n return -1;\n }\n const listContent = listRef.current;\n if (stringRef.current.length > 0 && event.key === ' ') {\n // Space should continue the in-progress typeahead session.\n stopEvent(event);\n onTyping?.(true);\n }\n if (stringRef.current.length > 0 && stringRef.current[0] !== ' ') {\n if (getMatchingIndex(listContent, stringRef.current) === -1 && event.key !== ' ') {\n onTyping?.(false);\n }\n }\n if (listContent == null ||\n // Character key.\n event.key.length !== 1 ||\n // Modifier key.\n event.ctrlKey || event.metaKey || event.altKey) {\n return;\n }\n if (open && event.key !== ' ') {\n stopEvent(event);\n onTyping?.(true);\n }\n\n // Capture whether this is a new typing session before mutating the string.\n const isNewSession = stringRef.current === '';\n if (isNewSession) {\n prevIndexRef.current = selectedIndex ?? activeIndex ?? -1;\n }\n\n // Bail out if the list contains a word like \"llama\" or \"aaron\". TODO:\n // allow it in this case, too. Unavailable items are skipped while matching, so\n // they must be ignored here as well — otherwise a hidden or disabled double-letter\n // label would block rapid cycling through the available items.\n const allowRapidSuccessionOfFirstLetter = listContent.every((text, index) => text && isItemAvailable(index) ? text[0]?.toLowerCase() !== text[1]?.toLowerCase() : true);\n\n // Allows the user to cycle through items that start with the same letter\n // in rapid succession.\n if (allowRapidSuccessionOfFirstLetter && stringRef.current === event.key) {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n }\n stringRef.current += event.key;\n timeout.start(resetMs, () => {\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n onTyping?.(false);\n });\n\n // Compute the starting index for this search.\n // If this is a new typing session (string is empty), base it on the current\n // selection/active item; otherwise continue from the last matched index.\n const prevIndex = isNewSession ? selectedIndex ?? activeIndex ?? -1 : prevIndexRef.current;\n const startIndex = (prevIndex ?? 0) + 1;\n const index = getMatchingIndex(listContent, stringRef.current, startIndex);\n if (index !== -1) {\n onMatchProp?.(index, event);\n matchIndexRef.current = index;\n } else if (event.key !== ' ') {\n stringRef.current = '';\n onTyping?.(false);\n }\n });\n const onBlur = useStableCallback(event => {\n const next = event.relatedTarget;\n const currentDomReferenceElement = store.select('domReferenceElement');\n const currentFloatingElement = store.select('floatingElement');\n const withinComposite = contains(currentDomReferenceElement, next) || contains(currentFloatingElement, next);\n\n // Keep the session if focus moves within the composite (reference <-> floating).\n if (withinComposite) {\n return;\n }\n\n // End the current typing session when focus leaves the composite entirely.\n timeout.clear();\n stringRef.current = '';\n prevIndexRef.current = matchIndexRef.current;\n onTyping?.(false);\n });\n useIsoLayoutEffect(() => {\n if (!open && selectedIndex !== null) {\n return;\n }\n timeout.clear();\n matchIndexRef.current = null;\n if (stringRef.current !== '') {\n stringRef.current = '';\n onTyping?.(false);\n }\n }, [open, selectedIndex, timeout, onTyping]);\n const sharedProps = React.useMemo(() => ({\n onKeyDown,\n onBlur\n }), [onKeyDown, onBlur]);\n return React.useMemo(() => enabled ? {\n reference: sharedProps,\n floating: sharedProps\n } : {}, [enabled, sharedProps]);\n}","/**\n * @license lucide-react v1.78.0 - ISC\n *\n * This source code is licensed under the ISC license.\n * See the LICENSE file in the root directory of this source tree.\n */\n\nimport createLucideIcon from '../createLucideIcon.mjs';\n\nconst __iconData = {\n name: \"chevron-down\",\n size: 24,\n node: [[\"path\", { d: \"m6 9 6 6 6-6\", key: \"qrunsl\" }]]\n};\n__iconData.node;\nconst ChevronDown = createLucideIcon(__iconData);\n\nexport { __iconData, ChevronDown as default };\n//# sourceMappingURL=chevron-down.mjs.map\n","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuPositionerContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuPositionerContext.displayName = \"MenuPositionerContext\";\nexport function useMenuPositionerContext(optional) {\n const context = React.useContext(MenuPositionerContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuPositionerContext is missing. MenuPositioner parts must be placed within <Menu.Positioner>.' : _formatErrorMessage(33));\n }\n return context;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuRootContext.displayName = \"MenuRootContext\";\nexport function useMenuRootContext(optional) {\n const context = React.useContext(MenuRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuRootContext is missing. Menu parts must be placed within <Menu.Root>.' : _formatErrorMessage(36));\n }\n return context;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const ContextMenuRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") ContextMenuRootContext.displayName = \"ContextMenuRootContext\";\nexport function useContextMenuRootContext(optional = true) {\n const context = React.useContext(ContextMenuRootContext);\n if (context === undefined && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: ContextMenuRootContext is missing. ContextMenu parts must be placed within <ContextMenu.Root>.' : _formatErrorMessage(25));\n }\n return context;\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { MenuRootContext } from \"../root/MenuRootContext.mjs\";\n\n/**\n * The filter implementation that a filterable root hands to the parts below it. Only the roots\n * `Menu.FilterProvider` renders import it, so a plain menu never bundles it. Parts whose whole\n * structure differs are swapped as components; parts that only register with the filter call an\n * injected hook, so a menu that never renders them doesn't bundle a second implementation.\n */\n\n/** Static below a filter root: the implementation never changes, so subscribers never re-render. */\nexport const MenuFilterImplContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") MenuFilterImplContext.displayName = \"MenuFilterImplContext\";\n/**\n * The filter implementation when the menu this part belongs to is filterable, otherwise `null`.\n * `virtualFocus` marks a filter root; a plain `Menu.Root` never sets it. The result is fixed for\n * a mounted part: a filter root can't appear above it without remounting it.\n */\nexport function useMenuFilterImpl(scope = 'root') {\n const impl = React.useContext(MenuFilterImplContext);\n const root = React.useContext(MenuRootContext);\n if (impl === null || root === undefined) {\n return null;\n }\n const filterable = scope === 'submenu-trigger' ? root.virtualFocus || root.parentVirtualFocus : root.virtualFocus;\n return filterable ? impl : null;\n}\n\n/**\n * Throws unless the menu this part renders in is filterable, naming the part and the provider.\n */\nexport function useMenuFilterPart(part) {\n if (useMenuFilterImpl() === null) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? `Base UI: <Menu.${part}> must be placed in a menu wrapped in <Menu.FilterProvider>. ` + 'It reads the filter query and the matching items from the provider, which a plain menu ' + 'does not have. Wrap the <Menu.Root> or <Menu.SubmenuRoot> it belongs to in ' + '<Menu.FilterProvider>. See https://base-ui.com/react/components/menu#filtering' : _formatErrorMessage(104, part));\n }\n}\nconst UNFILTERED = {\n visible: true,\n ref: null\n};\nfunction useUnfilteredItem() {\n return UNFILTERED;\n}\n\n/**\n * Registers an item part with the filter of the menu it belongs to. A plain menu's items are\n * always visible.\n */\nexport function useMenuFilterItem(props, forwardedRef, scope = 'root') {\n const impl = useMenuFilterImpl(scope);\n const useItem = (scope === 'submenu-trigger' ? impl?.useSubmenuTrigger : impl?.useItem) ?? useUnfilteredItem;\n const item = useItem({\n label: props.label,\n children: props.children,\n render: props.render\n });\n const ref = useMergedRefs(forwardedRef, item.ref);\n return {\n visible: item.visible,\n ref,\n props: item.props\n };\n}","'use client';\n\nimport * as React from 'react';\nimport { platform } from '@base-ui/utils/platform';\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useContextMenuRootContext } from \"../../context-menu/root/ContextMenuRootContext.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { dispatchClickWithModifiers } from \"../../utils/dispatchClickWithModifiers.mjs\";\nfunction preventMouseDownDefault(event) {\n event.preventDefault();\n}\n/**\n * Returns common props shared by all menu item types.\n * This hook extracts the shared logic for id, role, tabIndex, and interaction handlers.\n */\nexport function useMenuItemCommonProps(params) {\n const {\n closeOnClick,\n highlighted,\n id,\n nodeId,\n store,\n typingRef,\n itemRef,\n itemMetadata\n } = params;\n const rootContext = useMenuRootContext();\n const contextMenuContext = useContextMenuRootContext(true);\n\n // A submenu trigger is an item of the parent menu's list, so it follows that list's focus model.\n const isSubmenuTrigger = itemMetadata.type === 'submenu-trigger';\n const virtualFocus = isSubmenuTrigger ? rootContext.parentVirtualFocus : rootContext.virtualFocus;\n const selectionStore = isSubmenuTrigger && rootContext.parent.type === 'menu' ? rootContext.parent.store : rootContext.store;\n const ariaSelected = selectionStore.useState('webkitAriaSelected', highlighted);\n const {\n events: menuEvents\n } = store.useState('floatingTreeRoot');\n const open = store.useState('open');\n const isContextMenu = contextMenuContext !== undefined;\n // `-1` rather than omitting it, which leaves links and buttons in the tab order.\n const tabIndex = !virtualFocus && open && highlighted ? 0 : -1;\n return React.useMemo(() => ({\n id,\n role: 'menuitem',\n tabIndex,\n 'aria-selected': ariaSelected,\n // Real focus stays on the input or list that owns virtual navigation.\n onMouseDown: virtualFocus ? preventMouseDownDefault : undefined,\n onKeyDown(event) {\n if (event.key === ' ' && typingRef?.current) {\n event.preventDefault();\n }\n },\n onMouseMove(event) {\n if (!nodeId) {\n return;\n }\n\n // Inform the floating tree that a menu item within this menu was hovered/moved over\n // so unrelated descendant submenus can be closed.\n menuEvents.emit('itemhover', {\n nodeId,\n target: event.currentTarget\n });\n },\n onClick(event) {\n if (closeOnClick) {\n menuEvents.emit('close', {\n domEvent: event.nativeEvent,\n reason: REASONS.itemPress\n });\n }\n },\n onMouseUp(event) {\n if (contextMenuContext) {\n const initialCursorPoint = contextMenuContext.initialCursorPointRef.current;\n contextMenuContext.initialCursorPointRef.current = null;\n if (isContextMenu && initialCursorPoint && Math.abs(event.clientX - initialCursorPoint.x) <= 1 && Math.abs(event.clientY - initialCursorPoint.y) <= 1) {\n return;\n }\n\n // On non-macOS platforms, this mouseup belongs to the right-click gesture\n // that opened the context menu, so it must not activate an item.\n if (isContextMenu && !platform.os.mac && event.button === 2) {\n return;\n }\n }\n if (itemRef.current && store.context.allowMouseUpTriggerRef.current && (!isContextMenu || event.button === 2)) {\n // This fires whenever the user clicks on the trigger, moves the cursor, and releases it over the item.\n // We trigger the click and override the `closeOnClick` preference to always close the menu.\n if (itemMetadata.type === 'regular-item') {\n // `detail: 1` and `pointerType: 'mouse'` mark this as a mouse-gesture click so\n // MenuRoot and FloatingFocusManager don't treat it as a keyboard activation.\n dispatchClickWithModifiers(itemRef.current, event, {\n detail: 1,\n pointerType: 'mouse'\n });\n }\n }\n }\n }), [closeOnClick, tabIndex, id, menuEvents, nodeId, store.context.allowMouseUpTriggerRef, typingRef, itemRef, contextMenuContext, isContextMenu, itemMetadata.type, ariaSelected, virtualFocus]);\n}","'use client';\n\nimport * as React from 'react';\nimport { useMergedRefs } from '@base-ui/utils/useMergedRefs';\nimport { useButton } from \"../../internals/use-button/index.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { useMenuItemCommonProps } from \"./useMenuItemCommonProps.mjs\";\nexport const REGULAR_ITEM = {\n type: 'regular-item'\n};\nexport function useMenuItem(params) {\n const {\n closeOnClick,\n disabled,\n highlighted,\n id,\n store,\n typingRef = store.context.typingRef,\n nativeButton,\n itemMetadata,\n nodeId\n } = params;\n const itemRef = React.useRef(null);\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n focusableWhenDisabled: true,\n native: nativeButton,\n composite: true\n });\n const commonProps = useMenuItemCommonProps({\n closeOnClick,\n highlighted,\n id,\n nodeId,\n store,\n typingRef,\n itemRef,\n itemMetadata\n });\n const getItemProps = React.useCallback(externalProps => {\n return mergeProps(commonProps, {\n onMouseEnter(event) {\n if (itemMetadata.type !== 'submenu-trigger') {\n return;\n }\n itemMetadata.setActive(event.nativeEvent);\n }\n }, externalProps, getButtonProps);\n }, [commonProps, getButtonProps, itemMetadata]);\n const mergedRef = useMergedRefs(itemRef, buttonRef);\n return React.useMemo(() => ({\n getItemProps,\n itemRef: mergedRef\n }), [getItemProps, mergedRef]);\n}","/**\n * Present when the menu checkbox item is checked.\n */\nexport const checked = 'data-checked';\n/**\n * Present when the menu checkbox item is not checked.\n */\nexport const unchecked = 'data-unchecked';\n/**\n * Present when the menu checkbox item is disabled.\n */\nexport const disabled = 'data-disabled';\n/**\n * Present when the menu checkbox item is highlighted.\n */\nexport const highlighted = 'data-highlighted';","import { transitionStatusMapping } from \"../../internals/stateAttributesMapping.mjs\";\nimport * as MenuCheckboxItemDataAttributes from \"../checkbox-item/MenuCheckboxItemDataAttributes.mjs\";\nexport const itemMapping = {\n checked(value) {\n if (value) {\n return {\n [MenuCheckboxItemDataAttributes.checked]: ''\n };\n }\n return {\n [MenuCheckboxItemDataAttributes.unchecked]: ''\n };\n },\n ...transitionStatusMapping\n};","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuGroupContext.displayName = \"MenuGroupContext\";\nexport function useMenuGroupRootContext() {\n const context = React.useContext(MenuGroupContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuGroupContext is missing. Menu group parts must be used within <Menu.Group> or <Menu.RadioGroup>.' : _formatErrorMessage(31));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useMenuFilterImpl } from \"../filter-root/MenuFilterContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { MenuGroupContext } from \"./MenuGroupContext.mjs\";\n\n/**\n * @internal\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const MenuGroupPlain = /*#__PURE__*/React.forwardRef(function MenuGroupPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n ...elementProps\n } = componentProps;\n const [labelId, setLabelId] = React.useState(undefined);\n const element = useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: {\n role: 'group',\n 'aria-labelledby': labelId,\n ...elementProps\n }\n });\n return /*#__PURE__*/_jsx(MenuGroupContext.Provider, {\n value: setLabelId,\n children: element\n });\n});\n\n/**\n * Groups related menu items with the corresponding label.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuGroupPlain.displayName = \"MenuGroupPlain\";\nexport const MenuGroup = /*#__PURE__*/React.forwardRef(function MenuGroup(props, forwardedRef) {\n const Group = useMenuFilterImpl()?.Group ?? MenuGroupPlain;\n return /*#__PURE__*/_jsx(Group, {\n ...props,\n ref: forwardedRef\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuGroup.displayName = \"MenuGroup\";","'use client';\n\nimport * as React from 'react';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useMenuGroupRootContext } from \"../group/MenuGroupContext.mjs\";\n\n/**\n * An accessible label that is automatically associated with its parent group.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nexport const MenuGroupLabel = /*#__PURE__*/React.forwardRef(function MenuGroupLabel(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n id: idProp,\n ...elementProps\n } = componentProps;\n const id = useBaseUiId(idProp);\n const setLabelId = useMenuGroupRootContext();\n useIsoLayoutEffect(() => {\n setLabelId(id);\n return () => {\n setLabelId(currentId => currentId === id ? undefined : currentId);\n };\n }, [setLabelId, id]);\n return useRenderElement('div', componentProps, {\n ref: forwardedRef,\n props: {\n id,\n 'aria-hidden': true,\n ...elementProps\n }\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuGroupLabel.displayName = \"MenuGroupLabel\";","'use client';\n\nimport * as React from 'react';\nimport { useMenuFilterItem } from \"../filter-root/MenuFilterContext.mjs\";\nimport { REGULAR_ITEM, useMenuItem } from \"./useMenuItem.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst MenuItemPlain = /*#__PURE__*/React.forwardRef(function MenuItemPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n label,\n nativeButton = false,\n disabled: disabledProp = false,\n closeOnClick = true,\n style,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useMenuRootContext();\n const listItem = useCompositeListItem({\n guess: true,\n label\n });\n const id = useBaseUiId(idProp);\n const rootDisabled = store.useState('disabled');\n const highlighted = store.useState('isActive', listItem.index);\n const nodeId = store.useState('floatingNodeId');\n const itemProps = store.useState('itemProps');\n const disabled = disabledProp || rootDisabled;\n const {\n getItemProps,\n itemRef\n } = useMenuItem({\n closeOnClick,\n disabled,\n highlighted,\n id,\n store,\n nativeButton,\n nodeId,\n itemMetadata: REGULAR_ITEM\n });\n const state = {\n disabled,\n highlighted\n };\n return useRenderElement('div', componentProps, {\n state,\n props: [itemProps, elementProps, getItemProps],\n ref: [itemRef, forwardedRef, listItem.ref]\n });\n});\n\n/**\n * An individual interactive item in the menu.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuItemPlain.displayName = \"MenuItemPlain\";\nexport const MenuItem = /*#__PURE__*/React.forwardRef(function MenuItem(props, forwardedRef) {\n const filterItem = useMenuFilterItem(props, forwardedRef);\n if (!filterItem.visible) {\n return null;\n }\n return /*#__PURE__*/_jsx(MenuItemPlain, {\n ...props,\n ref: filterItem.ref\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuItem.displayName = \"MenuItem\";","'use client';\n\nimport * as React from 'react';\nexport const MenuSubmenuRootContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuSubmenuRootContext.displayName = \"MenuSubmenuRootContext\";\nexport function useMenuSubmenuRootContext() {\n return React.useContext(MenuSubmenuRootContext);\n}","import * as React from 'react';\nimport { unwrapLazyRenderProp } from \"./useRenderElement.mjs\";\n/**\n * Resolves an element's id using the same precedence as `useRenderElement`.\n * Returns `''` when the element renders with an explicitly empty id, which consumers must treat\n * as \"no id\" rather than falling back to the generated one, so ARIA relationships never reference\n * an id no element carries. Render callbacks are opaque and are expected to use the id passed to\n * them.\n *\n * @internal\n */\nexport function resolveRenderedId(props, fallbackId) {\n const render = unwrapLazyRenderProp(props.render);\n if (/*#__PURE__*/React.isValidElement(render)) {\n const renderProps = render.props;\n if (Object.hasOwn(renderProps, 'id')) {\n return renderProps.id ?? '';\n }\n }\n return props.id ?? fallbackId;\n}\n\n/**\n * Resolves the element's id and returns a ref that publishes it to the owner while mounted.\n * A generated fallback is never published as an override, so removing an explicit id lets the\n * element return to the generated one.\n *\n * @internal\n */\nexport function useRenderedId(props, defaultId, setId) {\n const id = resolveRenderedId(props, defaultId);\n const registeredId = id === defaultId ? undefined : id;\n const ref = React.useCallback(element => setId?.(element ? registeredId : undefined), [registeredId, setId]);\n return [id, ref];\n}","import * as React from 'react';\nimport { unwrapLazyRenderProp } from \"./useRenderElement.mjs\";\nexport function resolvePopupLabel(props, activeTriggerElement, activeTriggerId) {\n const render = unwrapLazyRenderProp(props.render);\n const renderedElementProps = /*#__PURE__*/React.isValidElement(render) ? render.props : undefined;\n const ariaLabel = props['aria-label'] ?? renderedElementProps?.['aria-label'];\n let ariaLabelledBy = props['aria-labelledby'] ?? renderedElementProps?.['aria-labelledby'];\n if (ariaLabelledBy == null && !ariaLabel) {\n // Prefer the element's live id: a `render` element's own id wins over the registered one.\n ariaLabelledBy = activeTriggerElement ? activeTriggerElement.id || undefined : activeTriggerId || undefined;\n }\n return ariaLabelledBy;\n}","'use client';\n\nimport * as React from 'react';\nimport { FloatingFocusManager, useHoverFloatingInteraction } from \"../../floating-ui-react/index.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useMenuPositionerContext } from \"../positioner/MenuPositionerContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { popupTransitionStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useToolbarRootContext } from \"../../toolbar/root/ToolbarRootContext.mjs\";\nimport { COMPOSITE_KEYS } from \"../../internals/composite/composite.mjs\";\nimport { getDisabledMountTransitionStyles } from \"../../internals/getDisabledMountTransitionStyles.mjs\";\nimport { useMenuSubmenuRootContext } from \"../submenu-root/MenuSubmenuRootContext.mjs\";\nimport { useRenderedId } from \"../../internals/resolveRenderedId.mjs\";\nimport { resolvePopupLabel } from \"../../internals/resolvePopupLabel.mjs\";\nimport { MenuFilterImplContext, useMenuFilterImpl } from \"../filter-root/MenuFilterContext.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * @internal\n */\nexport const MenuPopupPlain = /*#__PURE__*/React.forwardRef(function MenuPopupPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n finalFocus,\n id: idProp,\n initialFocus: initialFocusProp,\n ...elementProps\n } = componentProps;\n const {\n store,\n defaultFloatingId,\n setRenderedFloatingId,\n virtualFocus,\n orientation\n } = useMenuRootContext();\n const inheritedSubmenuRootContext = useMenuSubmenuRootContext();\n const {\n side,\n align\n } = useMenuPositionerContext();\n const insideToolbar = useToolbarRootContext(true) != null;\n const open = store.useState('open');\n const transitionStatus = store.useState('transitionStatus');\n const popupProps = store.useState('popupProps');\n const mounted = store.useState('mounted');\n const instantType = store.useState('instantType');\n const activeTriggerElement = store.useState('activeTriggerElement');\n const parent = store.useState('parent');\n const lastOpenChangeReason = store.useState('lastOpenChangeReason');\n const rootId = store.useState('rootId');\n const floatingContext = store.useState('floatingRootContext');\n const floatingTreeRoot = store.useState('floatingTreeRoot');\n const closeDelay = store.useState('closeDelay');\n const hoverEnabled = store.useState('hoverEnabled');\n const disabled = store.useState('disabled');\n const openMethod = store.useState('openMethod');\n const activeTriggerId = store.useState('activeTriggerId');\n const listElement = store.useState('listElement');\n const [id, registerIdRef] = useRenderedId(componentProps, defaultFloatingId, setRenderedFloatingId);\n const ariaLabelledBy = resolvePopupLabel(componentProps, activeTriggerElement, activeTriggerId);\n\n // A dialog's menu can render under a submenu provider; only the actual submenu inherits it.\n const submenuRootContext = parent.type === 'menu' ? inheritedSubmenuRootContext : undefined;\n const isContextMenu = parent.type === 'context-menu';\n let initialFocus = initialFocusProp ?? parent.type !== 'menu';\n if (initialFocusProp === undefined && listElement && parent.type !== 'menu') {\n initialFocus = () => {\n // A keyboard or screen reader open highlights an item, which list navigation focuses.\n if (store.state.activeIndex !== null) {\n return false;\n }\n // The list holds the `menu` role, so a pointer open lands focus on it rather than on the\n // presentational popup.\n return listElement;\n };\n }\n useOpenChangeComplete({\n open,\n ref: store.context.popupRef,\n onComplete() {\n if (open) {\n store.context.onOpenChangeComplete?.(true);\n }\n }\n });\n React.useEffect(() => {\n function handleClose(event) {\n store.setOpen(false, createChangeEventDetails(event.reason, event.domEvent));\n }\n floatingTreeRoot.events.on('close', handleClose);\n return () => {\n floatingTreeRoot.events.off('close', handleClose);\n };\n }, [floatingTreeRoot.events, store]);\n useHoverFloatingInteraction(floatingContext, {\n enabled: hoverEnabled && !disabled && !isContextMenu && parent.type !== 'menubar',\n closeDelay\n });\n const setPopupElement = store.useStateSetter('popupElement');\n\n // Only a menu under a filter root bundles the handoff to a filterable parent. Whether one is\n // above is fixed for a mounted popup, so the hook doesn't change between renders.\n const useParentHandoff = React.useContext(MenuFilterImplContext)?.useParentHandoff ?? useNoParentHandoff;\n const {\n parentVirtualFocusRef,\n handleFocus\n } = useParentHandoff(store, parent, open, virtualFocus);\n const state = {\n transitionStatus,\n side,\n align,\n open,\n nested: parent.type === 'menu',\n instant: instantType\n };\n const element = useRenderElement('div', componentProps, {\n state,\n ref: [forwardedRef, store.context.popupRef, setPopupElement, registerIdRef],\n stateAttributesMapping: popupTransitionStateMapping,\n props: [popupProps, {\n id,\n // A rendered `Menu.List` carries the `menu` semantics instead.\n ...(listElement ? {\n role: 'presentation'\n } : {\n role: 'menu',\n // `menu` is implicitly vertical, so only the non-default value needs to be\n // rendered.\n 'aria-orientation': orientation === 'horizontal' ? 'horizontal' : undefined,\n 'aria-labelledby': ariaLabelledBy\n }),\n onKeyDown(event) {\n submenuRootContext?.onPopupKeyDown?.(event);\n if (insideToolbar && COMPOSITE_KEYS.has(event.key)) {\n event.stopPropagation();\n }\n },\n onFocus: handleFocus\n }, getDisabledMountTransitionStyles(transitionStatus), elementProps, {\n 'data-rootownerid': rootId\n }]\n });\n let returnFocus = parent.type === undefined || isContextMenu;\n if (activeTriggerElement || parent.type === 'menubar' && lastOpenChangeReason !== REASONS.outsidePress) {\n returnFocus = true;\n }\n\n // Internal defaults rather than consumer targets, so focus that already moved is respected.\n const dynamicReturnFocus = submenuRootContext?.getReturnElement ?? parentVirtualFocusRef;\n return /*#__PURE__*/_jsx(FloatingFocusManager, {\n context: floatingContext,\n openInteractionType: openMethod,\n modal: isContextMenu,\n disabled: !mounted,\n returnFocus: finalFocus ?? dynamicReturnFocus ?? returnFocus,\n explicitReturnFocus: finalFocus === undefined && dynamicReturnFocus ? false : undefined,\n initialFocus: initialFocus,\n restoreFocus: true,\n getInsideElements: parent.type === undefined ? () => [store.context.beforeTriggerFocusGuardRef.current] : undefined,\n externalTree: parent.type !== 'menubar' ? floatingTreeRoot : undefined,\n previousFocusableElement: activeTriggerElement,\n nextFocusableElement: parent.type === undefined ? store.context.triggerFocusTargetRef : undefined,\n beforeContentFocusGuardRef: store.context.beforeContentFocusGuardRef,\n children: element\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuPopupPlain.displayName = \"MenuPopupPlain\";\nconst NO_PARENT_HANDOFF = {\n parentVirtualFocusRef: undefined,\n handleFocus: undefined\n};\nfunction useNoParentHandoff() {\n return NO_PARENT_HANDOFF;\n}\n\n/**\n * A container for the menu items.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nexport const MenuPopup = /*#__PURE__*/React.forwardRef(function MenuPopup(props, forwardedRef) {\n const Popup = useMenuFilterImpl()?.Popup ?? MenuPopupPlain;\n return /*#__PURE__*/_jsx(Popup, {\n ...props,\n ref: forwardedRef\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuPopup.displayName = \"MenuPopup\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuPortalContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuPortalContext.displayName = \"MenuPortalContext\";\nexport function useMenuPortalContext() {\n const value = React.useContext(MenuPortalContext);\n if (value === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Menu.Portal> is missing.' : _formatErrorMessage(32));\n }\n return value;\n}","'use client';\n\nimport * as React from 'react';\nimport { FloatingPortal } from \"../../floating-ui-react/index.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { MenuPortalContext } from \"./MenuPortalContext.mjs\";\n\n/**\n * A portal element that moves the popup to a different part of the DOM.\n * By default, the portal element is appended to `<body>`.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nexport const MenuPortal = /*#__PURE__*/React.forwardRef(function MenuPortal(props, forwardedRef) {\n const {\n keepMounted = false,\n ...portalProps\n } = props;\n const {\n store,\n parent\n } = useMenuRootContext();\n const mounted = store.useState('mounted');\n const shouldRender = mounted || keepMounted;\n if (!shouldRender) {\n return null;\n }\n\n // The hidden `aria-owns` owner renders here, in the React tree, so the role must be decided by\n // where this portal sits, not by the active trigger. `parent` comes from context (the `Menu.Root`\n // position), unlike the store's `parent`, which a detached trigger overwrites with its own.\n const portalOwnerRole = parent.type === 'menu' || parent.type === 'menubar' ? 'group' : undefined;\n return /*#__PURE__*/_jsx(MenuPortalContext.Provider, {\n value: keepMounted,\n children: /*#__PURE__*/_jsx(FloatingPortal, {\n ref: forwardedRef,\n ...portalProps,\n portalOwnerRole: portalOwnerRole\n })\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuPortal.displayName = \"MenuPortal\";","'use client';\n\nimport * as React from 'react';\nimport { inertValue } from '@base-ui/utils/inertValue';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { FloatingNode } from \"../../floating-ui-react/index.mjs\";\nimport { MenuPositionerContext } from \"./MenuPositionerContext.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useAnchorPositioning } from \"../../internals/useAnchorPositioning.mjs\";\nimport { CompositeList } from \"../../internals/composite/list/CompositeList.mjs\";\nimport { InternalBackdrop } from \"../../utils/InternalBackdrop.mjs\";\nimport { useMenuPortalContext } from \"../portal/MenuPortalContext.mjs\";\nimport { DROPDOWN_COLLISION_AVOIDANCE, POPUP_COLLISION_AVOIDANCE } from \"../../internals/constants.mjs\";\nimport { useContextMenuRootContext } from \"../../context-menu/root/ContextMenuRootContext.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useTriggerSwitchTransition } from \"../../internals/useTriggerSwitchTransition.mjs\";\nimport { usePositioner } from \"../../utils/usePositioner.mjs\";\nimport { useAnchoredPopupScrollLock } from \"../../utils/useAnchoredPopupScrollLock.mjs\";\n\n/**\n * Positions the menu popup against the trigger.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const MenuPositioner = /*#__PURE__*/React.forwardRef(function MenuPositioner(componentProps, forwardedRef) {\n const {\n anchor: anchorProp,\n positionMethod: positionMethodProp = 'absolute',\n className,\n render,\n side,\n align: alignProp,\n sideOffset: sideOffsetProp = 0,\n alignOffset: alignOffsetProp = 0,\n collisionBoundary = 'clipping-ancestors',\n collisionPadding = 5,\n arrowPadding = 5,\n sticky = false,\n disableAnchorTracking = false,\n collisionAvoidance: collisionAvoidanceProp = DROPDOWN_COLLISION_AVOIDANCE,\n style,\n ...elementProps\n } = componentProps;\n const {\n store,\n virtualFocus,\n syncHighlightedItem\n } = useMenuRootContext();\n const keepMounted = useMenuPortalContext();\n const contextMenuContext = useContextMenuRootContext(true);\n const parent = store.useState('parent');\n const floatingRootContext = store.useState('floatingRootContext');\n const floatingTreeRoot = store.useState('floatingTreeRoot');\n const mounted = store.useState('mounted');\n const open = store.useState('open');\n const modal = store.useState('modal');\n const openMethod = store.useState('openMethod');\n const triggerElement = store.useState('activeTriggerElement');\n const transitionStatus = store.useState('transitionStatus');\n const positionerElement = store.useState('positionerElement');\n const instantType = store.useState('instantType');\n const adaptiveOrigin = store.useState('adaptiveOrigin');\n const lastOpenChangeReason = store.useState('lastOpenChangeReason');\n const floatingNodeId = store.useState('floatingNodeId');\n const floatingParentNodeId = store.useState('floatingParentNodeId');\n const domReference = floatingRootContext.useState('domReferenceElement');\n let anchor = anchorProp;\n let sideOffset = sideOffsetProp;\n let alignOffset = alignOffsetProp;\n let align = alignProp;\n let collisionAvoidance = collisionAvoidanceProp;\n if (parent.type === 'context-menu') {\n anchor = anchorProp ?? parent.context?.anchor;\n align = align ?? 'start';\n if (!side && align !== 'center') {\n alignOffset = componentProps.alignOffset ?? 2;\n sideOffset = componentProps.sideOffset ?? -5;\n }\n }\n let computedSide = side;\n let computedAlign = align;\n if (parent.type === 'menu') {\n computedSide = computedSide ?? 'inline-end';\n computedAlign = computedAlign ?? 'start';\n collisionAvoidance = componentProps.collisionAvoidance ?? POPUP_COLLISION_AVOIDANCE;\n } else if (parent.type === 'menubar') {\n computedSide = computedSide ?? (parent.context.orientation === 'vertical' ? 'inline-end' : 'bottom');\n computedAlign = computedAlign ?? 'start';\n }\n const contextMenu = parent.type === 'context-menu';\n const positioner = useAnchorPositioning({\n anchor,\n floatingRootContext,\n positionMethod: contextMenuContext ? 'fixed' : positionMethodProp,\n mounted,\n side: computedSide,\n sideOffset,\n align: computedAlign,\n alignOffset,\n arrowPadding: contextMenu ? 0 : arrowPadding,\n collisionBoundary,\n collisionPadding,\n sticky,\n nodeId: floatingNodeId,\n keepMounted,\n disableAnchorTracking,\n collisionAvoidance,\n shift: contextMenu ? {\n crossAxis: !('side' in collisionAvoidance && collisionAvoidance.side === 'flip'),\n rootBoundary: 'layoutViewport'\n } : undefined,\n externalTree: floatingTreeRoot,\n adaptiveOrigin,\n lazyFlip: virtualFocus ? 'placement' : false\n });\n React.useEffect(() => {\n function onMenuOpenChange(details) {\n if (details.open) {\n if (details.parentNodeId === floatingNodeId) {\n store.set('hoverEnabled', false);\n }\n if (details.nodeId !== floatingNodeId && details.parentNodeId === store.select('floatingParentNodeId')) {\n store.setOpen(false, createChangeEventDetails(REASONS.siblingOpen));\n }\n }\n }\n floatingTreeRoot.events.on('menuopenchange', onMenuOpenChange);\n return () => {\n floatingTreeRoot.events.off('menuopenchange', onMenuOpenChange);\n };\n }, [store, floatingTreeRoot.events, floatingNodeId]);\n React.useEffect(() => {\n if (store.select('floatingParentNodeId') == null) {\n return undefined;\n }\n function onParentClose(details) {\n if (details.open || details.nodeId !== store.select('floatingParentNodeId')) {\n return;\n }\n const reason = details.reason ?? REASONS.siblingOpen;\n store.setOpen(false, createChangeEventDetails(reason));\n }\n floatingTreeRoot.events.on('menuopenchange', onParentClose);\n return () => {\n floatingTreeRoot.events.off('menuopenchange', onParentClose);\n };\n }, [floatingTreeRoot.events, store]);\n const closeTimeout = useTimeout();\n\n // Clear pending close timeout when the menu closes.\n React.useEffect(() => {\n if (!open) {\n closeTimeout.clear();\n }\n }, [open, closeTimeout]);\n\n // Close unrelated child submenus when hovering a different item in the parent menu.\n React.useEffect(() => {\n function onItemHover(event) {\n // If an item within our parent menu is hovered, and this menu's trigger is not that item,\n // close this submenu. This ensures hovering a different item in the parent closes other branches.\n if (!open || event.nodeId !== store.select('floatingParentNodeId')) {\n return;\n }\n if (event.target && triggerElement && triggerElement !== event.target) {\n const delay = store.select('closeDelay');\n if (delay > 0) {\n if (!closeTimeout.isStarted()) {\n closeTimeout.start(delay, () => {\n store.setOpen(false, createChangeEventDetails(REASONS.siblingOpen));\n });\n }\n } else {\n store.setOpen(false, createChangeEventDetails(REASONS.siblingOpen));\n }\n } else {\n // User re-hovered the submenu trigger, cancel pending close.\n closeTimeout.clear();\n }\n }\n floatingTreeRoot.events.on('itemhover', onItemHover);\n return () => {\n floatingTreeRoot.events.off('itemhover', onItemHover);\n };\n }, [floatingTreeRoot.events, open, triggerElement, store, closeTimeout]);\n React.useEffect(() => {\n const eventDetails = {\n open,\n nodeId: floatingNodeId,\n parentNodeId: floatingParentNodeId,\n reason: store.select('lastOpenChangeReason')\n };\n floatingTreeRoot.events.emit('menuopenchange', eventDetails);\n }, [floatingTreeRoot.events, open, store, floatingNodeId, floatingParentNodeId]);\n useTriggerSwitchTransition({\n store,\n domReference,\n positionerElement,\n open\n });\n const state = {\n open,\n side: positioner.side,\n align: positioner.align,\n anchorHidden: positioner.anchorHidden,\n nested: parent.type === 'menu',\n instant: instantType\n };\n const menubarModal = parent.type === 'menubar' && parent.context.modal;\n const popupModal = modal && lastOpenChangeReason !== REASONS.triggerHover;\n useAnchoredPopupScrollLock(open && (menubarModal || popupModal), openMethod === 'touch', positionerElement, triggerElement);\n const element = usePositioner(componentProps, state, {\n styles: positioner.positionerStyles,\n transitionStatus,\n props: elementProps,\n refs: [forwardedRef, store.useStateSetter('positionerElement')],\n hidden: !mounted,\n inert: !open\n });\n const shouldRenderBackdrop = mounted && parent.type !== 'menu' && (parent.type !== 'menubar' && modal && lastOpenChangeReason !== REASONS.triggerHover || parent.type === 'menubar' && parent.context.modal);\n\n // cuts a hole in the backdrop to allow pointer interaction with the menubar or dropdown menu trigger element\n let backdropCutout = null;\n if (parent.type === 'menubar') {\n backdropCutout = parent.context.contentElement;\n } else if (parent.type === undefined) {\n backdropCutout = triggerElement;\n }\n return /*#__PURE__*/_jsxs(MenuPositionerContext.Provider, {\n value: positioner,\n children: [shouldRenderBackdrop && /*#__PURE__*/_jsx(InternalBackdrop, {\n ref: parent.type === 'context-menu' || parent.type === 'nested-context-menu' ? parent.context.internalBackdropRef : null,\n inert: inertValue(!open),\n cutout: backdropCutout\n }), /*#__PURE__*/_jsx(FloatingNode, {\n id: floatingNodeId,\n children: /*#__PURE__*/_jsx(CompositeList, {\n elementsRef: store.context.itemDomElements,\n labelsRef: store.context.itemLabels,\n onMapChange: syncHighlightedItem,\n children: element\n })\n })]\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuPositioner.displayName = \"MenuPositioner\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuRadioGroupContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuRadioGroupContext.displayName = \"MenuRadioGroupContext\";\nexport function useMenuRadioGroupContext() {\n const context = React.useContext(MenuRadioGroupContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuRadioGroupContext is missing. MenuRadioGroup parts must be placed within <Menu.RadioGroup>.' : _formatErrorMessage(34));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { useControlled } from '@base-ui/utils/useControlled';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useMenuFilterImpl } from \"../filter-root/MenuFilterContext.mjs\";\nimport { MenuRadioGroupContext } from \"./MenuRadioGroupContext.mjs\";\nimport { MenuGroupContext } from \"../group/MenuGroupContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\n/**\n * @internal\n */\nexport const MenuRadioGroupPlain = /*#__PURE__*/React.forwardRef(function MenuRadioGroupPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n value: valueProp,\n defaultValue,\n onValueChange: onValueChangeProp,\n disabled = false,\n style,\n 'aria-labelledby': ariaLabelledByProp,\n ...elementProps\n } = componentProps;\n const [labelId, setLabelId] = React.useState(undefined);\n const [value, setValueUnwrapped] = useControlled({\n controlled: valueProp,\n default: defaultValue,\n name: 'MenuRadioGroup'\n });\n const setValue = useStableCallback((newValue, eventDetails) => {\n onValueChangeProp?.(newValue, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n setValueUnwrapped(newValue);\n });\n const state = {\n disabled\n };\n const element = useRenderElement('div', componentProps, {\n state,\n ref: forwardedRef,\n props: {\n role: 'group',\n 'aria-labelledby': ariaLabelledByProp ?? labelId,\n 'aria-disabled': disabled || undefined,\n ...elementProps\n }\n });\n const context = React.useMemo(() => ({\n value,\n setValue,\n disabled\n }), [value, setValue, disabled]);\n return /*#__PURE__*/_jsx(MenuGroupContext.Provider, {\n value: setLabelId,\n children: /*#__PURE__*/_jsx(MenuRadioGroupContext.Provider, {\n value: context,\n children: element\n })\n });\n});\n\n/**\n * Groups related radio items.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuRadioGroupPlain.displayName = \"MenuRadioGroupPlain\";\nexport const MenuRadioGroup = /*#__PURE__*/React.memo(/*#__PURE__*/React.forwardRef(function MenuRadioGroup(props, forwardedRef) {\n const RadioGroup = useMenuFilterImpl()?.RadioGroup ?? MenuRadioGroupPlain;\n return /*#__PURE__*/_jsx(RadioGroup, {\n ...props,\n ref: forwardedRef\n });\n}));\nif (process.env.NODE_ENV !== \"production\") MenuRadioGroup.displayName = \"MenuRadioGroup\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenuRadioItemContext = /*#__PURE__*/React.createContext(undefined);\nif (process.env.NODE_ENV !== \"production\") MenuRadioItemContext.displayName = \"MenuRadioItemContext\";\nexport function useMenuRadioItemContext() {\n const context = React.useContext(MenuRadioItemContext);\n if (context === undefined) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenuRadioItemContext is missing. MenuRadioItem parts must be placed within <Menu.RadioItem>.' : _formatErrorMessage(35));\n }\n return context;\n}","'use client';\n\nimport * as React from 'react';\nimport { NOOP } from '@base-ui/utils/empty';\nimport { useMenuFilterItem } from \"../filter-root/MenuFilterContext.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { useMenuRadioGroupContext } from \"../radio-group/MenuRadioGroupContext.mjs\";\nimport { MenuRadioItemContext } from \"./MenuRadioItemContext.mjs\";\nimport { itemMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { useCompositeListItem } from \"../../internals/composite/list/useCompositeListItem.mjs\";\nimport { REGULAR_ITEM, useMenuItem } from \"../item/useMenuItem.mjs\";\nimport { createChangeEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { jsx as _jsx } from \"react/jsx-runtime\";\nconst MenuRadioItemPlain = /*#__PURE__*/React.forwardRef(function MenuRadioItemPlain(componentProps, forwardedRef) {\n const {\n render,\n className,\n id: idProp,\n label,\n nativeButton = false,\n disabled: disabledProp = false,\n closeOnClick = false,\n value,\n style,\n ...elementProps\n } = componentProps;\n const {\n store\n } = useMenuRootContext();\n const {\n value: selectedValue,\n setValue: setSelectedValue,\n disabled: groupDisabled\n } = useMenuRadioGroupContext();\n const listItem = useCompositeListItem({\n guess: true,\n label\n });\n const id = useBaseUiId(idProp);\n const highlighted = store.useState('isActive', listItem.index);\n const nodeId = store.useState('floatingNodeId');\n const itemProps = store.useState('itemProps');\n const rootDisabled = store.useState('disabled');\n const disabled = disabledProp || groupDisabled || rootDisabled;\n const checked = selectedValue === value;\n const {\n getItemProps,\n itemRef\n } = useMenuItem({\n closeOnClick,\n disabled,\n highlighted,\n id,\n store,\n nativeButton,\n nodeId,\n itemMetadata: REGULAR_ITEM\n });\n const state = React.useMemo(() => ({\n disabled,\n highlighted,\n checked\n }), [disabled, highlighted, checked]);\n function handleClick(event) {\n const details = createChangeEventDetails(REASONS.itemPress, event.nativeEvent, undefined, {\n preventUnmountOnClose: NOOP\n });\n setSelectedValue(value, details);\n }\n const element = useRenderElement('div', componentProps, {\n state,\n stateAttributesMapping: itemMapping,\n props: [itemProps, {\n role: 'menuitemradio',\n 'aria-checked': checked,\n onClick: handleClick\n }, elementProps, getItemProps],\n ref: [itemRef, forwardedRef, listItem.ref]\n });\n return /*#__PURE__*/_jsx(MenuRadioItemContext.Provider, {\n value: state,\n children: element\n });\n});\n\n/**\n * A menu item that works like a radio button in a given group.\n * Renders a `<div>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuRadioItemPlain.displayName = \"MenuRadioItemPlain\";\nexport const MenuRadioItem = /*#__PURE__*/React.forwardRef(function MenuRadioItem(props, forwardedRef) {\n const filterItem = useMenuFilterItem(props, forwardedRef);\n if (!filterItem.visible) {\n return null;\n }\n return /*#__PURE__*/_jsx(MenuRadioItemPlain, {\n ...props,\n ref: filterItem.ref\n });\n});\nif (process.env.NODE_ENV !== \"production\") MenuRadioItem.displayName = \"MenuRadioItem\";","'use client';\n\nimport * as React from 'react';\nimport { useMenuRadioItemContext } from \"../radio-item/MenuRadioItemContext.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { itemMapping } from \"../utils/stateAttributesMapping.mjs\";\nimport { useTransitionStatus } from \"../../internals/useTransitionStatus.mjs\";\nimport { useOpenChangeComplete } from \"../../internals/useOpenChangeComplete.mjs\";\n\n/**\n * Indicates whether the radio item is selected.\n * Renders a `<span>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nexport const MenuRadioItemIndicator = /*#__PURE__*/React.forwardRef(function MenuRadioItemIndicator(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n keepMounted = false,\n ...elementProps\n } = componentProps;\n const item = useMenuRadioItemContext();\n const indicatorRef = React.useRef(null);\n const {\n transitionStatus,\n mounted,\n setMounted\n } = useTransitionStatus(item.checked);\n useOpenChangeComplete({\n batch: true,\n enabled: !item.checked,\n open: item.checked,\n ref: indicatorRef,\n onComplete() {\n if (!item.checked) {\n setMounted(false);\n }\n }\n });\n const state = {\n checked: item.checked,\n disabled: item.disabled,\n highlighted: item.highlighted,\n transitionStatus\n };\n const element = useRenderElement('span', componentProps, {\n state,\n stateAttributesMapping: itemMapping,\n ref: [forwardedRef, indicatorRef],\n props: {\n 'aria-hidden': true,\n ...elementProps\n },\n enabled: keepMounted || mounted\n });\n return element;\n});\nif (process.env.NODE_ENV !== \"production\") MenuRadioItemIndicator.displayName = \"MenuRadioItemIndicator\";","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nexport const MenubarContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") MenubarContext.displayName = \"MenubarContext\";\nexport function useMenubarContext(optional) {\n const context = React.useContext(MenubarContext);\n if (context === null && !optional) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: MenubarContext is missing. Menubar parts must be placed within <Menubar>.' : _formatErrorMessage(5));\n }\n return context;\n}","import { REASONS } from \"../internals/reasons.mjs\";\n\n/**\n * The `onItemHighlighted` reason for a list navigation event, matching the event type that the\n * reason promises in its details.\n */\nexport function getHighlightReason(event) {\n if (event == null) {\n return REASONS.none;\n }\n if (event.type.startsWith('key')) {\n return REASONS.keyboard;\n }\n if (event.type.startsWith('mouse') || event.type.startsWith('pointer')) {\n return REASONS.pointer;\n }\n return REASONS.none;\n}","import * as React from 'react';\nimport { ReactStore } from '@base-ui/utils/store';\nimport { EMPTY_OBJECT, NOOP } from '@base-ui/utils/empty';\nimport { platform } from '@base-ui/utils/platform';\nimport { FloatingTreeStore } from \"../../floating-ui-react/components/FloatingTreeStore.mjs\";\nimport { NullStore } from \"../../utils/NullStore.mjs\";\nimport { createInitialPopupStoreState, popupStoreSelectors, PopupTriggerMap } from \"../../utils/popups/index.mjs\";\nconst selectors = {\n ...popupStoreSelectors,\n disabled: state => state.parent.type === 'menubar' ? state.parent.context.disabled || state.disabled : state.disabled,\n modal: state => (state.parent.type === undefined || state.parent.type === 'context-menu') && (state.modal ?? true),\n openMethod: state => state.openMethod,\n keyboardOpen: state => state.keyboardOpen,\n allowMouseEnter: state => state.allowMouseEnter,\n highlightItemOnHover: state => state.highlightItemOnHover,\n parent: state => state.parent,\n rootId: state => {\n if (state.parent.type === 'menu') {\n return state.parent.store.select('rootId');\n }\n return state.parent.type !== undefined ? state.parent.context.rootId : state.rootId;\n },\n activeIndex: state => state.activeIndex,\n listElement: state => state.listElement,\n /** The trigger's `aria-controls`: the list when one holds the `menu` role, else the popup. */\n triggerControlsId: (state, triggerId) => {\n const popupId = popupStoreSelectors.triggerPopupId(state, triggerId);\n return popupId ? state.listElement?.id || popupId : undefined;\n },\n filterTriggerProps: state => state.filterTriggerProps,\n inputProps: state => state.inputProps,\n // `aria-selected` is invalid on `menuitem`, but Safari VoiceOver needs it for arrow-key\n // navigation. Limit it to WebKit while the input has focus so normal VoiceOver navigation\n // does not encounter the invalid attribute.\n webkitAriaSelected: (state, highlighted) => platform.engine.webkit && state.inputFocused && highlighted ? true : undefined,\n highlightedItemId: state => state.highlightedItem?.id || undefined,\n isActive: (state, itemIndex) => state.activeIndex === itemIndex,\n hoverEnabled: state => state.hoverEnabled,\n // `trigger-change` describes a popup moving between triggers, which only has\n // meaning while it is open. Dropping it once closed keeps a late or stale\n // restoration from marking a closing popup instant and skipping its exit\n // transition, including on close paths that never reach `setOpen` — a\n // controlled consumer committing `open={false}` goes straight through the prop.\n instantType: state => state.instantType === 'trigger-change' && !popupStoreSelectors.open(state) ? undefined : state.instantType,\n lastOpenChangeReason: state => state.openChangeReason,\n floatingTreeRoot: state => {\n if (state.parent.type === 'menu') {\n return state.parent.store.select('floatingTreeRoot');\n }\n return state.floatingTreeRoot;\n },\n floatingNodeId: state => state.floatingNodeId,\n floatingParentNodeId: state => state.floatingParentNodeId,\n itemProps: state => state.itemProps,\n closeDelay: state => state.closeDelay,\n adaptiveOrigin: state => state.adaptiveOrigin,\n keyboardEventRelay: state => {\n if (state.keyboardEventRelay) {\n return state.keyboardEventRelay;\n }\n if (state.parent.type === 'menu') {\n return state.parent.store.select('keyboardEventRelay');\n }\n return undefined;\n }\n};\n\n/**\n * The store view that detached handle-backed triggers read from. Both the real `MenuStore` and the\n * inert fallback store satisfy it, so a trigger can read from whichever store the handle currently\n * exposes. Narrowed to the members a trigger actually uses — the trigger-data members plus `setOpen`\n * (called by the focus guards) — so the exposed surface can't bypass the open-change pipeline; on\n * the detached fallback store every one of these mutations is a no-op.\n */\n\nexport class MenuStore extends ReactStore {\n constructor(initialState, floatingId, nested = false) {\n const triggerElements = new PopupTriggerMap();\n const state = createInitialState(triggerElements, floatingId, nested, initialState);\n super(state, createInitialContext(triggerElements), selectors);\n\n // Share the mouse-up trigger ref of the parent menu, if any. This observes the store's own\n // state, so the subscription lives exactly as long as the store and needs no cleanup.\n void this.observe('parent', parent => {\n if (parent.type === 'menu') {\n this.context.allowMouseUpTriggerRef = parent.store.context.allowMouseUpTriggerRef;\n } else if (parent.type !== undefined) {\n this.context.allowMouseUpTriggerRef = parent.context.allowMouseUpTriggerRef;\n }\n });\n }\n\n /**\n * Propagates changes of the parent menu's shared tree state to this store's subscribers.\n * The owning `Menu.Root` calls it from an effect so the parent store subscription is released\n * when the submenu unmounts.\n * @returns A function that removes the parent store subscription.\n */\n subscribeToParentMenu() {\n const parent = this.state.parent;\n if (parent.type !== 'menu') {\n return undefined;\n }\n let rootId = parent.store.select('rootId');\n let floatingTreeRoot = parent.store.select('floatingTreeRoot');\n let keyboardEventRelay = parent.store.select('keyboardEventRelay');\n return parent.store.subscribe(() => {\n const nextRootId = parent.store.select('rootId');\n const nextFloatingTreeRoot = parent.store.select('floatingTreeRoot');\n const nextKeyboardEventRelay = parent.store.select('keyboardEventRelay');\n if (rootId === nextRootId && floatingTreeRoot === nextFloatingTreeRoot && keyboardEventRelay === nextKeyboardEventRelay) {\n return;\n }\n rootId = nextRootId;\n floatingTreeRoot = nextFloatingTreeRoot;\n keyboardEventRelay = nextKeyboardEventRelay;\n this.notifyAll();\n });\n }\n setOpen(open, eventDetails) {\n this.state.floatingRootContext.context.events.emit('setOpen', {\n open,\n eventDetails\n });\n }\n setActiveIndex(activeIndex, reason, event) {\n // Only a write that changes the index is reported. Tagging a no-op, or a write back to the\n // reported item before the change commits, would let a later registry-driven re-emit report\n // this reason instead of `none`.\n if (this.state.activeIndex !== activeIndex) {\n const item = activeIndex === null ? undefined : this.context.itemDomElements.current[activeIndex];\n const isWriteBack = item === this.context.reportedItem;\n this.context.highlightReason = isWriteBack ? 'none' : reason;\n this.context.highlightEvent = isWriteBack ? undefined : event;\n }\n this.set('activeIndex', activeIndex);\n }\n highlightItem(element, reason, event) {\n const index = this.context.itemDomElements.current.indexOf(element);\n if (index > -1) {\n this.setActiveIndex(index, reason, event);\n }\n }\n}\n\n/**\n * Creates the inert fallback store used by detached handle-backed triggers while no `Menu.Root` is\n * attached. It preserves a menu-specific trigger registry in context so detached triggers can\n * register before migrating to the live root store. `setOpen` is a no-op (matching the inert\n * reads/writes of `NullStore`), so a trigger can hand the store to focus-guard helpers that expect\n * `setOpen` without it ever taking effect while detached.\n */\nexport function createNullMenuStore() {\n const triggerElements = new PopupTriggerMap();\n const store = new NullStore(Object.freeze(createInitialState(triggerElements)), Object.freeze(createInitialContext(triggerElements)), selectors);\n return Object.assign(store, {\n setOpen: NOOP\n });\n}\nfunction createInitialContext(triggerElements) {\n return {\n positionerRef: /*#__PURE__*/React.createRef(),\n popupRef: /*#__PURE__*/React.createRef(),\n typingRef: {\n current: false\n },\n itemDomElements: {\n current: []\n },\n itemLabels: {\n current: []\n },\n highlightReason: 'none',\n highlightEvent: undefined,\n reportedItem: undefined,\n allowMouseUpTriggerRef: {\n current: false\n },\n virtualFocusRef: undefined,\n triggerFocusTargetRef: /*#__PURE__*/React.createRef(),\n beforeTriggerFocusGuardRef: /*#__PURE__*/React.createRef(),\n beforeContentFocusGuardRef: /*#__PURE__*/React.createRef(),\n onOpenChangeComplete: undefined,\n triggerElements\n };\n}\nfunction createInitialState(triggerElements, floatingId, nested = false, initialState) {\n return {\n ...createInitialPopupStoreState(triggerElements, floatingId, nested),\n disabled: false,\n modal: true,\n openMethod: null,\n keyboardOpen: false,\n allowMouseEnter: false,\n highlightItemOnHover: true,\n parent: {\n type: undefined\n },\n rootId: undefined,\n activeIndex: null,\n listElement: null,\n filterTriggerProps: EMPTY_OBJECT,\n inputProps: EMPTY_OBJECT,\n inputFocused: false,\n highlightedItem: undefined,\n hoverEnabled: true,\n instantType: undefined,\n openChangeReason: null,\n floatingTreeRoot: new FloatingTreeStore(),\n floatingNodeId: undefined,\n floatingParentNodeId: null,\n itemProps: EMPTY_OBJECT,\n keyboardEventRelay: undefined,\n closeDelay: 0,\n adaptiveOrigin: undefined,\n ...initialState\n };\n}","'use client';\n\nimport * as React from 'react';\n\n/**\n * What `Menu.FilterProvider` hands to the root directly inside it: the filterable root\n * implementations (the provider is their only importer) and the filter props.\n */\n\n/**\n * Non-null only directly below a provider. The root that consumes it resets it, so a plain\n * `Menu.SubmenuRoot` inside a filterable menu stays plain.\n */\nexport const MenuFilterProviderContext = /*#__PURE__*/React.createContext(null);\nif (process.env.NODE_ENV !== \"production\") MenuFilterProviderContext.displayName = \"MenuFilterProviderContext\";","import { REASONS } from \"../../internals/reasons.mjs\";\n\n/**\n * Keyboard and assistive-technology activations produce `detail === 0` clicks; mouse-gesture\n * clicks (including the synthesized drag-release click from `useMenuItemCommonProps`) carry\n * `detail >= 1`.\n */\nexport function isKeyboardClick(reason, event) {\n return (reason === REASONS.triggerPress || reason === REASONS.itemPress) && event?.detail === 0;\n}\n\n/**\n * Whether a menu opens from the keyboard, which lands focus in the popup. Arrow keys report\n * `list-navigation`; Enter and Space dispatch a click carrying no pointer detail.\n */\nexport function isKeyboardOpen(reason, event) {\n return reason === REASONS.listNavigation || isKeyboardClick(reason, event);\n}","'use client';\n\nimport * as React from 'react';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { useRefWithInit } from '@base-ui/utils/useRefWithInit';\nimport { EMPTY_ARRAY, EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { fastComponent } from '@base-ui/utils/fastHooks';\nimport { FloatingTree, useDismiss, useFloatingNodeId, useFloatingParentNodeId, useListNavigation, useTypeahead, useSyncedFloatingRootContext } from \"../../floating-ui-react/index.mjs\";\nimport { MenuRootContext, useMenuRootContext } from \"./MenuRootContext.mjs\";\nimport { useMenubarContext } from \"../../menubar/MenubarContext.mjs\";\nimport { TYPEAHEAD_RESET_MS } from \"../../internals/constants.mjs\";\nimport { useDirection } from \"../../internals/direction-context/DirectionContext.mjs\";\nimport { useOpenInteractionType } from \"../../utils/useOpenInteractionType.mjs\";\nimport { createChangeEventDetails, createGenericEventDetails } from \"../../internals/createBaseUIEventDetails.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { getHighlightReason } from \"../../utils/getHighlightReason.mjs\";\nimport { useContextMenuRootContext } from \"../../context-menu/root/ContextMenuRootContext.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\nimport { useAnimationsFinished } from \"../../internals/useAnimationsFinished.mjs\";\nimport { MenuStore } from \"../store/MenuStore.mjs\";\nimport { attachPreventUnmountOnClose, FOCUSABLE_POPUP_PROPS, createPopupOpenState, PopupHandleAttachment, useImplicitActiveTrigger, useOpenStateTransitions, usePopupInteractionProps } from \"../../utils/popups/index.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { MenuFilterProviderContext } from \"../filter-provider/MenuFilterProviderContext.mjs\";\nimport { isKeyboardClick, isKeyboardOpen } from \"../utils/isKeyboardOpen.mjs\";\n\n/**\n * @internal\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const MenuRootInternal = fastComponent(function MenuRootInternal(props) {\n const {\n children,\n open: openProp,\n onOpenChange,\n onOpenChangeComplete,\n onItemHighlighted: onItemHighlightedProp,\n defaultOpen = false,\n disabled: disabledProp = false,\n modal: modalProp,\n loopFocus = true,\n orientation = 'vertical',\n actionsRef,\n closeParentOnEsc = false,\n handle,\n triggerId: triggerIdProp,\n defaultTriggerId: defaultTriggerIdProp = null,\n highlightItemOnHover = true,\n isSubmenu = false,\n virtualFocus = false,\n virtualFocusRef,\n allowEscape = true,\n resetOnPointerLeave = true\n } = props;\n const contextMenuContext = useContextMenuRootContext(true);\n const parentMenuRootContext = useMenuRootContext(true);\n const menubarContext = useMenubarContext(true);\n\n // Depend on the stable pieces rather than the parent context object, so a parent context\n // invalidation doesn't cascade into every descendant root's context.\n const enclosingMenuStore = parentMenuRootContext?.store;\n const parentVirtualFocus = parentMenuRootContext?.virtualFocus ?? false;\n const parentFromContext = React.useMemo(() => {\n if (isSubmenu && enclosingMenuStore) {\n return {\n type: 'menu',\n store: enclosingMenuStore\n };\n }\n if (menubarContext) {\n return {\n type: 'menubar',\n context: menubarContext\n };\n }\n\n // Ensure this is not a Menu nested inside ContextMenu.Trigger.\n // ContextMenu parentContext is always undefined as ContextMenu.Root is instantiated with\n // <MenuRootContext.Provider value={undefined}>\n if (contextMenuContext && !enclosingMenuStore) {\n return {\n type: 'context-menu',\n context: contextMenuContext\n };\n }\n return {\n type: undefined\n };\n }, [contextMenuContext, enclosingMenuStore, menubarContext, isSubmenu]);\n const rootId = useBaseUiId();\n // React 17 resolves generated ids in an effect, so they must be read live rather than captured\n // in a state initializer.\n const defaultFloatingId = useBaseUiId();\n const [renderedFloatingId, setRenderedFloatingId] = React.useState(undefined);\n\n // A registered `''` means the popup rendered with an explicitly empty id, so nothing may point\n // at the generated fallback.\n const floatingId = (renderedFloatingId ?? defaultFloatingId) || undefined;\n const floatingParentNodeIdFromContext = useFloatingParentNodeId();\n const parentMenuStore = parentFromContext.type === 'menu' ? parentFromContext.store : undefined;\n // An initially open submenu should animate in only when the user watches it appear, i.e. when\n // its subtree mounts because the parent popup is playing its own enter transition. A parent\n // that was `defaultOpen` at page load never passes through `'starting'`, and under a\n // `keepMounted` parent these initializers run at page load while the parent's status is still\n // `undefined` — in both cases the submenu is page-load content that must not animate. Gated on\n // being open at mount so a closed submenu doesn't seed `instantType` it would never clear. Read\n // during the first render only — consumed exclusively by first-render initializers below\n // (`useState` and the store's initial state).\n const animateInitialOpen = (openProp ?? defaultOpen) && parentMenuStore?.state.transitionStatus === 'starting';\n\n // Mirror an instantly-opened parent (e.g. keyboard click) so `[data-instant]` styling\n // suppresses the enter transition on both popups or neither. Captured once —\n // `animateInitialOpen` is only meaningful during the first render.\n const seededInstantType = useRefWithInit(() => animateInitialOpen ? parentMenuStore?.state.instantType : undefined).current;\n const store = useRefWithInit(() => {\n const menuStore = new MenuStore({\n open: defaultOpen,\n openProp,\n activeTriggerId: defaultTriggerIdProp,\n triggerIdProp,\n parent: parentFromContext,\n disabled: disabledProp,\n highlightItemOnHover,\n modal: parentFromContext.type === undefined ? modalProp : undefined,\n rootId,\n instantType: seededInstantType\n }, floatingId, floatingParentNodeIdFromContext != null);\n // A stable ref object, so descendants can read it during render from the first commit.\n menuStore.context.virtualFocusRef = virtualFocusRef;\n return menuStore;\n }).current;\n store.useControlledProp('openProp', openProp);\n store.useControlledProp('triggerIdProp', triggerIdProp);\n store.useContextCallback('onOpenChangeComplete', onOpenChangeComplete);\n const floatingTreeRoot = store.useState('floatingTreeRoot');\n const floatingNodeIdFromContext = useFloatingNodeId(floatingTreeRoot);\n const open = store.useState('open');\n const activeTriggerElement = store.useState('activeTriggerElement');\n const positionerElement = store.useState('positionerElement');\n const hoverEnabled = store.useState('hoverEnabled');\n const disabled = store.useState('disabled');\n const lastOpenChangeReason = store.useState('lastOpenChangeReason');\n const parent = store.useState('parent');\n const activeIndex = store.useState('activeIndex');\n const keyboardOpen = store.useState('keyboardOpen');\n const payload = store.useState('payload');\n const floatingParentNodeId = store.useState('floatingParentNodeId');\n const openEventRef = React.useRef(null);\n const allowOutsidePressDismissalRef = React.useRef(parent.type !== 'context-menu');\n const allowOutsidePressDismissalTimeout = useTimeout();\n const allowTouchToCloseRef = React.useRef(true);\n const allowTouchToCloseTimeout = useTimeout();\n const nested = floatingParentNodeId != null;\n if (process.env.NODE_ENV !== 'production') {\n if (parent.type !== undefined && modalProp !== undefined) {\n console.warn('Base UI: The `modal` prop is not supported on nested menus. It will be ignored.');\n }\n }\n const {\n openMethod,\n triggerProps: interactionTypeProps\n } = useOpenInteractionType(open);\n store.useSyncedValues({\n disabled: disabledProp,\n highlightItemOnHover,\n modal: parent.type === undefined ? modalProp : undefined,\n openMethod,\n rootId\n });\n useImplicitActiveTrigger(store);\n const {\n forceUnmount,\n transitionStatus\n } = useOpenStateTransitions(open, store, () => {\n store.set('allowMouseEnter', false);\n }, animateInitialOpen);\n const runOnceAnimationsFinish = useAnimationsFinished(store.context.popupRef);\n\n // An inherited `instantType` is only for the initial reveal. A later controlled `open` flip\n // bypasses `setOpen`, so nothing would reset it and `[data-instant]` would wrongly suppress\n // every subsequent transition. Clear it once the enter phase settles, unless an interactive\n // open change already replaced it.\n React.useEffect(() => {\n if (seededInstantType === undefined) {\n return undefined;\n }\n const clearSeededInstantType = () => {\n if (store.state.instantType === seededInstantType) {\n store.set('instantType', undefined);\n }\n };\n\n // A controlled close can interrupt the initial enter before the animations-finished cleanup\n // below fires (its abort cancels the pending callback, and a closed popup schedules no new\n // one). Nothing is left to protect once closing starts — the exit's suppression was already\n // decided at its trigger commit — so clear now or the next reopen renders a stale\n // `[data-instant]`.\n if (!open) {\n clearSeededInstantType();\n return undefined;\n }\n if (transitionStatus !== undefined) {\n return undefined;\n }\n\n // With no popup element (e.g. its subtree is suspended or waiting on data), there is no\n // enter transition to protect, and `useAnimationsFinished` would return without invoking the\n // callback — a ref assignment alone would never rerun this effect, leaving the seed stuck.\n // Clear immediately: a popup that appears after the reveal settles is page-load-like content.\n if (store.context.popupRef.current == null) {\n clearSeededInstantType();\n return undefined;\n }\n const abortController = new AbortController();\n runOnceAnimationsFinish(clearSeededInstantType, abortController.signal);\n return () => {\n abortController.abort();\n };\n }, [seededInstantType, open, transitionStatus, runOnceAnimationsFinish, store]);\n useIsoLayoutEffect(() => {\n if (contextMenuContext && !parentMenuRootContext) {\n // This is a context menu root.\n // It doesn't support detached triggers yet, so we have to sync the parent context manually.\n store.update({\n parent: {\n type: 'context-menu',\n context: contextMenuContext\n },\n floatingNodeId: floatingNodeIdFromContext,\n floatingParentNodeId: floatingParentNodeIdFromContext\n });\n } else if (parentMenuRootContext || !store.select('activeTriggerElement')) {\n // Without an active trigger, the root must supply its own tree IDs.\n // Read the store here: a trigger can register after render, before this effect.\n store.update({\n floatingNodeId: floatingNodeIdFromContext,\n floatingParentNodeId: floatingParentNodeIdFromContext\n });\n }\n }, [contextMenuContext, parentMenuRootContext, floatingNodeIdFromContext, floatingParentNodeIdFromContext, activeTriggerElement, store]);\n React.useEffect(() => {\n if (!open) {\n openEventRef.current = null;\n }\n if (parent.type !== 'context-menu') {\n return;\n }\n if (!open) {\n allowOutsidePressDismissalTimeout.clear();\n allowOutsidePressDismissalRef.current = false;\n return;\n }\n\n // With `mousedown` outside press events and long press touch input, there\n // needs to be a grace period after opening to ensure the dismissal event\n // doesn't fire immediately after open.\n allowOutsidePressDismissalTimeout.start(500, () => {\n allowOutsidePressDismissalRef.current = true;\n });\n }, [allowOutsidePressDismissalTimeout, open, parent.type]);\n useIsoLayoutEffect(() => {\n if (!open && !hoverEnabled) {\n store.set('hoverEnabled', true);\n }\n }, [open, hoverEnabled, store]);\n const setOpen = useStableCallback((nextOpen, eventDetails) => {\n const reason = eventDetails.reason;\n\n // Read the store directly, as relayed tree events and stale hover timers can request\n // a close after the state changed but before this component re-rendered.\n if (!nextOpen && !store.select('open')) {\n return;\n }\n if (open === nextOpen && eventDetails.trigger === activeTriggerElement && lastOpenChangeReason === reason) {\n return;\n }\n const shouldPreventUnmountOnClose = attachPreventUnmountOnClose(eventDetails);\n\n // Do not immediately reset the activeTriggerId to allow\n // exit animations to play and focus to be returned correctly.\n if (!nextOpen && eventDetails.trigger == null) {\n eventDetails.trigger = activeTriggerElement ?? undefined;\n }\n onOpenChange?.(nextOpen, eventDetails);\n if (eventDetails.isCanceled) {\n return;\n }\n store.state.floatingRootContext.dispatchOpenChange(nextOpen, eventDetails);\n const nativeEvent = eventDetails.event;\n if (nextOpen === false && reason !== REASONS.itemPress && nativeEvent?.type === 'click' && nativeEvent.pointerType === 'touch' && !allowTouchToCloseRef.current) {\n return;\n }\n\n // Prevent the menu from closing on mobile devices that have a delayed click event.\n // In some cases the menu, when tapped, will fire the focus event first and then the click event.\n // Without this guard, the menu will close immediately after opening.\n if (nextOpen && reason === REASONS.triggerFocus) {\n allowTouchToCloseRef.current = false;\n allowTouchToCloseTimeout.start(300, () => {\n allowTouchToCloseRef.current = true;\n });\n } else {\n allowTouchToCloseRef.current = true;\n allowTouchToCloseTimeout.clear();\n }\n const isDismissClose = !nextOpen && (reason === REASONS.escapeKey || reason == null);\n openEventRef.current = eventDetails.event;\n const popupOpenState = createPopupOpenState(store.state, nextOpen, eventDetails.trigger, shouldPreventUnmountOnClose());\n popupOpenState.openChangeReason = reason;\n popupOpenState.keyboardOpen = nextOpen && isKeyboardOpen(reason, nativeEvent);\n if (parent.type === 'menubar' && (reason === REASONS.triggerFocus || reason === REASONS.focusOut || reason === REASONS.triggerHover || reason === REASONS.listNavigation || reason === REASONS.siblingOpen)) {\n popupOpenState.instantType = 'group';\n } else if (isKeyboardClick(reason, nativeEvent)) {\n popupOpenState.instantType = 'click';\n } else if (isDismissClose) {\n popupOpenState.instantType = 'dismiss';\n } else {\n popupOpenState.instantType = undefined;\n }\n\n // `instantType` must land in the same update that mounts the popup subtree: in React 17\n // legacy mode this `update` can flush synchronously, and a separate `instantType` write\n // after it would come too late for an initially open submenu seeding its own store from\n // this one during that flush.\n store.update(popupOpenState);\n });\n const floatingRootContext = useSyncedFloatingRootContext({\n popupStore: store,\n floatingRootContext: store.state.floatingRootContext,\n floatingId,\n nested: floatingParentNodeIdFromContext != null,\n onOpenChange: setOpen\n });\n const floatingEvents = floatingRootContext.context.events;\n\n // Registered in a layout effect (not a passive one) so `setOpen` emits from imperative\n // `MenuHandle.open()` calls made in the same commit this root mounts — e.g. from another layout\n // effect during a route-transition handoff — are received instead of being silently dropped.\n useIsoLayoutEffect(() => {\n const handleSetOpenEvent = ({\n open: nextOpen,\n eventDetails\n }) => setOpen(nextOpen, eventDetails);\n floatingEvents.on('setOpen', handleSetOpenEvent);\n return () => {\n floatingEvents?.off('setOpen', handleSetOpenEvent);\n };\n }, [floatingEvents, setOpen]);\n useIsoLayoutEffect(() => store.subscribeToParentMenu(), [store]);\n const handleImperativeClose = React.useCallback(() => {\n store.setOpen(false, createChangeEventDetails(REASONS.imperativeAction));\n }, [store]);\n React.useImperativeHandle(actionsRef, () => ({\n unmount: forceUnmount,\n close: handleImperativeClose\n }), [forceUnmount, handleImperativeClose]);\n let ctx;\n if (parent.type === 'context-menu') {\n ctx = parent.context;\n }\n React.useImperativeHandle(ctx?.positionerRef, () => positionerElement, [positionerElement]);\n React.useImperativeHandle(ctx?.actionsRef, () => ({\n setOpen\n }), [setOpen]);\n const dismiss = useDismiss(floatingRootContext, {\n enabled: !disabled,\n bubbles: {\n escapeKey: closeParentOnEsc && parent.type === 'menu'\n },\n outsidePress() {\n if (parent.type !== 'context-menu' || openEventRef.current?.type === 'contextmenu') {\n return true;\n }\n return allowOutsidePressDismissalRef.current;\n },\n externalTree: nested ? floatingTreeRoot : undefined\n });\n const direction = useDirection();\n const listNavigation = useListNavigation(floatingRootContext, {\n enabled: !disabled,\n listRef: store.context.itemDomElements,\n activeIndex,\n virtual: virtualFocus,\n nested: parent.type === 'menubar' || !virtualFocus && parent.type !== undefined,\n parentOrientation: parent.type === 'menubar' ? parent.context.orientation : undefined,\n loopFocus,\n // Filtered menus keep DOM focus on the input, while keyboard and virtual opens initially\n // highlight an item as ordinary menus do. The input stays in the arrow-key loop unless the\n // filter highlights automatically.\n focusItemOnOpen: virtualFocus ? keyboardOpen : undefined,\n allowEscape: virtualFocus && loopFocus && allowEscape,\n orientation,\n // A virtual-focus list can navigate on either axis, but its trigger always opens on the\n // vertical one.\n triggerOrientation: virtualFocus ? 'vertical' : orientation,\n rtl: direction === 'rtl',\n disabledIndices: EMPTY_ARRAY,\n onNavigate(nextActiveIndex, event) {\n store.setActiveIndex(nextActiveIndex, getHighlightReason(event), event?.nativeEvent);\n },\n // A virtual-focus submenu's keyboard opening is orchestrated by its navigation wrapper based\n // on both menus' orientations; the generic arrow-key opening would also react to the parent's\n // forwarded cross-axis keys while closed.\n openOnArrowKeyDown: parent.type !== 'context-menu' && !(virtualFocus && isSubmenu),\n externalTree: !virtualFocus && nested ? floatingTreeRoot : undefined,\n nestedReturnFocusRef: parentMenuStore?.context.virtualFocusRef,\n focusItemOnHover: highlightItemOnHover,\n resetOnPointerLeave\n });\n const onTyping = React.useCallback(nextTyping => {\n store.context.typingRef.current = nextTyping;\n }, [store]);\n const typeahead = useTypeahead(floatingRootContext, {\n // Under virtual focus the input owns typing, so typeahead would race the filter query.\n enabled: !disabled && !virtualFocus,\n listRef: store.context.itemLabels,\n elementsRef: store.context.itemDomElements,\n activeIndex,\n resetMs: TYPEAHEAD_RESET_MS,\n onMatch: (index, event) => {\n if (open && index !== activeIndex) {\n store.setActiveIndex(index, REASONS.keyboard, event.nativeEvent);\n }\n },\n onTyping\n });\n const onItemHighlighted = useStableCallback(onItemHighlightedProp);\n const lastHighlightIndexRef = React.useRef(-1);\n\n // Runs when `activeIndex` commits and again when the item registry settles, since an index\n // can come to point at a different element while its value stays the same.\n const syncHighlightedItem = useStableCallback(() => {\n const index = store.state.activeIndex;\n const item = index === null ? undefined : store.context.itemDomElements.current[index] ?? undefined;\n // An item removed in this commit stays registered until the list flushes, which calls back\n // here with the settled registry.\n if (item?.isConnected === false) {\n return;\n }\n const itemIndex = item === undefined ? -1 : index;\n if (lastHighlightIndexRef.current === itemIndex && store.context.reportedItem === item) {\n return;\n }\n lastHighlightIndexRef.current = itemIndex;\n store.context.reportedItem = item;\n // Only virtual focus renders from the highlighted element. Publishing it in every menu would\n // notify each item's subscription on every highlight change.\n if (virtualFocus) {\n store.set('highlightedItem', item);\n }\n // The tag left by the write that produced this committed value.\n const {\n highlightReason,\n highlightEvent\n } = store.context;\n store.context.highlightReason = REASONS.none;\n store.context.highlightEvent = undefined;\n if (!onItemHighlightedProp) {\n return;\n }\n onItemHighlighted(item, createGenericEventDetails(highlightReason, highlightEvent, {\n label: item === undefined ? undefined : store.context.itemLabels.current[itemIndex] ?? undefined\n }));\n });\n useIsoLayoutEffect(() => {\n syncHighlightedItem();\n }, [activeIndex, syncHighlightedItem]);\n\n // Under virtual focus an element inside the popup holds real focus, so it takes the\n // navigation's reference props (`aria-activedescendant` and the key handling) and the trigger\n // keeps only the props that open the menu.\n const openTriggerProps = React.useMemo(() => {\n if (!virtualFocus) {\n return listNavigation.reference;\n }\n if (!listNavigation.trigger) {\n return EMPTY_OBJECT;\n }\n // Focusing the trigger while the menu is open must not seed the virtual highlight. This can\n // happen before a pointer press closes the menu in Safari.\n const {\n onFocus,\n ...rest\n } = listNavigation.trigger;\n return rest;\n }, [virtualFocus, listNavigation.reference, listNavigation.trigger]);\n store.useSyncedValue('inputProps', virtualFocus ? listNavigation.reference ?? EMPTY_OBJECT : EMPTY_OBJECT);\n const activeTriggerProps = React.useMemo(() => {\n const mergedProps = mergeProps(typeahead.reference, openTriggerProps, dismiss.reference, {\n onMouseMove() {\n store.set('allowMouseEnter', true);\n }\n }, interactionTypeProps);\n mergedProps['aria-haspopup'] = 'menu';\n mergedProps['aria-expanded'] = open;\n return mergedProps;\n }, [store, typeahead.reference, openTriggerProps, dismiss.reference, interactionTypeProps, open]);\n const inactiveTriggerProps = React.useMemo(() => {\n const mergedProps = mergeProps(listNavigation.trigger, dismiss.trigger, interactionTypeProps);\n mergedProps['aria-haspopup'] = 'menu';\n mergedProps['aria-expanded'] = false;\n return mergedProps;\n }, [listNavigation.trigger, dismiss.trigger, interactionTypeProps]);\n\n // The initial render has no store subscribers yet. Seed these props before triggers render so\n // the synchronization effect below doesn't make every trigger render twice in the first commit.\n useRefWithInit(() => {\n store.update({\n inactiveTriggerProps\n });\n return null;\n });\n const popupProps = React.useMemo(() => mergeProps(FOCUSABLE_POPUP_PROPS, {\n onMouseMove() {\n store.set('allowMouseEnter', true);\n if (parent.type === 'menu') {\n store.set('hoverEnabled', false);\n }\n },\n onClick() {\n if (store.select('hoverEnabled')) {\n store.set('hoverEnabled', false);\n }\n },\n onKeyDown(event) {\n // The Menubar's CompositeRoot captures keyboard events via\n // event delegation. This works well when Menu.Root is nested inside Menubar,\n // but with detached triggers we need to manually forward the event to the CompositeRoot.\n const relay = store.select('keyboardEventRelay');\n if (relay && !event.isPropagationStopped()) {\n relay(event);\n }\n }\n }, typeahead.floating, listNavigation.floating, dismiss.floating), [parent.type, store, typeahead.floating, listNavigation.floating, dismiss.floating]);\n const itemProps = listNavigation.item ?? EMPTY_OBJECT;\n usePopupInteractionProps(store, {\n floatingRootContext,\n activeTriggerProps,\n inactiveTriggerProps,\n popupProps,\n itemProps\n });\n const context = React.useMemo(() => ({\n store,\n parent: parentFromContext,\n orientation,\n loopFocus,\n allowEscape,\n defaultFloatingId,\n setRenderedFloatingId,\n virtualFocus,\n parentVirtualFocus,\n syncHighlightedItem\n }), [store, parentFromContext, orientation, loopFocus, allowEscape, defaultFloatingId, virtualFocus, parentVirtualFocus, syncHighlightedItem]);\n const renderedChildren = typeof children === 'function' ? children({\n payload\n }) : children;\n let content = /*#__PURE__*/_jsxs(MenuRootContext.Provider, {\n value: context,\n children: [handle && /*#__PURE__*/_jsx(PopupHandleAttachment, {\n handle: handle,\n store: store\n }), renderedChildren]\n });\n if (parent.type === undefined || parent.type === 'context-menu') {\n // set up a FloatingTree to provide the context to nested menus\n content = /*#__PURE__*/_jsx(FloatingTree, {\n externalTree: floatingTreeRoot,\n children: content\n });\n }\n return content;\n});\n\n/**\n * Groups all parts of the menu.\n * Doesn't render its own HTML element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nif (process.env.NODE_ENV !== \"production\") MenuRootInternal.displayName = \"MenuRootInternal\";\nexport function MenuRoot(props) {\n const filterProvider = React.useContext(MenuFilterProviderContext);\n if (filterProvider === null) {\n return /*#__PURE__*/_jsx(MenuRootInternal, {\n ...props\n });\n }\n const FilterRoot = filterProvider.Root;\n return (\n /*#__PURE__*/\n // The root consumes its provider so a plain submenu inside doesn't inherit it.\n _jsx(MenuFilterProviderContext.Provider, {\n value: null,\n children: /*#__PURE__*/_jsx(FilterRoot, {\n ...filterProvider.options,\n ...props\n })\n })\n );\n}","import { ownerWindow } from '@base-ui/utils/owner';\nimport { platform } from '@base-ui/utils/platform';\n// Tolerance around the element bounds so a fast click whose pointer drifts slightly\n// during press-release isn't mistaken for a drag-off-and-release cancellation.\n// Matches typical OS/browser drag-initiation thresholds.\nconst BOUNDARY_OFFSET = 5;\n\n/**\n * Determines if a mouse event occurred within the bounds of an element\n * (including its pseudo-elements), with a small tolerance for pointer drift.\n */\nexport function isMouseWithinBounds(event, element) {\n const bounds = getPseudoElementBounds(element);\n return event.clientX >= bounds.left - BOUNDARY_OFFSET && event.clientX <= bounds.right + BOUNDARY_OFFSET && event.clientY >= bounds.top - BOUNDARY_OFFSET && event.clientY <= bounds.bottom + BOUNDARY_OFFSET;\n}\nexport function getPseudoElementBounds(element) {\n const elementRect = element.getBoundingClientRect();\n const win = ownerWindow(element);\n\n // Avoid \"Not implemented: window.getComputedStyle(elt, pseudoElt)\" in jsdom.\n if (platform.env.jsdom) {\n return elementRect;\n }\n const beforeStyles = win.getComputedStyle(element, '::before');\n const afterStyles = win.getComputedStyle(element, '::after');\n const hasPseudoElements = beforeStyles.content !== 'none' || afterStyles.content !== 'none';\n if (!hasPseudoElements) {\n return elementRect;\n }\n\n // Get dimensions of pseudo-elements\n const beforeWidth = parseFloat(beforeStyles.width) || 0;\n const beforeHeight = parseFloat(beforeStyles.height) || 0;\n const afterWidth = parseFloat(afterStyles.width) || 0;\n const afterHeight = parseFloat(afterStyles.height) || 0;\n\n // Calculate max dimensions including pseudo-elements\n const totalWidth = Math.max(elementRect.width, beforeWidth, afterWidth);\n const totalHeight = Math.max(elementRect.height, beforeHeight, afterHeight);\n\n // Calculate the differences to extend the bounds\n const widthDiff = totalWidth - elementRect.width;\n const heightDiff = totalHeight - elementRect.height;\n return {\n left: elementRect.left - widthDiff / 2,\n right: elementRect.right + widthDiff / 2,\n top: elementRect.top - heightDiff / 2,\n bottom: elementRect.bottom + heightDiff / 2\n };\n}","import { getParentNode, isHTMLElement, isLastTraversableNode } from '@floating-ui/utils/dom';\nexport function findRootOwnerId(node) {\n if (isHTMLElement(node) && node.hasAttribute('data-rootownerid')) {\n return node.getAttribute('data-rootownerid');\n }\n if (isLastTraversableNode(node)) {\n return undefined;\n }\n return findRootOwnerId(getParentNode(node));\n}","'use client';\n\nimport * as React from 'react';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\n/**\n * Returns `click` and `mousedown` handlers that fix the behavior of triggers of popups that are toggled by different events.\n * For example, a button that opens a popup on mousedown and closes it on click.\n * This hook prevents the popup from closing immediately after the mouse button is released.\n */\nexport function useMixedToggleClickHandler(params) {\n const {\n enabled = true,\n mouseDownAction,\n open\n } = params;\n const ignoreClickRef = React.useRef(false);\n return React.useMemo(() => {\n if (!enabled) {\n return EMPTY_OBJECT;\n }\n return {\n onMouseDown: event => {\n if (mouseDownAction === 'open' && !open || mouseDownAction === 'close' && open) {\n ignoreClickRef.current = true;\n ownerDocument(event.currentTarget).addEventListener('click', () => {\n ignoreClickRef.current = false;\n }, {\n once: true\n });\n }\n },\n onClick: event => {\n if (ignoreClickRef.current) {\n ignoreClickRef.current = false;\n event.preventBaseUIHandler();\n }\n }\n };\n }, [enabled, mouseDownAction, open]);\n}","'use client';\n\nimport _formatErrorMessage from \"@base-ui/utils/formatErrorMessage\";\nimport * as React from 'react';\nimport { useTimeout } from '@base-ui/utils/useTimeout';\nimport { ownerDocument } from '@base-ui/utils/owner';\nimport { fastComponentRef } from '@base-ui/utils/fastHooks';\nimport { useStableCallback } from '@base-ui/utils/useStableCallback';\nimport { useIsoLayoutEffect } from '@base-ui/utils/useIsoLayoutEffect';\nimport { EMPTY_OBJECT } from '@base-ui/utils/empty';\nimport { safePolygon, useClick, useFloatingTree, useFocus, useHoverReferenceInteraction, useFloatingNodeId, useFloatingParentNodeId } from \"../../floating-ui-react/index.mjs\";\nimport { FloatingTreeStore } from \"../../floating-ui-react/components/FloatingTreeStore.mjs\";\nimport { contains } from \"../../floating-ui-react/utils.mjs\";\nimport { useMenuRootContext } from \"../root/MenuRootContext.mjs\";\nimport { pressableTriggerOpenStateMapping } from \"../../utils/popupStateMapping.mjs\";\nimport { useRenderElement } from \"../../internals/useRenderElement.mjs\";\nimport { useButton } from \"../../internals/use-button/useButton.mjs\";\nimport { isMouseWithinBounds } from \"../../utils/getPseudoElementBounds.mjs\";\nimport { CompositeItem } from \"../../internals/composite/item/CompositeItem.mjs\";\nimport { useCompositeRootContext } from \"../../internals/composite/root/CompositeRootContext.mjs\";\nimport { findRootOwnerId } from \"../utils/findRootOwnerId.mjs\";\nimport { usePopupHandleStore, useTriggerDataForwarding } from \"../../utils/popups/index.mjs\";\nimport { useTriggerFocusGuards } from \"../../utils/popups/useTriggerFocusGuards.mjs\";\nimport { useBaseUiId } from \"../../internals/useBaseUiId.mjs\";\nimport { REASONS } from \"../../internals/reasons.mjs\";\nimport { useMixedToggleClickHandler } from \"../../utils/useMixedToggleClickHandler.mjs\";\nimport { useMenubarContext } from \"../../menubar/MenubarContext.mjs\";\nimport { PATIENT_CLICK_THRESHOLD } from \"../../internals/constants.mjs\";\nimport { FocusGuard } from \"../../utils/FocusGuard.mjs\";\nimport { mergeProps } from \"../../merge-props/index.mjs\";\n\n/**\n * A button that opens the menu.\n * Renders a `<button>` element.\n *\n * Documentation: [Base UI Menu](https://base-ui.com/react/components/menu)\n */\nimport { jsx as _jsx, jsxs as _jsxs } from \"react/jsx-runtime\";\nexport const MenuTrigger = fastComponentRef(function MenuTrigger(componentProps, forwardedRef) {\n const {\n render,\n className,\n style,\n disabled: disabledProp = false,\n nativeButton = true,\n id: idProp,\n openOnHover: openOnHoverProp,\n delay = 100,\n closeDelay = 0,\n handle,\n payload,\n ...elementProps\n } = componentProps;\n const rootContext = useMenuRootContext(true);\n const handleStore = usePopupHandleStore(handle);\n const store = handleStore ?? rootContext?.store;\n if (!store) {\n throw new Error(process.env.NODE_ENV !== \"production\" ? 'Base UI: <Menu.Trigger> must be either used within a <Menu.Root> component or provided with a handle.' : _formatErrorMessage(85));\n }\n const thisTriggerId = useBaseUiId(idProp);\n const isTriggerActive = store.useState('isTriggerActive', thisTriggerId);\n const floatingRootContext = store.useState('floatingRootContext');\n const isOpenedByThisTrigger = store.useState('isOpenedByTrigger', thisTriggerId);\n const controlsId = store.useState('triggerControlsId', thisTriggerId);\n const triggerElementRef = React.useRef(null);\n const parent = useMenuParent();\n const compositeRootContext = useCompositeRootContext(true);\n const floatingTreeRootFromContext = useFloatingTree();\n const floatingTreeRoot = React.useMemo(() => {\n return floatingTreeRootFromContext ?? new FloatingTreeStore();\n }, [floatingTreeRootFromContext]);\n const floatingNodeId = useFloatingNodeId(floatingTreeRoot);\n const floatingParentNodeId = useFloatingParentNodeId();\n const {\n registerTrigger,\n isMountedByThisTrigger\n } = useTriggerDataForwarding(thisTriggerId, triggerElementRef, store, {\n payload,\n closeDelay,\n parent,\n floatingTreeRoot,\n floatingNodeId,\n floatingParentNodeId,\n keyboardEventRelay: compositeRootContext?.relayKeyboardEvent\n });\n const isInMenubar = parent.type === 'menubar';\n const rootDisabled = store.useState('disabled');\n const disabled = disabledProp || rootDisabled || isInMenubar && parent.context.disabled;\n const {\n getButtonProps,\n buttonRef\n } = useButton({\n disabled,\n native: nativeButton\n });\n React.useEffect(() => {\n if (!isOpenedByThisTrigger && parent.type === undefined) {\n store.context.allowMouseUpTriggerRef.current = false;\n }\n }, [store, isOpenedByThisTrigger, parent.type]);\n const triggerRef = React.useRef(null);\n const allowMouseUpTriggerTimeout = useTimeout();\n const handleDocumentMouseUp = useStableCallback(mouseEvent => {\n if (!triggerRef.current) {\n return;\n }\n allowMouseUpTriggerTimeout.clear();\n store.context.allowMouseUpTriggerRef.current = false;\n const mouseUpTarget = mouseEvent.target;\n if (contains(triggerRef.current, mouseUpTarget) || contains(store.select('positionerElement'), mouseUpTarget) || mouseUpTarget === triggerRef.current) {\n return;\n }\n if (mouseUpTarget != null && findRootOwnerId(mouseUpTarget) === store.select('rootId')) {\n return;\n }\n if (isMouseWithinBounds(mouseEvent, triggerRef.current)) {\n return;\n }\n floatingTreeRoot.events.emit('close', {\n domEvent: mouseEvent,\n reason: REASONS.cancelOpen\n });\n });\n React.useEffect(() => {\n const doc = ownerDocument(triggerRef.current);\n if (isOpenedByThisTrigger && store.select('lastOpenChangeReason') === REASONS.triggerHover) {\n doc.addEventListener('mouseup', handleDocumentMouseUp, {\n once: true\n });\n return () => {\n doc.removeEventListener('mouseup', handleDocumentMouseUp);\n };\n }\n return undefined;\n }, [isOpenedByThisTrigger, handleDocumentMouseUp, store]);\n const parentMenubarHasSubmenuOpen = isInMenubar && parent.context.hasSubmenuOpen;\n const openOnHover = openOnHoverProp ?? parentMenubarHasSubmenuOpen;\n const hoverProps = useHoverReferenceInteraction(floatingRootContext, {\n enabled: openOnHover && !disabled && (!isInMenubar || parentMenubarHasSubmenuOpen && !isMountedByThisTrigger),\n handleClose: safePolygon({\n blockPointerEvents: !isInMenubar\n }),\n mouseOnly: true,\n move: false,\n restMs: parent.type === undefined ? delay : undefined,\n delay: {\n close: closeDelay\n },\n triggerElementRef,\n externalTree: floatingTreeRoot,\n isActiveTrigger: isTriggerActive,\n isClosing: () => store.select('transitionStatus') === 'ending'\n });\n\n // Whether to ignore clicks to open the menu.\n // `lastOpenChangeReason` doesn't need to be reactive here, as we need to run this\n // only when `isOpenedByThisTrigger` changes.\n const stickIfOpen = useStickIfOpen(isOpenedByThisTrigger, store.select('lastOpenChangeReason'));\n const click = useClick(floatingRootContext, {\n enabled: !disabled,\n event: isOpenedByThisTrigger && isInMenubar ? 'click' : 'mousedown',\n toggle: true,\n ignoreMouse: false,\n stickIfOpen: parent.type === undefined ? stickIfOpen : false\n });\n const focus = useFocus(floatingRootContext, {\n enabled: !disabled && parentMenubarHasSubmenuOpen\n });\n const mixedToggleHandlers = useMixedToggleClickHandler({\n open: isOpenedByThisTrigger,\n enabled: isInMenubar,\n mouseDownAction: 'open'\n });\n const localInteractionProps = React.useMemo(() => mergeProps(focus.reference, click.reference), [focus.reference, click.reference]);\n const rootTriggerProps = store.useState('triggerProps', isMountedByThisTrigger);\n // A filterable menu keeps real focus inside its popup and publishes what its trigger needs.\n const filterTriggerProps = store.useState('filterTriggerProps');\n const {\n handlePreFocusGuardFocus,\n handleFocusTargetFocus\n } = useTriggerFocusGuards(store, triggerElementRef);\n const state = {\n disabled,\n open: isOpenedByThisTrigger\n };\n const ref = [triggerRef, forwardedRef, buttonRef, registerTrigger, triggerElementRef];\n const props = [localInteractionProps, hoverProps ?? EMPTY_OBJECT, rootTriggerProps, {\n 'aria-haspopup': 'menu',\n 'aria-controls': controlsId,\n id: thisTriggerId,\n onMouseDown: event => {\n if (store.select('open')) {\n return;\n }\n\n // mousedown -> mouseup on menu item should not trigger it within 200ms.\n allowMouseUpTriggerTimeout.start(200, () => {\n store.context.allowMouseUpTriggerRef.current = true;\n });\n const doc = ownerDocument(event.currentTarget);\n doc.addEventListener('mouseup', handleDocumentMouseUp, {\n once: true\n });\n }\n }, filterTriggerProps, isInMenubar ? {\n role: 'menuitem'\n } : {}, mixedToggleHandlers, elementProps, getButtonProps];\n const element = useRenderElement('button', componentProps, {\n enabled: !isInMenubar,\n stateAttributesMapping: pressableTriggerOpenStateMapping,\n state,\n ref,\n props\n });\n if (isInMenubar) {\n return /*#__PURE__*/_jsx(CompositeItem, {\n tag: \"button\",\n render: render,\n className: className,\n style: style,\n state: state,\n refs: ref,\n props: props,\n stateAttributesMapping: pressableTriggerOpenStateMapping\n });\n }\n\n // A fragment with key is required to ensure that the `element` is mounted to the same DOM node\n // regardless of whether the focus guards are rendered or not.\n\n if (isOpenedByThisTrigger) {\n return /*#__PURE__*/_jsxs(React.Fragment, {\n children: [/*#__PURE__*/_jsx(FocusGuard, {\n ref: store.context.beforeTriggerFocusGuardRef,\n onFocus: handlePreFocusGuardFocus\n }, `${thisTriggerId}-pre-focus-guard`), /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n }, thisTriggerId), /*#__PURE__*/_jsx(FocusGuard, {\n ref: store.context.triggerFocusTargetRef,\n onFocus: handleFocusTargetFocus\n }, `${thisTriggerId}-post-focus-guard`)]\n });\n }\n return /*#__PURE__*/_jsx(React.Fragment, {\n children: element\n }, thisTriggerId);\n});\nif (process.env.NODE_ENV !== \"production\") MenuTrigger.displayName = \"MenuTrigger\";\n/**\n * Determines whether to ignore clicks after a hover-open.\n */\nfunction useStickIfOpen(open, openReason) {\n const stickIfOpenTimeout = useTimeout();\n const [stickIfOpen, setStickIfOpen] = React.useState(false);\n useIsoLayoutEffect(() => {\n if (open && openReason === REASONS.triggerHover) {\n // Only allow \"patient\" clicks to close the menu if it's open.\n // If they clicked within 500ms of the menu opening, keep it open.\n setStickIfOpen(true);\n stickIfOpenTimeout.start(PATIENT_CLICK_THRESHOLD, () => {\n setStickIfOpen(false);\n });\n } else if (!open) {\n stickIfOpenTimeout.clear();\n setStickIfOpen(false);\n }\n }, [open, openReason, stickIfOpenTimeout]);\n return stickIfOpen;\n}\nfunction useMenuParent() {\n const menubarContext = useMenubarContext(true);\n const parent = React.useMemo(() => {\n if (menubarContext) {\n return {\n type: 'menubar',\n context: menubarContext\n };\n }\n return {\n type: undefined\n };\n }, [menubarContext]);\n return parent;\n}","import * as React from \"react\"\nimport { Menu as MenuPrimitive } from \"@base-ui/react/menu\"\nimport { cn } from \"@/lib/utils\"\nimport { ChevronRightIcon, CheckIcon } from \"lucide-react\"\n\nfunction DropdownMenu({ ...props }: MenuPrimitive.Root.Props) {\n return <MenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />\n}\n\nfunction DropdownMenuPortal({ ...props }: MenuPrimitive.Portal.Props) {\n return <MenuPrimitive.Portal data-slot=\"dropdown-menu-portal\" {...props} />\n}\n\nfunction DropdownMenuTrigger({ ...props }: MenuPrimitive.Trigger.Props) {\n return <MenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />\n}\n\nfunction DropdownMenuContent({\n align = \"start\",\n alignOffset = 0,\n side = \"bottom\",\n sideOffset = 4,\n className,\n ...props\n}: MenuPrimitive.Popup.Props &\n Pick<\n MenuPrimitive.Positioner.Props,\n \"align\" | \"alignOffset\" | \"side\" | \"sideOffset\"\n >) {\n return (\n <MenuPrimitive.Portal>\n <MenuPrimitive.Positioner\n className=\"isolate z-50 outline-none\"\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n >\n <MenuPrimitive.Popup\n data-slot=\"dropdown-menu-content\"\n className={cn(\"z-50 max-h-(--available-height) w-(--anchor-width) min-w-32 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:overflow-hidden data-closed:fade-out-0 data-closed:zoom-out-95\", className )}\n {...props}\n />\n </MenuPrimitive.Positioner>\n </MenuPrimitive.Portal>\n )\n}\n\nfunction DropdownMenuGroup({ ...props }: MenuPrimitive.Group.Props) {\n return <MenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />\n}\n\nfunction DropdownMenuLabel({\n className,\n inset,\n ...props\n}: MenuPrimitive.GroupLabel.Props & {\n inset?: boolean\n}) {\n return (\n <MenuPrimitive.GroupLabel\n data-slot=\"dropdown-menu-label\"\n data-inset={inset}\n className={cn(\n \"px-1.5 py-1 text-xs font-medium text-muted-foreground data-inset:pl-7\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuItem({\n className,\n inset,\n variant = \"default\",\n ...props\n}: MenuPrimitive.Item.Props & {\n inset?: boolean\n variant?: \"default\" | \"destructive\"\n}) {\n return (\n <MenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-inset={inset}\n data-variant={variant}\n className={cn(\n \"group/dropdown-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 data-[variant=destructive]:*:[svg]:text-destructive\",\n className\n )}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuSub({ ...props }: MenuPrimitive.SubmenuRoot.Props) {\n return <MenuPrimitive.SubmenuRoot data-slot=\"dropdown-menu-sub\" {...props} />\n}\n\nfunction DropdownMenuSubTrigger({\n className,\n inset,\n children,\n ...props\n}: MenuPrimitive.SubmenuTrigger.Props & {\n inset?: boolean\n}) {\n return (\n <MenuPrimitive.SubmenuTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n data-inset={inset}\n className={cn(\n \"flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground not-data-[variant=destructive]:focus:**:text-accent-foreground data-inset:pl-7 data-popup-open:bg-accent data-popup-open:text-accent-foreground data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n {children}\n <ChevronRightIcon className=\"ml-auto\" />\n </MenuPrimitive.SubmenuTrigger>\n )\n}\n\nfunction DropdownMenuSubContent({\n align = \"start\",\n alignOffset = -3,\n side = \"right\",\n sideOffset = 0,\n className,\n ...props\n}: React.ComponentProps<typeof DropdownMenuContent>) {\n return (\n <DropdownMenuContent\n data-slot=\"dropdown-menu-sub-content\"\n className={cn(\"w-auto min-w-[96px] rounded-lg bg-popover p-1 text-popover-foreground shadow-lg ring-1 ring-foreground/10 duration-100 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95\", className )}\n align={align}\n alignOffset={alignOffset}\n side={side}\n sideOffset={sideOffset}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuCheckboxItem({\n className,\n children,\n checked,\n inset,\n ...props\n}: MenuPrimitive.CheckboxItem.Props & {\n inset?: boolean\n}) {\n return (\n <MenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n data-inset={inset}\n className={cn(\n \"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n checked={checked}\n {...props}\n >\n <span\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n data-slot=\"dropdown-menu-checkbox-item-indicator\"\n >\n <MenuPrimitive.CheckboxItemIndicator>\n <CheckIcon\n />\n </MenuPrimitive.CheckboxItemIndicator>\n </span>\n {children}\n </MenuPrimitive.CheckboxItem>\n )\n}\n\nfunction DropdownMenuRadioGroup({ ...props }: MenuPrimitive.RadioGroup.Props) {\n return (\n <MenuPrimitive.RadioGroup\n data-slot=\"dropdown-menu-radio-group\"\n {...props}\n />\n )\n}\n\nfunction DropdownMenuRadioItem({\n className,\n children,\n inset,\n ...props\n}: MenuPrimitive.RadioItem.Props & {\n inset?: boolean\n}) {\n return (\n <MenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n data-inset={inset}\n className={cn(\n \"relative flex cursor-default items-center gap-1.5 rounded-md py-1 pr-8 pl-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground focus:**:text-accent-foreground data-inset:pl-7 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4\",\n className\n )}\n {...props}\n >\n <span\n className=\"pointer-events-none absolute right-2 flex items-center justify-center\"\n data-slot=\"dropdown-menu-radio-item-indicator\"\n >\n <MenuPrimitive.RadioItemIndicator>\n <CheckIcon\n />\n </MenuPrimitive.RadioItemIndicator>\n </span>\n {children}\n </MenuPrimitive.RadioItem>\n )\n}\n\nfunction DropdownMenuSeparator({\n className,\n ...props\n}: MenuPrimitive.Separator.Props) {\n return (\n <MenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn(\"-mx-1 my-1 h-px bg-border\", className)}\n {...props}\n />\n )\n}\n\nfunction DropdownMenuShortcut({\n className,\n ...props\n}: React.ComponentProps<\"span\">) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn(\n \"ml-auto text-xs tracking-widest text-muted-foreground group-focus/dropdown-menu-item:text-accent-foreground\",\n className\n )}\n {...props}\n />\n )\n}\n\nexport {\n DropdownMenu,\n DropdownMenuPortal,\n DropdownMenuTrigger,\n DropdownMenuContent,\n DropdownMenuGroup,\n DropdownMenuLabel,\n DropdownMenuItem,\n DropdownMenuCheckboxItem,\n DropdownMenuRadioGroup,\n DropdownMenuRadioItem,\n DropdownMenuSeparator,\n DropdownMenuShortcut,\n DropdownMenuSub,\n DropdownMenuSubTrigger,\n DropdownMenuSubContent,\n}\n","import { useNavigate, useRouterState } from '@tanstack/react-router';\nimport { useQuery } from '@tanstack/react-query';\nimport { CheckIcon, ChevronDownIcon } from 'lucide-react';\nimport { DropdownMenu, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger } from '@/components/ui/dropdown-menu';\nimport { serversQuery } from '@/features/servers/queries';\nimport { readStorage, writeStorage } from '@/lib/storage';\n\nexport const SERVER_STORAGE_KEY = 'neurouter-console-server';\n\n/** Pages whose list is filtered by `?server=` (spec §5.3). */\nconst FILTERED = ['/tasks', '/inbox', '/evals', '/audit'];\n\nexport function rememberedServer(): string | undefined {\n return readStorage(SERVER_STORAGE_KEY) ?? undefined;\n}\n\n/**\n * Server switcher in the top bar (spec §5.3). On a `/servers/$id/*` page it switches to the same\n * tab of another server; on Tasks, Inbox, Evals and Audit it sets `?server=`. Hidden with one\n * server (A-SWITCHER).\n */\nexport function ServerSwitcher() {\n const { data } = useQuery(serversQuery());\n const navigate = useNavigate();\n const loc = useRouterState({ select: (s) => s.location });\n const servers = data?.items ?? [];\n if (servers.length <= 1) return null;\n const match = loc.pathname.match(/^\\/servers\\/([^/]+)(\\/.*)?$/);\n const onServerPage = match && match[1] !== 'new';\n const filtered = FILTERED.some((p) => loc.pathname === p);\n const search = loc.search as { server?: string };\n const currentId = onServerPage ? match![1] : filtered ? search.server : undefined;\n const current = servers.find((s) => s.id === currentId);\n if (!onServerPage && !filtered) return null;\n\n const pick = (id: string | undefined) => {\n if (id) writeStorage(SERVER_STORAGE_KEY, id);\n if (onServerPage && id) {\n void navigate({ to: `/servers/${id}${match![2] && !match![2].startsWith('/tools/') ? match![2] : match![2]?.startsWith('/tools/') ? '/tools' : ''}` as '/' });\n } else {\n void navigate({ to: loc.pathname as '/', search: (prev: Record<string, unknown>) => ({ ...prev, server: id, cursor: undefined }) as never });\n }\n };\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger className=\"hidden h-8 max-w-56 items-center gap-1.5 rounded-lg border bg-background px-2.5 text-[13px] outline-none hover:bg-accent focus-visible:ring-2 focus-visible:ring-ring sm:inline-flex\" aria-label={`Server: ${current?.name ?? 'All servers'}`}>\n <span className=\"truncate\">{current?.name ?? 'All servers'}</span>\n <ChevronDownIcon aria-hidden=\"true\" className=\"size-3.5 shrink-0 text-muted-foreground\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\" className=\"w-60\">\n <DropdownMenuGroup>\n <DropdownMenuLabel>Server</DropdownMenuLabel>\n {!onServerPage ? (\n <DropdownMenuItem onClick={() => pick(undefined)}>\n <span className=\"flex-1\">All servers</span>\n {!current ? <CheckIcon aria-hidden=\"true\" /> : null}\n </DropdownMenuItem>\n ) : null}\n </DropdownMenuGroup>\n {!onServerPage ? <DropdownMenuSeparator /> : null}\n <DropdownMenuGroup>\n {servers.map((s) => (\n <DropdownMenuItem key={s.id} onClick={() => pick(s.id)}>\n <span className=\"flex-1 truncate\">{s.name}</span>\n {current?.id === s.id ? <CheckIcon aria-hidden=\"true\" /> : null}\n </DropdownMenuItem>\n ))}\n </DropdownMenuGroup>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n"],"ignoreList":[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36],"mappings":"A,q8DAsBA,SAASyK,GAA0B,EAAO,CACxC,OAAOzK,IAA0B0K,EAAM,YAAc,GAAKA,EAAM,YAAc,CAChF,CACA,SAASC,GAAS,EAAa,EAAU,EAAY,CACnD,OAAQC,EAAR,CACE,IAAK,WACH,OAAOC,EACT,IAAK,aACH,OAAOC,EACT,QACE,OAAOD,GAAYC,CACvB,CACF,CACA,SAAgBC,GAAqB,EAAK,EAAa,CAGrD,OAAOJ,GAASC,EAFCI,IAAA,WAAoBA,IAAA,YAClBA,IAAA,aAAsBA,IAAA,YACQ,CACnD,CACA,SAAgBC,GAA0B,EAAK,EAAa,EAAK,CAG/D,OAAON,GAASC,EAFCI,IAAA,YACEE,EAAMF,IAAA,YAAqBA,IAAA,YACG,GAAKA,IAAQ,SAAWA,IAAQ,KAAOA,IAAQ,EAClG,CACA,SAAgBG,GAA0B,EAAK,EAAa,EAAK,CAG/D,OAAOR,GAASC,EAFCM,EAAMF,IAAQpE,GAAaoE,IAAQ5E,GACjC4E,IAAQhF,CACsB,CACnD,CACA,SAAgBoF,GAA2B,EAAK,EAAa,EAAK,EAAM,CAMtE,OAHIR,IAAgB,QAAUA,IAAgB,cAAgBS,EACrDL,IAAQ,SAEVL,GAASC,EALCM,EAAMF,IAAQ5E,GAAc4E,IAAQpE,GAClCoE,IAAQ3E,CAIsB,CACnD,CAMA,SAAgBiF,GAAkB,EAAO,EAAO,CAC9C,G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A,EACxCsW,EAA6C,MAAnC,EAAAtW,EAAA,IAAA,CAACvQ,EAAD,CAAW,cAAY,MAAQ,CAAA,CAC3B,CAChB,CAAA,CACa,CAAA,CAAA,EACjBymB,EAA2C,MAA5B,EAAAlW,EAAA,IAAA,CAACuV,GAAD,CAAwB,CAAA,GACzC,EAAAvV,EAAA,IAAA,CAACgV,GAAD,CAAA,SACGe,EAAQ,IAAK,IACZ,EAAA/V,EAAA,KAAA,CAACmV,GAAD,CAA6B,YAAeoB,EAAKT,EAAE,EAAE,EAArD,SAAA,EACE,EAAA9V,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,kBAAmB,SAAA8V,EAAE,IAAW,CAAA,EAC/CQ,GAAS,KAAOR,EAAE,IAAK,EAAA9V,EAAA,IAAA,CAACvQ,EAAD,CAAW,cAAY,MAAQ,CAAA,EAAI,IAC3C,CAHK,EAAAqmB,EAAE,EAGP,CACnB,CACgB,CAAA,CACA,CACT,CAAA,CAAA,CAAA,CAAA,CAElB,C"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{t as e}from"./link-CByMaQfX.js";import{t}from"./useNavigate-CrwlTILa.js";import{t as n}from"./useQuery-BkgWvtTa.js";import{t as r}from"./file-up-DhxoycHf.js";import{t as i}from"./server-BvD6BIlz.js";import{B as a,P as o,S as s,ft as c,g as l,m as u}from"./index-EqRZkjd6.js";import{t as d}from"./data-table-DL8nsehq.js";import{t as f}from"./states-Z2xH3pUB.js";import{n as p,t as m}from"./section-Bq1blJ9c.js";import{t as h}from"./segmented-RsFdV9xJ.js";import{t as g}from"./page-header-CHk7bso7.js";import{t as _}from"./score-ring-D3Ff8hXt.js";import{s as v}from"./queries-CaU3gifI.js";import{r as y}from"./utils-BFSetRo1.js";var b=y();function x(){let{q:y,kind:x}=c.useSearch(),S=t({from:c.fullPath}),C=n(v({...y?{q:y}:{},...x?{kind:x}:{}})),w=[{id:`name`,header:`Server`,priority:1,cell:t=>(0,b.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,b.jsx)(e,{to:`/servers/$serverId`,params:{serverId:t.id},className:`font-medium hover:underline`,children:t.name}),t.specFormat?(0,b.jsx)(s,{format:t.specFormat}):null]})},{id:`readiness`,header:`Readiness`,priority:1,cell:e=>(0,b.jsx)(_,{score:e.readiness?.score,preliminary:e.readiness?.confidence===`preliminary`})},{id:`tools`,header:`Tools`,priority:2,align:`right`,cell:e=>(0,b.jsxs)(`span`,{className:`tabular-nums`,children:[e.visibleToolCount,` / `,e.toolCount]})},{id:`writes`,header:`Write tools`,align:`right`,cell:e=>(0,b.jsx)(`span`,{className:`tabular-nums`,children:e.writeToolCount})},{id:`envs`,header:`Environments`,priority:2,cell:e=>(0,b.jsx)(`div`,{className:`flex flex-wrap gap-1.5`,children:e.environments.map(e=>(0,b.jsxs)(`span`,{className:`inline-flex items-center gap-1`,title:`${e.slug}: ${e.health}`,children:[(0,b.jsx)(l,{status:e.health}),(0,b.jsx)(u,{slug:e.slug,kind:e.isMock?`mock`:e.kind})]},e.id))})},{id:`mode`,header:`Mode`,cell:e=>(0,b.jsx)(`span`,{className:`text-[13px] text-muted-foreground`,children:e.readiness?.recommendedMode?`${e.readiness.recommendedMode} recommended`:`—`})},{id:`updated`,header:`Updated`,cell:e=>(0,b.jsx)(`span`,{className:`text-[13px] text-muted-foreground`,children:o(e.updatedAt)})}],T=!!(y||x);return(0,b.jsxs)(b.Fragment,{children:[(0,b.jsx)(g,{title:`Servers`,description:`Each server is one API compiled into MCP tools, with its own environments and overlay.`,actions:(0,b.jsxs)(a,{cap:`servers:write`,demoOp:`specs.preview`,render:(0,b.jsx)(e,{to:`/servers/new`}),nativeButton:!1,children:[(0,b.jsx)(r,{}),` Import a spec`]})}),(0,b.jsxs)(m,{children:[(0,b.jsx)(p,{label:`Search servers`,placeholder:`Search servers`,value:y,onChange:e=>void S({search:t=>({...t,q:e})}),className:`w-64`}),(0,b.jsx)(h,{label:`Spec kind`,size:`sm`,value:x??`all`,onChange:e=>void S({search:t=>({...t,kind:e===`all`?void 0:e})}),options:[{value:`all`,label:`All`},{value:`openapi`,label:`OpenAPI`},{value:`graphql`,label:`GraphQL`}]})]}),(0,b.jsx)(d,{label:`Servers`,columns:w,rows:C.data?.items,loading:C.isPending,error:C.error,onRetry:()=>void C.refetch(),getRowId:e=>e.id,empty:T?(0,b.jsx)(f,{icon:i,title:`No servers match`,description:`Clear the search or the kind filter.`}):(0,b.jsx)(f,{icon:i,title:`Import your first API`,description:`Point Neurouter at an OpenAPI 3.x or GraphQL spec.`,action:(0,b.jsx)(e,{to:`/servers/new`,className:`font-medium text-primary hover:underline`,children:`Import a spec`})})})]})}export{x as component};
|
|
2
|
+
//# sourceMappingURL=servers-DBjU_qiZ.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"servers-DBjU_qiZ.js","names":["useNavigate","useQuery","ServerIcon","serversQuery","formatRelative","Route","ServersPage","q","kind","useSearch","navigate","from","fullPath","servers","columns","id","header","priority","cell","s","serverId","name","specFormat","readiness","score","confidence","align","visibleToolCount","toolCount","writeToolCount","environments","map","e","slug","health","isMock","recommendedMode","updatedAt","filtered","v","search","p","undefined","value","label","data","items","isPending","error","refetch","_Fragment","FileUpIcon","Link","useQuery","FileUp","Server","GatedButton","formatRelative","SpecKindBadge","Route","HealthDot","EnvBadge","DataTable","EmptyState","SearchInput","Toolbar","Segmented","PageHeader","ScoreBadge","serversQuery","require_jsx_runtime","import_jsx_runtime","ServersPage","navigate","useNavigate","servers","q","kind","columns","s","filtered","p","v"],"sources":["../../src/routes/_app/servers/index.tsx?tsr-split=component"],"sourcesContent":["import { Link, createFileRoute, useNavigate } from '@tanstack/react-router';\nimport { useQuery } from '@tanstack/react-query';\nimport * as z from 'zod';\nimport { FileUpIcon, ServerIcon } from 'lucide-react';\nimport type { ServerRow } from '@/contract';\nimport { guard } from '@/app/route-guards';\nimport { GatedButton } from '@/components/app/gated';\nimport { DataTable, type ColumnSpec } from '@/components/data-table/data-table';\nimport { EmptyState } from '@/components/feedback/states';\nimport { SearchInput } from '@/components/filters/search-input';\nimport { Segmented } from '@/components/filters/segmented';\nimport { Toolbar } from '@/components/layout/section';\nimport { PageHeader } from '@/components/layout/page-header';\nimport { EnvBadge, HealthDot, SpecKindBadge } from '@/components/status/status';\nimport { ScoreBadge } from '@/features/readiness/score-ring';\nimport { serversQuery } from '@/features/servers/queries';\nimport { formatRelative } from '@/lib/format';\n\nconst search = z.object({ q: z.string().optional().catch(undefined), kind: z.enum(['openapi', 'graphql']).optional().catch(undefined) });\n\nexport const Route = createFileRoute('/_app/servers/')({\n validateSearch: search,\n beforeLoad: guard(['servers:read']),\n staticData: { crumbs: ['Servers'] },\n component: ServersPage,\n});\n\nfunction ServersPage() {\n const { q, kind } = Route.useSearch();\n const navigate = useNavigate({ from: Route.fullPath });\n const servers = useQuery(serversQuery({ ...(q ? { q } : {}), ...(kind ? { kind } : {}) }));\n const columns: ColumnSpec<ServerRow>[] = [\n {\n id: 'name',\n header: 'Server',\n priority: 1,\n cell: (s) => (\n <div className=\"flex flex-col gap-1\">\n <Link to=\"/servers/$serverId\" params={{ serverId: s.id }} className=\"font-medium hover:underline\">\n {s.name}\n </Link>\n {s.specFormat ? <SpecKindBadge format={s.specFormat} /> : null}\n </div>\n ),\n },\n { id: 'readiness', header: 'Readiness', priority: 1, cell: (s) => <ScoreBadge score={s.readiness?.score} preliminary={s.readiness?.confidence === 'preliminary'} /> },\n { id: 'tools', header: 'Tools', priority: 2, align: 'right', cell: (s) => <span className=\"tabular-nums\">{s.visibleToolCount} / {s.toolCount}</span> },\n { id: 'writes', header: 'Write tools', align: 'right', cell: (s) => <span className=\"tabular-nums\">{s.writeToolCount}</span> },\n {\n id: 'envs',\n header: 'Environments',\n priority: 2,\n cell: (s) => (\n <div className=\"flex flex-wrap gap-1.5\">\n {s.environments.map((e) => (\n <span key={e.id} className=\"inline-flex items-center gap-1\" title={`${e.slug}: ${e.health}`}>\n <HealthDot status={e.health} />\n <EnvBadge slug={e.slug} kind={e.isMock ? 'mock' : e.kind} />\n </span>\n ))}\n </div>\n ),\n },\n { id: 'mode', header: 'Mode', cell: (s) => <span className=\"text-[13px] text-muted-foreground\">{s.readiness?.recommendedMode ? `${s.readiness.recommendedMode} recommended` : '—'}</span> },\n { id: 'updated', header: 'Updated', cell: (s) => <span className=\"text-[13px] text-muted-foreground\">{formatRelative(s.updatedAt)}</span> },\n ];\n const filtered = !!(q || kind);\n return (\n <>\n <PageHeader\n title=\"Servers\"\n description=\"Each server is one API compiled into MCP tools, with its own environments and overlay.\"\n actions={\n <GatedButton cap=\"servers:write\" demoOp=\"specs.preview\" render={<Link to=\"/servers/new\" />} nativeButton={false}>\n <FileUpIcon /> Import a spec\n </GatedButton>\n }\n />\n <Toolbar>\n <SearchInput label=\"Search servers\" placeholder=\"Search servers\" value={q} onChange={(v) => void navigate({ search: (p) => ({ ...p, q: v }) })} className=\"w-64\" />\n <Segmented\n label=\"Spec kind\"\n size=\"sm\"\n value={kind ?? 'all'}\n onChange={(v) => void navigate({ search: (p) => ({ ...p, kind: v === 'all' ? undefined : v }) })}\n options={[\n { value: 'all', label: 'All' },\n { value: 'openapi', label: 'OpenAPI' },\n { value: 'graphql', label: 'GraphQL' },\n ]}\n />\n </Toolbar>\n <DataTable\n label=\"Servers\"\n columns={columns}\n rows={servers.data?.items}\n loading={servers.isPending}\n error={servers.error}\n onRetry={() => void servers.refetch()}\n getRowId={(s) => s.id}\n empty={\n filtered ? (\n <EmptyState icon={ServerIcon} title=\"No servers match\" description=\"Clear the search or the kind filter.\" />\n ) : (\n <EmptyState icon={ServerIcon} title=\"Import your first API\" description=\"Point Neurouter at an OpenAPI 3.x or GraphQL spec.\" action={<Link to=\"/servers/new\" className=\"font-medium text-primary hover:underline\">Import a spec</Link>} />\n )\n }\n />\n </>\n );\n}\n"],"mappings":"A,ooBA2BA,SAASM,GAAc,CACrB,GAAM,CAAEC,IAAGC,QAASH,EAAMI,UAAU,EAC9BC,EAAWV,EAAY,CA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