diff --git a/README.md b/README.md
index a3368ce..079740a 100644
--- a/README.md
+++ b/README.md
@@ -252,22 +252,30 @@ What the dashboard can now do (all state-changing actions require `ADMIN_TOKEN`)
- **Activity** — every enqueued command with its status (queued → running → done/failed) —
the audit log of what the dashboard triggered. The UI polls `GET /commands/{id}` for
live status.
-- **Claude Login** — log Claude Code in on the host from the browser (see below), so agents
- spawn against a real authenticated `claude` with no shell access to the container.
+- **Claude** — the management page for the Claude Code install agents run on. The account
+ login lives here (see below), plus web-managed **skills**, **MCP connectors**,
+ **plugins**, and **permission overrides**. These are plain DB rows the control container
+ applies at every launch: skills sync to each worker's user-level `~/.claude/skills`
+ (marker-file managed, so hand-installed skills survive), enabled connectors become the
+ run's `--mcp-config` file (nothing lands in the repo tree), and plugins/permissions fold
+ into the generated per-agent `settings.json` — so a change in the UI reaches the next
+ launch of every agent, no redeploy.
The command queue is exposed over HTTP as `POST …/agents/spawn`, `POST …/agents/{n}/kill`,
`POST …/approvals`, `POST …/forge-init`, `POST …/poll-ci`, `POST …/sync`,
`POST /login/start`, `POST /login/submit`, and `GET /commands[/{id}]`; hosts as `/hosts`;
schedules as `/schedules` + `/projects/{id}/schedules`; project mutation as
-`PATCH`/`DELETE /projects/{id}`. Run the worker with `handler worker` (the control image's
-default command).
+`PATCH`/`DELETE /projects/{id}`; Claude management as `/claude/skills`,
+`/claude/connectors`, `/claude/plugins` (CRUD), and `GET`/`PUT /claude/permissions`
+(reads with the normal token, writes admin-gated). Run the worker with `handler worker`
+(the control image's default command).
### Claude login from the web UI
Agents *are* `claude` processes, so the control container needs a logged-in Claude Code.
-Because that container has no interactive shell in normal operation, the **Claude Login**
-pane logs it in from the browser — the same command-queue handoff every other control
-action uses:
+Because that container has no interactive shell in normal operation, the **Claude** page's
+Account tab logs it in from the browser — the same command-queue handoff every other
+control action uses:
1. **Log in to Claude** enqueues a `login_start` command. The worker opens `claude` in a
dedicated (wide) tmux session in the control container, navigates whatever onboarding a
diff --git a/frontend/app/claude/page.tsx b/frontend/app/claude/page.tsx
new file mode 100644
index 0000000..bf45af7
--- /dev/null
+++ b/frontend/app/claude/page.tsx
@@ -0,0 +1,13 @@
+/* Claude management page. The shell (sidebar, banners, store) comes from the root
+ * layout; this route contributes only its section, in the shared scroll frame. */
+"use client";
+
+import { ClaudeSection } from "@/components/sections/ClaudeSection";
+
+export default function ClaudePage() {
+ return (
+
+
+
+ );
+}
diff --git a/frontend/app/login/page.tsx b/frontend/app/login/page.tsx
index a8bf3dd..e4797c5 100644
--- a/frontend/app/login/page.tsx
+++ b/frontend/app/login/page.tsx
@@ -1,13 +1,14 @@
-/* Claude Login page. The shell (sidebar, banners, store) comes from the root layout; this
- * route contributes only its section, in the shared scroll frame. */
+/* The old Claude Login route. The login flow now lives on the Claude management page
+ * (/claude, Account tab); this stub only redirects old bookmarks there. */
"use client";
-import { LoginSection } from "@/components/sections/LoginSection";
+import { useEffect } from "react";
+import { useRouter } from "next/navigation";
-export default function LoginPage() {
- return (
-
-
-
- );
+export default function LoginRedirect() {
+ const router = useRouter();
+ useEffect(() => {
+ router.replace("/claude");
+ }, [router]);
+ return null;
}
diff --git a/frontend/components/Shell.tsx b/frontend/components/Shell.tsx
index 680a1d2..d0399d3 100644
--- a/frontend/components/Shell.tsx
+++ b/frontend/components/Shell.tsx
@@ -1,5 +1,5 @@
/* The Control Center shell: a left nav (Runs / Repositories / Agents / Approvals / Git
- * Servers / Activity / Shared / Claude Login) and the active route's page on the right,
+ * Servers / Activity / Shared / Claude) and the active route's page on the right,
* matching the design's hub layout. Each nav item is a real route, so pages are modular
* and independently loadable; this shell lives in the root layout and persists across
* navigation, keeping the store, polling loop, and auth alive between pages. Command
@@ -29,8 +29,9 @@ const BADGES: Partial number; accent?: (s
servers: { count: (s) => s.hosts.length },
activity: { count: (s) => s.commands.length },
shared: { count: (s) => s.shared.context.length },
- login: {
- count: () => 0,
+ claude: {
+ // Everything managed on the page: skills + connectors + plugins.
+ count: (s) => s.claudeSkills.length + s.claudeConnectors.length + s.claudePlugins.length,
// Draw the eye to it until Claude is logged in on the host this session.
accent: (s) => s.claudeLogin.status !== "done",
},
diff --git a/frontend/components/sections/ClaudeSection.tsx b/frontend/components/sections/ClaudeSection.tsx
new file mode 100644
index 0000000..ea4c94a
--- /dev/null
+++ b/frontend/components/sections/ClaudeSection.tsx
@@ -0,0 +1,576 @@
+/* Claude — the management page for the Claude Code install agents run on: the account
+ * login (moved here from the old Claude Login page), plus the operator-managed skills,
+ * MCP connectors, plugins, and permission overrides. Everything except the login is a
+ * plain DB write that the control container applies at the NEXT launch of every agent —
+ * skills sync to the workers' user-level ~/.claude/skills, connectors become each run's
+ * --mcp-config file, and plugins/permissions fold into the generated settings.json. */
+"use client";
+
+import { useState } from "react";
+import { useDashboard } from "@/components/store";
+import type { ConnectorBody, PluginBody, SkillBody } from "@/components/store";
+import { Badge, Button, Card, Input, Select, Tabs, Textarea, Toggle } from "@/components/ui";
+import type { ClaudeConnector, ClaudePlugin, ClaudeSkill } from "@/lib/api";
+import { ClaudeLoginPanel } from "@/components/sections/LoginSection";
+
+/* KEY=VALUE-per-line <-> map helpers for connector env/headers. */
+function parseKeyValues(text: string): Record {
+ const out: Record = {};
+ for (const line of text.split("\n")) {
+ const trimmed = line.trim();
+ if (!trimmed) continue;
+ const eq = trimmed.indexOf("=");
+ if (eq <= 0) continue;
+ out[trimmed.slice(0, eq).trim()] = trimmed.slice(eq + 1).trim();
+ }
+ return out;
+}
+
+function formatKeyValues(map: Record | null | undefined): string {
+ return Object.entries(map ?? {})
+ .map(([k, v]) => `${k}=${v}`)
+ .join("\n");
+}
+
+function parseLines(text: string): string[] {
+ return text
+ .split("\n")
+ .map((l) => l.trim())
+ .filter(Boolean);
+}
+
+/* ---- Skills ------------------------------------------------------------------------ */
+
+const emptySkill = { name: "", description: "", content: "", enabled: true };
+
+function SkillsPanel() {
+ const s = useDashboard();
+ const [form, setForm] = useState(emptySkill);
+ const [editingId, setEditingId] = useState(null);
+
+ const reset = () => {
+ setForm(emptySkill);
+ setEditingId(null);
+ };
+
+ const save = async () => {
+ const body: SkillBody = { ...form };
+ const ok =
+ editingId != null
+ ? await s.updateClaudeSkill(editingId, body)
+ : await s.createClaudeSkill(body);
+ if (ok) reset();
+ };
+
+ const edit = (sk: ClaudeSkill) => {
+ setForm({
+ name: sk.name,
+ description: sk.description ?? "",
+ content: sk.content,
+ enabled: sk.enabled,
+ });
+ setEditingId(sk.id);
+ };
+
+ return (
+ <>
+
+ Custom Claude Code skills, synced to every worker's{" "}
+ ~/.claude/skills at each launch. The description is
+ what makes Claude pick the skill up — say when to use it.
+
+ MCP servers agents can reach. Passed to each run as its{" "}
+ --mcp-config file, so nothing lands in the
+ repository tree. stdio commands run inside the control container.
+
+ Claude Code plugins, pinned to the marketplace serving them. Generated settings
+ declare the marketplace and enable the plugin, so headless runs install both on
+ boot.
+
+ Overrides merged over the server baseline into every generated{" "}
+ settings.json. Headless runs auto-deny anything that
+ would prompt, so allow rules are what let work proceed; the PreToolUse/Stop hooks
+ stay the hard gate regardless.
+
+ Manage the Claude Code install agents run on: the account login, plus skills,
+ MCP connectors, plugins, and permissions. Changes apply to the next launch of
+ every agent.
+
+ >
+ );
+}
diff --git a/frontend/components/sections/LoginSection.tsx b/frontend/components/sections/LoginSection.tsx
index f6c1ae4..dca4657 100644
--- a/frontend/components/sections/LoginSection.tsx
+++ b/frontend/components/sections/LoginSection.tsx
@@ -1,4 +1,5 @@
-/* Claude Login — drive the bundled `claude /login` OAuth flow on the host from the web UI.
+/* Claude account login panel (the Account tab of the Claude page) — drives the bundled
+ * `claude /login` OAuth flow on the host from the web UI.
*
* Click "Log in to Claude" → a small OAuth-style popup window opens (like "Sign in with
* Google") and the worker drives `claude /login` in the control container, selecting the
@@ -27,7 +28,7 @@ function openLoginPopup(url: string): Window | null {
);
}
-export function LoginSection() {
+export function ClaudeLoginPanel() {
const s = useDashboard();
const { status, url, message } = s.claudeLogin;
const [code, setCode] = useState("");
@@ -66,16 +67,13 @@ export function LoginSection() {
return (
<>
-
-
Claude Login
-
- Log Claude Code in on the host so agents can run. This drives{" "}
- claude /login in the control container and picks the
- Claude account with a subscription.
-
+
+ Log Claude Code in on the host so agents can run. This drives{" "}
+ claude /login in the control container and picks the
+ Claude account with a subscription.
-
+
{message && (
{message}
diff --git a/frontend/components/store.tsx b/frontend/components/store.tsx
index bc155c9..021d82a 100644
--- a/frontend/components/store.tsx
+++ b/frontend/components/store.tsx
@@ -21,6 +21,10 @@ import {
type ApiError,
type Approval,
type Checkmark,
+ type ClaudeConnector,
+ type ClaudePermissions,
+ type ClaudePlugin,
+ type ClaudeSkill,
type Command,
type Host,
type LogEntry,
@@ -38,7 +42,7 @@ export type Section =
| "servers"
| "activity"
| "shared"
- | "login";
+ | "claude";
/* The claude web-login flow, driven through the login_start / login_submit commands.
* idle → starting → awaiting (have URL) → submitting → done | error */
@@ -124,6 +128,51 @@ interface StoreValue {
startClaudeLogin: () => Promise;
submitClaudeCode: (code: string) => Promise;
resetClaudeLogin: () => void;
+
+ // Claude management (skills / connectors / plugins / permissions)
+ claudeSkills: ClaudeSkill[];
+ claudeConnectors: ClaudeConnector[];
+ claudePlugins: ClaudePlugin[];
+ claudePermissions: ClaudePermissions | null;
+ createClaudeSkill: (b: SkillBody) => Promise;
+ updateClaudeSkill: (id: number, b: Partial) => Promise;
+ deleteClaudeSkill: (id: number) => Promise;
+ createClaudeConnector: (b: ConnectorBody) => Promise;
+ updateClaudeConnector: (id: number, b: Partial) => Promise;
+ deleteClaudeConnector: (id: number) => Promise;
+ createClaudePlugin: (b: PluginBody) => Promise;
+ updateClaudePlugin: (id: number, b: Partial) => Promise;
+ deleteClaudePlugin: (id: number) => Promise;
+ saveClaudePermissions: (b: PermissionsBody) => Promise;
+}
+
+export interface SkillBody {
+ name: string;
+ description: string;
+ content: string;
+ enabled: boolean;
+}
+export interface ConnectorBody {
+ name: string;
+ transport: "stdio" | "http" | "sse";
+ command: string | null;
+ args: string[];
+ env: Record;
+ url: string | null;
+ headers: Record;
+ enabled: boolean;
+}
+export interface PluginBody {
+ name: string;
+ marketplace: string;
+ marketplace_repo: string;
+ enabled: boolean;
+}
+export interface PermissionsBody {
+ default_mode: string | null;
+ allow: string[];
+ deny: string[];
+ ask: string[];
}
export interface SpawnBody {
@@ -236,6 +285,10 @@ export function DashboardProvider({
url: "",
message: "",
});
+ const [claudeSkills, setClaudeSkills] = useState([]);
+ const [claudeConnectors, setClaudeConnectors] = useState([]);
+ const [claudePlugins, setClaudePlugins] = useState([]);
+ const [claudePermissions, setClaudePermissions] = useState(null);
// Keep polling loop reading fresh values without re-subscribing every render.
const sectionRef = useRef(section);
@@ -374,6 +427,23 @@ export function DashboardProvider({
}
}, []);
+ const loadClaude = useCallback(async () => {
+ try {
+ const [skills, connectors, plugins, permissions] = await Promise.all([
+ clientRef.current.api("/claude/skills"),
+ clientRef.current.api("/claude/connectors"),
+ clientRef.current.api("/claude/plugins"),
+ clientRef.current.api("/claude/permissions"),
+ ]);
+ setClaudeSkills(skills);
+ setClaudeConnectors(connectors);
+ setClaudePlugins(plugins);
+ setClaudePermissions(permissions);
+ } catch (e) {
+ swallow(e);
+ }
+ }, []);
+
/* One refresh cycle for whatever section is active (plus always-cheap projects/agents
* so the nav counts and inbox stay live). */
const tick = useCallback(async () => {
@@ -396,7 +466,8 @@ export function DashboardProvider({
if (s === "activity") await loadCommands();
if (s === "schedules") await loadSchedules();
if (s === "shared") await loadShared();
- }, [loadAgents, loadRun, loadApprovals, loadHosts, loadCommands, loadSchedules, loadShared]);
+ if (s === "claude") await loadClaude();
+ }, [loadAgents, loadRun, loadApprovals, loadHosts, loadCommands, loadSchedules, loadShared, loadClaude]);
// Initial load + polling loop. The first tick populates projects *and* agents (and the
// active section) up front, so the Runs inbox is filled without waiting a poll interval.
@@ -425,8 +496,9 @@ export function DashboardProvider({
if (s === "activity") void loadCommands();
if (s === "schedules") void loadSchedules();
if (s === "shared") void loadShared();
+ if (s === "claude") void loadClaude();
},
- [loadApprovals, loadHosts, loadCommands, loadSchedules, loadShared],
+ [loadApprovals, loadHosts, loadCommands, loadSchedules, loadShared, loadClaude],
);
const selectProject = useCallback(
@@ -933,6 +1005,140 @@ export function DashboardProvider({
setClaudeLogin({ status: "idle", url: "", message: "" });
}, []);
+ // ---- claude management (skills / connectors / plugins / permissions) ----
+ // Plain DB writes (no worker round-trip); every change applies to the NEXT launch of
+ // every agent, which the success banners say explicitly.
+ const claudeWrite = useCallback(
+ async (fn: () => Promise, okText: string): Promise => {
+ try {
+ await fn();
+ setCmd({ text: okText, error: false, busy: false });
+ await loadClaude();
+ return true;
+ } catch (e) {
+ if (e instanceof AuthError) return false;
+ setCmd({ text: (e as Error).message, error: true, busy: false });
+ return false;
+ }
+ },
+ [loadClaude],
+ );
+
+ const createClaudeSkill = useCallback(
+ (b: SkillBody) =>
+ claudeWrite(
+ () =>
+ clientRef.current.api("/claude/skills", {
+ method: "POST",
+ body: {
+ name: b.name.trim(),
+ description: b.description.trim() || null,
+ content: b.content,
+ enabled: b.enabled,
+ },
+ }),
+ `skill '${b.name.trim()}' saved — applies to the next agent launch`,
+ ),
+ [claudeWrite],
+ );
+
+ const updateClaudeSkill = useCallback(
+ (id: number, b: Partial) =>
+ claudeWrite(
+ () => clientRef.current.api(`/claude/skills/${id}`, { method: "PATCH", body: b }),
+ "skill updated — applies to the next agent launch",
+ ),
+ [claudeWrite],
+ );
+
+ const deleteClaudeSkill = useCallback(
+ async (id: number) => {
+ await claudeWrite(
+ () => clientRef.current.api(`/claude/skills/${id}`, { method: "DELETE" }),
+ "skill removed — gone from workers at the next launch",
+ );
+ },
+ [claudeWrite],
+ );
+
+ const createClaudeConnector = useCallback(
+ (b: ConnectorBody) =>
+ claudeWrite(
+ () =>
+ clientRef.current.api("/claude/connectors", {
+ method: "POST",
+ body: { ...b, name: b.name.trim() },
+ }),
+ `connector '${b.name.trim()}' saved — applies to the next agent launch`,
+ ),
+ [claudeWrite],
+ );
+
+ const updateClaudeConnector = useCallback(
+ (id: number, b: Partial) =>
+ claudeWrite(
+ () => clientRef.current.api(`/claude/connectors/${id}`, { method: "PATCH", body: b }),
+ "connector updated — applies to the next agent launch",
+ ),
+ [claudeWrite],
+ );
+
+ const deleteClaudeConnector = useCallback(
+ async (id: number) => {
+ await claudeWrite(
+ () => clientRef.current.api(`/claude/connectors/${id}`, { method: "DELETE" }),
+ "connector removed — applies to the next agent launch",
+ );
+ },
+ [claudeWrite],
+ );
+
+ const createClaudePlugin = useCallback(
+ (b: PluginBody) =>
+ claudeWrite(
+ () =>
+ clientRef.current.api("/claude/plugins", {
+ method: "POST",
+ body: {
+ name: b.name.trim(),
+ marketplace: b.marketplace.trim(),
+ marketplace_repo: b.marketplace_repo.trim(),
+ enabled: b.enabled,
+ },
+ }),
+ `plugin '${b.name.trim()}' saved — installs on the next agent launch`,
+ ),
+ [claudeWrite],
+ );
+
+ const updateClaudePlugin = useCallback(
+ (id: number, b: Partial) =>
+ claudeWrite(
+ () => clientRef.current.api(`/claude/plugins/${id}`, { method: "PATCH", body: b }),
+ "plugin updated — applies to the next agent launch",
+ ),
+ [claudeWrite],
+ );
+
+ const deleteClaudePlugin = useCallback(
+ async (id: number) => {
+ await claudeWrite(
+ () => clientRef.current.api(`/claude/plugins/${id}`, { method: "DELETE" }),
+ "plugin removed — applies to the next agent launch",
+ );
+ },
+ [claudeWrite],
+ );
+
+ const saveClaudePermissions = useCallback(
+ (b: PermissionsBody) =>
+ claudeWrite(
+ () => clientRef.current.api("/claude/permissions", { method: "PUT", body: b }),
+ "permissions saved — apply to the next agent launch",
+ ),
+ [claudeWrite],
+ );
+
const setSharedKey = useCallback(
async (key: string, value: string) => {
try {
@@ -997,6 +1203,20 @@ export function DashboardProvider({
startClaudeLogin,
submitClaudeCode,
resetClaudeLogin,
+ claudeSkills,
+ claudeConnectors,
+ claudePlugins,
+ claudePermissions,
+ createClaudeSkill,
+ updateClaudeSkill,
+ deleteClaudeSkill,
+ createClaudeConnector,
+ updateClaudeConnector,
+ deleteClaudeConnector,
+ createClaudePlugin,
+ updateClaudePlugin,
+ deleteClaudePlugin,
+ saveClaudePermissions,
};
return {children};
diff --git a/frontend/lib/api.ts b/frontend/lib/api.ts
index 1cd937b..04eac63 100644
--- a/frontend/lib/api.ts
+++ b/frontend/lib/api.ts
@@ -140,6 +140,52 @@ export interface Schedule {
created_at: string;
}
+/* ---- Claude management (the dashboard's Claude page) ---- */
+
+export interface ClaudeSkill {
+ id: number;
+ name: string;
+ description?: string | null;
+ content: string;
+ enabled: boolean;
+ created_at: string;
+ updated_at: string;
+}
+
+export type McpTransport = "stdio" | "http" | "sse";
+
+export interface ClaudeConnector {
+ id: number;
+ name: string;
+ transport: McpTransport;
+ command?: string | null;
+ args?: string[] | null;
+ env?: Record | null;
+ url?: string | null;
+ headers?: Record | null;
+ enabled: boolean;
+ created_at: string;
+}
+
+export interface ClaudePlugin {
+ id: number;
+ name: string;
+ marketplace: string;
+ marketplace_repo: string;
+ enabled: boolean;
+ created_at: string;
+}
+
+/* Stored overrides + the env baseline they merge over at launch (read-only here). */
+export interface ClaudePermissions {
+ default_mode?: string | null;
+ allow: string[];
+ deny: string[];
+ ask: string[];
+ base_mode: string;
+ base_allow: string[];
+}
+
export interface SharedContext {
key: string;
value: string;
diff --git a/frontend/lib/nav.ts b/frontend/lib/nav.ts
index c05ec30..621674c 100644
--- a/frontend/lib/nav.ts
+++ b/frontend/lib/nav.ts
@@ -18,12 +18,15 @@ export const NAV_ROUTES: NavRoute[] = [
{ key: "servers", href: "/servers", label: "Git Servers" },
{ key: "activity", href: "/activity", label: "Activity" },
{ key: "shared", href: "/shared", label: "Shared" },
- { key: "login", href: "/login", label: "Claude Login" },
+ { key: "claude", href: "/claude", label: "Claude" },
];
/* Map a browser path back to its section key. Trailing slashes (Next emits them under
- * `trailingSlash: true`) are normalized away; anything unrecognized falls back to Runs. */
+ * `trailingSlash: true`) are normalized away; anything unrecognized falls back to Runs.
+ * "/login" still maps to the Claude page — the login flow moved into it, and the old
+ * route redirects there. */
export function sectionFromPath(pathname: string): Section {
const clean = pathname.replace(/\/+$/, "") || "/";
+ if (clean === "/login") return "claude";
return NAV_ROUTES.find((r) => r.href === clean)?.key ?? "runs";
}
diff --git a/src/handler/api/app.py b/src/handler/api/app.py
index 1c274f4..409b62c 100644
--- a/src/handler/api/app.py
+++ b/src/handler/api/app.py
@@ -17,6 +17,7 @@ from ..config import get_settings
from .routes import (
agents,
approvals,
+ claude,
commands,
hosts,
interaction,
@@ -48,6 +49,7 @@ def create_app() -> FastAPI:
app.include_router(approvals.router)
app.include_router(commands.router)
app.include_router(login.router)
+ app.include_router(claude.router)
app.include_router(hosts.router)
app.include_router(schedules.router)
app.include_router(shared.router)
diff --git a/src/handler/api/routes/claude.py b/src/handler/api/routes/claude.py
new file mode 100644
index 0000000..944506e
--- /dev/null
+++ b/src/handler/api/routes/claude.py
@@ -0,0 +1,262 @@
+"""Claude management: skills, MCP connectors, plugins, and permission overrides.
+
+The dashboard's Claude page edits these rows directly — no worker round-trip, because
+nothing here touches a live process. The control container reads the same tables at
+every launch: skills sync to the worker's user-level ``~/.claude/skills``, connectors
+become the run's ``--mcp-config`` file, and plugins/permissions fold into the generated
+per-agent ``settings.json`` (``control.settings_gen`` / ``control.claude_gen``). Changes
+therefore apply to the *next* launch of every agent, not to runs already in flight.
+
+Reads take the normal token; writes take the admin token (they shape what every agent
+is allowed to do). The login flow stays under ``/login`` — it needs the worker's tmux.
+"""
+
+from __future__ import annotations
+
+from fastapi import APIRouter, Depends, HTTPException, status
+from sqlalchemy import Connection
+
+from ...config import get_settings
+from ...db import repository as repo
+from ..deps import db_conn, require_admin, require_auth
+from ..schemas import (
+ ClaudeConnectorIn,
+ ClaudeConnectorOut,
+ ClaudeConnectorUpdateIn,
+ ClaudePermissionsIn,
+ ClaudePermissionsOut,
+ ClaudePluginIn,
+ ClaudePluginOut,
+ ClaudePluginUpdateIn,
+ ClaudeSkillIn,
+ ClaudeSkillOut,
+ ClaudeSkillUpdateIn,
+)
+
+router = APIRouter(prefix="/claude", tags=["claude"], dependencies=[Depends(require_auth)])
+
+
+# ---- skills ---------------------------------------------------------------------------
+
+
+def _skill_or_404(conn: Connection, skill_id: int) -> dict:
+ skill = repo.get_claude_skill(conn, skill_id)
+ if skill is None:
+ raise HTTPException(status.HTTP_404_NOT_FOUND, detail=f"skill {skill_id} not found")
+ return skill
+
+
+@router.get("/skills", response_model=list[ClaudeSkillOut])
+def list_skills(conn: Connection = Depends(db_conn)) -> list[dict]:
+ return repo.list_claude_skills(conn)
+
+
+@router.post(
+ "/skills",
+ response_model=ClaudeSkillOut,
+ status_code=status.HTTP_201_CREATED,
+ dependencies=[Depends(require_admin)],
+)
+def create_skill(body: ClaudeSkillIn, conn: Connection = Depends(db_conn)) -> dict:
+ if repo.get_claude_skill_by_name(conn, body.name) is not None:
+ raise HTTPException(status.HTTP_409_CONFLICT, detail=f"skill '{body.name}' exists")
+ return repo.create_claude_skill(
+ conn, body.name, body.content, description=body.description, enabled=body.enabled
+ )
+
+
+@router.patch(
+ "/skills/{skill_id}", response_model=ClaudeSkillOut, dependencies=[Depends(require_admin)]
+)
+def update_skill(
+ skill_id: int, body: ClaudeSkillUpdateIn, conn: Connection = Depends(db_conn)
+) -> dict:
+ _skill_or_404(conn, skill_id)
+ fields = body.model_dump(exclude_unset=True)
+ if "name" in fields:
+ clash = repo.get_claude_skill_by_name(conn, fields["name"])
+ if clash is not None and clash["id"] != skill_id:
+ raise HTTPException(
+ status.HTTP_409_CONFLICT, detail=f"skill '{fields['name']}' exists"
+ )
+ return repo.update_claude_skill(conn, skill_id, **fields)
+
+
+@router.delete("/skills/{skill_id}", dependencies=[Depends(require_admin)])
+def delete_skill(skill_id: int, conn: Connection = Depends(db_conn)) -> dict:
+ skill = _skill_or_404(conn, skill_id)
+ repo.delete_claude_skill(conn, skill_id)
+ return {"deleted": skill["name"]}
+
+
+# ---- connectors (MCP servers) ---------------------------------------------------------
+
+
+def _connector_or_404(conn: Connection, connector_id: int) -> dict:
+ connector = repo.get_claude_connector(conn, connector_id)
+ if connector is None:
+ raise HTTPException(
+ status.HTTP_404_NOT_FOUND, detail=f"connector {connector_id} not found"
+ )
+ return connector
+
+
+@router.get("/connectors", response_model=list[ClaudeConnectorOut])
+def list_connectors(conn: Connection = Depends(db_conn)) -> list[dict]:
+ return repo.list_claude_connectors(conn)
+
+
+@router.post(
+ "/connectors",
+ response_model=ClaudeConnectorOut,
+ status_code=status.HTTP_201_CREATED,
+ dependencies=[Depends(require_admin)],
+)
+def create_connector(body: ClaudeConnectorIn, conn: Connection = Depends(db_conn)) -> dict:
+ if repo.get_claude_connector_by_name(conn, body.name) is not None:
+ raise HTTPException(status.HTTP_409_CONFLICT, detail=f"connector '{body.name}' exists")
+ return repo.create_claude_connector(
+ conn,
+ body.name,
+ body.transport,
+ command=body.command,
+ args=body.args,
+ env=body.env,
+ url=body.url,
+ headers=body.headers,
+ enabled=body.enabled,
+ )
+
+
+@router.patch(
+ "/connectors/{connector_id}",
+ response_model=ClaudeConnectorOut,
+ dependencies=[Depends(require_admin)],
+)
+def update_connector(
+ connector_id: int, body: ClaudeConnectorUpdateIn, conn: Connection = Depends(db_conn)
+) -> dict:
+ current = _connector_or_404(conn, connector_id)
+ fields = body.model_dump(exclude_unset=True)
+ if "name" in fields:
+ clash = repo.get_claude_connector_by_name(conn, fields["name"])
+ if clash is not None and clash["id"] != connector_id:
+ raise HTTPException(
+ status.HTTP_409_CONFLICT, detail=f"connector '{fields['name']}' exists"
+ )
+ # Re-check the transport/field pairing against the merged row, so a PATCH can't
+ # produce a stdio connector without a command or an http one without a url.
+ merged = {**current, **fields}
+ if merged["transport"] == "stdio":
+ if not (merged.get("command") or "").strip():
+ raise HTTPException(
+ status.HTTP_422_UNPROCESSABLE_ENTITY, detail="a stdio connector needs a command"
+ )
+ elif not (merged.get("url") or "").strip().startswith(("http://", "https://")):
+ raise HTTPException(
+ status.HTTP_422_UNPROCESSABLE_ENTITY,
+ detail=f"an {merged['transport']} connector needs an http(s) url",
+ )
+ return repo.update_claude_connector(conn, connector_id, **fields)
+
+
+@router.delete("/connectors/{connector_id}", dependencies=[Depends(require_admin)])
+def delete_connector(connector_id: int, conn: Connection = Depends(db_conn)) -> dict:
+ connector = _connector_or_404(conn, connector_id)
+ repo.delete_claude_connector(conn, connector_id)
+ return {"deleted": connector["name"]}
+
+
+# ---- plugins --------------------------------------------------------------------------
+
+
+def _plugin_or_404(conn: Connection, plugin_id: int) -> dict:
+ plugin = repo.get_claude_plugin(conn, plugin_id)
+ if plugin is None:
+ raise HTTPException(status.HTTP_404_NOT_FOUND, detail=f"plugin {plugin_id} not found")
+ return plugin
+
+
+@router.get("/plugins", response_model=list[ClaudePluginOut])
+def list_plugins(conn: Connection = Depends(db_conn)) -> list[dict]:
+ return repo.list_claude_plugins(conn)
+
+
+@router.post(
+ "/plugins",
+ response_model=ClaudePluginOut,
+ status_code=status.HTTP_201_CREATED,
+ dependencies=[Depends(require_admin)],
+)
+def create_plugin(body: ClaudePluginIn, conn: Connection = Depends(db_conn)) -> dict:
+ if repo.get_claude_plugin_by_key(conn, body.name, body.marketplace) is not None:
+ raise HTTPException(
+ status.HTTP_409_CONFLICT,
+ detail=f"plugin '{body.name}@{body.marketplace}' exists",
+ )
+ return repo.create_claude_plugin(
+ conn, body.name, body.marketplace, body.marketplace_repo, enabled=body.enabled
+ )
+
+
+@router.patch(
+ "/plugins/{plugin_id}", response_model=ClaudePluginOut, dependencies=[Depends(require_admin)]
+)
+def update_plugin(
+ plugin_id: int, body: ClaudePluginUpdateIn, conn: Connection = Depends(db_conn)
+) -> dict:
+ current = _plugin_or_404(conn, plugin_id)
+ fields = body.model_dump(exclude_unset=True)
+ if "name" in fields or "marketplace" in fields:
+ merged = {**current, **fields}
+ clash = repo.get_claude_plugin_by_key(conn, merged["name"], merged["marketplace"])
+ if clash is not None and clash["id"] != plugin_id:
+ raise HTTPException(
+ status.HTTP_409_CONFLICT,
+ detail=f"plugin '{merged['name']}@{merged['marketplace']}' exists",
+ )
+ return repo.update_claude_plugin(conn, plugin_id, **fields)
+
+
+@router.delete("/plugins/{plugin_id}", dependencies=[Depends(require_admin)])
+def delete_plugin(plugin_id: int, conn: Connection = Depends(db_conn)) -> dict:
+ plugin = _plugin_or_404(conn, plugin_id)
+ repo.delete_claude_plugin(conn, plugin_id)
+ return {"deleted": f"{plugin['name']}@{plugin['marketplace']}"}
+
+
+# ---- permissions ----------------------------------------------------------------------
+
+
+def _permissions_out(stored: dict | None) -> dict:
+ s = get_settings()
+ stored = stored or {}
+ return {
+ "default_mode": stored.get("default_mode"),
+ "allow": stored.get("allow", []),
+ "deny": stored.get("deny", []),
+ "ask": stored.get("ask", []),
+ "base_mode": s.headless_permission_mode,
+ "base_allow": s.headless_allowed_tools_list,
+ }
+
+
+@router.get("/permissions", response_model=ClaudePermissionsOut)
+def get_permissions(conn: Connection = Depends(db_conn)) -> dict:
+ return _permissions_out(repo.get_claude_config(conn, "permissions"))
+
+
+@router.put(
+ "/permissions",
+ response_model=ClaudePermissionsOut,
+ dependencies=[Depends(require_admin)],
+)
+def put_permissions(body: ClaudePermissionsIn, conn: Connection = Depends(db_conn)) -> dict:
+ stored = {
+ "default_mode": body.default_mode,
+ "allow": [r.strip() for r in body.allow if r.strip()],
+ "deny": [r.strip() for r in body.deny if r.strip()],
+ "ask": [r.strip() for r in body.ask if r.strip()],
+ }
+ repo.set_claude_config(conn, "permissions", stored)
+ return _permissions_out(stored)
diff --git a/src/handler/api/schemas.py b/src/handler/api/schemas.py
index 29fe621..08a85cc 100644
--- a/src/handler/api/schemas.py
+++ b/src/handler/api/schemas.py
@@ -351,6 +351,165 @@ class ResumeOut(BaseModel):
detail: str
+# ---- Claude management (dashboard Claude page) -----------------------------------------
+
+# Names become filesystem dirnames (skills) and JSON object keys (connectors,
+# marketplaces), so keep them to a safe slug — no separators, no dot-prefix.
+_SLUG_PATTERN = r"^[A-Za-z0-9][A-Za-z0-9._-]*$"
+
+# settings.json permissions.defaultMode values claude accepts.
+PermissionMode = Literal["default", "acceptEdits", "plan", "bypassPermissions"]
+McpTransport = Literal["stdio", "http", "sse"]
+
+# "owner/repo" marketplaces resolve as GitHub sources; anything else must be a git URL.
+_GIT_URL_RE = re.compile(r"^(https?://|git@|ssh://)")
+
+
+class ClaudeSkillIn(BaseModel):
+ name: str = Field(min_length=1, max_length=64, pattern=_SLUG_PATTERN)
+ description: str | None = None
+ content: str = Field(min_length=1)
+ enabled: bool = True
+
+
+class ClaudeSkillUpdateIn(BaseModel):
+ name: str | None = Field(default=None, min_length=1, max_length=64, pattern=_SLUG_PATTERN)
+ description: str | None = None
+ content: str | None = Field(default=None, min_length=1)
+ enabled: bool | None = None
+
+
+class ClaudeSkillOut(BaseModel):
+ model_config = ConfigDict(from_attributes=True)
+
+ id: int
+ name: str
+ description: str | None = None
+ content: str
+ enabled: bool
+ created_at: datetime
+ updated_at: datetime
+
+
+class ClaudeConnectorIn(BaseModel):
+ """An MCP server agents may reach: ``stdio`` runs ``command`` in the control
+ container, ``http``/``sse`` point at ``url``. Written per-launch as the run's
+ ``--mcp-config`` file."""
+
+ name: str = Field(min_length=1, max_length=64, pattern=_SLUG_PATTERN)
+ transport: McpTransport = "stdio"
+ command: str | None = None
+ args: list[str] = Field(default_factory=list)
+ env: dict[str, str] = Field(default_factory=dict)
+ url: str | None = None
+ headers: dict[str, str] = Field(default_factory=dict)
+ enabled: bool = True
+
+ @model_validator(mode="after")
+ def _check_transport_fields(self) -> ClaudeConnectorIn:
+ if self.transport == "stdio":
+ if not (self.command or "").strip():
+ raise ValueError("a stdio connector needs a command")
+ elif not (self.url or "").strip() or not self.url.strip().startswith(
+ ("http://", "https://")
+ ):
+ raise ValueError(f"an {self.transport} connector needs an http(s) url")
+ return self
+
+
+class ClaudeConnectorUpdateIn(BaseModel):
+ name: str | None = Field(default=None, min_length=1, max_length=64, pattern=_SLUG_PATTERN)
+ transport: McpTransport | None = None
+ command: str | None = None
+ args: list[str] | None = None
+ env: dict[str, str] | None = None
+ url: str | None = None
+ headers: dict[str, str] | None = None
+ enabled: bool | None = None
+
+
+class ClaudeConnectorOut(BaseModel):
+ model_config = ConfigDict(from_attributes=True)
+
+ id: int
+ name: str
+ transport: str
+ command: str | None = None
+ args: list[str] | None = None
+ env: dict[str, str] | None = None
+ url: str | None = None
+ headers: dict[str, str] | None = None
+ enabled: bool
+ created_at: datetime
+
+
+class ClaudePluginIn(BaseModel):
+ """A plugin pinned to the marketplace serving it. ``marketplace_repo`` is
+ ``owner/repo`` (GitHub) or a git URL; generated settings carry it as an extra known
+ marketplace with the plugin enabled, so headless runs install it on boot."""
+
+ name: str = Field(min_length=1, max_length=64, pattern=_SLUG_PATTERN)
+ marketplace: str = Field(min_length=1, max_length=64, pattern=_SLUG_PATTERN)
+ marketplace_repo: str = Field(min_length=1)
+ enabled: bool = True
+
+ @field_validator("marketplace_repo")
+ @classmethod
+ def _check_repo(cls, v: str) -> str:
+ v = v.strip()
+ if not (_REPO_RE.match(v) or _GIT_URL_RE.match(v)):
+ raise ValueError("marketplace_repo must be owner/repo or a git URL")
+ return v
+
+
+class ClaudePluginUpdateIn(BaseModel):
+ name: str | None = Field(default=None, min_length=1, max_length=64, pattern=_SLUG_PATTERN)
+ marketplace: str | None = Field(
+ default=None, min_length=1, max_length=64, pattern=_SLUG_PATTERN
+ )
+ marketplace_repo: str | None = Field(default=None, min_length=1)
+ enabled: bool | None = None
+
+ @field_validator("marketplace_repo")
+ @classmethod
+ def _check_repo(cls, v: str | None) -> str | None:
+ if v is None:
+ return None
+ v = v.strip()
+ if not (_REPO_RE.match(v) or _GIT_URL_RE.match(v)):
+ raise ValueError("marketplace_repo must be owner/repo or a git URL")
+ return v
+
+
+class ClaudePluginOut(BaseModel):
+ model_config = ConfigDict(from_attributes=True)
+
+ id: int
+ name: str
+ marketplace: str
+ marketplace_repo: str
+ enabled: bool
+ created_at: datetime
+
+
+class ClaudePermissionsIn(BaseModel):
+ """The operator's permission overrides, merged over the env-configured baseline at
+ launch: ``default_mode`` (null = keep the baseline) plus extra allow/deny/ask rules."""
+
+ default_mode: PermissionMode | None = None
+ allow: list[str] = Field(default_factory=list)
+ deny: list[str] = Field(default_factory=list)
+ ask: list[str] = Field(default_factory=list)
+
+
+class ClaudePermissionsOut(ClaudePermissionsIn):
+ """Stored overrides plus the env baseline they merge over, so the UI can show the
+ effective policy without guessing at server config."""
+
+ base_mode: str
+ base_allow: list[str] = Field(default_factory=list)
+
+
class SharedContextIn(BaseModel):
value: str
diff --git a/src/handler/api/static/404.html b/src/handler/api/static/404.html
index bbf8e4e..9d56118 100644
--- a/src/handler/api/static/404.html
+++ b/src/handler/api/static/404.html
@@ -1 +1 @@
-Handler · Claude Activity
\ No newline at end of file
+Handler · Claude Activity
\ No newline at end of file
diff --git a/src/handler/api/static/404/index.html b/src/handler/api/static/404/index.html
index bbf8e4e..9d56118 100644
--- a/src/handler/api/static/404/index.html
+++ b/src/handler/api/static/404/index.html
@@ -1 +1 @@
-Handler · Claude Activity
\ No newline at end of file
+Handler · Claude Activity
\ No newline at end of file
diff --git a/src/handler/api/static/_next/static/ecJZL3f8VZAeTLKfyHRWs/_buildManifest.js b/src/handler/api/static/_next/static/9ucF5j1fWuiDF55MzWzbS/_buildManifest.js
similarity index 100%
rename from src/handler/api/static/_next/static/ecJZL3f8VZAeTLKfyHRWs/_buildManifest.js
rename to src/handler/api/static/_next/static/9ucF5j1fWuiDF55MzWzbS/_buildManifest.js
diff --git a/src/handler/api/static/_next/static/ecJZL3f8VZAeTLKfyHRWs/_ssgManifest.js b/src/handler/api/static/_next/static/9ucF5j1fWuiDF55MzWzbS/_ssgManifest.js
similarity index 100%
rename from src/handler/api/static/_next/static/ecJZL3f8VZAeTLKfyHRWs/_ssgManifest.js
rename to src/handler/api/static/_next/static/9ucF5j1fWuiDF55MzWzbS/_ssgManifest.js
diff --git a/src/handler/api/static/_next/static/chunks/171-58fbf67bb7636c62.js b/src/handler/api/static/_next/static/chunks/171-58fbf67bb7636c62.js
new file mode 100644
index 0000000..c86ccae
--- /dev/null
+++ b/src/handler/api/static/_next/static/chunks/171-58fbf67bb7636c62.js
@@ -0,0 +1 @@
+"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[171],{171:function(e,t,r){r.d(t,{_:function(){return l},Q:function(){return u}});var a,n=r(7437),c=r(2265);let s=null!==(a=r(257).env.NEXT_PUBLIC_API_BASE)&&void 0!==a?a:"";class o extends Error{constructor(e="unauthorized"){super(e),this.name="AuthError"}}let i=(0,c.createContext)(null);function u(){let e=(0,c.useContext)(i);if(!e)throw Error("useDashboard outside provider");return e}function l(e){let{token:t,onUnauthorized:r,initialSection:a="runs",children:u}=e,l=(0,c.useMemo)(()=>(function(e,t){async function r(r,a){var n;let c=(null==a?void 0:a.body)!==void 0&&(null==a?void 0:a.body)!==null,i=await fetch(s+r,{method:null!==(n=null==a?void 0:a.method)&&void 0!==n?n:c?"POST":"GET",headers:{Authorization:"Bearer ".concat(e),...c?{"Content-Type":"application/json"}:{}},body:c?JSON.stringify(a.body):void 0});if(401===i.status)throw t(),new o;if(!i.ok){let e=i.statusText;try{let t=await i.json();t&&void 0!==t.detail&&(e="string"==typeof t.detail?t.detail:JSON.stringify(t.detail))}catch(e){}let t=Error(e);throw t.status=i.status,t}if(204===i.status)return;let u=await i.text();return u?JSON.parse(u):void 0}async function a(e,t){var a,n;let c=null!==(a=null==t?void 0:t.attempts)&&void 0!==a?a:60,s=null!==(n=null==t?void 0:t.intervalMs)&&void 0!==n?n:500;for(let t=0;tsetTimeout(e,s))}return null}return{api:r,trackCommand:a}})(t,r),[t,r]),d=(0,c.useRef)(l);d.current=l;let[m,p]=(0,c.useState)(a),[y,h]=(0,c.useState)([]),[b,g]=(0,c.useState)([]),[w,f]=(0,c.useState)(""),[k,C]=(0,c.useState)(null),[v,_]=(0,c.useState)(null),[x,S]=(0,c.useState)(!1),[I,E]=(0,c.useState)([]),[T,R]=(0,c.useState)(0),[P,j]=(0,c.useState)([]),U=(0,c.useRef)([]);U.current=P;let A=(0,c.useRef)(0),[O,L]=(0,c.useState)([]),[D,N]=(0,c.useState)([]),[H,z]=(0,c.useState)([]),[J,B]=(0,c.useState)([]),[M,q]=(0,c.useState)({log:[],context:[]}),[F,G]=(0,c.useState)({text:"",error:!1,busy:!1}),[Q,X]=(0,c.useState)(""),[K,V]=(0,c.useState)(!0),[W,Y]=(0,c.useState)({status:"idle",url:"",message:""}),[Z,$]=(0,c.useState)([]),[ee,et]=(0,c.useState)([]),[er,ea]=(0,c.useState)([]),[en,ec]=(0,c.useState)(null),es=(0,c.useRef)(m);es.current=m;let eo=(0,c.useRef)(w);eo.current=w;let ei=(0,c.useRef)(k);ei.current=k;let eu=(0,c.useRef)(T);eu.current=T;let el=e=>{e instanceof o||X(e.message)},ed=(0,c.useCallback)(async()=>{try{let e=await d.current.api("/projects");h(e),X(""),f(t=>{var r,a;return t||(null!==(a=null===(r=e[0])||void 0===r?void 0:r.id)&&void 0!==a?a:"")})}catch(e){el(e)}},[]),em=(0,c.useCallback)(async e=>{try{let t=await Promise.all(e.map(e=>d.current.api("/projects/".concat(encodeURIComponent(e.id),"/agents")).catch(()=>[])));g(t.flat())}catch(e){el(e)}},[]),ep=(0,c.useCallback)(async(e,t)=>{let r="/projects/".concat(encodeURIComponent(e),"/agents/").concat(encodeURIComponent(t)),a=A.current;try{let e=await d.current.api("".concat(r,"/checkmark"));if(a!==A.current)return;_(e),S(!1)}catch(e){if(e instanceof o||a!==A.current)return;404===e.status?(_(null),S(!0)):el(e)}try{let e=await d.current.api("".concat(r,"/log?limit=").concat(100,"&offset=").concat(eu.current));if(a!==A.current)return;E(e)}catch(e){a!==A.current||el(e)}try{let e=U.current,t=e.length?e[e.length-1].id:0,n=await d.current.api("".concat(r,"/events?after_id=").concat(t,"&limit=500"));if(a!==A.current||0===n.length)return;j(e=>{let t=e.length?e[e.length-1].id:0,r=n.filter(e=>e.id>t);return r.length?[...e,...r]:e})}catch(e){a!==A.current||el(e)}},[]),ey=(0,c.useCallback)(async e=>{if(!e){L([]);return}try{L(await d.current.api("/projects/".concat(encodeURIComponent(e),"/approvals")))}catch(e){el(e)}},[]),eh=(0,c.useCallback)(async()=>{try{N(await d.current.api("/hosts"))}catch(e){el(e)}},[]),eb=(0,c.useCallback)(async()=>{try{z(await d.current.api("/commands?limit=50"))}catch(e){el(e)}},[]),eg=(0,c.useCallback)(async()=>{try{B(await d.current.api("/schedules"))}catch(e){el(e)}},[]),ew=(0,c.useCallback)(async()=>{try{let[e,t]=await Promise.all([d.current.api("/shared/log"),d.current.api("/shared/context")]);q({log:e,context:t})}catch(e){el(e)}},[]),ef=(0,c.useCallback)(async()=>{try{let[e,t,r,a]=await Promise.all([d.current.api("/claude/skills"),d.current.api("/claude/connectors"),d.current.api("/claude/plugins"),d.current.api("/claude/permissions")]);$(e),et(t),ea(r),ec(a)}catch(e){el(e)}},[]),ek=(0,c.useCallback)(async()=>{let e=await d.current.api("/projects").catch(e=>(el(e),null));e&&(h(e),f(t=>{var r,a;return t||(null!==(a=null===(r=e[0])||void 0===r?void 0:r.id)&&void 0!==a?a:"")}),await em(e));let t=es.current,r=ei.current;r&&await ep(r.projectId,r.name),"approvals"===t&&await ey(eo.current),"servers"===t&&await eh(),"activity"===t&&await eb(),"schedules"===t&&await eg(),"shared"===t&&await ew(),"claude"===t&&await ef()},[em,ep,ey,eh,eb,eg,ew,ef]);(0,c.useEffect)(()=>{let e=!0;(async()=>{V(!0),await ek(),e&&V(!1)})();let t=setInterval(()=>{document.hidden||ek()},5e3);return()=>{e=!1,clearInterval(t)}},[ek]);let eC=(0,c.useCallback)(e=>{p(e),G({text:"",error:!1,busy:!1}),"approvals"===e&&ey(eo.current),"servers"===e&&eh(),"activity"===e&&eb(),"schedules"===e&&eg(),"shared"===e&&ew(),"claude"===e&&ef()},[ey,eh,eb,eg,ew,ef]),ev=(0,c.useCallback)(e=>{f(e),"approvals"===es.current&&ey(e)},[ey]),e_=(0,c.useCallback)((e,t)=>{A.current+=1,C({projectId:e,name:t}),R(0),eu.current=0,_(null),S(!1),E([]),j([]),U.current=[],ep(e,t)},[ep]),ex=(0,c.useCallback)(e=>{let t=Math.max(0,T+100*e);if(t===T)return;R(t),eu.current=t;let r=ei.current;r&&ep(r.projectId,r.name)},[T,ep]),eS=(0,c.useCallback)(()=>{ek()},[ek]),eI=(0,c.useCallback)(async(e,t,r)=>{G({text:"".concat(r,": queued…"),error:!1,busy:!0});try{let a=await d.current.api(e,{method:"POST",body:t}),n=await d.current.trackCommand(a.id);if(!n)return G({text:"".concat(r,": still running (see Activity). Is the worker up?"),error:!1,busy:!1}),null;let c="done"===n.status,s=n.error||(n.result?JSON.stringify(n.result):"");return G({text:"".concat(r," ").concat(c?"done":"failed").concat(s?" — "+s:""),error:!c,busy:!1}),n}catch(e){if(e instanceof o)return null;return G({text:"".concat(r," failed: ").concat(e.message),error:!0,busy:!1}),null}},[]),eE=(0,c.useCallback)(async e=>{let t={name:e.name.trim(),role:e.role||null,task:e.task.trim()||null};"worktree"===e.placement&&e.worktree.trim()&&(t.worktree=e.worktree.trim()),"subdir"===e.placement&&e.subdir.trim()&&(t.subdir=e.subdir.trim());let r=encodeURIComponent(eo.current),a=await eI("/projects/".concat(r,"/agents/spawn"),t,"spawn ".concat(t.name));return await em(y),(null==a?void 0:a.status)==="done"},[eI,em,y]),eT=(0,c.useCallback)(async(e,t)=>{let r=encodeURIComponent(e);await eI("/projects/".concat(r,"/agents/").concat(encodeURIComponent(t),"/kill"),void 0,"kill ".concat(t)),await em(y)},[eI,em,y]),eR=(0,c.useCallback)(async(e,t)=>{let r=encodeURIComponent(e);try{var a;await d.current.api("/projects/".concat(r,"/agents/").concat(encodeURIComponent(t)),{method:"DELETE"}),G({text:"agent '".concat(t,"' row deleted"),error:!1,busy:!1}),(null===(a=ei.current)||void 0===a?void 0:a.name)===t&&C(null),await em(y)}catch(e){if(e instanceof o)return;G({text:e.message,error:!0,busy:!1})}},[em,y]),eP=(0,c.useCallback)(async(e,t)=>{let r=ei.current;if(!r)return!1;let a="/projects/".concat(encodeURIComponent(r.projectId),"/agents/").concat(encodeURIComponent(r.name));try{return await d.current.api("".concat(a,"/answer"),{method:"POST",body:{answer:e}}),t?await eI("".concat(a,"/resume"),{answer:e},"resume"):G({text:"Answer saved (agent still paused).",error:!1,busy:!1}),await em(y),await ep(r.projectId,r.name),!0}catch(e){if(e instanceof o)return!1;return G({text:e.message,error:!0,busy:!1}),!1}},[eI,em,ep,y]),ej=(0,c.useCallback)(async e=>{try{var t,r;let a="server"===e.mode?{git_server:e.git_server,repo:e.repo.trim(),id:e.id.trim()||null,credential_ref:e.credential_ref.trim()||null,init_mise:e.init_mise}:{id:e.id.trim(),root_dir:e.root_dir.trim(),git_remote:e.git_remote.trim()||null,credential_ref:e.credential_ref.trim()||null,init_mise:e.init_mise},n=await d.current.api("/projects",{method:"POST",body:a});if(await ed(),null!=n.sync_command_id){G({text:"repository '".concat(n.id,"': cloning…"),error:!1,busy:!0});let e=await d.current.trackCommand(n.sync_command_id);e?"done"===e.status?G({text:"repository '".concat(n.id,"' registered and cloned"),error:!1,busy:!1}):G({text:"repository '".concat(n.id,"' registered but the clone failed — ").concat(null!==(t=e.error)&&void 0!==t?t:""),error:!0,busy:!1}):G({text:"repository '".concat(n.id,"' registered; clone still running (see Activity). Is the worker up?"),error:!1,busy:!1})}else G({text:"repository '".concat(n.id,"' registered"),error:!1,busy:!1});if(null!=n.mise_init_command_id){G({text:"repository '".concat(n.id,"': launching a mise-init agent to create .mise.toml…"),error:!1,busy:!0});let e=await d.current.trackCommand(n.mise_init_command_id);e?"done"===e.status?G({text:"repository '".concat(n.id,"' registered; a mise-init agent is now writing, committing, and pushing .mise.toml (watch it in Runs)."),error:!1,busy:!1}):G({text:"repository '".concat(n.id,"' registered but the mise-init agent failed to launch — ").concat(null!==(r=e.error)&&void 0!==r?r:""),error:!0,busy:!1}):G({text:"repository '".concat(n.id,"' registered; mise-init still starting (see Activity). Is the worker up?"),error:!1,busy:!1})}return!0}catch(e){if(e instanceof o)return!1;return G({text:e.message,error:!0,busy:!1}),!1}},[ed]),eU=(0,c.useCallback)(async e=>{await eI("/projects/".concat(encodeURIComponent(e),"/sync"),void 0,"pull ".concat(e))},[eI]),eA=(0,c.useCallback)(async(e,t)=>{try{return await d.current.api("/projects/".concat(encodeURIComponent(e)),{method:"PATCH",body:{root_dir:t.root_dir.trim(),git_remote:t.git_remote.trim()||null,credential_ref:t.credential_ref.trim()||null}}),G({text:"repository '".concat(e,"' updated"),error:!1,busy:!1}),await ed(),!0}catch(e){if(e instanceof o)return!1;return G({text:e.message,error:!0,busy:!1}),!1}},[ed]),eO=(0,c.useCallback)(async e=>{try{await d.current.api("/projects/".concat(encodeURIComponent(e)),{method:"DELETE"}),G({text:"repository '".concat(e,"' removed"),error:!1,busy:!1}),f(t=>t===e?"":t),await ed()}catch(e){if(e instanceof o)return;G({text:e.message,error:!0,busy:!1})}},[ed]),eL=(0,c.useCallback)(async e=>{let t=encodeURIComponent(eo.current);await eI("/projects/".concat(t,"/approvals"),{branch:e.branch.trim(),status:e.status,agent_name:e.agent_name.trim()||null,sha:e.sha.trim()||null,note:e.note.trim()||null},"".concat(e.status," ").concat(e.branch)),await ey(eo.current)},[eI,ey]),eD=(0,c.useCallback)(async e=>{try{return await d.current.api("/hosts",{method:"POST",body:{hostname:e.hostname.trim(),forge_type:e.forge_type,token_env_var:e.token_env_var.trim()||null,base_url:e.base_url.trim()||null,token:e.token.trim()||null,generate_ssh_key:e.generate_ssh_key}}),G({text:"git server '".concat(e.hostname,"' added"),error:!1,busy:!1}),await eh(),!0}catch(e){if(e instanceof o)return!1;return G({text:e.message,error:!0,busy:!1}),!1}},[eh]),eN=(0,c.useCallback)(async(e,t)=>{try{let r={forge_type:t.forge_type,token_env_var:t.token_env_var.trim()||null,base_url:t.base_url.trim()||null};return t.token.trim()&&(r.token=t.token.trim()),t.generate_ssh_key&&(r.regenerate_ssh_key=!0),await d.current.api("/hosts/".concat(encodeURIComponent(e)),{method:"PATCH",body:r}),G({text:"git server '".concat(e,"' updated"),error:!1,busy:!1}),await eh(),!0}catch(e){if(e instanceof o)return!1;return G({text:e.message,error:!0,busy:!1}),!1}},[eh]),eH=(0,c.useCallback)(async(e,t)=>{try{return await d.current.api("/projects/".concat(encodeURIComponent(e),"/schedules"),{method:"POST",body:{name_prefix:t.name_prefix.trim(),task:t.task.trim(),interval_seconds:t.interval_seconds,role:t.role||null}}),G({text:"schedule '".concat(t.name_prefix,"' created — first run on the worker's next pass"),error:!1,busy:!1}),await eg(),!0}catch(e){if(e instanceof o)return!1;return G({text:e.message,error:!0,busy:!1}),!1}},[eg]),ez=(0,c.useCallback)(async(e,t)=>{try{return await d.current.api("/schedules/".concat(e),{method:"PATCH",body:t}),await eg(),!0}catch(e){if(e instanceof o)return!1;return G({text:e.message,error:!0,busy:!1}),!1}},[eg]),eJ=(0,c.useCallback)(async e=>{try{await d.current.api("/schedules/".concat(e),{method:"DELETE"}),G({text:"schedule ".concat(e," removed"),error:!1,busy:!1}),await eg()}catch(e){if(e instanceof o)return;G({text:e.message,error:!0,busy:!1})}},[eg]),eB=(0,c.useCallback)(async e=>{try{await d.current.api("/hosts/".concat(encodeURIComponent(e)),{method:"DELETE"}),G({text:"git server '".concat(e,"' removed"),error:!1,busy:!1}),await eh()}catch(e){if(e instanceof o)return;G({text:e.message,error:!0,busy:!1})}},[eh]),eM=(0,c.useCallback)(async()=>{await eI("/poll-ci",void 0,"poll-ci (all projects)"),await eb()},[eI,eb]),eq=(0,c.useCallback)(async()=>{Y({status:"starting",url:"",message:"Opening `claude /login` in the control container and selecting the subscription account…"});try{let e=await d.current.api("/login/start",{method:"POST"}),t=await d.current.trackCommand(e.id,{attempts:180});if(!t){Y({status:"error",url:"",message:"Still starting (see Activity). Is the control worker running?"});return}if("done"!==t.status){Y({status:"error",url:"",message:t.error||"Failed to start login."});return}let r=t.result&&"string"==typeof t.result.url?t.result.url:"";if(!r){Y({status:"error",url:"",message:"No login URL was returned by claude."});return}Y({status:"awaiting",url:r,message:"Authorize in the window below (or open it in a new tab), then paste the code claude gives you."})}catch(e){if(e instanceof o)return;Y({status:"error",url:"",message:e.message})}},[]),eF=(0,c.useCallback)(async e=>{let t=e.trim();if(!t)return!1;Y(e=>({...e,status:"submitting",message:"Submitting the authorization code…"}));try{let e=await d.current.api("/login/submit",{method:"POST",body:{code:t}}),r=await d.current.trackCommand(e.id,{attempts:60});if(!r)return Y(e=>({...e,status:"awaiting",message:"Submit still running (see Activity). Is the control worker running?"})),!1;if("done"===r.status)return Y({status:"done",url:"",message:"Claude Code is now logged in on the host — new agents will use this account."}),!0;return Y(e=>({...e,status:"awaiting",message:r.error||"Login was not confirmed. Re-check the code, or restart the flow."})),!1}catch(e){if(e instanceof o)return!1;return Y(t=>({...t,status:"awaiting",message:e.message})),!1}},[]),eG=(0,c.useCallback)(()=>{Y({status:"idle",url:"",message:""})},[]),eQ=(0,c.useCallback)(async(e,t)=>{try{return await e(),G({text:t,error:!1,busy:!1}),await ef(),!0}catch(e){if(e instanceof o)return!1;return G({text:e.message,error:!0,busy:!1}),!1}},[ef]),eX=(0,c.useCallback)(e=>eQ(()=>d.current.api("/claude/skills",{method:"POST",body:{name:e.name.trim(),description:e.description.trim()||null,content:e.content,enabled:e.enabled}}),"skill '".concat(e.name.trim(),"' saved — applies to the next agent launch")),[eQ]),eK=(0,c.useCallback)((e,t)=>eQ(()=>d.current.api("/claude/skills/".concat(e),{method:"PATCH",body:t}),"skill updated — applies to the next agent launch"),[eQ]),eV=(0,c.useCallback)(async e=>{await eQ(()=>d.current.api("/claude/skills/".concat(e),{method:"DELETE"}),"skill removed — gone from workers at the next launch")},[eQ]),eW=(0,c.useCallback)(e=>eQ(()=>d.current.api("/claude/connectors",{method:"POST",body:{...e,name:e.name.trim()}}),"connector '".concat(e.name.trim(),"' saved — applies to the next agent launch")),[eQ]),eY=(0,c.useCallback)((e,t)=>eQ(()=>d.current.api("/claude/connectors/".concat(e),{method:"PATCH",body:t}),"connector updated — applies to the next agent launch"),[eQ]),eZ=(0,c.useCallback)(async e=>{await eQ(()=>d.current.api("/claude/connectors/".concat(e),{method:"DELETE"}),"connector removed — applies to the next agent launch")},[eQ]),e$=(0,c.useCallback)(e=>eQ(()=>d.current.api("/claude/plugins",{method:"POST",body:{name:e.name.trim(),marketplace:e.marketplace.trim(),marketplace_repo:e.marketplace_repo.trim(),enabled:e.enabled}}),"plugin '".concat(e.name.trim(),"' saved — installs on the next agent launch")),[eQ]),e0=(0,c.useCallback)((e,t)=>eQ(()=>d.current.api("/claude/plugins/".concat(e),{method:"PATCH",body:t}),"plugin updated — applies to the next agent launch"),[eQ]),e1=(0,c.useCallback)(async e=>{await eQ(()=>d.current.api("/claude/plugins/".concat(e),{method:"DELETE"}),"plugin removed — applies to the next agent launch")},[eQ]),e5=(0,c.useCallback)(e=>eQ(()=>d.current.api("/claude/permissions",{method:"PUT",body:e}),"permissions saved — apply to the next agent launch"),[eQ]),e4=(0,c.useCallback)(async(e,t)=>{try{return await d.current.api("/shared/context/".concat(encodeURIComponent(e)),{method:"PUT",body:{value:t}}),G({text:"shared context '".concat(e,"' set"),error:!1,busy:!1}),await ew(),!0}catch(e){if(e instanceof o)return!1;return G({text:e.message,error:!0,busy:!1}),!1}},[ew]);return(0,n.jsx)(i.Provider,{value:{section:m,setSection:eC,projects:y,agents:b,selectedProjectId:w,selectProject:ev,selectedRun:k,selectRun:e_,checkmark:v,checkmarkMissing:x,log:I,logOffset:T,pageLog:ex,events:P,approvals:O,hosts:D,commands:H,schedules:J,shared:M,cmd:F,lastError:Q,loading:K,refresh:eS,spawnAgent:eE,killAgent:eT,deleteAgent:eR,submitAnswer:eP,createProject:ej,updateProject:eA,deleteProject:eO,syncProject:eU,submitApproval:eL,createHost:eD,updateHost:eN,deleteHost:eB,createSchedule:eH,updateSchedule:ez,deleteSchedule:eJ,pollCi:eM,setSharedKey:e4,claudeLogin:W,startClaudeLogin:eq,submitClaudeCode:eF,resetClaudeLogin:eG,claudeSkills:Z,claudeConnectors:ee,claudePlugins:er,claudePermissions:en,createClaudeSkill:eX,updateClaudeSkill:eK,deleteClaudeSkill:eV,createClaudeConnector:eW,updateClaudeConnector:eY,deleteClaudeConnector:eZ,createClaudePlugin:e$,updateClaudePlugin:e0,deleteClaudePlugin:e1,saveClaudePermissions:e5},children:u})}}}]);
\ No newline at end of file
diff --git a/src/handler/api/static/_next/static/chunks/171-ba6c418b542791c8.js b/src/handler/api/static/_next/static/chunks/171-ba6c418b542791c8.js
deleted file mode 100644
index 319bb5a..0000000
--- a/src/handler/api/static/_next/static/chunks/171-ba6c418b542791c8.js
+++ /dev/null
@@ -1 +0,0 @@
-"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[171],{171:function(t,e,r){r.d(e,{_:function(){return l},Q:function(){return u}});var a,n=r(7437),s=r(2265);let c=null!==(a=r(257).env.NEXT_PUBLIC_API_BASE)&&void 0!==a?a:"";class o extends Error{constructor(t="unauthorized"){super(t),this.name="AuthError"}}let i=(0,s.createContext)(null);function u(){let t=(0,s.useContext)(i);if(!t)throw Error("useDashboard outside provider");return t}function l(t){let{token:e,onUnauthorized:r,initialSection:a="runs",children:u}=t,l=(0,s.useMemo)(()=>(function(t,e){async function r(r,a){var n;let s=(null==a?void 0:a.body)!==void 0&&(null==a?void 0:a.body)!==null,i=await fetch(c+r,{method:null!==(n=null==a?void 0:a.method)&&void 0!==n?n:s?"POST":"GET",headers:{Authorization:"Bearer ".concat(t),...s?{"Content-Type":"application/json"}:{}},body:s?JSON.stringify(a.body):void 0});if(401===i.status)throw e(),new o;if(!i.ok){let t=i.statusText;try{let e=await i.json();e&&void 0!==e.detail&&(t="string"==typeof e.detail?e.detail:JSON.stringify(e.detail))}catch(t){}let e=Error(t);throw e.status=i.status,e}if(204===i.status)return;let u=await i.text();return u?JSON.parse(u):void 0}async function a(t,e){var a,n;let s=null!==(a=null==e?void 0:e.attempts)&&void 0!==a?a:60,c=null!==(n=null==e?void 0:e.intervalMs)&&void 0!==n?n:500;for(let e=0;esetTimeout(t,c))}return null}return{api:r,trackCommand:a}})(e,r),[e,r]),d=(0,s.useRef)(l);d.current=l;let[m,y]=(0,s.useState)(a),[p,h]=(0,s.useState)([]),[g,b]=(0,s.useState)([]),[w,f]=(0,s.useState)(""),[k,v]=(0,s.useState)(null),[C,_]=(0,s.useState)(null),[x,S]=(0,s.useState)(!1),[I,R]=(0,s.useState)([]),[j,E]=(0,s.useState)(0),[U,T]=(0,s.useState)([]),P=(0,s.useRef)([]);P.current=U;let A=(0,s.useRef)(0),[O,N]=(0,s.useState)([]),[L,D]=(0,s.useState)([]),[z,J]=(0,s.useState)([]),[B,H]=(0,s.useState)([]),[M,q]=(0,s.useState)({log:[],context:[]}),[F,G]=(0,s.useState)({text:"",error:!1,busy:!1}),[Q,X]=(0,s.useState)(""),[K,V]=(0,s.useState)(!0),[W,Y]=(0,s.useState)({status:"idle",url:"",message:""}),Z=(0,s.useRef)(m);Z.current=m;let $=(0,s.useRef)(w);$.current=w;let tt=(0,s.useRef)(k);tt.current=k;let te=(0,s.useRef)(j);te.current=j;let tr=t=>{t instanceof o||X(t.message)},ta=(0,s.useCallback)(async()=>{try{let t=await d.current.api("/projects");h(t),X(""),f(e=>{var r,a;return e||(null!==(a=null===(r=t[0])||void 0===r?void 0:r.id)&&void 0!==a?a:"")})}catch(t){tr(t)}},[]),tn=(0,s.useCallback)(async t=>{try{let e=await Promise.all(t.map(t=>d.current.api("/projects/".concat(encodeURIComponent(t.id),"/agents")).catch(()=>[])));b(e.flat())}catch(t){tr(t)}},[]),ts=(0,s.useCallback)(async(t,e)=>{let r="/projects/".concat(encodeURIComponent(t),"/agents/").concat(encodeURIComponent(e)),a=A.current;try{let t=await d.current.api("".concat(r,"/checkmark"));if(a!==A.current)return;_(t),S(!1)}catch(t){if(t instanceof o||a!==A.current)return;404===t.status?(_(null),S(!0)):tr(t)}try{let t=await d.current.api("".concat(r,"/log?limit=").concat(100,"&offset=").concat(te.current));if(a!==A.current)return;R(t)}catch(t){a!==A.current||tr(t)}try{let t=P.current,e=t.length?t[t.length-1].id:0,n=await d.current.api("".concat(r,"/events?after_id=").concat(e,"&limit=500"));if(a!==A.current||0===n.length)return;T(t=>{let e=t.length?t[t.length-1].id:0,r=n.filter(t=>t.id>e);return r.length?[...t,...r]:t})}catch(t){a!==A.current||tr(t)}},[]),tc=(0,s.useCallback)(async t=>{if(!t){N([]);return}try{N(await d.current.api("/projects/".concat(encodeURIComponent(t),"/approvals")))}catch(t){tr(t)}},[]),to=(0,s.useCallback)(async()=>{try{D(await d.current.api("/hosts"))}catch(t){tr(t)}},[]),ti=(0,s.useCallback)(async()=>{try{J(await d.current.api("/commands?limit=50"))}catch(t){tr(t)}},[]),tu=(0,s.useCallback)(async()=>{try{H(await d.current.api("/schedules"))}catch(t){tr(t)}},[]),tl=(0,s.useCallback)(async()=>{try{let[t,e]=await Promise.all([d.current.api("/shared/log"),d.current.api("/shared/context")]);q({log:t,context:e})}catch(t){tr(t)}},[]),td=(0,s.useCallback)(async()=>{let t=await d.current.api("/projects").catch(t=>(tr(t),null));t&&(h(t),f(e=>{var r,a;return e||(null!==(a=null===(r=t[0])||void 0===r?void 0:r.id)&&void 0!==a?a:"")}),await tn(t));let e=Z.current,r=tt.current;r&&await ts(r.projectId,r.name),"approvals"===e&&await tc($.current),"servers"===e&&await to(),"activity"===e&&await ti(),"schedules"===e&&await tu(),"shared"===e&&await tl()},[tn,ts,tc,to,ti,tu,tl]);(0,s.useEffect)(()=>{let t=!0;(async()=>{V(!0),await td(),t&&V(!1)})();let e=setInterval(()=>{document.hidden||td()},5e3);return()=>{t=!1,clearInterval(e)}},[td]);let tm=(0,s.useCallback)(t=>{y(t),G({text:"",error:!1,busy:!1}),"approvals"===t&&tc($.current),"servers"===t&&to(),"activity"===t&&ti(),"schedules"===t&&tu(),"shared"===t&&tl()},[tc,to,ti,tu,tl]),ty=(0,s.useCallback)(t=>{f(t),"approvals"===Z.current&&tc(t)},[tc]),tp=(0,s.useCallback)((t,e)=>{A.current+=1,v({projectId:t,name:e}),E(0),te.current=0,_(null),S(!1),R([]),T([]),P.current=[],ts(t,e)},[ts]),th=(0,s.useCallback)(t=>{let e=Math.max(0,j+100*t);if(e===j)return;E(e),te.current=e;let r=tt.current;r&&ts(r.projectId,r.name)},[j,ts]),tg=(0,s.useCallback)(()=>{td()},[td]),tb=(0,s.useCallback)(async(t,e,r)=>{G({text:"".concat(r,": queued…"),error:!1,busy:!0});try{let a=await d.current.api(t,{method:"POST",body:e}),n=await d.current.trackCommand(a.id);if(!n)return G({text:"".concat(r,": still running (see Activity). Is the worker up?"),error:!1,busy:!1}),null;let s="done"===n.status,c=n.error||(n.result?JSON.stringify(n.result):"");return G({text:"".concat(r," ").concat(s?"done":"failed").concat(c?" — "+c:""),error:!s,busy:!1}),n}catch(t){if(t instanceof o)return null;return G({text:"".concat(r," failed: ").concat(t.message),error:!0,busy:!1}),null}},[]),tw=(0,s.useCallback)(async t=>{let e={name:t.name.trim(),role:t.role||null,task:t.task.trim()||null};"worktree"===t.placement&&t.worktree.trim()&&(e.worktree=t.worktree.trim()),"subdir"===t.placement&&t.subdir.trim()&&(e.subdir=t.subdir.trim());let r=encodeURIComponent($.current),a=await tb("/projects/".concat(r,"/agents/spawn"),e,"spawn ".concat(e.name));return await tn(p),(null==a?void 0:a.status)==="done"},[tb,tn,p]),tf=(0,s.useCallback)(async(t,e)=>{let r=encodeURIComponent(t);await tb("/projects/".concat(r,"/agents/").concat(encodeURIComponent(e),"/kill"),void 0,"kill ".concat(e)),await tn(p)},[tb,tn,p]),tk=(0,s.useCallback)(async(t,e)=>{let r=encodeURIComponent(t);try{var a;await d.current.api("/projects/".concat(r,"/agents/").concat(encodeURIComponent(e)),{method:"DELETE"}),G({text:"agent '".concat(e,"' row deleted"),error:!1,busy:!1}),(null===(a=tt.current)||void 0===a?void 0:a.name)===e&&v(null),await tn(p)}catch(t){if(t instanceof o)return;G({text:t.message,error:!0,busy:!1})}},[tn,p]),tv=(0,s.useCallback)(async(t,e)=>{let r=tt.current;if(!r)return!1;let a="/projects/".concat(encodeURIComponent(r.projectId),"/agents/").concat(encodeURIComponent(r.name));try{return await d.current.api("".concat(a,"/answer"),{method:"POST",body:{answer:t}}),e?await tb("".concat(a,"/resume"),{answer:t},"resume"):G({text:"Answer saved (agent still paused).",error:!1,busy:!1}),await tn(p),await ts(r.projectId,r.name),!0}catch(t){if(t instanceof o)return!1;return G({text:t.message,error:!0,busy:!1}),!1}},[tb,tn,ts,p]),tC=(0,s.useCallback)(async t=>{try{var e,r;let a="server"===t.mode?{git_server:t.git_server,repo:t.repo.trim(),id:t.id.trim()||null,credential_ref:t.credential_ref.trim()||null,init_mise:t.init_mise}:{id:t.id.trim(),root_dir:t.root_dir.trim(),git_remote:t.git_remote.trim()||null,credential_ref:t.credential_ref.trim()||null,init_mise:t.init_mise},n=await d.current.api("/projects",{method:"POST",body:a});if(await ta(),null!=n.sync_command_id){G({text:"repository '".concat(n.id,"': cloning…"),error:!1,busy:!0});let t=await d.current.trackCommand(n.sync_command_id);t?"done"===t.status?G({text:"repository '".concat(n.id,"' registered and cloned"),error:!1,busy:!1}):G({text:"repository '".concat(n.id,"' registered but the clone failed — ").concat(null!==(e=t.error)&&void 0!==e?e:""),error:!0,busy:!1}):G({text:"repository '".concat(n.id,"' registered; clone still running (see Activity). Is the worker up?"),error:!1,busy:!1})}else G({text:"repository '".concat(n.id,"' registered"),error:!1,busy:!1});if(null!=n.mise_init_command_id){G({text:"repository '".concat(n.id,"': launching a mise-init agent to create .mise.toml…"),error:!1,busy:!0});let t=await d.current.trackCommand(n.mise_init_command_id);t?"done"===t.status?G({text:"repository '".concat(n.id,"' registered; a mise-init agent is now writing, committing, and pushing .mise.toml (watch it in Runs)."),error:!1,busy:!1}):G({text:"repository '".concat(n.id,"' registered but the mise-init agent failed to launch — ").concat(null!==(r=t.error)&&void 0!==r?r:""),error:!0,busy:!1}):G({text:"repository '".concat(n.id,"' registered; mise-init still starting (see Activity). Is the worker up?"),error:!1,busy:!1})}return!0}catch(t){if(t instanceof o)return!1;return G({text:t.message,error:!0,busy:!1}),!1}},[ta]),t_=(0,s.useCallback)(async t=>{await tb("/projects/".concat(encodeURIComponent(t),"/sync"),void 0,"pull ".concat(t))},[tb]),tx=(0,s.useCallback)(async(t,e)=>{try{return await d.current.api("/projects/".concat(encodeURIComponent(t)),{method:"PATCH",body:{root_dir:e.root_dir.trim(),git_remote:e.git_remote.trim()||null,credential_ref:e.credential_ref.trim()||null}}),G({text:"repository '".concat(t,"' updated"),error:!1,busy:!1}),await ta(),!0}catch(t){if(t instanceof o)return!1;return G({text:t.message,error:!0,busy:!1}),!1}},[ta]),tS=(0,s.useCallback)(async t=>{try{await d.current.api("/projects/".concat(encodeURIComponent(t)),{method:"DELETE"}),G({text:"repository '".concat(t,"' removed"),error:!1,busy:!1}),f(e=>e===t?"":e),await ta()}catch(t){if(t instanceof o)return;G({text:t.message,error:!0,busy:!1})}},[ta]),tI=(0,s.useCallback)(async t=>{let e=encodeURIComponent($.current);await tb("/projects/".concat(e,"/approvals"),{branch:t.branch.trim(),status:t.status,agent_name:t.agent_name.trim()||null,sha:t.sha.trim()||null,note:t.note.trim()||null},"".concat(t.status," ").concat(t.branch)),await tc($.current)},[tb,tc]),tR=(0,s.useCallback)(async t=>{try{return await d.current.api("/hosts",{method:"POST",body:{hostname:t.hostname.trim(),forge_type:t.forge_type,token_env_var:t.token_env_var.trim()||null,base_url:t.base_url.trim()||null,token:t.token.trim()||null,generate_ssh_key:t.generate_ssh_key}}),G({text:"git server '".concat(t.hostname,"' added"),error:!1,busy:!1}),await to(),!0}catch(t){if(t instanceof o)return!1;return G({text:t.message,error:!0,busy:!1}),!1}},[to]),tj=(0,s.useCallback)(async(t,e)=>{try{let r={forge_type:e.forge_type,token_env_var:e.token_env_var.trim()||null,base_url:e.base_url.trim()||null};return e.token.trim()&&(r.token=e.token.trim()),e.generate_ssh_key&&(r.regenerate_ssh_key=!0),await d.current.api("/hosts/".concat(encodeURIComponent(t)),{method:"PATCH",body:r}),G({text:"git server '".concat(t,"' updated"),error:!1,busy:!1}),await to(),!0}catch(t){if(t instanceof o)return!1;return G({text:t.message,error:!0,busy:!1}),!1}},[to]),tE=(0,s.useCallback)(async(t,e)=>{try{return await d.current.api("/projects/".concat(encodeURIComponent(t),"/schedules"),{method:"POST",body:{name_prefix:e.name_prefix.trim(),task:e.task.trim(),interval_seconds:e.interval_seconds,role:e.role||null}}),G({text:"schedule '".concat(e.name_prefix,"' created — first run on the worker's next pass"),error:!1,busy:!1}),await tu(),!0}catch(t){if(t instanceof o)return!1;return G({text:t.message,error:!0,busy:!1}),!1}},[tu]),tU=(0,s.useCallback)(async(t,e)=>{try{return await d.current.api("/schedules/".concat(t),{method:"PATCH",body:e}),await tu(),!0}catch(t){if(t instanceof o)return!1;return G({text:t.message,error:!0,busy:!1}),!1}},[tu]),tT=(0,s.useCallback)(async t=>{try{await d.current.api("/schedules/".concat(t),{method:"DELETE"}),G({text:"schedule ".concat(t," removed"),error:!1,busy:!1}),await tu()}catch(t){if(t instanceof o)return;G({text:t.message,error:!0,busy:!1})}},[tu]),tP=(0,s.useCallback)(async t=>{try{await d.current.api("/hosts/".concat(encodeURIComponent(t)),{method:"DELETE"}),G({text:"git server '".concat(t,"' removed"),error:!1,busy:!1}),await to()}catch(t){if(t instanceof o)return;G({text:t.message,error:!0,busy:!1})}},[to]),tA=(0,s.useCallback)(async()=>{await tb("/poll-ci",void 0,"poll-ci (all projects)"),await ti()},[tb,ti]),tO=(0,s.useCallback)(async()=>{Y({status:"starting",url:"",message:"Opening `claude /login` in the control container and selecting the subscription account…"});try{let t=await d.current.api("/login/start",{method:"POST"}),e=await d.current.trackCommand(t.id,{attempts:180});if(!e){Y({status:"error",url:"",message:"Still starting (see Activity). Is the control worker running?"});return}if("done"!==e.status){Y({status:"error",url:"",message:e.error||"Failed to start login."});return}let r=e.result&&"string"==typeof e.result.url?e.result.url:"";if(!r){Y({status:"error",url:"",message:"No login URL was returned by claude."});return}Y({status:"awaiting",url:r,message:"Authorize in the window below (or open it in a new tab), then paste the code claude gives you."})}catch(t){if(t instanceof o)return;Y({status:"error",url:"",message:t.message})}},[]),tN=(0,s.useCallback)(async t=>{let e=t.trim();if(!e)return!1;Y(t=>({...t,status:"submitting",message:"Submitting the authorization code…"}));try{let t=await d.current.api("/login/submit",{method:"POST",body:{code:e}}),r=await d.current.trackCommand(t.id,{attempts:60});if(!r)return Y(t=>({...t,status:"awaiting",message:"Submit still running (see Activity). Is the control worker running?"})),!1;if("done"===r.status)return Y({status:"done",url:"",message:"Claude Code is now logged in on the host — new agents will use this account."}),!0;return Y(t=>({...t,status:"awaiting",message:r.error||"Login was not confirmed. Re-check the code, or restart the flow."})),!1}catch(t){if(t instanceof o)return!1;return Y(e=>({...e,status:"awaiting",message:t.message})),!1}},[]),tL=(0,s.useCallback)(()=>{Y({status:"idle",url:"",message:""})},[]),tD=(0,s.useCallback)(async(t,e)=>{try{return await d.current.api("/shared/context/".concat(encodeURIComponent(t)),{method:"PUT",body:{value:e}}),G({text:"shared context '".concat(t,"' set"),error:!1,busy:!1}),await tl(),!0}catch(t){if(t instanceof o)return!1;return G({text:t.message,error:!0,busy:!1}),!1}},[tl]);return(0,n.jsx)(i.Provider,{value:{section:m,setSection:tm,projects:p,agents:g,selectedProjectId:w,selectProject:ty,selectedRun:k,selectRun:tp,checkmark:C,checkmarkMissing:x,log:I,logOffset:j,pageLog:th,events:U,approvals:O,hosts:L,commands:z,schedules:B,shared:M,cmd:F,lastError:Q,loading:K,refresh:tg,spawnAgent:tw,killAgent:tf,deleteAgent:tk,submitAnswer:tv,createProject:tC,updateProject:tx,deleteProject:tS,syncProject:t_,submitApproval:tI,createHost:tR,updateHost:tj,deleteHost:tP,createSchedule:tE,updateSchedule:tU,deleteSchedule:tT,pollCi:tA,setSharedKey:tD,claudeLogin:W,startClaudeLogin:tO,submitClaudeCode:tN,resetClaudeLogin:tL},children:u})}}}]);
\ No newline at end of file
diff --git a/src/handler/api/static/_next/static/chunks/258-01db7d62283ec2f5.js b/src/handler/api/static/_next/static/chunks/258-01db7d62283ec2f5.js
deleted file mode 100644
index 1f096bc..0000000
--- a/src/handler/api/static/_next/static/chunks/258-01db7d62283ec2f5.js
+++ /dev/null
@@ -1 +0,0 @@
-(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[258],{7648:function(e,t,r){"use strict";r.d(t,{default:function(){return o.a}});var n=r(2972),o=r.n(n)},9376:function(e,t,r){"use strict";var n=r(5475);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}})},257:function(e,t,r){"use strict";var n,o;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(o=r.g.process)?void 0:o.env)?r.g.process:r(4227)},5449:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}}),r(8521);let n=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;ni?e.prefetch(t,o):e.prefetch(t,r,n))().catch(e=>{})}}function v(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let P=i.default.forwardRef(function(e,t){let r,n;let{href:l,as:y,children:P,prefetch:_=null,passHref:R,replace:O,shallow:j,scroll:E,locale:w,onClick:x,onMouseEnter:S,onTouchStart:M,legacyBehavior:N=!1,...T}=e;r=P,N&&("string"==typeof r||"number"==typeof r)&&(r=(0,o.jsx)("a",{children:r}));let C=i.default.useContext(f.RouterContext),k=i.default.useContext(d.AppRouterContext),I=null!=C?C:k,L=!C,A=!1!==_,U=null===_?g.PrefetchKind.AUTO:g.PrefetchKind.FULL,{href:W,as:D}=i.default.useMemo(()=>{if(!C){let e=v(l);return{href:e,as:y?v(y):e}}let[e,t]=(0,u.resolveHref)(C,l,!0);return{href:e,as:y?(0,u.resolveHref)(C,y):t||e}},[C,l,y]),z=i.default.useRef(W),K=i.default.useRef(D);N&&(n=i.default.Children.only(r));let q=N?n&&"object"==typeof n&&n.ref:t,[F,$,B]=(0,p.useIntersection)({rootMargin:"200px"}),Y=i.default.useCallback(e=>{(K.current!==D||z.current!==W)&&(B(),K.current=D,z.current=W),F(e),q&&("function"==typeof q?q(e):"object"==typeof q&&(q.current=e))},[D,q,W,B,F]);i.default.useEffect(()=>{I&&$&&A&&b(I,W,D,{locale:w},{kind:U},L)},[D,W,$,w,A,null==C?void 0:C.locale,I,L,U]);let Q={ref:Y,onClick(e){N||"function"!=typeof x||x(e),N&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),I&&!e.defaultPrevented&&function(e,t,r,n,o,u,l,s,c){let{nodeName:f}=e.currentTarget;if("A"===f.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,a.isLocalURL)(r)))return;e.preventDefault();let d=()=>{let e=null==l||l;"beforePopState"in t?t[o?"replace":"push"](r,n,{shallow:u,locale:s,scroll:e}):t[o?"replace":"push"](n||r,{scroll:e})};c?i.default.startTransition(d):d()}(e,I,W,D,O,j,E,w,L)},onMouseEnter(e){N||"function"!=typeof S||S(e),N&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),I&&(A||!L)&&b(I,W,D,{locale:w,priority:!0,bypassPrefetchedCheck:!0},{kind:U},L)},onTouchStart:function(e){N||"function"!=typeof M||M(e),N&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),I&&(A||!L)&&b(I,W,D,{locale:w,priority:!0,bypassPrefetchedCheck:!0},{kind:U},L)}};if((0,s.isAbsoluteUrl)(D))Q.href=D;else if(!N||R||"a"===n.type&&!("href"in n.props)){let e=void 0!==w?w:null==C?void 0:C.locale,t=(null==C?void 0:C.isLocaleDomain)&&(0,h.getDomainLocale)(D,e,null==C?void 0:C.locales,null==C?void 0:C.domainLocales);Q.href=t||(0,m.addBasePath)((0,c.addLocale)(D,e,null==C?void 0:C.defaultLocale))}return N?i.default.cloneElement(n,Q):(0,o.jsx)("a",{...T,...Q,children:r})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3515:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{cancelIdleCallback:function(){return n},requestIdleCallback:function(){return r}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5246:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});let n=r(8637),o=r(7497),i=r(7053),u=r(3987),a=r(8521),l=r(3552),s=r(6279),c=r(7205);function f(e,t,r){let f;let d="string"==typeof t?t:(0,o.formatWithValidation)(t),p=d.match(/^[a-zA-Z]{1,}:\/\//),h=p?d.slice(p[0].length):d;if((h.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+d+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,u.normalizeRepeatedSlashes)(h);d=(p?p[0]:"")+t}if(!(0,l.isLocalURL)(d))return r?[d]:d;try{f=new URL(d.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){f=new URL("/","http://n")}try{let e=new URL(d,f);e.pathname=(0,a.normalizePathTrailingSlash)(e.pathname);let t="";if((0,s.isDynamicRoute)(e.pathname)&&e.searchParams&&r){let r=(0,n.searchParamsToUrlQuery)(e.searchParams),{result:u,params:a}=(0,c.interpolateAs)(e.pathname,e.pathname,r);u&&(t=(0,o.formatWithValidation)({pathname:u,hash:e.hash,query:(0,i.omit)(r,a)}))}let u=e.origin===f.origin?e.href.slice(e.origin.length):e.href;return r?[u,t||u]:u}catch(e){return r?[d]:d}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6081:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let n=r(2265),o=r(3515),i="function"==typeof IntersectionObserver,u=new Map,a=[];function l(e){let{rootRef:t,rootMargin:r,disabled:l}=e,s=l||!i,[c,f]=(0,n.useState)(!1),d=(0,n.useRef)(null),p=(0,n.useCallback)(e=>{d.current=e},[]);return(0,n.useEffect)(()=>{if(i){if(s||c)return;let e=d.current;if(e&&e.tagName)return function(e,t,r){let{id:n,observer:o,elements:i}=function(e){let t;let r={root:e.root||null,margin:e.rootMargin||""},n=a.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=u.get(n)))return t;let o=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:o},a.push(r),u.set(r,t),t}(r);return i.set(e,t),o.observe(e),function(){if(i.delete(e),o.unobserve(e),0===i.size){o.disconnect(),u.delete(n);let e=a.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&a.splice(e,1)}}}(e,e=>e&&f(e),{root:null==t?void 0:t.current,rootMargin:r})}else if(!c){let e=(0,o.requestIdleCallback)(()=>f(!0));return()=>(0,o.cancelIdleCallback)(e)}},[s,r,t,c,d.current]),[p,c,(0,n.useCallback)(()=>{f(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4227:function(e){!function(){var t={229:function(e){var t,r,n,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function u(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var l=[],s=!1,c=-1;function f(){s&&n&&(s=!1,n.length?l=n.concat(l):c=-1,l.length&&d())}function d(){if(!s){var e=a(f);s=!0;for(var t=l.length;t;){for(n=l,l=[];++c1)for(var r=1;r{let t=l[e]||"",{repeat:r,optional:n}=a[e],o="["+(r?"...":"")+e+"]";return n&&(o=(t?"":"/")+"["+o+"]"),r&&!Array.isArray(t)&&(t=[t]),(n||e in l)&&(i=i.replace(o,r?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(i=""),{params:s,result:i}}},8104:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return i}});let n=r(1182),o=/\/\[[^/]+?\](?=\/|$)/;function i(e){return(0,n.isInterceptionRouteAppPath)(e)&&(e=(0,n.extractInterceptionRouteInformation)(e).interceptedRoute),o.test(e)}},3552:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=r(3987),o=r(1283);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},7053:function(e,t){"use strict";function r(e,t){let r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return r}})},8637:function(e,t){"use strict";function r(e){let t={};return e.forEach((e,r)=>{void 0===t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]}),t}function n(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[r,o]=e;Array.isArray(o)?o.forEach(e=>t.append(r,n(e))):t.set(r,n(o))}),t}function i(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,r)=>e.append(r,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{assign:function(){return i},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}})},4199:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o}});let n=r(3987);function o(e){let{re:t,groups:r}=e;return e=>{let o=t.exec(e);if(!o)return!1;let i=e=>{try{return decodeURIComponent(e)}catch(e){throw new n.DecodeError("failed to decode param")}},u={};return Object.keys(r).forEach(e=>{let t=r[e],n=o[t.pos];void 0!==n&&(u[e]=~n.indexOf("/")?n.split("/").map(e=>i(e)):t.repeat?[i(n)]:i(n))}),u}}},9964:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getNamedMiddlewareRegex:function(){return d},getNamedRouteRegex:function(){return f},getRouteRegex:function(){return l},parseParameter:function(){return u}});let n=r(1182),o=r(42),i=r(6674);function u(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function a(e){let t=(0,i.removeTrailingSlash)(e).slice(1).split("/"),r={},a=1;return{parameterizedRoute:t.map(e=>{let t=n.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&i){let{key:e,optional:n,repeat:l}=u(i[1]);return r[e]={pos:a++,repeat:l,optional:n},"/"+(0,o.escapeStringRegexp)(t)+"([^/]+?)"}if(!i)return"/"+(0,o.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:n}=u(i[1]);return r[e]={pos:a++,repeat:t,optional:n},t?n?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}function l(e){let{parameterizedRoute:t,groups:r}=a(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}function s(e){let{interceptionMarker:t,getSafeRouteKey:r,segment:n,routeKeys:i,keyPrefix:a}=e,{key:l,optional:s,repeat:c}=u(n),f=l.replace(/\W/g,"");a&&(f=""+a+f);let d=!1;(0===f.length||f.length>30)&&(d=!0),isNaN(parseInt(f.slice(0,1)))||(d=!0),d&&(f=r()),a?i[f]=""+a+l:i[f]=l;let p=t?(0,o.escapeStringRegexp)(t):"";return c?s?"(?:/"+p+"(?<"+f+">.+?))?":"/"+p+"(?<"+f+">.+?)":"/"+p+"(?<"+f+">[^/]+?)"}function c(e,t){let r;let u=(0,i.removeTrailingSlash)(e).slice(1).split("/"),a=(r=0,()=>{let e="",t=++r;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),l={};return{namedParameterizedRoute:u.map(e=>{let r=n.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(r&&i){let[r]=e.split(i[0]);return s({getSafeRouteKey:a,interceptionMarker:r,segment:i[1],routeKeys:l,keyPrefix:t?"nxtI":void 0})}return i?s({getSafeRouteKey:a,segment:i[1],routeKeys:l,keyPrefix:t?"nxtP":void 0}):"/"+(0,o.escapeStringRegexp)(e)}).join(""),routeKeys:l}}function f(e,t){let r=c(e,t);return{...l(e),namedRegex:"^"+r.namedParameterizedRoute+"(?:/)?$",routeKeys:r.routeKeys}}function d(e,t){let{parameterizedRoute:r}=a(e),{catchAll:n=!0}=t;if("/"===r)return{namedRegex:"^/"+(n?".*":"")+"$"};let{namedParameterizedRoute:o}=c(e,!1);return{namedRegex:"^"+o+(n?"(?:(/.*)?)":"")+"$"}}},4777:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let r=o.slice(1,-1),u=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),u=!0),r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function i(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(u){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');i(this.optionalRestSlugName,r),this.optionalRestSlugName=r,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');i(this.restSlugName,r),this.restSlugName=r,o="[...]"}}else{if(u)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');i(this.slugName,r),this.slugName=r,o="[]"}}this.children.has(o)||this.children.set(o,new r),this.children.get(o)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}},3987:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return b},MissingStaticPage:function(){return y},NormalizeError:function(){return m},PageNotFoundError:function(){return g},SP:function(){return d},ST:function(){return p},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return l},getLocationOrigin:function(){return u},getURL:function(){return a},isAbsoluteUrl:function(){return i},isResSent:function(){return s},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return v}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),i=0;io.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function a(){let{href:e}=window.location,t=u();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function s(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&s(r))return n;if(!n)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.');return n}let d="undefined"!=typeof performance,p=d&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class m extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class y extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class b extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(e){return JSON.stringify({message:e.message,stack:e.stack})}}}]);
\ No newline at end of file
diff --git a/src/handler/api/static/_next/static/chunks/258-022159d3c3089cd0.js b/src/handler/api/static/_next/static/chunks/258-022159d3c3089cd0.js
new file mode 100644
index 0000000..e0a75b5
--- /dev/null
+++ b/src/handler/api/static/_next/static/chunks/258-022159d3c3089cd0.js
@@ -0,0 +1 @@
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[258],{7648:function(e,t,r){"use strict";r.d(t,{default:function(){return o.a}});var n=r(2972),o=r.n(n)},9376:function(e,t,r){"use strict";var n=r(5475);r.o(n,"usePathname")&&r.d(t,{usePathname:function(){return n.usePathname}}),r.o(n,"useRouter")&&r.d(t,{useRouter:function(){return n.useRouter}})},257:function(e,t,r){"use strict";var n,o;e.exports=(null==(n=r.g.process)?void 0:n.env)&&"object"==typeof(null==(o=r.g.process)?void 0:o.env)?r.g.process:r(4227)},5449:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}}),r(8521);let n=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;ni?e.prefetch(t,o):e.prefetch(t,r,n))().catch(e=>{})}}function v(e){return"string"==typeof e?e:(0,l.formatUrl)(e)}let P=i.default.forwardRef(function(e,t){let r,n;let{href:l,as:y,children:P,prefetch:_=null,passHref:R,replace:O,shallow:j,scroll:E,locale:w,onClick:x,onMouseEnter:S,onTouchStart:M,legacyBehavior:N=!1,...T}=e;r=P,N&&("string"==typeof r||"number"==typeof r)&&(r=(0,o.jsx)("a",{children:r}));let C=i.default.useContext(f.RouterContext),k=i.default.useContext(d.AppRouterContext),I=null!=C?C:k,L=!C,A=!1!==_,U=null===_?g.PrefetchKind.AUTO:g.PrefetchKind.FULL,{href:W,as:D}=i.default.useMemo(()=>{if(!C){let e=v(l);return{href:e,as:y?v(y):e}}let[e,t]=(0,u.resolveHref)(C,l,!0);return{href:e,as:y?(0,u.resolveHref)(C,y):t||e}},[C,l,y]),z=i.default.useRef(W),K=i.default.useRef(D);N&&(n=i.default.Children.only(r));let q=N?n&&"object"==typeof n&&n.ref:t,[F,$,B]=(0,p.useIntersection)({rootMargin:"200px"}),Y=i.default.useCallback(e=>{(K.current!==D||z.current!==W)&&(B(),K.current=D,z.current=W),F(e),q&&("function"==typeof q?q(e):"object"==typeof q&&(q.current=e))},[D,q,W,B,F]);i.default.useEffect(()=>{I&&$&&A&&b(I,W,D,{locale:w},{kind:U},L)},[D,W,$,w,A,null==C?void 0:C.locale,I,L,U]);let Q={ref:Y,onClick(e){N||"function"!=typeof x||x(e),N&&n.props&&"function"==typeof n.props.onClick&&n.props.onClick(e),I&&!e.defaultPrevented&&function(e,t,r,n,o,u,l,s,c){let{nodeName:f}=e.currentTarget;if("A"===f.toUpperCase()&&(function(e){let t=e.currentTarget.getAttribute("target");return t&&"_self"!==t||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey||e.nativeEvent&&2===e.nativeEvent.which}(e)||!c&&!(0,a.isLocalURL)(r)))return;e.preventDefault();let d=()=>{let e=null==l||l;"beforePopState"in t?t[o?"replace":"push"](r,n,{shallow:u,locale:s,scroll:e}):t[o?"replace":"push"](n||r,{scroll:e})};c?i.default.startTransition(d):d()}(e,I,W,D,O,j,E,w,L)},onMouseEnter(e){N||"function"!=typeof S||S(e),N&&n.props&&"function"==typeof n.props.onMouseEnter&&n.props.onMouseEnter(e),I&&(A||!L)&&b(I,W,D,{locale:w,priority:!0,bypassPrefetchedCheck:!0},{kind:U},L)},onTouchStart:function(e){N||"function"!=typeof M||M(e),N&&n.props&&"function"==typeof n.props.onTouchStart&&n.props.onTouchStart(e),I&&(A||!L)&&b(I,W,D,{locale:w,priority:!0,bypassPrefetchedCheck:!0},{kind:U},L)}};if((0,s.isAbsoluteUrl)(D))Q.href=D;else if(!N||R||"a"===n.type&&!("href"in n.props)){let e=void 0!==w?w:null==C?void 0:C.locale,t=(null==C?void 0:C.isLocaleDomain)&&(0,h.getDomainLocale)(D,e,null==C?void 0:C.locales,null==C?void 0:C.domainLocales);Q.href=t||(0,m.addBasePath)((0,c.addLocale)(D,e,null==C?void 0:C.defaultLocale))}return N?i.default.cloneElement(n,Q):(0,o.jsx)("a",{...T,...Q,children:r})});("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3515:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{cancelIdleCallback:function(){return n},requestIdleCallback:function(){return r}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5246:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});let n=r(8637),o=r(7497),i=r(7053),u=r(3987),a=r(8521),l=r(3552),s=r(6279),c=r(7205);function f(e,t,r){let f;let d="string"==typeof t?t:(0,o.formatWithValidation)(t),p=d.match(/^[a-zA-Z]{1,}:\/\//),h=p?d.slice(p[0].length):d;if((h.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+d+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,u.normalizeRepeatedSlashes)(h);d=(p?p[0]:"")+t}if(!(0,l.isLocalURL)(d))return r?[d]:d;try{f=new URL(d.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){f=new URL("/","http://n")}try{let e=new URL(d,f);e.pathname=(0,a.normalizePathTrailingSlash)(e.pathname);let t="";if((0,s.isDynamicRoute)(e.pathname)&&e.searchParams&&r){let r=(0,n.searchParamsToUrlQuery)(e.searchParams),{result:u,params:a}=(0,c.interpolateAs)(e.pathname,e.pathname,r);u&&(t=(0,o.formatWithValidation)({pathname:u,hash:e.hash,query:(0,i.omit)(r,a)}))}let u=e.origin===f.origin?e.href.slice(e.origin.length):e.href;return r?[u,t||u]:u}catch(e){return r?[d]:d}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6081:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useIntersection",{enumerable:!0,get:function(){return l}});let n=r(2265),o=r(3515),i="function"==typeof IntersectionObserver,u=new Map,a=[];function l(e){let{rootRef:t,rootMargin:r,disabled:l}=e,s=l||!i,[c,f]=(0,n.useState)(!1),d=(0,n.useRef)(null),p=(0,n.useCallback)(e=>{d.current=e},[]);return(0,n.useEffect)(()=>{if(i){if(s||c)return;let e=d.current;if(e&&e.tagName)return function(e,t,r){let{id:n,observer:o,elements:i}=function(e){let t;let r={root:e.root||null,margin:e.rootMargin||""},n=a.find(e=>e.root===r.root&&e.margin===r.margin);if(n&&(t=u.get(n)))return t;let o=new Map;return t={id:r,observer:new IntersectionObserver(e=>{e.forEach(e=>{let t=o.get(e.target),r=e.isIntersecting||e.intersectionRatio>0;t&&r&&t(r)})},e),elements:o},a.push(r),u.set(r,t),t}(r);return i.set(e,t),o.observe(e),function(){if(i.delete(e),o.unobserve(e),0===i.size){o.disconnect(),u.delete(n);let e=a.findIndex(e=>e.root===n.root&&e.margin===n.margin);e>-1&&a.splice(e,1)}}}(e,e=>e&&f(e),{root:null==t?void 0:t.current,rootMargin:r})}else if(!c){let e=(0,o.requestIdleCallback)(()=>f(!0));return()=>(0,o.cancelIdleCallback)(e)}},[s,r,t,c,d.current]),[p,c,(0,n.useCallback)(()=>{f(!1)},[])]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4227:function(e){!function(){var t={229:function(e){var t,r,n,o=e.exports={};function i(){throw Error("setTimeout has not been defined")}function u(){throw Error("clearTimeout has not been defined")}function a(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var l=[],s=!1,c=-1;function f(){s&&n&&(s=!1,n.length?l=n.concat(l):c=-1,l.length&&d())}function d(){if(!s){var e=a(f);s=!0;for(var t=l.length;t;){for(n=l,l=[];++c1)for(var r=1;r{let t=l[e]||"",{repeat:r,optional:n}=a[e],o="["+(r?"...":"")+e+"]";return n&&(o=(t?"":"/")+"["+o+"]"),r&&!Array.isArray(t)&&(t=[t]),(n||e in l)&&(i=i.replace(o,r?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(i=""),{params:s,result:i}}},8104:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return i}});let n=r(1182),o=/\/\[[^/]+?\](?=\/|$)/;function i(e){return(0,n.isInterceptionRouteAppPath)(e)&&(e=(0,n.extractInterceptionRouteInformation)(e).interceptedRoute),o.test(e)}},3552:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return i}});let n=r(3987),o=r(1283);function i(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},7053:function(e,t){"use strict";function r(e,t){let r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return r}})},8637:function(e,t){"use strict";function r(e){let t={};return e.forEach((e,r)=>{void 0===t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]}),t}function n(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[r,o]=e;Array.isArray(o)?o.forEach(e=>t.append(r,n(e))):t.set(r,n(o))}),t}function i(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,r)=>e.append(r,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{assign:function(){return i},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}})},4199:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o}});let n=r(3987);function o(e){let{re:t,groups:r}=e;return e=>{let o=t.exec(e);if(!o)return!1;let i=e=>{try{return decodeURIComponent(e)}catch(e){throw new n.DecodeError("failed to decode param")}},u={};return Object.keys(r).forEach(e=>{let t=r[e],n=o[t.pos];void 0!==n&&(u[e]=~n.indexOf("/")?n.split("/").map(e=>i(e)):t.repeat?[i(n)]:i(n))}),u}}},9964:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getNamedMiddlewareRegex:function(){return d},getNamedRouteRegex:function(){return f},getRouteRegex:function(){return l},parseParameter:function(){return u}});let n=r(1182),o=r(42),i=r(6674);function u(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function a(e){let t=(0,i.removeTrailingSlash)(e).slice(1).split("/"),r={},a=1;return{parameterizedRoute:t.map(e=>{let t=n.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&i){let{key:e,optional:n,repeat:l}=u(i[1]);return r[e]={pos:a++,repeat:l,optional:n},"/"+(0,o.escapeStringRegexp)(t)+"([^/]+?)"}if(!i)return"/"+(0,o.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:n}=u(i[1]);return r[e]={pos:a++,repeat:t,optional:n},t?n?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}function l(e){let{parameterizedRoute:t,groups:r}=a(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}function s(e){let{interceptionMarker:t,getSafeRouteKey:r,segment:n,routeKeys:i,keyPrefix:a}=e,{key:l,optional:s,repeat:c}=u(n),f=l.replace(/\W/g,"");a&&(f=""+a+f);let d=!1;(0===f.length||f.length>30)&&(d=!0),isNaN(parseInt(f.slice(0,1)))||(d=!0),d&&(f=r()),a?i[f]=""+a+l:i[f]=l;let p=t?(0,o.escapeStringRegexp)(t):"";return c?s?"(?:/"+p+"(?<"+f+">.+?))?":"/"+p+"(?<"+f+">.+?)":"/"+p+"(?<"+f+">[^/]+?)"}function c(e,t){let r;let u=(0,i.removeTrailingSlash)(e).slice(1).split("/"),a=(r=0,()=>{let e="",t=++r;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),l={};return{namedParameterizedRoute:u.map(e=>{let r=n.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),i=e.match(/\[((?:\[.*\])|.+)\]/);if(r&&i){let[r]=e.split(i[0]);return s({getSafeRouteKey:a,interceptionMarker:r,segment:i[1],routeKeys:l,keyPrefix:t?"nxtI":void 0})}return i?s({getSafeRouteKey:a,segment:i[1],routeKeys:l,keyPrefix:t?"nxtP":void 0}):"/"+(0,o.escapeStringRegexp)(e)}).join(""),routeKeys:l}}function f(e,t){let r=c(e,t);return{...l(e),namedRegex:"^"+r.namedParameterizedRoute+"(?:/)?$",routeKeys:r.routeKeys}}function d(e,t){let{parameterizedRoute:r}=a(e),{catchAll:n=!0}=t;if("/"===r)return{namedRegex:"^/"+(n?".*":"")+"$"};let{namedParameterizedRoute:o}=c(e,!1);return{namedRegex:"^"+o+(n?"(?:(/.*)?)":"")+"$"}}},4777:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let r=o.slice(1,-1),u=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),u=!0),r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function i(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(u){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');i(this.optionalRestSlugName,r),this.optionalRestSlugName=r,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');i(this.restSlugName,r),this.restSlugName=r,o="[...]"}}else{if(u)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');i(this.slugName,r),this.slugName=r,o="[]"}}this.children.has(o)||this.children.set(o,new r),this.children.get(o)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}},3987:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return b},MissingStaticPage:function(){return y},NormalizeError:function(){return m},PageNotFoundError:function(){return g},SP:function(){return d},ST:function(){return p},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return l},getLocationOrigin:function(){return u},getURL:function(){return a},isAbsoluteUrl:function(){return i},isResSent:function(){return s},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return v}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),i=0;io.test(e);function u(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function a(){let{href:e}=window.location,t=u();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function s(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&s(r))return n;if(!n)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.');return n}let d="undefined"!=typeof performance,p=d&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class m extends Error{}class g extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class y extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class b extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function v(e){return JSON.stringify({message:e.message,stack:e.stack})}}}]);
\ No newline at end of file
diff --git a/src/handler/api/static/_next/static/chunks/app/activity/page-7be158338498be57.js b/src/handler/api/static/_next/static/chunks/app/activity/page-7be158338498be57.js
deleted file mode 100644
index 7ee8221..0000000
--- a/src/handler/api/static/_next/static/chunks/app/activity/page-7be158338498be57.js
+++ /dev/null
@@ -1 +0,0 @@
-(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[263],{535:function(e,t,n){Promise.resolve().then(n.bind(n,7839))},7839:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return o}});var r=n(7437),c=n(171),s=n(8280),a=n(6039);function i(){let e=(0,c.Q)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"section-head",children:(0,r.jsxs)("div",{className:"hstack",style:{justifyContent:"space-between"},children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"section-title",children:"Activity"}),(0,r.jsx)("div",{className:"section-desc",children:"Control commands the worker drains from the queue."})]}),(0,r.jsx)(s.zx,{variant:"secondary",disabled:e.cmd.busy,onClick:()=>e.pollCi(),children:"Sweep CI now"})]})}),(0,r.jsx)("div",{className:"section-body",children:0===e.commands.length?(0,r.jsx)("div",{className:"empty",children:"No commands yet."}):(0,r.jsx)("div",{className:"table-wrap",children:(0,r.jsxs)("table",{className:"tbl",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"When"}),(0,r.jsx)("th",{children:"Type"}),(0,r.jsx)("th",{children:"Repository"}),(0,r.jsx)("th",{children:"Agent"}),(0,r.jsx)("th",{children:"Status"}),(0,r.jsx)("th",{children:"Result / Error"})]})}),(0,r.jsx)("tbody",{children:e.commands.map(e=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"faint nowrap",children:(0,a.Eh)(e.created_at)}),(0,r.jsx)("td",{className:"mono",children:e.type}),(0,r.jsx)("td",{className:"mono",children:e.project_id||"—"}),(0,r.jsx)("td",{className:"mono",children:e.agent_name||"—"}),(0,r.jsx)("td",{children:(0,r.jsx)(s.OE,{status:e.status})}),(0,r.jsx)("td",{className:"mono faint",style:{fontSize:"var(--text-xs)"},children:e.error||(e.result?JSON.stringify(e.result):"—")})]},e.id))})]})})})]})}function o(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(i,{})})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return s},II:function(){return u},OE:function(){return a},Ph:function(){return f},UW:function(){return p},ZD:function(){return x},Zb:function(){return i},gx:function(){return d},kN:function(){return m},mQ:function(){return h},zx:function(){return o}});var r=n(7437),c=n(6039);function s(e){let{tone:t="neutral",pill:n=!1,dot:c=!1,children:s}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[c&&(0,r.jsx)("span",{className:"dot"}),s]})}function a(e){let{status:t}=e;return(0,r.jsx)(s,{tone:(0,c.FH)(t),children:(0,c.Cf)(t)})}function i(e){let{children:t,interactive:n=!1,onClick:c,className:s=""}=e;return(0,r.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(s).trim(),onClick:c,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function o(e){let{variant:t="secondary",size:n="md",onClick:c,disabled:s,type:a="button",children:i}=e;return(0,r.jsx)("button",{type:a,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:c,disabled:s,children:i})}function l(e){let{label:t,children:n}=e;return(0,r.jsxs)("label",{className:"field",children:[t&&(0,r.jsx)("span",{className:"field-label",children:t}),n]})}function u(e){let{label:t,value:n,onChange:c,placeholder:s,type:a="text",disabled:i}=e;return(0,r.jsx)(l,{label:t,children:(0,r.jsx)("input",{className:"input",type:a,value:n,placeholder:s,disabled:i,onChange:e=>c(e.target.value)})})}function d(e){let{label:t,value:n,onChange:c,placeholder:s,rows:a=3}=e;return(0,r.jsx)(l,{label:t,children:(0,r.jsx)("textarea",{className:"textarea",value:n,rows:a,placeholder:s,onChange:e=>c(e.target.value)})})}function f(e){let{label:t,value:n,onChange:c,options:s}=e;return(0,r.jsx)(l,{label:t,children:(0,r.jsx)("select",{className:"select",value:n,onChange:e=>c(e.target.value),children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function h(e){let{tabs:t,value:n,onChange:c}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>c(e.value),children:e.label},e.value))})}function m(e){let{value:t,label:n,sub:c,accent:s=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:t}),(0,r.jsx)("div",{className:"stat-label",children:n}),c&&(0,r.jsx)("div",{className:"stat-sub",children:c})]})}function p(e){let{tone:t="info",children:n}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(t),children:n})}function x(e){let{on:t,onClick:n}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return s},Eh:function(){return a},FH:function(){return r},Q6:function(){return i},Sy:function(){return o}});let c={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return c[n]?c[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function a(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function o(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m");let c=Math.floor(r/60);if(c<24)return"".concat(c,"h");let s=Math.floor(c/24);if(s<30)return"".concat(s,"d");let a=Math.floor(s/30);return a<12?"".concat(a,"mo"):"".concat(Math.floor(a/12),"y")}},257:function(e,t,n){"use strict";var r,c;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(c=n.g.process)?void 0:c.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,r,c=e.exports={};function s(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var o=[],l=!1,u=-1;function d(){l&&r&&(l=!1,r.length?o=r.concat(o):u=-1,o.length&&f())}function f(){if(!l){var e=i(d);l=!0;for(var t=o.length;t;){for(r=o,o=[];++u1)for(var n=1;ne.pollCi(),children:"Sweep CI now"})]})}),(0,r.jsx)("div",{className:"section-body",children:0===e.commands.length?(0,r.jsx)("div",{className:"empty",children:"No commands yet."}):(0,r.jsx)("div",{className:"table-wrap",children:(0,r.jsxs)("table",{className:"tbl",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"When"}),(0,r.jsx)("th",{children:"Type"}),(0,r.jsx)("th",{children:"Repository"}),(0,r.jsx)("th",{children:"Agent"}),(0,r.jsx)("th",{children:"Status"}),(0,r.jsx)("th",{children:"Result / Error"})]})}),(0,r.jsx)("tbody",{children:e.commands.map(e=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"faint nowrap",children:(0,a.Eh)(e.created_at)}),(0,r.jsx)("td",{className:"mono",children:e.type}),(0,r.jsx)("td",{className:"mono",children:e.project_id||"—"}),(0,r.jsx)("td",{className:"mono",children:e.agent_name||"—"}),(0,r.jsx)("td",{children:(0,r.jsx)(s.OE,{status:e.status})}),(0,r.jsx)("td",{className:"mono faint",style:{fontSize:"var(--text-xs)"},children:e.error||(e.result?JSON.stringify(e.result):"—")})]},e.id))})]})})})]})}function o(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(i,{})})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return s},II:function(){return u},OE:function(){return a},Ph:function(){return f},UW:function(){return p},ZD:function(){return x},Zb:function(){return i},gx:function(){return d},kN:function(){return m},mQ:function(){return h},zx:function(){return o}});var r=n(7437),c=n(6039);function s(e){let{tone:t="neutral",pill:n=!1,dot:c=!1,children:s}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[c&&(0,r.jsx)("span",{className:"dot"}),s]})}function a(e){let{status:t}=e;return(0,r.jsx)(s,{tone:(0,c.FH)(t),children:(0,c.Cf)(t)})}function i(e){let{children:t,interactive:n=!1,onClick:c,className:s=""}=e;return(0,r.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(s).trim(),onClick:c,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function o(e){let{variant:t="secondary",size:n="md",onClick:c,disabled:s,type:a="button",children:i}=e;return(0,r.jsx)("button",{type:a,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:c,disabled:s,children:i})}function l(e){let{label:t,children:n}=e;return(0,r.jsxs)("label",{className:"field",children:[t&&(0,r.jsx)("span",{className:"field-label",children:t}),n]})}function u(e){let{label:t,value:n,onChange:c,placeholder:s,type:a="text",disabled:i}=e;return(0,r.jsx)(l,{label:t,children:(0,r.jsx)("input",{className:"input",type:a,value:n,placeholder:s,disabled:i,onChange:e=>c(e.target.value)})})}function d(e){let{label:t,value:n,onChange:c,placeholder:s,rows:a=3}=e;return(0,r.jsx)(l,{label:t,children:(0,r.jsx)("textarea",{className:"textarea",value:n,rows:a,placeholder:s,onChange:e=>c(e.target.value)})})}function f(e){let{label:t,value:n,onChange:c,options:s}=e;return(0,r.jsx)(l,{label:t,children:(0,r.jsx)("select",{className:"select",value:n,onChange:e=>c(e.target.value),children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function h(e){let{tabs:t,value:n,onChange:c}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>c(e.value),children:e.label},e.value))})}function m(e){let{value:t,label:n,sub:c,accent:s=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:t}),(0,r.jsx)("div",{className:"stat-label",children:n}),c&&(0,r.jsx)("div",{className:"stat-sub",children:c})]})}function p(e){let{tone:t="info",children:n}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(t),children:n})}function x(e){let{on:t,onClick:n}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return s},Eh:function(){return a},FH:function(){return r},Q6:function(){return i},Sy:function(){return o}});let c={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return c[n]?c[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function a(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function o(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m");let c=Math.floor(r/60);if(c<24)return"".concat(c,"h");let s=Math.floor(c/24);if(s<30)return"".concat(s,"d");let a=Math.floor(s/30);return a<12?"".concat(a,"mo"):"".concat(Math.floor(a/12),"y")}},257:function(e,t,n){"use strict";var r,c;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(c=n.g.process)?void 0:c.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,r,c=e.exports={};function s(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var o=[],l=!1,u=-1;function d(){l&&r&&(l=!1,r.length?o=r.concat(o):u=-1,o.length&&f())}function f(){if(!l){var e=i(d);l=!0;for(var t=o.length;t;){for(r=o,o=[];++u1)for(var n=1;ne.projects.map(e=>({value:e.id,label:e.id})),[e.projects]),h=(0,a.useMemo)(()=>e.agents.filter(t=>t.project_id===e.selectedProjectId),[e.agents,e.selectedProjectId]),m=async()=>{await e.spawnAgent(t)&&n(u)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"section-head",children:[(0,r.jsx)("div",{className:"section-title",children:"Agents"}),(0,r.jsx)("div",{className:"section-desc",children:"Spawn agents into a repository and manage running sessions."})]}),(0,r.jsx)("div",{className:"section-body",children:0===e.projects.length?(0,r.jsx)("div",{className:"empty",children:"Register a repository first."}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"row",children:(0,r.jsx)("div",{style:{width:260},children:(0,r.jsx)(l.Ph,{label:"Repository",value:e.selectedProjectId,onChange:e.selectProject,options:d})})}),(0,r.jsxs)(l.Zb,{children:[(0,r.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,r.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:"Spawn an agent"})}),(0,r.jsxs)("div",{className:"form-grid",children:[(0,r.jsx)(l.II,{label:"Name",value:t.name,onChange:e=>n({...t,name:e}),placeholder:"junior"}),(0,r.jsx)(l.Ph,{label:"Role",value:t.role,onChange:e=>n({...t,role:e}),options:c}),(0,r.jsx)(l.Ph,{label:"Placement",value:t.placement,onChange:e=>n({...t,placement:e}),options:o}),"worktree"===t.placement?(0,r.jsx)(l.II,{label:"Branch",value:t.worktree,onChange:e=>n({...t,worktree:e}),placeholder:"feat/auth"}):(0,r.jsx)(l.II,{label:"Subdir",value:t.subdir,onChange:e=>n({...t,subdir:e}),placeholder:"api"})]}),(0,r.jsx)("div",{className:"mt14",children:(0,r.jsx)(l.gx,{label:"Initial task",value:t.task,onChange:e=>n({...t,task:e}),rows:2,placeholder:"initial task / prompt (optional)"})}),(0,r.jsx)("div",{className:"hstack mt14",children:(0,r.jsx)(l.zx,{variant:"primary",disabled:e.cmd.busy||!t.name.trim(),onClick:m,children:"Spawn"})})]}),0===h.length?(0,r.jsx)("div",{className:"empty",children:"No agents in this repository."}):(0,r.jsx)("div",{className:"table-wrap",children:(0,r.jsxs)("table",{className:"tbl",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Name"}),(0,r.jsx)("th",{children:"Role"}),(0,r.jsx)("th",{children:"Status"}),(0,r.jsx)("th",{children:"Working dir"}),(0,r.jsx)("th",{children:"Created"}),(0,r.jsx)("th",{})]})}),(0,r.jsx)("tbody",{children:h.map(t=>{var n;return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"mono",children:t.name}),(0,r.jsx)("td",{children:t.role?(0,r.jsx)(l.Ct,{tone:"info",children:t.role}):"—"}),(0,r.jsx)("td",{children:(0,r.jsx)(l.OE,{status:t.status})}),(0,r.jsx)("td",{className:"mono faint",children:t.working_dir}),(0,r.jsx)("td",{className:"faint nowrap",children:(0,i.Eh)(t.created_at)}),(0,r.jsx)("td",{className:"nowrap",children:(0,r.jsxs)("div",{className:"hstack",children:[(0,r.jsx)(l.zx,{size:"sm",variant:"ghost",onClick:()=>e.selectRun(t.project_id,t.name),children:"Open"}),(0,r.jsx)(l.zx,{size:"sm",variant:"secondary",onClick:()=>e.killAgent(t.project_id,t.name),children:"Kill"}),(0,r.jsx)(l.zx,{size:"sm",variant:"danger",onClick:()=>e.deleteAgent(t.project_id,t.name),children:"Delete"})]})})]}),("working"===t.status||"crashed"===t.status)&&(null===(n=t.last_output)||void 0===n?void 0:n.trim())&&(0,r.jsx)("tr",{children:(0,r.jsxs)("td",{colSpan:6,style:{paddingTop:0},children:[(0,r.jsxs)("div",{className:"faint",style:{fontSize:"var(--text-xs)",marginBottom:4},children:["crashed"===t.status?"last output before crash":"live output",t.output_at?" \xb7 ".concat((0,i.Sy)(t.output_at)):""]}),(0,r.jsx)("pre",{className:"mono",style:{margin:0,padding:"8px 10px",background:"var(--surface-2, rgba(0,0,0,0.25))",borderRadius:6,fontSize:"var(--text-xs)",lineHeight:1.4,maxHeight:220,overflow:"auto",whiteSpace:"pre"},children:t.last_output})]})})]},t.id)})})]})})]})})]})}function h(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(d,{})})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return s},II:function(){return u},OE:function(){return l},Ph:function(){return h},UW:function(){return p},ZD:function(){return x},Zb:function(){return i},gx:function(){return d},kN:function(){return f},mQ:function(){return m},zx:function(){return c}});var r=n(7437),a=n(6039);function s(e){let{tone:t="neutral",pill:n=!1,dot:a=!1,children:s}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[a&&(0,r.jsx)("span",{className:"dot"}),s]})}function l(e){let{status:t}=e;return(0,r.jsx)(s,{tone:(0,a.FH)(t),children:(0,a.Cf)(t)})}function i(e){let{children:t,interactive:n=!1,onClick:a,className:s=""}=e;return(0,r.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(s).trim(),onClick:a,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function c(e){let{variant:t="secondary",size:n="md",onClick:a,disabled:s,type:l="button",children:i}=e;return(0,r.jsx)("button",{type:l,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:a,disabled:s,children:i})}function o(e){let{label:t,children:n}=e;return(0,r.jsxs)("label",{className:"field",children:[t&&(0,r.jsx)("span",{className:"field-label",children:t}),n]})}function u(e){let{label:t,value:n,onChange:a,placeholder:s,type:l="text",disabled:i}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("input",{className:"input",type:l,value:n,placeholder:s,disabled:i,onChange:e=>a(e.target.value)})})}function d(e){let{label:t,value:n,onChange:a,placeholder:s,rows:l=3}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("textarea",{className:"textarea",value:n,rows:l,placeholder:s,onChange:e=>a(e.target.value)})})}function h(e){let{label:t,value:n,onChange:a,options:s}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("select",{className:"select",value:n,onChange:e=>a(e.target.value),children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function m(e){let{tabs:t,value:n,onChange:a}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>a(e.value),children:e.label},e.value))})}function f(e){let{value:t,label:n,sub:a,accent:s=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:t}),(0,r.jsx)("div",{className:"stat-label",children:n}),a&&(0,r.jsx)("div",{className:"stat-sub",children:a})]})}function p(e){let{tone:t="info",children:n}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(t),children:n})}function x(e){let{on:t,onClick:n}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return s},Eh:function(){return l},FH:function(){return r},Q6:function(){return i},Sy:function(){return c}});let a={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return a[n]?a[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function l(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function c(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h");let s=Math.floor(a/24);if(s<30)return"".concat(s,"d");let l=Math.floor(s/30);return l<12?"".concat(l,"mo"):"".concat(Math.floor(l/12),"y")}},257:function(e,t,n){"use strict";var r,a;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(a=n.g.process)?void 0:a.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,r,a=e.exports={};function s(){throw Error("setTimeout has not been defined")}function l(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:l}catch(e){n=l}}();var c=[],o=!1,u=-1;function d(){o&&r&&(o=!1,r.length?c=r.concat(c):u=-1,c.length&&h())}function h(){if(!o){var e=i(d);o=!0;for(var t=c.length;t;){for(r=c,c=[];++u1)for(var n=1;ne.projects.map(e=>({value:e.id,label:e.id})),[e.projects]),h=(0,a.useMemo)(()=>e.agents.filter(t=>t.project_id===e.selectedProjectId),[e.agents,e.selectedProjectId]),m=async()=>{await e.spawnAgent(t)&&n(u)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"section-head",children:[(0,r.jsx)("div",{className:"section-title",children:"Agents"}),(0,r.jsx)("div",{className:"section-desc",children:"Spawn agents into a repository and manage running sessions."})]}),(0,r.jsx)("div",{className:"section-body",children:0===e.projects.length?(0,r.jsx)("div",{className:"empty",children:"Register a repository first."}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"row",children:(0,r.jsx)("div",{style:{width:260},children:(0,r.jsx)(l.Ph,{label:"Repository",value:e.selectedProjectId,onChange:e.selectProject,options:d})})}),(0,r.jsxs)(l.Zb,{children:[(0,r.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,r.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:"Spawn an agent"})}),(0,r.jsxs)("div",{className:"form-grid",children:[(0,r.jsx)(l.II,{label:"Name",value:t.name,onChange:e=>n({...t,name:e}),placeholder:"junior"}),(0,r.jsx)(l.Ph,{label:"Role",value:t.role,onChange:e=>n({...t,role:e}),options:c}),(0,r.jsx)(l.Ph,{label:"Placement",value:t.placement,onChange:e=>n({...t,placement:e}),options:o}),"worktree"===t.placement?(0,r.jsx)(l.II,{label:"Branch",value:t.worktree,onChange:e=>n({...t,worktree:e}),placeholder:"feat/auth"}):(0,r.jsx)(l.II,{label:"Subdir",value:t.subdir,onChange:e=>n({...t,subdir:e}),placeholder:"api"})]}),(0,r.jsx)("div",{className:"mt14",children:(0,r.jsx)(l.gx,{label:"Initial task",value:t.task,onChange:e=>n({...t,task:e}),rows:2,placeholder:"initial task / prompt (optional)"})}),(0,r.jsx)("div",{className:"hstack mt14",children:(0,r.jsx)(l.zx,{variant:"primary",disabled:e.cmd.busy||!t.name.trim(),onClick:m,children:"Spawn"})})]}),0===h.length?(0,r.jsx)("div",{className:"empty",children:"No agents in this repository."}):(0,r.jsx)("div",{className:"table-wrap",children:(0,r.jsxs)("table",{className:"tbl",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Name"}),(0,r.jsx)("th",{children:"Role"}),(0,r.jsx)("th",{children:"Status"}),(0,r.jsx)("th",{children:"Working dir"}),(0,r.jsx)("th",{children:"Created"}),(0,r.jsx)("th",{})]})}),(0,r.jsx)("tbody",{children:h.map(t=>{var n;return(0,r.jsxs)(a.Fragment,{children:[(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"mono",children:t.name}),(0,r.jsx)("td",{children:t.role?(0,r.jsx)(l.Ct,{tone:"info",children:t.role}):"—"}),(0,r.jsx)("td",{children:(0,r.jsx)(l.OE,{status:t.status})}),(0,r.jsx)("td",{className:"mono faint",children:t.working_dir}),(0,r.jsx)("td",{className:"faint nowrap",children:(0,i.Eh)(t.created_at)}),(0,r.jsx)("td",{className:"nowrap",children:(0,r.jsxs)("div",{className:"hstack",children:[(0,r.jsx)(l.zx,{size:"sm",variant:"ghost",onClick:()=>e.selectRun(t.project_id,t.name),children:"Open"}),(0,r.jsx)(l.zx,{size:"sm",variant:"secondary",onClick:()=>e.killAgent(t.project_id,t.name),children:"Kill"}),(0,r.jsx)(l.zx,{size:"sm",variant:"danger",onClick:()=>e.deleteAgent(t.project_id,t.name),children:"Delete"})]})})]}),("working"===t.status||"crashed"===t.status)&&(null===(n=t.last_output)||void 0===n?void 0:n.trim())&&(0,r.jsx)("tr",{children:(0,r.jsxs)("td",{colSpan:6,style:{paddingTop:0},children:[(0,r.jsxs)("div",{className:"faint",style:{fontSize:"var(--text-xs)",marginBottom:4},children:["crashed"===t.status?"last output before crash":"live output",t.output_at?" \xb7 ".concat((0,i.Sy)(t.output_at)):""]}),(0,r.jsx)("pre",{className:"mono",style:{margin:0,padding:"8px 10px",background:"var(--surface-2, rgba(0,0,0,0.25))",borderRadius:6,fontSize:"var(--text-xs)",lineHeight:1.4,maxHeight:220,overflow:"auto",whiteSpace:"pre"},children:t.last_output})]})})]},t.id)})})]})})]})})]})}function h(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(d,{})})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return s},II:function(){return u},OE:function(){return l},Ph:function(){return h},UW:function(){return p},ZD:function(){return x},Zb:function(){return i},gx:function(){return d},kN:function(){return f},mQ:function(){return m},zx:function(){return c}});var r=n(7437),a=n(6039);function s(e){let{tone:t="neutral",pill:n=!1,dot:a=!1,children:s}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[a&&(0,r.jsx)("span",{className:"dot"}),s]})}function l(e){let{status:t}=e;return(0,r.jsx)(s,{tone:(0,a.FH)(t),children:(0,a.Cf)(t)})}function i(e){let{children:t,interactive:n=!1,onClick:a,className:s=""}=e;return(0,r.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(s).trim(),onClick:a,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function c(e){let{variant:t="secondary",size:n="md",onClick:a,disabled:s,type:l="button",children:i}=e;return(0,r.jsx)("button",{type:l,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:a,disabled:s,children:i})}function o(e){let{label:t,children:n}=e;return(0,r.jsxs)("label",{className:"field",children:[t&&(0,r.jsx)("span",{className:"field-label",children:t}),n]})}function u(e){let{label:t,value:n,onChange:a,placeholder:s,type:l="text",disabled:i}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("input",{className:"input",type:l,value:n,placeholder:s,disabled:i,onChange:e=>a(e.target.value)})})}function d(e){let{label:t,value:n,onChange:a,placeholder:s,rows:l=3}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("textarea",{className:"textarea",value:n,rows:l,placeholder:s,onChange:e=>a(e.target.value)})})}function h(e){let{label:t,value:n,onChange:a,options:s}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("select",{className:"select",value:n,onChange:e=>a(e.target.value),children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function m(e){let{tabs:t,value:n,onChange:a}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>a(e.value),children:e.label},e.value))})}function f(e){let{value:t,label:n,sub:a,accent:s=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:t}),(0,r.jsx)("div",{className:"stat-label",children:n}),a&&(0,r.jsx)("div",{className:"stat-sub",children:a})]})}function p(e){let{tone:t="info",children:n}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(t),children:n})}function x(e){let{on:t,onClick:n}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return s},Eh:function(){return l},FH:function(){return r},Q6:function(){return i},Sy:function(){return c}});let a={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return a[n]?a[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function l(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function c(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h");let s=Math.floor(a/24);if(s<30)return"".concat(s,"d");let l=Math.floor(s/30);return l<12?"".concat(l,"mo"):"".concat(Math.floor(l/12),"y")}},257:function(e,t,n){"use strict";var r,a;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(a=n.g.process)?void 0:a.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,r,a=e.exports={};function s(){throw Error("setTimeout has not been defined")}function l(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:l}catch(e){n=l}}();var c=[],o=!1,u=-1;function d(){o&&r&&(o=!1,r.length?c=r.concat(c):u=-1,c.length&&h())}function h(){if(!o){var e=i(d);o=!0;for(var t=c.length;t;){for(r=c,c=[];++u1)for(var n=1;ne.projects.map(e=>({value:e.id,label:e.id})),[e.projects]),d=async()=>{await e.submitApproval(t),n(o)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"section-head",children:[(0,r.jsx)("div",{className:"section-title",children:"Approvals"}),(0,r.jsx)("div",{className:"section-desc",children:"A merge is denied unless a standing approval exists — made by a different agent, pinned to the reviewed commit."})]}),(0,r.jsx)("div",{className:"section-body",children:0===e.projects.length?(0,r.jsx)("div",{className:"empty",children:"Register a repository first."}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"row",children:(0,r.jsx)("div",{style:{width:260},children:(0,r.jsx)(c.Ph,{label:"Repository",value:e.selectedProjectId,onChange:e.selectProject,options:u})})}),(0,r.jsxs)(c.Zb,{children:[(0,r.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,r.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:"Record a verdict"})}),(0,r.jsxs)("div",{className:"form-grid",children:[(0,r.jsx)(c.II,{label:"Branch",value:t.branch,onChange:e=>n({...t,branch:e}),placeholder:"feat/auth"}),(0,r.jsx)(c.Ph,{label:"Verdict",value:t.status,onChange:e=>n({...t,status:e}),options:l}),(0,r.jsx)(c.II,{label:"Agent",value:t.agent_name,onChange:e=>n({...t,agent_name:e}),placeholder:"reads its HEAD (optional)"}),(0,r.jsx)(c.II,{label:"SHA",value:t.sha,onChange:e=>n({...t,sha:e}),placeholder:"pins the approval (optional)"})]}),(0,r.jsx)("div",{className:"mt14",children:(0,r.jsx)(c.II,{label:"Note",value:t.note,onChange:e=>n({...t,note:e}),placeholder:"optional"})}),(0,r.jsx)("div",{className:"hstack mt14",children:(0,r.jsx)(c.zx,{variant:"primary",disabled:e.cmd.busy||!t.branch.trim(),onClick:d,children:"Enqueue verdict"})})]}),0===e.approvals.length?(0,r.jsx)("div",{className:"empty",children:"No approvals recorded."}):(0,r.jsx)("div",{className:"table-wrap",children:(0,r.jsxs)("table",{className:"tbl",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"When"}),(0,r.jsx)("th",{children:"Branch"}),(0,r.jsx)("th",{children:"Verdict"}),(0,r.jsx)("th",{children:"By"}),(0,r.jsx)("th",{children:"SHA"}),(0,r.jsx)("th",{children:"Note"})]})}),(0,r.jsx)("tbody",{children:e.approvals.map(e=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"faint nowrap",children:(0,i.Eh)(e.created_at)}),(0,r.jsx)("td",{className:"mono",children:e.branch}),(0,r.jsx)("td",{children:(0,r.jsx)(c.OE,{status:e.status})}),(0,r.jsx)("td",{children:e.approved_by_agent_id?"agent ".concat(e.approved_by_agent_id):e.actor||"—"}),(0,r.jsx)("td",{className:"mono",children:(0,i.Q6)(e.approved_sha)}),(0,r.jsx)("td",{children:e.note||"—"})]},e.id))})]})})]})})]})}function d(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(u,{})})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return s},II:function(){return u},OE:function(){return c},Ph:function(){return h},UW:function(){return m},ZD:function(){return v},Zb:function(){return i},gx:function(){return d},kN:function(){return p},mQ:function(){return f},zx:function(){return l}});var r=n(7437),a=n(6039);function s(e){let{tone:t="neutral",pill:n=!1,dot:a=!1,children:s}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[a&&(0,r.jsx)("span",{className:"dot"}),s]})}function c(e){let{status:t}=e;return(0,r.jsx)(s,{tone:(0,a.FH)(t),children:(0,a.Cf)(t)})}function i(e){let{children:t,interactive:n=!1,onClick:a,className:s=""}=e;return(0,r.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(s).trim(),onClick:a,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function l(e){let{variant:t="secondary",size:n="md",onClick:a,disabled:s,type:c="button",children:i}=e;return(0,r.jsx)("button",{type:c,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:a,disabled:s,children:i})}function o(e){let{label:t,children:n}=e;return(0,r.jsxs)("label",{className:"field",children:[t&&(0,r.jsx)("span",{className:"field-label",children:t}),n]})}function u(e){let{label:t,value:n,onChange:a,placeholder:s,type:c="text",disabled:i}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("input",{className:"input",type:c,value:n,placeholder:s,disabled:i,onChange:e=>a(e.target.value)})})}function d(e){let{label:t,value:n,onChange:a,placeholder:s,rows:c=3}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("textarea",{className:"textarea",value:n,rows:c,placeholder:s,onChange:e=>a(e.target.value)})})}function h(e){let{label:t,value:n,onChange:a,options:s}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("select",{className:"select",value:n,onChange:e=>a(e.target.value),children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function f(e){let{tabs:t,value:n,onChange:a}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>a(e.value),children:e.label},e.value))})}function p(e){let{value:t,label:n,sub:a,accent:s=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:t}),(0,r.jsx)("div",{className:"stat-label",children:n}),a&&(0,r.jsx)("div",{className:"stat-sub",children:a})]})}function m(e){let{tone:t="info",children:n}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(t),children:n})}function v(e){let{on:t,onClick:n}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return s},Eh:function(){return c},FH:function(){return r},Q6:function(){return i},Sy:function(){return l}});let a={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return a[n]?a[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function c(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function l(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h");let s=Math.floor(a/24);if(s<30)return"".concat(s,"d");let c=Math.floor(s/30);return c<12?"".concat(c,"mo"):"".concat(Math.floor(c/12),"y")}},257:function(e,t,n){"use strict";var r,a;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(a=n.g.process)?void 0:a.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,r,a=e.exports={};function s(){throw Error("setTimeout has not been defined")}function c(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:c}catch(e){n=c}}();var l=[],o=!1,u=-1;function d(){o&&r&&(o=!1,r.length?l=r.concat(l):u=-1,l.length&&h())}function h(){if(!o){var e=i(d);o=!0;for(var t=l.length;t;){for(r=l,l=[];++u1)for(var n=1;ne.projects.map(e=>({value:e.id,label:e.id})),[e.projects]),d=async()=>{await e.submitApproval(t),n(o)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"section-head",children:[(0,r.jsx)("div",{className:"section-title",children:"Approvals"}),(0,r.jsx)("div",{className:"section-desc",children:"A merge is denied unless a standing approval exists — made by a different agent, pinned to the reviewed commit."})]}),(0,r.jsx)("div",{className:"section-body",children:0===e.projects.length?(0,r.jsx)("div",{className:"empty",children:"Register a repository first."}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"row",children:(0,r.jsx)("div",{style:{width:260},children:(0,r.jsx)(c.Ph,{label:"Repository",value:e.selectedProjectId,onChange:e.selectProject,options:u})})}),(0,r.jsxs)(c.Zb,{children:[(0,r.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,r.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:"Record a verdict"})}),(0,r.jsxs)("div",{className:"form-grid",children:[(0,r.jsx)(c.II,{label:"Branch",value:t.branch,onChange:e=>n({...t,branch:e}),placeholder:"feat/auth"}),(0,r.jsx)(c.Ph,{label:"Verdict",value:t.status,onChange:e=>n({...t,status:e}),options:l}),(0,r.jsx)(c.II,{label:"Agent",value:t.agent_name,onChange:e=>n({...t,agent_name:e}),placeholder:"reads its HEAD (optional)"}),(0,r.jsx)(c.II,{label:"SHA",value:t.sha,onChange:e=>n({...t,sha:e}),placeholder:"pins the approval (optional)"})]}),(0,r.jsx)("div",{className:"mt14",children:(0,r.jsx)(c.II,{label:"Note",value:t.note,onChange:e=>n({...t,note:e}),placeholder:"optional"})}),(0,r.jsx)("div",{className:"hstack mt14",children:(0,r.jsx)(c.zx,{variant:"primary",disabled:e.cmd.busy||!t.branch.trim(),onClick:d,children:"Enqueue verdict"})})]}),0===e.approvals.length?(0,r.jsx)("div",{className:"empty",children:"No approvals recorded."}):(0,r.jsx)("div",{className:"table-wrap",children:(0,r.jsxs)("table",{className:"tbl",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"When"}),(0,r.jsx)("th",{children:"Branch"}),(0,r.jsx)("th",{children:"Verdict"}),(0,r.jsx)("th",{children:"By"}),(0,r.jsx)("th",{children:"SHA"}),(0,r.jsx)("th",{children:"Note"})]})}),(0,r.jsx)("tbody",{children:e.approvals.map(e=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"faint nowrap",children:(0,i.Eh)(e.created_at)}),(0,r.jsx)("td",{className:"mono",children:e.branch}),(0,r.jsx)("td",{children:(0,r.jsx)(c.OE,{status:e.status})}),(0,r.jsx)("td",{children:e.approved_by_agent_id?"agent ".concat(e.approved_by_agent_id):e.actor||"—"}),(0,r.jsx)("td",{className:"mono",children:(0,i.Q6)(e.approved_sha)}),(0,r.jsx)("td",{children:e.note||"—"})]},e.id))})]})})]})})]})}function d(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(u,{})})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return s},II:function(){return u},OE:function(){return c},Ph:function(){return h},UW:function(){return m},ZD:function(){return v},Zb:function(){return i},gx:function(){return d},kN:function(){return p},mQ:function(){return f},zx:function(){return l}});var r=n(7437),a=n(6039);function s(e){let{tone:t="neutral",pill:n=!1,dot:a=!1,children:s}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[a&&(0,r.jsx)("span",{className:"dot"}),s]})}function c(e){let{status:t}=e;return(0,r.jsx)(s,{tone:(0,a.FH)(t),children:(0,a.Cf)(t)})}function i(e){let{children:t,interactive:n=!1,onClick:a,className:s=""}=e;return(0,r.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(s).trim(),onClick:a,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function l(e){let{variant:t="secondary",size:n="md",onClick:a,disabled:s,type:c="button",children:i}=e;return(0,r.jsx)("button",{type:c,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:a,disabled:s,children:i})}function o(e){let{label:t,children:n}=e;return(0,r.jsxs)("label",{className:"field",children:[t&&(0,r.jsx)("span",{className:"field-label",children:t}),n]})}function u(e){let{label:t,value:n,onChange:a,placeholder:s,type:c="text",disabled:i}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("input",{className:"input",type:c,value:n,placeholder:s,disabled:i,onChange:e=>a(e.target.value)})})}function d(e){let{label:t,value:n,onChange:a,placeholder:s,rows:c=3}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("textarea",{className:"textarea",value:n,rows:c,placeholder:s,onChange:e=>a(e.target.value)})})}function h(e){let{label:t,value:n,onChange:a,options:s}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("select",{className:"select",value:n,onChange:e=>a(e.target.value),children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function f(e){let{tabs:t,value:n,onChange:a}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>a(e.value),children:e.label},e.value))})}function p(e){let{value:t,label:n,sub:a,accent:s=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:t}),(0,r.jsx)("div",{className:"stat-label",children:n}),a&&(0,r.jsx)("div",{className:"stat-sub",children:a})]})}function m(e){let{tone:t="info",children:n}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(t),children:n})}function v(e){let{on:t,onClick:n}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return s},Eh:function(){return c},FH:function(){return r},Q6:function(){return i},Sy:function(){return l}});let a={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return a[n]?a[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function c(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function l(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h");let s=Math.floor(a/24);if(s<30)return"".concat(s,"d");let c=Math.floor(s/30);return c<12?"".concat(c,"mo"):"".concat(Math.floor(c/12),"y")}},257:function(e,t,n){"use strict";var r,a;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(a=n.g.process)?void 0:a.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,r,a=e.exports={};function s(){throw Error("setTimeout has not been defined")}function c(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:c}catch(e){n=c}}();var l=[],o=!1,u=-1;function d(){o&&r&&(o=!1,r.length?l=r.concat(l):u=-1,l.length&&h())}function h(){if(!o){var e=i(d);o=!0;for(var t=l.length;t;){for(r=l,l=[];++u1)for(var n=1;n{if("awaiting"===n&&a&&u.current&&!u.current.closed)try{u.current.location.href=a}catch(e){}if("done"===n||"error"===n){var e;null===(e=u.current)||void 0===e||e.close(),u.current=null}},[n,a]);let p=()=>{u.current=i("about:blank"),e.startClaudeLogin()},x=async()=>{await e.submitClaudeCode(c)&&d("")};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"faint",style:{fontSize:"var(--text-sm)"},children:["Log Claude Code in on the host so agents can run. This drives"," ",(0,t.jsx)("span",{className:"mono",children:"claude /login"})," in the control container and picks the Claude account with a subscription."]}),(0,t.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:16,marginTop:14},children:[o&&(0,t.jsx)(r.UW,{tone:"error"===n?"danger":"done"===n?"success":"info",children:o}),"done"===n?(0,t.jsx)("div",{children:(0,t.jsx)(r.zx,{variant:"secondary",onClick:e.resetClaudeLogin,children:"Log in again"})}):h?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.UW,{tone:"info",children:"A Claude sign-in window should have opened. Authorize there, copy the code Claude shows you, and paste it below. If the window didn't open (popups blocked), use the button."}),(0,t.jsxs)("div",{className:"hstack",style:{gap:10,flexWrap:"wrap"},children:[(0,t.jsx)(r.zx,{variant:"secondary",disabled:!a,onClick:()=>{a&&(u.current=i(a))},children:"Open Claude sign-in window ↗"}),a&&(0,t.jsx)("a",{className:"btn btn-ghost",href:a,target:"_blank",rel:"noopener noreferrer",children:"Open in a new tab"}),(0,t.jsx)(r.zx,{variant:"ghost",disabled:m,onClick:p,children:"Restart"})]}),(0,t.jsxs)("div",{className:"hstack",style:{gap:10,alignItems:"flex-end",flexWrap:"wrap"},children:[(0,t.jsx)("div",{style:{flex:"1 1 320px"},children:(0,t.jsx)(r.II,{label:"Authorization code",value:c,onChange:d,placeholder:"Paste the code from claude.com",disabled:"submitting"===n})}),(0,t.jsx)(r.zx,{variant:"primary",disabled:"submitting"===n||!c.trim(),onClick:x,children:"submitting"===n?"Submitting…":"Finish login"})]})]}):(0,t.jsxs)("div",{className:"hstack",style:{gap:10},children:[(0,t.jsx)(r.zx,{variant:"primary",disabled:m,onClick:p,children:"starting"===n?"Starting…":"Log in to Claude"}),"error"===n&&(0,t.jsx)(r.zx,{variant:"ghost",disabled:m,onClick:p,children:"Retry"})]})]})]})}function c(e){let n={};for(let a of e.split("\n")){let e=a.trim();if(!e)continue;let t=e.indexOf("=");t<=0||(n[e.slice(0,t).trim()]=e.slice(t+1).trim())}return n}function d(e){return Object.entries(null!=e?e:{}).map(e=>{let[n,a]=e;return"".concat(n,"=").concat(a)}).join("\n")}function u(e){return e.split("\n").map(e=>e.trim()).filter(Boolean)}let m={name:"",description:"",content:"",enabled:!0};function h(){let e=(0,s.Q)(),[n,a]=(0,l.useState)(m),[i,o]=(0,l.useState)(null),c=()=>{a(m),o(null)},d=async()=>{let a={...n};(null!=i?await e.updateClaudeSkill(i,a):await e.createClaudeSkill(a))&&c()},u=e=>{var n;a({name:e.name,description:null!==(n=e.description)&&void 0!==n?n:"",content:e.content,enabled:e.enabled}),o(e.id)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"faint",style:{fontSize:"var(--text-sm)",marginBottom:14},children:["Custom Claude Code skills, synced to every worker's"," ",(0,t.jsx)("span",{className:"mono",children:"~/.claude/skills"})," at each launch. The description is what makes Claude pick the skill up — say when to use it."]}),(0,t.jsxs)(r.Zb,{children:[(0,t.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,t.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:null!=i?"Edit skill \xb7 ".concat(n.name):"Add a skill"})}),(0,t.jsxs)("div",{className:"form-grid",children:[(0,t.jsx)(r.II,{label:"Name (slug — becomes the skill directory)",value:n.name,onChange:e=>a({...n,name:e}),placeholder:"deploy-checklist"}),(0,t.jsx)(r.II,{label:"Description (when should Claude use it?)",value:n.description,onChange:e=>a({...n,description:e}),placeholder:"Use when preparing or reviewing a deploy."})]}),(0,t.jsx)("div",{style:{marginTop:10},children:(0,t.jsx)(r.gx,{label:"SKILL.md body (markdown)",value:n.content,onChange:e=>a({...n,content:e}),rows:8,placeholder:"# Deploy checklist\n\n1. ..."})}),(0,t.jsxs)("div",{className:"hstack mt14",children:[(0,t.jsx)(r.zx,{variant:"primary",disabled:!n.name.trim()||!n.content.trim(),onClick:d,children:null!=i?"Save changes":"Add skill"}),null!=i&&(0,t.jsx)(r.zx,{variant:"ghost",onClick:c,children:"Cancel"})]})]}),0===e.claudeSkills.length&&(0,t.jsx)("div",{className:"empty",children:"No custom skills yet."}),e.claudeSkills.map(n=>(0,t.jsxs)(r.Zb,{children:[(0,t.jsxs)("div",{className:"card-head",children:[(0,t.jsx)("span",{className:"mono",style:{fontWeight:"var(--fw-bold)",fontSize:"var(--text-lg)",color:"var(--text-heading)"},children:n.name}),(0,t.jsxs)("div",{className:"hstack",children:[(0,t.jsx)(r.Ct,{tone:n.enabled?"success":"neutral",children:n.enabled?"enabled":"disabled"}),(0,t.jsx)(r.ZD,{on:n.enabled,onClick:()=>e.updateClaudeSkill(n.id,{enabled:!n.enabled})}),(0,t.jsx)(r.zx,{size:"sm",variant:"secondary",onClick:()=>u(n),children:"Edit"}),(0,t.jsx)(r.zx,{size:"sm",variant:"danger",onClick:()=>e.deleteClaudeSkill(n.id),children:"Remove"})]})]}),n.description&&(0,t.jsx)("div",{className:"faint",style:{fontSize:"var(--text-sm)",marginTop:8},children:n.description})]},n.id))]})}let p=[{value:"stdio",label:"stdio (run a command)"},{value:"http",label:"http (remote server)"},{value:"sse",label:"sse (remote server, legacy)"}],x={name:"",transport:"stdio",command:"",args:"",env:"",url:"",headers:"",enabled:!0};function v(){let e=(0,s.Q)(),[n,a]=(0,l.useState)(x),[i,o]=(0,l.useState)(null),m=()=>{a(x),o(null)},h=async()=>{let a={name:n.name,transport:n.transport,command:n.command.trim()||null,args:u(n.args),env:c(n.env),url:n.url.trim()||null,headers:c(n.headers),enabled:n.enabled};(null!=i?await e.updateClaudeConnector(i,a):await e.createClaudeConnector(a))&&m()},v=e=>{var n,t,l;a({name:e.name,transport:e.transport,command:null!==(n=e.command)&&void 0!==n?n:"",args:(null!==(t=e.args)&&void 0!==t?t:[]).join("\n"),env:d(e.env),url:null!==(l=e.url)&&void 0!==l?l:"",headers:d(e.headers),enabled:e.enabled}),o(e.id)},g="stdio"===n.transport;return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"faint",style:{fontSize:"var(--text-sm)",marginBottom:14},children:["MCP servers agents can reach. Passed to each run as its"," ",(0,t.jsx)("span",{className:"mono",children:"--mcp-config"})," file, so nothing lands in the repository tree. stdio commands run inside the control container."]}),(0,t.jsxs)(r.Zb,{children:[(0,t.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,t.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:null!=i?"Edit connector \xb7 ".concat(n.name):"Add a connector"})}),(0,t.jsxs)("div",{className:"form-grid",children:[(0,t.jsx)(r.II,{label:"Name",value:n.name,onChange:e=>a({...n,name:e}),placeholder:"github"}),(0,t.jsx)(r.Ph,{label:"Transport",value:n.transport,onChange:e=>a({...n,transport:e}),options:p}),g?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.II,{label:"Command",value:n.command,onChange:e=>a({...n,command:e}),placeholder:"npx"}),(0,t.jsx)(r.gx,{label:"Arguments (one per line)",value:n.args,onChange:e=>a({...n,args:e}),rows:3,placeholder:"-y\n@modelcontextprotocol/server-github"}),(0,t.jsx)(r.gx,{label:"Environment (KEY=VALUE per line)",value:n.env,onChange:e=>a({...n,env:e}),rows:3,placeholder:"GITHUB_TOKEN=ghp_..."})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.II,{label:"URL",value:n.url,onChange:e=>a({...n,url:e}),placeholder:"https://mcp.example.com/mcp"}),(0,t.jsx)(r.gx,{label:"Headers (KEY=VALUE per line)",value:n.headers,onChange:e=>a({...n,headers:e}),rows:3,placeholder:"Authorization=Bearer ..."})]})]}),(0,t.jsxs)("div",{className:"hstack mt14",children:[(0,t.jsx)(r.zx,{variant:"primary",disabled:!n.name.trim()||(g?!n.command.trim():!n.url.trim()),onClick:h,children:null!=i?"Save changes":"Add connector"}),null!=i&&(0,t.jsx)(r.zx,{variant:"ghost",onClick:m,children:"Cancel"})]})]}),0===e.claudeConnectors.length&&(0,t.jsx)("div",{className:"empty",children:"No connectors yet."}),e.claudeConnectors.map(n=>{var a;return(0,t.jsxs)(r.Zb,{children:[(0,t.jsxs)("div",{className:"card-head",children:[(0,t.jsx)("span",{className:"mono",style:{fontWeight:"var(--fw-bold)",fontSize:"var(--text-lg)",color:"var(--text-heading)"},children:n.name}),(0,t.jsxs)("div",{className:"hstack",children:[(0,t.jsx)(r.Ct,{tone:"info",children:n.transport}),(0,t.jsx)(r.Ct,{tone:n.enabled?"success":"neutral",children:n.enabled?"enabled":"disabled"}),(0,t.jsx)(r.ZD,{on:n.enabled,onClick:()=>e.updateClaudeConnector(n.id,{enabled:!n.enabled})}),(0,t.jsx)(r.zx,{size:"sm",variant:"secondary",onClick:()=>v(n),children:"Edit"}),(0,t.jsx)(r.zx,{size:"sm",variant:"danger",onClick:()=>e.deleteClaudeConnector(n.id),children:"Remove"})]})]}),(0,t.jsx)("div",{className:"mono faint",style:{fontSize:"var(--text-xs)",marginTop:8},children:"stdio"===n.transport?[n.command,...null!==(a=n.args)&&void 0!==a?a:[]].join(" "):n.url})]},n.id)})]})}let g={name:"",marketplace:"",marketplace_repo:"",enabled:!0};function f(){let e=(0,s.Q)(),[n,a]=(0,l.useState)(g),[i,o]=(0,l.useState)(null),c=()=>{a(g),o(null)},d=async()=>{let a={...n};(null!=i?await e.updateClaudePlugin(i,a):await e.createClaudePlugin(a))&&c()},u=e=>{a({name:e.name,marketplace:e.marketplace,marketplace_repo:e.marketplace_repo,enabled:e.enabled}),o(e.id)};return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("div",{className:"faint",style:{fontSize:"var(--text-sm)",marginBottom:14},children:"Claude Code plugins, pinned to the marketplace serving them. Generated settings declare the marketplace and enable the plugin, so headless runs install both on boot."}),(0,t.jsxs)(r.Zb,{children:[(0,t.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,t.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:null!=i?"Edit plugin \xb7 ".concat(n.name):"Add a plugin"})}),(0,t.jsxs)("div",{className:"form-grid",children:[(0,t.jsx)(r.II,{label:"Plugin name",value:n.name,onChange:e=>a({...n,name:e}),placeholder:"code-reviewer"}),(0,t.jsx)(r.II,{label:"Marketplace key",value:n.marketplace,onChange:e=>a({...n,marketplace:e}),placeholder:"acme-tools"}),(0,t.jsx)(r.II,{label:"Marketplace repo (owner/repo or git URL)",value:n.marketplace_repo,onChange:e=>a({...n,marketplace_repo:e}),placeholder:"acme/claude-marketplace"})]}),(0,t.jsxs)("div",{className:"hstack mt14",children:[(0,t.jsx)(r.zx,{variant:"primary",disabled:!n.name.trim()||!n.marketplace.trim()||!n.marketplace_repo.trim(),onClick:d,children:null!=i?"Save changes":"Add plugin"}),null!=i&&(0,t.jsx)(r.zx,{variant:"ghost",onClick:c,children:"Cancel"})]})]}),0===e.claudePlugins.length&&(0,t.jsx)("div",{className:"empty",children:"No plugins yet."}),e.claudePlugins.map(n=>(0,t.jsxs)(r.Zb,{children:[(0,t.jsxs)("div",{className:"card-head",children:[(0,t.jsxs)("span",{className:"mono",style:{fontWeight:"var(--fw-bold)",fontSize:"var(--text-lg)",color:"var(--text-heading)"},children:[n.name,"@",n.marketplace]}),(0,t.jsxs)("div",{className:"hstack",children:[(0,t.jsx)(r.Ct,{tone:n.enabled?"success":"neutral",children:n.enabled?"enabled":"disabled"}),(0,t.jsx)(r.ZD,{on:n.enabled,onClick:()=>e.updateClaudePlugin(n.id,{enabled:!n.enabled})}),(0,t.jsx)(r.zx,{size:"sm",variant:"secondary",onClick:()=>u(n),children:"Edit"}),(0,t.jsx)(r.zx,{size:"sm",variant:"danger",onClick:()=>e.deleteClaudePlugin(n.id),children:"Remove"})]})]}),(0,t.jsx)("div",{className:"mono faint",style:{fontSize:"var(--text-xs)",marginTop:8},children:n.marketplace_repo})]},n.id))]})}let b=[{value:"",label:"(keep server baseline)"},{value:"default",label:"default"},{value:"acceptEdits",label:"acceptEdits"},{value:"plan",label:"plan"},{value:"bypassPermissions",label:"bypassPermissions"}];function j(){let e=(0,s.Q)(),n=e.claudePermissions,[a,i]=(0,l.useState)(null);if(null===a&&null!==n){var o;return i({mode:null!==(o=n.default_mode)&&void 0!==o?o:"",allow:n.allow.join("\n"),deny:n.deny.join("\n"),ask:n.ask.join("\n")}),null}return null===a||null===n?(0,t.jsx)("div",{className:"empty",children:"Loading permissions…"}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"faint",style:{fontSize:"var(--text-sm)",marginBottom:14},children:["Overrides merged over the server baseline into every generated"," ",(0,t.jsx)("span",{className:"mono",children:"settings.json"}),". Headless runs auto-deny anything that would prompt, so allow rules are what let work proceed; the PreToolUse/Stop hooks stay the hard gate regardless."]}),(0,t.jsxs)(r.Zb,{children:[(0,t.jsxs)("div",{className:"form-grid",children:[(0,t.jsx)(r.Ph,{label:"Default mode (baseline: ".concat(n.base_mode,")"),value:a.mode,onChange:e=>i({...a,mode:e}),options:b}),(0,t.jsxs)("div",{className:"field",children:[(0,t.jsx)("span",{className:"field-label",children:"Baseline allow rules (from server env)"}),(0,t.jsx)("div",{className:"mono faint",style:{fontSize:"var(--text-xs)",padding:"6px 0"},children:n.base_allow.length?n.base_allow.join(" \xb7 "):"—"})]}),(0,t.jsx)(r.gx,{label:"Extra allow rules (one per line)",value:a.allow,onChange:e=>i({...a,allow:e}),rows:4,placeholder:"Bash(npm *)\nWebFetch(domain:docs.example.com)"}),(0,t.jsx)(r.gx,{label:"Deny rules (one per line)",value:a.deny,onChange:e=>i({...a,deny:e}),rows:4,placeholder:"Bash(rm -rf *)\nRead(./secrets/**)"}),(0,t.jsx)(r.gx,{label:"Ask rules (one per line — headless runs deny these)",value:a.ask,onChange:e=>i({...a,ask:e}),rows:4,placeholder:"Bash(git push *)"})]}),(0,t.jsx)("div",{className:"hstack mt14",children:(0,t.jsx)(r.zx,{variant:"primary",onClick:()=>e.saveClaudePermissions({default_mode:a.mode||null,allow:u(a.allow),deny:u(a.deny),ask:u(a.ask)}),children:"Save permissions"})})]})]})}let C=[{value:"account",label:"Account"},{value:"skills",label:"Skills"},{value:"connectors",label:"Connectors"},{value:"plugins",label:"Plugins"},{value:"permissions",label:"Permissions"}];function y(){let[e,n]=(0,l.useState)("account");return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"section-head",children:[(0,t.jsx)("div",{className:"section-title",children:"Claude"}),(0,t.jsx)("div",{className:"section-desc",children:"Manage the Claude Code install agents run on: the account login, plus skills, MCP connectors, plugins, and permissions. Changes apply to the next launch of every agent."})]}),(0,t.jsxs)("div",{className:"section-body",children:[(0,t.jsx)("div",{style:{marginBottom:16},children:(0,t.jsx)(r.mQ,{tabs:C,value:e,onChange:n})}),"account"===e&&(0,t.jsx)(o,{}),"skills"===e&&(0,t.jsx)(h,{}),"connectors"===e&&(0,t.jsx)(v,{}),"plugins"===e&&(0,t.jsx)(f,{}),"permissions"===e&&(0,t.jsx)(j,{})]})]})}function k(){return(0,t.jsx)("div",{className:"main-scroll",children:(0,t.jsx)(y,{})})}},8280:function(e,n,a){"use strict";a.d(n,{Ct:function(){return s},II:function(){return d},OE:function(){return r},Ph:function(){return m},UW:function(){return x},ZD:function(){return v},Zb:function(){return i},gx:function(){return u},kN:function(){return p},mQ:function(){return h},zx:function(){return o}});var t=a(7437),l=a(6039);function s(e){let{tone:n="neutral",pill:a=!1,dot:l=!1,children:s}=e;return(0,t.jsxs)("span",{className:"badge badge-".concat(n).concat(a?" pill":""),children:[l&&(0,t.jsx)("span",{className:"dot"}),s]})}function r(e){let{status:n}=e;return(0,t.jsx)(s,{tone:(0,l.FH)(n),children:(0,l.Cf)(n)})}function i(e){let{children:n,interactive:a=!1,onClick:l,className:s=""}=e;return(0,t.jsx)("div",{className:"card".concat(a?" interactive":""," ").concat(s).trim(),onClick:l,role:a?"button":void 0,tabIndex:a?0:void 0,children:n})}function o(e){let{variant:n="secondary",size:a="md",onClick:l,disabled:s,type:r="button",children:i}=e;return(0,t.jsx)("button",{type:r,className:"btn btn-".concat(n).concat("sm"===a?" btn-sm":""),onClick:l,disabled:s,children:i})}function c(e){let{label:n,children:a}=e;return(0,t.jsxs)("label",{className:"field",children:[n&&(0,t.jsx)("span",{className:"field-label",children:n}),a]})}function d(e){let{label:n,value:a,onChange:l,placeholder:s,type:r="text",disabled:i}=e;return(0,t.jsx)(c,{label:n,children:(0,t.jsx)("input",{className:"input",type:r,value:a,placeholder:s,disabled:i,onChange:e=>l(e.target.value)})})}function u(e){let{label:n,value:a,onChange:l,placeholder:s,rows:r=3}=e;return(0,t.jsx)(c,{label:n,children:(0,t.jsx)("textarea",{className:"textarea",value:a,rows:r,placeholder:s,onChange:e=>l(e.target.value)})})}function m(e){let{label:n,value:a,onChange:l,options:s}=e;return(0,t.jsx)(c,{label:n,children:(0,t.jsx)("select",{className:"select",value:a,onChange:e=>l(e.target.value),children:s.map(e=>(0,t.jsx)("option",{value:e.value,children:e.label},e.value))})})}function h(e){let{tabs:n,value:a,onChange:l}=e;return(0,t.jsx)("div",{className:"tabs",role:"tablist",children:n.map(e=>(0,t.jsx)("button",{role:"tab","aria-selected":a===e.value,className:"tab".concat(a===e.value?" active":""),onClick:()=>l(e.value),children:e.label},e.value))})}function p(e){let{value:n,label:a,sub:l,accent:s=!1}=e;return(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:n}),(0,t.jsx)("div",{className:"stat-label",children:a}),l&&(0,t.jsx)("div",{className:"stat-sub",children:l})]})}function x(e){let{tone:n="info",children:a}=e;return(0,t.jsx)("div",{className:"callout callout-".concat(n),children:a})}function v(e){let{on:n,onClick:a}=e;return(0,t.jsx)("button",{type:"button",className:"toggle".concat(n?" on":""),"aria-pressed":n,onClick:a,children:(0,t.jsx)("span",{className:"knob"})})}},6039:function(e,n,a){"use strict";function t(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}a.d(n,{Cf:function(){return s},Eh:function(){return r},FH:function(){return t},Q6:function(){return i},Sy:function(){return o}});let l={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let n=(null!=e?e:"").trim();if(!n)return"—";let a=n.toLowerCase();return l[a]?l[a]:a.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function r(e){if(!e)return"—";let n=new Date(e);return Number.isNaN(n.getTime())?String(e):n.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function o(e){if(!e)return"—";let n=new Date(e).getTime();if(Number.isNaN(n))return"—";let a=Math.max(0,Math.floor((Date.now()-n)/1e3));if(a<60)return"".concat(a,"s");let t=Math.floor(a/60);if(t<60)return"".concat(t,"m");let l=Math.floor(t/60);if(l<24)return"".concat(l,"h");let s=Math.floor(l/24);if(s<30)return"".concat(s,"d");let r=Math.floor(s/30);return r<12?"".concat(r,"mo"):"".concat(Math.floor(r/12),"y")}},257:function(e,n,a){"use strict";var t,l;e.exports=(null==(t=a.g.process)?void 0:t.env)&&"object"==typeof(null==(l=a.g.process)?void 0:l.env)?a.g.process:a(4227)},4227:function(e){!function(){var n={229:function(e){var n,a,t,l=e.exports={};function s(){throw Error("setTimeout has not been defined")}function r(){throw Error("clearTimeout has not been defined")}function i(e){if(n===setTimeout)return setTimeout(e,0);if((n===s||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(a){try{return n.call(null,e,0)}catch(a){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:s}catch(e){n=s}try{a="function"==typeof clearTimeout?clearTimeout:r}catch(e){a=r}}();var o=[],c=!1,d=-1;function u(){c&&t&&(c=!1,t.length?o=t.concat(o):d=-1,o.length&&m())}function m(){if(!c){var e=i(u);c=!0;for(var n=o.length;n;){for(t=o,o=[];++d1)for(var a=1;ae.href===t))||void 0===a?void 0:a.key)&&void 0!==n?n:"runs"}let u={runs:{count:e=>e.agents.length,accent:e=>e.agents.some(e=>"paused_for_input"===e.status)},repositories:{count:e=>e.projects.length},agents:{count:e=>e.agents.length},schedules:{count:e=>e.schedules.length},approvals:{count:e=>e.approvals.length},servers:{count:e=>e.hosts.length},activity:{count:e=>e.commands.length},shared:{count:e=>e.shared.context.length},claude:{count:e=>e.claudeSkills.length+e.claudeConnectors.length+e.claudePlugins.length,accent:e=>"done"!==e.claudeLogin.status}};function d(e){let{onSignOut:a,children:n}=e,d=(0,r.Q)(),h=c((0,l.usePathname)()),{setSection:m}=d;return(0,s.useEffect)(()=>{m(h)},[h,m]),(0,t.jsxs)("div",{className:"app",children:[(0,t.jsxs)("aside",{className:"sidebar",children:[(0,t.jsxs)("div",{className:"brand",children:[(0,t.jsx)("span",{className:"logo"}),"Claude Monitor"]}),i.map(e=>{var a,n,s;let l=u[e.key],r=null!==(n=null==l?void 0:l.count(d))&&void 0!==n?n:0,i=null!==(s=null==l?void 0:null===(a=l.accent)||void 0===a?void 0:a.call(l,d))&&void 0!==s&&s;return(0,t.jsxs)(o.default,{href:e.href,className:"nav-item".concat(h===e.key?" active":""),children:[(0,t.jsx)("span",{children:e.label}),(0,t.jsx)("span",{className:"count",style:i?{color:"var(--lw-warning-fg)"}:void 0,children:r||""})]},e.key)}),(0,t.jsx)("div",{className:"sidebar-spacer"}),(0,t.jsxs)("div",{className:"sidebar-foot",children:[(0,t.jsxs)("button",{className:"nav-item",onClick:d.refresh,title:"Refresh now",children:[(0,t.jsx)("span",{children:"Refresh"}),(0,t.jsx)("span",{className:"count",children:"↻"})]}),(0,t.jsx)("button",{className:"nav-item",onClick:a,title:"Sign out / change token",children:(0,t.jsx)("span",{children:"Sign out"})})]})]}),(0,t.jsxs)("main",{className:"main",children:[d.cmd.text&&(0,t.jsx)("p",{className:"banner ".concat(d.cmd.error?"err":"ok"),style:{marginTop:16},children:d.cmd.text}),d.lastError&&(0,t.jsx)("p",{className:"banner err",style:{marginTop:12},children:d.lastError}),n]})]})}function h(e){let{error:a,onSubmit:n}=e,[l,r]=(0,s.useState)("");return(0,t.jsx)("div",{className:"gate",children:(0,t.jsxs)("form",{className:"gate-card",onSubmit:e=>{e.preventDefault();let a=l.trim();a&&n(a)},children:[(0,t.jsxs)("div",{className:"gate-brand",children:[(0,t.jsx)("span",{className:"logo",style:{width:26,height:26,borderRadius:7}}),"Claude Monitor"]}),(0,t.jsx)("p",{className:"muted",style:{fontSize:"var(--text-sm)",margin:0},children:"Paste your API token to continue. Management actions require the admin token; read-only views work with the plain auth token."}),(0,t.jsx)("input",{className:"input",type:"password",autoComplete:"current-password",placeholder:"API token",value:l,onChange:e=>r(e.target.value),autoFocus:!0}),a&&(0,t.jsx)("p",{className:"callout callout-danger",style:{margin:0},children:a}),(0,t.jsx)("button",{className:"btn btn-primary",type:"submit",children:"Continue"})]})})}let m="handler_token";function p(e){let{children:a}=e,[n,o]=(0,s.useState)(null),[i,u]=(0,s.useState)(""),p=(0,l.usePathname)();(0,s.useEffect)(()=>{let e=window.localStorage.getItem(m);e&&o(e)},[]);let g=(0,s.useCallback)(e=>{window.localStorage.setItem(m,e),u(""),o(e)},[]),v=(0,s.useCallback)(()=>{window.localStorage.removeItem(m),o(null)},[]),f=(0,s.useCallback)(()=>{window.localStorage.removeItem(m),o(null),u("Invalid token — please try again.")},[]);return n?(0,t.jsx)(r._,{token:n,onUnauthorized:f,initialSection:c(p),children:(0,t.jsx)(d,{onSignOut:v,children:a})}):(0,t.jsx)(h,{error:i,onSubmit:g})}},7960:function(){}},function(e){e.O(0,[587,258,171,971,117,744],function(){return e(e.s=3471)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/src/handler/api/static/_next/static/chunks/app/layout-cdc070e22a7fa32c.js b/src/handler/api/static/_next/static/chunks/app/layout-cdc070e22a7fa32c.js
deleted file mode 100644
index e99885d..0000000
--- a/src/handler/api/static/_next/static/chunks/app/layout-cdc070e22a7fa32c.js
+++ /dev/null
@@ -1 +0,0 @@
-(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{1072:function(e,n,s){Promise.resolve().then(s.t.bind(s,7960,23)),Promise.resolve().then(s.bind(s,5520))},5520:function(e,n,s){"use strict";s.d(n,{AppFrame:function(){return p}});var t=s(7437),a=s(2265),l=s(9376),r=s(171),o=s(7648);let i=[{key:"runs",href:"/",label:"Runs"},{key:"repositories",href:"/repositories",label:"Repositories"},{key:"agents",href:"/agents",label:"Agents"},{key:"schedules",href:"/schedules",label:"Schedules"},{key:"approvals",href:"/approvals",label:"Approvals"},{key:"servers",href:"/servers",label:"Git Servers"},{key:"activity",href:"/activity",label:"Activity"},{key:"shared",href:"/shared",label:"Shared"},{key:"login",href:"/login",label:"Claude Login"}];function c(e){var n,s;let t=e.replace(/\/+$/,"")||"/";return null!==(s=null===(n=i.find(e=>e.href===t))||void 0===n?void 0:n.key)&&void 0!==s?s:"runs"}let u={runs:{count:e=>e.agents.length,accent:e=>e.agents.some(e=>"paused_for_input"===e.status)},repositories:{count:e=>e.projects.length},agents:{count:e=>e.agents.length},schedules:{count:e=>e.schedules.length},approvals:{count:e=>e.approvals.length},servers:{count:e=>e.hosts.length},activity:{count:e=>e.commands.length},shared:{count:e=>e.shared.context.length},login:{count:()=>0,accent:e=>"done"!==e.claudeLogin.status}};function d(e){let{onSignOut:n,children:s}=e,d=(0,r.Q)(),h=c((0,l.usePathname)()),{setSection:m}=d;return(0,a.useEffect)(()=>{m(h)},[h,m]),(0,t.jsxs)("div",{className:"app",children:[(0,t.jsxs)("aside",{className:"sidebar",children:[(0,t.jsxs)("div",{className:"brand",children:[(0,t.jsx)("span",{className:"logo"}),"Claude Monitor"]}),i.map(e=>{var n,s,a;let l=u[e.key],r=null!==(s=null==l?void 0:l.count(d))&&void 0!==s?s:0,i=null!==(a=null==l?void 0:null===(n=l.accent)||void 0===n?void 0:n.call(l,d))&&void 0!==a&&a;return(0,t.jsxs)(o.default,{href:e.href,className:"nav-item".concat(h===e.key?" active":""),children:[(0,t.jsx)("span",{children:e.label}),(0,t.jsx)("span",{className:"count",style:i?{color:"var(--lw-warning-fg)"}:void 0,children:r||""})]},e.key)}),(0,t.jsx)("div",{className:"sidebar-spacer"}),(0,t.jsxs)("div",{className:"sidebar-foot",children:[(0,t.jsxs)("button",{className:"nav-item",onClick:d.refresh,title:"Refresh now",children:[(0,t.jsx)("span",{children:"Refresh"}),(0,t.jsx)("span",{className:"count",children:"↻"})]}),(0,t.jsx)("button",{className:"nav-item",onClick:n,title:"Sign out / change token",children:(0,t.jsx)("span",{children:"Sign out"})})]})]}),(0,t.jsxs)("main",{className:"main",children:[d.cmd.text&&(0,t.jsx)("p",{className:"banner ".concat(d.cmd.error?"err":"ok"),style:{marginTop:16},children:d.cmd.text}),d.lastError&&(0,t.jsx)("p",{className:"banner err",style:{marginTop:12},children:d.lastError}),s]})]})}function h(e){let{error:n,onSubmit:s}=e,[l,r]=(0,a.useState)("");return(0,t.jsx)("div",{className:"gate",children:(0,t.jsxs)("form",{className:"gate-card",onSubmit:e=>{e.preventDefault();let n=l.trim();n&&s(n)},children:[(0,t.jsxs)("div",{className:"gate-brand",children:[(0,t.jsx)("span",{className:"logo",style:{width:26,height:26,borderRadius:7}}),"Claude Monitor"]}),(0,t.jsx)("p",{className:"muted",style:{fontSize:"var(--text-sm)",margin:0},children:"Paste your API token to continue. Management actions require the admin token; read-only views work with the plain auth token."}),(0,t.jsx)("input",{className:"input",type:"password",autoComplete:"current-password",placeholder:"API token",value:l,onChange:e=>r(e.target.value),autoFocus:!0}),n&&(0,t.jsx)("p",{className:"callout callout-danger",style:{margin:0},children:n}),(0,t.jsx)("button",{className:"btn btn-primary",type:"submit",children:"Continue"})]})})}let m="handler_token";function p(e){let{children:n}=e,[s,o]=(0,a.useState)(null),[i,u]=(0,a.useState)(""),p=(0,l.usePathname)();(0,a.useEffect)(()=>{let e=window.localStorage.getItem(m);e&&o(e)},[]);let v=(0,a.useCallback)(e=>{window.localStorage.setItem(m,e),u(""),o(e)},[]),g=(0,a.useCallback)(()=>{window.localStorage.removeItem(m),o(null)},[]),f=(0,a.useCallback)(()=>{window.localStorage.removeItem(m),o(null),u("Invalid token — please try again.")},[]);return s?(0,t.jsx)(r._,{token:s,onUnauthorized:f,initialSection:c(p),children:(0,t.jsx)(d,{onSignOut:g,children:n})}):(0,t.jsx)(h,{error:i,onSubmit:v})}},7960:function(){}},function(e){e.O(0,[587,258,171,971,117,744],function(){return e(e.s=1072)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/src/handler/api/static/_next/static/chunks/app/login/page-2f7fdd148631e2b5.js b/src/handler/api/static/_next/static/chunks/app/login/page-2f7fdd148631e2b5.js
deleted file mode 100644
index 9254fd1..0000000
--- a/src/handler/api/static/_next/static/chunks/app/login/page-2f7fdd148631e2b5.js
+++ /dev/null
@@ -1 +0,0 @@
-(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[626],{7004:function(e,n,t){Promise.resolve().then(t.bind(t,9347))},9347:function(e,n,t){"use strict";t.r(n),t.d(n,{default:function(){return l}});var r=t(7437),i=t(2265),a=t(171),c=t(8280);function o(e){let n=window.screenX+Math.max(0,(window.outerWidth-520)/2),t=window.screenY+Math.max(0,(window.outerHeight-760)/2);return window.open(e,"claude-login","popup=yes,width=".concat(520,",height=").concat(760,",left=").concat(Math.round(n),",top=").concat(Math.round(t)))}function s(){let e=(0,a.Q)(),{status:n,url:t,message:s}=e.claudeLogin,[l,u]=(0,i.useState)(""),d=(0,i.useRef)(null),f="starting"===n||"submitting"===n,h="awaiting"===n||"submitting"===n;(0,i.useEffect)(()=>{if("awaiting"===n&&t&&d.current&&!d.current.closed)try{d.current.location.href=t}catch(e){}if("done"===n||"error"===n){var e;null===(e=d.current)||void 0===e||e.close(),d.current=null}},[n,t]);let p=()=>{d.current=o("about:blank"),e.startClaudeLogin()},m=async()=>{await e.submitClaudeCode(l)&&u("")};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"section-head",children:[(0,r.jsx)("div",{className:"section-title",children:"Claude Login"}),(0,r.jsxs)("div",{className:"section-desc",children:["Log Claude Code in on the host so agents can run. This drives"," ",(0,r.jsx)("span",{className:"mono",children:"claude /login"})," in the control container and picks the Claude account with a subscription."]})]}),(0,r.jsxs)("div",{className:"section-body",style:{display:"flex",flexDirection:"column",gap:16},children:[s&&(0,r.jsx)(c.UW,{tone:"error"===n?"danger":"done"===n?"success":"info",children:s}),"done"===n?(0,r.jsx)("div",{children:(0,r.jsx)(c.zx,{variant:"secondary",onClick:e.resetClaudeLogin,children:"Log in again"})}):h?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(c.UW,{tone:"info",children:"A Claude sign-in window should have opened. Authorize there, copy the code Claude shows you, and paste it below. If the window didn't open (popups blocked), use the button."}),(0,r.jsxs)("div",{className:"hstack",style:{gap:10,flexWrap:"wrap"},children:[(0,r.jsx)(c.zx,{variant:"secondary",disabled:!t,onClick:()=>{t&&(d.current=o(t))},children:"Open Claude sign-in window ↗"}),t&&(0,r.jsx)("a",{className:"btn btn-ghost",href:t,target:"_blank",rel:"noopener noreferrer",children:"Open in a new tab"}),(0,r.jsx)(c.zx,{variant:"ghost",disabled:f,onClick:p,children:"Restart"})]}),(0,r.jsxs)("div",{className:"hstack",style:{gap:10,alignItems:"flex-end",flexWrap:"wrap"},children:[(0,r.jsx)("div",{style:{flex:"1 1 320px"},children:(0,r.jsx)(c.II,{label:"Authorization code",value:l,onChange:u,placeholder:"Paste the code from claude.com",disabled:"submitting"===n})}),(0,r.jsx)(c.zx,{variant:"primary",disabled:"submitting"===n||!l.trim(),onClick:m,children:"submitting"===n?"Submitting…":"Finish login"})]})]}):(0,r.jsxs)("div",{className:"hstack",style:{gap:10},children:[(0,r.jsx)(c.zx,{variant:"primary",disabled:f,onClick:p,children:"starting"===n?"Starting…":"Log in to Claude"}),"error"===n&&(0,r.jsx)(c.zx,{variant:"ghost",disabled:f,onClick:p,children:"Retry"})]})]})]})}function l(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(s,{})})}},8280:function(e,n,t){"use strict";t.d(n,{Ct:function(){return a},II:function(){return u},OE:function(){return c},Ph:function(){return f},UW:function(){return m},ZD:function(){return g},Zb:function(){return o},gx:function(){return d},kN:function(){return p},mQ:function(){return h},zx:function(){return s}});var r=t(7437),i=t(6039);function a(e){let{tone:n="neutral",pill:t=!1,dot:i=!1,children:a}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(n).concat(t?" pill":""),children:[i&&(0,r.jsx)("span",{className:"dot"}),a]})}function c(e){let{status:n}=e;return(0,r.jsx)(a,{tone:(0,i.FH)(n),children:(0,i.Cf)(n)})}function o(e){let{children:n,interactive:t=!1,onClick:i,className:a=""}=e;return(0,r.jsx)("div",{className:"card".concat(t?" interactive":""," ").concat(a).trim(),onClick:i,role:t?"button":void 0,tabIndex:t?0:void 0,children:n})}function s(e){let{variant:n="secondary",size:t="md",onClick:i,disabled:a,type:c="button",children:o}=e;return(0,r.jsx)("button",{type:c,className:"btn btn-".concat(n).concat("sm"===t?" btn-sm":""),onClick:i,disabled:a,children:o})}function l(e){let{label:n,children:t}=e;return(0,r.jsxs)("label",{className:"field",children:[n&&(0,r.jsx)("span",{className:"field-label",children:n}),t]})}function u(e){let{label:n,value:t,onChange:i,placeholder:a,type:c="text",disabled:o}=e;return(0,r.jsx)(l,{label:n,children:(0,r.jsx)("input",{className:"input",type:c,value:t,placeholder:a,disabled:o,onChange:e=>i(e.target.value)})})}function d(e){let{label:n,value:t,onChange:i,placeholder:a,rows:c=3}=e;return(0,r.jsx)(l,{label:n,children:(0,r.jsx)("textarea",{className:"textarea",value:t,rows:c,placeholder:a,onChange:e=>i(e.target.value)})})}function f(e){let{label:n,value:t,onChange:i,options:a}=e;return(0,r.jsx)(l,{label:n,children:(0,r.jsx)("select",{className:"select",value:t,onChange:e=>i(e.target.value),children:a.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function h(e){let{tabs:n,value:t,onChange:i}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:n.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":t===e.value,className:"tab".concat(t===e.value?" active":""),onClick:()=>i(e.value),children:e.label},e.value))})}function p(e){let{value:n,label:t,sub:i,accent:a=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(a?" accent":""),children:n}),(0,r.jsx)("div",{className:"stat-label",children:t}),i&&(0,r.jsx)("div",{className:"stat-sub",children:i})]})}function m(e){let{tone:n="info",children:t}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(n),children:t})}function g(e){let{on:n,onClick:t}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(n?" on":""),"aria-pressed":n,onClick:t,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,n,t){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}t.d(n,{Cf:function(){return a},Eh:function(){return c},FH:function(){return r},Q6:function(){return o},Sy:function(){return s}});let i={paused_for_input:"Needs input",not_applicable:"N/A"};function a(e){let n=(null!=e?e:"").trim();if(!n)return"—";let t=n.toLowerCase();return i[t]?i[t]:t.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function c(e){if(!e)return"—";let n=new Date(e);return Number.isNaN(n.getTime())?String(e):n.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function o(e){return e?e.slice(0,7):"—"}function s(e){if(!e)return"—";let n=new Date(e).getTime();if(Number.isNaN(n))return"—";let t=Math.max(0,Math.floor((Date.now()-n)/1e3));if(t<60)return"".concat(t,"s");let r=Math.floor(t/60);if(r<60)return"".concat(r,"m");let i=Math.floor(r/60);if(i<24)return"".concat(i,"h");let a=Math.floor(i/24);if(a<30)return"".concat(a,"d");let c=Math.floor(a/30);return c<12?"".concat(c,"mo"):"".concat(Math.floor(c/12),"y")}},257:function(e,n,t){"use strict";var r,i;e.exports=(null==(r=t.g.process)?void 0:r.env)&&"object"==typeof(null==(i=t.g.process)?void 0:i.env)?t.g.process:t(4227)},4227:function(e){!function(){var n={229:function(e){var n,t,r,i=e.exports={};function a(){throw Error("setTimeout has not been defined")}function c(){throw Error("clearTimeout has not been defined")}function o(e){if(n===setTimeout)return setTimeout(e,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(e){n=a}try{t="function"==typeof clearTimeout?clearTimeout:c}catch(e){t=c}}();var s=[],l=!1,u=-1;function d(){l&&r&&(l=!1,r.length?s=r.concat(s):u=-1,s.length&&f())}function f(){if(!l){var e=o(d);l=!0;for(var n=s.length;n;){for(r=s,s=[];++u1)for(var t=1;t{e.replace("/claude")},[e]),null}},9376:function(e,u,n){"use strict";var t=n(5475);n.o(t,"usePathname")&&n.d(u,{usePathname:function(){return t.usePathname}}),n.o(t,"useRouter")&&n.d(u,{useRouter:function(){return t.useRouter}})}},function(e){e.O(0,[971,117,744],function(){return e(e.s=6258)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/src/handler/api/static/_next/static/chunks/app/page-52e9c359249c3b73.js b/src/handler/api/static/_next/static/chunks/app/page-cf68f34e95b90a40.js
similarity index 98%
rename from src/handler/api/static/_next/static/chunks/app/page-52e9c359249c3b73.js
rename to src/handler/api/static/_next/static/chunks/app/page-cf68f34e95b90a40.js
index 5e32ecf..3e75a13 100644
--- a/src/handler/api/static/_next/static/chunks/app/page-52e9c359249c3b73.js
+++ b/src/handler/api/static/_next/static/chunks/app/page-cf68f34e95b90a40.js
@@ -1 +1 @@
-(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{3963:function(e,t,n){Promise.resolve().then(n.bind(n,3807))},3807:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return p}});var s=n(7437),r=n(2265),l=n(171),a=n(8280),i=n(6039);let c=[{value:"all",label:"All"},{value:"needs",label:"Needs Input"},{value:"working",label:"Working"},{value:"done",label:"Done"},{value:"crashed",label:"Crashed"}];function o(){let e=(0,l.Q)(),[t,n]=(0,r.useState)("all"),i=(0,r.useMemo)(()=>[...e.agents.filter(e=>{var n;return n=e.status,"all"===t||("needs"===t?"paused_for_input"===n:"working"===t?"working"===n||"running"===n:"done"===t?"done"===n||"completed"===n:"crashed"!==t||"crashed"===n||"blocked"===n)})].sort((e,t)=>e.created_at"paused_for_input"===e.status).length,p=e.agents.filter(e=>"working"===e.status||"running"===e.status).length;return(0,s.jsxs)("div",{className:"runs",children:[(0,s.jsx)("div",{className:"runs-stats",children:(0,s.jsxs)("div",{className:"stat-row",children:[(0,s.jsx)("div",{className:"stat-cell",children:(0,s.jsx)(a.kN,{value:e.agents.length,label:"Runs tracked"})}),(0,s.jsx)("div",{className:"stat-cell",children:(0,s.jsx)(a.kN,{value:x,label:"Needs input",accent:!0})}),(0,s.jsx)("div",{className:"stat-cell",children:(0,s.jsx)(a.kN,{value:p,label:"Working"})}),(0,s.jsx)("div",{className:"stat-cell",children:(0,s.jsx)(a.kN,{value:e.projects.length,label:"Repositories"})})]})}),(0,s.jsxs)("div",{className:"split",children:[(0,s.jsxs)("div",{className:"split-list",children:[(0,s.jsxs)("div",{className:"split-list-head",children:[(0,s.jsx)("div",{className:"section-title",style:{fontSize:"var(--text-lg)"},children:"Runs"}),(0,s.jsx)(a.mQ,{tabs:c,value:t,onChange:n})]}),(0,s.jsxs)("div",{className:"split-list-scroll",children:[0===i.length&&(0,s.jsx)(a.UW,{tone:"info",children:"No runs match this filter."}),i.map(t=>(0,s.jsx)(d,{agent:t,selected:(null==o?void 0:o.projectId)===t.project_id&&(null==o?void 0:o.name)===t.name,onSelect:()=>e.selectRun(t.project_id,t.name)},"".concat(t.project_id,"/").concat(t.name)))]})]}),(0,s.jsx)("div",{className:"split-detail",children:o?(0,s.jsx)(h,{}):(0,s.jsx)(u,{})})]})]})}function d(e){let{agent:t,selected:n,onSelect:r}=e;return(0,s.jsxs)("button",{className:"run-row".concat(n?" selected":""),onClick:r,children:[(0,s.jsxs)("div",{className:"run-row-top",children:[(0,s.jsx)("span",{className:"run-project",children:t.project_id}),(0,s.jsx)("span",{className:"faint mono",style:{fontSize:"var(--text-xs)"},children:(0,i.Sy)(t.created_at)})]}),(0,s.jsxs)("div",{className:"truncate muted",style:{fontSize:"var(--text-sm)"},children:[t.name,t.role?" \xb7 ".concat(t.role):""]}),(0,s.jsx)("div",{className:"hstack",style:{gap:8},children:(0,s.jsx)(a.OE,{status:t.status})})]})}function u(){return(0,s.jsx)("div",{style:{padding:"60px 32px",color:"var(--text-muted)"},children:"Select a run to see its checkmark, log, and any open question."})}function h(){var e;let t=(0,l.Q)(),n=t.selectedRun,c=t.agents.find(e=>e.project_id===n.projectId&&e.name===n.name),o=t.checkmark,[d,u]=(0,r.useState)(""),[h,p]=(0,r.useState)(!1),f=(null==c?void 0:c.status)==="paused_for_input",m=async e=>{if(!d.trim())return;p(!0);let n=await t.submitAnswer(d.trim(),e);p(!1),n&&u("")};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{style:{padding:"24px 28px",borderBottom:"1px solid var(--border-default)",display:"flex",flexDirection:"column",gap:10},children:[(0,s.jsxs)("div",{className:"hstack",children:[(0,s.jsx)("span",{style:{color:"var(--accent)",fontWeight:"var(--fw-bold)",fontSize:"var(--text-xl)"},children:n.projectId}),(0,s.jsx)("span",{className:"faint",children:"/"}),(0,s.jsx)("span",{style:{color:"var(--text-heading)",fontWeight:"var(--fw-semibold)",fontSize:"var(--text-lg)"},children:n.name}),(0,s.jsx)(a.OE,{status:null==c?void 0:c.status}),(null==c?void 0:c.role)&&(0,s.jsx)(a.Ct,{tone:"info",children:c.role}),(0,s.jsx)("span",{className:"spacer"}),(0,s.jsx)(a.zx,{size:"sm",variant:"secondary",onClick:()=>t.killAgent(n.projectId,n.name),children:"Kill"}),(0,s.jsx)(a.zx,{size:"sm",variant:"danger",onClick:()=>t.deleteAgent(n.projectId,n.name),children:"Delete row"})]}),(0,s.jsxs)("div",{className:"mono faint",style:{fontSize:"var(--text-xs)"},children:[null!==(e=null==c?void 0:c.working_dir)&&void 0!==e?e:"—"," \xb7 created ",(0,i.Eh)(null==c?void 0:c.created_at)]})]}),(0,s.jsxs)("div",{style:{padding:"20px 28px",display:"flex",flexDirection:"column",gap:16},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"eyebrow",style:{marginBottom:10},children:"Checkmark"}),t.checkmarkMissing&&(0,s.jsx)(a.UW,{tone:"info",children:"No checkpoint recorded yet."}),o&&!t.checkmarkMissing&&(0,s.jsxs)("dl",{className:"kv",children:[(0,s.jsx)("dt",{children:"Status"}),(0,s.jsx)("dd",{children:(0,s.jsx)(a.OE,{status:o.status})}),(0,s.jsx)("dt",{children:"Where it stopped"}),(0,s.jsx)("dd",{children:o.where_it_stopped||"—"}),(0,s.jsx)("dt",{children:"Open question"}),(0,s.jsx)("dd",{children:o.open_question||"—"}),(0,s.jsx)("dt",{children:"Next steps"}),(0,s.jsx)("dd",{children:o.next_steps&&o.next_steps.length>0?(0,s.jsx)("ul",{children:o.next_steps.map((e,t)=>(0,s.jsx)("li",{children:e},t))}):"—"}),(0,s.jsx)("dt",{children:"Tests"}),(0,s.jsxs)("dd",{className:"hstack",children:[(0,s.jsx)(a.Ct,{tone:(0,i.FH)(o.tests_status),children:o.tests_status}),(0,s.jsx)("span",{className:"faint mono",style:{fontSize:"var(--text-xs)"},children:o.tested_at?(0,i.Eh)(o.tested_at):""})]}),(0,s.jsx)("dt",{children:"Build"}),(0,s.jsxs)("dd",{className:"hstack",children:[(0,s.jsx)(a.Ct,{tone:(0,i.FH)(o.build_status),children:o.build_status}),(0,s.jsx)("span",{className:"faint mono",style:{fontSize:"var(--text-xs)"},children:o.built_at?(0,i.Eh)(o.built_at):""})]}),(0,s.jsx)("dt",{children:"Checkpoint at"}),(0,s.jsx)("dd",{className:"faint",children:(0,i.Eh)(o.checkpoint_at)})]})]}),f&&(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,s.jsx)("div",{className:"eyebrow",children:"Answer this question"}),(0,s.jsx)(a.UW,{tone:"danger",children:(null==o?void 0:o.open_question)||"(no question text on the checkmark)"}),(0,s.jsx)(a.gx,{value:d,onChange:u,rows:3,placeholder:"Your answer…"}),(0,s.jsxs)("div",{className:"hstack",children:[(0,s.jsx)(a.zx,{variant:"secondary",disabled:h||!d.trim(),onClick:()=>m(!1),children:"Answer"}),(0,s.jsx)(a.zx,{variant:"primary",disabled:h||!d.trim(),onClick:()=>m(!0),children:"Answer & Resume"})]})]}),(null==c?void 0:c.session_id)&&(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,s.jsxs)("div",{className:"eyebrow",children:["Run events",c.worker_id?(0,s.jsxs)("span",{className:"faint mono",style:{fontSize:"var(--text-xs)",marginLeft:8},children:["on ",c.worker_id]}):null]}),0===t.events.length?(0,s.jsx)("div",{className:"empty",children:"No events yet."}):(0,s.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6,maxHeight:420,overflow:"auto",padding:"10px 12px",background:"var(--surface-2, rgba(0,0,0,0.25))",borderRadius:6},children:t.events.map(e=>(0,s.jsx)(x,{e:e},e.id))})]}),(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,s.jsx)("div",{className:"eyebrow",children:"Log \xb7 newest first"}),0===t.log.length?(0,s.jsx)("div",{className:"empty",children:"No log entries."}):(0,s.jsx)("div",{className:"table-wrap",children:(0,s.jsxs)("table",{className:"tbl",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"When"}),(0,s.jsx)("th",{children:"Status"}),(0,s.jsx)("th",{children:"Summary"}),(0,s.jsx)("th",{children:"Q / A"}),(0,s.jsx)("th",{children:"Push"}),(0,s.jsx)("th",{children:"CI"})]})}),(0,s.jsx)("tbody",{children:t.log.map(e=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"faint nowrap",children:(0,i.Eh)(e.created_at)}),(0,s.jsx)("td",{children:(0,s.jsx)(a.OE,{status:e.status})}),(0,s.jsx)("td",{children:e.summary||"—"}),(0,s.jsxs)("td",{children:[e.question&&(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Q:"})," ",e.question]}),e.answer&&(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"A:"})," ",e.answer]}),!e.question&&!e.answer&&"—"]}),(0,s.jsx)("td",{className:"mono",children:(0,i.Q6)(e.push_sha)}),(0,s.jsx)("td",{children:(0,s.jsx)(a.Ct,{tone:(0,i.FH)(e.ci_status),children:e.ci_status})})]},e.id))})]})}),(0,s.jsxs)("div",{className:"pager",children:[(0,s.jsx)(a.zx,{size:"sm",variant:"ghost",disabled:0===t.logOffset,onClick:()=>t.pageLog(-1),children:"‹ Newer"}),(0,s.jsxs)("span",{className:"faint mono",style:{fontSize:"var(--text-xs)"},children:["offset ",t.logOffset]}),(0,s.jsx)(a.zx,{size:"sm",variant:"ghost",disabled:t.log.length<100,onClick:()=>t.pageLog(1),children:"Older ›"})]})]})]})]})}function x(e){var t,n,r,l;let{e:i}=e,c=null!==(t=i.payload)&&void 0!==t?t:{},o={fontSize:"var(--text-xs)"};if("system"===i.type)return(0,s.jsxs)("div",{className:"faint mono",style:o,children:["▸ session ",null!==(n=c.subtype)&&void 0!==n?n:"event",c.session_id?" \xb7 ".concat(String(c.session_id).slice(0,8)):"",Array.isArray(c.tools)?" \xb7 ".concat(c.tools.length," tools"):""]});if("assistant"===i.type){let e=null===(r=c.message)||void 0===r?void 0:r.content,t=Array.isArray(e)?e:[],n=t.filter(e=>(null==e?void 0:e.type)==="text"&&e.text).map(e=>e.text).join("\n"),l=t.filter(e=>(null==e?void 0:e.type)==="tool_use");return(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[n&&(0,s.jsx)("div",{style:{fontSize:"var(--text-sm)",whiteSpace:"pre-wrap"},children:n}),l.length>0&&(0,s.jsx)("div",{className:"hstack",style:{gap:6,flexWrap:"wrap"},children:l.map((e,t)=>(0,s.jsxs)(a.Ct,{tone:"info",children:[e.name,e.input?": ".concat(function(e){let t="string"==typeof e?e:(null==e?void 0:e.command)?String(e.command):JSON.stringify(e);return t.length>80?"".concat(t.slice(0,77),"…"):t}(e.input)):""]},t))})]})}if("result"===i.type){let e=!!c.is_error;return(0,s.jsxs)("div",{className:"hstack",style:{gap:8,flexWrap:"wrap"},children:[(0,s.jsx)(a.Ct,{tone:e?"danger":"success",children:e?"run errored":"run finished"}),(0,s.jsxs)("span",{className:"faint mono",style:o,children:[null!=c.num_turns?"".concat(c.num_turns," turns"):"",null!=c.total_cost_usd?" \xb7 $".concat(Number(c.total_cost_usd).toFixed(4)):""]}),"string"==typeof c.result&&c.result&&(0,s.jsx)("span",{className:"muted",style:{...o,whiteSpace:"pre-wrap",width:"100%"},children:c.result})]})}return"worker"===i.type?(0,s.jsxs)(a.UW,{tone:"danger",children:[null!==(l=c.notice)&&void 0!==l?l:"runner notice",c.stderr_tail?(0,s.jsx)("pre",{className:"mono",style:{...o,margin:"6px 0 0",whiteSpace:"pre-wrap"},children:c.stderr_tail}):null]}):"raw"===i.type?(0,s.jsx)("div",{className:"faint mono",style:{...o,whiteSpace:"pre-wrap"},children:"string"==typeof c.line?c.line.trimEnd():JSON.stringify(c)}):(0,s.jsxs)("div",{className:"faint mono",style:o,children:["▸ ",i.type]})}function p(){return(0,s.jsx)(o,{})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return l},II:function(){return d},OE:function(){return a},Ph:function(){return h},UW:function(){return f},ZD:function(){return m},Zb:function(){return i},gx:function(){return u},kN:function(){return p},mQ:function(){return x},zx:function(){return c}});var s=n(7437),r=n(6039);function l(e){let{tone:t="neutral",pill:n=!1,dot:r=!1,children:l}=e;return(0,s.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[r&&(0,s.jsx)("span",{className:"dot"}),l]})}function a(e){let{status:t}=e;return(0,s.jsx)(l,{tone:(0,r.FH)(t),children:(0,r.Cf)(t)})}function i(e){let{children:t,interactive:n=!1,onClick:r,className:l=""}=e;return(0,s.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(l).trim(),onClick:r,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function c(e){let{variant:t="secondary",size:n="md",onClick:r,disabled:l,type:a="button",children:i}=e;return(0,s.jsx)("button",{type:a,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:r,disabled:l,children:i})}function o(e){let{label:t,children:n}=e;return(0,s.jsxs)("label",{className:"field",children:[t&&(0,s.jsx)("span",{className:"field-label",children:t}),n]})}function d(e){let{label:t,value:n,onChange:r,placeholder:l,type:a="text",disabled:i}=e;return(0,s.jsx)(o,{label:t,children:(0,s.jsx)("input",{className:"input",type:a,value:n,placeholder:l,disabled:i,onChange:e=>r(e.target.value)})})}function u(e){let{label:t,value:n,onChange:r,placeholder:l,rows:a=3}=e;return(0,s.jsx)(o,{label:t,children:(0,s.jsx)("textarea",{className:"textarea",value:n,rows:a,placeholder:l,onChange:e=>r(e.target.value)})})}function h(e){let{label:t,value:n,onChange:r,options:l}=e;return(0,s.jsx)(o,{label:t,children:(0,s.jsx)("select",{className:"select",value:n,onChange:e=>r(e.target.value),children:l.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})})}function x(e){let{tabs:t,value:n,onChange:r}=e;return(0,s.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,s.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>r(e.value),children:e.label},e.value))})}function p(e){let{value:t,label:n,sub:r,accent:l=!1}=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"stat-value".concat(l?" accent":""),children:t}),(0,s.jsx)("div",{className:"stat-label",children:n}),r&&(0,s.jsx)("div",{className:"stat-sub",children:r})]})}function f(e){let{tone:t="info",children:n}=e;return(0,s.jsx)("div",{className:"callout callout-".concat(t),children:n})}function m(e){let{on:t,onClick:n}=e;return(0,s.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,s.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function s(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return l},Eh:function(){return a},FH:function(){return s},Q6:function(){return i},Sy:function(){return c}});let r={paused_for_input:"Needs input",not_applicable:"N/A"};function l(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return r[n]?r[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function a(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function c(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let s=Math.floor(n/60);if(s<60)return"".concat(s,"m");let r=Math.floor(s/60);if(r<24)return"".concat(r,"h");let l=Math.floor(r/24);if(l<30)return"".concat(l,"d");let a=Math.floor(l/30);return a<12?"".concat(a,"mo"):"".concat(Math.floor(a/12),"y")}},257:function(e,t,n){"use strict";var s,r;e.exports=(null==(s=n.g.process)?void 0:s.env)&&"object"==typeof(null==(r=n.g.process)?void 0:r.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,s,r=e.exports={};function l(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===l||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:l}catch(e){t=l}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c=[],o=!1,d=-1;function u(){o&&s&&(o=!1,s.length?c=s.concat(c):d=-1,c.length&&h())}function h(){if(!o){var e=i(u);o=!0;for(var t=c.length;t;){for(s=c,c=[];++d1)for(var n=1;n[...e.agents.filter(e=>{var n;return n=e.status,"all"===t||("needs"===t?"paused_for_input"===n:"working"===t?"working"===n||"running"===n:"done"===t?"done"===n||"completed"===n:"crashed"!==t||"crashed"===n||"blocked"===n)})].sort((e,t)=>e.created_at"paused_for_input"===e.status).length,p=e.agents.filter(e=>"working"===e.status||"running"===e.status).length;return(0,s.jsxs)("div",{className:"runs",children:[(0,s.jsx)("div",{className:"runs-stats",children:(0,s.jsxs)("div",{className:"stat-row",children:[(0,s.jsx)("div",{className:"stat-cell",children:(0,s.jsx)(a.kN,{value:e.agents.length,label:"Runs tracked"})}),(0,s.jsx)("div",{className:"stat-cell",children:(0,s.jsx)(a.kN,{value:x,label:"Needs input",accent:!0})}),(0,s.jsx)("div",{className:"stat-cell",children:(0,s.jsx)(a.kN,{value:p,label:"Working"})}),(0,s.jsx)("div",{className:"stat-cell",children:(0,s.jsx)(a.kN,{value:e.projects.length,label:"Repositories"})})]})}),(0,s.jsxs)("div",{className:"split",children:[(0,s.jsxs)("div",{className:"split-list",children:[(0,s.jsxs)("div",{className:"split-list-head",children:[(0,s.jsx)("div",{className:"section-title",style:{fontSize:"var(--text-lg)"},children:"Runs"}),(0,s.jsx)(a.mQ,{tabs:c,value:t,onChange:n})]}),(0,s.jsxs)("div",{className:"split-list-scroll",children:[0===i.length&&(0,s.jsx)(a.UW,{tone:"info",children:"No runs match this filter."}),i.map(t=>(0,s.jsx)(d,{agent:t,selected:(null==o?void 0:o.projectId)===t.project_id&&(null==o?void 0:o.name)===t.name,onSelect:()=>e.selectRun(t.project_id,t.name)},"".concat(t.project_id,"/").concat(t.name)))]})]}),(0,s.jsx)("div",{className:"split-detail",children:o?(0,s.jsx)(h,{}):(0,s.jsx)(u,{})})]})]})}function d(e){let{agent:t,selected:n,onSelect:r}=e;return(0,s.jsxs)("button",{className:"run-row".concat(n?" selected":""),onClick:r,children:[(0,s.jsxs)("div",{className:"run-row-top",children:[(0,s.jsx)("span",{className:"run-project",children:t.project_id}),(0,s.jsx)("span",{className:"faint mono",style:{fontSize:"var(--text-xs)"},children:(0,i.Sy)(t.created_at)})]}),(0,s.jsxs)("div",{className:"truncate muted",style:{fontSize:"var(--text-sm)"},children:[t.name,t.role?" \xb7 ".concat(t.role):""]}),(0,s.jsx)("div",{className:"hstack",style:{gap:8},children:(0,s.jsx)(a.OE,{status:t.status})})]})}function u(){return(0,s.jsx)("div",{style:{padding:"60px 32px",color:"var(--text-muted)"},children:"Select a run to see its checkmark, log, and any open question."})}function h(){var e;let t=(0,l.Q)(),n=t.selectedRun,c=t.agents.find(e=>e.project_id===n.projectId&&e.name===n.name),o=t.checkmark,[d,u]=(0,r.useState)(""),[h,p]=(0,r.useState)(!1),f=(null==c?void 0:c.status)==="paused_for_input",m=async e=>{if(!d.trim())return;p(!0);let n=await t.submitAnswer(d.trim(),e);p(!1),n&&u("")};return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsxs)("div",{style:{padding:"24px 28px",borderBottom:"1px solid var(--border-default)",display:"flex",flexDirection:"column",gap:10},children:[(0,s.jsxs)("div",{className:"hstack",children:[(0,s.jsx)("span",{style:{color:"var(--accent)",fontWeight:"var(--fw-bold)",fontSize:"var(--text-xl)"},children:n.projectId}),(0,s.jsx)("span",{className:"faint",children:"/"}),(0,s.jsx)("span",{style:{color:"var(--text-heading)",fontWeight:"var(--fw-semibold)",fontSize:"var(--text-lg)"},children:n.name}),(0,s.jsx)(a.OE,{status:null==c?void 0:c.status}),(null==c?void 0:c.role)&&(0,s.jsx)(a.Ct,{tone:"info",children:c.role}),(0,s.jsx)("span",{className:"spacer"}),(0,s.jsx)(a.zx,{size:"sm",variant:"secondary",onClick:()=>t.killAgent(n.projectId,n.name),children:"Kill"}),(0,s.jsx)(a.zx,{size:"sm",variant:"danger",onClick:()=>t.deleteAgent(n.projectId,n.name),children:"Delete row"})]}),(0,s.jsxs)("div",{className:"mono faint",style:{fontSize:"var(--text-xs)"},children:[null!==(e=null==c?void 0:c.working_dir)&&void 0!==e?e:"—"," \xb7 created ",(0,i.Eh)(null==c?void 0:c.created_at)]})]}),(0,s.jsxs)("div",{style:{padding:"20px 28px",display:"flex",flexDirection:"column",gap:16},children:[(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"eyebrow",style:{marginBottom:10},children:"Checkmark"}),t.checkmarkMissing&&(0,s.jsx)(a.UW,{tone:"info",children:"No checkpoint recorded yet."}),o&&!t.checkmarkMissing&&(0,s.jsxs)("dl",{className:"kv",children:[(0,s.jsx)("dt",{children:"Status"}),(0,s.jsx)("dd",{children:(0,s.jsx)(a.OE,{status:o.status})}),(0,s.jsx)("dt",{children:"Where it stopped"}),(0,s.jsx)("dd",{children:o.where_it_stopped||"—"}),(0,s.jsx)("dt",{children:"Open question"}),(0,s.jsx)("dd",{children:o.open_question||"—"}),(0,s.jsx)("dt",{children:"Next steps"}),(0,s.jsx)("dd",{children:o.next_steps&&o.next_steps.length>0?(0,s.jsx)("ul",{children:o.next_steps.map((e,t)=>(0,s.jsx)("li",{children:e},t))}):"—"}),(0,s.jsx)("dt",{children:"Tests"}),(0,s.jsxs)("dd",{className:"hstack",children:[(0,s.jsx)(a.Ct,{tone:(0,i.FH)(o.tests_status),children:o.tests_status}),(0,s.jsx)("span",{className:"faint mono",style:{fontSize:"var(--text-xs)"},children:o.tested_at?(0,i.Eh)(o.tested_at):""})]}),(0,s.jsx)("dt",{children:"Build"}),(0,s.jsxs)("dd",{className:"hstack",children:[(0,s.jsx)(a.Ct,{tone:(0,i.FH)(o.build_status),children:o.build_status}),(0,s.jsx)("span",{className:"faint mono",style:{fontSize:"var(--text-xs)"},children:o.built_at?(0,i.Eh)(o.built_at):""})]}),(0,s.jsx)("dt",{children:"Checkpoint at"}),(0,s.jsx)("dd",{className:"faint",children:(0,i.Eh)(o.checkpoint_at)})]})]}),f&&(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,s.jsx)("div",{className:"eyebrow",children:"Answer this question"}),(0,s.jsx)(a.UW,{tone:"danger",children:(null==o?void 0:o.open_question)||"(no question text on the checkmark)"}),(0,s.jsx)(a.gx,{value:d,onChange:u,rows:3,placeholder:"Your answer…"}),(0,s.jsxs)("div",{className:"hstack",children:[(0,s.jsx)(a.zx,{variant:"secondary",disabled:h||!d.trim(),onClick:()=>m(!1),children:"Answer"}),(0,s.jsx)(a.zx,{variant:"primary",disabled:h||!d.trim(),onClick:()=>m(!0),children:"Answer & Resume"})]})]}),(null==c?void 0:c.session_id)&&(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,s.jsxs)("div",{className:"eyebrow",children:["Run events",c.worker_id?(0,s.jsxs)("span",{className:"faint mono",style:{fontSize:"var(--text-xs)",marginLeft:8},children:["on ",c.worker_id]}):null]}),0===t.events.length?(0,s.jsx)("div",{className:"empty",children:"No events yet."}):(0,s.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:6,maxHeight:420,overflow:"auto",padding:"10px 12px",background:"var(--surface-2, rgba(0,0,0,0.25))",borderRadius:6},children:t.events.map(e=>(0,s.jsx)(x,{e:e},e.id))})]}),(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:[(0,s.jsx)("div",{className:"eyebrow",children:"Log \xb7 newest first"}),0===t.log.length?(0,s.jsx)("div",{className:"empty",children:"No log entries."}):(0,s.jsx)("div",{className:"table-wrap",children:(0,s.jsxs)("table",{className:"tbl",children:[(0,s.jsx)("thead",{children:(0,s.jsxs)("tr",{children:[(0,s.jsx)("th",{children:"When"}),(0,s.jsx)("th",{children:"Status"}),(0,s.jsx)("th",{children:"Summary"}),(0,s.jsx)("th",{children:"Q / A"}),(0,s.jsx)("th",{children:"Push"}),(0,s.jsx)("th",{children:"CI"})]})}),(0,s.jsx)("tbody",{children:t.log.map(e=>(0,s.jsxs)("tr",{children:[(0,s.jsx)("td",{className:"faint nowrap",children:(0,i.Eh)(e.created_at)}),(0,s.jsx)("td",{children:(0,s.jsx)(a.OE,{status:e.status})}),(0,s.jsx)("td",{children:e.summary||"—"}),(0,s.jsxs)("td",{children:[e.question&&(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"Q:"})," ",e.question]}),e.answer&&(0,s.jsxs)("div",{children:[(0,s.jsx)("strong",{children:"A:"})," ",e.answer]}),!e.question&&!e.answer&&"—"]}),(0,s.jsx)("td",{className:"mono",children:(0,i.Q6)(e.push_sha)}),(0,s.jsx)("td",{children:(0,s.jsx)(a.Ct,{tone:(0,i.FH)(e.ci_status),children:e.ci_status})})]},e.id))})]})}),(0,s.jsxs)("div",{className:"pager",children:[(0,s.jsx)(a.zx,{size:"sm",variant:"ghost",disabled:0===t.logOffset,onClick:()=>t.pageLog(-1),children:"‹ Newer"}),(0,s.jsxs)("span",{className:"faint mono",style:{fontSize:"var(--text-xs)"},children:["offset ",t.logOffset]}),(0,s.jsx)(a.zx,{size:"sm",variant:"ghost",disabled:t.log.length<100,onClick:()=>t.pageLog(1),children:"Older ›"})]})]})]})]})}function x(e){var t,n,r,l;let{e:i}=e,c=null!==(t=i.payload)&&void 0!==t?t:{},o={fontSize:"var(--text-xs)"};if("system"===i.type)return(0,s.jsxs)("div",{className:"faint mono",style:o,children:["▸ session ",null!==(n=c.subtype)&&void 0!==n?n:"event",c.session_id?" \xb7 ".concat(String(c.session_id).slice(0,8)):"",Array.isArray(c.tools)?" \xb7 ".concat(c.tools.length," tools"):""]});if("assistant"===i.type){let e=null===(r=c.message)||void 0===r?void 0:r.content,t=Array.isArray(e)?e:[],n=t.filter(e=>(null==e?void 0:e.type)==="text"&&e.text).map(e=>e.text).join("\n"),l=t.filter(e=>(null==e?void 0:e.type)==="tool_use");return(0,s.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[n&&(0,s.jsx)("div",{style:{fontSize:"var(--text-sm)",whiteSpace:"pre-wrap"},children:n}),l.length>0&&(0,s.jsx)("div",{className:"hstack",style:{gap:6,flexWrap:"wrap"},children:l.map((e,t)=>(0,s.jsxs)(a.Ct,{tone:"info",children:[e.name,e.input?": ".concat(function(e){let t="string"==typeof e?e:(null==e?void 0:e.command)?String(e.command):JSON.stringify(e);return t.length>80?"".concat(t.slice(0,77),"…"):t}(e.input)):""]},t))})]})}if("result"===i.type){let e=!!c.is_error;return(0,s.jsxs)("div",{className:"hstack",style:{gap:8,flexWrap:"wrap"},children:[(0,s.jsx)(a.Ct,{tone:e?"danger":"success",children:e?"run errored":"run finished"}),(0,s.jsxs)("span",{className:"faint mono",style:o,children:[null!=c.num_turns?"".concat(c.num_turns," turns"):"",null!=c.total_cost_usd?" \xb7 $".concat(Number(c.total_cost_usd).toFixed(4)):""]}),"string"==typeof c.result&&c.result&&(0,s.jsx)("span",{className:"muted",style:{...o,whiteSpace:"pre-wrap",width:"100%"},children:c.result})]})}return"worker"===i.type?(0,s.jsxs)(a.UW,{tone:"danger",children:[null!==(l=c.notice)&&void 0!==l?l:"runner notice",c.stderr_tail?(0,s.jsx)("pre",{className:"mono",style:{...o,margin:"6px 0 0",whiteSpace:"pre-wrap"},children:c.stderr_tail}):null]}):"raw"===i.type?(0,s.jsx)("div",{className:"faint mono",style:{...o,whiteSpace:"pre-wrap"},children:"string"==typeof c.line?c.line.trimEnd():JSON.stringify(c)}):(0,s.jsxs)("div",{className:"faint mono",style:o,children:["▸ ",i.type]})}function p(){return(0,s.jsx)(o,{})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return l},II:function(){return d},OE:function(){return a},Ph:function(){return h},UW:function(){return f},ZD:function(){return m},Zb:function(){return i},gx:function(){return u},kN:function(){return p},mQ:function(){return x},zx:function(){return c}});var s=n(7437),r=n(6039);function l(e){let{tone:t="neutral",pill:n=!1,dot:r=!1,children:l}=e;return(0,s.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[r&&(0,s.jsx)("span",{className:"dot"}),l]})}function a(e){let{status:t}=e;return(0,s.jsx)(l,{tone:(0,r.FH)(t),children:(0,r.Cf)(t)})}function i(e){let{children:t,interactive:n=!1,onClick:r,className:l=""}=e;return(0,s.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(l).trim(),onClick:r,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function c(e){let{variant:t="secondary",size:n="md",onClick:r,disabled:l,type:a="button",children:i}=e;return(0,s.jsx)("button",{type:a,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:r,disabled:l,children:i})}function o(e){let{label:t,children:n}=e;return(0,s.jsxs)("label",{className:"field",children:[t&&(0,s.jsx)("span",{className:"field-label",children:t}),n]})}function d(e){let{label:t,value:n,onChange:r,placeholder:l,type:a="text",disabled:i}=e;return(0,s.jsx)(o,{label:t,children:(0,s.jsx)("input",{className:"input",type:a,value:n,placeholder:l,disabled:i,onChange:e=>r(e.target.value)})})}function u(e){let{label:t,value:n,onChange:r,placeholder:l,rows:a=3}=e;return(0,s.jsx)(o,{label:t,children:(0,s.jsx)("textarea",{className:"textarea",value:n,rows:a,placeholder:l,onChange:e=>r(e.target.value)})})}function h(e){let{label:t,value:n,onChange:r,options:l}=e;return(0,s.jsx)(o,{label:t,children:(0,s.jsx)("select",{className:"select",value:n,onChange:e=>r(e.target.value),children:l.map(e=>(0,s.jsx)("option",{value:e.value,children:e.label},e.value))})})}function x(e){let{tabs:t,value:n,onChange:r}=e;return(0,s.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,s.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>r(e.value),children:e.label},e.value))})}function p(e){let{value:t,label:n,sub:r,accent:l=!1}=e;return(0,s.jsxs)("div",{children:[(0,s.jsx)("div",{className:"stat-value".concat(l?" accent":""),children:t}),(0,s.jsx)("div",{className:"stat-label",children:n}),r&&(0,s.jsx)("div",{className:"stat-sub",children:r})]})}function f(e){let{tone:t="info",children:n}=e;return(0,s.jsx)("div",{className:"callout callout-".concat(t),children:n})}function m(e){let{on:t,onClick:n}=e;return(0,s.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,s.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function s(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return l},Eh:function(){return a},FH:function(){return s},Q6:function(){return i},Sy:function(){return c}});let r={paused_for_input:"Needs input",not_applicable:"N/A"};function l(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return r[n]?r[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function a(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function c(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let s=Math.floor(n/60);if(s<60)return"".concat(s,"m");let r=Math.floor(s/60);if(r<24)return"".concat(r,"h");let l=Math.floor(r/24);if(l<30)return"".concat(l,"d");let a=Math.floor(l/30);return a<12?"".concat(a,"mo"):"".concat(Math.floor(a/12),"y")}},257:function(e,t,n){"use strict";var s,r;e.exports=(null==(s=n.g.process)?void 0:s.env)&&"object"==typeof(null==(r=n.g.process)?void 0:r.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,s,r=e.exports={};function l(){throw Error("setTimeout has not been defined")}function a(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===l||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:l}catch(e){t=l}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var c=[],o=!1,d=-1;function u(){o&&s&&(o=!1,s.length?c=s.concat(c):d=-1,c.length&&h())}function h(){if(!o){var e=i(u);o=!0;for(var t=c.length;t;){for(s=c,c=[];++d1)for(var n=1;n{var t;let n=new Map;for(let r of e.agents)n.set(r.project_id,(null!==(t=n.get(r.project_id))&&void 0!==t?t:0)+1);return n},[e.agents]),h=(0,a.useMemo)(()=>[{value:"",label:e.hosts.length?"Pick a git server…":"No git servers configured"},...e.hosts.map(e=>({value:e.hostname,label:"".concat(e.hostname," (").concat(e.forge_type,")")}))],[e.hosts]),m=()=>{n(l),u(!1)},f=async()=>{(c?await e.updateProject(t.id,t):await e.createProject(t))&&m()},p=e=>{var t,r;n({...l,mode:"manual",id:e.id,root_dir:e.root_dir,git_remote:null!==(t=e.git_remote)&&void 0!==t?t:"",credential_ref:null!==(r=e.credential_ref)&&void 0!==r?r:""}),u(!0)},v=c?!!t.root_dir.trim():"server"===t.mode?!!t.git_server&&/^[\w.-]+\/[\w.-]+$/.test(t.repo.trim()):!!t.id.trim()&&!!t.root_dir.trim();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"section-head",children:[(0,r.jsx)("div",{className:"section-title",children:"Repositories"}),(0,r.jsx)("div",{className:"section-desc",children:"Repos Handler manages. Each carries its own agents, history, and credentials."})]}),(0,r.jsxs)("div",{className:"section-body",children:[(0,r.jsxs)(i.Zb,{children:[(0,r.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,r.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:c?"Edit repository \xb7 ".concat(t.id):"Add a repository"})}),!c&&(0,r.jsx)("div",{style:{marginBottom:14},children:(0,r.jsx)(i.mQ,{tabs:[{value:"server",label:"From a git server"},{value:"manual",label:"Manual (existing checkout)"}],value:t.mode,onChange:e=>n({...t,mode:e})})}),c||"server"!==t.mode?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"form-grid",children:[(0,r.jsx)(i.II,{label:"ID / slug",value:t.id,onChange:e=>n({...t,id:e}),placeholder:"leeworks-api",disabled:c}),(0,r.jsx)(i.II,{label:"Root dir",value:t.root_dir,onChange:e=>n({...t,root_dir:e}),placeholder:"/var/lib/handler/projects/leeworks"}),(0,r.jsx)(i.II,{label:"Git remote",value:t.git_remote,onChange:e=>n({...t,git_remote:e}),placeholder:"git@github.com:user/repo.git (optional)"}),(0,r.jsx)(i.II,{label:"Credential ref",value:t.credential_ref,onChange:e=>n({...t,credential_ref:e}),placeholder:"env:VAR / file:/path / db:host:github.com"})]}),(0,r.jsx)("p",{className:"faint",style:{fontSize:"var(--text-xs)",margin:"10px 0 0"},children:"Optional override — projects on a configured git server use its stored token automatically. credential_ref is a pointer, never the token (env: / file: / db:host:)."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"form-grid",children:[(0,r.jsx)(i.Ph,{label:"Git server",value:t.git_server,onChange:e=>n({...t,git_server:e}),options:h}),(0,r.jsx)(i.II,{label:"Repository (owner/name)",value:t.repo,onChange:e=>n({...t,repo:e}),placeholder:"me/coolproj"}),(0,r.jsx)(i.II,{label:"ID / slug (optional — defaults to the repo name)",value:t.id,onChange:e=>n({...t,id:e}),placeholder:"coolproj"})]}),(0,r.jsx)("p",{className:"faint",style:{fontSize:"var(--text-xs)",margin:"10px 0 0"},children:"The repo is always pulled: Handler derives the remote from the server (ssh when it has a deploy key, https via the stored token otherwise), clones it under PROJECTS_ROOT, and keeps it fresh before every run."})]}),!c&&(0,r.jsxs)("label",{className:"hstack",style:{gap:8,cursor:"pointer",marginTop:14},children:[(0,r.jsx)("input",{type:"checkbox",checked:t.init_mise,onChange:e=>n({...t,init_mise:e.target.checked})}),(0,r.jsxs)("span",{style:{fontSize:"var(--text-sm)"},children:["Initialize mise — after the clone, run an agent that writes a"," ",(0,r.jsx)("span",{className:"mono",children:".mise.toml"})," with a"," ",(0,r.jsx)("span",{className:"mono",children:"[tasks.test]"})," task for this repo’s stack, then commits and pushes it. Needed for repos that don’t define one yet."]})]}),!c&&t.init_mise&&"manual"===t.mode&&!t.git_remote.trim()&&(0,r.jsxs)("p",{className:"faint",style:{fontSize:"var(--text-xs)",margin:"6px 0 0"},children:["A git remote is required to push the new ",(0,r.jsx)("span",{className:"mono",children:".mise.toml"})," — add one above, or mise won’t be initialized."]}),(0,r.jsxs)("div",{className:"hstack mt14",children:[(0,r.jsx)(i.zx,{variant:"primary",disabled:e.cmd.busy||!v,onClick:f,children:c?"Save changes":"server"===t.mode?"Add & pull":"Register"}),c&&(0,r.jsx)(i.zx,{variant:"ghost",onClick:m,children:"Cancel"})]})]}),0===e.projects.length&&(0,r.jsx)("div",{className:"empty",children:"No repositories registered."}),e.projects.map(t=>{var n,a;return(0,r.jsxs)(i.Zb,{children:[(0,r.jsxs)("div",{className:"card-head",children:[(0,r.jsx)("span",{className:"card-title",children:t.id}),(0,r.jsxs)(i.Ct,{tone:"info",pill:!0,children:[null!==(n=d.get(t.id))&&void 0!==n?n:0," ",(null!==(a=d.get(t.id))&&void 0!==a?a:0)===1?"agent":"agents"]})]}),(0,r.jsxs)("div",{className:"mono faint",style:{fontSize:"var(--text-xs)",marginTop:4},children:[t.root_dir,t.git_remote?" \xb7 ".concat(t.git_remote):""]}),(0,r.jsxs)("div",{className:"hstack",style:{marginTop:12,justifyContent:"space-between"},children:[(0,r.jsxs)("span",{className:"faint mono",style:{fontSize:"var(--text-xs)"},children:["cred ",t.credential_ref||"server default"," \xb7 added ",(0,o.Eh)(t.created_at)]}),(0,r.jsxs)("div",{className:"hstack",children:[t.git_remote&&(0,r.jsx)(i.zx,{size:"sm",variant:"secondary",onClick:()=>e.syncProject(t.id),children:"Pull now"}),(0,r.jsx)(i.zx,{size:"sm",variant:"secondary",onClick:()=>p(t),children:"Edit"}),(0,r.jsx)(i.zx,{size:"sm",variant:"danger",onClick:()=>e.deleteProject(t.id),children:"Remove"})]})]})]},t.id)})]})]})}function u(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(c,{})})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return s},II:function(){return u},OE:function(){return i},Ph:function(){return h},UW:function(){return p},ZD:function(){return v},Zb:function(){return o},gx:function(){return d},kN:function(){return f},mQ:function(){return m},zx:function(){return l}});var r=n(7437),a=n(6039);function s(e){let{tone:t="neutral",pill:n=!1,dot:a=!1,children:s}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[a&&(0,r.jsx)("span",{className:"dot"}),s]})}function i(e){let{status:t}=e;return(0,r.jsx)(s,{tone:(0,a.FH)(t),children:(0,a.Cf)(t)})}function o(e){let{children:t,interactive:n=!1,onClick:a,className:s=""}=e;return(0,r.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(s).trim(),onClick:a,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function l(e){let{variant:t="secondary",size:n="md",onClick:a,disabled:s,type:i="button",children:o}=e;return(0,r.jsx)("button",{type:i,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:a,disabled:s,children:o})}function c(e){let{label:t,children:n}=e;return(0,r.jsxs)("label",{className:"field",children:[t&&(0,r.jsx)("span",{className:"field-label",children:t}),n]})}function u(e){let{label:t,value:n,onChange:a,placeholder:s,type:i="text",disabled:o}=e;return(0,r.jsx)(c,{label:t,children:(0,r.jsx)("input",{className:"input",type:i,value:n,placeholder:s,disabled:o,onChange:e=>a(e.target.value)})})}function d(e){let{label:t,value:n,onChange:a,placeholder:s,rows:i=3}=e;return(0,r.jsx)(c,{label:t,children:(0,r.jsx)("textarea",{className:"textarea",value:n,rows:i,placeholder:s,onChange:e=>a(e.target.value)})})}function h(e){let{label:t,value:n,onChange:a,options:s}=e;return(0,r.jsx)(c,{label:t,children:(0,r.jsx)("select",{className:"select",value:n,onChange:e=>a(e.target.value),children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function m(e){let{tabs:t,value:n,onChange:a}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>a(e.value),children:e.label},e.value))})}function f(e){let{value:t,label:n,sub:a,accent:s=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:t}),(0,r.jsx)("div",{className:"stat-label",children:n}),a&&(0,r.jsx)("div",{className:"stat-sub",children:a})]})}function p(e){let{tone:t="info",children:n}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(t),children:n})}function v(e){let{on:t,onClick:n}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return s},Eh:function(){return i},FH:function(){return r},Q6:function(){return o},Sy:function(){return l}});let a={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return a[n]?a[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function i(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function o(e){return e?e.slice(0,7):"—"}function l(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h");let s=Math.floor(a/24);if(s<30)return"".concat(s,"d");let i=Math.floor(s/30);return i<12?"".concat(i,"mo"):"".concat(Math.floor(i/12),"y")}},257:function(e,t,n){"use strict";var r,a;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(a=n.g.process)?void 0:a.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,r,a=e.exports={};function s(){throw Error("setTimeout has not been defined")}function i(){throw Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var l=[],c=!1,u=-1;function d(){c&&r&&(c=!1,r.length?l=r.concat(l):u=-1,l.length&&h())}function h(){if(!c){var e=o(d);c=!0;for(var t=l.length;t;){for(r=l,l=[];++u1)for(var n=1;n{var t;let n=new Map;for(let r of e.agents)n.set(r.project_id,(null!==(t=n.get(r.project_id))&&void 0!==t?t:0)+1);return n},[e.agents]),h=(0,a.useMemo)(()=>[{value:"",label:e.hosts.length?"Pick a git server…":"No git servers configured"},...e.hosts.map(e=>({value:e.hostname,label:"".concat(e.hostname," (").concat(e.forge_type,")")}))],[e.hosts]),m=()=>{n(l),u(!1)},f=async()=>{(c?await e.updateProject(t.id,t):await e.createProject(t))&&m()},p=e=>{var t,r;n({...l,mode:"manual",id:e.id,root_dir:e.root_dir,git_remote:null!==(t=e.git_remote)&&void 0!==t?t:"",credential_ref:null!==(r=e.credential_ref)&&void 0!==r?r:""}),u(!0)},v=c?!!t.root_dir.trim():"server"===t.mode?!!t.git_server&&/^[\w.-]+\/[\w.-]+$/.test(t.repo.trim()):!!t.id.trim()&&!!t.root_dir.trim();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"section-head",children:[(0,r.jsx)("div",{className:"section-title",children:"Repositories"}),(0,r.jsx)("div",{className:"section-desc",children:"Repos Handler manages. Each carries its own agents, history, and credentials."})]}),(0,r.jsxs)("div",{className:"section-body",children:[(0,r.jsxs)(i.Zb,{children:[(0,r.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,r.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:c?"Edit repository \xb7 ".concat(t.id):"Add a repository"})}),!c&&(0,r.jsx)("div",{style:{marginBottom:14},children:(0,r.jsx)(i.mQ,{tabs:[{value:"server",label:"From a git server"},{value:"manual",label:"Manual (existing checkout)"}],value:t.mode,onChange:e=>n({...t,mode:e})})}),c||"server"!==t.mode?(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"form-grid",children:[(0,r.jsx)(i.II,{label:"ID / slug",value:t.id,onChange:e=>n({...t,id:e}),placeholder:"leeworks-api",disabled:c}),(0,r.jsx)(i.II,{label:"Root dir",value:t.root_dir,onChange:e=>n({...t,root_dir:e}),placeholder:"/var/lib/handler/projects/leeworks"}),(0,r.jsx)(i.II,{label:"Git remote",value:t.git_remote,onChange:e=>n({...t,git_remote:e}),placeholder:"git@github.com:user/repo.git (optional)"}),(0,r.jsx)(i.II,{label:"Credential ref",value:t.credential_ref,onChange:e=>n({...t,credential_ref:e}),placeholder:"env:VAR / file:/path / db:host:github.com"})]}),(0,r.jsx)("p",{className:"faint",style:{fontSize:"var(--text-xs)",margin:"10px 0 0"},children:"Optional override — projects on a configured git server use its stored token automatically. credential_ref is a pointer, never the token (env: / file: / db:host:)."})]}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"form-grid",children:[(0,r.jsx)(i.Ph,{label:"Git server",value:t.git_server,onChange:e=>n({...t,git_server:e}),options:h}),(0,r.jsx)(i.II,{label:"Repository (owner/name)",value:t.repo,onChange:e=>n({...t,repo:e}),placeholder:"me/coolproj"}),(0,r.jsx)(i.II,{label:"ID / slug (optional — defaults to the repo name)",value:t.id,onChange:e=>n({...t,id:e}),placeholder:"coolproj"})]}),(0,r.jsx)("p",{className:"faint",style:{fontSize:"var(--text-xs)",margin:"10px 0 0"},children:"The repo is always pulled: Handler derives the remote from the server (ssh when it has a deploy key, https via the stored token otherwise), clones it under PROJECTS_ROOT, and keeps it fresh before every run."})]}),!c&&(0,r.jsxs)("label",{className:"hstack",style:{gap:8,cursor:"pointer",marginTop:14},children:[(0,r.jsx)("input",{type:"checkbox",checked:t.init_mise,onChange:e=>n({...t,init_mise:e.target.checked})}),(0,r.jsxs)("span",{style:{fontSize:"var(--text-sm)"},children:["Initialize mise — after the clone, run an agent that writes a"," ",(0,r.jsx)("span",{className:"mono",children:".mise.toml"})," with a"," ",(0,r.jsx)("span",{className:"mono",children:"[tasks.test]"})," task for this repo’s stack, then commits and pushes it. Needed for repos that don’t define one yet."]})]}),!c&&t.init_mise&&"manual"===t.mode&&!t.git_remote.trim()&&(0,r.jsxs)("p",{className:"faint",style:{fontSize:"var(--text-xs)",margin:"6px 0 0"},children:["A git remote is required to push the new ",(0,r.jsx)("span",{className:"mono",children:".mise.toml"})," — add one above, or mise won’t be initialized."]}),(0,r.jsxs)("div",{className:"hstack mt14",children:[(0,r.jsx)(i.zx,{variant:"primary",disabled:e.cmd.busy||!v,onClick:f,children:c?"Save changes":"server"===t.mode?"Add & pull":"Register"}),c&&(0,r.jsx)(i.zx,{variant:"ghost",onClick:m,children:"Cancel"})]})]}),0===e.projects.length&&(0,r.jsx)("div",{className:"empty",children:"No repositories registered."}),e.projects.map(t=>{var n,a;return(0,r.jsxs)(i.Zb,{children:[(0,r.jsxs)("div",{className:"card-head",children:[(0,r.jsx)("span",{className:"card-title",children:t.id}),(0,r.jsxs)(i.Ct,{tone:"info",pill:!0,children:[null!==(n=d.get(t.id))&&void 0!==n?n:0," ",(null!==(a=d.get(t.id))&&void 0!==a?a:0)===1?"agent":"agents"]})]}),(0,r.jsxs)("div",{className:"mono faint",style:{fontSize:"var(--text-xs)",marginTop:4},children:[t.root_dir,t.git_remote?" \xb7 ".concat(t.git_remote):""]}),(0,r.jsxs)("div",{className:"hstack",style:{marginTop:12,justifyContent:"space-between"},children:[(0,r.jsxs)("span",{className:"faint mono",style:{fontSize:"var(--text-xs)"},children:["cred ",t.credential_ref||"server default"," \xb7 added ",(0,o.Eh)(t.created_at)]}),(0,r.jsxs)("div",{className:"hstack",children:[t.git_remote&&(0,r.jsx)(i.zx,{size:"sm",variant:"secondary",onClick:()=>e.syncProject(t.id),children:"Pull now"}),(0,r.jsx)(i.zx,{size:"sm",variant:"secondary",onClick:()=>p(t),children:"Edit"}),(0,r.jsx)(i.zx,{size:"sm",variant:"danger",onClick:()=>e.deleteProject(t.id),children:"Remove"})]})]})]},t.id)})]})]})}function u(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(c,{})})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return s},II:function(){return u},OE:function(){return i},Ph:function(){return h},UW:function(){return p},ZD:function(){return v},Zb:function(){return o},gx:function(){return d},kN:function(){return f},mQ:function(){return m},zx:function(){return l}});var r=n(7437),a=n(6039);function s(e){let{tone:t="neutral",pill:n=!1,dot:a=!1,children:s}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[a&&(0,r.jsx)("span",{className:"dot"}),s]})}function i(e){let{status:t}=e;return(0,r.jsx)(s,{tone:(0,a.FH)(t),children:(0,a.Cf)(t)})}function o(e){let{children:t,interactive:n=!1,onClick:a,className:s=""}=e;return(0,r.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(s).trim(),onClick:a,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function l(e){let{variant:t="secondary",size:n="md",onClick:a,disabled:s,type:i="button",children:o}=e;return(0,r.jsx)("button",{type:i,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:a,disabled:s,children:o})}function c(e){let{label:t,children:n}=e;return(0,r.jsxs)("label",{className:"field",children:[t&&(0,r.jsx)("span",{className:"field-label",children:t}),n]})}function u(e){let{label:t,value:n,onChange:a,placeholder:s,type:i="text",disabled:o}=e;return(0,r.jsx)(c,{label:t,children:(0,r.jsx)("input",{className:"input",type:i,value:n,placeholder:s,disabled:o,onChange:e=>a(e.target.value)})})}function d(e){let{label:t,value:n,onChange:a,placeholder:s,rows:i=3}=e;return(0,r.jsx)(c,{label:t,children:(0,r.jsx)("textarea",{className:"textarea",value:n,rows:i,placeholder:s,onChange:e=>a(e.target.value)})})}function h(e){let{label:t,value:n,onChange:a,options:s}=e;return(0,r.jsx)(c,{label:t,children:(0,r.jsx)("select",{className:"select",value:n,onChange:e=>a(e.target.value),children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function m(e){let{tabs:t,value:n,onChange:a}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>a(e.value),children:e.label},e.value))})}function f(e){let{value:t,label:n,sub:a,accent:s=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:t}),(0,r.jsx)("div",{className:"stat-label",children:n}),a&&(0,r.jsx)("div",{className:"stat-sub",children:a})]})}function p(e){let{tone:t="info",children:n}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(t),children:n})}function v(e){let{on:t,onClick:n}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return s},Eh:function(){return i},FH:function(){return r},Q6:function(){return o},Sy:function(){return l}});let a={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return a[n]?a[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function i(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function o(e){return e?e.slice(0,7):"—"}function l(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h");let s=Math.floor(a/24);if(s<30)return"".concat(s,"d");let i=Math.floor(s/30);return i<12?"".concat(i,"mo"):"".concat(Math.floor(i/12),"y")}},257:function(e,t,n){"use strict";var r,a;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(a=n.g.process)?void 0:a.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,r,a=e.exports={};function s(){throw Error("setTimeout has not been defined")}function i(){throw Error("clearTimeout has not been defined")}function o(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var l=[],c=!1,u=-1;function d(){c&&r&&(c=!1,r.length?l=r.concat(l):u=-1,l.length&&h())}function h(){if(!c){var e=o(d);c=!0;for(var t=l.length;t;){for(r=l,l=[];++u1)for(var n=1;ne.projects.map(e=>({value:e.id,label:e.id})),[e.projects]),h=async()=>{await e.createSchedule(e.selectedProjectId,{name_prefix:t.name_prefix,task:t.task,interval_seconds:Number(t.interval),role:t.role})&&n(u)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"section-head",children:[(0,r.jsx)("div",{className:"section-title",children:"Schedules"}),(0,r.jsx)("div",{className:"section-desc",children:"Spawn a fresh agent on an interval. Each run is stateless — keep continuity in a file the prompt reads and overwrites."})]}),(0,r.jsx)("div",{className:"section-body",children:0===e.projects.length?(0,r.jsx)("div",{className:"empty",children:"Register a repository first."}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"row",children:(0,r.jsx)("div",{style:{width:260},children:(0,r.jsx)(l.Ph,{label:"Repository",value:e.selectedProjectId,onChange:e.selectProject,options:d})})}),(0,r.jsxs)(l.Zb,{children:[(0,r.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,r.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:"New schedule"})}),(0,r.jsxs)("div",{className:"form-grid",children:[(0,r.jsx)(l.II,{label:"Name prefix",value:t.name_prefix,onChange:e=>n({...t,name_prefix:e}),placeholder:"nightly"}),(0,r.jsx)(l.Ph,{label:"Interval",value:t.interval,onChange:e=>n({...t,interval:e}),options:o}),(0,r.jsx)(l.Ph,{label:"Role",value:t.role,onChange:e=>n({...t,role:e}),options:c})]}),(0,r.jsx)("div",{className:"mt14",children:(0,r.jsx)(l.gx,{label:"Prompt (the task every run starts with)",value:t.task,onChange:e=>n({...t,task:e}),rows:3,placeholder:"Read @notes.md and continue from where it left off. Before finishing, overwrite @notes.md with the current state so the next run can pick up from there."})}),(0,r.jsxs)("p",{className:"faint",style:{fontSize:"var(--text-xs)",margin:"10px 0 0"},children:["Runs are named ",(0,r.jsxs)("span",{className:"mono",children:[t.name_prefix.trim()||"prefix","-YYYYMMDD-HHMMSS"]}),". The repo is pulled before every run; the first run fires on the worker's next pass."]}),(0,r.jsx)("div",{className:"hstack mt14",children:(0,r.jsx)(l.zx,{variant:"primary",disabled:e.cmd.busy||!t.name_prefix.trim()||!t.task.trim(),onClick:h,children:"Create schedule"})})]}),0===e.schedules.length?(0,r.jsx)("div",{className:"empty",children:"No schedules yet."}):(0,r.jsx)("div",{className:"table-wrap",children:(0,r.jsxs)("table",{className:"tbl",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"On"}),(0,r.jsx)("th",{children:"Name"}),(0,r.jsx)("th",{children:"Repository"}),(0,r.jsx)("th",{children:"Interval"}),(0,r.jsx)("th",{children:"Prompt"}),(0,r.jsx)("th",{children:"Next run"}),(0,r.jsx)("th",{children:"Last run"}),(0,r.jsx)("th",{})]})}),(0,r.jsx)("tbody",{children:e.schedules.map(t=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)(l.ZD,{on:t.enabled,onClick:()=>e.updateSchedule(t.id,{enabled:!t.enabled})})}),(0,r.jsxs)("td",{className:"mono",children:[t.name_prefix,t.role?(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)(l.Ct,{tone:"info",children:t.role})]}):null]}),(0,r.jsx)("td",{className:"mono faint",children:t.project_id}),(0,r.jsx)("td",{className:"nowrap",children:function(e){let t=o.find(t=>Number(t.value)===e);return t?t.label:e%3600==0?"every ".concat(e/3600,"h"):e%60==0?"every ".concat(e/60,"m"):"every ".concat(e,"s")}(t.interval_seconds)}),(0,r.jsx)("td",{className:"faint",style:{maxWidth:340},children:(0,r.jsx)("span",{className:"truncate",style:{display:"block"},title:t.task,children:t.task})}),(0,r.jsx)("td",{className:"faint nowrap",children:t.enabled?(0,i.Eh)(t.next_run_at):"paused"}),(0,r.jsx)("td",{className:"faint nowrap",children:(0,i.Eh)(t.last_run_at)}),(0,r.jsx)("td",{className:"nowrap",children:(0,r.jsx)(l.zx,{size:"sm",variant:"danger",onClick:()=>e.deleteSchedule(t.id),children:"Delete"})})]},t.id))})]})})]})})]})}function h(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(d,{})})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return s},II:function(){return u},OE:function(){return l},Ph:function(){return h},UW:function(){return p},ZD:function(){return x},Zb:function(){return i},gx:function(){return d},kN:function(){return m},mQ:function(){return f},zx:function(){return c}});var r=n(7437),a=n(6039);function s(e){let{tone:t="neutral",pill:n=!1,dot:a=!1,children:s}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[a&&(0,r.jsx)("span",{className:"dot"}),s]})}function l(e){let{status:t}=e;return(0,r.jsx)(s,{tone:(0,a.FH)(t),children:(0,a.Cf)(t)})}function i(e){let{children:t,interactive:n=!1,onClick:a,className:s=""}=e;return(0,r.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(s).trim(),onClick:a,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function c(e){let{variant:t="secondary",size:n="md",onClick:a,disabled:s,type:l="button",children:i}=e;return(0,r.jsx)("button",{type:l,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:a,disabled:s,children:i})}function o(e){let{label:t,children:n}=e;return(0,r.jsxs)("label",{className:"field",children:[t&&(0,r.jsx)("span",{className:"field-label",children:t}),n]})}function u(e){let{label:t,value:n,onChange:a,placeholder:s,type:l="text",disabled:i}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("input",{className:"input",type:l,value:n,placeholder:s,disabled:i,onChange:e=>a(e.target.value)})})}function d(e){let{label:t,value:n,onChange:a,placeholder:s,rows:l=3}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("textarea",{className:"textarea",value:n,rows:l,placeholder:s,onChange:e=>a(e.target.value)})})}function h(e){let{label:t,value:n,onChange:a,options:s}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("select",{className:"select",value:n,onChange:e=>a(e.target.value),children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function f(e){let{tabs:t,value:n,onChange:a}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>a(e.value),children:e.label},e.value))})}function m(e){let{value:t,label:n,sub:a,accent:s=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:t}),(0,r.jsx)("div",{className:"stat-label",children:n}),a&&(0,r.jsx)("div",{className:"stat-sub",children:a})]})}function p(e){let{tone:t="info",children:n}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(t),children:n})}function x(e){let{on:t,onClick:n}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return s},Eh:function(){return l},FH:function(){return r},Q6:function(){return i},Sy:function(){return c}});let a={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return a[n]?a[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function l(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function c(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h");let s=Math.floor(a/24);if(s<30)return"".concat(s,"d");let l=Math.floor(s/30);return l<12?"".concat(l,"mo"):"".concat(Math.floor(l/12),"y")}},257:function(e,t,n){"use strict";var r,a;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(a=n.g.process)?void 0:a.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,r,a=e.exports={};function s(){throw Error("setTimeout has not been defined")}function l(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:l}catch(e){n=l}}();var c=[],o=!1,u=-1;function d(){o&&r&&(o=!1,r.length?c=r.concat(c):u=-1,c.length&&h())}function h(){if(!o){var e=i(d);o=!0;for(var t=c.length;t;){for(r=c,c=[];++u1)for(var n=1;ne.projects.map(e=>({value:e.id,label:e.id})),[e.projects]),h=async()=>{await e.createSchedule(e.selectedProjectId,{name_prefix:t.name_prefix,task:t.task,interval_seconds:Number(t.interval),role:t.role})&&n(u)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"section-head",children:[(0,r.jsx)("div",{className:"section-title",children:"Schedules"}),(0,r.jsx)("div",{className:"section-desc",children:"Spawn a fresh agent on an interval. Each run is stateless — keep continuity in a file the prompt reads and overwrites."})]}),(0,r.jsx)("div",{className:"section-body",children:0===e.projects.length?(0,r.jsx)("div",{className:"empty",children:"Register a repository first."}):(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"row",children:(0,r.jsx)("div",{style:{width:260},children:(0,r.jsx)(l.Ph,{label:"Repository",value:e.selectedProjectId,onChange:e.selectProject,options:d})})}),(0,r.jsxs)(l.Zb,{children:[(0,r.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,r.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:"New schedule"})}),(0,r.jsxs)("div",{className:"form-grid",children:[(0,r.jsx)(l.II,{label:"Name prefix",value:t.name_prefix,onChange:e=>n({...t,name_prefix:e}),placeholder:"nightly"}),(0,r.jsx)(l.Ph,{label:"Interval",value:t.interval,onChange:e=>n({...t,interval:e}),options:o}),(0,r.jsx)(l.Ph,{label:"Role",value:t.role,onChange:e=>n({...t,role:e}),options:c})]}),(0,r.jsx)("div",{className:"mt14",children:(0,r.jsx)(l.gx,{label:"Prompt (the task every run starts with)",value:t.task,onChange:e=>n({...t,task:e}),rows:3,placeholder:"Read @notes.md and continue from where it left off. Before finishing, overwrite @notes.md with the current state so the next run can pick up from there."})}),(0,r.jsxs)("p",{className:"faint",style:{fontSize:"var(--text-xs)",margin:"10px 0 0"},children:["Runs are named ",(0,r.jsxs)("span",{className:"mono",children:[t.name_prefix.trim()||"prefix","-YYYYMMDD-HHMMSS"]}),". The repo is pulled before every run; the first run fires on the worker's next pass."]}),(0,r.jsx)("div",{className:"hstack mt14",children:(0,r.jsx)(l.zx,{variant:"primary",disabled:e.cmd.busy||!t.name_prefix.trim()||!t.task.trim(),onClick:h,children:"Create schedule"})})]}),0===e.schedules.length?(0,r.jsx)("div",{className:"empty",children:"No schedules yet."}):(0,r.jsx)("div",{className:"table-wrap",children:(0,r.jsxs)("table",{className:"tbl",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"On"}),(0,r.jsx)("th",{children:"Name"}),(0,r.jsx)("th",{children:"Repository"}),(0,r.jsx)("th",{children:"Interval"}),(0,r.jsx)("th",{children:"Prompt"}),(0,r.jsx)("th",{children:"Next run"}),(0,r.jsx)("th",{children:"Last run"}),(0,r.jsx)("th",{})]})}),(0,r.jsx)("tbody",{children:e.schedules.map(t=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{children:(0,r.jsx)(l.ZD,{on:t.enabled,onClick:()=>e.updateSchedule(t.id,{enabled:!t.enabled})})}),(0,r.jsxs)("td",{className:"mono",children:[t.name_prefix,t.role?(0,r.jsxs)(r.Fragment,{children:[" ",(0,r.jsx)(l.Ct,{tone:"info",children:t.role})]}):null]}),(0,r.jsx)("td",{className:"mono faint",children:t.project_id}),(0,r.jsx)("td",{className:"nowrap",children:function(e){let t=o.find(t=>Number(t.value)===e);return t?t.label:e%3600==0?"every ".concat(e/3600,"h"):e%60==0?"every ".concat(e/60,"m"):"every ".concat(e,"s")}(t.interval_seconds)}),(0,r.jsx)("td",{className:"faint",style:{maxWidth:340},children:(0,r.jsx)("span",{className:"truncate",style:{display:"block"},title:t.task,children:t.task})}),(0,r.jsx)("td",{className:"faint nowrap",children:t.enabled?(0,i.Eh)(t.next_run_at):"paused"}),(0,r.jsx)("td",{className:"faint nowrap",children:(0,i.Eh)(t.last_run_at)}),(0,r.jsx)("td",{className:"nowrap",children:(0,r.jsx)(l.zx,{size:"sm",variant:"danger",onClick:()=>e.deleteSchedule(t.id),children:"Delete"})})]},t.id))})]})})]})})]})}function h(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(d,{})})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return s},II:function(){return u},OE:function(){return l},Ph:function(){return h},UW:function(){return p},ZD:function(){return x},Zb:function(){return i},gx:function(){return d},kN:function(){return m},mQ:function(){return f},zx:function(){return c}});var r=n(7437),a=n(6039);function s(e){let{tone:t="neutral",pill:n=!1,dot:a=!1,children:s}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[a&&(0,r.jsx)("span",{className:"dot"}),s]})}function l(e){let{status:t}=e;return(0,r.jsx)(s,{tone:(0,a.FH)(t),children:(0,a.Cf)(t)})}function i(e){let{children:t,interactive:n=!1,onClick:a,className:s=""}=e;return(0,r.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(s).trim(),onClick:a,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function c(e){let{variant:t="secondary",size:n="md",onClick:a,disabled:s,type:l="button",children:i}=e;return(0,r.jsx)("button",{type:l,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:a,disabled:s,children:i})}function o(e){let{label:t,children:n}=e;return(0,r.jsxs)("label",{className:"field",children:[t&&(0,r.jsx)("span",{className:"field-label",children:t}),n]})}function u(e){let{label:t,value:n,onChange:a,placeholder:s,type:l="text",disabled:i}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("input",{className:"input",type:l,value:n,placeholder:s,disabled:i,onChange:e=>a(e.target.value)})})}function d(e){let{label:t,value:n,onChange:a,placeholder:s,rows:l=3}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("textarea",{className:"textarea",value:n,rows:l,placeholder:s,onChange:e=>a(e.target.value)})})}function h(e){let{label:t,value:n,onChange:a,options:s}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("select",{className:"select",value:n,onChange:e=>a(e.target.value),children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function f(e){let{tabs:t,value:n,onChange:a}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>a(e.value),children:e.label},e.value))})}function m(e){let{value:t,label:n,sub:a,accent:s=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:t}),(0,r.jsx)("div",{className:"stat-label",children:n}),a&&(0,r.jsx)("div",{className:"stat-sub",children:a})]})}function p(e){let{tone:t="info",children:n}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(t),children:n})}function x(e){let{on:t,onClick:n}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return s},Eh:function(){return l},FH:function(){return r},Q6:function(){return i},Sy:function(){return c}});let a={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return a[n]?a[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function l(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function c(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h");let s=Math.floor(a/24);if(s<30)return"".concat(s,"d");let l=Math.floor(s/30);return l<12?"".concat(l,"mo"):"".concat(Math.floor(l/12),"y")}},257:function(e,t,n){"use strict";var r,a;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(a=n.g.process)?void 0:a.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,r,a=e.exports={};function s(){throw Error("setTimeout has not been defined")}function l(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:l}catch(e){n=l}}();var c=[],o=!1,u=-1;function d(){o&&r&&(o=!1,r.length?c=r.concat(c):u=-1,c.length&&h())}function h(){if(!o){var e=i(d);o=!0;for(var t=c.length;t;){for(r=c,c=[];++u1)for(var n=1;n{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),1500)}catch(e){}};return(0,r.jsxs)("div",{style:{marginTop:10},children:[(0,r.jsxs)("div",{className:"hstack",style:{justifyContent:"space-between"},children:[(0,r.jsx)("span",{className:"eyebrow",children:"SSH public key — add it to the forge (deploy key)"}),(0,r.jsx)(o.zx,{size:"sm",variant:"secondary",onClick:i,children:n?"Copied":"Copy"})]}),(0,r.jsx)("pre",{className:"mono",style:{fontSize:"var(--text-xs)",whiteSpace:"pre-wrap",wordBreak:"break-all",margin:"6px 0 0",padding:8,border:"1px solid var(--border-default)",borderRadius:6,userSelect:"all"},children:t})]})}function u(){let e=(0,s.Q)(),[t,n]=(0,a.useState)(l),[u,d]=(0,a.useState)(!1),h=()=>{n(l),d(!1)},f=async()=>{(u?await e.updateHost(t.hostname,t):await e.createHost(t))&&h()},p=e=>{var t,r;n({hostname:e.hostname,forge_type:e.forge_type,token_env_var:null!==(t=e.token_env_var)&&void 0!==t?t:"",base_url:null!==(r=e.base_url)&&void 0!==r?r:"",token:"",generate_ssh_key:!1}),d(!0)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"section-head",children:[(0,r.jsx)("div",{className:"section-title",children:"Git Servers"}),(0,r.jsxs)("div",{className:"section-desc",children:["Each server carries its own credentials: a forge token (encrypted at rest, used by agents' ",(0,r.jsx)("span",{className:"mono",children:"forge"})," + git) and an SSH deploy key — paste the public key into the forge. New repositories are added by picking a server and typing owner/name."]})]}),(0,r.jsxs)("div",{className:"section-body",children:[(0,r.jsxs)(o.Zb,{children:[(0,r.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,r.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:u?"Edit server \xb7 ".concat(t.hostname):"Add a git server"})}),(0,r.jsxs)("div",{className:"form-grid",children:[(0,r.jsx)(o.II,{label:"Hostname",value:t.hostname,onChange:e=>n({...t,hostname:e}),placeholder:"github.com",disabled:u}),(0,r.jsx)(o.Ph,{label:"Type",value:t.forge_type,onChange:e=>n({...t,forge_type:e}),options:i}),(0,r.jsx)(o.II,{label:u?"Forge token (blank = keep current)":"Forge token",type:"password",value:t.token,onChange:e=>n({...t,token:e}),placeholder:"stored encrypted; used by forge + git"}),(0,r.jsx)(o.II,{label:"Base URL (optional)",value:t.base_url,onChange:e=>n({...t,base_url:e}),placeholder:"https://git.corp.internal:8443"}),(0,r.jsx)(o.II,{label:"Token env var override (optional)",value:t.token_env_var,onChange:e=>n({...t,token_env_var:e}),placeholder:"GITEA_TOKEN"}),(0,r.jsxs)("label",{className:"field",children:[(0,r.jsx)("span",{className:"field-label",children:"SSH deploy key"}),(0,r.jsxs)("label",{className:"hstack",style:{gap:8,cursor:"pointer"},children:[(0,r.jsx)("input",{type:"checkbox",checked:t.generate_ssh_key,onChange:e=>n({...t,generate_ssh_key:e.target.checked})}),(0,r.jsx)("span",{style:{fontSize:"var(--text-sm)"},children:u?"Regenerate keypair (replaces the current key)":"Generate a keypair"})]})]})]}),(0,r.jsxs)("div",{className:"hstack mt14",children:[(0,r.jsx)(o.zx,{variant:"primary",disabled:e.cmd.busy||!t.hostname.trim(),onClick:f,children:u?"Save changes":"Add server"}),u&&(0,r.jsx)(o.zx,{variant:"ghost",onClick:h,children:"Cancel"})]})]}),0===e.hosts.length&&(0,r.jsx)("div",{className:"empty",children:"No git servers registered (built-in host map still applies)."}),e.hosts.map(t=>(0,r.jsxs)(o.Zb,{children:[(0,r.jsxs)("div",{className:"card-head",children:[(0,r.jsx)("span",{className:"mono",style:{fontWeight:"var(--fw-bold)",fontSize:"var(--text-lg)",color:"var(--text-heading)"},children:t.hostname}),(0,r.jsxs)("div",{className:"hstack",children:[(0,r.jsx)(o.Ct,{tone:"info",children:t.forge_type}),(0,r.jsx)(o.Ct,{tone:t.has_token?"success":"neutral",children:t.has_token?"token stored":"no token"}),(0,r.jsx)(o.Ct,{tone:t.ssh_public_key?"success":"neutral",children:t.ssh_public_key?"ssh key":"no ssh key"}),(0,r.jsx)(o.zx,{size:"sm",variant:"secondary",onClick:()=>p(t),children:"Edit"}),(0,r.jsx)(o.zx,{size:"sm",variant:"danger",onClick:()=>e.deleteHost(t.hostname),children:"Remove"})]})]}),(0,r.jsxs)("div",{className:"mono faint",style:{fontSize:"var(--text-xs)",marginTop:8},children:["token env ",t.token_env_var||"—",t.base_url?" \xb7 ".concat(t.base_url):""]}),t.ssh_public_key&&(0,r.jsx)(c,{value:t.ssh_public_key})]},t.hostname))]})]})}function d(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(u,{})})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return s},II:function(){return u},OE:function(){return o},Ph:function(){return h},UW:function(){return m},ZD:function(){return v},Zb:function(){return i},gx:function(){return d},kN:function(){return p},mQ:function(){return f},zx:function(){return l}});var r=n(7437),a=n(6039);function s(e){let{tone:t="neutral",pill:n=!1,dot:a=!1,children:s}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[a&&(0,r.jsx)("span",{className:"dot"}),s]})}function o(e){let{status:t}=e;return(0,r.jsx)(s,{tone:(0,a.FH)(t),children:(0,a.Cf)(t)})}function i(e){let{children:t,interactive:n=!1,onClick:a,className:s=""}=e;return(0,r.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(s).trim(),onClick:a,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function l(e){let{variant:t="secondary",size:n="md",onClick:a,disabled:s,type:o="button",children:i}=e;return(0,r.jsx)("button",{type:o,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:a,disabled:s,children:i})}function c(e){let{label:t,children:n}=e;return(0,r.jsxs)("label",{className:"field",children:[t&&(0,r.jsx)("span",{className:"field-label",children:t}),n]})}function u(e){let{label:t,value:n,onChange:a,placeholder:s,type:o="text",disabled:i}=e;return(0,r.jsx)(c,{label:t,children:(0,r.jsx)("input",{className:"input",type:o,value:n,placeholder:s,disabled:i,onChange:e=>a(e.target.value)})})}function d(e){let{label:t,value:n,onChange:a,placeholder:s,rows:o=3}=e;return(0,r.jsx)(c,{label:t,children:(0,r.jsx)("textarea",{className:"textarea",value:n,rows:o,placeholder:s,onChange:e=>a(e.target.value)})})}function h(e){let{label:t,value:n,onChange:a,options:s}=e;return(0,r.jsx)(c,{label:t,children:(0,r.jsx)("select",{className:"select",value:n,onChange:e=>a(e.target.value),children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function f(e){let{tabs:t,value:n,onChange:a}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>a(e.value),children:e.label},e.value))})}function p(e){let{value:t,label:n,sub:a,accent:s=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:t}),(0,r.jsx)("div",{className:"stat-label",children:n}),a&&(0,r.jsx)("div",{className:"stat-sub",children:a})]})}function m(e){let{tone:t="info",children:n}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(t),children:n})}function v(e){let{on:t,onClick:n}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return s},Eh:function(){return o},FH:function(){return r},Q6:function(){return i},Sy:function(){return l}});let a={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return a[n]?a[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function o(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function l(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h");let s=Math.floor(a/24);if(s<30)return"".concat(s,"d");let o=Math.floor(s/30);return o<12?"".concat(o,"mo"):"".concat(Math.floor(o/12),"y")}},257:function(e,t,n){"use strict";var r,a;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(a=n.g.process)?void 0:a.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,r,a=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var l=[],c=!1,u=-1;function d(){c&&r&&(c=!1,r.length?l=r.concat(l):u=-1,l.length&&h())}function h(){if(!c){var e=i(d);c=!0;for(var t=l.length;t;){for(r=l,l=[];++u1)for(var n=1;n{try{await navigator.clipboard.writeText(t),s(!0),setTimeout(()=>s(!1),1500)}catch(e){}};return(0,r.jsxs)("div",{style:{marginTop:10},children:[(0,r.jsxs)("div",{className:"hstack",style:{justifyContent:"space-between"},children:[(0,r.jsx)("span",{className:"eyebrow",children:"SSH public key — add it to the forge (deploy key)"}),(0,r.jsx)(o.zx,{size:"sm",variant:"secondary",onClick:i,children:n?"Copied":"Copy"})]}),(0,r.jsx)("pre",{className:"mono",style:{fontSize:"var(--text-xs)",whiteSpace:"pre-wrap",wordBreak:"break-all",margin:"6px 0 0",padding:8,border:"1px solid var(--border-default)",borderRadius:6,userSelect:"all"},children:t})]})}function u(){let e=(0,s.Q)(),[t,n]=(0,a.useState)(l),[u,d]=(0,a.useState)(!1),h=()=>{n(l),d(!1)},f=async()=>{(u?await e.updateHost(t.hostname,t):await e.createHost(t))&&h()},p=e=>{var t,r;n({hostname:e.hostname,forge_type:e.forge_type,token_env_var:null!==(t=e.token_env_var)&&void 0!==t?t:"",base_url:null!==(r=e.base_url)&&void 0!==r?r:"",token:"",generate_ssh_key:!1}),d(!0)};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"section-head",children:[(0,r.jsx)("div",{className:"section-title",children:"Git Servers"}),(0,r.jsxs)("div",{className:"section-desc",children:["Each server carries its own credentials: a forge token (encrypted at rest, used by agents' ",(0,r.jsx)("span",{className:"mono",children:"forge"})," + git) and an SSH deploy key — paste the public key into the forge. New repositories are added by picking a server and typing owner/name."]})]}),(0,r.jsxs)("div",{className:"section-body",children:[(0,r.jsxs)(o.Zb,{children:[(0,r.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,r.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:u?"Edit server \xb7 ".concat(t.hostname):"Add a git server"})}),(0,r.jsxs)("div",{className:"form-grid",children:[(0,r.jsx)(o.II,{label:"Hostname",value:t.hostname,onChange:e=>n({...t,hostname:e}),placeholder:"github.com",disabled:u}),(0,r.jsx)(o.Ph,{label:"Type",value:t.forge_type,onChange:e=>n({...t,forge_type:e}),options:i}),(0,r.jsx)(o.II,{label:u?"Forge token (blank = keep current)":"Forge token",type:"password",value:t.token,onChange:e=>n({...t,token:e}),placeholder:"stored encrypted; used by forge + git"}),(0,r.jsx)(o.II,{label:"Base URL (optional)",value:t.base_url,onChange:e=>n({...t,base_url:e}),placeholder:"https://git.corp.internal:8443"}),(0,r.jsx)(o.II,{label:"Token env var override (optional)",value:t.token_env_var,onChange:e=>n({...t,token_env_var:e}),placeholder:"GITEA_TOKEN"}),(0,r.jsxs)("label",{className:"field",children:[(0,r.jsx)("span",{className:"field-label",children:"SSH deploy key"}),(0,r.jsxs)("label",{className:"hstack",style:{gap:8,cursor:"pointer"},children:[(0,r.jsx)("input",{type:"checkbox",checked:t.generate_ssh_key,onChange:e=>n({...t,generate_ssh_key:e.target.checked})}),(0,r.jsx)("span",{style:{fontSize:"var(--text-sm)"},children:u?"Regenerate keypair (replaces the current key)":"Generate a keypair"})]})]})]}),(0,r.jsxs)("div",{className:"hstack mt14",children:[(0,r.jsx)(o.zx,{variant:"primary",disabled:e.cmd.busy||!t.hostname.trim(),onClick:f,children:u?"Save changes":"Add server"}),u&&(0,r.jsx)(o.zx,{variant:"ghost",onClick:h,children:"Cancel"})]})]}),0===e.hosts.length&&(0,r.jsx)("div",{className:"empty",children:"No git servers registered (built-in host map still applies)."}),e.hosts.map(t=>(0,r.jsxs)(o.Zb,{children:[(0,r.jsxs)("div",{className:"card-head",children:[(0,r.jsx)("span",{className:"mono",style:{fontWeight:"var(--fw-bold)",fontSize:"var(--text-lg)",color:"var(--text-heading)"},children:t.hostname}),(0,r.jsxs)("div",{className:"hstack",children:[(0,r.jsx)(o.Ct,{tone:"info",children:t.forge_type}),(0,r.jsx)(o.Ct,{tone:t.has_token?"success":"neutral",children:t.has_token?"token stored":"no token"}),(0,r.jsx)(o.Ct,{tone:t.ssh_public_key?"success":"neutral",children:t.ssh_public_key?"ssh key":"no ssh key"}),(0,r.jsx)(o.zx,{size:"sm",variant:"secondary",onClick:()=>p(t),children:"Edit"}),(0,r.jsx)(o.zx,{size:"sm",variant:"danger",onClick:()=>e.deleteHost(t.hostname),children:"Remove"})]})]}),(0,r.jsxs)("div",{className:"mono faint",style:{fontSize:"var(--text-xs)",marginTop:8},children:["token env ",t.token_env_var||"—",t.base_url?" \xb7 ".concat(t.base_url):""]}),t.ssh_public_key&&(0,r.jsx)(c,{value:t.ssh_public_key})]},t.hostname))]})]})}function d(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(u,{})})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return s},II:function(){return u},OE:function(){return o},Ph:function(){return h},UW:function(){return m},ZD:function(){return v},Zb:function(){return i},gx:function(){return d},kN:function(){return p},mQ:function(){return f},zx:function(){return l}});var r=n(7437),a=n(6039);function s(e){let{tone:t="neutral",pill:n=!1,dot:a=!1,children:s}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[a&&(0,r.jsx)("span",{className:"dot"}),s]})}function o(e){let{status:t}=e;return(0,r.jsx)(s,{tone:(0,a.FH)(t),children:(0,a.Cf)(t)})}function i(e){let{children:t,interactive:n=!1,onClick:a,className:s=""}=e;return(0,r.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(s).trim(),onClick:a,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function l(e){let{variant:t="secondary",size:n="md",onClick:a,disabled:s,type:o="button",children:i}=e;return(0,r.jsx)("button",{type:o,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:a,disabled:s,children:i})}function c(e){let{label:t,children:n}=e;return(0,r.jsxs)("label",{className:"field",children:[t&&(0,r.jsx)("span",{className:"field-label",children:t}),n]})}function u(e){let{label:t,value:n,onChange:a,placeholder:s,type:o="text",disabled:i}=e;return(0,r.jsx)(c,{label:t,children:(0,r.jsx)("input",{className:"input",type:o,value:n,placeholder:s,disabled:i,onChange:e=>a(e.target.value)})})}function d(e){let{label:t,value:n,onChange:a,placeholder:s,rows:o=3}=e;return(0,r.jsx)(c,{label:t,children:(0,r.jsx)("textarea",{className:"textarea",value:n,rows:o,placeholder:s,onChange:e=>a(e.target.value)})})}function h(e){let{label:t,value:n,onChange:a,options:s}=e;return(0,r.jsx)(c,{label:t,children:(0,r.jsx)("select",{className:"select",value:n,onChange:e=>a(e.target.value),children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function f(e){let{tabs:t,value:n,onChange:a}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>a(e.value),children:e.label},e.value))})}function p(e){let{value:t,label:n,sub:a,accent:s=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:t}),(0,r.jsx)("div",{className:"stat-label",children:n}),a&&(0,r.jsx)("div",{className:"stat-sub",children:a})]})}function m(e){let{tone:t="info",children:n}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(t),children:n})}function v(e){let{on:t,onClick:n}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return s},Eh:function(){return o},FH:function(){return r},Q6:function(){return i},Sy:function(){return l}});let a={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return a[n]?a[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function o(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function l(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h");let s=Math.floor(a/24);if(s<30)return"".concat(s,"d");let o=Math.floor(s/30);return o<12?"".concat(o,"mo"):"".concat(Math.floor(o/12),"y")}},257:function(e,t,n){"use strict";var r,a;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(a=n.g.process)?void 0:a.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,r,a=e.exports={};function s(){throw Error("setTimeout has not been defined")}function o(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:o}catch(e){n=o}}();var l=[],c=!1,u=-1;function d(){c&&r&&(c=!1,r.length?l=r.concat(l):u=-1,l.length&&h())}function h(){if(!c){var e=i(d);c=!0;for(var t=l.length;t;){for(r=l,l=[];++u1)for(var n=1;n{t.trim()&&l.trim()&&await e.setSharedKey(t.trim(),l.trim())&&(n(""),o(""))};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"section-head",children:[(0,r.jsx)("div",{className:"section-title",children:"Shared"}),(0,r.jsx)("div",{className:"section-desc",children:"The cross-project global feed and shared facts."})]}),(0,r.jsxs)("div",{className:"section-body",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"eyebrow",style:{marginBottom:10},children:"Global feed"}),0===e.shared.log.length?(0,r.jsx)("div",{className:"empty",children:"No global log entries."}):(0,r.jsx)("div",{className:"table-wrap",children:(0,r.jsxs)("table",{className:"tbl",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"When"}),(0,r.jsx)("th",{children:"Agent"}),(0,r.jsx)("th",{children:"Status"}),(0,r.jsx)("th",{children:"Summary"}),(0,r.jsx)("th",{children:"CI"})]})}),(0,r.jsx)("tbody",{children:e.shared.log.map(e=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"faint nowrap",children:(0,i.Eh)(e.created_at)}),(0,r.jsx)("td",{className:"mono",children:e.agent_id}),(0,r.jsx)("td",{children:(0,r.jsx)(c.OE,{status:e.status})}),(0,r.jsx)("td",{children:e.summary||"—"}),(0,r.jsx)("td",{children:(0,r.jsx)(c.OE,{status:e.ci_status})})]},e.id))})]})})]}),(0,r.jsxs)(c.Zb,{children:[(0,r.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,r.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:"Set a shared key"})}),(0,r.jsxs)("div",{className:"form-grid",children:[(0,r.jsx)(c.II,{label:"Key",value:t,onChange:n,placeholder:"key"}),(0,r.jsx)(c.II,{label:"Value",value:l,onChange:o,placeholder:"value"})]}),(0,r.jsx)("p",{className:"faint",style:{fontSize:"var(--text-xs)",margin:"10px 0 0"},children:"Requires the shared-context write token (or admin/global if unset)."}),(0,r.jsx)("div",{className:"hstack mt14",children:(0,r.jsx)(c.zx,{variant:"primary",disabled:!t.trim()||!l.trim(),onClick:u,children:"Set"})})]}),e.shared.context.length>0&&(0,r.jsx)("div",{className:"table-wrap",children:(0,r.jsxs)("table",{className:"tbl",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Key"}),(0,r.jsx)("th",{children:"Value"}),(0,r.jsx)("th",{children:"Updated"})]})}),(0,r.jsx)("tbody",{children:e.shared.context.map(e=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"mono",children:e.key}),(0,r.jsx)("td",{children:e.value}),(0,r.jsx)("td",{className:"faint nowrap",children:(0,i.Eh)(e.updated_at)})]},e.key))})]})})]})]})}function o(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(l,{})})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return s},II:function(){return u},OE:function(){return c},Ph:function(){return h},UW:function(){return x},ZD:function(){return p},Zb:function(){return i},gx:function(){return d},kN:function(){return m},mQ:function(){return f},zx:function(){return l}});var r=n(7437),a=n(6039);function s(e){let{tone:t="neutral",pill:n=!1,dot:a=!1,children:s}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[a&&(0,r.jsx)("span",{className:"dot"}),s]})}function c(e){let{status:t}=e;return(0,r.jsx)(s,{tone:(0,a.FH)(t),children:(0,a.Cf)(t)})}function i(e){let{children:t,interactive:n=!1,onClick:a,className:s=""}=e;return(0,r.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(s).trim(),onClick:a,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function l(e){let{variant:t="secondary",size:n="md",onClick:a,disabled:s,type:c="button",children:i}=e;return(0,r.jsx)("button",{type:c,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:a,disabled:s,children:i})}function o(e){let{label:t,children:n}=e;return(0,r.jsxs)("label",{className:"field",children:[t&&(0,r.jsx)("span",{className:"field-label",children:t}),n]})}function u(e){let{label:t,value:n,onChange:a,placeholder:s,type:c="text",disabled:i}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("input",{className:"input",type:c,value:n,placeholder:s,disabled:i,onChange:e=>a(e.target.value)})})}function d(e){let{label:t,value:n,onChange:a,placeholder:s,rows:c=3}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("textarea",{className:"textarea",value:n,rows:c,placeholder:s,onChange:e=>a(e.target.value)})})}function h(e){let{label:t,value:n,onChange:a,options:s}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("select",{className:"select",value:n,onChange:e=>a(e.target.value),children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function f(e){let{tabs:t,value:n,onChange:a}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>a(e.value),children:e.label},e.value))})}function m(e){let{value:t,label:n,sub:a,accent:s=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:t}),(0,r.jsx)("div",{className:"stat-label",children:n}),a&&(0,r.jsx)("div",{className:"stat-sub",children:a})]})}function x(e){let{tone:t="info",children:n}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(t),children:n})}function p(e){let{on:t,onClick:n}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return s},Eh:function(){return c},FH:function(){return r},Q6:function(){return i},Sy:function(){return l}});let a={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return a[n]?a[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function c(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function l(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h");let s=Math.floor(a/24);if(s<30)return"".concat(s,"d");let c=Math.floor(s/30);return c<12?"".concat(c,"mo"):"".concat(Math.floor(c/12),"y")}},257:function(e,t,n){"use strict";var r,a;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(a=n.g.process)?void 0:a.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,r,a=e.exports={};function s(){throw Error("setTimeout has not been defined")}function c(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:c}catch(e){n=c}}();var l=[],o=!1,u=-1;function d(){o&&r&&(o=!1,r.length?l=r.concat(l):u=-1,l.length&&h())}function h(){if(!o){var e=i(d);o=!0;for(var t=l.length;t;){for(r=l,l=[];++u1)for(var n=1;n{t.trim()&&l.trim()&&await e.setSharedKey(t.trim(),l.trim())&&(n(""),o(""))};return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsxs)("div",{className:"section-head",children:[(0,r.jsx)("div",{className:"section-title",children:"Shared"}),(0,r.jsx)("div",{className:"section-desc",children:"The cross-project global feed and shared facts."})]}),(0,r.jsxs)("div",{className:"section-body",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"eyebrow",style:{marginBottom:10},children:"Global feed"}),0===e.shared.log.length?(0,r.jsx)("div",{className:"empty",children:"No global log entries."}):(0,r.jsx)("div",{className:"table-wrap",children:(0,r.jsxs)("table",{className:"tbl",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"When"}),(0,r.jsx)("th",{children:"Agent"}),(0,r.jsx)("th",{children:"Status"}),(0,r.jsx)("th",{children:"Summary"}),(0,r.jsx)("th",{children:"CI"})]})}),(0,r.jsx)("tbody",{children:e.shared.log.map(e=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"faint nowrap",children:(0,i.Eh)(e.created_at)}),(0,r.jsx)("td",{className:"mono",children:e.agent_id}),(0,r.jsx)("td",{children:(0,r.jsx)(c.OE,{status:e.status})}),(0,r.jsx)("td",{children:e.summary||"—"}),(0,r.jsx)("td",{children:(0,r.jsx)(c.OE,{status:e.ci_status})})]},e.id))})]})})]}),(0,r.jsxs)(c.Zb,{children:[(0,r.jsx)("div",{className:"card-head",style:{marginBottom:14},children:(0,r.jsx)("span",{className:"card-title",style:{fontSize:"var(--text-md)",color:"var(--text-heading)"},children:"Set a shared key"})}),(0,r.jsxs)("div",{className:"form-grid",children:[(0,r.jsx)(c.II,{label:"Key",value:t,onChange:n,placeholder:"key"}),(0,r.jsx)(c.II,{label:"Value",value:l,onChange:o,placeholder:"value"})]}),(0,r.jsx)("p",{className:"faint",style:{fontSize:"var(--text-xs)",margin:"10px 0 0"},children:"Requires the shared-context write token (or admin/global if unset)."}),(0,r.jsx)("div",{className:"hstack mt14",children:(0,r.jsx)(c.zx,{variant:"primary",disabled:!t.trim()||!l.trim(),onClick:u,children:"Set"})})]}),e.shared.context.length>0&&(0,r.jsx)("div",{className:"table-wrap",children:(0,r.jsxs)("table",{className:"tbl",children:[(0,r.jsx)("thead",{children:(0,r.jsxs)("tr",{children:[(0,r.jsx)("th",{children:"Key"}),(0,r.jsx)("th",{children:"Value"}),(0,r.jsx)("th",{children:"Updated"})]})}),(0,r.jsx)("tbody",{children:e.shared.context.map(e=>(0,r.jsxs)("tr",{children:[(0,r.jsx)("td",{className:"mono",children:e.key}),(0,r.jsx)("td",{children:e.value}),(0,r.jsx)("td",{className:"faint nowrap",children:(0,i.Eh)(e.updated_at)})]},e.key))})]})})]})]})}function o(){return(0,r.jsx)("div",{className:"main-scroll",children:(0,r.jsx)(l,{})})}},8280:function(e,t,n){"use strict";n.d(t,{Ct:function(){return s},II:function(){return u},OE:function(){return c},Ph:function(){return h},UW:function(){return x},ZD:function(){return p},Zb:function(){return i},gx:function(){return d},kN:function(){return m},mQ:function(){return f},zx:function(){return l}});var r=n(7437),a=n(6039);function s(e){let{tone:t="neutral",pill:n=!1,dot:a=!1,children:s}=e;return(0,r.jsxs)("span",{className:"badge badge-".concat(t).concat(n?" pill":""),children:[a&&(0,r.jsx)("span",{className:"dot"}),s]})}function c(e){let{status:t}=e;return(0,r.jsx)(s,{tone:(0,a.FH)(t),children:(0,a.Cf)(t)})}function i(e){let{children:t,interactive:n=!1,onClick:a,className:s=""}=e;return(0,r.jsx)("div",{className:"card".concat(n?" interactive":""," ").concat(s).trim(),onClick:a,role:n?"button":void 0,tabIndex:n?0:void 0,children:t})}function l(e){let{variant:t="secondary",size:n="md",onClick:a,disabled:s,type:c="button",children:i}=e;return(0,r.jsx)("button",{type:c,className:"btn btn-".concat(t).concat("sm"===n?" btn-sm":""),onClick:a,disabled:s,children:i})}function o(e){let{label:t,children:n}=e;return(0,r.jsxs)("label",{className:"field",children:[t&&(0,r.jsx)("span",{className:"field-label",children:t}),n]})}function u(e){let{label:t,value:n,onChange:a,placeholder:s,type:c="text",disabled:i}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("input",{className:"input",type:c,value:n,placeholder:s,disabled:i,onChange:e=>a(e.target.value)})})}function d(e){let{label:t,value:n,onChange:a,placeholder:s,rows:c=3}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("textarea",{className:"textarea",value:n,rows:c,placeholder:s,onChange:e=>a(e.target.value)})})}function h(e){let{label:t,value:n,onChange:a,options:s}=e;return(0,r.jsx)(o,{label:t,children:(0,r.jsx)("select",{className:"select",value:n,onChange:e=>a(e.target.value),children:s.map(e=>(0,r.jsx)("option",{value:e.value,children:e.label},e.value))})})}function f(e){let{tabs:t,value:n,onChange:a}=e;return(0,r.jsx)("div",{className:"tabs",role:"tablist",children:t.map(e=>(0,r.jsx)("button",{role:"tab","aria-selected":n===e.value,className:"tab".concat(n===e.value?" active":""),onClick:()=>a(e.value),children:e.label},e.value))})}function m(e){let{value:t,label:n,sub:a,accent:s=!1}=e;return(0,r.jsxs)("div",{children:[(0,r.jsx)("div",{className:"stat-value".concat(s?" accent":""),children:t}),(0,r.jsx)("div",{className:"stat-label",children:n}),a&&(0,r.jsx)("div",{className:"stat-sub",children:a})]})}function x(e){let{tone:t="info",children:n}=e;return(0,r.jsx)("div",{className:"callout callout-".concat(t),children:n})}function p(e){let{on:t,onClick:n}=e;return(0,r.jsx)("button",{type:"button",className:"toggle".concat(t?" on":""),"aria-pressed":t,onClick:n,children:(0,r.jsx)("span",{className:"knob"})})}},6039:function(e,t,n){"use strict";function r(e){switch((null!=e?e:"").toLowerCase()){case"pass":case"done":case"completed":case"approved":case"success":return"success";case"fail":case"failed":case"blocked":case"rejected":case"error":case"crashed":return"danger";case"pending":case"queued":case"running":case"working":case"paused_for_input":return"warning";case"not_applicable":case"unknown":case"":return"neutral";default:return"info"}}n.d(t,{Cf:function(){return s},Eh:function(){return c},FH:function(){return r},Q6:function(){return i},Sy:function(){return l}});let a={paused_for_input:"Needs input",not_applicable:"N/A"};function s(e){let t=(null!=e?e:"").trim();if(!t)return"—";let n=t.toLowerCase();return a[n]?a[n]:n.replace(/_/g," ").replace(/\b\w/g,e=>e.toUpperCase())}function c(e){if(!e)return"—";let t=new Date(e);return Number.isNaN(t.getTime())?String(e):t.toLocaleString(void 0,{year:"numeric",month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}function i(e){return e?e.slice(0,7):"—"}function l(e){if(!e)return"—";let t=new Date(e).getTime();if(Number.isNaN(t))return"—";let n=Math.max(0,Math.floor((Date.now()-t)/1e3));if(n<60)return"".concat(n,"s");let r=Math.floor(n/60);if(r<60)return"".concat(r,"m");let a=Math.floor(r/60);if(a<24)return"".concat(a,"h");let s=Math.floor(a/24);if(s<30)return"".concat(s,"d");let c=Math.floor(s/30);return c<12?"".concat(c,"mo"):"".concat(Math.floor(c/12),"y")}},257:function(e,t,n){"use strict";var r,a;e.exports=(null==(r=n.g.process)?void 0:r.env)&&"object"==typeof(null==(a=n.g.process)?void 0:a.env)?n.g.process:n(4227)},4227:function(e){!function(){var t={229:function(e){var t,n,r,a=e.exports={};function s(){throw Error("setTimeout has not been defined")}function c(){throw Error("clearTimeout has not been defined")}function i(e){if(t===setTimeout)return setTimeout(e,0);if((t===s||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(n){try{return t.call(null,e,0)}catch(n){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:s}catch(e){t=s}try{n="function"==typeof clearTimeout?clearTimeout:c}catch(e){n=c}}();var l=[],o=!1,u=-1;function d(){o&&r&&(o=!1,r.length?l=r.concat(l):u=-1,l.length&&h())}function h(){if(!o){var e=i(d);o=!0;for(var t=l.length;t;){for(r=l,l=[];++u1)for(var n=1;n1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]}),Object.hasOwn||(Object.hasOwn=function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}),"canParse"in URL||(URL.canParse=function(e,t){try{return new URL(e,t),!0}catch(e){return!1}})},1412:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});let n=r(7652),o=r(8796);function a(e,t){return(0,o.normalizePathTrailingSlash)((0,n.addPathPrefix)(e,""))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8878:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}}),r(8796);let n=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n25){window.location.reload();return}clearTimeout(r),r=setTimeout(t,l>5?5e3:1e3)}n&&n.close();let u=(0,o.getSocketUrl)(e.assetPrefix);(n=new window.WebSocket(""+u+e.path)).onopen=function(){l=0,window.console.log("[HMR] connected")},n.onerror=i,n.onclose=i,n.onmessage=function(e){let t=JSON.parse(e.data);for(let e of a)e(t)}}()}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7193:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});let r=function(){for(var e=arguments.length,t=Array(e),r=0;r{let t={};e.forEach(e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+e.props["data-href"]+'"]'))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}let r=t[e.type]||[];r.push(e),t[e.type]=r});let n=t.title?t.title[0]:null,o="";if(n){let{children:e}=n.props;o="string"==typeof e?e:Array.isArray(e)?e.join(""):""}o!==document.title&&(document.title=o),["meta","base","link","style","script"].forEach(e=>{r(e,t[e]||[])})}}}r=(e,t)=>{let r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]"),i=Number(n.content),u=[];for(let t=0,r=n.previousElementSibling;t{for(let t=0,r=u.length;t{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),s.forEach(e=>r.insertBefore(e,n)),n.content=(i-u.length+s.length).toString()},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4500:function(e,t,r){"use strict";let n,o,a,i,u,l,s,c,f,d,p,h;Object.defineProperty(t,"__esModule",{value:!0});let m=r(1757);Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{emitter:function(){return z},hydrate:function(){return ef},initialize:function(){return $},router:function(){return n},version:function(){return G}});let _=r(8754),g=r(5893);r(37);let y=_._(r(7294)),b=_._(r(745)),P=r(77),v=_._(r(8967)),E=r(7171),S=r(2179),O=r(1735),j=r(8600),w=r(5758),R=r(5782),T=r(1493),M=_._(r(2071)),x=_._(r(1413)),I=_._(r(5736)),C=r(3622),A=r(7253),L=r(676),N=r(8261),D=r(1566),k=r(1838),U=r(3068),F=r(2488),B=r(213),H=_._(r(6920)),W=_._(r(7930)),q=_._(r(5179)),G="14.2.15",z=(0,v.default)(),V=e=>[].slice.call(e),X=!1;class Y extends y.default.Component{componentDidCatch(e,t){this.props.fn(e,t)}componentDidMount(){this.scrollToHash(),n.isSsr&&(o.isFallback||o.nextExport&&((0,O.isDynamicRoute)(n.pathname)||location.search||X)||o.props&&o.props.__N_SSG&&(location.search||X))&&n.replace(n.pathname+"?"+String((0,j.assign)((0,j.urlQueryToSearchParams)(n.query),new URLSearchParams(location.search))),a,{_h:1,shallow:!o.isFallback&&!X}).catch(e=>{if(!e.cancelled)throw e})}componentDidUpdate(){this.scrollToHash()}scrollToHash(){let{hash:e}=location;if(!(e=e&&e.substring(1)))return;let t=document.getElementById(e);t&&setTimeout(()=>t.scrollIntoView(),0)}render(){return this.props.children}}async function $(e){void 0===e&&(e={}),W.default.onSpanEnd(q.default),o=JSON.parse(document.getElementById("__NEXT_DATA__").textContent),window.__NEXT_DATA__=o,h=o.defaultLocale;let t=o.assetPrefix||"";if(self.__next_set_public_path__(""+t+"/_next/"),(0,w.setConfig)({serverRuntimeConfig:{},publicRuntimeConfig:o.runtimeConfig||{}}),a=(0,R.getURL)(),(0,k.hasBasePath)(a)&&(a=(0,D.removeBasePath)(a)),o.scriptLoader){let{initScriptLoader:e}=r(5026);e(o.scriptLoader)}i=new x.default(o.buildId,t);let s=e=>{let[t,r]=e;return i.routeLoader.onEntrypoint(t,r)};return window.__NEXT_P&&window.__NEXT_P.map(e=>setTimeout(()=>s(e),0)),window.__NEXT_P=[],window.__NEXT_P.push=s,(l=(0,M.default)()).getIsSsr=()=>n.isSsr,u=document.getElementById("__next"),{assetPrefix:t}}function K(e,t){return(0,g.jsx)(e,{...t})}function J(e){var t;let{children:r}=e,o=y.default.useMemo(()=>(0,F.adaptForAppRouterInstance)(n),[]);return(0,g.jsx)(Y,{fn:e=>Z({App:f,err:e}).catch(e=>console.error("Error rendering page: ",e)),children:(0,g.jsx)(U.AppRouterContext.Provider,{value:o,children:(0,g.jsx)(B.SearchParamsContext.Provider,{value:(0,F.adaptForSearchParams)(n),children:(0,g.jsx)(F.PathnameContextProviderAdapter,{router:n,isAutoExport:null!=(t=self.__NEXT_DATA__.autoExport)&&t,children:(0,g.jsx)(B.PathParamsContext.Provider,{value:(0,F.adaptForPathParams)(n),children:(0,g.jsx)(E.RouterContext.Provider,{value:(0,A.makePublicRouterInstance)(n),children:(0,g.jsx)(P.HeadManagerContext.Provider,{value:l,children:(0,g.jsx)(N.ImageConfigContext.Provider,{value:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0},children:r})})})})})})})})}let Q=e=>t=>{let r={...t,Component:p,err:o.err,router:n};return(0,g.jsx)(J,{children:K(e,r)})};function Z(e){let{App:t,err:u}=e;return console.error(u),console.error("A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred"),i.loadPage("/_error").then(n=>{let{page:o,styleSheets:a}=n;return(null==s?void 0:s.Component)===o?Promise.resolve().then(()=>m._(r(8529))).then(n=>Promise.resolve().then(()=>m._(r(8141))).then(r=>(t=r.default,e.App=t,n))).then(e=>({ErrorComponent:e.default,styleSheets:[]})):{ErrorComponent:o,styleSheets:a}}).then(r=>{var i;let{ErrorComponent:l,styleSheets:s}=r,c=Q(t),f={Component:l,AppTree:c,router:n,ctx:{err:u,pathname:o.page,query:o.query,asPath:a,AppTree:c}};return Promise.resolve((null==(i=e.props)?void 0:i.err)?e.props:(0,R.loadGetInitialProps)(t,f)).then(t=>es({...e,err:u,Component:l,styleSheets:s,props:t}))})}function ee(e){let{callback:t}=e;return y.default.useLayoutEffect(()=>t(),[t]),null}let et={navigationStart:"navigationStart",beforeRender:"beforeRender",afterRender:"afterRender",afterHydrate:"afterHydrate",routeChange:"routeChange"},er={hydration:"Next.js-hydration",beforeHydration:"Next.js-before-hydration",routeChangeToRender:"Next.js-route-change-to-render",render:"Next.js-render"},en=null,eo=!0;function ea(){[et.beforeRender,et.afterHydrate,et.afterRender,et.routeChange].forEach(e=>performance.clearMarks(e))}function ei(){R.ST&&(performance.mark(et.afterHydrate),performance.getEntriesByName(et.beforeRender,"mark").length&&(performance.measure(er.beforeHydration,et.navigationStart,et.beforeRender),performance.measure(er.hydration,et.beforeRender,et.afterHydrate)),d&&performance.getEntriesByName(er.hydration).forEach(d),ea())}function eu(){if(!R.ST)return;performance.mark(et.afterRender);let e=performance.getEntriesByName(et.routeChange,"mark");e.length&&(performance.getEntriesByName(et.beforeRender,"mark").length&&(performance.measure(er.routeChangeToRender,e[0].name,et.beforeRender),performance.measure(er.render,et.beforeRender,et.afterRender),d&&(performance.getEntriesByName(er.render).forEach(d),performance.getEntriesByName(er.routeChangeToRender).forEach(d))),ea(),[er.routeChangeToRender,er.render].forEach(e=>performance.clearMeasures(e)))}function el(e){let{callbacks:t,children:r}=e;return y.default.useLayoutEffect(()=>t.forEach(e=>e()),[t]),y.default.useEffect(()=>{(0,I.default)(d)},[]),r}function es(e){let t,{App:r,Component:o,props:a,err:i}=e,l="initial"in e?void 0:e.styleSheets;o=o||s.Component;let f={...a=a||s.props,Component:o,err:i,router:n};s=f;let d=!1,p=new Promise((e,r)=>{c&&c(),t=()=>{c=null,e()},c=()=>{d=!0,c=null;let e=Error("Cancel rendering route");e.cancelled=!0,r(e)}});function h(){t()}!function(){if(!l)return;let e=new Set(V(document.querySelectorAll("style[data-n-href]")).map(e=>e.getAttribute("data-n-href"))),t=document.querySelector("noscript[data-n-css]"),r=null==t?void 0:t.getAttribute("data-n-css");l.forEach(t=>{let{href:n,text:o}=t;if(!e.has(n)){let e=document.createElement("style");e.setAttribute("data-n-href",n),e.setAttribute("media","x"),r&&e.setAttribute("nonce",r),document.head.appendChild(e),e.appendChild(document.createTextNode(o))}})}();let m=(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(ee,{callback:function(){if(l&&!d){let e=new Set(l.map(e=>e.href)),t=V(document.querySelectorAll("style[data-n-href]")),r=t.map(e=>e.getAttribute("data-n-href"));for(let n=0;n{let{href:t}=e,r=document.querySelector('style[data-n-href="'+t+'"]');r&&(n.parentNode.insertBefore(r,n.nextSibling),n=r)}),V(document.querySelectorAll("link[data-n-p]")).forEach(e=>{e.parentNode.removeChild(e)})}if(e.scroll){let{x:t,y:r}=e.scroll;(0,S.handleSmoothScroll)(()=>{window.scrollTo(t,r)})}}}),(0,g.jsxs)(J,{children:[K(r,f),(0,g.jsx)(T.Portal,{type:"next-route-announcer",children:(0,g.jsx)(C.RouteAnnouncer,{})})]})]});return!function(e,t){R.ST&&performance.mark(et.beforeRender);let r=t(eo?ei:eu);en?(0,y.default.startTransition)(()=>{en.render(r)}):(en=b.default.hydrateRoot(e,r,{onRecoverableError:H.default}),eo=!1)}(u,e=>(0,g.jsx)(el,{callbacks:[e,h],children:(0,g.jsx)(y.default.StrictMode,{children:m})})),p}async function ec(e){if(e.err&&(void 0===e.Component||!e.isHydratePass)){await Z(e);return}try{await es(e)}catch(r){let t=(0,L.getProperError)(r);if(t.cancelled)throw t;await Z({...e,err:t})}}async function ef(e){let t=o.err;try{let e=await i.routeLoader.whenEntrypoint("/_app");if("error"in e)throw e.error;let{component:t,exports:r}=e;f=t,r&&r.reportWebVitals&&(d=e=>{let t,{id:n,name:o,startTime:a,value:i,duration:u,entryType:l,entries:s,attribution:c}=e,f=Date.now()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12);s&&s.length&&(t=s[0].startTime);let d={id:n||f,name:o,startTime:a||t,value:null==i?u:i,label:"mark"===l||"measure"===l?"custom":"web-vital"};c&&(d.attribution=c),r.reportWebVitals(d)});let n=await i.routeLoader.whenEntrypoint(o.page);if("error"in n)throw n.error;p=n.component}catch(e){t=(0,L.getProperError)(e)}window.__NEXT_PRELOADREADY&&await window.__NEXT_PRELOADREADY(o.dynamicIds),n=(0,A.createRouter)(o.page,o.query,a,{initialProps:o.props,pageLoader:i,App:f,Component:p,wrapApp:Q,err:t,isFallback:!!o.isFallback,subscription:(e,t,r)=>ec(Object.assign({},e,{App:t,scroll:r})),locale:o.locale,locales:o.locales,defaultLocale:h,domainLocales:o.domainLocales,isPreview:o.isPreview}),X=await n._initialMatchesMiddlewarePromise;let r={App:f,initial:!0,Component:p,props:o.props,err:t,isHydratePass:!0};(null==e?void 0:e.beforeRender)&&await e.beforeRender(),ec(r)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2288:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9151);let n=r(4500);window.next={version:n.version,get router(){return n.router},emitter:n.emitter},(0,n.initialize)({}).then(()=>(0,n.hydrate)()).catch(console.error),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8796:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return a}});let n=r(3575),o=r(626),a=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:r,hash:a}=(0,o.parsePath)(e);return/\.[^/]+\/?$/.test(t)?""+(0,n.removeTrailingSlash)(t)+r+a:t.endsWith("/")?""+t+r+a:t+"/"+r+a};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6920:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let n=r(5575);function o(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};(0,n.isBailoutToCSRError)(e)||t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1413:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return d}});let n=r(8754),o=r(1412),a=r(7399),i=n._(r(116)),u=r(8878),l=r(1735),s=r(2757),c=r(3575),f=r(2856);r(5104);class d{getPageList(){return(0,f.getClientBuildManifest)().then(e=>e.sortedPages)}getMiddleware(){return window.__MIDDLEWARE_MATCHERS=[],window.__MIDDLEWARE_MATCHERS}getDataHref(e){let{asPath:t,href:r,locale:n}=e,{pathname:f,query:d,search:p}=(0,s.parseRelativeUrl)(r),{pathname:h}=(0,s.parseRelativeUrl)(t),m=(0,c.removeTrailingSlash)(f);if("/"!==m[0])throw Error('Route name should start with a "/", got "'+m+'"');return(e=>{let t=(0,i.default)((0,c.removeTrailingSlash)((0,u.addLocale)(e,n)),".json");return(0,o.addBasePath)("/_next/data/"+this.buildId+t+p,!0)})(e.skipInterpolation?h:(0,l.isDynamicRoute)(m)?(0,a.interpolateAs)(f,h,d).result:m)}_isSsg(e){return this.promisedSsgManifest.then(t=>t.has(e))}loadPage(e){return this.routeLoader.loadRoute(e).then(e=>{if("component"in e)return{page:e.component,mod:e.exports,styleSheets:e.styles.map(e=>({href:e.href,text:e.content}))};throw e.error})}prefetch(e){return this.routeLoader.prefetch(e)}constructor(e,t){this.routeLoader=(0,f.createRouteLoader)(t),this.buildId=e,this.assetPrefix=t,this.promisedSsgManifest=new Promise(e=>{window.__SSG_MANIFEST?e(window.__SSG_MANIFEST):window.__SSG_MANIFEST_CB=()=>{e(window.__SSG_MANIFEST)}})}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5736:function(e,t,r){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let o=["CLS","FCP","FID","INP","LCP","TTFB"];location.href;let a=!1;function i(e){n&&n(e)}let u=e=>{if(n=e,!a)for(let e of(a=!0,o))try{let t;t||(t=r(8018)),t["on"+e](i)}catch(t){console.warn("Failed to track "+e+" web-vital",t)}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1493:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Portal",{enumerable:!0,get:function(){return a}});let n=r(7294),o=r(3935),a=e=>{let{children:t,type:r}=e,[a,i]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let e=document.createElement(r);return document.body.appendChild(e),i(e),()=>{document.body.removeChild(e)}},[r]),a?(0,o.createPortal)(t,a):null};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1566:function(e,t,r){"use strict";function n(e){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return n}}),r(1838),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4509:function(e,t,r){"use strict";function n(e,t){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeLocale",{enumerable:!0,get:function(){return n}}),r(626),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6078:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{cancelIdleCallback:function(){return n},requestIdleCallback:function(){return r}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4813:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});let n=r(8600),o=r(5058),a=r(2795),i=r(5782),u=r(8796),l=r(5853),s=r(2189),c=r(7399);function f(e,t,r){let f;let d="string"==typeof t?t:(0,o.formatWithValidation)(t),p=d.match(/^[a-zA-Z]{1,}:\/\//),h=p?d.slice(p[0].length):d;if((h.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+d+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,i.normalizeRepeatedSlashes)(h);d=(p?p[0]:"")+t}if(!(0,l.isLocalURL)(d))return r?[d]:d;try{f=new URL(d.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){f=new URL("/","http://n")}try{let e=new URL(d,f);e.pathname=(0,u.normalizePathTrailingSlash)(e.pathname);let t="";if((0,s.isDynamicRoute)(e.pathname)&&e.searchParams&&r){let r=(0,n.searchParamsToUrlQuery)(e.searchParams),{result:i,params:u}=(0,c.interpolateAs)(e.pathname,e.pathname,r);i&&(t=(0,o.formatWithValidation)({pathname:i,hash:e.hash,query:(0,a.omit)(r,u)}))}let i=e.origin===f.origin?e.href.slice(e.origin.length):e.href;return r?[i,t||i]:i}catch(e){return r?[d]:d}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3622:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RouteAnnouncer:function(){return l},default:function(){return s}});let n=r(8754),o=r(5893),a=n._(r(7294)),i=r(7253),u={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",top:0,width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},l=()=>{let{asPath:e}=(0,i.useRouter)(),[t,r]=a.default.useState(""),n=a.default.useRef(e);return a.default.useEffect(()=>{if(n.current!==e){if(n.current=e,document.title)r(document.title);else{var t;let n=document.querySelector("h1");r((null!=(t=null==n?void 0:n.innerText)?t:null==n?void 0:n.textContent)||e)}}},[e]),(0,o.jsx)("p",{"aria-live":"assertive",id:"__next-route-announcer__",role:"alert",style:u,children:t})},s=l;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2856:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createRouteLoader:function(){return m},getClientBuildManifest:function(){return p},isAssetError:function(){return s},markAssetError:function(){return l}}),r(8754),r(116);let n=r(2518),o=r(6078),a=r(4878);function i(e,t,r){let n,o=t.get(e);if(o)return"future"in o?o.future:Promise.resolve(o);let a=new Promise(e=>{n=e});return t.set(e,o={resolve:n,future:a}),r?r().then(e=>(n(e),e)).catch(r=>{throw t.delete(e),r}):a}let u=Symbol("ASSET_LOAD_ERROR");function l(e){return Object.defineProperty(e,u,{})}function s(e){return e&&u in e}let c=function(e){try{return e=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||e.relList.supports("prefetch")}catch(e){return!1}}(),f=()=>(0,a.getDeploymentIdQueryOrEmptyString)();function d(e,t,r){return new Promise((n,a)=>{let i=!1;e.then(e=>{i=!0,n(e)}).catch(a),(0,o.requestIdleCallback)(()=>setTimeout(()=>{i||a(r)},t))})}function p(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):d(new Promise(e=>{let t=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{e(self.__BUILD_MANIFEST),t&&t()}}),3800,l(Error("Failed to load client build manifest")))}function h(e,t){return p().then(r=>{if(!(t in r))throw l(Error("Failed to lookup route: "+t));let o=r[t].map(t=>e+"/_next/"+encodeURI(t));return{scripts:o.filter(e=>e.endsWith(".js")).map(e=>(0,n.__unsafeCreateTrustedScriptURL)(e)+f()),css:o.filter(e=>e.endsWith(".css")).map(e=>e+f())}})}function m(e){let t=new Map,r=new Map,n=new Map,a=new Map;function u(e){{var t;let n=r.get(e.toString());return n||(document.querySelector('script[src^="'+e+'"]')?Promise.resolve():(r.set(e.toString(),n=new Promise((r,n)=>{(t=document.createElement("script")).onload=r,t.onerror=()=>n(l(Error("Failed to load script: "+e))),t.crossOrigin=void 0,t.src=e,document.body.appendChild(t)})),n))}}function s(e){let t=n.get(e);return t||n.set(e,t=fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw Error("Failed to load stylesheet: "+e);return t.text().then(t=>({href:e,content:t}))}).catch(e=>{throw l(e)})),t}return{whenEntrypoint:e=>i(e,t),onEntrypoint(e,r){(r?Promise.resolve().then(()=>r()).then(e=>({component:e&&e.default||e,exports:e}),e=>({error:e})):Promise.resolve(void 0)).then(r=>{let n=t.get(e);n&&"resolve"in n?r&&(t.set(e,r),n.resolve(r)):(r?t.set(e,r):t.delete(e),a.delete(e))})},loadRoute(r,n){return i(r,a,()=>{let o;return d(h(e,r).then(e=>{let{scripts:n,css:o}=e;return Promise.all([t.has(r)?[]:Promise.all(n.map(u)),Promise.all(o.map(s))])}).then(e=>this.whenEntrypoint(r).then(t=>({entrypoint:t,styles:e[1]}))),3800,l(Error("Route did not complete loading: "+r))).then(e=>{let{entrypoint:t,styles:r}=e,n=Object.assign({styles:r},t);return"error"in t?t:n}).catch(e=>{if(n)throw e;return{error:e}}).finally(()=>null==o?void 0:o())})},prefetch(t){let r;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():h(e,t).then(e=>Promise.all(c?e.scripts.map(e=>{var t,r,n;return t=e.toString(),r="script",new Promise((e,o)=>{if(document.querySelector('\n link[rel="prefetch"][href^="'+t+'"],\n link[rel="preload"][href^="'+t+'"],\n script[src^="'+t+'"]'))return e();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=e,n.onerror=()=>o(l(Error("Failed to prefetch: "+t))),n.href=t,document.head.appendChild(n)})}):[])).then(()=>{(0,o.requestIdleCallback)(()=>this.loadRoute(t,!0).catch(()=>{}))}).catch(()=>{})}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7253:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{Router:function(){return a.default},createRouter:function(){return m},default:function(){return p},makePublicRouterInstance:function(){return _},useRouter:function(){return h},withRouter:function(){return l.default}});let n=r(8754),o=n._(r(7294)),a=n._(r(9668)),i=r(7171),u=n._(r(676)),l=n._(r(538)),s={router:null,readyCallbacks:[],ready(e){if(this.router)return e();this.readyCallbacks.push(e)}},c=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],f=["push","replace","reload","back","prefetch","beforePopState"];function d(){if(!s.router)throw Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n');return s.router}Object.defineProperty(s,"events",{get:()=>a.default.events}),c.forEach(e=>{Object.defineProperty(s,e,{get:()=>d()[e]})}),f.forEach(e=>{s[e]=function(){for(var t=arguments.length,r=Array(t),n=0;n{s.ready(()=>{a.default.events.on(e,function(){for(var t=arguments.length,r=Array(t),n=0;ne()),s.readyCallbacks=[],s.router}function _(e){let t={};for(let r of c){if("object"==typeof e[r]){t[r]=Object.assign(Array.isArray(e[r])?[]:{},e[r]);continue}t[r]=e[r]}return t.events=a.default.events,f.forEach(r=>{t[r]=function(){for(var t=arguments.length,n=Array(t),o=0;o{if(i.default.preinit){e.forEach(e=>{i.default.preinit(e,{as:"style"})});return}{let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}},m=e=>{let{src:t,id:r,onLoad:n=()=>{},onReady:o=null,dangerouslySetInnerHTML:a,children:i="",strategy:u="afterInteractive",onError:l,stylesheets:c}=e,m=r||t;if(m&&d.has(m))return;if(f.has(t)){d.add(m),f.get(t).then(n,l);return}let _=()=>{o&&o(),d.add(m)},g=document.createElement("script"),y=new Promise((e,t)=>{g.addEventListener("load",function(t){e(),n&&n.call(this,t),_()}),g.addEventListener("error",function(e){t(e)})}).catch(function(e){l&&l(e)});for(let[r,n]of(a?(g.innerHTML=a.__html||"",_()):i?(g.textContent="string"==typeof i?i:Array.isArray(i)?i.join(""):"",_()):t&&(g.src=t,f.set(t,y)),Object.entries(e))){if(void 0===n||p.includes(r))continue;let e=s.DOMAttributeNames[r]||r.toLowerCase();g.setAttribute(e,n)}"worker"===u&&g.setAttribute("type","text/partytown"),g.setAttribute("data-nscript",u),c&&h(c),document.body.appendChild(g)};function _(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>m(e))}):m(e)}function g(e){e.forEach(_),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");d.add(t)})}function y(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:o=null,strategy:s="afterInteractive",onError:f,stylesheets:p,...h}=e,{updateScripts:_,scripts:g,getIsSsr:y,appDir:b,nonce:P}=(0,u.useContext)(l.HeadManagerContext),v=(0,u.useRef)(!1);(0,u.useEffect)(()=>{let e=t||r;v.current||(o&&e&&d.has(e)&&o(),v.current=!0)},[o,t,r]);let E=(0,u.useRef)(!1);if((0,u.useEffect)(()=>{!E.current&&("afterInteractive"===s?m(e):"lazyOnload"===s&&("complete"===document.readyState?(0,c.requestIdleCallback)(()=>m(e)):window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>m(e))})),E.current=!0)},[e,s]),("beforeInteractive"===s||"worker"===s)&&(_?(g[s]=(g[s]||[]).concat([{id:t,src:r,onLoad:n,onReady:o,onError:f,...h}]),_(g)):y&&y()?d.add(t||r):y&&!y()&&m(e)),b){if(p&&p.forEach(e=>{i.default.preinit(e,{as:"style"})}),"beforeInteractive"===s)return r?(i.default.preload(r,h.integrity?{as:"script",integrity:h.integrity,nonce:P,crossOrigin:h.crossOrigin}:{as:"script",nonce:P,crossOrigin:h.crossOrigin}),(0,a.jsx)("script",{nonce:P,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([r,{...h,id:t}])+")"}})):(h.dangerouslySetInnerHTML&&(h.children=h.dangerouslySetInnerHTML.__html,delete h.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:P,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...h,id:t}])+")"}}));"afterInteractive"===s&&r&&i.default.preload(r,h.integrity?{as:"script",integrity:h.integrity,nonce:P,crossOrigin:h.crossOrigin}:{as:"script",nonce:P,crossOrigin:h.crossOrigin})}return null}Object.defineProperty(y,"__nextScript",{value:!0});let b=y;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5179:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let n=r(5303);function o(e){if("ended"!==e.state.state)throw Error("Expected span to be ended");(0,n.sendMessage)(JSON.stringify({event:"span-end",startTime:e.startTime,endTime:e.state.endTime,spanName:e.name,attributes:e.attributes}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7930:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(8754)._(r(8967));class o{end(e){if("ended"===this.state.state)throw Error("Span has already ended");this.state={state:"ended",endTime:null!=e?e:Date.now()},this.onSpanEnd(this)}constructor(e,t,r){var n,o;this.name=e,this.attributes=null!=(n=t.attributes)?n:{},this.startTime=null!=(o=t.startTime)?o:Date.now(),this.onSpanEnd=r,this.state={state:"inprogress"}}}class a{startSpan(e,t){return new o(e,t,this.handleSpanEnd)}onSpanEnd(e){return this._emitter.on("spanend",e),()=>{this._emitter.off("spanend",e)}}constructor(){this._emitter=(0,n.default)(),this.handleSpanEnd=e=>{this._emitter.emit("spanend",e)}}}let i=new a;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2518:function(e,t){"use strict";let r;function n(e){var t;return(null==(t=function(){if(void 0===r){var e;r=(null==(e=window.trustedTypes)?void 0:e.createPolicy("nextjs",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e}))||null}return r}())?void 0:t.createScriptURL(e))||e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"__unsafeCreateTrustedScriptURL",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9151:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(4878),self.__next_set_public_path__=e=>{r.p=e},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},538:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}}),r(8754);let n=r(5893);r(7294);let o=r(7253);function a(e){function t(t){return(0,n.jsx)(e,{router:(0,o.useRouter)(),...t})}return t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8141:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let n=r(8754),o=r(5893),a=n._(r(7294)),i=r(5782);async function u(e){let{Component:t,ctx:r}=e;return{pageProps:await (0,i.loadGetInitialProps)(t,r)}}class l extends a.default.Component{render(){let{Component:e,pageProps:t}=this.props;return(0,o.jsx)(e,{...t})}}l.origGetInitialProps=u,l.getInitialProps=u,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8529:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return c}});let n=r(8754),o=r(5893),a=n._(r(7294)),i=n._(r(494)),u={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function l(e){let{res:t,err:r}=e;return{statusCode:t&&t.statusCode?t.statusCode:r?r.statusCode:404}}let s={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}};class c extends a.default.Component{render(){let{statusCode:e,withDarkMode:t=!0}=this.props,r=this.props.title||u[e]||"An unexpected error has occurred";return(0,o.jsxs)("div",{style:s.error,children:[(0,o.jsx)(i.default,{children:(0,o.jsx)("title",{children:e?e+": "+r:"Application error: a client-side exception has occurred"})}),(0,o.jsxs)("div",{style:s.desc,children:[(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(t?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),e?(0,o.jsx)("h1",{className:"next-error-h1",style:s.h1,children:e}):null,(0,o.jsx)("div",{style:s.wrap,children:(0,o.jsxs)("h2",{style:s.h2,children:[this.props.title||e?r:(0,o.jsx)(o.Fragment,{children:"Application error: a client-side exception has occurred (see the browser console for more information)"}),"."]})})]})]})}}c.displayName="ErrorPage",c.getInitialProps=l,c.origGetInitialProps=l,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5010:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return n}});let n=r(8754)._(r(7294)).default.createContext({})},8579:function(e,t){"use strict";function r(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return r}})},3068:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return a},MissingSlotContext:function(){return l},TemplateContext:function(){return u}});let n=r(8754)._(r(7294)),o=n.default.createContext(null),a=n.default.createContext(null),i=n.default.createContext(null),u=n.default.createContext(null),l=n.default.createContext(new Set)},9970:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BloomFilter",{enumerable:!0,get:function(){return r}});class r{static from(e,t){void 0===t&&(t=1e-4);let n=new r(e.length,t);for(let t of e)n.add(t);return n}export(){return{numItems:this.numItems,errorRate:this.errorRate,numBits:this.numBits,numHashes:this.numHashes,bitArray:this.bitArray}}import(e){this.numItems=e.numItems,this.errorRate=e.errorRate,this.numBits=e.numBits,this.numHashes=e.numHashes,this.bitArray=e.bitArray}add(e){this.getHashValues(e).forEach(e=>{this.bitArray[e]=1})}contains(e){return this.getHashValues(e).every(e=>this.bitArray[e])}getHashValues(e){let t=[];for(let r=1;r<=this.numHashes;r++){let n=function(e){let t=0;for(let r=0;r>>13,t=Math.imul(t,1540483477);return t>>>0}(""+e+r)%this.numBits;t.push(n)}return t}constructor(e,t=1e-4){this.numItems=e,this.errorRate=t,this.numBits=Math.ceil(-(e*Math.log(t))/(Math.log(2)*Math.log(2))),this.numHashes=Math.ceil(this.numBits/e*Math.log(2)),this.bitArray=Array(this.numBits).fill(0)}}},5104:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{APP_BUILD_MANIFEST:function(){return y},APP_CLIENT_INTERNALS:function(){return $},APP_PATHS_MANIFEST:function(){return m},APP_PATH_ROUTES_MANIFEST:function(){return _},AUTOMATIC_FONT_OPTIMIZATION_MANIFEST:function(){return C},BARREL_OPTIMIZATION_PREFIX:function(){return H},BLOCKED_PAGES:function(){return D},BUILD_ID_FILE:function(){return N},BUILD_MANIFEST:function(){return g},CLIENT_PUBLIC_FILES_PATH:function(){return k},CLIENT_REFERENCE_MANIFEST:function(){return W},CLIENT_STATIC_FILES_PATH:function(){return U},CLIENT_STATIC_FILES_RUNTIME_AMP:function(){return J},CLIENT_STATIC_FILES_RUNTIME_MAIN:function(){return X},CLIENT_STATIC_FILES_RUNTIME_MAIN_APP:function(){return Y},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS:function(){return Z},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL:function(){return ee},CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH:function(){return K},CLIENT_STATIC_FILES_RUNTIME_WEBPACK:function(){return Q},COMPILER_INDEXES:function(){return a},COMPILER_NAMES:function(){return o},CONFIG_FILES:function(){return L},DEFAULT_RUNTIME_WEBPACK:function(){return et},DEFAULT_SANS_SERIF_FONT:function(){return el},DEFAULT_SERIF_FONT:function(){return eu},DEV_CLIENT_PAGES_MANIFEST:function(){return T},DEV_MIDDLEWARE_MANIFEST:function(){return x},EDGE_RUNTIME_WEBPACK:function(){return er},EDGE_UNSUPPORTED_NODE_APIS:function(){return ep},EXPORT_DETAIL:function(){return S},EXPORT_MARKER:function(){return E},FUNCTIONS_CONFIG_MANIFEST:function(){return b},GOOGLE_FONT_PROVIDER:function(){return ea},IMAGES_MANIFEST:function(){return w},INTERCEPTION_ROUTE_REWRITE_MANIFEST:function(){return V},MIDDLEWARE_BUILD_MANIFEST:function(){return G},MIDDLEWARE_MANIFEST:function(){return M},MIDDLEWARE_REACT_LOADABLE_MANIFEST:function(){return z},MODERN_BROWSERSLIST_TARGET:function(){return n.default},NEXT_BUILTIN_DOCUMENT:function(){return B},NEXT_FONT_MANIFEST:function(){return v},OPTIMIZED_FONT_PROVIDERS:function(){return ei},PAGES_MANIFEST:function(){return h},PHASE_DEVELOPMENT_SERVER:function(){return f},PHASE_EXPORT:function(){return l},PHASE_INFO:function(){return p},PHASE_PRODUCTION_BUILD:function(){return s},PHASE_PRODUCTION_SERVER:function(){return c},PHASE_TEST:function(){return d},PRERENDER_MANIFEST:function(){return O},REACT_LOADABLE_MANIFEST:function(){return I},ROUTES_MANIFEST:function(){return j},RSC_MODULE_TYPES:function(){return ed},SERVER_DIRECTORY:function(){return A},SERVER_FILES_MANIFEST:function(){return R},SERVER_PROPS_ID:function(){return eo},SERVER_REFERENCE_MANIFEST:function(){return q},STATIC_PROPS_ID:function(){return en},STATIC_STATUS_PAGES:function(){return es},STRING_LITERAL_DROP_BUNDLE:function(){return F},SUBRESOURCE_INTEGRITY_MANIFEST:function(){return P},SYSTEM_ENTRYPOINTS:function(){return eh},TRACE_OUTPUT_VERSION:function(){return ec},TURBO_TRACE_DEFAULT_MEMORY_LIMIT:function(){return ef},UNDERSCORE_NOT_FOUND_ROUTE:function(){return i},UNDERSCORE_NOT_FOUND_ROUTE_ENTRY:function(){return u}});let n=r(8754)._(r(979)),o={client:"client",server:"server",edgeServer:"edge-server"},a={[o.client]:0,[o.server]:1,[o.edgeServer]:2},i="/_not-found",u=""+i+"/page",l="phase-export",s="phase-production-build",c="phase-production-server",f="phase-development-server",d="phase-test",p="phase-info",h="pages-manifest.json",m="app-paths-manifest.json",_="app-path-routes-manifest.json",g="build-manifest.json",y="app-build-manifest.json",b="functions-config-manifest.json",P="subresource-integrity-manifest",v="next-font-manifest",E="export-marker.json",S="export-detail.json",O="prerender-manifest.json",j="routes-manifest.json",w="images-manifest.json",R="required-server-files.json",T="_devPagesManifest.json",M="middleware-manifest.json",x="_devMiddlewareManifest.json",I="react-loadable-manifest.json",C="font-manifest.json",A="server",L=["next.config.js","next.config.mjs"],N="BUILD_ID",D=["/_document","/_app","/_error"],k="public",U="static",F="__NEXT_DROP_CLIENT_FILE__",B="__NEXT_BUILTIN_DOCUMENT__",H="__barrel_optimize__",W="client-reference-manifest",q="server-reference-manifest",G="middleware-build-manifest",z="middleware-react-loadable-manifest",V="interception-route-rewrite-manifest",X="main",Y=""+X+"-app",$="app-pages-internals",K="react-refresh",J="amp",Q="webpack",Z="polyfills",ee=Symbol(Z),et="webpack-runtime",er="edge-runtime-webpack",en="__N_SSG",eo="__N_SSP",ea="https://fonts.googleapis.com/",ei=[{url:ea,preconnect:"https://fonts.gstatic.com"},{url:"https://use.typekit.net",preconnect:"https://use.typekit.net"}],eu={name:"Times New Roman",xAvgCharWidth:821,azAvgWidth:854.3953488372093,unitsPerEm:2048},el={name:"Arial",xAvgCharWidth:904,azAvgWidth:934.5116279069767,unitsPerEm:2048},es=["/500"],ec=1,ef=6e3,ed={client:"client",server:"server"},ep=["clearImmediate","setImmediate","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","DecompressionStream","DomException","MessageChannel","MessageEvent","MessagePort","ReadableByteStreamController","ReadableStreamBYOBRequest","ReadableStreamDefaultController","TransformStreamDefaultController","WritableStreamDefaultController"],eh=new Set([X,K,J,Y]);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4592:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return o}});let r=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function o(e){return r.test(e)?e.replace(n,"\\$&"):e}},77:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return n}});let n=r(8754)._(r(7294)).default.createContext({})},494:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return m},defaultHead:function(){return f}});let n=r(8754),o=r(1757),a=r(5893),i=o._(r(7294)),u=n._(r(3657)),l=r(5010),s=r(77),c=r(8579);function f(e){void 0===e&&(e=!1);let t=[(0,a.jsx)("meta",{charSet:"utf-8"})];return e||t.push((0,a.jsx)("meta",{name:"viewport",content:"width=device-width"})),t}function d(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===i.default.Fragment?e.concat(i.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}r(9784);let p=["name","httpEquiv","charSet","itemProp"];function h(e,t){let{inAmpMode:r}=t;return e.reduce(d,[]).reverse().concat(f(r).reverse()).filter(function(){let e=new Set,t=new Set,r=new Set,n={};return o=>{let a=!0,i=!1;if(o.key&&"number"!=typeof o.key&&o.key.indexOf("$")>0){i=!0;let t=o.key.slice(o.key.indexOf("$")+1);e.has(t)?a=!1:e.add(t)}switch(o.type){case"title":case"base":t.has(o.type)?a=!1:t.add(o.type);break;case"meta":for(let e=0,t=p.length;e{let n=e.key||t;if(!r&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,i.default.cloneElement(e,t)}return i.default.cloneElement(e,{key:n})})}let m=function(e){let{children:t}=e,r=(0,i.useContext)(l.AmpStateContext),n=(0,i.useContext)(s.HeadManagerContext);return(0,a.jsx)(u.default,{reduceComponentsToState:h,headManager:n,inAmpMode:(0,c.isInAmpMode)(r),children:t})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},213:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PathParamsContext:function(){return i},PathnameContext:function(){return a},SearchParamsContext:function(){return o}});let n=r(7294),o=(0,n.createContext)(null),a=(0,n.createContext)(null),i=(0,n.createContext)(null)},1623:function(e,t){"use strict";function r(e,t){let r;let n=e.split("/");return(t||[]).some(t=>!!n[1]&&n[1].toLowerCase()===t.toLowerCase()&&(r=t,n.splice(1,1),e=n.join("/")||"/",!0)),{pathname:e,detectedLocale:r}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}})},8261:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return a}});let n=r(8754)._(r(7294)),o=r(4666),a=n.default.createContext(o.imageConfigDefault)},4666:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});let r=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],unoptimized:!1}},8299:function(e,t){"use strict";function r(e){return Object.prototype.toString.call(e)}function n(e){if("[object Object]"!==r(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getObjectClassLabel:function(){return r},isPlainObject:function(){return n}})},5575:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{BailoutToCSRError:function(){return n},isBailoutToCSRError:function(){return o}});let r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class n extends Error{constructor(e){super("Bail out to client-side rendering: "+e),this.reason=e,this.digest=r}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===r}},8967:function(e,t){"use strict";function r(){let e=Object.create(null);return{on(t,r){(e[t]||(e[t]=[])).push(r)},off(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o{e(...n)})}}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},979:function(e){"use strict";e.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},3349:function(e,t){"use strict";function r(e){let t=(null==e?void 0:e.replace(/^\/+|\/+$/g,""))||!1;if(!t)return"";if(URL.canParse(t)){let e=new URL(t).toString();return e.endsWith("/")?e.slice(0,-1):e}return"/"+t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizedAssetPrefix",{enumerable:!0,get:function(){return r}})},5876:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"denormalizePagePath",{enumerable:!0,get:function(){return a}});let n=r(2189),o=r(4212);function a(e){let t=(0,o.normalizePathSep)(e);return t.startsWith("/index/")&&!(0,n.isDynamicRoute)(t)?t.slice(6):"/index"!==t?t:"/"}},5078:function(e,t){"use strict";function r(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return r}})},4212:function(e,t){"use strict";function r(e){return e.replace(/\\/g,"/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathSep",{enumerable:!0,get:function(){return r}})},7171:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return n}});let n=r(8754)._(r(7294)).default.createContext(null)},2488:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PathnameContextProviderAdapter:function(){return p},adaptForAppRouterInstance:function(){return c},adaptForPathParams:function(){return d},adaptForSearchParams:function(){return f}});let n=r(1757),o=r(5893),a=n._(r(7294)),i=r(213),u=r(2189),l=r(4232),s=r(6309);function c(e){return{back(){e.back()},forward(){e.forward()},refresh(){e.reload()},fastRefresh(){},push(t,r){let{scroll:n}=void 0===r?{}:r;e.push(t,void 0,{scroll:n})},replace(t,r){let{scroll:n}=void 0===r?{}:r;e.replace(t,void 0,{scroll:n})},prefetch(t){e.prefetch(t)}}}function f(e){return e.isReady&&e.query?(0,l.asPathToSearchParams)(e.asPath):new URLSearchParams}function d(e){if(!e.isReady||!e.query)return null;let t={};for(let r of Object.keys((0,s.getRouteRegex)(e.pathname).groups))t[r]=e.query[r];return t}function p(e){let{children:t,router:r,...n}=e,l=(0,a.useRef)(n.isAutoExport),s=(0,a.useMemo)(()=>{let e;let t=l.current;if(t&&(l.current=!1),(0,u.isDynamicRoute)(r.pathname)&&(r.isFallback||t&&!r.isReady))return null;try{e=new URL(r.asPath,"http://f")}catch(e){return"/"}return e.pathname},[r.asPath,r.isFallback,r.isReady,r.pathname]);return(0,o.jsx)(i.PathnameContext.Provider,{value:s,children:t})}},9668:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createKey:function(){return q},default:function(){return V},matchesMiddleware:function(){return N}});let n=r(8754),o=r(1757),a=r(3575),i=r(2856),u=r(5026),l=o._(r(676)),s=r(5876),c=r(1623),f=n._(r(8967)),d=r(5782),p=r(1735),h=r(2757);r(2431);let m=r(3323),_=r(6309),g=r(5058);r(7193);let y=r(626),b=r(8878),P=r(4509),v=r(1566),E=r(1412),S=r(1838),O=r(4813),j=r(9423),w=r(3209),R=r(5604),T=r(9012),M=r(5853),x=r(6312),I=r(2795),C=r(7399),A=r(2179);function L(){return Object.assign(Error("Route Cancelled"),{cancelled:!0})}async function N(e){let t=await Promise.resolve(e.router.pageLoader.getMiddleware());if(!t)return!1;let{pathname:r}=(0,y.parsePath)(e.asPath),n=(0,S.hasBasePath)(r)?(0,v.removeBasePath)(r):r,o=(0,E.addBasePath)((0,b.addLocale)(n,e.locale));return t.some(e=>new RegExp(e.regexp).test(o))}function D(e){let t=(0,d.getLocationOrigin)();return e.startsWith(t)?e.substring(t.length):e}function k(e,t,r){let[n,o]=(0,O.resolveHref)(e,t,!0),a=(0,d.getLocationOrigin)(),i=n.startsWith(a),u=o&&o.startsWith(a);n=D(n),o=o?D(o):o;let l=i?n:(0,E.addBasePath)(n),s=r?D((0,O.resolveHref)(e,r)):o||n;return{url:l,as:u?s:(0,E.addBasePath)(s)}}function U(e,t){let r=(0,a.removeTrailingSlash)((0,s.denormalizePagePath)(e));return"/404"===r||"/_error"===r?e:(t.includes(r)||t.some(t=>{if((0,p.isDynamicRoute)(t)&&(0,_.getRouteRegex)(t).re.test(r))return e=t,!0}),(0,a.removeTrailingSlash)(e))}async function F(e){if(!await N(e)||!e.fetchData)return null;let t=await e.fetchData(),r=await function(e,t,r){let n={basePath:r.router.basePath,i18n:{locales:r.router.locales},trailingSlash:!0},o=t.headers.get("x-nextjs-rewrite"),u=o||t.headers.get("x-nextjs-matched-path"),l=t.headers.get("x-matched-path");if(!l||u||l.includes("__next_data_catchall")||l.includes("/_error")||l.includes("/404")||(u=l),u){if(u.startsWith("/")){let t=(0,h.parseRelativeUrl)(u),l=(0,w.getNextPathnameInfo)(t.pathname,{nextConfig:n,parseData:!0}),s=(0,a.removeTrailingSlash)(l.pathname);return Promise.all([r.router.pageLoader.getPageList(),(0,i.getClientBuildManifest)()]).then(a=>{let[i,{__rewrites:u}]=a,f=(0,b.addLocale)(l.pathname,l.locale);if((0,p.isDynamicRoute)(f)||!o&&i.includes((0,c.normalizeLocalePath)((0,v.removeBasePath)(f),r.router.locales).pathname)){let r=(0,w.getNextPathnameInfo)((0,h.parseRelativeUrl)(e).pathname,{nextConfig:n,parseData:!0});f=(0,E.addBasePath)(r.pathname),t.pathname=f}if(!i.includes(s)){let e=U(s,i);e!==s&&(s=e)}let d=i.includes(s)?s:U((0,c.normalizeLocalePath)((0,v.removeBasePath)(t.pathname),r.router.locales).pathname,i);if((0,p.isDynamicRoute)(d)){let e=(0,m.getRouteMatcher)((0,_.getRouteRegex)(d))(f);Object.assign(t.query,e||{})}return{type:"rewrite",parsedAs:t,resolvedHref:d}})}let t=(0,y.parsePath)(e);return Promise.resolve({type:"redirect-external",destination:""+(0,R.formatNextPathnameInfo)({...(0,w.getNextPathnameInfo)(t.pathname,{nextConfig:n,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""})+t.query+t.hash})}let s=t.headers.get("x-nextjs-redirect");if(s){if(s.startsWith("/")){let e=(0,y.parsePath)(s),t=(0,R.formatNextPathnameInfo)({...(0,w.getNextPathnameInfo)(e.pathname,{nextConfig:n,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-internal",newAs:""+t+e.query+e.hash,newUrl:""+t+e.query+e.hash})}return Promise.resolve({type:"redirect-external",destination:s})}return Promise.resolve({type:"next"})}(t.dataHref,t.response,e);return{dataHref:t.dataHref,json:t.json,response:t.response,text:t.text,cacheKey:t.cacheKey,effect:r}}let B=Symbol("SSG_DATA_NOT_FOUND");function H(e){try{return JSON.parse(e)}catch(e){return null}}function W(e){let{dataHref:t,inflightCache:r,isPrefetch:n,hasMiddleware:o,isServerRender:a,parseJSON:u,persistCache:l,isBackground:s,unstable_skipClientCache:c}=e,{href:f}=new URL(t,window.location.href),d=e=>{var s;return(function e(t,r,n){return fetch(t,{credentials:"same-origin",method:n.method||"GET",headers:Object.assign({},n.headers,{"x-nextjs-data":"1"})}).then(o=>!o.ok&&r>1&&o.status>=500?e(t,r-1,n):o)})(t,a?3:1,{headers:Object.assign({},n?{purpose:"prefetch"}:{},n&&o?{"x-middleware-prefetch":"1"}:{}),method:null!=(s=null==e?void 0:e.method)?s:"GET"}).then(r=>r.ok&&(null==e?void 0:e.method)==="HEAD"?{dataHref:t,response:r,text:"",json:{},cacheKey:f}:r.text().then(e=>{if(!r.ok){if(o&&[301,302,307,308].includes(r.status))return{dataHref:t,response:r,text:e,json:{},cacheKey:f};if(404===r.status){var n;if(null==(n=H(e))?void 0:n.notFound)return{dataHref:t,json:{notFound:B},response:r,text:e,cacheKey:f}}let u=Error("Failed to load static props");throw a||(0,i.markAssetError)(u),u}return{dataHref:t,json:u?H(e):null,response:r,text:e,cacheKey:f}})).then(e=>(l&&"no-cache"!==e.response.headers.get("x-middleware-cache")||delete r[f],e)).catch(e=>{throw c||delete r[f],("Failed to fetch"===e.message||"NetworkError when attempting to fetch resource."===e.message||"Load failed"===e.message)&&(0,i.markAssetError)(e),e})};return c&&l?d({}).then(e=>("no-cache"!==e.response.headers.get("x-middleware-cache")&&(r[f]=Promise.resolve(e)),e)):void 0!==r[f]?r[f]:r[f]=d(s?{method:"HEAD"}:{})}function q(){return Math.random().toString(36).slice(2,10)}function G(e){let{url:t,router:r}=e;if(t===(0,E.addBasePath)((0,b.addLocale)(r.asPath,r.locale)))throw Error("Invariant: attempted to hard navigate to the same URL "+t+" "+location.href);window.location.href=t}let z=e=>{let{route:t,router:r}=e,n=!1,o=r.clc=()=>{n=!0};return()=>{if(n){let e=Error('Abort fetching component for route: "'+t+'"');throw e.cancelled=!0,e}o===r.clc&&(r.clc=null)}};class V{reload(){window.location.reload()}back(){window.history.back()}forward(){window.history.forward()}push(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=k(this,e,t),this.change("pushState",e,t,r)}replace(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=k(this,e,t),this.change("replaceState",e,t,r)}async _bfl(e,t,r,n){{let l=!1,s=!1;for(let c of[e,t])if(c){let t=(0,a.removeTrailingSlash)(new URL(c,"http://n").pathname),f=(0,E.addBasePath)((0,b.addLocale)(t,r||this.locale));if(t!==(0,a.removeTrailingSlash)(new URL(this.asPath,"http://n").pathname)){var o,i,u;for(let e of(l=l||!!(null==(o=this._bfl_s)?void 0:o.contains(t))||!!(null==(i=this._bfl_s)?void 0:i.contains(f)),[t,f])){let t=e.split("/");for(let e=0;!s&&e{})}}}}return!1}async change(e,t,r,n,o){var s,c,f,O,j,w,R,x,A;let D,F;if(!(0,M.isLocalURL)(t))return G({url:t,router:this}),!1;let H=1===n._h;H||n.shallow||await this._bfl(r,void 0,n.locale);let W=H||n._shouldResolveHref||(0,y.parsePath)(t).pathname===(0,y.parsePath)(r).pathname,q={...this.state},z=!0!==this.isReady;this.isReady=!0;let X=this.isSsr;if(H||(this.isSsr=!1),H&&this.clc)return!1;let Y=q.locale;d.ST&&performance.mark("routeChange");let{shallow:$=!1,scroll:K=!0}=n,J={shallow:$};this._inFlightRoute&&this.clc&&(X||V.events.emit("routeChangeError",L(),this._inFlightRoute,J),this.clc(),this.clc=null),r=(0,E.addBasePath)((0,b.addLocale)((0,S.hasBasePath)(r)?(0,v.removeBasePath)(r):r,n.locale,this.defaultLocale));let Q=(0,P.removeLocale)((0,S.hasBasePath)(r)?(0,v.removeBasePath)(r):r,q.locale);this._inFlightRoute=r;let Z=Y!==q.locale;if(!H&&this.onlyAHashChange(Q)&&!Z){q.asPath=Q,V.events.emit("hashChangeStart",r,J),this.changeState(e,t,r,{...n,scroll:!1}),K&&this.scrollToHash(Q);try{await this.set(q,this.components[q.route],null)}catch(e){throw(0,l.default)(e)&&e.cancelled&&V.events.emit("routeChangeError",e,Q,J),e}return V.events.emit("hashChangeComplete",r,J),!0}let ee=(0,h.parseRelativeUrl)(t),{pathname:et,query:er}=ee;try{[D,{__rewrites:F}]=await Promise.all([this.pageLoader.getPageList(),(0,i.getClientBuildManifest)(),this.pageLoader.getMiddleware()])}catch(e){return G({url:r,router:this}),!1}this.urlIsNew(Q)||Z||(e="replaceState");let en=r;et=et?(0,a.removeTrailingSlash)((0,v.removeBasePath)(et)):et;let eo=(0,a.removeTrailingSlash)(et),ea=r.startsWith("/")&&(0,h.parseRelativeUrl)(r).pathname;if(null==(s=this.components[et])?void 0:s.__appRouter)return G({url:r,router:this}),new Promise(()=>{});let ei=!!(ea&&eo!==ea&&(!(0,p.isDynamicRoute)(eo)||!(0,m.getRouteMatcher)((0,_.getRouteRegex)(eo))(ea))),eu=!n.shallow&&await N({asPath:r,locale:q.locale,router:this});if(H&&eu&&(W=!1),W&&"/_error"!==et&&(n._shouldResolveHref=!0,ee.pathname=U(et,D),ee.pathname===et||(et=ee.pathname,ee.pathname=(0,E.addBasePath)(et),eu||(t=(0,g.formatWithValidation)(ee)))),!(0,M.isLocalURL)(r))return G({url:r,router:this}),!1;en=(0,P.removeLocale)((0,v.removeBasePath)(en),q.locale),eo=(0,a.removeTrailingSlash)(et);let el=!1;if((0,p.isDynamicRoute)(eo)){let e=(0,h.parseRelativeUrl)(en),n=e.pathname,o=(0,_.getRouteRegex)(eo);el=(0,m.getRouteMatcher)(o)(n);let a=eo===n,i=a?(0,C.interpolateAs)(eo,n,er):{};if(el&&(!a||i.result))a?r=(0,g.formatWithValidation)(Object.assign({},e,{pathname:i.result,query:(0,I.omit)(er,i.params)})):Object.assign(er,el);else{let e=Object.keys(o.groups).filter(e=>!er[e]&&!o.groups[e].optional);if(e.length>0&&!eu)throw Error((a?"The provided `href` ("+t+") value is missing query values ("+e.join(", ")+") to be interpolated properly. ":"The provided `as` value ("+n+") is incompatible with the `href` value ("+eo+"). ")+"Read more: https://nextjs.org/docs/messages/"+(a?"href-interpolation-failed":"incompatible-href-as"))}}H||V.events.emit("routeChangeStart",r,J);let es="/404"===this.pathname||"/_error"===this.pathname;try{let a=await this.getRouteInfo({route:eo,pathname:et,query:er,as:r,resolvedAs:en,routeProps:J,locale:q.locale,isPreview:q.isPreview,hasMiddleware:eu,unstable_skipClientCache:n.unstable_skipClientCache,isQueryUpdating:H&&!this.isFallback,isMiddlewareRewrite:ei});if(H||n.shallow||await this._bfl(r,"resolvedAs"in a?a.resolvedAs:void 0,q.locale),"route"in a&&eu){eo=et=a.route||eo,J.shallow||(er=Object.assign({},a.query||{},er));let e=(0,S.hasBasePath)(ee.pathname)?(0,v.removeBasePath)(ee.pathname):ee.pathname;if(el&&et!==e&&Object.keys(el).forEach(e=>{el&&er[e]===el[e]&&delete er[e]}),(0,p.isDynamicRoute)(et)){let e=!J.shallow&&a.resolvedAs?a.resolvedAs:(0,E.addBasePath)((0,b.addLocale)(new URL(r,location.href).pathname,q.locale),!0);(0,S.hasBasePath)(e)&&(e=(0,v.removeBasePath)(e));let t=(0,_.getRouteRegex)(et),n=(0,m.getRouteMatcher)(t)(new URL(e,location.href).pathname);n&&Object.assign(er,n)}}if("type"in a){if("redirect-internal"===a.type)return this.change(e,a.newUrl,a.newAs,n);return G({url:a.destination,router:this}),new Promise(()=>{})}let i=a.Component;if(i&&i.unstable_scriptLoader&&[].concat(i.unstable_scriptLoader()).forEach(e=>{(0,u.handleClientScriptLoad)(e.props)}),(a.__N_SSG||a.__N_SSP)&&a.props){if(a.props.pageProps&&a.props.pageProps.__N_REDIRECT){n.locale=!1;let t=a.props.pageProps.__N_REDIRECT;if(t.startsWith("/")&&!1!==a.props.pageProps.__N_REDIRECT_BASE_PATH){let r=(0,h.parseRelativeUrl)(t);r.pathname=U(r.pathname,D);let{url:o,as:a}=k(this,t,t);return this.change(e,o,a,n)}return G({url:t,router:this}),new Promise(()=>{})}if(q.isPreview=!!a.props.__N_PREVIEW,a.props.notFound===B){let e;try{await this.fetchComponent("/404"),e="/404"}catch(t){e="/_error"}if(a=await this.getRouteInfo({route:e,pathname:e,query:er,as:r,resolvedAs:en,routeProps:{shallow:!1},locale:q.locale,isPreview:q.isPreview,isNotFound:!0}),"type"in a)throw Error("Unexpected middleware effect on /404")}}H&&"/_error"===this.pathname&&(null==(f=self.__NEXT_DATA__.props)?void 0:null==(c=f.pageProps)?void 0:c.statusCode)===500&&(null==(O=a.props)?void 0:O.pageProps)&&(a.props.pageProps.statusCode=500);let s=n.shallow&&q.route===(null!=(j=a.route)?j:eo),d=null!=(w=n.scroll)?w:!H&&!s,g=null!=o?o:d?{x:0,y:0}:null,y={...q,route:eo,pathname:et,query:er,asPath:Q,isFallback:!1};if(H&&es){if(a=await this.getRouteInfo({route:this.pathname,pathname:this.pathname,query:er,as:r,resolvedAs:en,routeProps:{shallow:!1},locale:q.locale,isPreview:q.isPreview,isQueryUpdating:H&&!this.isFallback}),"type"in a)throw Error("Unexpected middleware effect on "+this.pathname);"/_error"===this.pathname&&(null==(x=self.__NEXT_DATA__.props)?void 0:null==(R=x.pageProps)?void 0:R.statusCode)===500&&(null==(A=a.props)?void 0:A.pageProps)&&(a.props.pageProps.statusCode=500);try{await this.set(y,a,g)}catch(e){throw(0,l.default)(e)&&e.cancelled&&V.events.emit("routeChangeError",e,Q,J),e}return!0}if(V.events.emit("beforeHistoryChange",r,J),this.changeState(e,t,r,n),!(H&&!g&&!z&&!Z&&(0,T.compareRouterStates)(y,this.state))){try{await this.set(y,a,g)}catch(e){if(e.cancelled)a.error=a.error||e;else throw e}if(a.error)throw H||V.events.emit("routeChangeError",a.error,Q,J),a.error;H||V.events.emit("routeChangeComplete",r,J),d&&/#.+$/.test(r)&&this.scrollToHash(r)}return!0}catch(e){if((0,l.default)(e)&&e.cancelled)return!1;throw e}}changeState(e,t,r,n){void 0===n&&(n={}),("pushState"!==e||(0,d.getURL)()!==r)&&(this._shallow=n.shallow,window.history[e]({url:t,as:r,options:n,__N:!0,key:this._key="pushState"!==e?this._key:q()},"",r))}async handleRouteInfoError(e,t,r,n,o,a){if(console.error(e),e.cancelled)throw e;if((0,i.isAssetError)(e)||a)throw V.events.emit("routeChangeError",e,n,o),G({url:n,router:this}),L();try{let n;let{page:o,styleSheets:a}=await this.fetchComponent("/_error"),i={props:n,Component:o,styleSheets:a,err:e,error:e};if(!i.props)try{i.props=await this.getInitialProps(o,{err:e,pathname:t,query:r})}catch(e){console.error("Error in error page `getInitialProps`: ",e),i.props={}}return i}catch(e){return this.handleRouteInfoError((0,l.default)(e)?e:Error(e+""),t,r,n,o,!0)}}async getRouteInfo(e){let{route:t,pathname:r,query:n,as:o,resolvedAs:i,routeProps:u,locale:s,hasMiddleware:f,isPreview:d,unstable_skipClientCache:p,isQueryUpdating:h,isMiddlewareRewrite:m,isNotFound:_}=e,y=t;try{var b,P,E,S;let e=this.components[y];if(u.shallow&&e&&this.route===y)return e;let t=z({route:y,router:this});f&&(e=void 0);let l=!e||"initial"in e?void 0:e,O={dataHref:this.pageLoader.getDataHref({href:(0,g.formatWithValidation)({pathname:r,query:n}),skipInterpolation:!0,asPath:_?"/404":i,locale:s}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:h?this.sbc:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p,isBackground:h},w=h&&!m?null:await F({fetchData:()=>W(O),asPath:_?"/404":i,locale:s,router:this}).catch(e=>{if(h)return null;throw e});if(w&&("/_error"===r||"/404"===r)&&(w.effect=void 0),h&&(w?w.json=self.__NEXT_DATA__.props:w={json:self.__NEXT_DATA__.props}),t(),(null==w?void 0:null==(b=w.effect)?void 0:b.type)==="redirect-internal"||(null==w?void 0:null==(P=w.effect)?void 0:P.type)==="redirect-external")return w.effect;if((null==w?void 0:null==(E=w.effect)?void 0:E.type)==="rewrite"){let t=(0,a.removeTrailingSlash)(w.effect.resolvedHref),o=await this.pageLoader.getPageList();if((!h||o.includes(t))&&(y=t,r=w.effect.resolvedHref,n={...n,...w.effect.parsedAs.query},i=(0,v.removeBasePath)((0,c.normalizeLocalePath)(w.effect.parsedAs.pathname,this.locales).pathname),e=this.components[y],u.shallow&&e&&this.route===y&&!f))return{...e,route:y}}if((0,j.isAPIRoute)(y))return G({url:o,router:this}),new Promise(()=>{});let R=l||await this.fetchComponent(y).then(e=>({Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP})),T=null==w?void 0:null==(S=w.response)?void 0:S.headers.get("x-middleware-skip"),M=R.__N_SSG||R.__N_SSP;T&&(null==w?void 0:w.dataHref)&&delete this.sdc[w.dataHref];let{props:x,cacheKey:I}=await this._getData(async()=>{if(M){if((null==w?void 0:w.json)&&!T)return{cacheKey:w.cacheKey,props:w.json};let e=(null==w?void 0:w.dataHref)?w.dataHref:this.pageLoader.getDataHref({href:(0,g.formatWithValidation)({pathname:r,query:n}),asPath:i,locale:s}),t=await W({dataHref:e,isServerRender:this.isSsr,parseJSON:!0,inflightCache:T?{}:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p});return{cacheKey:t.cacheKey,props:t.json||{}}}return{headers:{},props:await this.getInitialProps(R.Component,{pathname:r,query:n,asPath:o,locale:s,locales:this.locales,defaultLocale:this.defaultLocale})}});return R.__N_SSP&&O.dataHref&&I&&delete this.sdc[I],this.isPreview||!R.__N_SSG||h||W(Object.assign({},O,{isBackground:!0,persistCache:!1,inflightCache:this.sbc})).catch(()=>{}),x.pageProps=Object.assign({},x.pageProps),R.props=x,R.route=y,R.query=n,R.resolvedAs=i,this.components[y]=R,R}catch(e){return this.handleRouteInfoError((0,l.getProperError)(e),r,n,o,u)}}set(e,t,r){return this.state=e,this.sub(t,this.components["/_app"].Component,r)}beforePopState(e){this._bps=e}onlyAHashChange(e){if(!this.asPath)return!1;let[t,r]=this.asPath.split("#",2),[n,o]=e.split("#",2);return!!o&&t===n&&r===o||t===n&&r!==o}scrollToHash(e){let[,t=""]=e.split("#",2);(0,A.handleSmoothScroll)(()=>{if(""===t||"top"===t){window.scrollTo(0,0);return}let e=decodeURIComponent(t),r=document.getElementById(e);if(r){r.scrollIntoView();return}let n=document.getElementsByName(e)[0];n&&n.scrollIntoView()},{onlyHashChange:this.onlyAHashChange(e)})}urlIsNew(e){return this.asPath!==e}async prefetch(e,t,r){if(void 0===t&&(t=e),void 0===r&&(r={}),(0,x.isBot)(window.navigator.userAgent))return;let n=(0,h.parseRelativeUrl)(e),o=n.pathname,{pathname:i,query:u}=n,l=i,s=await this.pageLoader.getPageList(),c=t,f=void 0!==r.locale?r.locale||void 0:this.locale,d=await N({asPath:t,locale:f,router:this});n.pathname=U(n.pathname,s),(0,p.isDynamicRoute)(n.pathname)&&(i=n.pathname,n.pathname=i,Object.assign(u,(0,m.getRouteMatcher)((0,_.getRouteRegex)(n.pathname))((0,y.parsePath)(t).pathname)||{}),d||(e=(0,g.formatWithValidation)(n)));let b=await F({fetchData:()=>W({dataHref:this.pageLoader.getDataHref({href:(0,g.formatWithValidation)({pathname:l,query:u}),skipInterpolation:!0,asPath:c,locale:f}),hasMiddleware:!0,isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0}),asPath:t,locale:f,router:this});if((null==b?void 0:b.effect.type)==="rewrite"&&(n.pathname=b.effect.resolvedHref,i=b.effect.resolvedHref,u={...u,...b.effect.parsedAs.query},c=b.effect.parsedAs.pathname,e=(0,g.formatWithValidation)(n)),(null==b?void 0:b.effect.type)==="redirect-external")return;let P=(0,a.removeTrailingSlash)(i);await this._bfl(t,c,r.locale,!0)&&(this.components[o]={__appRouter:!0}),await Promise.all([this.pageLoader._isSsg(P).then(t=>!!t&&W({dataHref:(null==b?void 0:b.json)?null==b?void 0:b.dataHref:this.pageLoader.getDataHref({href:e,asPath:c,locale:f}),isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0,unstable_skipClientCache:r.unstable_skipClientCache||r.priority&&!0}).then(()=>!1).catch(()=>!1)),this.pageLoader[r.priority?"loadPage":"prefetch"](P)])}async fetchComponent(e){let t=z({route:e,router:this});try{let r=await this.pageLoader.loadPage(e);return t(),r}catch(e){throw t(),e}}_getData(e){let t=!1,r=()=>{t=!0};return this.clc=r,e().then(e=>{if(r===this.clc&&(this.clc=null),t){let e=Error("Loading initial props cancelled");throw e.cancelled=!0,e}return e})}_getFlightData(e){return W({dataHref:e,isServerRender:!0,parseJSON:!1,inflightCache:this.sdc,persistCache:!1,isPrefetch:!1}).then(e=>{let{text:t}=e;return{data:t}})}getInitialProps(e,t){let{Component:r}=this.components["/_app"],n=this._wrapApp(r);return t.AppTree=n,(0,d.loadGetInitialProps)(r,{AppTree:n,Component:e,router:this,ctx:t})}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}constructor(e,t,n,{initialProps:o,pageLoader:i,App:u,wrapApp:l,Component:s,err:c,subscription:f,isFallback:m,locale:_,locales:y,defaultLocale:b,domainLocales:P,isPreview:v}){this.sdc={},this.sbc={},this.isFirstPopStateEvent=!0,this._key=q(),this.onPopState=e=>{let t;let{isFirstPopStateEvent:r}=this;this.isFirstPopStateEvent=!1;let n=e.state;if(!n){let{pathname:e,query:t}=this;this.changeState("replaceState",(0,g.formatWithValidation)({pathname:(0,E.addBasePath)(e),query:t}),(0,d.getURL)());return}if(n.__NA){window.location.reload();return}if(!n.__N||r&&this.locale===n.options.locale&&n.as===this.asPath)return;let{url:o,as:a,options:i,key:u}=n;this._key=u;let{pathname:l}=(0,h.parseRelativeUrl)(o);(!this.isSsr||a!==(0,E.addBasePath)(this.asPath)||l!==(0,E.addBasePath)(this.pathname))&&(!this._bps||this._bps(n))&&this.change("replaceState",o,a,Object.assign({},i,{shallow:i.shallow&&this._shallow,locale:i.locale||this.defaultLocale,_h:0}),t)};let S=(0,a.removeTrailingSlash)(e);this.components={},"/_error"!==e&&(this.components[S]={Component:s,initial:!0,props:o,err:c,__N_SSG:o&&o.__N_SSG,__N_SSP:o&&o.__N_SSP}),this.components["/_app"]={Component:u,styleSheets:[]};{let{BloomFilter:e}=r(9970),t={numItems:11,errorRate:1e-4,numBits:211,numHashes:14,bitArray:[0,0,0,1,0,1,0,1,1,1,1,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,0,0,1,0,0,0,0,0,1,0,0,1,0,0,1,1,0,1,0,1,1,1,1,1,1,1,1,0,1,0,0,0,0,1,1,0,1,1,0,1,1,1,1,0,1,1,0,1,0,1,1,1,1,1,1,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,0,1,0,1,0,1,0,1,1,1,1,0,1,1,0,0,1,0,0,0,0,0,1,0,1,1,0,1,0,1,0,0,0,0,0,0,1,1,0,0,1,0,0,1,1,0,1,1,0,0,0,1,1,1,0,0,1,1,0,0,1,0,0,1,0,1,1,0,1,1,0,1,1,0,1,0,0,0,0,0,1,1,1,0,0,1,1,1,0,1,1,1,0,0,0,0,1,0,1,0,1,1,0,0,1,0,1,0,1,0,1,1,1,0,0]},n={numItems:0,errorRate:1e-4,numBits:0,numHashes:null,bitArray:[]};(null==t?void 0:t.numHashes)&&(this._bfl_s=new e(t.numItems,t.errorRate),this._bfl_s.import(t)),(null==n?void 0:n.numHashes)&&(this._bfl_d=new e(n.numItems,n.errorRate),this._bfl_d.import(n))}this.events=V.events,this.pageLoader=i;let O=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;if(this.basePath="",this.sub=f,this.clc=null,this._wrapApp=l,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.isExperimentalCompile||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!O&&!self.location.search),this.state={route:S,pathname:e,query:t,asPath:O?e:n,isPreview:!!v,locale:void 0,isFallback:m},this._initialMatchesMiddlewarePromise=Promise.resolve(!1),!n.startsWith("//")){let r={locale:_},o=(0,d.getURL)();this._initialMatchesMiddlewarePromise=N({router:this,locale:_,asPath:o}).then(a=>(r._shouldResolveHref=n!==e,this.changeState("replaceState",a?o:(0,g.formatWithValidation)({pathname:(0,E.addBasePath)(e),query:t}),o,r),a))}window.addEventListener("popstate",this.onPopState)}}V.events=(0,f.default)()},8043:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return a}});let n=r(7652),o=r(5298);function a(e,t,r,a){if(!t||t===r)return e;let i=e.toLowerCase();return!a&&((0,o.pathHasPrefix)(i,"/api")||(0,o.pathHasPrefix)(i,"/"+t.toLowerCase()))?e:(0,n.addPathPrefix)(e,"/"+t)}},7652:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return o}});let n=r(626);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:o,hash:a}=(0,n.parsePath)(e);return""+t+r+o+a}},6152:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathSuffix",{enumerable:!0,get:function(){return o}});let n=r(626);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:o,hash:a}=(0,n.parsePath)(e);return""+r+t+o+a}},2340:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{normalizeAppPath:function(){return a},normalizeRscURL:function(){return i}});let n=r(5078),o=r(3737);function a(e){return(0,n.ensureLeadingSlash)(e.split("/").reduce((e,t,r,n)=>!t||(0,o.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function i(e){return e.replace(/\.rsc($|\?)/,"$1")}},4232:function(e,t){"use strict";function r(e){return new URL(e,"http://n").searchParams}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"asPathToSearchParams",{enumerable:!0,get:function(){return r}})},9012:function(e,t){"use strict";function r(e,t){let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=r.length;n--;){let o=r[n];if("query"===o){let r=Object.keys(e.query);if(r.length!==Object.keys(t.query).length)return!1;for(let n=r.length;n--;){let o=r[n];if(!t.query.hasOwnProperty(o)||e.query[o]!==t.query[o])return!1}}else if(!t.hasOwnProperty(o)||e[o]!==t[o])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"compareRouterStates",{enumerable:!0,get:function(){return r}})},5604:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"formatNextPathnameInfo",{enumerable:!0,get:function(){return u}});let n=r(3575),o=r(7652),a=r(6152),i=r(8043);function u(e){let t=(0,i.addLocale)(e.pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix);return(e.buildId||!e.trailingSlash)&&(t=(0,n.removeTrailingSlash)(t)),e.buildId&&(t=(0,a.addPathSuffix)((0,o.addPathPrefix)(t,"/_next/data/"+e.buildId),"/"===e.pathname?"index.json":".json")),t=(0,o.addPathPrefix)(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:(0,a.addPathSuffix)(t,"/"):(0,n.removeTrailingSlash)(t)}},5058:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{formatUrl:function(){return a},formatWithValidation:function(){return u},urlObjectKeys:function(){return i}});let n=r(1757)._(r(8600)),o=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,a=e.protocol||"",i=e.pathname||"",u=e.hash||"",l=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:r&&(s=t+(~r.indexOf(":")?"["+r+"]":r),e.port&&(s+=":"+e.port)),l&&"object"==typeof l&&(l=String(n.urlQueryToSearchParams(l)));let c=e.search||l&&"?"+l||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||o.test(a))&&!1!==s?(s="//"+(s||""),i&&"/"!==i[0]&&(i="/"+i)):s||(s=""),u&&"#"!==u[0]&&(u="#"+u),c&&"?"!==c[0]&&(c="?"+c),""+a+s+(i=i.replace(/[?#]/g,encodeURIComponent))+(c=c.replace("#","%23"))+u}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return a(e)}},116:function(e,t){"use strict";function r(e,t){return void 0===t&&(t=""),("/"===e?"/index":/^\/index(\/|$)/.test(e)?"/index"+e:e)+t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},3209:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getNextPathnameInfo",{enumerable:!0,get:function(){return i}});let n=r(1623),o=r(3691),a=r(5298);function i(e,t){var r,i;let{basePath:u,i18n:l,trailingSlash:s}=null!=(r=t.nextConfig)?r:{},c={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):s};u&&(0,a.pathHasPrefix)(c.pathname,u)&&(c.pathname=(0,o.removePathPrefix)(c.pathname,u),c.basePath=u);let f=c.pathname;if(c.pathname.startsWith("/_next/data/")&&c.pathname.endsWith(".json")){let e=c.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),r=e[0];c.buildId=r,f="index"!==e[1]?"/"+e.slice(1).join("/"):"/",!0===t.parseData&&(c.pathname=f)}if(l){let e=t.i18nProvider?t.i18nProvider.analyze(c.pathname):(0,n.normalizeLocalePath)(c.pathname,l.locales);c.locale=e.detectedLocale,c.pathname=null!=(i=e.pathname)?i:c.pathname,!e.detectedLocale&&c.buildId&&(e=t.i18nProvider?t.i18nProvider.analyze(f):(0,n.normalizeLocalePath)(f,l.locales)).detectedLocale&&(c.locale=e.detectedLocale)}return c}},2179:function(e,t){"use strict";function r(e,t){if(void 0===t&&(t={}),t.onlyHashChange){e();return}let r=document.documentElement,n=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return r}})},2189:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return o.isDynamicRoute}});let n=r(317),o=r(1735)},7399:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return a}});let n=r(3323),o=r(6309);function a(e,t,r){let a="",i=(0,o.getRouteRegex)(e),u=i.groups,l=(t!==e?(0,n.getRouteMatcher)(i)(t):"")||r;a=e;let s=Object.keys(u);return s.every(e=>{let t=l[e]||"",{repeat:r,optional:n}=u[e],o="["+(r?"...":"")+e+"]";return n&&(o=(t?"":"/")+"["+o+"]"),r&&!Array.isArray(t)&&(t=[t]),(n||e in l)&&(a=a.replace(o,r?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(a=""),{params:s,result:a}}},6312:function(e,t){"use strict";function r(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return r}})},1735:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return a}});let n=r(2407),o=/\/\[[^/]+?\](?=\/|$)/;function a(e){return(0,n.isInterceptionRouteAppPath)(e)&&(e=(0,n.extractInterceptionRouteInformation)(e).interceptedRoute),o.test(e)}},5853:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=r(5782),o=r(1838);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},2795:function(e,t){"use strict";function r(e,t){let r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return r}})},626:function(e,t){"use strict";function r(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return r}})},2757:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parseRelativeUrl",{enumerable:!0,get:function(){return a}});let n=r(5782),o=r(8600);function a(e,t){let r=new URL((0,n.getLocationOrigin)()),a=t?new URL(t,r):e.startsWith(".")?new URL(window.location.href):r,{pathname:i,searchParams:u,search:l,hash:s,href:c,origin:f}=new URL(e,a);if(f!==r.origin)throw Error("invariant: invalid relative URL, router received "+e);return{pathname:i,query:(0,o.searchParamsToUrlQuery)(u),search:l,hash:s,href:c.slice(r.origin.length)}}},5298:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return o}});let n=r(626);function o(e,t){if("string"!=typeof e)return!1;let{pathname:r}=(0,n.parsePath)(e);return r===t||r.startsWith(t+"/")}},8600:function(e,t){"use strict";function r(e){let t={};return e.forEach((e,r)=>{void 0===t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]}),t}function n(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[r,o]=e;Array.isArray(o)?o.forEach(e=>t.append(r,n(e))):t.set(r,n(o))}),t}function a(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,r)=>e.append(r,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{assign:function(){return a},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}})},3691:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removePathPrefix",{enumerable:!0,get:function(){return o}});let n=r(5298);function o(e,t){if(!(0,n.pathHasPrefix)(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:"/"+r}},3575:function(e,t){"use strict";function r(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return r}})},3323:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o}});let n=r(5782);function o(e){let{re:t,groups:r}=e;return e=>{let o=t.exec(e);if(!o)return!1;let a=e=>{try{return decodeURIComponent(e)}catch(e){throw new n.DecodeError("failed to decode param")}},i={};return Object.keys(r).forEach(e=>{let t=r[e],n=o[t.pos];void 0!==n&&(i[e]=~n.indexOf("/")?n.split("/").map(e=>a(e)):t.repeat?[a(n)]:a(n))}),i}}},6309:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getNamedMiddlewareRegex:function(){return d},getNamedRouteRegex:function(){return f},getRouteRegex:function(){return l},parseParameter:function(){return i}});let n=r(2407),o=r(4592),a=r(3575);function i(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function u(e){let t=(0,a.removeTrailingSlash)(e).slice(1).split("/"),r={},u=1;return{parameterizedRoute:t.map(e=>{let t=n.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),a=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&a){let{key:e,optional:n,repeat:l}=i(a[1]);return r[e]={pos:u++,repeat:l,optional:n},"/"+(0,o.escapeStringRegexp)(t)+"([^/]+?)"}if(!a)return"/"+(0,o.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:n}=i(a[1]);return r[e]={pos:u++,repeat:t,optional:n},t?n?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}function l(e){let{parameterizedRoute:t,groups:r}=u(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}function s(e){let{interceptionMarker:t,getSafeRouteKey:r,segment:n,routeKeys:a,keyPrefix:u}=e,{key:l,optional:s,repeat:c}=i(n),f=l.replace(/\W/g,"");u&&(f=""+u+f);let d=!1;(0===f.length||f.length>30)&&(d=!0),isNaN(parseInt(f.slice(0,1)))||(d=!0),d&&(f=r()),u?a[f]=""+u+l:a[f]=l;let p=t?(0,o.escapeStringRegexp)(t):"";return c?s?"(?:/"+p+"(?<"+f+">.+?))?":"/"+p+"(?<"+f+">.+?)":"/"+p+"(?<"+f+">[^/]+?)"}function c(e,t){let r;let i=(0,a.removeTrailingSlash)(e).slice(1).split("/"),u=(r=0,()=>{let e="",t=++r;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),l={};return{namedParameterizedRoute:i.map(e=>{let r=n.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),a=e.match(/\[((?:\[.*\])|.+)\]/);if(r&&a){let[r]=e.split(a[0]);return s({getSafeRouteKey:u,interceptionMarker:r,segment:a[1],routeKeys:l,keyPrefix:t?"nxtI":void 0})}return a?s({getSafeRouteKey:u,segment:a[1],routeKeys:l,keyPrefix:t?"nxtP":void 0}):"/"+(0,o.escapeStringRegexp)(e)}).join(""),routeKeys:l}}function f(e,t){let r=c(e,t);return{...l(e),namedRegex:"^"+r.namedParameterizedRoute+"(?:/)?$",routeKeys:r.routeKeys}}function d(e,t){let{parameterizedRoute:r}=u(e),{catchAll:n=!0}=t;if("/"===r)return{namedRegex:"^/"+(n?".*":"")+"$"};let{namedParameterizedRoute:o}=c(e,!1);return{namedRegex:"^"+o+(n?"(?:(/.*)?)":"")+"$"}}},317:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let r=o.slice(1,-1),i=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),i=!0),r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function a(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(i){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');a(this.optionalRestSlugName,r),this.optionalRestSlugName=r,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');a(this.restSlugName,r),this.restSlugName=r,o="[...]"}}else{if(i)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');a(this.slugName,r),this.slugName=r,o="[]"}}this.children.has(o)||this.children.set(o,new r),this.children.get(o)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}},5758:function(e,t){"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return n},setConfig:function(){return o}});let n=()=>r;function o(e){r=e}},3737:function(e,t){"use strict";function r(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return n},isGroupSegment:function(){return r}});let n="__PAGE__",o="__DEFAULT__"},3657:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(7294),o=n.useLayoutEffect,a=n.useEffect;function i(e){let{headManager:t,reduceComponentsToState:r}=e;function i(){if(t&&t.mountedInstances){let o=n.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(o,e))}}return o(()=>{var r;return null==t||null==(r=t.mountedInstances)||r.add(e.children),()=>{var r;null==t||null==(r=t.mountedInstances)||r.delete(e.children)}}),o(()=>(t&&(t._pendingUpdate=i),()=>{t&&(t._pendingUpdate=i)})),a(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},5782:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return y},MissingStaticPage:function(){return g},NormalizeError:function(){return m},PageNotFoundError:function(){return _},SP:function(){return d},ST:function(){return p},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return u},isAbsoluteUrl:function(){return a},isResSent:function(){return s},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return b}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),a=0;ao.test(e);function i(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function u(){let{href:e}=window.location,t=i();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function s(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&s(r))return n;if(!n)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.');return n}let d="undefined"!=typeof performance,p=d&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class m extends Error{}class _ extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class g extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class y extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function b(e){return JSON.stringify({message:e.message,stack:e.stack})}},9784:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},8018:function(e){var t,r,n,o,a,i,u,l,s,c,f,d,p,h,m,_,g,y,b,P,v,E,S,O,j,w,R,T,M,x,I,C,A,L,N,D,k,U,F,B,H,W,q,G,z,V;(t={}).d=function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},void 0!==t&&(t.ab="//"),r={},t.r(r),t.d(r,{getCLS:function(){return S},getFCP:function(){return P},getFID:function(){return x},getINP:function(){return W},getLCP:function(){return G},getTTFB:function(){return V},onCLS:function(){return S},onFCP:function(){return P},onFID:function(){return x},onINP:function(){return W},onLCP:function(){return G},onTTFB:function(){return V}}),l=-1,s=function(e){addEventListener("pageshow",function(t){t.persisted&&(l=t.timeStamp,e(t))},!0)},c=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},f=function(){var e=c();return e&&e.activationStart||0},d=function(e,t){var r=c(),n="navigate";return l>=0?n="back-forward-cache":r&&(n=document.prerendering||f()>0?"prerender":r.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},p=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(e){t(e.getEntries())});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(e){}},h=function(e,t){var r=function r(n){"pagehide"!==n.type&&"hidden"!==document.visibilityState||(e(n),t&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)},m=function(e,t,r,n){var o,a;return function(i){var u;t.value>=0&&(i||n)&&((a=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=a,t.rating=(u=t.value)>r[1]?"poor":u>r[0]?"needs-improvement":"good",e(t))}},_=-1,g=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},y=function(){h(function(e){_=e.timeStamp},!0)},b=function(){return _<0&&(_=g(),y(),s(function(){setTimeout(function(){_=g(),y()},0)})),{get firstHiddenTime(){return _}}},P=function(e,t){t=t||{};var r,n=[1800,3e3],o=b(),a=d("FCP"),i=function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(l&&l.disconnect(),e.startTime-1&&e(t)},a=d("CLS",0),i=0,u=[],l=function(e){e.forEach(function(e){if(!e.hadRecentInput){var t=u[0],r=u[u.length-1];i&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,u.push(e)):(i=e.value,u=[e]),i>a.value&&(a.value=i,a.entries=u,n())}})},c=p("layout-shift",l);c&&(n=m(o,a,r,t.reportAllChanges),h(function(){l(c.takeRecords()),n(!0)}),s(function(){i=0,E=-1,n=m(o,a=d("CLS",0),r,t.reportAllChanges)}))},O={passive:!0,capture:!0},j=new Date,w=function(e,t){n||(n=t,o=e,a=new Date,M(removeEventListener),R())},R=function(){if(o>=0&&o1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?(t=function(){w(o,e),n()},r=function(){n()},n=function(){removeEventListener("pointerup",t,O),removeEventListener("pointercancel",r,O)},addEventListener("pointerup",t,O),addEventListener("pointercancel",r,O)):w(o,e)}},M=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,T,O)})},x=function(e,t){t=t||{};var r,a=[100,300],u=b(),l=d("FID"),c=function(e){e.startTimet.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};B[n.id]=n,F.push(n)}F.sort(function(e,t){return t.latency-e.latency}),F.splice(10).forEach(function(e){delete B[e.id]})}},W=function(e,t){t=t||{};var r=[200,500];D();var n,o=d("INP"),a=function(e){e.forEach(function(e){e.interactionId&&H(e),"first-input"!==e.entryType||F.some(function(t){return t.entries.some(function(t){return e.duration===t.duration&&e.startTime===t.startTime})})||H(e)});var t,r=(t=Math.min(F.length-1,Math.floor(U()/50)),F[t]);r&&r.latency!==o.value&&(o.value=r.latency,o.entries=r.entries,n())},i=p("event",a,{durationThreshold:t.durationThreshold||40});n=m(e,o,r,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),h(function(){a(i.takeRecords()),o.value<0&&U()>0&&(o.value=0,o.entries=[]),n(!0)}),s(function(){F=[],k=N(),n=m(e,o=d("INP"),r,t.reportAllChanges)}))},q={},G=function(e,t){t=t||{};var r,n=[2500,4e3],o=b(),a=d("LCP"),i=function(e){var t=e[e.length-1];if(t){var n=t.startTime-f();nperformance.now())return;n.entries=[a],o(!0),s(function(){(o=m(e,n=d("TTFB",0),r,t.reportAllChanges))(!0)})}})},e.exports=r},9423:function(e,t){"use strict";function r(e){return"/api"===e||!!(null==e?void 0:e.startsWith("/api/"))}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isAPIRoute",{enumerable:!0,get:function(){return r}})},676:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return o},getProperError:function(){return a}});let n=r(8299);function o(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function a(e){return o(e)?e:Error((0,n.isPlainObject)(e)?JSON.stringify(e):e+"")}},2407:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},extractInterceptionRouteInformation:function(){return i},isInterceptionRouteAppPath:function(){return a}});let n=r(2340),o=["(..)(..)","(.)","(..)","(...)"];function a(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function i(e){let t,r,a;for(let n of e.split("/"))if(r=o.find(e=>n.startsWith(e))){[t,a]=e.split(r,2);break}if(!t||!r||!a)throw Error(`Invalid interception route: ${e}. Must be in the format //(..|...|..)(..)/`);switch(t=(0,n.normalizeAppPath)(t),r){case"(.)":a="/"===t?`/${a}`:t+"/"+a;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);a=t.split("/").slice(0,-1).concat(a).join("/");break;case"(...)":a="/"+a;break;case"(..)(..)":let i=t.split("/");if(i.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);a=i.slice(0,-2).concat(a).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:a}}},2431:function(){},8754:function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.r(t),r.d(t,{_:function(){return n},_interop_require_default:function(){return n}})},1757:function(e,t,r){"use strict";function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}function o(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var u=a?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(o,i,u):o[i]=e[i]}return o.default=e,r&&r.set(e,o),o}r.r(t),r.d(t,{_:function(){return o},_interop_require_wildcard:function(){return o}})}},function(e){e.O(0,[774],function(){return e(e.s=2288)}),_N_E=e.O()}]);
\ No newline at end of file
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[179],{4878:function(e,t){"use strict";function r(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return r}})},37:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]}),Object.hasOwn||(Object.hasOwn=function(e,t){if(null==e)throw TypeError("Cannot convert undefined or null to object");return Object.prototype.hasOwnProperty.call(Object(e),t)}),"canParse"in URL||(URL.canParse=function(e,t){try{return new URL(e,t),!0}catch(e){return!1}})},1412:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return a}});let n=r(7652),o=r(8796);function a(e,t){return(0,o.normalizePathTrailingSlash)((0,n.addPathPrefix)(e,""))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8878:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return n}}),r(8796);let n=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n25){window.location.reload();return}clearTimeout(r),r=setTimeout(t,l>5?5e3:1e3)}n&&n.close();let u=(0,o.getSocketUrl)(e.assetPrefix);(n=new window.WebSocket(""+u+e.path)).onopen=function(){l=0,window.console.log("[HMR] connected")},n.onerror=i,n.onclose=i,n.onmessage=function(e){let t=JSON.parse(e.data);for(let e of a)e(t)}}()}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7193:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"detectDomainLocale",{enumerable:!0,get:function(){return r}});let r=function(){for(var e=arguments.length,t=Array(e),r=0;r{let t={};e.forEach(e=>{if("link"===e.type&&e.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+e.props["data-href"]+'"]'))return;e.props.href=e.props["data-href"],e.props["data-href"]=void 0}let r=t[e.type]||[];r.push(e),t[e.type]=r});let n=t.title?t.title[0]:null,o="";if(n){let{children:e}=n.props;o="string"==typeof e?e:Array.isArray(e)?e.join(""):""}o!==document.title&&(document.title=o),["meta","base","link","style","script"].forEach(e=>{r(e,t[e]||[])})}}}r=(e,t)=>{let r=document.getElementsByTagName("head")[0],n=r.querySelector("meta[name=next-head-count]"),i=Number(n.content),u=[];for(let t=0,r=n.previousElementSibling;t{for(let t=0,r=u.length;t{var t;return null==(t=e.parentNode)?void 0:t.removeChild(e)}),s.forEach(e=>r.insertBefore(e,n)),n.content=(i-u.length+s.length).toString()},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4500:function(e,t,r){"use strict";let n,o,a,i,u,l,s,c,f,d,p,h;Object.defineProperty(t,"__esModule",{value:!0});let m=r(1757);Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{emitter:function(){return z},hydrate:function(){return ef},initialize:function(){return $},router:function(){return n},version:function(){return G}});let _=r(8754),g=r(5893);r(37);let y=_._(r(7294)),b=_._(r(745)),P=r(77),v=_._(r(8967)),E=r(7171),S=r(2179),O=r(1735),j=r(8600),w=r(5758),R=r(5782),T=r(1493),M=_._(r(2071)),x=_._(r(1413)),I=_._(r(5736)),C=r(3622),A=r(7253),L=r(676),N=r(8261),D=r(1566),k=r(1838),U=r(3068),F=r(2488),B=r(213),H=_._(r(6920)),W=_._(r(7930)),q=_._(r(5179)),G="14.2.15",z=(0,v.default)(),V=e=>[].slice.call(e),X=!1;class Y extends y.default.Component{componentDidCatch(e,t){this.props.fn(e,t)}componentDidMount(){this.scrollToHash(),n.isSsr&&(o.isFallback||o.nextExport&&((0,O.isDynamicRoute)(n.pathname)||location.search||X)||o.props&&o.props.__N_SSG&&(location.search||X))&&n.replace(n.pathname+"?"+String((0,j.assign)((0,j.urlQueryToSearchParams)(n.query),new URLSearchParams(location.search))),a,{_h:1,shallow:!o.isFallback&&!X}).catch(e=>{if(!e.cancelled)throw e})}componentDidUpdate(){this.scrollToHash()}scrollToHash(){let{hash:e}=location;if(!(e=e&&e.substring(1)))return;let t=document.getElementById(e);t&&setTimeout(()=>t.scrollIntoView(),0)}render(){return this.props.children}}async function $(e){void 0===e&&(e={}),W.default.onSpanEnd(q.default),o=JSON.parse(document.getElementById("__NEXT_DATA__").textContent),window.__NEXT_DATA__=o,h=o.defaultLocale;let t=o.assetPrefix||"";if(self.__next_set_public_path__(""+t+"/_next/"),(0,w.setConfig)({serverRuntimeConfig:{},publicRuntimeConfig:o.runtimeConfig||{}}),a=(0,R.getURL)(),(0,k.hasBasePath)(a)&&(a=(0,D.removeBasePath)(a)),o.scriptLoader){let{initScriptLoader:e}=r(5026);e(o.scriptLoader)}i=new x.default(o.buildId,t);let s=e=>{let[t,r]=e;return i.routeLoader.onEntrypoint(t,r)};return window.__NEXT_P&&window.__NEXT_P.map(e=>setTimeout(()=>s(e),0)),window.__NEXT_P=[],window.__NEXT_P.push=s,(l=(0,M.default)()).getIsSsr=()=>n.isSsr,u=document.getElementById("__next"),{assetPrefix:t}}function K(e,t){return(0,g.jsx)(e,{...t})}function J(e){var t;let{children:r}=e,o=y.default.useMemo(()=>(0,F.adaptForAppRouterInstance)(n),[]);return(0,g.jsx)(Y,{fn:e=>Z({App:f,err:e}).catch(e=>console.error("Error rendering page: ",e)),children:(0,g.jsx)(U.AppRouterContext.Provider,{value:o,children:(0,g.jsx)(B.SearchParamsContext.Provider,{value:(0,F.adaptForSearchParams)(n),children:(0,g.jsx)(F.PathnameContextProviderAdapter,{router:n,isAutoExport:null!=(t=self.__NEXT_DATA__.autoExport)&&t,children:(0,g.jsx)(B.PathParamsContext.Provider,{value:(0,F.adaptForPathParams)(n),children:(0,g.jsx)(E.RouterContext.Provider,{value:(0,A.makePublicRouterInstance)(n),children:(0,g.jsx)(P.HeadManagerContext.Provider,{value:l,children:(0,g.jsx)(N.ImageConfigContext.Provider,{value:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image/",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!0},children:r})})})})})})})})}let Q=e=>t=>{let r={...t,Component:p,err:o.err,router:n};return(0,g.jsx)(J,{children:K(e,r)})};function Z(e){let{App:t,err:u}=e;return console.error(u),console.error("A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred"),i.loadPage("/_error").then(n=>{let{page:o,styleSheets:a}=n;return(null==s?void 0:s.Component)===o?Promise.resolve().then(()=>m._(r(8529))).then(n=>Promise.resolve().then(()=>m._(r(8141))).then(r=>(t=r.default,e.App=t,n))).then(e=>({ErrorComponent:e.default,styleSheets:[]})):{ErrorComponent:o,styleSheets:a}}).then(r=>{var i;let{ErrorComponent:l,styleSheets:s}=r,c=Q(t),f={Component:l,AppTree:c,router:n,ctx:{err:u,pathname:o.page,query:o.query,asPath:a,AppTree:c}};return Promise.resolve((null==(i=e.props)?void 0:i.err)?e.props:(0,R.loadGetInitialProps)(t,f)).then(t=>es({...e,err:u,Component:l,styleSheets:s,props:t}))})}function ee(e){let{callback:t}=e;return y.default.useLayoutEffect(()=>t(),[t]),null}let et={navigationStart:"navigationStart",beforeRender:"beforeRender",afterRender:"afterRender",afterHydrate:"afterHydrate",routeChange:"routeChange"},er={hydration:"Next.js-hydration",beforeHydration:"Next.js-before-hydration",routeChangeToRender:"Next.js-route-change-to-render",render:"Next.js-render"},en=null,eo=!0;function ea(){[et.beforeRender,et.afterHydrate,et.afterRender,et.routeChange].forEach(e=>performance.clearMarks(e))}function ei(){R.ST&&(performance.mark(et.afterHydrate),performance.getEntriesByName(et.beforeRender,"mark").length&&(performance.measure(er.beforeHydration,et.navigationStart,et.beforeRender),performance.measure(er.hydration,et.beforeRender,et.afterHydrate)),d&&performance.getEntriesByName(er.hydration).forEach(d),ea())}function eu(){if(!R.ST)return;performance.mark(et.afterRender);let e=performance.getEntriesByName(et.routeChange,"mark");e.length&&(performance.getEntriesByName(et.beforeRender,"mark").length&&(performance.measure(er.routeChangeToRender,e[0].name,et.beforeRender),performance.measure(er.render,et.beforeRender,et.afterRender),d&&(performance.getEntriesByName(er.render).forEach(d),performance.getEntriesByName(er.routeChangeToRender).forEach(d))),ea(),[er.routeChangeToRender,er.render].forEach(e=>performance.clearMeasures(e)))}function el(e){let{callbacks:t,children:r}=e;return y.default.useLayoutEffect(()=>t.forEach(e=>e()),[t]),y.default.useEffect(()=>{(0,I.default)(d)},[]),r}function es(e){let t,{App:r,Component:o,props:a,err:i}=e,l="initial"in e?void 0:e.styleSheets;o=o||s.Component;let f={...a=a||s.props,Component:o,err:i,router:n};s=f;let d=!1,p=new Promise((e,r)=>{c&&c(),t=()=>{c=null,e()},c=()=>{d=!0,c=null;let e=Error("Cancel rendering route");e.cancelled=!0,r(e)}});function h(){t()}!function(){if(!l)return;let e=new Set(V(document.querySelectorAll("style[data-n-href]")).map(e=>e.getAttribute("data-n-href"))),t=document.querySelector("noscript[data-n-css]"),r=null==t?void 0:t.getAttribute("data-n-css");l.forEach(t=>{let{href:n,text:o}=t;if(!e.has(n)){let e=document.createElement("style");e.setAttribute("data-n-href",n),e.setAttribute("media","x"),r&&e.setAttribute("nonce",r),document.head.appendChild(e),e.appendChild(document.createTextNode(o))}})}();let m=(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(ee,{callback:function(){if(l&&!d){let e=new Set(l.map(e=>e.href)),t=V(document.querySelectorAll("style[data-n-href]")),r=t.map(e=>e.getAttribute("data-n-href"));for(let n=0;n{let{href:t}=e,r=document.querySelector('style[data-n-href="'+t+'"]');r&&(n.parentNode.insertBefore(r,n.nextSibling),n=r)}),V(document.querySelectorAll("link[data-n-p]")).forEach(e=>{e.parentNode.removeChild(e)})}if(e.scroll){let{x:t,y:r}=e.scroll;(0,S.handleSmoothScroll)(()=>{window.scrollTo(t,r)})}}}),(0,g.jsxs)(J,{children:[K(r,f),(0,g.jsx)(T.Portal,{type:"next-route-announcer",children:(0,g.jsx)(C.RouteAnnouncer,{})})]})]});return!function(e,t){R.ST&&performance.mark(et.beforeRender);let r=t(eo?ei:eu);en?(0,y.default.startTransition)(()=>{en.render(r)}):(en=b.default.hydrateRoot(e,r,{onRecoverableError:H.default}),eo=!1)}(u,e=>(0,g.jsx)(el,{callbacks:[e,h],children:(0,g.jsx)(y.default.StrictMode,{children:m})})),p}async function ec(e){if(e.err&&(void 0===e.Component||!e.isHydratePass)){await Z(e);return}try{await es(e)}catch(r){let t=(0,L.getProperError)(r);if(t.cancelled)throw t;await Z({...e,err:t})}}async function ef(e){let t=o.err;try{let e=await i.routeLoader.whenEntrypoint("/_app");if("error"in e)throw e.error;let{component:t,exports:r}=e;f=t,r&&r.reportWebVitals&&(d=e=>{let t,{id:n,name:o,startTime:a,value:i,duration:u,entryType:l,entries:s,attribution:c}=e,f=Date.now()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12);s&&s.length&&(t=s[0].startTime);let d={id:n||f,name:o,startTime:a||t,value:null==i?u:i,label:"mark"===l||"measure"===l?"custom":"web-vital"};c&&(d.attribution=c),r.reportWebVitals(d)});let n=await i.routeLoader.whenEntrypoint(o.page);if("error"in n)throw n.error;p=n.component}catch(e){t=(0,L.getProperError)(e)}window.__NEXT_PRELOADREADY&&await window.__NEXT_PRELOADREADY(o.dynamicIds),n=(0,A.createRouter)(o.page,o.query,a,{initialProps:o.props,pageLoader:i,App:f,Component:p,wrapApp:Q,err:t,isFallback:!!o.isFallback,subscription:(e,t,r)=>ec(Object.assign({},e,{App:t,scroll:r})),locale:o.locale,locales:o.locales,defaultLocale:h,domainLocales:o.domainLocales,isPreview:o.isPreview}),X=await n._initialMatchesMiddlewarePromise;let r={App:f,initial:!0,Component:p,props:o.props,err:t,isHydratePass:!0};(null==e?void 0:e.beforeRender)&&await e.beforeRender(),ec(r)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2288:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(9151);let n=r(4500);window.next={version:n.version,get router(){return n.router},emitter:n.emitter},(0,n.initialize)({}).then(()=>(0,n.hydrate)()).catch(console.error),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8796:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return a}});let n=r(3575),o=r(626),a=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:r,hash:a}=(0,o.parsePath)(e);return/\.[^/]+\/?$/.test(t)?""+(0,n.removeTrailingSlash)(t)+r+a:t.endsWith("/")?""+t+r+a:t+"/"+r+a};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6920:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let n=r(5575);function o(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};(0,n.isBailoutToCSRError)(e)||t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1413:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return d}});let n=r(8754),o=r(1412),a=r(7399),i=n._(r(116)),u=r(8878),l=r(1735),s=r(2757),c=r(3575),f=r(2856);r(5104);class d{getPageList(){return(0,f.getClientBuildManifest)().then(e=>e.sortedPages)}getMiddleware(){return window.__MIDDLEWARE_MATCHERS=[],window.__MIDDLEWARE_MATCHERS}getDataHref(e){let{asPath:t,href:r,locale:n}=e,{pathname:f,query:d,search:p}=(0,s.parseRelativeUrl)(r),{pathname:h}=(0,s.parseRelativeUrl)(t),m=(0,c.removeTrailingSlash)(f);if("/"!==m[0])throw Error('Route name should start with a "/", got "'+m+'"');return(e=>{let t=(0,i.default)((0,c.removeTrailingSlash)((0,u.addLocale)(e,n)),".json");return(0,o.addBasePath)("/_next/data/"+this.buildId+t+p,!0)})(e.skipInterpolation?h:(0,l.isDynamicRoute)(m)?(0,a.interpolateAs)(f,h,d).result:m)}_isSsg(e){return this.promisedSsgManifest.then(t=>t.has(e))}loadPage(e){return this.routeLoader.loadRoute(e).then(e=>{if("component"in e)return{page:e.component,mod:e.exports,styleSheets:e.styles.map(e=>({href:e.href,text:e.content}))};throw e.error})}prefetch(e){return this.routeLoader.prefetch(e)}constructor(e,t){this.routeLoader=(0,f.createRouteLoader)(t),this.buildId=e,this.assetPrefix=t,this.promisedSsgManifest=new Promise(e=>{window.__SSG_MANIFEST?e(window.__SSG_MANIFEST):window.__SSG_MANIFEST_CB=()=>{e(window.__SSG_MANIFEST)}})}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5736:function(e,t,r){"use strict";let n;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return u}});let o=["CLS","FCP","FID","INP","LCP","TTFB"];location.href;let a=!1;function i(e){n&&n(e)}let u=e=>{if(n=e,!a)for(let e of(a=!0,o))try{let t;t||(t=r(8018)),t["on"+e](i)}catch(t){console.warn("Failed to track "+e+" web-vital",t)}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1493:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"Portal",{enumerable:!0,get:function(){return a}});let n=r(7294),o=r(3935),a=e=>{let{children:t,type:r}=e,[a,i]=(0,n.useState)(null);return(0,n.useEffect)(()=>{let e=document.createElement(r);return document.body.appendChild(e),i(e),()=>{document.body.removeChild(e)}},[r]),a?(0,o.createPortal)(t,a):null};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1566:function(e,t,r){"use strict";function n(e){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return n}}),r(1838),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4509:function(e,t,r){"use strict";function n(e,t){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeLocale",{enumerable:!0,get:function(){return n}}),r(626),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6078:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{cancelIdleCallback:function(){return n},requestIdleCallback:function(){return r}});let r="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},n="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4813:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"resolveHref",{enumerable:!0,get:function(){return f}});let n=r(8600),o=r(5058),a=r(2795),i=r(5782),u=r(8796),l=r(5853),s=r(2189),c=r(7399);function f(e,t,r){let f;let d="string"==typeof t?t:(0,o.formatWithValidation)(t),p=d.match(/^[a-zA-Z]{1,}:\/\//),h=p?d.slice(p[0].length):d;if((h.split("?",1)[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+d+"' passed to next/router in page: '"+e.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let t=(0,i.normalizeRepeatedSlashes)(h);d=(p?p[0]:"")+t}if(!(0,l.isLocalURL)(d))return r?[d]:d;try{f=new URL(d.startsWith("#")?e.asPath:e.pathname,"http://n")}catch(e){f=new URL("/","http://n")}try{let e=new URL(d,f);e.pathname=(0,u.normalizePathTrailingSlash)(e.pathname);let t="";if((0,s.isDynamicRoute)(e.pathname)&&e.searchParams&&r){let r=(0,n.searchParamsToUrlQuery)(e.searchParams),{result:i,params:u}=(0,c.interpolateAs)(e.pathname,e.pathname,r);i&&(t=(0,o.formatWithValidation)({pathname:i,hash:e.hash,query:(0,a.omit)(r,u)}))}let i=e.origin===f.origin?e.href.slice(e.origin.length):e.href;return r?[i,t||i]:i}catch(e){return r?[d]:d}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3622:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RouteAnnouncer:function(){return l},default:function(){return s}});let n=r(8754),o=r(5893),a=n._(r(7294)),i=r(7253),u={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",top:0,width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},l=()=>{let{asPath:e}=(0,i.useRouter)(),[t,r]=a.default.useState(""),n=a.default.useRef(e);return a.default.useEffect(()=>{if(n.current!==e){if(n.current=e,document.title)r(document.title);else{var t;let n=document.querySelector("h1");r((null!=(t=null==n?void 0:n.innerText)?t:null==n?void 0:n.textContent)||e)}}},[e]),(0,o.jsx)("p",{"aria-live":"assertive",id:"__next-route-announcer__",role:"alert",style:u,children:t})},s=l;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2856:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createRouteLoader:function(){return m},getClientBuildManifest:function(){return p},isAssetError:function(){return s},markAssetError:function(){return l}}),r(8754),r(116);let n=r(2518),o=r(6078),a=r(4878);function i(e,t,r){let n,o=t.get(e);if(o)return"future"in o?o.future:Promise.resolve(o);let a=new Promise(e=>{n=e});return t.set(e,o={resolve:n,future:a}),r?r().then(e=>(n(e),e)).catch(r=>{throw t.delete(e),r}):a}let u=Symbol("ASSET_LOAD_ERROR");function l(e){return Object.defineProperty(e,u,{})}function s(e){return e&&u in e}let c=function(e){try{return e=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||e.relList.supports("prefetch")}catch(e){return!1}}(),f=()=>(0,a.getDeploymentIdQueryOrEmptyString)();function d(e,t,r){return new Promise((n,a)=>{let i=!1;e.then(e=>{i=!0,n(e)}).catch(a),(0,o.requestIdleCallback)(()=>setTimeout(()=>{i||a(r)},t))})}function p(){return self.__BUILD_MANIFEST?Promise.resolve(self.__BUILD_MANIFEST):d(new Promise(e=>{let t=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{e(self.__BUILD_MANIFEST),t&&t()}}),3800,l(Error("Failed to load client build manifest")))}function h(e,t){return p().then(r=>{if(!(t in r))throw l(Error("Failed to lookup route: "+t));let o=r[t].map(t=>e+"/_next/"+encodeURI(t));return{scripts:o.filter(e=>e.endsWith(".js")).map(e=>(0,n.__unsafeCreateTrustedScriptURL)(e)+f()),css:o.filter(e=>e.endsWith(".css")).map(e=>e+f())}})}function m(e){let t=new Map,r=new Map,n=new Map,a=new Map;function u(e){{var t;let n=r.get(e.toString());return n||(document.querySelector('script[src^="'+e+'"]')?Promise.resolve():(r.set(e.toString(),n=new Promise((r,n)=>{(t=document.createElement("script")).onload=r,t.onerror=()=>n(l(Error("Failed to load script: "+e))),t.crossOrigin=void 0,t.src=e,document.body.appendChild(t)})),n))}}function s(e){let t=n.get(e);return t||n.set(e,t=fetch(e,{credentials:"same-origin"}).then(t=>{if(!t.ok)throw Error("Failed to load stylesheet: "+e);return t.text().then(t=>({href:e,content:t}))}).catch(e=>{throw l(e)})),t}return{whenEntrypoint:e=>i(e,t),onEntrypoint(e,r){(r?Promise.resolve().then(()=>r()).then(e=>({component:e&&e.default||e,exports:e}),e=>({error:e})):Promise.resolve(void 0)).then(r=>{let n=t.get(e);n&&"resolve"in n?r&&(t.set(e,r),n.resolve(r)):(r?t.set(e,r):t.delete(e),a.delete(e))})},loadRoute(r,n){return i(r,a,()=>{let o;return d(h(e,r).then(e=>{let{scripts:n,css:o}=e;return Promise.all([t.has(r)?[]:Promise.all(n.map(u)),Promise.all(o.map(s))])}).then(e=>this.whenEntrypoint(r).then(t=>({entrypoint:t,styles:e[1]}))),3800,l(Error("Route did not complete loading: "+r))).then(e=>{let{entrypoint:t,styles:r}=e,n=Object.assign({styles:r},t);return"error"in t?t:n}).catch(e=>{if(n)throw e;return{error:e}}).finally(()=>null==o?void 0:o())})},prefetch(t){let r;return(r=navigator.connection)&&(r.saveData||/2g/.test(r.effectiveType))?Promise.resolve():h(e,t).then(e=>Promise.all(c?e.scripts.map(e=>{var t,r,n;return t=e.toString(),r="script",new Promise((e,o)=>{if(document.querySelector('\n link[rel="prefetch"][href^="'+t+'"],\n link[rel="preload"][href^="'+t+'"],\n script[src^="'+t+'"]'))return e();n=document.createElement("link"),r&&(n.as=r),n.rel="prefetch",n.crossOrigin=void 0,n.onload=e,n.onerror=()=>o(l(Error("Failed to prefetch: "+t))),n.href=t,document.head.appendChild(n)})}):[])).then(()=>{(0,o.requestIdleCallback)(()=>this.loadRoute(t,!0).catch(()=>{}))}).catch(()=>{})}}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7253:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{Router:function(){return a.default},createRouter:function(){return m},default:function(){return p},makePublicRouterInstance:function(){return _},useRouter:function(){return h},withRouter:function(){return l.default}});let n=r(8754),o=n._(r(7294)),a=n._(r(9668)),i=r(7171),u=n._(r(676)),l=n._(r(538)),s={router:null,readyCallbacks:[],ready(e){if(this.router)return e();this.readyCallbacks.push(e)}},c=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],f=["push","replace","reload","back","prefetch","beforePopState"];function d(){if(!s.router)throw Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n');return s.router}Object.defineProperty(s,"events",{get:()=>a.default.events}),c.forEach(e=>{Object.defineProperty(s,e,{get:()=>d()[e]})}),f.forEach(e=>{s[e]=function(){for(var t=arguments.length,r=Array(t),n=0;n{s.ready(()=>{a.default.events.on(e,function(){for(var t=arguments.length,r=Array(t),n=0;ne()),s.readyCallbacks=[],s.router}function _(e){let t={};for(let r of c){if("object"==typeof e[r]){t[r]=Object.assign(Array.isArray(e[r])?[]:{},e[r]);continue}t[r]=e[r]}return t.events=a.default.events,f.forEach(r=>{t[r]=function(){for(var t=arguments.length,n=Array(t),o=0;o{if(i.default.preinit){e.forEach(e=>{i.default.preinit(e,{as:"style"})});return}{let t=document.head;e.forEach(e=>{let r=document.createElement("link");r.type="text/css",r.rel="stylesheet",r.href=e,t.appendChild(r)})}},m=e=>{let{src:t,id:r,onLoad:n=()=>{},onReady:o=null,dangerouslySetInnerHTML:a,children:i="",strategy:u="afterInteractive",onError:l,stylesheets:c}=e,m=r||t;if(m&&d.has(m))return;if(f.has(t)){d.add(m),f.get(t).then(n,l);return}let _=()=>{o&&o(),d.add(m)},g=document.createElement("script"),y=new Promise((e,t)=>{g.addEventListener("load",function(t){e(),n&&n.call(this,t),_()}),g.addEventListener("error",function(e){t(e)})}).catch(function(e){l&&l(e)});for(let[r,n]of(a?(g.innerHTML=a.__html||"",_()):i?(g.textContent="string"==typeof i?i:Array.isArray(i)?i.join(""):"",_()):t&&(g.src=t,f.set(t,y)),Object.entries(e))){if(void 0===n||p.includes(r))continue;let e=s.DOMAttributeNames[r]||r.toLowerCase();g.setAttribute(e,n)}"worker"===u&&g.setAttribute("type","text/partytown"),g.setAttribute("data-nscript",u),c&&h(c),document.body.appendChild(g)};function _(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>m(e))}):m(e)}function g(e){e.forEach(_),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");d.add(t)})}function y(e){let{id:t,src:r="",onLoad:n=()=>{},onReady:o=null,strategy:s="afterInteractive",onError:f,stylesheets:p,...h}=e,{updateScripts:_,scripts:g,getIsSsr:y,appDir:b,nonce:P}=(0,u.useContext)(l.HeadManagerContext),v=(0,u.useRef)(!1);(0,u.useEffect)(()=>{let e=t||r;v.current||(o&&e&&d.has(e)&&o(),v.current=!0)},[o,t,r]);let E=(0,u.useRef)(!1);if((0,u.useEffect)(()=>{!E.current&&("afterInteractive"===s?m(e):"lazyOnload"===s&&("complete"===document.readyState?(0,c.requestIdleCallback)(()=>m(e)):window.addEventListener("load",()=>{(0,c.requestIdleCallback)(()=>m(e))})),E.current=!0)},[e,s]),("beforeInteractive"===s||"worker"===s)&&(_?(g[s]=(g[s]||[]).concat([{id:t,src:r,onLoad:n,onReady:o,onError:f,...h}]),_(g)):y&&y()?d.add(t||r):y&&!y()&&m(e)),b){if(p&&p.forEach(e=>{i.default.preinit(e,{as:"style"})}),"beforeInteractive"===s)return r?(i.default.preload(r,h.integrity?{as:"script",integrity:h.integrity,nonce:P,crossOrigin:h.crossOrigin}:{as:"script",nonce:P,crossOrigin:h.crossOrigin}),(0,a.jsx)("script",{nonce:P,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([r,{...h,id:t}])+")"}})):(h.dangerouslySetInnerHTML&&(h.children=h.dangerouslySetInnerHTML.__html,delete h.dangerouslySetInnerHTML),(0,a.jsx)("script",{nonce:P,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...h,id:t}])+")"}}));"afterInteractive"===s&&r&&i.default.preload(r,h.integrity?{as:"script",integrity:h.integrity,nonce:P,crossOrigin:h.crossOrigin}:{as:"script",nonce:P,crossOrigin:h.crossOrigin})}return null}Object.defineProperty(y,"__nextScript",{value:!0});let b=y;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5179:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return o}});let n=r(5303);function o(e){if("ended"!==e.state.state)throw Error("Expected span to be ended");(0,n.sendMessage)(JSON.stringify({event:"span-end",startTime:e.startTime,endTime:e.state.endTime,spanName:e.name,attributes:e.attributes}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7930:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(8754)._(r(8967));class o{end(e){if("ended"===this.state.state)throw Error("Span has already ended");this.state={state:"ended",endTime:null!=e?e:Date.now()},this.onSpanEnd(this)}constructor(e,t,r){var n,o;this.name=e,this.attributes=null!=(n=t.attributes)?n:{},this.startTime=null!=(o=t.startTime)?o:Date.now(),this.onSpanEnd=r,this.state={state:"inprogress"}}}class a{startSpan(e,t){return new o(e,t,this.handleSpanEnd)}onSpanEnd(e){return this._emitter.on("spanend",e),()=>{this._emitter.off("spanend",e)}}constructor(){this._emitter=(0,n.default)(),this.handleSpanEnd=e=>{this._emitter.emit("spanend",e)}}}let i=new a;("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2518:function(e,t){"use strict";let r;function n(e){var t;return(null==(t=function(){if(void 0===r){var e;r=(null==(e=window.trustedTypes)?void 0:e.createPolicy("nextjs",{createHTML:e=>e,createScript:e=>e,createScriptURL:e=>e}))||null}return r}())?void 0:t.createScriptURL(e))||e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"__unsafeCreateTrustedScriptURL",{enumerable:!0,get:function(){return n}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9151:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(4878),self.__next_set_public_path__=e=>{r.p=e},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},538:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return a}}),r(8754);let n=r(5893);r(7294);let o=r(7253);function a(e){function t(t){return(0,n.jsx)(e,{router:(0,o.useRouter)(),...t})}return t.getInitialProps=e.getInitialProps,t.origGetInitialProps=e.origGetInitialProps,t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8141:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return l}});let n=r(8754),o=r(5893),a=n._(r(7294)),i=r(5782);async function u(e){let{Component:t,ctx:r}=e;return{pageProps:await (0,i.loadGetInitialProps)(t,r)}}class l extends a.default.Component{render(){let{Component:e,pageProps:t}=this.props;return(0,o.jsx)(e,{...t})}}l.origGetInitialProps=u,l.getInitialProps=u,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8529:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return c}});let n=r(8754),o=r(5893),a=n._(r(7294)),i=n._(r(494)),u={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function l(e){let{res:t,err:r}=e;return{statusCode:t&&t.statusCode?t.statusCode:r?r.statusCode:404}}let s={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}};class c extends a.default.Component{render(){let{statusCode:e,withDarkMode:t=!0}=this.props,r=this.props.title||u[e]||"An unexpected error has occurred";return(0,o.jsxs)("div",{style:s.error,children:[(0,o.jsx)(i.default,{children:(0,o.jsx)("title",{children:e?e+": "+r:"Application error: a client-side exception has occurred"})}),(0,o.jsxs)("div",{style:s.desc,children:[(0,o.jsx)("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(t?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),e?(0,o.jsx)("h1",{className:"next-error-h1",style:s.h1,children:e}):null,(0,o.jsx)("div",{style:s.wrap,children:(0,o.jsxs)("h2",{style:s.h2,children:[this.props.title||e?r:(0,o.jsx)(o.Fragment,{children:"Application error: a client-side exception has occurred (see the browser console for more information)"}),"."]})})]})]})}}c.displayName="ErrorPage",c.getInitialProps=l,c.origGetInitialProps=l,("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5010:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"AmpStateContext",{enumerable:!0,get:function(){return n}});let n=r(8754)._(r(7294)).default.createContext({})},8579:function(e,t){"use strict";function r(e){let{ampFirst:t=!1,hybrid:r=!1,hasQuery:n=!1}=void 0===e?{}:e;return t||r&&n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isInAmpMode",{enumerable:!0,get:function(){return r}})},3068:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{AppRouterContext:function(){return o},GlobalLayoutRouterContext:function(){return i},LayoutRouterContext:function(){return a},MissingSlotContext:function(){return l},TemplateContext:function(){return u}});let n=r(8754)._(r(7294)),o=n.default.createContext(null),a=n.default.createContext(null),i=n.default.createContext(null),u=n.default.createContext(null),l=n.default.createContext(new Set)},9970:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"BloomFilter",{enumerable:!0,get:function(){return r}});class r{static from(e,t){void 0===t&&(t=1e-4);let n=new r(e.length,t);for(let t of e)n.add(t);return n}export(){return{numItems:this.numItems,errorRate:this.errorRate,numBits:this.numBits,numHashes:this.numHashes,bitArray:this.bitArray}}import(e){this.numItems=e.numItems,this.errorRate=e.errorRate,this.numBits=e.numBits,this.numHashes=e.numHashes,this.bitArray=e.bitArray}add(e){this.getHashValues(e).forEach(e=>{this.bitArray[e]=1})}contains(e){return this.getHashValues(e).every(e=>this.bitArray[e])}getHashValues(e){let t=[];for(let r=1;r<=this.numHashes;r++){let n=function(e){let t=0;for(let r=0;r>>13,t=Math.imul(t,1540483477);return t>>>0}(""+e+r)%this.numBits;t.push(n)}return t}constructor(e,t=1e-4){this.numItems=e,this.errorRate=t,this.numBits=Math.ceil(-(e*Math.log(t))/(Math.log(2)*Math.log(2))),this.numHashes=Math.ceil(this.numBits/e*Math.log(2)),this.bitArray=Array(this.numBits).fill(0)}}},5104:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{APP_BUILD_MANIFEST:function(){return y},APP_CLIENT_INTERNALS:function(){return $},APP_PATHS_MANIFEST:function(){return m},APP_PATH_ROUTES_MANIFEST:function(){return _},AUTOMATIC_FONT_OPTIMIZATION_MANIFEST:function(){return C},BARREL_OPTIMIZATION_PREFIX:function(){return H},BLOCKED_PAGES:function(){return D},BUILD_ID_FILE:function(){return N},BUILD_MANIFEST:function(){return g},CLIENT_PUBLIC_FILES_PATH:function(){return k},CLIENT_REFERENCE_MANIFEST:function(){return W},CLIENT_STATIC_FILES_PATH:function(){return U},CLIENT_STATIC_FILES_RUNTIME_AMP:function(){return J},CLIENT_STATIC_FILES_RUNTIME_MAIN:function(){return X},CLIENT_STATIC_FILES_RUNTIME_MAIN_APP:function(){return Y},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS:function(){return Z},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL:function(){return ee},CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH:function(){return K},CLIENT_STATIC_FILES_RUNTIME_WEBPACK:function(){return Q},COMPILER_INDEXES:function(){return a},COMPILER_NAMES:function(){return o},CONFIG_FILES:function(){return L},DEFAULT_RUNTIME_WEBPACK:function(){return et},DEFAULT_SANS_SERIF_FONT:function(){return el},DEFAULT_SERIF_FONT:function(){return eu},DEV_CLIENT_PAGES_MANIFEST:function(){return T},DEV_MIDDLEWARE_MANIFEST:function(){return x},EDGE_RUNTIME_WEBPACK:function(){return er},EDGE_UNSUPPORTED_NODE_APIS:function(){return ep},EXPORT_DETAIL:function(){return S},EXPORT_MARKER:function(){return E},FUNCTIONS_CONFIG_MANIFEST:function(){return b},GOOGLE_FONT_PROVIDER:function(){return ea},IMAGES_MANIFEST:function(){return w},INTERCEPTION_ROUTE_REWRITE_MANIFEST:function(){return V},MIDDLEWARE_BUILD_MANIFEST:function(){return G},MIDDLEWARE_MANIFEST:function(){return M},MIDDLEWARE_REACT_LOADABLE_MANIFEST:function(){return z},MODERN_BROWSERSLIST_TARGET:function(){return n.default},NEXT_BUILTIN_DOCUMENT:function(){return B},NEXT_FONT_MANIFEST:function(){return v},OPTIMIZED_FONT_PROVIDERS:function(){return ei},PAGES_MANIFEST:function(){return h},PHASE_DEVELOPMENT_SERVER:function(){return f},PHASE_EXPORT:function(){return l},PHASE_INFO:function(){return p},PHASE_PRODUCTION_BUILD:function(){return s},PHASE_PRODUCTION_SERVER:function(){return c},PHASE_TEST:function(){return d},PRERENDER_MANIFEST:function(){return O},REACT_LOADABLE_MANIFEST:function(){return I},ROUTES_MANIFEST:function(){return j},RSC_MODULE_TYPES:function(){return ed},SERVER_DIRECTORY:function(){return A},SERVER_FILES_MANIFEST:function(){return R},SERVER_PROPS_ID:function(){return eo},SERVER_REFERENCE_MANIFEST:function(){return q},STATIC_PROPS_ID:function(){return en},STATIC_STATUS_PAGES:function(){return es},STRING_LITERAL_DROP_BUNDLE:function(){return F},SUBRESOURCE_INTEGRITY_MANIFEST:function(){return P},SYSTEM_ENTRYPOINTS:function(){return eh},TRACE_OUTPUT_VERSION:function(){return ec},TURBO_TRACE_DEFAULT_MEMORY_LIMIT:function(){return ef},UNDERSCORE_NOT_FOUND_ROUTE:function(){return i},UNDERSCORE_NOT_FOUND_ROUTE_ENTRY:function(){return u}});let n=r(8754)._(r(979)),o={client:"client",server:"server",edgeServer:"edge-server"},a={[o.client]:0,[o.server]:1,[o.edgeServer]:2},i="/_not-found",u=""+i+"/page",l="phase-export",s="phase-production-build",c="phase-production-server",f="phase-development-server",d="phase-test",p="phase-info",h="pages-manifest.json",m="app-paths-manifest.json",_="app-path-routes-manifest.json",g="build-manifest.json",y="app-build-manifest.json",b="functions-config-manifest.json",P="subresource-integrity-manifest",v="next-font-manifest",E="export-marker.json",S="export-detail.json",O="prerender-manifest.json",j="routes-manifest.json",w="images-manifest.json",R="required-server-files.json",T="_devPagesManifest.json",M="middleware-manifest.json",x="_devMiddlewareManifest.json",I="react-loadable-manifest.json",C="font-manifest.json",A="server",L=["next.config.js","next.config.mjs"],N="BUILD_ID",D=["/_document","/_app","/_error"],k="public",U="static",F="__NEXT_DROP_CLIENT_FILE__",B="__NEXT_BUILTIN_DOCUMENT__",H="__barrel_optimize__",W="client-reference-manifest",q="server-reference-manifest",G="middleware-build-manifest",z="middleware-react-loadable-manifest",V="interception-route-rewrite-manifest",X="main",Y=""+X+"-app",$="app-pages-internals",K="react-refresh",J="amp",Q="webpack",Z="polyfills",ee=Symbol(Z),et="webpack-runtime",er="edge-runtime-webpack",en="__N_SSG",eo="__N_SSP",ea="https://fonts.googleapis.com/",ei=[{url:ea,preconnect:"https://fonts.gstatic.com"},{url:"https://use.typekit.net",preconnect:"https://use.typekit.net"}],eu={name:"Times New Roman",xAvgCharWidth:821,azAvgWidth:854.3953488372093,unitsPerEm:2048},el={name:"Arial",xAvgCharWidth:904,azAvgWidth:934.5116279069767,unitsPerEm:2048},es=["/500"],ec=1,ef=6e3,ed={client:"client",server:"server"},ep=["clearImmediate","setImmediate","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","DecompressionStream","DomException","MessageChannel","MessageEvent","MessagePort","ReadableByteStreamController","ReadableStreamBYOBRequest","ReadableStreamDefaultController","TransformStreamDefaultController","WritableStreamDefaultController"],eh=new Set([X,K,J,Y]);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4592:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"escapeStringRegexp",{enumerable:!0,get:function(){return o}});let r=/[|\\{}()[\]^$+*?.-]/,n=/[|\\{}()[\]^$+*?.-]/g;function o(e){return r.test(e)?e.replace(n,"\\$&"):e}},77:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"HeadManagerContext",{enumerable:!0,get:function(){return n}});let n=r(8754)._(r(7294)).default.createContext({})},494:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return m},defaultHead:function(){return f}});let n=r(8754),o=r(1757),a=r(5893),i=o._(r(7294)),u=n._(r(3657)),l=r(5010),s=r(77),c=r(8579);function f(e){void 0===e&&(e=!1);let t=[(0,a.jsx)("meta",{charSet:"utf-8"})];return e||t.push((0,a.jsx)("meta",{name:"viewport",content:"width=device-width"})),t}function d(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===i.default.Fragment?e.concat(i.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}r(9784);let p=["name","httpEquiv","charSet","itemProp"];function h(e,t){let{inAmpMode:r}=t;return e.reduce(d,[]).reverse().concat(f(r).reverse()).filter(function(){let e=new Set,t=new Set,r=new Set,n={};return o=>{let a=!0,i=!1;if(o.key&&"number"!=typeof o.key&&o.key.indexOf("$")>0){i=!0;let t=o.key.slice(o.key.indexOf("$")+1);e.has(t)?a=!1:e.add(t)}switch(o.type){case"title":case"base":t.has(o.type)?a=!1:t.add(o.type);break;case"meta":for(let e=0,t=p.length;e{let n=e.key||t;if(!r&&"link"===e.type&&e.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(t=>e.props.href.startsWith(t))){let t={...e.props||{}};return t["data-href"]=t.href,t.href=void 0,t["data-optimized-fonts"]=!0,i.default.cloneElement(e,t)}return i.default.cloneElement(e,{key:n})})}let m=function(e){let{children:t}=e,r=(0,i.useContext)(l.AmpStateContext),n=(0,i.useContext)(s.HeadManagerContext);return(0,a.jsx)(u.default,{reduceComponentsToState:h,headManager:n,inAmpMode:(0,c.isInAmpMode)(r),children:t})};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},213:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PathParamsContext:function(){return i},PathnameContext:function(){return a},SearchParamsContext:function(){return o}});let n=r(7294),o=(0,n.createContext)(null),a=(0,n.createContext)(null),i=(0,n.createContext)(null)},1623:function(e,t){"use strict";function r(e,t){let r;let n=e.split("/");return(t||[]).some(t=>!!n[1]&&n[1].toLowerCase()===t.toLowerCase()&&(r=t,n.splice(1,1),e=n.join("/")||"/",!0)),{pathname:e,detectedLocale:r}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizeLocalePath",{enumerable:!0,get:function(){return r}})},8261:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ImageConfigContext",{enumerable:!0,get:function(){return a}});let n=r(8754)._(r(7294)),o=r(4666),a=n.default.createContext(o.imageConfigDefault)},4666:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});let r=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",localPatterns:void 0,remotePatterns:[],unoptimized:!1}},8299:function(e,t){"use strict";function r(e){return Object.prototype.toString.call(e)}function n(e){if("[object Object]"!==r(e))return!1;let t=Object.getPrototypeOf(e);return null===t||t.hasOwnProperty("isPrototypeOf")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getObjectClassLabel:function(){return r},isPlainObject:function(){return n}})},5575:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{BailoutToCSRError:function(){return n},isBailoutToCSRError:function(){return o}});let r="BAILOUT_TO_CLIENT_SIDE_RENDERING";class n extends Error{constructor(e){super("Bail out to client-side rendering: "+e),this.reason=e,this.digest=r}}function o(e){return"object"==typeof e&&null!==e&&"digest"in e&&e.digest===r}},8967:function(e,t){"use strict";function r(){let e=Object.create(null);return{on(t,r){(e[t]||(e[t]=[])).push(r)},off(t,r){e[t]&&e[t].splice(e[t].indexOf(r)>>>0,1)},emit(t){for(var r=arguments.length,n=Array(r>1?r-1:0),o=1;o{e(...n)})}}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},979:function(e){"use strict";e.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},3349:function(e,t){"use strict";function r(e){let t=(null==e?void 0:e.replace(/^\/+|\/+$/g,""))||!1;if(!t)return"";if(URL.canParse(t)){let e=new URL(t).toString();return e.endsWith("/")?e.slice(0,-1):e}return"/"+t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizedAssetPrefix",{enumerable:!0,get:function(){return r}})},5876:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"denormalizePagePath",{enumerable:!0,get:function(){return a}});let n=r(2189),o=r(4212);function a(e){let t=(0,o.normalizePathSep)(e);return t.startsWith("/index/")&&!(0,n.isDynamicRoute)(t)?t.slice(6):"/index"!==t?t:"/"}},5078:function(e,t){"use strict";function r(e){return e.startsWith("/")?e:"/"+e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ensureLeadingSlash",{enumerable:!0,get:function(){return r}})},4212:function(e,t){"use strict";function r(e){return e.replace(/\\/g,"/")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathSep",{enumerable:!0,get:function(){return r}})},7171:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"RouterContext",{enumerable:!0,get:function(){return n}});let n=r(8754)._(r(7294)).default.createContext(null)},2488:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PathnameContextProviderAdapter:function(){return p},adaptForAppRouterInstance:function(){return c},adaptForPathParams:function(){return d},adaptForSearchParams:function(){return f}});let n=r(1757),o=r(5893),a=n._(r(7294)),i=r(213),u=r(2189),l=r(4232),s=r(6309);function c(e){return{back(){e.back()},forward(){e.forward()},refresh(){e.reload()},fastRefresh(){},push(t,r){let{scroll:n}=void 0===r?{}:r;e.push(t,void 0,{scroll:n})},replace(t,r){let{scroll:n}=void 0===r?{}:r;e.replace(t,void 0,{scroll:n})},prefetch(t){e.prefetch(t)}}}function f(e){return e.isReady&&e.query?(0,l.asPathToSearchParams)(e.asPath):new URLSearchParams}function d(e){if(!e.isReady||!e.query)return null;let t={};for(let r of Object.keys((0,s.getRouteRegex)(e.pathname).groups))t[r]=e.query[r];return t}function p(e){let{children:t,router:r,...n}=e,l=(0,a.useRef)(n.isAutoExport),s=(0,a.useMemo)(()=>{let e;let t=l.current;if(t&&(l.current=!1),(0,u.isDynamicRoute)(r.pathname)&&(r.isFallback||t&&!r.isReady))return null;try{e=new URL(r.asPath,"http://f")}catch(e){return"/"}return e.pathname},[r.asPath,r.isFallback,r.isReady,r.pathname]);return(0,o.jsx)(i.PathnameContext.Provider,{value:s,children:t})}},9668:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{createKey:function(){return q},default:function(){return V},matchesMiddleware:function(){return N}});let n=r(8754),o=r(1757),a=r(3575),i=r(2856),u=r(5026),l=o._(r(676)),s=r(5876),c=r(1623),f=n._(r(8967)),d=r(5782),p=r(1735),h=r(2757);r(2431);let m=r(3323),_=r(6309),g=r(5058);r(7193);let y=r(626),b=r(8878),P=r(4509),v=r(1566),E=r(1412),S=r(1838),O=r(4813),j=r(9423),w=r(3209),R=r(5604),T=r(9012),M=r(5853),x=r(6312),I=r(2795),C=r(7399),A=r(2179);function L(){return Object.assign(Error("Route Cancelled"),{cancelled:!0})}async function N(e){let t=await Promise.resolve(e.router.pageLoader.getMiddleware());if(!t)return!1;let{pathname:r}=(0,y.parsePath)(e.asPath),n=(0,S.hasBasePath)(r)?(0,v.removeBasePath)(r):r,o=(0,E.addBasePath)((0,b.addLocale)(n,e.locale));return t.some(e=>new RegExp(e.regexp).test(o))}function D(e){let t=(0,d.getLocationOrigin)();return e.startsWith(t)?e.substring(t.length):e}function k(e,t,r){let[n,o]=(0,O.resolveHref)(e,t,!0),a=(0,d.getLocationOrigin)(),i=n.startsWith(a),u=o&&o.startsWith(a);n=D(n),o=o?D(o):o;let l=i?n:(0,E.addBasePath)(n),s=r?D((0,O.resolveHref)(e,r)):o||n;return{url:l,as:u?s:(0,E.addBasePath)(s)}}function U(e,t){let r=(0,a.removeTrailingSlash)((0,s.denormalizePagePath)(e));return"/404"===r||"/_error"===r?e:(t.includes(r)||t.some(t=>{if((0,p.isDynamicRoute)(t)&&(0,_.getRouteRegex)(t).re.test(r))return e=t,!0}),(0,a.removeTrailingSlash)(e))}async function F(e){if(!await N(e)||!e.fetchData)return null;let t=await e.fetchData(),r=await function(e,t,r){let n={basePath:r.router.basePath,i18n:{locales:r.router.locales},trailingSlash:!0},o=t.headers.get("x-nextjs-rewrite"),u=o||t.headers.get("x-nextjs-matched-path"),l=t.headers.get("x-matched-path");if(!l||u||l.includes("__next_data_catchall")||l.includes("/_error")||l.includes("/404")||(u=l),u){if(u.startsWith("/")){let t=(0,h.parseRelativeUrl)(u),l=(0,w.getNextPathnameInfo)(t.pathname,{nextConfig:n,parseData:!0}),s=(0,a.removeTrailingSlash)(l.pathname);return Promise.all([r.router.pageLoader.getPageList(),(0,i.getClientBuildManifest)()]).then(a=>{let[i,{__rewrites:u}]=a,f=(0,b.addLocale)(l.pathname,l.locale);if((0,p.isDynamicRoute)(f)||!o&&i.includes((0,c.normalizeLocalePath)((0,v.removeBasePath)(f),r.router.locales).pathname)){let r=(0,w.getNextPathnameInfo)((0,h.parseRelativeUrl)(e).pathname,{nextConfig:n,parseData:!0});f=(0,E.addBasePath)(r.pathname),t.pathname=f}if(!i.includes(s)){let e=U(s,i);e!==s&&(s=e)}let d=i.includes(s)?s:U((0,c.normalizeLocalePath)((0,v.removeBasePath)(t.pathname),r.router.locales).pathname,i);if((0,p.isDynamicRoute)(d)){let e=(0,m.getRouteMatcher)((0,_.getRouteRegex)(d))(f);Object.assign(t.query,e||{})}return{type:"rewrite",parsedAs:t,resolvedHref:d}})}let t=(0,y.parsePath)(e);return Promise.resolve({type:"redirect-external",destination:""+(0,R.formatNextPathnameInfo)({...(0,w.getNextPathnameInfo)(t.pathname,{nextConfig:n,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""})+t.query+t.hash})}let s=t.headers.get("x-nextjs-redirect");if(s){if(s.startsWith("/")){let e=(0,y.parsePath)(s),t=(0,R.formatNextPathnameInfo)({...(0,w.getNextPathnameInfo)(e.pathname,{nextConfig:n,parseData:!0}),defaultLocale:r.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-internal",newAs:""+t+e.query+e.hash,newUrl:""+t+e.query+e.hash})}return Promise.resolve({type:"redirect-external",destination:s})}return Promise.resolve({type:"next"})}(t.dataHref,t.response,e);return{dataHref:t.dataHref,json:t.json,response:t.response,text:t.text,cacheKey:t.cacheKey,effect:r}}let B=Symbol("SSG_DATA_NOT_FOUND");function H(e){try{return JSON.parse(e)}catch(e){return null}}function W(e){let{dataHref:t,inflightCache:r,isPrefetch:n,hasMiddleware:o,isServerRender:a,parseJSON:u,persistCache:l,isBackground:s,unstable_skipClientCache:c}=e,{href:f}=new URL(t,window.location.href),d=e=>{var s;return(function e(t,r,n){return fetch(t,{credentials:"same-origin",method:n.method||"GET",headers:Object.assign({},n.headers,{"x-nextjs-data":"1"})}).then(o=>!o.ok&&r>1&&o.status>=500?e(t,r-1,n):o)})(t,a?3:1,{headers:Object.assign({},n?{purpose:"prefetch"}:{},n&&o?{"x-middleware-prefetch":"1"}:{}),method:null!=(s=null==e?void 0:e.method)?s:"GET"}).then(r=>r.ok&&(null==e?void 0:e.method)==="HEAD"?{dataHref:t,response:r,text:"",json:{},cacheKey:f}:r.text().then(e=>{if(!r.ok){if(o&&[301,302,307,308].includes(r.status))return{dataHref:t,response:r,text:e,json:{},cacheKey:f};if(404===r.status){var n;if(null==(n=H(e))?void 0:n.notFound)return{dataHref:t,json:{notFound:B},response:r,text:e,cacheKey:f}}let u=Error("Failed to load static props");throw a||(0,i.markAssetError)(u),u}return{dataHref:t,json:u?H(e):null,response:r,text:e,cacheKey:f}})).then(e=>(l&&"no-cache"!==e.response.headers.get("x-middleware-cache")||delete r[f],e)).catch(e=>{throw c||delete r[f],("Failed to fetch"===e.message||"NetworkError when attempting to fetch resource."===e.message||"Load failed"===e.message)&&(0,i.markAssetError)(e),e})};return c&&l?d({}).then(e=>("no-cache"!==e.response.headers.get("x-middleware-cache")&&(r[f]=Promise.resolve(e)),e)):void 0!==r[f]?r[f]:r[f]=d(s?{method:"HEAD"}:{})}function q(){return Math.random().toString(36).slice(2,10)}function G(e){let{url:t,router:r}=e;if(t===(0,E.addBasePath)((0,b.addLocale)(r.asPath,r.locale)))throw Error("Invariant: attempted to hard navigate to the same URL "+t+" "+location.href);window.location.href=t}let z=e=>{let{route:t,router:r}=e,n=!1,o=r.clc=()=>{n=!0};return()=>{if(n){let e=Error('Abort fetching component for route: "'+t+'"');throw e.cancelled=!0,e}o===r.clc&&(r.clc=null)}};class V{reload(){window.location.reload()}back(){window.history.back()}forward(){window.history.forward()}push(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=k(this,e,t),this.change("pushState",e,t,r)}replace(e,t,r){return void 0===r&&(r={}),{url:e,as:t}=k(this,e,t),this.change("replaceState",e,t,r)}async _bfl(e,t,r,n){{let l=!1,s=!1;for(let c of[e,t])if(c){let t=(0,a.removeTrailingSlash)(new URL(c,"http://n").pathname),f=(0,E.addBasePath)((0,b.addLocale)(t,r||this.locale));if(t!==(0,a.removeTrailingSlash)(new URL(this.asPath,"http://n").pathname)){var o,i,u;for(let e of(l=l||!!(null==(o=this._bfl_s)?void 0:o.contains(t))||!!(null==(i=this._bfl_s)?void 0:i.contains(f)),[t,f])){let t=e.split("/");for(let e=0;!s&&e{})}}}}return!1}async change(e,t,r,n,o){var s,c,f,O,j,w,R,x,A;let D,F;if(!(0,M.isLocalURL)(t))return G({url:t,router:this}),!1;let H=1===n._h;H||n.shallow||await this._bfl(r,void 0,n.locale);let W=H||n._shouldResolveHref||(0,y.parsePath)(t).pathname===(0,y.parsePath)(r).pathname,q={...this.state},z=!0!==this.isReady;this.isReady=!0;let X=this.isSsr;if(H||(this.isSsr=!1),H&&this.clc)return!1;let Y=q.locale;d.ST&&performance.mark("routeChange");let{shallow:$=!1,scroll:K=!0}=n,J={shallow:$};this._inFlightRoute&&this.clc&&(X||V.events.emit("routeChangeError",L(),this._inFlightRoute,J),this.clc(),this.clc=null),r=(0,E.addBasePath)((0,b.addLocale)((0,S.hasBasePath)(r)?(0,v.removeBasePath)(r):r,n.locale,this.defaultLocale));let Q=(0,P.removeLocale)((0,S.hasBasePath)(r)?(0,v.removeBasePath)(r):r,q.locale);this._inFlightRoute=r;let Z=Y!==q.locale;if(!H&&this.onlyAHashChange(Q)&&!Z){q.asPath=Q,V.events.emit("hashChangeStart",r,J),this.changeState(e,t,r,{...n,scroll:!1}),K&&this.scrollToHash(Q);try{await this.set(q,this.components[q.route],null)}catch(e){throw(0,l.default)(e)&&e.cancelled&&V.events.emit("routeChangeError",e,Q,J),e}return V.events.emit("hashChangeComplete",r,J),!0}let ee=(0,h.parseRelativeUrl)(t),{pathname:et,query:er}=ee;try{[D,{__rewrites:F}]=await Promise.all([this.pageLoader.getPageList(),(0,i.getClientBuildManifest)(),this.pageLoader.getMiddleware()])}catch(e){return G({url:r,router:this}),!1}this.urlIsNew(Q)||Z||(e="replaceState");let en=r;et=et?(0,a.removeTrailingSlash)((0,v.removeBasePath)(et)):et;let eo=(0,a.removeTrailingSlash)(et),ea=r.startsWith("/")&&(0,h.parseRelativeUrl)(r).pathname;if(null==(s=this.components[et])?void 0:s.__appRouter)return G({url:r,router:this}),new Promise(()=>{});let ei=!!(ea&&eo!==ea&&(!(0,p.isDynamicRoute)(eo)||!(0,m.getRouteMatcher)((0,_.getRouteRegex)(eo))(ea))),eu=!n.shallow&&await N({asPath:r,locale:q.locale,router:this});if(H&&eu&&(W=!1),W&&"/_error"!==et&&(n._shouldResolveHref=!0,ee.pathname=U(et,D),ee.pathname===et||(et=ee.pathname,ee.pathname=(0,E.addBasePath)(et),eu||(t=(0,g.formatWithValidation)(ee)))),!(0,M.isLocalURL)(r))return G({url:r,router:this}),!1;en=(0,P.removeLocale)((0,v.removeBasePath)(en),q.locale),eo=(0,a.removeTrailingSlash)(et);let el=!1;if((0,p.isDynamicRoute)(eo)){let e=(0,h.parseRelativeUrl)(en),n=e.pathname,o=(0,_.getRouteRegex)(eo);el=(0,m.getRouteMatcher)(o)(n);let a=eo===n,i=a?(0,C.interpolateAs)(eo,n,er):{};if(el&&(!a||i.result))a?r=(0,g.formatWithValidation)(Object.assign({},e,{pathname:i.result,query:(0,I.omit)(er,i.params)})):Object.assign(er,el);else{let e=Object.keys(o.groups).filter(e=>!er[e]&&!o.groups[e].optional);if(e.length>0&&!eu)throw Error((a?"The provided `href` ("+t+") value is missing query values ("+e.join(", ")+") to be interpolated properly. ":"The provided `as` value ("+n+") is incompatible with the `href` value ("+eo+"). ")+"Read more: https://nextjs.org/docs/messages/"+(a?"href-interpolation-failed":"incompatible-href-as"))}}H||V.events.emit("routeChangeStart",r,J);let es="/404"===this.pathname||"/_error"===this.pathname;try{let a=await this.getRouteInfo({route:eo,pathname:et,query:er,as:r,resolvedAs:en,routeProps:J,locale:q.locale,isPreview:q.isPreview,hasMiddleware:eu,unstable_skipClientCache:n.unstable_skipClientCache,isQueryUpdating:H&&!this.isFallback,isMiddlewareRewrite:ei});if(H||n.shallow||await this._bfl(r,"resolvedAs"in a?a.resolvedAs:void 0,q.locale),"route"in a&&eu){eo=et=a.route||eo,J.shallow||(er=Object.assign({},a.query||{},er));let e=(0,S.hasBasePath)(ee.pathname)?(0,v.removeBasePath)(ee.pathname):ee.pathname;if(el&&et!==e&&Object.keys(el).forEach(e=>{el&&er[e]===el[e]&&delete er[e]}),(0,p.isDynamicRoute)(et)){let e=!J.shallow&&a.resolvedAs?a.resolvedAs:(0,E.addBasePath)((0,b.addLocale)(new URL(r,location.href).pathname,q.locale),!0);(0,S.hasBasePath)(e)&&(e=(0,v.removeBasePath)(e));let t=(0,_.getRouteRegex)(et),n=(0,m.getRouteMatcher)(t)(new URL(e,location.href).pathname);n&&Object.assign(er,n)}}if("type"in a){if("redirect-internal"===a.type)return this.change(e,a.newUrl,a.newAs,n);return G({url:a.destination,router:this}),new Promise(()=>{})}let i=a.Component;if(i&&i.unstable_scriptLoader&&[].concat(i.unstable_scriptLoader()).forEach(e=>{(0,u.handleClientScriptLoad)(e.props)}),(a.__N_SSG||a.__N_SSP)&&a.props){if(a.props.pageProps&&a.props.pageProps.__N_REDIRECT){n.locale=!1;let t=a.props.pageProps.__N_REDIRECT;if(t.startsWith("/")&&!1!==a.props.pageProps.__N_REDIRECT_BASE_PATH){let r=(0,h.parseRelativeUrl)(t);r.pathname=U(r.pathname,D);let{url:o,as:a}=k(this,t,t);return this.change(e,o,a,n)}return G({url:t,router:this}),new Promise(()=>{})}if(q.isPreview=!!a.props.__N_PREVIEW,a.props.notFound===B){let e;try{await this.fetchComponent("/404"),e="/404"}catch(t){e="/_error"}if(a=await this.getRouteInfo({route:e,pathname:e,query:er,as:r,resolvedAs:en,routeProps:{shallow:!1},locale:q.locale,isPreview:q.isPreview,isNotFound:!0}),"type"in a)throw Error("Unexpected middleware effect on /404")}}H&&"/_error"===this.pathname&&(null==(f=self.__NEXT_DATA__.props)?void 0:null==(c=f.pageProps)?void 0:c.statusCode)===500&&(null==(O=a.props)?void 0:O.pageProps)&&(a.props.pageProps.statusCode=500);let s=n.shallow&&q.route===(null!=(j=a.route)?j:eo),d=null!=(w=n.scroll)?w:!H&&!s,g=null!=o?o:d?{x:0,y:0}:null,y={...q,route:eo,pathname:et,query:er,asPath:Q,isFallback:!1};if(H&&es){if(a=await this.getRouteInfo({route:this.pathname,pathname:this.pathname,query:er,as:r,resolvedAs:en,routeProps:{shallow:!1},locale:q.locale,isPreview:q.isPreview,isQueryUpdating:H&&!this.isFallback}),"type"in a)throw Error("Unexpected middleware effect on "+this.pathname);"/_error"===this.pathname&&(null==(x=self.__NEXT_DATA__.props)?void 0:null==(R=x.pageProps)?void 0:R.statusCode)===500&&(null==(A=a.props)?void 0:A.pageProps)&&(a.props.pageProps.statusCode=500);try{await this.set(y,a,g)}catch(e){throw(0,l.default)(e)&&e.cancelled&&V.events.emit("routeChangeError",e,Q,J),e}return!0}if(V.events.emit("beforeHistoryChange",r,J),this.changeState(e,t,r,n),!(H&&!g&&!z&&!Z&&(0,T.compareRouterStates)(y,this.state))){try{await this.set(y,a,g)}catch(e){if(e.cancelled)a.error=a.error||e;else throw e}if(a.error)throw H||V.events.emit("routeChangeError",a.error,Q,J),a.error;H||V.events.emit("routeChangeComplete",r,J),d&&/#.+$/.test(r)&&this.scrollToHash(r)}return!0}catch(e){if((0,l.default)(e)&&e.cancelled)return!1;throw e}}changeState(e,t,r,n){void 0===n&&(n={}),("pushState"!==e||(0,d.getURL)()!==r)&&(this._shallow=n.shallow,window.history[e]({url:t,as:r,options:n,__N:!0,key:this._key="pushState"!==e?this._key:q()},"",r))}async handleRouteInfoError(e,t,r,n,o,a){if(console.error(e),e.cancelled)throw e;if((0,i.isAssetError)(e)||a)throw V.events.emit("routeChangeError",e,n,o),G({url:n,router:this}),L();try{let n;let{page:o,styleSheets:a}=await this.fetchComponent("/_error"),i={props:n,Component:o,styleSheets:a,err:e,error:e};if(!i.props)try{i.props=await this.getInitialProps(o,{err:e,pathname:t,query:r})}catch(e){console.error("Error in error page `getInitialProps`: ",e),i.props={}}return i}catch(e){return this.handleRouteInfoError((0,l.default)(e)?e:Error(e+""),t,r,n,o,!0)}}async getRouteInfo(e){let{route:t,pathname:r,query:n,as:o,resolvedAs:i,routeProps:u,locale:s,hasMiddleware:f,isPreview:d,unstable_skipClientCache:p,isQueryUpdating:h,isMiddlewareRewrite:m,isNotFound:_}=e,y=t;try{var b,P,E,S;let e=this.components[y];if(u.shallow&&e&&this.route===y)return e;let t=z({route:y,router:this});f&&(e=void 0);let l=!e||"initial"in e?void 0:e,O={dataHref:this.pageLoader.getDataHref({href:(0,g.formatWithValidation)({pathname:r,query:n}),skipInterpolation:!0,asPath:_?"/404":i,locale:s}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:h?this.sbc:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p,isBackground:h},w=h&&!m?null:await F({fetchData:()=>W(O),asPath:_?"/404":i,locale:s,router:this}).catch(e=>{if(h)return null;throw e});if(w&&("/_error"===r||"/404"===r)&&(w.effect=void 0),h&&(w?w.json=self.__NEXT_DATA__.props:w={json:self.__NEXT_DATA__.props}),t(),(null==w?void 0:null==(b=w.effect)?void 0:b.type)==="redirect-internal"||(null==w?void 0:null==(P=w.effect)?void 0:P.type)==="redirect-external")return w.effect;if((null==w?void 0:null==(E=w.effect)?void 0:E.type)==="rewrite"){let t=(0,a.removeTrailingSlash)(w.effect.resolvedHref),o=await this.pageLoader.getPageList();if((!h||o.includes(t))&&(y=t,r=w.effect.resolvedHref,n={...n,...w.effect.parsedAs.query},i=(0,v.removeBasePath)((0,c.normalizeLocalePath)(w.effect.parsedAs.pathname,this.locales).pathname),e=this.components[y],u.shallow&&e&&this.route===y&&!f))return{...e,route:y}}if((0,j.isAPIRoute)(y))return G({url:o,router:this}),new Promise(()=>{});let R=l||await this.fetchComponent(y).then(e=>({Component:e.page,styleSheets:e.styleSheets,__N_SSG:e.mod.__N_SSG,__N_SSP:e.mod.__N_SSP})),T=null==w?void 0:null==(S=w.response)?void 0:S.headers.get("x-middleware-skip"),M=R.__N_SSG||R.__N_SSP;T&&(null==w?void 0:w.dataHref)&&delete this.sdc[w.dataHref];let{props:x,cacheKey:I}=await this._getData(async()=>{if(M){if((null==w?void 0:w.json)&&!T)return{cacheKey:w.cacheKey,props:w.json};let e=(null==w?void 0:w.dataHref)?w.dataHref:this.pageLoader.getDataHref({href:(0,g.formatWithValidation)({pathname:r,query:n}),asPath:i,locale:s}),t=await W({dataHref:e,isServerRender:this.isSsr,parseJSON:!0,inflightCache:T?{}:this.sdc,persistCache:!d,isPrefetch:!1,unstable_skipClientCache:p});return{cacheKey:t.cacheKey,props:t.json||{}}}return{headers:{},props:await this.getInitialProps(R.Component,{pathname:r,query:n,asPath:o,locale:s,locales:this.locales,defaultLocale:this.defaultLocale})}});return R.__N_SSP&&O.dataHref&&I&&delete this.sdc[I],this.isPreview||!R.__N_SSG||h||W(Object.assign({},O,{isBackground:!0,persistCache:!1,inflightCache:this.sbc})).catch(()=>{}),x.pageProps=Object.assign({},x.pageProps),R.props=x,R.route=y,R.query=n,R.resolvedAs=i,this.components[y]=R,R}catch(e){return this.handleRouteInfoError((0,l.getProperError)(e),r,n,o,u)}}set(e,t,r){return this.state=e,this.sub(t,this.components["/_app"].Component,r)}beforePopState(e){this._bps=e}onlyAHashChange(e){if(!this.asPath)return!1;let[t,r]=this.asPath.split("#",2),[n,o]=e.split("#",2);return!!o&&t===n&&r===o||t===n&&r!==o}scrollToHash(e){let[,t=""]=e.split("#",2);(0,A.handleSmoothScroll)(()=>{if(""===t||"top"===t){window.scrollTo(0,0);return}let e=decodeURIComponent(t),r=document.getElementById(e);if(r){r.scrollIntoView();return}let n=document.getElementsByName(e)[0];n&&n.scrollIntoView()},{onlyHashChange:this.onlyAHashChange(e)})}urlIsNew(e){return this.asPath!==e}async prefetch(e,t,r){if(void 0===t&&(t=e),void 0===r&&(r={}),(0,x.isBot)(window.navigator.userAgent))return;let n=(0,h.parseRelativeUrl)(e),o=n.pathname,{pathname:i,query:u}=n,l=i,s=await this.pageLoader.getPageList(),c=t,f=void 0!==r.locale?r.locale||void 0:this.locale,d=await N({asPath:t,locale:f,router:this});n.pathname=U(n.pathname,s),(0,p.isDynamicRoute)(n.pathname)&&(i=n.pathname,n.pathname=i,Object.assign(u,(0,m.getRouteMatcher)((0,_.getRouteRegex)(n.pathname))((0,y.parsePath)(t).pathname)||{}),d||(e=(0,g.formatWithValidation)(n)));let b=await F({fetchData:()=>W({dataHref:this.pageLoader.getDataHref({href:(0,g.formatWithValidation)({pathname:l,query:u}),skipInterpolation:!0,asPath:c,locale:f}),hasMiddleware:!0,isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0}),asPath:t,locale:f,router:this});if((null==b?void 0:b.effect.type)==="rewrite"&&(n.pathname=b.effect.resolvedHref,i=b.effect.resolvedHref,u={...u,...b.effect.parsedAs.query},c=b.effect.parsedAs.pathname,e=(0,g.formatWithValidation)(n)),(null==b?void 0:b.effect.type)==="redirect-external")return;let P=(0,a.removeTrailingSlash)(i);await this._bfl(t,c,r.locale,!0)&&(this.components[o]={__appRouter:!0}),await Promise.all([this.pageLoader._isSsg(P).then(t=>!!t&&W({dataHref:(null==b?void 0:b.json)?null==b?void 0:b.dataHref:this.pageLoader.getDataHref({href:e,asPath:c,locale:f}),isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0,unstable_skipClientCache:r.unstable_skipClientCache||r.priority&&!0}).then(()=>!1).catch(()=>!1)),this.pageLoader[r.priority?"loadPage":"prefetch"](P)])}async fetchComponent(e){let t=z({route:e,router:this});try{let r=await this.pageLoader.loadPage(e);return t(),r}catch(e){throw t(),e}}_getData(e){let t=!1,r=()=>{t=!0};return this.clc=r,e().then(e=>{if(r===this.clc&&(this.clc=null),t){let e=Error("Loading initial props cancelled");throw e.cancelled=!0,e}return e})}_getFlightData(e){return W({dataHref:e,isServerRender:!0,parseJSON:!1,inflightCache:this.sdc,persistCache:!1,isPrefetch:!1}).then(e=>{let{text:t}=e;return{data:t}})}getInitialProps(e,t){let{Component:r}=this.components["/_app"],n=this._wrapApp(r);return t.AppTree=n,(0,d.loadGetInitialProps)(r,{AppTree:n,Component:e,router:this,ctx:t})}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}constructor(e,t,n,{initialProps:o,pageLoader:i,App:u,wrapApp:l,Component:s,err:c,subscription:f,isFallback:m,locale:_,locales:y,defaultLocale:b,domainLocales:P,isPreview:v}){this.sdc={},this.sbc={},this.isFirstPopStateEvent=!0,this._key=q(),this.onPopState=e=>{let t;let{isFirstPopStateEvent:r}=this;this.isFirstPopStateEvent=!1;let n=e.state;if(!n){let{pathname:e,query:t}=this;this.changeState("replaceState",(0,g.formatWithValidation)({pathname:(0,E.addBasePath)(e),query:t}),(0,d.getURL)());return}if(n.__NA){window.location.reload();return}if(!n.__N||r&&this.locale===n.options.locale&&n.as===this.asPath)return;let{url:o,as:a,options:i,key:u}=n;this._key=u;let{pathname:l}=(0,h.parseRelativeUrl)(o);(!this.isSsr||a!==(0,E.addBasePath)(this.asPath)||l!==(0,E.addBasePath)(this.pathname))&&(!this._bps||this._bps(n))&&this.change("replaceState",o,a,Object.assign({},i,{shallow:i.shallow&&this._shallow,locale:i.locale||this.defaultLocale,_h:0}),t)};let S=(0,a.removeTrailingSlash)(e);this.components={},"/_error"!==e&&(this.components[S]={Component:s,initial:!0,props:o,err:c,__N_SSG:o&&o.__N_SSG,__N_SSP:o&&o.__N_SSP}),this.components["/_app"]={Component:u,styleSheets:[]};{let{BloomFilter:e}=r(9970),t={numItems:12,errorRate:1e-4,numBits:231,numHashes:14,bitArray:[1,1,1,1,1,1,0,1,0,1,1,1,1,0,1,1,1,0,1,0,0,0,0,0,0,0,0,1,1,0,0,1,0,1,0,0,1,0,0,1,0,0,1,1,1,1,1,0,0,1,0,0,1,0,0,0,0,1,1,1,0,1,1,0,1,0,1,1,1,1,1,1,1,1,0,0,1,1,1,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,1,0,1,0,0,1,1,0,1,0,1,1,0,1,0,1,0,0,0,1,1,0,1,0,0,0,1,0,1,1,1,1,1,0,0,0,1,0,1,0,1,1,1,0,1,1,0,0,1,0,1,1,1,1,0,1,1,1,1,0,1,1,0,1,1,1,1,0,1,0,0,1,0,0,1,1,0,0,1,1,0,0,0,1,0,0,0,0,0,1,1,1,1,0,1,0,0,1,1,1,1,1,1,0,1,0,1,0,0,0,1,1,1,0,0,0,1]},n={numItems:0,errorRate:1e-4,numBits:0,numHashes:null,bitArray:[]};(null==t?void 0:t.numHashes)&&(this._bfl_s=new e(t.numItems,t.errorRate),this._bfl_s.import(t)),(null==n?void 0:n.numHashes)&&(this._bfl_d=new e(n.numItems,n.errorRate),this._bfl_d.import(n))}this.events=V.events,this.pageLoader=i;let O=(0,p.isDynamicRoute)(e)&&self.__NEXT_DATA__.autoExport;if(this.basePath="",this.sub=f,this.clc=null,this._wrapApp=l,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.isExperimentalCompile||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!O&&!self.location.search),this.state={route:S,pathname:e,query:t,asPath:O?e:n,isPreview:!!v,locale:void 0,isFallback:m},this._initialMatchesMiddlewarePromise=Promise.resolve(!1),!n.startsWith("//")){let r={locale:_},o=(0,d.getURL)();this._initialMatchesMiddlewarePromise=N({router:this,locale:_,asPath:o}).then(a=>(r._shouldResolveHref=n!==e,this.changeState("replaceState",a?o:(0,g.formatWithValidation)({pathname:(0,E.addBasePath)(e),query:t}),o,r),a))}window.addEventListener("popstate",this.onPopState)}}V.events=(0,f.default)()},8043:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addLocale",{enumerable:!0,get:function(){return a}});let n=r(7652),o=r(5298);function a(e,t,r,a){if(!t||t===r)return e;let i=e.toLowerCase();return!a&&((0,o.pathHasPrefix)(i,"/api")||(0,o.pathHasPrefix)(i,"/"+t.toLowerCase()))?e:(0,n.addPathPrefix)(e,"/"+t)}},7652:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathPrefix",{enumerable:!0,get:function(){return o}});let n=r(626);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:o,hash:a}=(0,n.parsePath)(e);return""+t+r+o+a}},6152:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addPathSuffix",{enumerable:!0,get:function(){return o}});let n=r(626);function o(e,t){if(!e.startsWith("/")||!t)return e;let{pathname:r,query:o,hash:a}=(0,n.parsePath)(e);return""+r+t+o+a}},2340:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{normalizeAppPath:function(){return a},normalizeRscURL:function(){return i}});let n=r(5078),o=r(3737);function a(e){return(0,n.ensureLeadingSlash)(e.split("/").reduce((e,t,r,n)=>!t||(0,o.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function i(e){return e.replace(/\.rsc($|\?)/,"$1")}},4232:function(e,t){"use strict";function r(e){return new URL(e,"http://n").searchParams}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"asPathToSearchParams",{enumerable:!0,get:function(){return r}})},9012:function(e,t){"use strict";function r(e,t){let r=Object.keys(e);if(r.length!==Object.keys(t).length)return!1;for(let n=r.length;n--;){let o=r[n];if("query"===o){let r=Object.keys(e.query);if(r.length!==Object.keys(t.query).length)return!1;for(let n=r.length;n--;){let o=r[n];if(!t.query.hasOwnProperty(o)||e.query[o]!==t.query[o])return!1}}else if(!t.hasOwnProperty(o)||e[o]!==t[o])return!1}return!0}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"compareRouterStates",{enumerable:!0,get:function(){return r}})},5604:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"formatNextPathnameInfo",{enumerable:!0,get:function(){return u}});let n=r(3575),o=r(7652),a=r(6152),i=r(8043);function u(e){let t=(0,i.addLocale)(e.pathname,e.locale,e.buildId?void 0:e.defaultLocale,e.ignorePrefix);return(e.buildId||!e.trailingSlash)&&(t=(0,n.removeTrailingSlash)(t)),e.buildId&&(t=(0,a.addPathSuffix)((0,o.addPathPrefix)(t,"/_next/data/"+e.buildId),"/"===e.pathname?"index.json":".json")),t=(0,o.addPathPrefix)(t,e.basePath),!e.buildId&&e.trailingSlash?t.endsWith("/")?t:(0,a.addPathSuffix)(t,"/"):(0,n.removeTrailingSlash)(t)}},5058:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{formatUrl:function(){return a},formatWithValidation:function(){return u},urlObjectKeys:function(){return i}});let n=r(1757)._(r(8600)),o=/https?|ftp|gopher|file/;function a(e){let{auth:t,hostname:r}=e,a=e.protocol||"",i=e.pathname||"",u=e.hash||"",l=e.query||"",s=!1;t=t?encodeURIComponent(t).replace(/%3A/i,":")+"@":"",e.host?s=t+e.host:r&&(s=t+(~r.indexOf(":")?"["+r+"]":r),e.port&&(s+=":"+e.port)),l&&"object"==typeof l&&(l=String(n.urlQueryToSearchParams(l)));let c=e.search||l&&"?"+l||"";return a&&!a.endsWith(":")&&(a+=":"),e.slashes||(!a||o.test(a))&&!1!==s?(s="//"+(s||""),i&&"/"!==i[0]&&(i="/"+i)):s||(s=""),u&&"#"!==u[0]&&(u="#"+u),c&&"?"!==c[0]&&(c="?"+c),""+a+s+(i=i.replace(/[?#]/g,encodeURIComponent))+(c=c.replace("#","%23"))+u}let i=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function u(e){return a(e)}},116:function(e,t){"use strict";function r(e,t){return void 0===t&&(t=""),("/"===e?"/index":/^\/index(\/|$)/.test(e)?"/index"+e:e)+t}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return r}})},3209:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getNextPathnameInfo",{enumerable:!0,get:function(){return i}});let n=r(1623),o=r(3691),a=r(5298);function i(e,t){var r,i;let{basePath:u,i18n:l,trailingSlash:s}=null!=(r=t.nextConfig)?r:{},c={pathname:e,trailingSlash:"/"!==e?e.endsWith("/"):s};u&&(0,a.pathHasPrefix)(c.pathname,u)&&(c.pathname=(0,o.removePathPrefix)(c.pathname,u),c.basePath=u);let f=c.pathname;if(c.pathname.startsWith("/_next/data/")&&c.pathname.endsWith(".json")){let e=c.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),r=e[0];c.buildId=r,f="index"!==e[1]?"/"+e.slice(1).join("/"):"/",!0===t.parseData&&(c.pathname=f)}if(l){let e=t.i18nProvider?t.i18nProvider.analyze(c.pathname):(0,n.normalizeLocalePath)(c.pathname,l.locales);c.locale=e.detectedLocale,c.pathname=null!=(i=e.pathname)?i:c.pathname,!e.detectedLocale&&c.buildId&&(e=t.i18nProvider?t.i18nProvider.analyze(f):(0,n.normalizeLocalePath)(f,l.locales)).detectedLocale&&(c.locale=e.detectedLocale)}return c}},2179:function(e,t){"use strict";function r(e,t){if(void 0===t&&(t={}),t.onlyHashChange){e();return}let r=document.documentElement,n=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return r}})},2189:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getSortedRoutes:function(){return n.getSortedRoutes},isDynamicRoute:function(){return o.isDynamicRoute}});let n=r(317),o=r(1735)},7399:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"interpolateAs",{enumerable:!0,get:function(){return a}});let n=r(3323),o=r(6309);function a(e,t,r){let a="",i=(0,o.getRouteRegex)(e),u=i.groups,l=(t!==e?(0,n.getRouteMatcher)(i)(t):"")||r;a=e;let s=Object.keys(u);return s.every(e=>{let t=l[e]||"",{repeat:r,optional:n}=u[e],o="["+(r?"...":"")+e+"]";return n&&(o=(t?"":"/")+"["+o+"]"),r&&!Array.isArray(t)&&(t=[t]),(n||e in l)&&(a=a.replace(o,r?t.map(e=>encodeURIComponent(e)).join("/"):encodeURIComponent(t))||"/")})||(a=""),{params:s,result:a}}},6312:function(e,t){"use strict";function r(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return r}})},1735:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isDynamicRoute",{enumerable:!0,get:function(){return a}});let n=r(2407),o=/\/\[[^/]+?\](?=\/|$)/;function a(e){return(0,n.isInterceptionRouteAppPath)(e)&&(e=(0,n.extractInterceptionRouteInformation)(e).interceptedRoute),o.test(e)}},5853:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isLocalURL",{enumerable:!0,get:function(){return a}});let n=r(5782),o=r(1838);function a(e){if(!(0,n.isAbsoluteUrl)(e))return!0;try{let t=(0,n.getLocationOrigin)(),r=new URL(e,t);return r.origin===t&&(0,o.hasBasePath)(r.pathname)}catch(e){return!1}}},2795:function(e,t){"use strict";function r(e,t){let r={};return Object.keys(e).forEach(n=>{t.includes(n)||(r[n]=e[n])}),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"omit",{enumerable:!0,get:function(){return r}})},626:function(e,t){"use strict";function r(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return r}})},2757:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parseRelativeUrl",{enumerable:!0,get:function(){return a}});let n=r(5782),o=r(8600);function a(e,t){let r=new URL((0,n.getLocationOrigin)()),a=t?new URL(t,r):e.startsWith(".")?new URL(window.location.href):r,{pathname:i,searchParams:u,search:l,hash:s,href:c,origin:f}=new URL(e,a);if(f!==r.origin)throw Error("invariant: invalid relative URL, router received "+e);return{pathname:i,query:(0,o.searchParamsToUrlQuery)(u),search:l,hash:s,href:c.slice(r.origin.length)}}},5298:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return o}});let n=r(626);function o(e,t){if("string"!=typeof e)return!1;let{pathname:r}=(0,n.parsePath)(e);return r===t||r.startsWith(t+"/")}},8600:function(e,t){"use strict";function r(e){let t={};return e.forEach((e,r)=>{void 0===t[r]?t[r]=e:Array.isArray(t[r])?t[r].push(e):t[r]=[t[r],e]}),t}function n(e){return"string"!=typeof e&&("number"!=typeof e||isNaN(e))&&"boolean"!=typeof e?"":String(e)}function o(e){let t=new URLSearchParams;return Object.entries(e).forEach(e=>{let[r,o]=e;Array.isArray(o)?o.forEach(e=>t.append(r,n(e))):t.set(r,n(o))}),t}function a(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;n{Array.from(t.keys()).forEach(t=>e.delete(t)),t.forEach((t,r)=>e.append(r,t))}),e}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{assign:function(){return a},searchParamsToUrlQuery:function(){return r},urlQueryToSearchParams:function(){return o}})},3691:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removePathPrefix",{enumerable:!0,get:function(){return o}});let n=r(5298);function o(e,t){if(!(0,n.pathHasPrefix)(e,t))return e;let r=e.slice(t.length);return r.startsWith("/")?r:"/"+r}},3575:function(e,t){"use strict";function r(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return r}})},3323:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getRouteMatcher",{enumerable:!0,get:function(){return o}});let n=r(5782);function o(e){let{re:t,groups:r}=e;return e=>{let o=t.exec(e);if(!o)return!1;let a=e=>{try{return decodeURIComponent(e)}catch(e){throw new n.DecodeError("failed to decode param")}},i={};return Object.keys(r).forEach(e=>{let t=r[e],n=o[t.pos];void 0!==n&&(i[e]=~n.indexOf("/")?n.split("/").map(e=>a(e)):t.repeat?[a(n)]:a(n))}),i}}},6309:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getNamedMiddlewareRegex:function(){return d},getNamedRouteRegex:function(){return f},getRouteRegex:function(){return l},parseParameter:function(){return i}});let n=r(2407),o=r(4592),a=r(3575);function i(e){let t=e.startsWith("[")&&e.endsWith("]");t&&(e=e.slice(1,-1));let r=e.startsWith("...");return r&&(e=e.slice(3)),{key:e,repeat:r,optional:t}}function u(e){let t=(0,a.removeTrailingSlash)(e).slice(1).split("/"),r={},u=1;return{parameterizedRoute:t.map(e=>{let t=n.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t)),a=e.match(/\[((?:\[.*\])|.+)\]/);if(t&&a){let{key:e,optional:n,repeat:l}=i(a[1]);return r[e]={pos:u++,repeat:l,optional:n},"/"+(0,o.escapeStringRegexp)(t)+"([^/]+?)"}if(!a)return"/"+(0,o.escapeStringRegexp)(e);{let{key:e,repeat:t,optional:n}=i(a[1]);return r[e]={pos:u++,repeat:t,optional:n},t?n?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:r}}function l(e){let{parameterizedRoute:t,groups:r}=u(e);return{re:RegExp("^"+t+"(?:/)?$"),groups:r}}function s(e){let{interceptionMarker:t,getSafeRouteKey:r,segment:n,routeKeys:a,keyPrefix:u}=e,{key:l,optional:s,repeat:c}=i(n),f=l.replace(/\W/g,"");u&&(f=""+u+f);let d=!1;(0===f.length||f.length>30)&&(d=!0),isNaN(parseInt(f.slice(0,1)))||(d=!0),d&&(f=r()),u?a[f]=""+u+l:a[f]=l;let p=t?(0,o.escapeStringRegexp)(t):"";return c?s?"(?:/"+p+"(?<"+f+">.+?))?":"/"+p+"(?<"+f+">.+?)":"/"+p+"(?<"+f+">[^/]+?)"}function c(e,t){let r;let i=(0,a.removeTrailingSlash)(e).slice(1).split("/"),u=(r=0,()=>{let e="",t=++r;for(;t>0;)e+=String.fromCharCode(97+(t-1)%26),t=Math.floor((t-1)/26);return e}),l={};return{namedParameterizedRoute:i.map(e=>{let r=n.INTERCEPTION_ROUTE_MARKERS.some(t=>e.startsWith(t)),a=e.match(/\[((?:\[.*\])|.+)\]/);if(r&&a){let[r]=e.split(a[0]);return s({getSafeRouteKey:u,interceptionMarker:r,segment:a[1],routeKeys:l,keyPrefix:t?"nxtI":void 0})}return a?s({getSafeRouteKey:u,segment:a[1],routeKeys:l,keyPrefix:t?"nxtP":void 0}):"/"+(0,o.escapeStringRegexp)(e)}).join(""),routeKeys:l}}function f(e,t){let r=c(e,t);return{...l(e),namedRegex:"^"+r.namedParameterizedRoute+"(?:/)?$",routeKeys:r.routeKeys}}function d(e,t){let{parameterizedRoute:r}=u(e),{catchAll:n=!0}=t;if("/"===r)return{namedRegex:"^/"+(n?".*":"")+"$"};let{namedParameterizedRoute:o}=c(e,!1);return{namedRegex:"^"+o+(n?"(?:(/.*)?)":"")+"$"}}},317:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSortedRoutes",{enumerable:!0,get:function(){return n}});class r{insert(e){this._insert(e.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(e){void 0===e&&(e="/");let t=[...this.children.keys()].sort();null!==this.slugName&&t.splice(t.indexOf("[]"),1),null!==this.restSlugName&&t.splice(t.indexOf("[...]"),1),null!==this.optionalRestSlugName&&t.splice(t.indexOf("[[...]]"),1);let r=t.map(t=>this.children.get(t)._smoosh(""+e+t+"/")).reduce((e,t)=>[...e,...t],[]);if(null!==this.slugName&&r.push(...this.children.get("[]")._smoosh(e+"["+this.slugName+"]/")),!this.placeholder){let t="/"===e?"/":e.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+t+'" and "'+t+"[[..."+this.optionalRestSlugName+']]").');r.unshift(t)}return null!==this.restSlugName&&r.push(...this.children.get("[...]")._smoosh(e+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&r.push(...this.children.get("[[...]]")._smoosh(e+"[[..."+this.optionalRestSlugName+"]]/")),r}_insert(e,t,n){if(0===e.length){this.placeholder=!1;return}if(n)throw Error("Catch-all must be the last part of the URL.");let o=e[0];if(o.startsWith("[")&&o.endsWith("]")){let r=o.slice(1,-1),i=!1;if(r.startsWith("[")&&r.endsWith("]")&&(r=r.slice(1,-1),i=!0),r.startsWith("...")&&(r=r.substring(3),n=!0),r.startsWith("[")||r.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+r+"').");if(r.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+r+"').");function a(e,r){if(null!==e&&e!==r)throw Error("You cannot use different slug names for the same dynamic path ('"+e+"' !== '"+r+"').");t.forEach(e=>{if(e===r)throw Error('You cannot have the same slug name "'+r+'" repeat within a single dynamic path');if(e.replace(/\W/g,"")===o.replace(/\W/g,""))throw Error('You cannot have the slug names "'+e+'" and "'+r+'" differ only by non-word symbols within a single dynamic path')}),t.push(r)}if(n){if(i){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+e[0]+'" ).');a(this.optionalRestSlugName,r),this.optionalRestSlugName=r,o="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+e[0]+'").');a(this.restSlugName,r),this.restSlugName=r,o="[...]"}}else{if(i)throw Error('Optional route parameters are not yet supported ("'+e[0]+'").');a(this.slugName,r),this.slugName=r,o="[]"}}this.children.has(o)||this.children.set(o,new r),this.children.get(o)._insert(e.slice(1),t,n)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}}function n(e){let t=new r;return e.forEach(e=>t.insert(e)),t.smoosh()}},5758:function(e,t){"use strict";let r;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return n},setConfig:function(){return o}});let n=()=>r;function o(e){r=e}},3737:function(e,t){"use strict";function r(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DEFAULT_SEGMENT_KEY:function(){return o},PAGE_SEGMENT_KEY:function(){return n},isGroupSegment:function(){return r}});let n="__PAGE__",o="__DEFAULT__"},3657:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return i}});let n=r(7294),o=n.useLayoutEffect,a=n.useEffect;function i(e){let{headManager:t,reduceComponentsToState:r}=e;function i(){if(t&&t.mountedInstances){let o=n.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(r(o,e))}}return o(()=>{var r;return null==t||null==(r=t.mountedInstances)||r.add(e.children),()=>{var r;null==t||null==(r=t.mountedInstances)||r.delete(e.children)}}),o(()=>(t&&(t._pendingUpdate=i),()=>{t&&(t._pendingUpdate=i)})),a(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},5782:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DecodeError:function(){return h},MiddlewareNotFoundError:function(){return y},MissingStaticPage:function(){return g},NormalizeError:function(){return m},PageNotFoundError:function(){return _},SP:function(){return d},ST:function(){return p},WEB_VITALS:function(){return r},execOnce:function(){return n},getDisplayName:function(){return l},getLocationOrigin:function(){return i},getURL:function(){return u},isAbsoluteUrl:function(){return a},isResSent:function(){return s},loadGetInitialProps:function(){return f},normalizeRepeatedSlashes:function(){return c},stringifyError:function(){return b}});let r=["CLS","FCP","FID","INP","LCP","TTFB"];function n(e){let t,r=!1;return function(){for(var n=arguments.length,o=Array(n),a=0;ao.test(e);function i(){let{protocol:e,hostname:t,port:r}=window.location;return e+"//"+t+(r?":"+r:"")}function u(){let{href:e}=window.location,t=i();return e.substring(t.length)}function l(e){return"string"==typeof e?e:e.displayName||e.name||"Unknown"}function s(e){return e.finished||e.headersSent}function c(e){let t=e.split("?");return t[0].replace(/\\/g,"/").replace(/\/\/+/g,"/")+(t[1]?"?"+t.slice(1).join("?"):"")}async function f(e,t){let r=t.res||t.ctx&&t.ctx.res;if(!e.getInitialProps)return t.ctx&&t.Component?{pageProps:await f(t.Component,t.ctx)}:{};let n=await e.getInitialProps(t);if(r&&s(r))return n;if(!n)throw Error('"'+l(e)+'.getInitialProps()" should resolve to an object. But found "'+n+'" instead.');return n}let d="undefined"!=typeof performance,p=d&&["mark","measure","getEntriesByName"].every(e=>"function"==typeof performance[e]);class h extends Error{}class m extends Error{}class _ extends Error{constructor(e){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+e}}class g extends Error{constructor(e,t){super(),this.message="Failed to load static file for page: "+e+" "+t}}class y extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}}function b(e){return JSON.stringify({message:e.message,stack:e.stack})}},9784:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},8018:function(e){var t,r,n,o,a,i,u,l,s,c,f,d,p,h,m,_,g,y,b,P,v,E,S,O,j,w,R,T,M,x,I,C,A,L,N,D,k,U,F,B,H,W,q,G,z,V;(t={}).d=function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},void 0!==t&&(t.ab="//"),r={},t.r(r),t.d(r,{getCLS:function(){return S},getFCP:function(){return P},getFID:function(){return x},getINP:function(){return W},getLCP:function(){return G},getTTFB:function(){return V},onCLS:function(){return S},onFCP:function(){return P},onFID:function(){return x},onINP:function(){return W},onLCP:function(){return G},onTTFB:function(){return V}}),l=-1,s=function(e){addEventListener("pageshow",function(t){t.persisted&&(l=t.timeStamp,e(t))},!0)},c=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},f=function(){var e=c();return e&&e.activationStart||0},d=function(e,t){var r=c(),n="navigate";return l>=0?n="back-forward-cache":r&&(n=document.prerendering||f()>0?"prerender":r.type.replace(/_/g,"-")),{name:e,value:void 0===t?-1:t,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:n}},p=function(e,t,r){try{if(PerformanceObserver.supportedEntryTypes.includes(e)){var n=new PerformanceObserver(function(e){t(e.getEntries())});return n.observe(Object.assign({type:e,buffered:!0},r||{})),n}}catch(e){}},h=function(e,t){var r=function r(n){"pagehide"!==n.type&&"hidden"!==document.visibilityState||(e(n),t&&(removeEventListener("visibilitychange",r,!0),removeEventListener("pagehide",r,!0)))};addEventListener("visibilitychange",r,!0),addEventListener("pagehide",r,!0)},m=function(e,t,r,n){var o,a;return function(i){var u;t.value>=0&&(i||n)&&((a=t.value-(o||0))||void 0===o)&&(o=t.value,t.delta=a,t.rating=(u=t.value)>r[1]?"poor":u>r[0]?"needs-improvement":"good",e(t))}},_=-1,g=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},y=function(){h(function(e){_=e.timeStamp},!0)},b=function(){return _<0&&(_=g(),y(),s(function(){setTimeout(function(){_=g(),y()},0)})),{get firstHiddenTime(){return _}}},P=function(e,t){t=t||{};var r,n=[1800,3e3],o=b(),a=d("FCP"),i=function(e){e.forEach(function(e){"first-contentful-paint"===e.name&&(l&&l.disconnect(),e.startTime-1&&e(t)},a=d("CLS",0),i=0,u=[],l=function(e){e.forEach(function(e){if(!e.hadRecentInput){var t=u[0],r=u[u.length-1];i&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(i+=e.value,u.push(e)):(i=e.value,u=[e]),i>a.value&&(a.value=i,a.entries=u,n())}})},c=p("layout-shift",l);c&&(n=m(o,a,r,t.reportAllChanges),h(function(){l(c.takeRecords()),n(!0)}),s(function(){i=0,E=-1,n=m(o,a=d("CLS",0),r,t.reportAllChanges)}))},O={passive:!0,capture:!0},j=new Date,w=function(e,t){n||(n=t,o=e,a=new Date,M(removeEventListener),R())},R=function(){if(o>=0&&o1e12?new Date:performance.now())-e.timeStamp;"pointerdown"==e.type?(t=function(){w(o,e),n()},r=function(){n()},n=function(){removeEventListener("pointerup",t,O),removeEventListener("pointercancel",r,O)},addEventListener("pointerup",t,O),addEventListener("pointercancel",r,O)):w(o,e)}},M=function(e){["mousedown","keydown","touchstart","pointerdown"].forEach(function(t){return e(t,T,O)})},x=function(e,t){t=t||{};var r,a=[100,300],u=b(),l=d("FID"),c=function(e){e.startTimet.latency){if(r)r.entries.push(e),r.latency=Math.max(r.latency,e.duration);else{var n={id:e.interactionId,latency:e.duration,entries:[e]};B[n.id]=n,F.push(n)}F.sort(function(e,t){return t.latency-e.latency}),F.splice(10).forEach(function(e){delete B[e.id]})}},W=function(e,t){t=t||{};var r=[200,500];D();var n,o=d("INP"),a=function(e){e.forEach(function(e){e.interactionId&&H(e),"first-input"!==e.entryType||F.some(function(t){return t.entries.some(function(t){return e.duration===t.duration&&e.startTime===t.startTime})})||H(e)});var t,r=(t=Math.min(F.length-1,Math.floor(U()/50)),F[t]);r&&r.latency!==o.value&&(o.value=r.latency,o.entries=r.entries,n())},i=p("event",a,{durationThreshold:t.durationThreshold||40});n=m(e,o,r,t.reportAllChanges),i&&(i.observe({type:"first-input",buffered:!0}),h(function(){a(i.takeRecords()),o.value<0&&U()>0&&(o.value=0,o.entries=[]),n(!0)}),s(function(){F=[],k=N(),n=m(e,o=d("INP"),r,t.reportAllChanges)}))},q={},G=function(e,t){t=t||{};var r,n=[2500,4e3],o=b(),a=d("LCP"),i=function(e){var t=e[e.length-1];if(t){var n=t.startTime-f();nperformance.now())return;n.entries=[a],o(!0),s(function(){(o=m(e,n=d("TTFB",0),r,t.reportAllChanges))(!0)})}})},e.exports=r},9423:function(e,t){"use strict";function r(e){return"/api"===e||!!(null==e?void 0:e.startsWith("/api/"))}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isAPIRoute",{enumerable:!0,get:function(){return r}})},676:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{default:function(){return o},getProperError:function(){return a}});let n=r(8299);function o(e){return"object"==typeof e&&null!==e&&"name"in e&&"message"in e}function a(e){return o(e)?e:Error((0,n.isPlainObject)(e)?JSON.stringify(e):e+"")}},2407:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return o},extractInterceptionRouteInformation:function(){return i},isInterceptionRouteAppPath:function(){return a}});let n=r(2340),o=["(..)(..)","(.)","(..)","(...)"];function a(e){return void 0!==e.split("/").find(e=>o.find(t=>e.startsWith(t)))}function i(e){let t,r,a;for(let n of e.split("/"))if(r=o.find(e=>n.startsWith(e))){[t,a]=e.split(r,2);break}if(!t||!r||!a)throw Error(`Invalid interception route: ${e}. Must be in the format //(..|...|..)(..)/`);switch(t=(0,n.normalizeAppPath)(t),r){case"(.)":a="/"===t?`/${a}`:t+"/"+a;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);a=t.split("/").slice(0,-1).concat(a).join("/");break;case"(...)":a="/"+a;break;case"(..)(..)":let i=t.split("/");if(i.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);a=i.slice(0,-2).concat(a).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:a}}},2431:function(){},8754:function(e,t,r){"use strict";function n(e){return e&&e.__esModule?e:{default:e}}r.r(t),r.d(t,{_:function(){return n},_interop_require_default:function(){return n}})},1757:function(e,t,r){"use strict";function n(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(n=function(e){return e?r:t})(e)}function o(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=n(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var i in e)if("default"!==i&&Object.prototype.hasOwnProperty.call(e,i)){var u=a?Object.getOwnPropertyDescriptor(e,i):null;u&&(u.get||u.set)?Object.defineProperty(o,i,u):o[i]=e[i]}return o.default=e,r&&r.set(e,o),o}r.r(t),r.d(t,{_:function(){return o},_interop_require_wildcard:function(){return o}})}},function(e){e.O(0,[774],function(){return e(e.s=2288)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/src/handler/api/static/_next/static/chunks/main-app-cb8ae0c3c2bb8b85.js b/src/handler/api/static/_next/static/chunks/main-app-8321800782c5a11e.js
similarity index 58%
rename from src/handler/api/static/_next/static/chunks/main-app-cb8ae0c3c2bb8b85.js
rename to src/handler/api/static/_next/static/chunks/main-app-8321800782c5a11e.js
index fc68922..37fd3b1 100644
--- a/src/handler/api/static/_next/static/chunks/main-app-cb8ae0c3c2bb8b85.js
+++ b/src/handler/api/static/_next/static/chunks/main-app-8321800782c5a11e.js
@@ -1 +1 @@
-(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[744],{2730:function(e,n,t){Promise.resolve().then(t.t.bind(t,2846,23)),Promise.resolve().then(t.t.bind(t,9107,23)),Promise.resolve().then(t.t.bind(t,1060,23)),Promise.resolve().then(t.t.bind(t,4707,23)),Promise.resolve().then(t.t.bind(t,80,23)),Promise.resolve().then(t.t.bind(t,6423,23))}},function(e){var n=function(n){return e(e.s=n)};e.O(0,[971,117],function(){return n(4278),n(2730)}),_N_E=e.O()}]);
\ No newline at end of file
+(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[744],{6994:function(e,n,t){Promise.resolve().then(t.t.bind(t,2846,23)),Promise.resolve().then(t.t.bind(t,9107,23)),Promise.resolve().then(t.t.bind(t,1060,23)),Promise.resolve().then(t.t.bind(t,4707,23)),Promise.resolve().then(t.t.bind(t,80,23)),Promise.resolve().then(t.t.bind(t,6423,23))}},function(e){var n=function(n){return e(e.s=n)};e.O(0,[971,117],function(){return n(4278),n(6994)}),_N_E=e.O()}]);
\ No newline at end of file
diff --git a/src/handler/api/static/activity/index.html b/src/handler/api/static/activity/index.html
index afcea51..e37695a 100644
--- a/src/handler/api/static/activity/index.html
+++ b/src/handler/api/static/activity/index.html
@@ -1 +1 @@
-Handler · Claude Activity
\ No newline at end of file
+Handler · Claude Activity
\ No newline at end of file
diff --git a/src/handler/api/static/activity/index.txt b/src/handler/api/static/activity/index.txt
index 940a0fb..e26c291 100644
--- a/src/handler/api/static/activity/index.txt
+++ b/src/handler/api/static/activity/index.txt
@@ -1,8 +1,8 @@
2:I[9107,[],"ClientPageRoot"]
-3:I[7839,["171","static/chunks/171-ba6c418b542791c8.js","263","static/chunks/app/activity/page-7be158338498be57.js"],"default",1]
+3:I[7839,["171","static/chunks/171-58fbf67bb7636c62.js","263","static/chunks/app/activity/page-809b415dd18cb14e.js"],"default",1]
4:I[4707,[],""]
5:I[6423,[],""]
-6:I[5520,["258","static/chunks/258-01db7d62283ec2f5.js","171","static/chunks/171-ba6c418b542791c8.js","185","static/chunks/app/layout-cdc070e22a7fa32c.js"],"AppFrame"]
-0:["ecJZL3f8VZAeTLKfyHRWs",[[["",{"children":["activity",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["activity",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","activity","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
+6:I[5520,["258","static/chunks/258-022159d3c3089cd0.js","171","static/chunks/171-58fbf67bb7636c62.js","185","static/chunks/app/layout-c7c117ef7b86bf6f.js"],"AppFrame"]
+0:["9ucF5j1fWuiDF55MzWzbS",[[["",{"children":["activity",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["activity",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","activity","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
7:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Handler · Claude Activity"}],["$","meta","3",{"name":"description","content":"Monitor and manage Claude Code agents across projects."}],["$","link","4",{"rel":"icon","href":"/icon.svg?bab509b45a421e43","type":"image/svg+xml","sizes":"any"}]]
1:null
diff --git a/src/handler/api/static/agents/index.html b/src/handler/api/static/agents/index.html
index 0fd37f0..2d9a1c5 100644
--- a/src/handler/api/static/agents/index.html
+++ b/src/handler/api/static/agents/index.html
@@ -1 +1 @@
-Handler · Claude Activity
\ No newline at end of file
+Handler · Claude Activity
\ No newline at end of file
diff --git a/src/handler/api/static/agents/index.txt b/src/handler/api/static/agents/index.txt
index a6dff28..705c3b7 100644
--- a/src/handler/api/static/agents/index.txt
+++ b/src/handler/api/static/agents/index.txt
@@ -1,8 +1,8 @@
2:I[9107,[],"ClientPageRoot"]
-3:I[2506,["171","static/chunks/171-ba6c418b542791c8.js","718","static/chunks/app/agents/page-4ae3a1f91119de97.js"],"default",1]
+3:I[2506,["171","static/chunks/171-58fbf67bb7636c62.js","718","static/chunks/app/agents/page-ed5717b0ac0347b8.js"],"default",1]
4:I[4707,[],""]
5:I[6423,[],""]
-6:I[5520,["258","static/chunks/258-01db7d62283ec2f5.js","171","static/chunks/171-ba6c418b542791c8.js","185","static/chunks/app/layout-cdc070e22a7fa32c.js"],"AppFrame"]
-0:["ecJZL3f8VZAeTLKfyHRWs",[[["",{"children":["agents",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["agents",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","agents","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
+6:I[5520,["258","static/chunks/258-022159d3c3089cd0.js","171","static/chunks/171-58fbf67bb7636c62.js","185","static/chunks/app/layout-c7c117ef7b86bf6f.js"],"AppFrame"]
+0:["9ucF5j1fWuiDF55MzWzbS",[[["",{"children":["agents",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["agents",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","agents","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
7:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Handler · Claude Activity"}],["$","meta","3",{"name":"description","content":"Monitor and manage Claude Code agents across projects."}],["$","link","4",{"rel":"icon","href":"/icon.svg?bab509b45a421e43","type":"image/svg+xml","sizes":"any"}]]
1:null
diff --git a/src/handler/api/static/approvals/index.html b/src/handler/api/static/approvals/index.html
index 1bc9be4..3fc798b 100644
--- a/src/handler/api/static/approvals/index.html
+++ b/src/handler/api/static/approvals/index.html
@@ -1 +1 @@
-Handler · Claude Activity
\ No newline at end of file
+Handler · Claude Activity
\ No newline at end of file
diff --git a/src/handler/api/static/approvals/index.txt b/src/handler/api/static/approvals/index.txt
index 15853e1..66b0137 100644
--- a/src/handler/api/static/approvals/index.txt
+++ b/src/handler/api/static/approvals/index.txt
@@ -1,8 +1,8 @@
2:I[9107,[],"ClientPageRoot"]
-3:I[2651,["171","static/chunks/171-ba6c418b542791c8.js","163","static/chunks/app/approvals/page-423d906e199db97b.js"],"default",1]
+3:I[2651,["171","static/chunks/171-58fbf67bb7636c62.js","163","static/chunks/app/approvals/page-8d5622be330f4d01.js"],"default",1]
4:I[4707,[],""]
5:I[6423,[],""]
-6:I[5520,["258","static/chunks/258-01db7d62283ec2f5.js","171","static/chunks/171-ba6c418b542791c8.js","185","static/chunks/app/layout-cdc070e22a7fa32c.js"],"AppFrame"]
-0:["ecJZL3f8VZAeTLKfyHRWs",[[["",{"children":["approvals",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["approvals",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","approvals","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
+6:I[5520,["258","static/chunks/258-022159d3c3089cd0.js","171","static/chunks/171-58fbf67bb7636c62.js","185","static/chunks/app/layout-c7c117ef7b86bf6f.js"],"AppFrame"]
+0:["9ucF5j1fWuiDF55MzWzbS",[[["",{"children":["approvals",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["approvals",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","approvals","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
7:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Handler · Claude Activity"}],["$","meta","3",{"name":"description","content":"Monitor and manage Claude Code agents across projects."}],["$","link","4",{"rel":"icon","href":"/icon.svg?bab509b45a421e43","type":"image/svg+xml","sizes":"any"}]]
1:null
diff --git a/src/handler/api/static/claude/index.html b/src/handler/api/static/claude/index.html
new file mode 100644
index 0000000..44eb494
--- /dev/null
+++ b/src/handler/api/static/claude/index.html
@@ -0,0 +1 @@
+Handler · Claude Activity
\ No newline at end of file
diff --git a/src/handler/api/static/claude/index.txt b/src/handler/api/static/claude/index.txt
new file mode 100644
index 0000000..420d092
--- /dev/null
+++ b/src/handler/api/static/claude/index.txt
@@ -0,0 +1,8 @@
+2:I[9107,[],"ClientPageRoot"]
+3:I[6529,["171","static/chunks/171-58fbf67bb7636c62.js","877","static/chunks/app/claude/page-47f8d9b94703c22a.js"],"default",1]
+4:I[4707,[],""]
+5:I[6423,[],""]
+6:I[5520,["258","static/chunks/258-022159d3c3089cd0.js","171","static/chunks/171-58fbf67bb7636c62.js","185","static/chunks/app/layout-c7c117ef7b86bf6f.js"],"AppFrame"]
+0:["9ucF5j1fWuiDF55MzWzbS",[[["",{"children":["claude",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["claude",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","claude","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
+7:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Handler · Claude Activity"}],["$","meta","3",{"name":"description","content":"Monitor and manage Claude Code agents across projects."}],["$","link","4",{"rel":"icon","href":"/icon.svg?bab509b45a421e43","type":"image/svg+xml","sizes":"any"}]]
+1:null
diff --git a/src/handler/api/static/index.html b/src/handler/api/static/index.html
index 5e4bae1..2548c89 100644
--- a/src/handler/api/static/index.html
+++ b/src/handler/api/static/index.html
@@ -1 +1 @@
-Handler · Claude Activity
\ No newline at end of file
+Handler · Claude Activity
\ No newline at end of file
diff --git a/src/handler/api/static/index.txt b/src/handler/api/static/index.txt
index 0b682c2..0daecb1 100644
--- a/src/handler/api/static/index.txt
+++ b/src/handler/api/static/index.txt
@@ -1,8 +1,8 @@
2:I[9107,[],"ClientPageRoot"]
-3:I[3807,["171","static/chunks/171-ba6c418b542791c8.js","931","static/chunks/app/page-52e9c359249c3b73.js"],"default",1]
-4:I[5520,["258","static/chunks/258-01db7d62283ec2f5.js","171","static/chunks/171-ba6c418b542791c8.js","185","static/chunks/app/layout-cdc070e22a7fa32c.js"],"AppFrame"]
+3:I[3807,["171","static/chunks/171-58fbf67bb7636c62.js","931","static/chunks/app/page-cf68f34e95b90a40.js"],"default",1]
+4:I[5520,["258","static/chunks/258-022159d3c3089cd0.js","171","static/chunks/171-58fbf67bb7636c62.js","185","static/chunks/app/layout-c7c117ef7b86bf6f.js"],"AppFrame"]
5:I[4707,[],""]
6:I[6423,[],""]
-0:["ecJZL3f8VZAeTLKfyHRWs",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
+0:["9ucF5j1fWuiDF55MzWzbS",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],["",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L4",null,{"children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
7:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Handler · Claude Activity"}],["$","meta","3",{"name":"description","content":"Monitor and manage Claude Code agents across projects."}],["$","link","4",{"rel":"icon","href":"/icon.svg?bab509b45a421e43","type":"image/svg+xml","sizes":"any"}]]
1:null
diff --git a/src/handler/api/static/login/index.html b/src/handler/api/static/login/index.html
index d35e006..313de03 100644
--- a/src/handler/api/static/login/index.html
+++ b/src/handler/api/static/login/index.html
@@ -1 +1 @@
-Handler · Claude Activity
\ No newline at end of file
+Handler · Claude Activity
\ No newline at end of file
diff --git a/src/handler/api/static/login/index.txt b/src/handler/api/static/login/index.txt
index 4df45de..a8ab2c6 100644
--- a/src/handler/api/static/login/index.txt
+++ b/src/handler/api/static/login/index.txt
@@ -1,8 +1,8 @@
2:I[9107,[],"ClientPageRoot"]
-3:I[9347,["171","static/chunks/171-ba6c418b542791c8.js","626","static/chunks/app/login/page-2f7fdd148631e2b5.js"],"default",1]
+3:I[6374,["626","static/chunks/app/login/page-b08c6695be5632dd.js"],"default",1]
4:I[4707,[],""]
5:I[6423,[],""]
-6:I[5520,["258","static/chunks/258-01db7d62283ec2f5.js","171","static/chunks/171-ba6c418b542791c8.js","185","static/chunks/app/layout-cdc070e22a7fa32c.js"],"AppFrame"]
-0:["ecJZL3f8VZAeTLKfyHRWs",[[["",{"children":["login",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["login",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","login","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
+6:I[5520,["258","static/chunks/258-022159d3c3089cd0.js","171","static/chunks/171-58fbf67bb7636c62.js","185","static/chunks/app/layout-c7c117ef7b86bf6f.js"],"AppFrame"]
+0:["9ucF5j1fWuiDF55MzWzbS",[[["",{"children":["login",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["login",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","login","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
7:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Handler · Claude Activity"}],["$","meta","3",{"name":"description","content":"Monitor and manage Claude Code agents across projects."}],["$","link","4",{"rel":"icon","href":"/icon.svg?bab509b45a421e43","type":"image/svg+xml","sizes":"any"}]]
1:null
diff --git a/src/handler/api/static/repositories/index.html b/src/handler/api/static/repositories/index.html
index a8299f1..d16642a 100644
--- a/src/handler/api/static/repositories/index.html
+++ b/src/handler/api/static/repositories/index.html
@@ -1 +1 @@
-Handler · Claude Activity
\ No newline at end of file
+Handler · Claude Activity
\ No newline at end of file
diff --git a/src/handler/api/static/repositories/index.txt b/src/handler/api/static/repositories/index.txt
index 310def5..f4cc4f1 100644
--- a/src/handler/api/static/repositories/index.txt
+++ b/src/handler/api/static/repositories/index.txt
@@ -1,8 +1,8 @@
2:I[9107,[],"ClientPageRoot"]
-3:I[3641,["171","static/chunks/171-ba6c418b542791c8.js","27","static/chunks/app/repositories/page-5820d64699ff6a87.js"],"default",1]
+3:I[3641,["171","static/chunks/171-58fbf67bb7636c62.js","27","static/chunks/app/repositories/page-fb0c29b8dc7ed817.js"],"default",1]
4:I[4707,[],""]
5:I[6423,[],""]
-6:I[5520,["258","static/chunks/258-01db7d62283ec2f5.js","171","static/chunks/171-ba6c418b542791c8.js","185","static/chunks/app/layout-cdc070e22a7fa32c.js"],"AppFrame"]
-0:["ecJZL3f8VZAeTLKfyHRWs",[[["",{"children":["repositories",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["repositories",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","repositories","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
+6:I[5520,["258","static/chunks/258-022159d3c3089cd0.js","171","static/chunks/171-58fbf67bb7636c62.js","185","static/chunks/app/layout-c7c117ef7b86bf6f.js"],"AppFrame"]
+0:["9ucF5j1fWuiDF55MzWzbS",[[["",{"children":["repositories",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["repositories",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","repositories","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
7:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Handler · Claude Activity"}],["$","meta","3",{"name":"description","content":"Monitor and manage Claude Code agents across projects."}],["$","link","4",{"rel":"icon","href":"/icon.svg?bab509b45a421e43","type":"image/svg+xml","sizes":"any"}]]
1:null
diff --git a/src/handler/api/static/schedules/index.html b/src/handler/api/static/schedules/index.html
index b60c048..1e58d31 100644
--- a/src/handler/api/static/schedules/index.html
+++ b/src/handler/api/static/schedules/index.html
@@ -1 +1 @@
-Handler · Claude Activity
\ No newline at end of file
+Handler · Claude Activity
\ No newline at end of file
diff --git a/src/handler/api/static/schedules/index.txt b/src/handler/api/static/schedules/index.txt
index 58a85a0..166163b 100644
--- a/src/handler/api/static/schedules/index.txt
+++ b/src/handler/api/static/schedules/index.txt
@@ -1,8 +1,8 @@
2:I[9107,[],"ClientPageRoot"]
-3:I[5124,["171","static/chunks/171-ba6c418b542791c8.js","95","static/chunks/app/schedules/page-93cc8b9829ad18f2.js"],"default",1]
+3:I[5124,["171","static/chunks/171-58fbf67bb7636c62.js","95","static/chunks/app/schedules/page-db675df274be2677.js"],"default",1]
4:I[4707,[],""]
5:I[6423,[],""]
-6:I[5520,["258","static/chunks/258-01db7d62283ec2f5.js","171","static/chunks/171-ba6c418b542791c8.js","185","static/chunks/app/layout-cdc070e22a7fa32c.js"],"AppFrame"]
-0:["ecJZL3f8VZAeTLKfyHRWs",[[["",{"children":["schedules",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["schedules",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","schedules","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
+6:I[5520,["258","static/chunks/258-022159d3c3089cd0.js","171","static/chunks/171-58fbf67bb7636c62.js","185","static/chunks/app/layout-c7c117ef7b86bf6f.js"],"AppFrame"]
+0:["9ucF5j1fWuiDF55MzWzbS",[[["",{"children":["schedules",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["schedules",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","schedules","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
7:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Handler · Claude Activity"}],["$","meta","3",{"name":"description","content":"Monitor and manage Claude Code agents across projects."}],["$","link","4",{"rel":"icon","href":"/icon.svg?bab509b45a421e43","type":"image/svg+xml","sizes":"any"}]]
1:null
diff --git a/src/handler/api/static/servers/index.html b/src/handler/api/static/servers/index.html
index b2b2439..7266e7b 100644
--- a/src/handler/api/static/servers/index.html
+++ b/src/handler/api/static/servers/index.html
@@ -1 +1 @@
-Handler · Claude Activity
\ No newline at end of file
+Handler · Claude Activity
\ No newline at end of file
diff --git a/src/handler/api/static/servers/index.txt b/src/handler/api/static/servers/index.txt
index cc92cf4..3b21867 100644
--- a/src/handler/api/static/servers/index.txt
+++ b/src/handler/api/static/servers/index.txt
@@ -1,8 +1,8 @@
2:I[9107,[],"ClientPageRoot"]
-3:I[4646,["171","static/chunks/171-ba6c418b542791c8.js","664","static/chunks/app/servers/page-874e20e9ad86bc3f.js"],"default",1]
+3:I[4646,["171","static/chunks/171-58fbf67bb7636c62.js","664","static/chunks/app/servers/page-7cfc66d88412e3d1.js"],"default",1]
4:I[4707,[],""]
5:I[6423,[],""]
-6:I[5520,["258","static/chunks/258-01db7d62283ec2f5.js","171","static/chunks/171-ba6c418b542791c8.js","185","static/chunks/app/layout-cdc070e22a7fa32c.js"],"AppFrame"]
-0:["ecJZL3f8VZAeTLKfyHRWs",[[["",{"children":["servers",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["servers",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","servers","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
+6:I[5520,["258","static/chunks/258-022159d3c3089cd0.js","171","static/chunks/171-58fbf67bb7636c62.js","185","static/chunks/app/layout-c7c117ef7b86bf6f.js"],"AppFrame"]
+0:["9ucF5j1fWuiDF55MzWzbS",[[["",{"children":["servers",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["servers",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","servers","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
7:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Handler · Claude Activity"}],["$","meta","3",{"name":"description","content":"Monitor and manage Claude Code agents across projects."}],["$","link","4",{"rel":"icon","href":"/icon.svg?bab509b45a421e43","type":"image/svg+xml","sizes":"any"}]]
1:null
diff --git a/src/handler/api/static/shared/index.html b/src/handler/api/static/shared/index.html
index b91d9fd..c4b4bb7 100644
--- a/src/handler/api/static/shared/index.html
+++ b/src/handler/api/static/shared/index.html
@@ -1 +1 @@
-Handler · Claude Activity
\ No newline at end of file
+Handler · Claude Activity
\ No newline at end of file
diff --git a/src/handler/api/static/shared/index.txt b/src/handler/api/static/shared/index.txt
index d9523c5..3310308 100644
--- a/src/handler/api/static/shared/index.txt
+++ b/src/handler/api/static/shared/index.txt
@@ -1,8 +1,8 @@
2:I[9107,[],"ClientPageRoot"]
-3:I[9475,["171","static/chunks/171-ba6c418b542791c8.js","856","static/chunks/app/shared/page-e449c1a6ddda32bf.js"],"default",1]
+3:I[9475,["171","static/chunks/171-58fbf67bb7636c62.js","856","static/chunks/app/shared/page-dc7068fcf86ab8e4.js"],"default",1]
4:I[4707,[],""]
5:I[6423,[],""]
-6:I[5520,["258","static/chunks/258-01db7d62283ec2f5.js","171","static/chunks/171-ba6c418b542791c8.js","185","static/chunks/app/layout-cdc070e22a7fa32c.js"],"AppFrame"]
-0:["ecJZL3f8VZAeTLKfyHRWs",[[["",{"children":["shared",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["shared",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","shared","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
+6:I[5520,["258","static/chunks/258-022159d3c3089cd0.js","171","static/chunks/171-58fbf67bb7636c62.js","185","static/chunks/app/layout-c7c117ef7b86bf6f.js"],"AppFrame"]
+0:["9ucF5j1fWuiDF55MzWzbS",[[["",{"children":["shared",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],["",{"children":["shared",{"children":["__PAGE__",{},[["$L1",["$","$L2",null,{"props":{"params":{},"searchParams":{}},"Component":"$3"}],null],null],null]},[null,["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children","shared","children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined"}]],null]},[[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/bbd6ee1e7265be74.css","precedence":"next","crossOrigin":"$undefined"}]],["$","html",null,{"lang":"en","children":["$","body",null,{"children":["$","$L6",null,{"children":["$","$L4",null,{"parallelRouterKey":"children","segmentPath":["children"],"error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L5",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[]}]}]}]}]],null],null],["$L7",null]]]]
7:[["$","meta","0",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","meta","1",{"charSet":"utf-8"}],["$","title","2",{"children":"Handler · Claude Activity"}],["$","meta","3",{"name":"description","content":"Monitor and manage Claude Code agents across projects."}],["$","link","4",{"rel":"icon","href":"/icon.svg?bab509b45a421e43","type":"image/svg+xml","sizes":"any"}]]
1:null
diff --git a/src/handler/control/claude_gen.py b/src/handler/control/claude_gen.py
new file mode 100644
index 0000000..79e2e46
--- /dev/null
+++ b/src/handler/control/claude_gen.py
@@ -0,0 +1,118 @@
+"""Materialize the web-managed Claude config for a launch: MCP connectors and skills.
+
+The dashboard's Claude page edits database rows; this module is where those rows become
+real files the ``claude`` process reads, applied by ``control.spawn`` before every
+launch (spawn and resume both), so a change in the web UI reaches the next run of every
+agent:
+
+- **Connectors** become ``/.claude/mcp-servers.json`` — passed to claude as
+ ``--mcp-config`` (see ``control.headless``), so nothing lands in the managed repo's
+ tracked tree and a repo's own committed ``.mcp.json`` is never touched.
+- **Skills** sync to the user-level ``~/.claude/skills/`` of the worker container that
+ runs the agent. Each managed skill dir carries a ``.handler-managed`` marker so the
+ sync can delete skills removed in the UI without ever touching skills someone
+ installed by hand (or the forge role skills committed into repos by ``skills_gen``).
+"""
+
+from __future__ import annotations
+
+import json
+import os
+import shutil
+
+from sqlalchemy import Connection
+
+from ..db import repository as repo
+from ..db.engine import connection
+
+MCP_CONFIG_RELPATH = os.path.join(".claude", "mcp-servers.json")
+_MANAGED_MARKER = ".handler-managed"
+
+
+def mcp_config_path(working_dir: str) -> str:
+ return os.path.join(working_dir, MCP_CONFIG_RELPATH)
+
+
+def _server_entry(connector: dict) -> dict:
+ """One ``mcpServers`` value in claude's mcp-config shape."""
+ if connector["transport"] == "stdio":
+ entry: dict = {"command": connector["command"]}
+ if connector.get("args"):
+ entry["args"] = list(connector["args"])
+ if connector.get("env"):
+ entry["env"] = dict(connector["env"])
+ return entry
+ entry = {"type": connector["transport"], "url": connector["url"]}
+ if connector.get("headers"):
+ entry["headers"] = dict(connector["headers"])
+ return entry
+
+
+def write_mcp_config(working_dir: str, connectors: list[dict]) -> str | None:
+ """Write the launch's ``--mcp-config`` file from the enabled connectors; return its
+ path, or None (removing any previous one) when no connectors are enabled. The file
+ lives under ``.claude/`` next to the generated ``settings.json``, and is regenerated
+ every launch — deleting a connector in the UI deletes it here too."""
+ path = mcp_config_path(working_dir)
+ if not connectors:
+ if os.path.exists(path):
+ os.remove(path)
+ return None
+ os.makedirs(os.path.dirname(path), exist_ok=True)
+ config = {"mcpServers": {c["name"]: _server_entry(c) for c in connectors}}
+ with open(path, "w") as fh:
+ json.dump(config, fh, indent=2)
+ return path
+
+
+def _skills_root(home: str | None = None) -> str:
+ return os.path.join(home or os.path.expanduser("~"), ".claude", "skills")
+
+
+def sync_user_skills(skills: list[dict], home: str | None = None) -> list[str]:
+ """Sync the enabled web-managed skills into the user-level skills dir; return the
+ written SKILL.md paths.
+
+ Only dirs carrying the ``.handler-managed`` marker are ever deleted, so hand-installed
+ skills survive; a managed skill disabled or deleted in the UI disappears on the next
+ sync. Front-matter ``name``/``description`` come from the row; the body is the
+ operator's markdown verbatim."""
+ root = _skills_root(home)
+ os.makedirs(root, exist_ok=True)
+
+ keep = {s["name"] for s in skills}
+ for entry in os.listdir(root):
+ dir_path = os.path.join(root, entry)
+ if entry not in keep and os.path.isfile(os.path.join(dir_path, _MANAGED_MARKER)):
+ shutil.rmtree(dir_path, ignore_errors=True)
+
+ written: list[str] = []
+ for skill in skills:
+ skill_dir = os.path.join(root, skill["name"])
+ os.makedirs(skill_dir, exist_ok=True)
+ description = (skill.get("description") or skill["name"]).replace("\n", " ")
+ front = f"---\nname: {skill['name']}\ndescription: {description}\n---\n\n"
+ body = skill["content"]
+ if not body.endswith("\n"):
+ body += "\n"
+ path = os.path.join(skill_dir, "SKILL.md")
+ with open(path, "w") as fh:
+ fh.write(front + body)
+ with open(os.path.join(skill_dir, _MANAGED_MARKER), "w") as fh:
+ fh.write("managed by handler — edits here are overwritten at every launch\n")
+ written.append(path)
+ return written
+
+
+def apply(working_dir: str, conn: Connection | None = None) -> dict:
+ """Apply the whole web-managed config for one launch; returns a small summary."""
+ if conn is None:
+ with connection() as c:
+ connectors = repo.list_claude_connectors(c, enabled_only=True)
+ skills = repo.list_claude_skills(c, enabled_only=True)
+ else:
+ connectors = repo.list_claude_connectors(conn, enabled_only=True)
+ skills = repo.list_claude_skills(conn, enabled_only=True)
+ mcp_path = write_mcp_config(working_dir, connectors)
+ written = sync_user_skills(skills)
+ return {"mcp_config": mcp_path, "skills_written": len(written)}
diff --git a/src/handler/control/headless.py b/src/handler/control/headless.py
index 7719143..9bb68e3 100644
--- a/src/handler/control/headless.py
+++ b/src/handler/control/headless.py
@@ -34,6 +34,7 @@ from pathlib import Path
from ..config import get_settings
from ..db import repository as repo
from ..db.engine import connection
+from . import claude_gen
# Stream types we recognize from ``--output-format stream-json``; anything else (or an
# unparseable line) is stored as-is so no output is ever dropped. ``worker`` is our own:
@@ -59,10 +60,13 @@ def session_dir(working_dir: str) -> Path:
return Path(os.path.expanduser("~")) / ".claude" / "projects" / munged_project_dir(working_dir)
-def build_spawn_argv(task: str, settings_path: str, session_id: str) -> list[str]:
+def build_spawn_argv(
+ task: str, settings_path: str, session_id: str, mcp_config: str | None = None
+) -> list[str]:
"""The headless spawn invocation. ``--verbose`` is required with stream-json in
print mode; ``--session-id`` pre-assigns the UUID so the session is addressable
- (and archivable) from the first event."""
+ (and archivable) from the first event. ``mcp_config`` is the generated connectors
+ file (``control.claude_gen``), when the operator has any enabled."""
s = get_settings()
argv = [
s.claude_bin, "-p", "--verbose",
@@ -70,13 +74,17 @@ def build_spawn_argv(task: str, settings_path: str, session_id: str) -> list[str
"--session-id", session_id,
"--settings", settings_path,
]
+ if mcp_config:
+ argv += ["--mcp-config", mcp_config]
if s.run_budget_usd > 0:
argv += ["--max-budget-usd", str(s.run_budget_usd)]
argv += ["--", task]
return argv
-def build_resume_argv(session_id: str, answer: str, settings_path: str) -> list[str]:
+def build_resume_argv(
+ session_id: str, answer: str, settings_path: str, mcp_config: str | None = None
+) -> list[str]:
"""The headless resume invocation — a brand-new process continuing ``session_id``."""
s = get_settings()
argv = [
@@ -85,6 +93,8 @@ def build_resume_argv(session_id: str, answer: str, settings_path: str) -> list[
"--resume", session_id,
"--settings", settings_path,
]
+ if mcp_config:
+ argv += ["--mcp-config", mcp_config]
if s.run_budget_usd > 0:
argv += ["--max-budget-usd", str(s.run_budget_usd)]
argv += ["--", answer]
@@ -380,14 +390,19 @@ def launch(
owns the process from here.
"""
working_dir = agent["working_dir"]
+ # The generated connectors file (control.claude_gen) rides along when present; its
+ # presence on disk is the contract, so the launch seam's signature stays stable.
+ mcp_config = claude_gen.mcp_config_path(working_dir)
+ if not os.path.exists(mcp_config):
+ mcp_config = None
if kind == "spawn":
session_id = str(uuid.uuid4())
- argv = build_spawn_argv(prompt, settings_path, session_id)
+ argv = build_spawn_argv(prompt, settings_path, session_id, mcp_config)
else:
session_id = agent.get("session_id")
if not session_id:
raise ValueError(f"agent '{agent['name']}' has no session to resume")
- argv = build_resume_argv(session_id, prompt, settings_path)
+ argv = build_resume_argv(session_id, prompt, settings_path, mcp_config)
with connection() as conn:
run = repo.create_run(conn, agent["id"], session_id, worker_id, kind)
repo.set_agent_session(conn, agent["id"], session_id, worker_id)
diff --git a/src/handler/control/settings_gen.py b/src/handler/control/settings_gen.py
index 6e89d02..6f7023d 100644
--- a/src/handler/control/settings_gen.py
+++ b/src/handler/control/settings_gen.py
@@ -4,15 +4,27 @@
This is the declarative half of hook integration; the imperative half — the agent
identity and ``DATABASE_URL`` — is injected as environment via tmux (see
``control.spawn``), because hook stdin does not carry our identity.
+
+The dashboard's Claude page feeds in here too: the operator's permission overrides and
+plugins (``claude_config`` / ``claude_plugins`` rows) are merged over the env-configured
+baseline on every generation, so a change in the web UI applies to the next launch of
+every agent without a redeploy.
"""
from __future__ import annotations
import json
import os
+import re
import sys
+from sqlalchemy import Connection
+
from ..config import get_settings
+from ..db import repository as repo
+from ..db.engine import connection
+
+_OWNER_REPO_RE = re.compile(r"^[\w.-]+/[\w.-]+$")
def _hook_command(event: str) -> str:
@@ -21,7 +33,15 @@ def _hook_command(event: str) -> str:
return f"{sys.executable} -m handler.hooks {event}"
-def build_settings() -> dict:
+def _marketplace_source(repo_ref: str) -> dict:
+ """The settings-shaped source for a marketplace: ``owner/repo`` is a GitHub source,
+ anything else is a git URL (the API validates it as one)."""
+ if _OWNER_REPO_RE.match(repo_ref):
+ return {"source": "github", "repo": repo_ref}
+ return {"source": "git", "url": repo_ref}
+
+
+def build_settings(conn: Connection | None = None) -> dict:
settings = {
"hooks": {
"Stop": [{"hooks": [{"type": "command", "command": _hook_command("stop")}]}],
@@ -44,18 +64,53 @@ def build_settings() -> dict:
# project's own tooling) proceed; the PreToolUse/Stop hooks above remain the hard
# gate either way, since a hook deny overrides any allow.
s = get_settings()
- settings["permissions"] = {
- "defaultMode": s.headless_permission_mode,
- "allow": s.headless_allowed_tools_list,
- }
+ mode = s.headless_permission_mode
+ allow = list(s.headless_allowed_tools_list)
+ deny: list[str] = []
+ ask: list[str] = []
+ plugins: list[dict] = []
+ if conn is not None:
+ stored = repo.get_claude_config(conn, "permissions") or {}
+ if stored.get("default_mode"):
+ mode = stored["default_mode"]
+ allow += [r for r in stored.get("allow", []) if r not in allow]
+ deny = list(stored.get("deny", []))
+ ask = list(stored.get("ask", []))
+ plugins = repo.list_claude_plugins(conn, enabled_only=True)
+ permissions: dict = {"defaultMode": mode, "allow": allow}
+ if deny:
+ permissions["deny"] = deny
+ if ask:
+ permissions["ask"] = ask
+ settings["permissions"] = permissions
+
+ # Web-managed plugins: declaring the marketplace + the enabled plugin makes a
+ # headless run install both on boot, no interactive `/plugin` flow needed.
+ if plugins:
+ settings["extraKnownMarketplaces"] = {
+ p["marketplace"]: {"source": _marketplace_source(p["marketplace_repo"])}
+ for p in plugins
+ }
+ settings["enabledPlugins"] = {
+ f"{p['name']}@{p['marketplace']}": True for p in plugins
+ }
return settings
-def write_settings(working_dir: str) -> str:
- """Write ``.claude/settings.json`` under the agent's working dir; return its path."""
+def write_settings(working_dir: str, conn: Connection | None = None) -> str:
+ """Write ``.claude/settings.json`` under the agent's working dir; return its path.
+
+ Opens a short read connection when the caller doesn't hold one — the web-managed
+ permission overrides and plugins live in the database.
+ """
claude_dir = os.path.join(working_dir, ".claude")
os.makedirs(claude_dir, exist_ok=True)
path = os.path.join(claude_dir, "settings.json")
+ if conn is None:
+ with connection() as c:
+ settings = build_settings(c)
+ else:
+ settings = build_settings(conn)
with open(path, "w") as fh:
- json.dump(build_settings(), fh, indent=2)
+ json.dump(settings, fh, indent=2)
return path
diff --git a/src/handler/control/spawn.py b/src/handler/control/spawn.py
index a0b71cf..8a3f8db 100644
--- a/src/handler/control/spawn.py
+++ b/src/handler/control/spawn.py
@@ -15,6 +15,7 @@ from ..config import get_settings
from ..db import repository as repo
from ..db.engine import connection
from . import (
+ claude_gen,
credentials,
forge,
gitops,
@@ -142,6 +143,9 @@ def spawn(
)
settings_path = settings_gen.write_settings(working_dir)
+ # Materialize the web-managed Claude config (MCP connectors + user-level skills)
+ # so this launch picks up what the operator configured in the dashboard.
+ claude_gen.apply(working_dir)
env = _agent_env(project, agent, token, role=role, mise_init=mise_init)
# Verify the pinned forge version, if one is configured. Non-fatal: a version drift
@@ -249,6 +253,7 @@ def resume(agent: dict, answer: str, worker_id: str | None = None) -> tuple[bool
working_dir = agent["working_dir"]
settings_path = settings_gen.write_settings(working_dir)
+ claude_gen.apply(working_dir)
try:
token = None
with connection() as conn:
diff --git a/src/handler/db/repository.py b/src/handler/db/repository.py
index 349a094..57348f5 100644
--- a/src/handler/db/repository.py
+++ b/src/handler/db/repository.py
@@ -27,6 +27,10 @@ from .tables import (
agents,
approvals,
checkmarks,
+ claude_config,
+ claude_connectors,
+ claude_plugins,
+ claude_skills,
commands,
forge_hosts,
log_entries,
@@ -927,6 +931,205 @@ def get_runtime_secret(conn: Connection, key: str) -> dict | None:
return _row_to_dict(row)
+# --------------------------------------------------- claude management (web-managed)
+
+
+def list_claude_skills(conn: Connection, enabled_only: bool = False) -> list[dict]:
+ stmt = select(claude_skills)
+ if enabled_only:
+ stmt = stmt.where(claude_skills.c.enabled.is_(True))
+ rows = conn.execute(stmt.order_by(claude_skills.c.name)).all()
+ return [dict(r._mapping) for r in rows]
+
+
+def get_claude_skill(conn: Connection, skill_id: int) -> dict | None:
+ row = conn.execute(select(claude_skills).where(claude_skills.c.id == skill_id)).first()
+ return _row_to_dict(row)
+
+
+def get_claude_skill_by_name(conn: Connection, name: str) -> dict | None:
+ row = conn.execute(select(claude_skills).where(claude_skills.c.name == name)).first()
+ return _row_to_dict(row)
+
+
+def create_claude_skill(
+ conn: Connection,
+ name: str,
+ content: str,
+ description: str | None = None,
+ enabled: bool = True,
+) -> dict:
+ now = _now()
+ result = conn.execute(
+ claude_skills.insert().values(
+ name=name,
+ description=description,
+ content=content,
+ enabled=enabled,
+ created_at=now,
+ updated_at=now,
+ )
+ )
+ return get_claude_skill(conn, result.inserted_primary_key[0])
+
+
+def update_claude_skill(conn: Connection, skill_id: int, **fields: Any) -> dict | None:
+ allowed = {"name", "description", "content", "enabled"}
+ values = {k: v for k, v in fields.items() if k in allowed}
+ if values:
+ values["updated_at"] = _now()
+ conn.execute(
+ claude_skills.update().where(claude_skills.c.id == skill_id).values(**values)
+ )
+ return get_claude_skill(conn, skill_id)
+
+
+def delete_claude_skill(conn: Connection, skill_id: int) -> bool:
+ result = conn.execute(claude_skills.delete().where(claude_skills.c.id == skill_id))
+ return result.rowcount > 0
+
+
+def list_claude_connectors(conn: Connection, enabled_only: bool = False) -> list[dict]:
+ stmt = select(claude_connectors)
+ if enabled_only:
+ stmt = stmt.where(claude_connectors.c.enabled.is_(True))
+ rows = conn.execute(stmt.order_by(claude_connectors.c.name)).all()
+ return [dict(r._mapping) for r in rows]
+
+
+def get_claude_connector(conn: Connection, connector_id: int) -> dict | None:
+ row = conn.execute(
+ select(claude_connectors).where(claude_connectors.c.id == connector_id)
+ ).first()
+ return _row_to_dict(row)
+
+
+def get_claude_connector_by_name(conn: Connection, name: str) -> dict | None:
+ row = conn.execute(
+ select(claude_connectors).where(claude_connectors.c.name == name)
+ ).first()
+ return _row_to_dict(row)
+
+
+def create_claude_connector(
+ conn: Connection,
+ name: str,
+ transport: str,
+ command: str | None = None,
+ args: list | None = None,
+ env: dict | None = None,
+ url: str | None = None,
+ headers: dict | None = None,
+ enabled: bool = True,
+) -> dict:
+ result = conn.execute(
+ claude_connectors.insert().values(
+ name=name,
+ transport=transport,
+ command=command,
+ args=args,
+ env=env,
+ url=url,
+ headers=headers,
+ enabled=enabled,
+ created_at=_now(),
+ )
+ )
+ return get_claude_connector(conn, result.inserted_primary_key[0])
+
+
+def update_claude_connector(conn: Connection, connector_id: int, **fields: Any) -> dict | None:
+ allowed = {"name", "transport", "command", "args", "env", "url", "headers", "enabled"}
+ values = {k: v for k, v in fields.items() if k in allowed}
+ if values:
+ conn.execute(
+ claude_connectors.update()
+ .where(claude_connectors.c.id == connector_id)
+ .values(**values)
+ )
+ return get_claude_connector(conn, connector_id)
+
+
+def delete_claude_connector(conn: Connection, connector_id: int) -> bool:
+ result = conn.execute(
+ claude_connectors.delete().where(claude_connectors.c.id == connector_id)
+ )
+ return result.rowcount > 0
+
+
+def list_claude_plugins(conn: Connection, enabled_only: bool = False) -> list[dict]:
+ stmt = select(claude_plugins)
+ if enabled_only:
+ stmt = stmt.where(claude_plugins.c.enabled.is_(True))
+ rows = conn.execute(
+ stmt.order_by(claude_plugins.c.marketplace, claude_plugins.c.name)
+ ).all()
+ return [dict(r._mapping) for r in rows]
+
+
+def get_claude_plugin(conn: Connection, plugin_id: int) -> dict | None:
+ row = conn.execute(select(claude_plugins).where(claude_plugins.c.id == plugin_id)).first()
+ return _row_to_dict(row)
+
+
+def get_claude_plugin_by_key(conn: Connection, name: str, marketplace: str) -> dict | None:
+ row = conn.execute(
+ select(claude_plugins).where(
+ claude_plugins.c.name == name, claude_plugins.c.marketplace == marketplace
+ )
+ ).first()
+ return _row_to_dict(row)
+
+
+def create_claude_plugin(
+ conn: Connection,
+ name: str,
+ marketplace: str,
+ marketplace_repo: str,
+ enabled: bool = True,
+) -> dict:
+ result = conn.execute(
+ claude_plugins.insert().values(
+ name=name,
+ marketplace=marketplace,
+ marketplace_repo=marketplace_repo,
+ enabled=enabled,
+ created_at=_now(),
+ )
+ )
+ return get_claude_plugin(conn, result.inserted_primary_key[0])
+
+
+def update_claude_plugin(conn: Connection, plugin_id: int, **fields: Any) -> dict | None:
+ allowed = {"name", "marketplace", "marketplace_repo", "enabled"}
+ values = {k: v for k, v in fields.items() if k in allowed}
+ if values:
+ conn.execute(
+ claude_plugins.update().where(claude_plugins.c.id == plugin_id).values(**values)
+ )
+ return get_claude_plugin(conn, plugin_id)
+
+
+def delete_claude_plugin(conn: Connection, plugin_id: int) -> bool:
+ result = conn.execute(claude_plugins.delete().where(claude_plugins.c.id == plugin_id))
+ return result.rowcount > 0
+
+
+def get_claude_config(conn: Connection, key: str) -> Any | None:
+ """The stored JSON value for a claude_config key, or None when unset."""
+ row = conn.execute(select(claude_config).where(claude_config.c.key == key)).first()
+ return row._mapping["value"] if row is not None else None
+
+
+def set_claude_config(conn: Connection, key: str, value: Any) -> None:
+ now = _now()
+ result = conn.execute(
+ claude_config.update().where(claude_config.c.key == key).values(value=value, updated_at=now)
+ )
+ if result.rowcount == 0:
+ conn.execute(claude_config.insert().values(key=key, value=value, updated_at=now))
+
+
def get_latest_claimed_command(conn: Connection, type: str) -> dict | None:
"""The most recent command of a type that some worker has claimed (running or
finished). Login pinning reads login_start's ``claimed_by`` to route login_submit to
diff --git a/src/handler/db/tables.py b/src/handler/db/tables.py
index de180a3..cee416b 100644
--- a/src/handler/db/tables.py
+++ b/src/handler/db/tables.py
@@ -328,6 +328,71 @@ session_archives = Table(
Column("updated_at", PortableTimestamp, nullable=False, server_default=func.now()),
)
+# ---- Claude management (web-managed). What the operator configures in the dashboard's
+# Claude page; the control container applies it to every launch — skills sync to the
+# worker's user-level ~/.claude/skills, connectors become the --mcp-config file, and
+# plugins/permissions fold into the generated per-agent settings.json (settings_gen).
+# Transports an MCP connector can use, mirroring claude's .mcp.json server types.
+MCP_TRANSPORTS = ("stdio", "http", "sse")
+
+# Operator-authored Claude Code skills (SKILL.md bodies). Distinct from the forge role
+# skills (skills_gen), which are committed into managed repos; these are user-level and
+# synced to every worker at launch.
+claude_skills = Table(
+ "claude_skills",
+ metadata,
+ Column("id", PortableBigInt, primary_key=True, autoincrement=True),
+ Column("name", String, nullable=False, unique=True), # slug; becomes the skill dirname
+ Column("description", String),
+ Column("content", String, nullable=False), # markdown body below the front-matter
+ Column("enabled", Boolean, nullable=False, server_default="1"),
+ Column("created_at", PortableTimestamp, nullable=False, server_default=func.now()),
+ Column("updated_at", PortableTimestamp, nullable=False, server_default=func.now()),
+)
+
+# MCP servers ("connectors") agents may reach. Written per-launch as an --mcp-config
+# file, so nothing lands in the managed repo's tree.
+claude_connectors = Table(
+ "claude_connectors",
+ metadata,
+ Column("id", PortableBigInt, primary_key=True, autoincrement=True),
+ Column("name", String, nullable=False, unique=True), # the mcpServers key
+ Column("transport", String, nullable=False),
+ Column("command", String), # stdio: the executable
+ Column("args", PortableJSON), # stdio: argv list
+ Column("env", PortableJSON), # stdio: environment map
+ Column("url", String), # http/sse: the endpoint
+ Column("headers", PortableJSON), # http/sse: header map (may carry auth)
+ Column("enabled", Boolean, nullable=False, server_default="1"),
+ Column("created_at", PortableTimestamp, nullable=False, server_default=func.now()),
+ CheckConstraint(_in("transport", MCP_TRANSPORTS), name="ck_claude_connectors_transport"),
+)
+
+# Claude Code plugins, pinned to the marketplace that serves them. Folded into generated
+# settings as extraKnownMarketplaces + enabledPlugins so headless runs auto-install them.
+claude_plugins = Table(
+ "claude_plugins",
+ metadata,
+ Column("id", PortableBigInt, primary_key=True, autoincrement=True),
+ Column("name", String, nullable=False), # the plugin's name within its marketplace
+ Column("marketplace", String, nullable=False), # marketplace key, e.g. "acme-tools"
+ Column("marketplace_repo", String, nullable=False), # "owner/repo" or a git URL
+ Column("enabled", Boolean, nullable=False, server_default="1"),
+ Column("created_at", PortableTimestamp, nullable=False, server_default=func.now()),
+ UniqueConstraint("name", "marketplace", name="uq_claude_plugins_name_marketplace"),
+)
+
+# Small JSON key/value store for the remaining Claude management state; first key is
+# "permissions" — the operator's defaultMode override and extra allow/deny/ask rules,
+# merged over the env-configured baseline by settings_gen at launch.
+claude_config = Table(
+ "claude_config",
+ metadata,
+ Column("key", String, primary_key=True),
+ Column("value", PortableJSON, nullable=False),
+ Column("updated_at", PortableTimestamp, nullable=False, server_default=func.now()),
+)
+
# Recurring agent spawns. The worker checks for due rows on every loop pass and enqueues
# an ordinary ``spawn`` command per firing (so scheduled runs show up in the Activity
# audit trail like any other control action). Agent names must be unique per project, so
diff --git a/src/handler/migrations/versions/0010_claude_management.py b/src/handler/migrations/versions/0010_claude_management.py
new file mode 100644
index 0000000..af2f6d5
--- /dev/null
+++ b/src/handler/migrations/versions/0010_claude_management.py
@@ -0,0 +1,78 @@
+"""claude management: skills, connectors, plugins, and permission overrides
+
+Revision ID: 0010_claude_management
+Revises: 0009_runtime_secrets
+Create Date: 2026-07-23
+
+The dashboard's Claude page becomes a management surface, not just the login flow. The
+operator's skills, MCP connectors, plugins, and permission overrides live here; the
+control container reads them at every launch — skills sync to the worker's user-level
+``~/.claude/skills``, connectors become the run's ``--mcp-config`` file, and plugins/
+permissions fold into the generated per-agent ``settings.json``.
+"""
+
+from __future__ import annotations
+
+from collections.abc import Sequence
+
+import sqlalchemy as sa
+from alembic import op
+
+from handler.db.types import PortableBigInt, PortableJSON, PortableTimestamp
+
+revision: str = "0010_claude_management"
+down_revision: str | None = "0009_runtime_secrets"
+branch_labels: str | Sequence[str] | None = None
+depends_on: str | Sequence[str] | None = None
+
+
+def upgrade() -> None:
+ op.create_table(
+ "claude_skills",
+ sa.Column("id", PortableBigInt, primary_key=True, autoincrement=True),
+ sa.Column("name", sa.String(), nullable=False, unique=True),
+ sa.Column("description", sa.String()),
+ sa.Column("content", sa.String(), nullable=False),
+ sa.Column("enabled", sa.Boolean(), nullable=False, server_default="1"),
+ sa.Column("created_at", PortableTimestamp, nullable=False, server_default=sa.func.now()),
+ sa.Column("updated_at", PortableTimestamp, nullable=False, server_default=sa.func.now()),
+ )
+ op.create_table(
+ "claude_connectors",
+ sa.Column("id", PortableBigInt, primary_key=True, autoincrement=True),
+ sa.Column("name", sa.String(), nullable=False, unique=True),
+ sa.Column("transport", sa.String(), nullable=False),
+ sa.Column("command", sa.String()),
+ sa.Column("args", PortableJSON),
+ sa.Column("env", PortableJSON),
+ sa.Column("url", sa.String()),
+ sa.Column("headers", PortableJSON),
+ sa.Column("enabled", sa.Boolean(), nullable=False, server_default="1"),
+ sa.Column("created_at", PortableTimestamp, nullable=False, server_default=sa.func.now()),
+ sa.CheckConstraint(
+ "transport IN ('stdio', 'http', 'sse')", name="ck_claude_connectors_transport"
+ ),
+ )
+ op.create_table(
+ "claude_plugins",
+ sa.Column("id", PortableBigInt, primary_key=True, autoincrement=True),
+ sa.Column("name", sa.String(), nullable=False),
+ sa.Column("marketplace", sa.String(), nullable=False),
+ sa.Column("marketplace_repo", sa.String(), nullable=False),
+ sa.Column("enabled", sa.Boolean(), nullable=False, server_default="1"),
+ sa.Column("created_at", PortableTimestamp, nullable=False, server_default=sa.func.now()),
+ sa.UniqueConstraint("name", "marketplace", name="uq_claude_plugins_name_marketplace"),
+ )
+ op.create_table(
+ "claude_config",
+ sa.Column("key", sa.String(), primary_key=True),
+ sa.Column("value", PortableJSON, nullable=False),
+ sa.Column("updated_at", PortableTimestamp, nullable=False, server_default=sa.func.now()),
+ )
+
+
+def downgrade() -> None:
+ op.drop_table("claude_config")
+ op.drop_table("claude_plugins")
+ op.drop_table("claude_connectors")
+ op.drop_table("claude_skills")
diff --git a/tests/test_claude_management.py b/tests/test_claude_management.py
new file mode 100644
index 0000000..b228995
--- /dev/null
+++ b/tests/test_claude_management.py
@@ -0,0 +1,303 @@
+"""The Claude management surface: /claude API CRUD + admin gating, the generation that
+applies it (settings permissions/plugins, the --mcp-config file, user-level skills), and
+the spawn integration that ties them together.
+
+Spawns go through the ``fake_launch`` seam; the conftest ``env`` fixture points $HOME at
+the per-test tmp dir, so skill syncs never touch a real ``~/.claude``.
+"""
+
+from __future__ import annotations
+
+import json
+import os
+
+import pytest
+
+from handler.control import claude_gen, headless, settings_gen, spawn
+from handler.db import repository as repo
+from handler.db.engine import get_engine
+
+
+@pytest.fixture
+def lowpriv(env):
+ """A valid bearer that is NOT the admin token (the shared-context write token)."""
+ return {"Authorization": f"Bearer {env['shared_token']}"}
+
+
+# --- repository ------------------------------------------------------------------------
+
+
+def test_repository_skill_crud_and_config_kv(conn):
+ skill = repo.create_claude_skill(conn, "deploy-notes", "# body", description="d")
+ assert skill["enabled"] is True
+ assert repo.get_claude_skill_by_name(conn, "deploy-notes")["id"] == skill["id"]
+
+ updated = repo.update_claude_skill(conn, skill["id"], content="# new", enabled=False)
+ assert updated["content"] == "# new" and updated["enabled"] is False
+ assert repo.list_claude_skills(conn, enabled_only=True) == []
+ assert len(repo.list_claude_skills(conn)) == 1
+
+ assert repo.delete_claude_skill(conn, skill["id"]) is True
+ assert repo.get_claude_skill(conn, skill["id"]) is None
+
+ assert repo.get_claude_config(conn, "permissions") is None
+ repo.set_claude_config(conn, "permissions", {"allow": ["Bash(npm *)"]})
+ repo.set_claude_config(conn, "permissions", {"allow": ["Bash(go *)"]}) # upsert
+ assert repo.get_claude_config(conn, "permissions") == {"allow": ["Bash(go *)"]}
+
+
+# --- API CRUD + gating -----------------------------------------------------------------
+
+
+def test_skill_api_crud(client, auth):
+ r = client.post(
+ "/claude/skills",
+ json={"name": "deploy-notes", "description": "when deploying", "content": "# steps"},
+ headers=auth,
+ )
+ assert r.status_code == 201
+ sid = r.json()["id"]
+
+ # Duplicate name refused.
+ dup = client.post(
+ "/claude/skills", json={"name": "deploy-notes", "content": "x"}, headers=auth
+ )
+ assert dup.status_code == 409
+
+ # Unsafe names (path separators, dot-prefix) never become dirnames.
+ bad = client.post(
+ "/claude/skills", json={"name": "../escape", "content": "x"}, headers=auth
+ )
+ assert bad.status_code == 422
+
+ patched = client.patch(f"/claude/skills/{sid}", json={"enabled": False}, headers=auth)
+ assert patched.status_code == 200 and patched.json()["enabled"] is False
+
+ assert client.get("/claude/skills", headers=auth).json()[0]["name"] == "deploy-notes"
+ assert client.delete(f"/claude/skills/{sid}", headers=auth).status_code == 200
+ assert client.get("/claude/skills", headers=auth).json() == []
+
+
+def test_connector_api_crud_and_validation(client, auth):
+ # stdio without a command is refused.
+ bad = client.post(
+ "/claude/connectors", json={"name": "gh", "transport": "stdio"}, headers=auth
+ )
+ assert bad.status_code == 422
+ # http without an http(s) url is refused.
+ bad = client.post(
+ "/claude/connectors",
+ json={"name": "gh", "transport": "http", "url": "ftp://x"},
+ headers=auth,
+ )
+ assert bad.status_code == 422
+
+ r = client.post(
+ "/claude/connectors",
+ json={
+ "name": "github",
+ "transport": "stdio",
+ "command": "npx",
+ "args": ["-y", "@modelcontextprotocol/server-github"],
+ "env": {"GITHUB_TOKEN": "tok"},
+ },
+ headers=auth,
+ )
+ assert r.status_code == 201
+ cid = r.json()["id"]
+
+ # A PATCH can't strand the row in an invalid pairing (http with no url).
+ bad = client.patch(f"/claude/connectors/{cid}", json={"transport": "http"}, headers=auth)
+ assert bad.status_code == 422
+
+ ok = client.patch(
+ f"/claude/connectors/{cid}",
+ json={"transport": "http", "url": "https://mcp.example.com/mcp"},
+ headers=auth,
+ )
+ assert ok.status_code == 200 and ok.json()["url"] == "https://mcp.example.com/mcp"
+
+ assert client.delete(f"/claude/connectors/{cid}", headers=auth).status_code == 200
+
+
+def test_plugin_api_crud(client, auth):
+ r = client.post(
+ "/claude/plugins",
+ json={"name": "reviewer", "marketplace": "acme", "marketplace_repo": "acme/market"},
+ headers=auth,
+ )
+ assert r.status_code == 201
+ pid = r.json()["id"]
+
+ dup = client.post(
+ "/claude/plugins",
+ json={"name": "reviewer", "marketplace": "acme", "marketplace_repo": "acme/market"},
+ headers=auth,
+ )
+ assert dup.status_code == 409
+
+ bad = client.post(
+ "/claude/plugins",
+ json={"name": "x", "marketplace": "m", "marketplace_repo": "not a repo"},
+ headers=auth,
+ )
+ assert bad.status_code == 422
+
+ assert client.delete(f"/claude/plugins/{pid}", headers=auth).status_code == 200
+
+
+def test_permissions_roundtrip_carries_baseline(client, auth):
+ base = client.get("/claude/permissions", headers=auth).json()
+ assert base["default_mode"] is None
+ assert base["base_mode"] == "acceptEdits"
+ assert "Bash(git *)" in base["base_allow"]
+
+ r = client.put(
+ "/claude/permissions",
+ json={"default_mode": "plan", "allow": ["Bash(npm *)", " "], "deny": ["WebFetch"]},
+ headers=auth,
+ )
+ assert r.status_code == 200
+ saved = client.get("/claude/permissions", headers=auth).json()
+ assert saved["default_mode"] == "plan"
+ assert saved["allow"] == ["Bash(npm *)"] # blanks dropped
+ assert saved["deny"] == ["WebFetch"]
+
+ bad = client.put("/claude/permissions", json={"default_mode": "yolo"}, headers=auth)
+ assert bad.status_code == 422
+
+
+def test_claude_writes_need_admin(client, auth, lowpriv):
+ # Reads pass with any valid bearer...
+ assert client.get("/claude/skills", headers=lowpriv).status_code == 200
+ assert client.get("/claude/permissions", headers=lowpriv).status_code == 200
+ # ...writes need the admin token.
+ r = client.post("/claude/skills", json={"name": "s", "content": "x"}, headers=lowpriv)
+ assert r.status_code == 403
+ assert client.put("/claude/permissions", json={}, headers=lowpriv).status_code == 403
+ r = client.post(
+ "/claude/connectors",
+ json={"name": "c", "transport": "stdio", "command": "x"},
+ headers=lowpriv,
+ )
+ assert r.status_code == 403
+
+
+# --- generation ------------------------------------------------------------------------
+
+
+def test_settings_merge_db_permissions_and_plugins(env):
+ with get_engine().begin() as conn:
+ repo.set_claude_config(
+ conn,
+ "permissions",
+ {
+ "default_mode": "plan",
+ "allow": ["Bash(npm *)", "Bash(git *)"], # git already in the baseline
+ "deny": ["WebFetch"],
+ "ask": ["Bash(rm *)"],
+ },
+ )
+ repo.create_claude_plugin(conn, "reviewer", "acme", "acme/market")
+ repo.create_claude_plugin(conn, "linter", "tools", "https://git.corp/m.git")
+ repo.create_claude_plugin(conn, "off", "acme", "acme/market", enabled=False)
+ settings = settings_gen.build_settings(conn)
+
+ perms = settings["permissions"]
+ assert perms["defaultMode"] == "plan"
+ assert perms["allow"].count("Bash(git *)") == 1 # no duplicate from the merge
+ assert "Bash(npm *)" in perms["allow"]
+ assert perms["deny"] == ["WebFetch"]
+ assert perms["ask"] == ["Bash(rm *)"]
+
+ markets = settings["extraKnownMarketplaces"]
+ assert markets["acme"] == {"source": {"source": "github", "repo": "acme/market"}}
+ assert markets["tools"] == {"source": {"source": "git", "url": "https://git.corp/m.git"}}
+ assert settings["enabledPlugins"] == {"reviewer@acme": True, "linter@tools": True}
+ assert "hooks" in settings # the hard gate is untouched
+
+
+def test_mcp_config_written_and_removed(env, tmp_path):
+ wd = str(tmp_path / "wd")
+ connectors = [
+ {
+ "name": "github",
+ "transport": "stdio",
+ "command": "npx",
+ "args": ["-y", "server-github"],
+ "env": {"GITHUB_TOKEN": "tok"},
+ },
+ {"name": "docs", "transport": "http", "url": "https://mcp.x/mcp", "headers": {"A": "b"}},
+ ]
+ path = claude_gen.write_mcp_config(wd, connectors)
+ data = json.loads(open(path).read())
+ assert data["mcpServers"]["github"] == {
+ "command": "npx",
+ "args": ["-y", "server-github"],
+ "env": {"GITHUB_TOKEN": "tok"},
+ }
+ assert data["mcpServers"]["docs"] == {
+ "type": "http",
+ "url": "https://mcp.x/mcp",
+ "headers": {"A": "b"},
+ }
+ # No connectors left => the previously generated file is removed.
+ assert claude_gen.write_mcp_config(wd, []) is None
+ assert not os.path.exists(path)
+
+
+def test_skills_sync_and_managed_cleanup(env, tmp_path):
+ home = str(tmp_path / "home")
+ # A hand-installed skill (no marker) must survive every sync.
+ manual = tmp_path / "home" / ".claude" / "skills" / "hand-made"
+ manual.mkdir(parents=True)
+ (manual / "SKILL.md").write_text("mine")
+
+ written = claude_gen.sync_user_skills(
+ [{"name": "deploy", "description": "when deploying", "content": "# steps"}], home=home
+ )
+ text = open(written[0]).read()
+ assert text.startswith("---\nname: deploy\ndescription: when deploying\n---\n")
+ assert "# steps" in text
+
+ # The managed skill disappears when no longer enabled; the manual one stays.
+ claude_gen.sync_user_skills([], home=home)
+ assert not os.path.exists(os.path.dirname(written[0]))
+ assert (manual / "SKILL.md").read_text() == "mine"
+
+
+def test_argv_carries_mcp_config():
+ argv = headless.build_spawn_argv("task", "/s.json", "sid", "/wd/.claude/mcp-servers.json")
+ i = argv.index("--mcp-config")
+ assert argv[i + 1] == "/wd/.claude/mcp-servers.json"
+ assert "--mcp-config" not in headless.build_spawn_argv("task", "/s.json", "sid")
+ argv = headless.build_resume_argv("sid", "answer", "/s.json", "/m.json")
+ assert argv[argv.index("--mcp-config") + 1] == "/m.json"
+
+
+# --- spawn integration -----------------------------------------------------------------
+
+
+def test_spawn_applies_managed_config(env, fake_launch):
+ root = env["tmp"] / "proj"
+ root.mkdir(parents=True, exist_ok=True)
+ (root / ".mise.toml").write_text("[tasks.test]\nrun = 'pytest'\n")
+ with get_engine().begin() as conn:
+ repo.create_project(conn, "proj", str(root))
+ repo.create_claude_connector(conn, "github", "stdio", command="npx")
+ repo.create_claude_connector(conn, "off", "stdio", command="x", enabled=False)
+ repo.create_claude_skill(conn, "deploy", "# steps")
+ repo.set_claude_config(conn, "permissions", {"default_mode": "plan"})
+
+ agent = spawn.spawn("proj", "api", task="do it")
+ wd = agent["working_dir"]
+
+ # Disabled connectors are excluded from the generated --mcp-config file.
+ mcp = json.loads(open(claude_gen.mcp_config_path(wd)).read())
+ assert list(mcp["mcpServers"]) == ["github"]
+ # Skills synced to the (test-scoped) user-level dir.
+ skill = os.path.join(str(env["tmp"]), ".claude", "skills", "deploy", "SKILL.md")
+ assert os.path.exists(skill)
+ # The generated settings carry the DB permission override.
+ settings = json.loads(open(os.path.join(wd, ".claude", "settings.json")).read())
+ assert settings["permissions"]["defaultMode"] == "plan"