@jiggai/kitchen 0.3.11 → 0.3.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/BUILD_ID +1 -1
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +3 -3
- package/.next/server/app/_global-error.html +2 -2
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +3 -3
- package/.next/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/.next/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/agents/[agentId]/page.js +1 -1
- package/.next/server/app/agents/[agentId]/page.js.nft.json +1 -1
- package/.next/server/app/agents/[agentId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/api/agents/add/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/file/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/files/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/skills/install/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/agents/update/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/jobs/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/recipe-installed/route.js.nft.json +1 -1
- package/.next/server/app/api/cron/worker/route.js.nft.json +1 -1
- package/.next/server/app/api/goals/[id]/promote/route.js.nft.json +1 -1
- package/.next/server/app/api/goals/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/goals/route.js.nft.json +1 -1
- package/.next/server/app/api/ids/check/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/[id]/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/clone/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/custom-team/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/local-agent-catalog/route.js.nft.json +1 -1
- package/.next/server/app/api/recipes/team-agents/route.js.nft.json +1 -1
- package/.next/server/app/api/scaffold/route.js.nft.json +1 -1
- package/.next/server/app/api/settings/cron-installation/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/assign/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/assignees/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/comment/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/delete/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/move/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/[teamId]/tickets/move-to-goals/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/file/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/files/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/memory/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/meta/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/orchestrator/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/remove-team/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/skills/install/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/skills/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflow-runs/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflow-templates/route.js.nft.json +1 -1
- package/.next/server/app/api/teams/workflows/route.js.nft.json +1 -1
- package/.next/server/app/api/tickets/assign/route.js.nft.json +1 -1
- package/.next/server/app/api/tickets/assignees/route.js.nft.json +1 -1
- package/.next/server/app/api/tickets/move/route.js.nft.json +1 -1
- package/.next/server/app/channels/page.js +1 -1
- package/.next/server/app/channels/page.js.nft.json +1 -1
- package/.next/server/app/channels/page_client-reference-manifest.js +1 -1
- package/.next/server/app/channels.html +2 -2
- package/.next/server/app/channels.rsc +4 -4
- package/.next/server/app/channels.segments/_full.segment.rsc +4 -4
- package/.next/server/app/channels.segments/_head.segment.rsc +1 -1
- package/.next/server/app/channels.segments/_index.segment.rsc +2 -2
- package/.next/server/app/channels.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/channels.segments/channels/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/channels.segments/channels.segment.rsc +1 -1
- package/.next/server/app/cron-jobs/page.js +1 -1
- package/.next/server/app/cron-jobs/page.js.nft.json +1 -1
- package/.next/server/app/cron-jobs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/goals/[id]/page.js +1 -1
- package/.next/server/app/goals/[id]/page.js.nft.json +1 -1
- package/.next/server/app/goals/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/goals/new/page.js +1 -1
- package/.next/server/app/goals/new/page.js.nft.json +1 -1
- package/.next/server/app/goals/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/goals/new.html +2 -2
- package/.next/server/app/goals/new.rsc +4 -4
- package/.next/server/app/goals/new.segments/_full.segment.rsc +4 -4
- package/.next/server/app/goals/new.segments/_head.segment.rsc +1 -1
- package/.next/server/app/goals/new.segments/_index.segment.rsc +2 -2
- package/.next/server/app/goals/new.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/goals/new.segments/goals/new/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/goals/new.segments/goals/new.segment.rsc +1 -1
- package/.next/server/app/goals/new.segments/goals.segment.rsc +1 -1
- package/.next/server/app/goals/page.js +1 -1
- package/.next/server/app/goals/page.js.nft.json +1 -1
- package/.next/server/app/goals/page_client-reference-manifest.js +1 -1
- package/.next/server/app/goals.html +1 -1
- package/.next/server/app/goals.rsc +4 -4
- package/.next/server/app/goals.segments/_full.segment.rsc +4 -4
- package/.next/server/app/goals.segments/_head.segment.rsc +1 -1
- package/.next/server/app/goals.segments/_index.segment.rsc +2 -2
- package/.next/server/app/goals.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/goals.segments/goals/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/goals.segments/goals.segment.rsc +1 -1
- package/.next/server/app/page.js +3 -3
- package/.next/server/app/page.js.nft.json +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recipes/[id]/page.js +3 -3
- package/.next/server/app/recipes/[id]/page.js.nft.json +1 -1
- package/.next/server/app/recipes/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/recipes/page.js +1 -1
- package/.next/server/app/recipes/page.js.nft.json +1 -1
- package/.next/server/app/recipes/page_client-reference-manifest.js +1 -1
- package/.next/server/app/runs/page.js +2 -2
- package/.next/server/app/runs/page.js.nft.json +1 -1
- package/.next/server/app/runs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings/page.js +1 -1
- package/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/server/app/settings.html +1 -1
- package/.next/server/app/settings.rsc +4 -4
- package/.next/server/app/settings.segments/_full.segment.rsc +4 -4
- package/.next/server/app/settings.segments/_head.segment.rsc +1 -1
- package/.next/server/app/settings.segments/_index.segment.rsc +2 -2
- package/.next/server/app/settings.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/settings.segments/settings/__PAGE__.segment.rsc +2 -2
- package/.next/server/app/settings.segments/settings.segment.rsc +1 -1
- package/.next/server/app/teams/[teamId]/page.js +3 -3
- package/.next/server/app/teams/[teamId]/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js +2 -2
- package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/runs/[workflowId]/[runId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/runs/page.js +1 -1
- package/.next/server/app/teams/[teamId]/runs/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/runs/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js +1 -1
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/tickets/[ticket]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/tickets/page.js +2 -2
- package/.next/server/app/teams/[teamId]/tickets/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/tickets/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js +1 -1
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/workflows/[workflowId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/teams/[teamId]/workflows/page.js +3 -3
- package/.next/server/app/teams/[teamId]/workflows/page.js.nft.json +1 -1
- package/.next/server/app/teams/[teamId]/workflows/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tickets/[ticket]/page.js +1 -1
- package/.next/server/app/tickets/[ticket]/page.js.nft.json +1 -1
- package/.next/server/app/tickets/[ticket]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/tickets/page.js +2 -2
- package/.next/server/app/tickets/page.js.nft.json +1 -1
- package/.next/server/app/tickets/page_client-reference-manifest.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__01863a8b._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__01863a8b._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__04f289da._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__04f289da._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__05f5e243._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__05f5e243._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__0c4fc3d3._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__0c4fc3d3._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__1311d7a3._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1311d7a3._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__1c6c2e43._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__1c6c2e43._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__3cfdf0b3._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__3cfdf0b3._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__3fdbc43e._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__3fdbc43e._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__453333f5._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__453333f5._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__47eb3111._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__47eb3111._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__502825d0._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__502825d0._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__50fe6ff8._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__50fe6ff8._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__51198e25._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__51198e25._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__542a081b._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__542a081b._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__5ceff0f3._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__5ceff0f3._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__5ea38a67._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__5ea38a67._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__698cf062._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__698cf062._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__69be1758._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__69be1758._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__69c45937._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__69c45937._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__6f4e90a0._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__6f4e90a0._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__7459129e._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__7459129e._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__7a331e51._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__7a331e51._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__7bf889c1._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__7bf889c1._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__864a08dd._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__864a08dd._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__89605574._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__89605574._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__8e27e9f7._.js +3 -3
- package/.next/server/chunks/[root-of-the-server]__8e27e9f7._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__95ddb81a._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__95ddb81a._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__99b12bcb._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__99b12bcb._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__9d0ea07b._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__9d0ea07b._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__a49c534d._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__a49c534d._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__a74a32d5._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__a74a32d5._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__b002764e._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__b002764e._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__b64936a3._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__b64936a3._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__bbdb6dcb._.js +2 -2
- package/.next/server/chunks/[root-of-the-server]__bbdb6dcb._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__bccfb2c0._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__bccfb2c0._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__d924e5ac._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__d924e5ac._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__e063a986._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__e063a986._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__e40409a2._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__e40409a2._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__e478ef0d._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__e478ef0d._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__fef7183d._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__fef7183d._.js.map +1 -1
- package/.next/server/chunks/[root-of-the-server]__ff69832c._.js +1 -1
- package/.next/server/chunks/[root-of-the-server]__ff69832c._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__02e6ccaa._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__02e6ccaa._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0df430db._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__0df430db._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__162d7d9d._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__162d7d9d._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__17b046ea._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__17b046ea._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__255506f2._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__255506f2._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__3b880807._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__471bc2e7._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__471bc2e7._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__49281b4c._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__49281b4c._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__8756d76d._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__8756d76d._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__8a588fad._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__8a588fad._.js.map +1 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__9a7d79aa._.js +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__9a7d79aa._.js.map +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__c777e326._.js +3 -0
- package/.next/server/chunks/ssr/[root-of-the-server]__c777e326._.js.map +1 -0
- package/.next/server/chunks/ssr/_018dfe6b._.js +1 -1
- package/.next/server/chunks/ssr/_018dfe6b._.js.map +1 -1
- package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js +1 -1
- package/.next/server/chunks/ssr/b1a17_app_teams_[teamId]_workflows_[workflowId]_workflows-editor-client_tsx_5e714aa2._.js.map +1 -1
- package/.next/server/chunks/ssr/src_app_HomeClient_tsx_f9f7568d._.js +1 -1
- package/.next/server/chunks/ssr/src_app_HomeClient_tsx_f9f7568d._.js.map +1 -1
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +2 -2
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/chunks/{ecdc9465f0e4d954.js → 4d4876ec71727e38.js} +1 -1
- package/.next/static/chunks/{4f5e02a609758a0b.js → d7f5083b972391f7.js} +1 -1
- package/.next/static/chunks/f179280598d329b2.js +1 -0
- package/openclaw.plugin.json +1 -1
- package/package.json +1 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__24c20736._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__24c20736._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__28f5d174._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__28f5d174._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__30619465._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__30619465._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__6bd48d33._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__6bd48d33._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__78972f52._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__78972f52._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__7fcc6175._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__7fcc6175._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__8e001110._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__8e001110._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__bd20cf10._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__bd20cf10._.js.map +0 -1
- package/.next/server/chunks/ssr/[root-of-the-server]__cefae8c8._.js +0 -3
- package/.next/server/chunks/ssr/[root-of-the-server]__cefae8c8._.js.map +0 -1
- package/.next/static/chunks/821af975ccc1f8d5.js +0 -1
- /package/.next/static/{pW5SAQ1dzPcsq_66yy5po → uTm9pVsF7AuRLSQKZwTWp}/_buildManifest.js +0 -0
- /package/.next/static/{pW5SAQ1dzPcsq_66yy5po → uTm9pVsF7AuRLSQKZwTWp}/_clientMiddlewareManifest.json +0 -0
- /package/.next/static/{pW5SAQ1dzPcsq_66yy5po → uTm9pVsF7AuRLSQKZwTWp}/_ssgManifest.js +0 -0
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[36313,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.HooksClientContext},18341,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.ServerInsertedHtml},18622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},20635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},42602,(a,b,c)=>{"use strict";b.exports=a.r(18622)},87924,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactJsxRuntime},72131,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].React},9270,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.AppRouterContext},38783,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactServerDOMTurbopackClient},51200,a=>{"use strict";async function b(a){return Promise.all(a.map(a=>fetch(a,{cache:"no-store"})))}async function c(a,b){let c=await fetch(a,b),d=await c.json();if(!c.ok)throw Error(d.error??"Request failed");return d}async function d(a,b){let c=await fetch(a,b),d=await c.json();return c.ok?{ok:!0,data:d}:{ok:!1,status:c.status,error:d.error??"Request failed"}}a.s(["fetchAll",()=>b,"fetchJson",()=>c,"fetchJsonWithStatus",()=>d])},61889,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=(0,c.createContext)(null);function e({kind:a}){return"success"===a?(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-emerald-400",children:(0,b.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.707a1 1 0 00-1.414-1.414L9 10.172 7.707 8.879a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}):"error"===a?(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-red-400",children:(0,b.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm-1-5a1 1 0 112 0 1 1 0 01-2 0zm0-8a1 1 0 012 0v6a1 1 0 11-2 0V5z",clipRule:"evenodd"})}):(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-slate-300",children:(0,b.jsx)("path",{fillRule:"evenodd",d:"M18 10A8 8 0 11 2 10a8 8 0 0116 0zM9 9a1 1 0 112 0v5a1 1 0 11-2 0V9zm0-3a1 1 0 112 0 1 1 0 01-2 0z",clipRule:"evenodd"})})}function f({children:a}){let[f,g]=(0,c.useState)([]),h=(0,c.useCallback)(a=>{g(b=>b.filter(b=>b.id!==a))},[]),i=(0,c.useCallback)(a=>{g(b=>b.map(b=>b.id===a?{...b,state:"leave"}:b)),window.setTimeout(()=>h(a),250)},[h]),j=(0,c.useCallback)(a=>{g(b=>b.map(b=>b.id===a?{...b,state:"show"}:b))},[]),k=(0,c.useCallback)(a=>{let b,c=`${Date.now()}-${(b=new Uint8Array(8),crypto.getRandomValues(b),Array.from(b,a=>a.toString(16).padStart(2,"0")).join(""))}`,d={id:c,timeoutMs:5e3,state:"enter",...a};g(a=>[d,...a].slice(0,4)),window.setTimeout(()=>j(c),10);let e=d.timeoutMs;e&&e>0&&window.setTimeout(()=>i(c),e)},[i,j]),l=(0,c.useMemo)(()=>({push:k}),[k]);return(0,b.jsxs)(d.Provider,{value:l,children:[a,(0,b.jsx)("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 z-[100] flex items-end px-4 py-6 sm:p-6",children:(0,b.jsx)("div",{className:"flex w-full flex-col items-start space-y-4",children:f.map(a=>{var c;return(0,b.jsx)("div",{className:"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg border bg-[color:var(--ck-toast-bg)] shadow-[var(--ck-shadow-2)] transition-all duration-200 ease-out border-[color:var(--ck-toast-border)] "+("enter"===(c=a.state)||"leave"===c?"translate-x-[-16px] opacity-0":"translate-x-0 opacity-100"),children:(0,b.jsx)("div",{className:"p-4",children:(0,b.jsxs)("div",{className:"flex items-start",children:[(0,b.jsx)("div",{className:"shrink-0",children:(0,b.jsx)(e,{kind:a.kind})}),(0,b.jsxs)("div",{className:"ml-3 w-0 flex-1",children:[a.title?(0,b.jsx)("p",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:a.title}):null,(0,b.jsx)("p",{className:"whitespace-pre-wrap text-sm text-[color:var(--ck-text-primary)]",children:a.message})]}),(0,b.jsx)("div",{className:"ml-4 flex shrink-0",children:(0,b.jsxs)("button",{type:"button",onClick:()=>i(a.id),className:"inline-flex rounded-md bg-transparent text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]","aria-label":"Dismiss",title:"Dismiss",children:[(0,b.jsx)("span",{className:"sr-only",children:"Close"}),(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:(0,b.jsx)("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 10-1.06-1.06L10 8.94 6.28 5.22z"})})]})})]})})},a.id)})})})]})}function g(){let a=(0,c.useContext)(d);if(!a)throw Error("useToast must be used within ToastProvider");return a}a.s(["ToastProvider",()=>f,"useToast",()=>g])},20471,a=>{"use strict";var b=a.i(72131);function c(){return""}function d(a){return()=>{}}function e(){return(0,b.useSyncExternalStore)(d,c,()=>"")}function f(){}a.s(["dispatchSelectedTeamChanged",()=>f,"useSelectedTeamId",()=>e])},15149,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(50944),e=a.i(72131),f=a.i(20471),g=e;class h extends g.default.Component{constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}componentDidCatch(a,b){console.error("ErrorBoundary caught:",a,b)}render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback:(0,b.jsxs)("div",{className:"ck-glass mx-auto max-w-2xl p-6 sm:p-8",children:[(0,b.jsx)("h1",{className:"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:"Something went wrong"}),(0,b.jsx)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"An unexpected error occurred. You can try refreshing the page or go back home."}),(0,b.jsx)("pre",{className:"mt-4 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-3 font-mono text-xs text-[color:var(--ck-text-secondary)]",children:this.state.error.message}),(0,b.jsxs)("div",{className:"mt-6 flex flex-wrap gap-3",children:[(0,b.jsx)("button",{type:"button",onClick:()=>window.location.reload(),className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-4 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] hover:bg-[var(--ck-accent-red)]/90",children:"Refresh page"}),(0,b.jsx)(c.default,{href:"/",className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-4 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10",children:"Go home"})]})]}):this.props.children}}var i=a.i(51200);function j({className:a,children:c}){return(0,b.jsx)("svg",{className:a,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:c})}function k({className:a}){return(0,b.jsxs)(j,{className:a,children:[(0,b.jsx)("path",{d:"M12 18a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z",stroke:"currentColor",strokeWidth:"1.8"}),(0,b.jsx)("path",{d:"M12 2v2.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M12 19.5V22",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M2 12h2.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M19.5 12H22",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M4.2 4.2 6 6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M18 18l1.8 1.8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M18 6l1.8-1.8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M4.2 19.8 6 18",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}function l({className:a}){return(0,b.jsx)(j,{className:a,children:(0,b.jsx)("path",{d:"M21 14.2A7.8 7.8 0 0 1 9.8 3a7 7 0 1 0 11.2 11.2Z",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"})})}function m(){return"dark"}function n(){let[a,c]=(0,e.useState)(m);(0,e.useEffect)(()=>{document.documentElement.dataset.theme=a,window.localStorage.setItem("ck-theme",a)},[a]);let d="dark"===a?"Switch to light mode":"Switch to dark mode";return(0,b.jsxs)("button",{type:"button",onClick:function(){c(a=>"dark"===a?"light":"dark")},className:"grid h-9 w-9 place-items-center rounded-full border border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:var(--ck-bg-glass-strong)]","aria-label":d,title:d,children:[(0,b.jsx)("span",{className:"sr-only",suppressHydrationWarning:!0,children:d}),"dark"===a?(0,b.jsx)(l,{className:"h-4.5 w-4.5"}):(0,b.jsx)(k,{className:"h-4.5 w-4.5"})]})}var o=a.i(61889);function p({children:a}){return(0,b.jsx)("span",{className:"grid size-7 place-items-center text-[color:var(--ck-text-secondary)]","aria-hidden":!0,children:a})}function q({href:a,label:d,icon:e,active:f,collapsed:g}){return(0,b.jsxs)(c.default,{href:a,title:d,className:(f?"flex items-center rounded-[var(--ck-radius-sm)] bg-white/10 text-sm font-medium text-[color:var(--ck-text-primary)]":"flex items-center rounded-[var(--ck-radius-sm)] text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]")+(g?" justify-center px-0 py-3":" gap-4 px-4 py-3"),children:[e,g?null:(0,b.jsx)("span",{children:d})]})}function r({children:a}){let g=(0,d.usePathname)()||"/",j=(0,d.useRouter)(),k=(0,e.useMemo)(()=>{let a=g.match(/^\/teams\/([^/]+)(?:\/|$)/);return a?decodeURIComponent(a[1]):null},[g]),l=(0,e.useMemo)(()=>g.startsWith("/teams/"),[g]),[m,r]=(0,e.useState)(""),s=(k||m).trim();function t(a){return s&&("/tickets"===a||"/goals"===a||"/cron-jobs"===a||"/runs"===a)?function(a,b){let[c,d]=a.split("?"),e=new URLSearchParams(d??"");return e.set("team",b),`${c}?${e.toString()}`}(a,s):a}function u(a){if(!g.startsWith("/teams/")&&("/tickets"===g||"/goals"===g||"/cron-jobs"===g||"/runs"===g))try{let b=new URL(window.location.href);if(!a){if(!b.searchParams.has("team"))return;b.searchParams.delete("team");let a=b.searchParams.toString();j.replace(b.pathname+(a?`?${a}`:""));return}if((b.searchParams.get("team")??"").trim()===a)return;b.searchParams.set("team",a),j.replace(b.pathname+"?"+b.searchParams.toString())}catch{}}(0,e.useEffect)(()=>{try{r((localStorage.getItem("ck-selected-team")||"").trim())}catch{}},[]),(0,e.useEffect)(()=>{},[g,s]),(0,e.useEffect)(()=>{},[s]);let[v,w]=(0,e.useState)(!1);(0,e.useEffect)(()=>{try{let a=localStorage.getItem("ck-leftnav-collapsed");w("1"===a)}catch{}},[]);let[x,y]=(0,e.useState)([]);(0,e.useEffect)(()=>{(async()=>{try{let a=await (0,i.fetchJson)("/api/agents",{cache:"no-store"}),b=Array.isArray(a.agents)?a.agents:[],c=new Set;for(let a of b){let b=String(a.workspace??"").split("/").filter(Boolean).find(a=>a.startsWith("workspace-"))??"";if(!b)continue;let d=b.slice(10);d&&"workspace"!==d&&c.add(d)}y(Array.from(c).sort())}catch{y([])}})()},[]);let z=[{href:"/",label:"Agents",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M3 11l9-8 9 8"}),(0,b.jsx)("path",{d:"M5 10v10h14V10"})]})})},{href:"/recipes",label:"Recipes",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M6 4h12v16H6z"}),(0,b.jsx)("path",{d:"M9 8h6"}),(0,b.jsx)("path",{d:"M9 12h6"})]})})},{href:t("/tickets"),label:"Tickets",icon:(0,b.jsx)(p,{children:(0,b.jsx)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,b.jsx)("path",{d:"M4 7h16v4a2 2 0 0 1 0 4v4H4v-4a2 2 0 0 0 0-4z"})})})},{href:"/channels",label:"Channels",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M4 6h16"}),(0,b.jsx)("path",{d:"M4 12h16"}),(0,b.jsx)("path",{d:"M4 18h16"}),(0,b.jsx)("path",{d:"M7 9h0"})]})})},{href:t("/goals"),label:"Goals",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,b.jsx)("path",{d:"M12 7v5l3 3"})]})})},{href:t("/cron-jobs"),label:"Cron jobs",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,b.jsx)("path",{d:"M12 7v5"})]})})},{href:t("/runs"),label:"Runs",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M4 19h16"}),(0,b.jsx)("path",{d:"M6 16l4-4 3 3 5-7"}),(0,b.jsx)("circle",{cx:"10",cy:"12",r:"1"}),(0,b.jsx)("circle",{cx:"13",cy:"15",r:"1"}),(0,b.jsx)("circle",{cx:"18",cy:"8",r:"1"})]})})},{href:"/settings",label:"Settings",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z"}),(0,b.jsx)("path",{d:"M19.4 15a7.9 7.9 0 0 0 .1-1l2-1.5-2-3.5-2.4.5a7.8 7.8 0 0 0-1.7-1L13.5 3h-4L8.6 6.5a7.8 7.8 0 0 0-1.7 1L4.5 7l-2 3.5 2 1.5a7.9 7.9 0 0 0 .1 1l-2 1.5 2 3.5 2.4-.5a7.8 7.8 0 0 0 1.7 1L10.5 21h4l.9-3.5a7.8 7.8 0 0 0 1.7-1l2.4.5 2-3.5-2-1.5Z"})]})})}],A=v?"w-16":"w-72";return(0,b.jsx)(o.ToastProvider,{children:(0,b.jsxs)("div",{className:"flex h-dvh w-dvw overflow-hidden",children:[(0,b.jsxs)("aside",{className:`flex shrink-0 flex-col border-r border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] backdrop-blur-[var(--ck-glass-blur)] ${A}`,children:[(0,b.jsxs)("div",{className:"flex h-14 items-center justify-between gap-2 border-b border-[color:var(--ck-border-subtle)] px-3",children:[(0,b.jsx)(c.default,{href:"/",className:"text-sm font-semibold tracking-tight",title:"Home",children:v?"CK":"Claw Kitchen"}),(0,b.jsx)("button",{onClick:function(){w(a=>{let b=!a;try{localStorage.setItem("ck-leftnav-collapsed",b?"1":"0")}catch{}return b})},className:"rounded-[var(--ck-radius-sm)] px-2 py-1 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]",title:v?"Expand":"Collapse",children:v?"»":"«"})]}),(0,b.jsx)("div",{className:"border-b border-[color:var(--ck-border-subtle)] p-2",children:v?(0,b.jsx)("button",{className:"w-full rounded-[var(--ck-radius-sm)] bg-white/5 px-2 py-2 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:s?`Team: ${s}`:"Select team",onClick:()=>{let a=x[0]||"";if(a){r(a);try{localStorage.setItem("ck-selected-team",a)}catch{}u(a)}},children:"👥"}):(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)("div",{className:"px-2 pt-1 text-xs font-semibold uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Team"}),(0,b.jsxs)("select",{value:s??"",disabled:l,onChange:a=>{let b=(a.target.value||"").trim();r(b);try{b?localStorage.setItem("ck-selected-team",b):localStorage.removeItem("ck-selected-team")}catch{}(0,f.dispatchSelectedTeamChanged)(),u(b)},className:"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]"+(l?" cursor-not-allowed opacity-60":""),children:[(0,b.jsx)("option",{value:"",children:"All teams"}),x.map(a=>(0,b.jsx)("option",{value:a,children:a},a))]}),s?(0,b.jsx)(c.default,{href:`/teams/${encodeURIComponent(s)}`,className:"px-2 pb-1 text-xs font-medium text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-secondary)]",children:"Edit team"}):null]})}),(0,b.jsxs)("nav",{className:"min-h-0 flex-1 overflow-auto p-2",children:[(0,b.jsx)("div",{className:"mt-2 px-2 pb-2 pt-2"}),z.map(a=>{let c;return(0,b.jsx)(q,{href:a.href,label:a.label,icon:(0,b.jsx)("span",{"aria-hidden":!0,children:a.icon}),collapsed:v,active:g===(c=a.href.split("?")[0])||g.startsWith(c+"/")},a.href)})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2 border-t border-[color:var(--ck-border-subtle)] p-2",children:[(0,b.jsx)("a",{href:"https://github.com/JIGGAI/ClawRecipes/tree/main/docs",target:"_blank",rel:"noreferrer",className:v?"mx-auto rounded-[var(--ck-radius-sm)] px-2 py-2 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]":"rounded-[var(--ck-radius-sm)] px-3 py-2 text-sm font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]",title:"Docs",children:v?"📖":"Docs"}),v?null:(0,b.jsx)(n,{})]})]}),(0,b.jsx)("div",{className:"min-w-0 flex-1",children:(0,b.jsx)("main",{className:"h-full overflow-auto p-4 md:p-6",children:(0,b.jsx)(h,{children:a})})})]})})}a.s(["AppShell",()=>r],15149)}];
|
|
1
|
+
module.exports=[36313,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.HooksClientContext},18341,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.ServerInsertedHtml},18622,(a,b,c)=>{b.exports=a.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},20635,(a,b,c)=>{b.exports=a.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},42602,(a,b,c)=>{"use strict";b.exports=a.r(18622)},87924,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactJsxRuntime},72131,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].React},9270,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored.contexts.AppRouterContext},38783,(a,b,c)=>{"use strict";b.exports=a.r(42602).vendored["react-ssr"].ReactServerDOMTurbopackClient},51200,a=>{"use strict";async function b(a){return Promise.all(a.map(a=>fetch(a,{cache:"no-store"})))}async function c(a,b){let c=await fetch(a,b),d=await c.json();if(!c.ok)throw Error(d.error??"Request failed");return d}async function d(a,b){let c=await fetch(a,b),d=await c.json();return c.ok?{ok:!0,data:d}:{ok:!1,status:c.status,error:d.error??"Request failed"}}a.s(["fetchAll",()=>b,"fetchJson",()=>c,"fetchJsonWithStatus",()=>d])},61889,a=>{"use strict";var b=a.i(87924),c=a.i(72131);let d=(0,c.createContext)(null);function e({kind:a}){return"success"===a?(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-emerald-400",children:(0,b.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.707a1 1 0 00-1.414-1.414L9 10.172 7.707 8.879a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}):"error"===a?(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-red-400",children:(0,b.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm-1-5a1 1 0 112 0 1 1 0 01-2 0zm0-8a1 1 0 012 0v6a1 1 0 11-2 0V5z",clipRule:"evenodd"})}):(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5 text-slate-300",children:(0,b.jsx)("path",{fillRule:"evenodd",d:"M18 10A8 8 0 11 2 10a8 8 0 0116 0zM9 9a1 1 0 112 0v5a1 1 0 11-2 0V9zm0-3a1 1 0 112 0 1 1 0 01-2 0z",clipRule:"evenodd"})})}function f({children:a}){let[f,g]=(0,c.useState)([]),h=(0,c.useCallback)(a=>{g(b=>b.filter(b=>b.id!==a))},[]),i=(0,c.useCallback)(a=>{g(b=>b.map(b=>b.id===a?{...b,state:"leave"}:b)),window.setTimeout(()=>h(a),250)},[h]),j=(0,c.useCallback)(a=>{g(b=>b.map(b=>b.id===a?{...b,state:"show"}:b))},[]),k=(0,c.useCallback)(a=>{let b,c=`${Date.now()}-${(b=new Uint8Array(8),crypto.getRandomValues(b),Array.from(b,a=>a.toString(16).padStart(2,"0")).join(""))}`,d={id:c,timeoutMs:5e3,state:"enter",...a};g(a=>[d,...a].slice(0,4)),window.setTimeout(()=>j(c),10);let e=d.timeoutMs;e&&e>0&&window.setTimeout(()=>i(c),e)},[i,j]),l=(0,c.useMemo)(()=>({push:k}),[k]);return(0,b.jsxs)(d.Provider,{value:l,children:[a,(0,b.jsx)("div",{"aria-live":"assertive",className:"pointer-events-none fixed inset-0 z-[100] flex items-end px-4 py-6 sm:p-6",children:(0,b.jsx)("div",{className:"flex w-full flex-col items-start space-y-4",children:f.map(a=>{var c;return(0,b.jsx)("div",{className:"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg border bg-[color:var(--ck-toast-bg)] shadow-[var(--ck-shadow-2)] transition-all duration-200 ease-out border-[color:var(--ck-toast-border)] "+("enter"===(c=a.state)||"leave"===c?"translate-x-[-16px] opacity-0":"translate-x-0 opacity-100"),children:(0,b.jsx)("div",{className:"p-4",children:(0,b.jsxs)("div",{className:"flex items-start",children:[(0,b.jsx)("div",{className:"shrink-0",children:(0,b.jsx)(e,{kind:a.kind})}),(0,b.jsxs)("div",{className:"ml-3 w-0 flex-1",children:[a.title?(0,b.jsx)("p",{className:"text-sm font-medium text-[color:var(--ck-text-primary)]",children:a.title}):null,(0,b.jsx)("p",{className:"whitespace-pre-wrap text-sm text-[color:var(--ck-text-primary)]",children:a.message})]}),(0,b.jsx)("div",{className:"ml-4 flex shrink-0",children:(0,b.jsxs)("button",{type:"button",onClick:()=>i(a.id),className:"inline-flex rounded-md bg-transparent text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]","aria-label":"Dismiss",title:"Dismiss",children:[(0,b.jsx)("span",{className:"sr-only",children:"Close"}),(0,b.jsx)("svg",{viewBox:"0 0 20 20",fill:"currentColor",className:"h-5 w-5",children:(0,b.jsx)("path",{d:"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 10-1.06-1.06L10 8.94 6.28 5.22z"})})]})})]})})},a.id)})})})]})}function g(){let a=(0,c.useContext)(d);if(!a)throw Error("useToast must be used within ToastProvider");return a}a.s(["ToastProvider",()=>f,"useToast",()=>g])},20471,a=>{"use strict";var b=a.i(72131);function c(){return""}function d(a){return()=>{}}function e(){return(0,b.useSyncExternalStore)(d,c,()=>"")}function f(){}a.s(["dispatchSelectedTeamChanged",()=>f,"useSelectedTeamId",()=>e])},15149,a=>{"use strict";var b=a.i(87924),c=a.i(38246),d=a.i(50944),e=a.i(72131),f=a.i(20471),g=e;class h extends g.default.Component{constructor(a){super(a),this.state={hasError:!1,error:null}}static getDerivedStateFromError(a){return{hasError:!0,error:a}}componentDidCatch(a,b){console.error("ErrorBoundary caught:",a,b)}render(){return this.state.hasError&&this.state.error?this.props.fallback?this.props.fallback:(0,b.jsxs)("div",{className:"ck-glass mx-auto max-w-2xl p-6 sm:p-8",children:[(0,b.jsx)("h1",{className:"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:"Something went wrong"}),(0,b.jsx)("p",{className:"mt-2 text-sm text-[color:var(--ck-text-secondary)]",children:"An unexpected error occurred. You can try refreshing the page or go back home."}),(0,b.jsx)("pre",{className:"mt-4 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-3 font-mono text-xs text-[color:var(--ck-text-secondary)]",children:this.state.error.message}),(0,b.jsxs)("div",{className:"mt-6 flex flex-wrap gap-3",children:[(0,b.jsx)("button",{type:"button",onClick:()=>window.location.reload(),className:"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-4 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] hover:bg-[var(--ck-accent-red)]/90",children:"Refresh page"}),(0,b.jsx)(c.default,{href:"/",className:"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-4 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10",children:"Go home"})]})]}):this.props.children}}var i=a.i(51200);function j({className:a,children:c}){return(0,b.jsx)("svg",{className:a,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","aria-hidden":"true",children:c})}function k({className:a}){return(0,b.jsxs)(j,{className:a,children:[(0,b.jsx)("path",{d:"M12 18a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z",stroke:"currentColor",strokeWidth:"1.8"}),(0,b.jsx)("path",{d:"M12 2v2.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M12 19.5V22",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M2 12h2.5",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M19.5 12H22",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M4.2 4.2 6 6",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M18 18l1.8 1.8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M18 6l1.8-1.8",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"}),(0,b.jsx)("path",{d:"M4.2 19.8 6 18",stroke:"currentColor",strokeWidth:"1.8",strokeLinecap:"round"})]})}function l({className:a}){return(0,b.jsx)(j,{className:a,children:(0,b.jsx)("path",{d:"M21 14.2A7.8 7.8 0 0 1 9.8 3a7 7 0 1 0 11.2 11.2Z",stroke:"currentColor",strokeWidth:"1.8",strokeLinejoin:"round"})})}function m(){return"dark"}function n(){let[a,c]=(0,e.useState)(m);(0,e.useEffect)(()=>{document.documentElement.dataset.theme=a,window.localStorage.setItem("ck-theme",a)},[a]);let d="dark"===a?"Switch to light mode":"Switch to dark mode";return(0,b.jsxs)("button",{type:"button",onClick:function(){c(a=>"dark"===a?"light":"dark")},className:"grid h-9 w-9 place-items-center rounded-full border border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:var(--ck-bg-glass-strong)]","aria-label":d,title:d,children:[(0,b.jsx)("span",{className:"sr-only",suppressHydrationWarning:!0,children:d}),"dark"===a?(0,b.jsx)(l,{className:"h-4.5 w-4.5"}):(0,b.jsx)(k,{className:"h-4.5 w-4.5"})]})}var o=a.i(61889);function p({children:a}){return(0,b.jsx)("span",{className:"grid size-7 place-items-center text-[color:var(--ck-text-secondary)]","aria-hidden":!0,children:a})}function q({href:a,label:d,icon:e,active:f,collapsed:g}){return(0,b.jsxs)(c.default,{href:a,title:d,className:(f?"flex items-center rounded-[var(--ck-radius-sm)] bg-white/10 text-sm font-medium text-[color:var(--ck-text-primary)]":"flex items-center rounded-[var(--ck-radius-sm)] text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]")+(g?" justify-center px-0 py-3":" gap-4 px-4 py-3"),children:[e,g?null:(0,b.jsx)("span",{children:d})]})}function r({children:a}){let g=(0,d.usePathname)()||"/",j=(0,d.useRouter)(),k=(0,e.useMemo)(()=>{let a=g.match(/^\/teams\/([^/]+)(?:\/|$)/);return a?decodeURIComponent(a[1]):null},[g]),l=(0,e.useMemo)(()=>g.startsWith("/teams/"),[g]),[m,r]=(0,e.useState)(""),s=(k||m).trim();function t(a){return s&&("/tickets"===a||"/goals"===a||"/cron-jobs"===a||"/runs"===a)?function(a,b){let[c,d]=a.split("?"),e=new URLSearchParams(d??"");return e.set("team",b),`${c}?${e.toString()}`}(a,s):a}function u(a){if(!g.startsWith("/teams/")&&("/tickets"===g||"/goals"===g||"/cron-jobs"===g||"/runs"===g))try{let b=new URL(window.location.href);if(!a){if(!b.searchParams.has("team"))return;b.searchParams.delete("team");let a=b.searchParams.toString();j.replace(b.pathname+(a?`?${a}`:""));return}if((b.searchParams.get("team")??"").trim()===a)return;b.searchParams.set("team",a),j.replace(b.pathname+"?"+b.searchParams.toString())}catch{}}(0,e.useEffect)(()=>{try{r((localStorage.getItem("ck-selected-team")||"").trim())}catch{}},[]),(0,e.useEffect)(()=>{},[g,s]),(0,e.useEffect)(()=>{},[s]);let[v,w]=(0,e.useState)(!1);(0,e.useEffect)(()=>{try{let a=localStorage.getItem("ck-leftnav-collapsed");w("1"===a)}catch{}},[]);let[x,y]=(0,e.useState)([]);(0,e.useEffect)(()=>{(async()=>{try{let a=await (0,i.fetchJson)("/api/agents",{cache:"no-store"}),b=Array.isArray(a.agents)?a.agents:[],c=new Set;for(let a of(c.add("main"),b)){let b=String(a.workspace??"").split("/").filter(Boolean).find(a=>a.startsWith("workspace-"))??"";if(!b)continue;let d=b.slice(10);d&&"workspace"!==d&&c.add(d)}y(Array.from(c).sort())}catch{y([])}})()},[]);let z=[{href:"/",label:"Agents",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M3 11l9-8 9 8"}),(0,b.jsx)("path",{d:"M5 10v10h14V10"})]})})},{href:"/recipes",label:"Recipes",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M6 4h12v16H6z"}),(0,b.jsx)("path",{d:"M9 8h6"}),(0,b.jsx)("path",{d:"M9 12h6"})]})})},{href:t("/tickets"),label:"Tickets",icon:(0,b.jsx)(p,{children:(0,b.jsx)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:(0,b.jsx)("path",{d:"M4 7h16v4a2 2 0 0 1 0 4v4H4v-4a2 2 0 0 0 0-4z"})})})},{href:"/channels",label:"Channels",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M4 6h16"}),(0,b.jsx)("path",{d:"M4 12h16"}),(0,b.jsx)("path",{d:"M4 18h16"}),(0,b.jsx)("path",{d:"M7 9h0"})]})})},{href:t("/goals"),label:"Goals",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,b.jsx)("path",{d:"M12 7v5l3 3"})]})})},{href:t("/cron-jobs"),label:"Cron jobs",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("circle",{cx:"12",cy:"12",r:"9"}),(0,b.jsx)("path",{d:"M12 7v5"})]})})},{href:t("/runs"),label:"Runs",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M4 19h16"}),(0,b.jsx)("path",{d:"M6 16l4-4 3 3 5-7"}),(0,b.jsx)("circle",{cx:"10",cy:"12",r:"1"}),(0,b.jsx)("circle",{cx:"13",cy:"15",r:"1"}),(0,b.jsx)("circle",{cx:"18",cy:"8",r:"1"})]})})},{href:"/settings",label:"Settings",icon:(0,b.jsx)(p,{children:(0,b.jsxs)("svg",{viewBox:"0 0 24 24",className:"h-6 w-6",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[(0,b.jsx)("path",{d:"M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z"}),(0,b.jsx)("path",{d:"M19.4 15a7.9 7.9 0 0 0 .1-1l2-1.5-2-3.5-2.4.5a7.8 7.8 0 0 0-1.7-1L13.5 3h-4L8.6 6.5a7.8 7.8 0 0 0-1.7 1L4.5 7l-2 3.5 2 1.5a7.9 7.9 0 0 0 .1 1l-2 1.5 2 3.5 2.4-.5a7.8 7.8 0 0 0 1.7 1L10.5 21h4l.9-3.5a7.8 7.8 0 0 0 1.7-1l2.4.5 2-3.5-2-1.5Z"})]})})}],A=v?"w-16":"w-72";return(0,b.jsx)(o.ToastProvider,{children:(0,b.jsxs)("div",{className:"flex h-dvh w-dvw overflow-hidden",children:[(0,b.jsxs)("aside",{className:`flex shrink-0 flex-col border-r border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] backdrop-blur-[var(--ck-glass-blur)] ${A}`,children:[(0,b.jsxs)("div",{className:"flex h-14 items-center justify-between gap-2 border-b border-[color:var(--ck-border-subtle)] px-3",children:[(0,b.jsx)(c.default,{href:"/",className:"text-sm font-semibold tracking-tight",title:"Home",children:v?"CK":"Claw Kitchen"}),(0,b.jsx)("button",{onClick:function(){w(a=>{let b=!a;try{localStorage.setItem("ck-leftnav-collapsed",b?"1":"0")}catch{}return b})},className:"rounded-[var(--ck-radius-sm)] px-2 py-1 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]",title:v?"Expand":"Collapse",children:v?"»":"«"})]}),(0,b.jsx)("div",{className:"border-b border-[color:var(--ck-border-subtle)] p-2",children:v?(0,b.jsx)("button",{className:"w-full rounded-[var(--ck-radius-sm)] bg-white/5 px-2 py-2 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/10",title:s?`Team: ${s}`:"Select team",onClick:()=>{let a=x[0]||"";if(a){r(a);try{localStorage.setItem("ck-selected-team",a)}catch{}u(a)}},children:"👥"}):(0,b.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,b.jsx)("div",{className:"px-2 pt-1 text-xs font-semibold uppercase tracking-wide text-[color:var(--ck-text-tertiary)]",children:"Team"}),(0,b.jsxs)("select",{value:s??"",disabled:l,onChange:a=>{let b=(a.target.value||"").trim();r(b);try{b?localStorage.setItem("ck-selected-team",b):localStorage.removeItem("ck-selected-team")}catch{}(0,f.dispatchSelectedTeamChanged)(),u(b)},className:"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]"+(l?" cursor-not-allowed opacity-60":""),children:[(0,b.jsx)("option",{value:"",children:"All teams"}),x.map(a=>(0,b.jsx)("option",{value:a,children:a},a))]}),s?(0,b.jsx)(c.default,{href:`/teams/${encodeURIComponent(s)}`,className:"px-2 pb-1 text-xs font-medium text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-secondary)]",children:"Edit team"}):null]})}),(0,b.jsxs)("nav",{className:"min-h-0 flex-1 overflow-auto p-2",children:[(0,b.jsx)("div",{className:"mt-2 px-2 pb-2 pt-2"}),z.map(a=>{let c;return(0,b.jsx)(q,{href:a.href,label:a.label,icon:(0,b.jsx)("span",{"aria-hidden":!0,children:a.icon}),collapsed:v,active:g===(c=a.href.split("?")[0])||g.startsWith(c+"/")},a.href)})]}),(0,b.jsxs)("div",{className:"flex items-center justify-between gap-2 border-t border-[color:var(--ck-border-subtle)] p-2",children:[(0,b.jsx)("a",{href:"https://github.com/JIGGAI/ClawRecipes/tree/main/docs",target:"_blank",rel:"noreferrer",className:v?"mx-auto rounded-[var(--ck-radius-sm)] px-2 py-2 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]":"rounded-[var(--ck-radius-sm)] px-3 py-2 text-sm font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]",title:"Docs",children:v?"📖":"Docs"}),v?null:(0,b.jsx)(n,{})]})]}),(0,b.jsx)("div",{className:"min-w-0 flex-1",children:(0,b.jsx)("main",{className:"h-full overflow-auto p-4 md:p-6",children:(0,b.jsx)(h,{children:a})})})]})})}a.s(["AppShell",()=>r],15149)}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__471bc2e7._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/hooks-client-context.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/server-inserted-html.ts","../../../../node_modules/next/src/server/route-modules/app-page/module.compiled.js","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/app-router-context.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.ts","../../../../src/lib/fetch-json.ts","../../../../src/components/ToastProvider.tsx","../../../../src/lib/selected-team.ts","../../../../src/components/AppShell.tsx","../../../../src/components/ErrorBoundary.tsx","../../../../src/components/icons.tsx","../../../../src/components/ThemeToggle.tsx"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].HooksClientContext\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].ServerInsertedHtml\n","if (process.env.NEXT_RUNTIME === 'edge') {\n module.exports = require('next/dist/server/route-modules/app-page/module.js')\n} else {\n if (process.env.__NEXT_EXPERIMENTAL_REACT) {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.prod.js')\n }\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.prod.js')\n }\n }\n }\n}\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactJsxRuntime\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.React\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].AppRouterContext\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactServerDOMTurbopackClient\n","/** Fetches multiple URLs in parallel with cache: \"no-store\". */\nexport async function fetchAll(urls: string[]): Promise<Response[]> {\n return Promise.all(urls.map((url) => fetch(url, { cache: \"no-store\" })));\n}\n\n/**\n * Fetches JSON and throws on !res.ok.\n * Use errorMessage(e) in catch blocks.\n */\nexport async function fetchJson<T = unknown>(url: string, opts?: RequestInit): Promise<T> {\n const res = await fetch(url, opts);\n const json = (await res.json()) as { error?: string };\n if (!res.ok) throw new Error(json.error ?? \"Request failed\");\n return json as T;\n}\n\n/**\n * Fetches JSON and returns result with status. Use when you need to handle specific\n * HTTP status codes (e.g. 409) differently from generic errors.\n */\nexport async function fetchJsonWithStatus<T = unknown>(\n url: string,\n opts?: RequestInit\n): Promise<{ ok: true; data: T } | { ok: false; status: number; error: string }> {\n const res = await fetch(url, opts);\n const json = (await res.json()) as { error?: string };\n if (res.ok) return { ok: true, data: json as T };\n return { ok: false, status: res.status, error: json.error ?? \"Request failed\" };\n}\n","\"use client\";\n\nimport { createContext, useCallback, useContext, useMemo, useState } from \"react\";\n\nexport type ToastKind = \"success\" | \"error\" | \"info\";\n\ntype ToastInternal = Toast & { state: \"enter\" | \"show\" | \"leave\" };\nexport type Toast = {\n id: string;\n kind: ToastKind;\n title?: string;\n message: string;\n timeoutMs?: number;\n};\n\ntype ToastContextValue = {\n push: (t: Omit<Toast, \"id\">) => void;\n};\n\nconst ToastContext = createContext<ToastContextValue | null>(null);\n\nfunction randomHex(bytes: number): string {\n const arr = new Uint8Array(bytes);\n crypto.getRandomValues(arr);\n return Array.from(arr, (b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n}\n\nfunction getToastMotionClass(state: \"enter\" | \"show\" | \"leave\"): string {\n if (state === \"enter\") return \"translate-x-[-16px] opacity-0\";\n if (state === \"leave\") return \"translate-x-[-16px] opacity-0\";\n return \"translate-x-0 opacity-100\";\n}\n\nfunction ToastIcon({ kind }: { kind: ToastKind }) {\n if (kind === \"success\") {\n return (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5 text-emerald-400\">\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.707a1 1 0 00-1.414-1.414L9 10.172 7.707 8.879a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n }\n if (kind === \"error\") {\n return (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5 text-red-400\">\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm-1-5a1 1 0 112 0 1 1 0 01-2 0zm0-8a1 1 0 012 0v6a1 1 0 11-2 0V5z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n }\n return (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5 text-slate-300\">\n <path\n fillRule=\"evenodd\"\n d=\"M18 10A8 8 0 11 2 10a8 8 0 0116 0zM9 9a1 1 0 112 0v5a1 1 0 11-2 0V9zm0-3a1 1 0 112 0 1 1 0 01-2 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\nexport function ToastProvider({ children }: { children: React.ReactNode }) {\n const [toasts, setToasts] = useState<ToastInternal[]>([]);\n\n const removeNow = useCallback((id: string) => {\n setToasts((prev) => prev.filter((t) => t.id !== id));\n }, []);\n\n const dismiss = useCallback(\n (id: string) => {\n // Start leave animation, then remove.\n setToasts((prev) => prev.map((t) => (t.id === id ? { ...t, state: \"leave\" } : t)));\n window.setTimeout(() => removeNow(id), 250);\n },\n [removeNow],\n );\n\n const promoteToShow = useCallback((id: string) => {\n setToasts((prev) => prev.map((x) => (x.id === id ? { ...x, state: \"show\" } : x)));\n }, []);\n\n const push = useCallback(\n (t: Omit<Toast, \"id\">) => {\n const id = `${Date.now()}-${randomHex(8)}`;\n const toast: ToastInternal = { id, timeoutMs: 5000, state: \"enter\", ...t };\n setToasts((prev) => [toast, ...prev].slice(0, 4));\n\n window.setTimeout(() => promoteToShow(id), 10);\n\n const ms = toast.timeoutMs;\n if (ms && ms > 0) {\n window.setTimeout(() => dismiss(id), ms);\n }\n },\n [dismiss, promoteToShow],\n );\n\n const value = useMemo(() => ({ push }), [push]);\n\n return (\n <ToastContext.Provider value={value}>\n {children}\n\n {/* Tailwind UI-inspired notifications */}\n <div\n aria-live=\"assertive\"\n className=\"pointer-events-none fixed inset-0 z-[100] flex items-end px-4 py-6 sm:p-6\"\n >\n <div className=\"flex w-full flex-col items-start space-y-4\">\n {toasts.map((t) => (\n <div\n key={t.id}\n className={\n \"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg border bg-[color:var(--ck-toast-bg)] shadow-[var(--ck-shadow-2)] transition-all duration-200 ease-out border-[color:var(--ck-toast-border)] \" +\n getToastMotionClass(t.state)\n }\n >\n <div className=\"p-4\">\n <div className=\"flex items-start\">\n <div className=\"shrink-0\">\n <ToastIcon kind={t.kind} />\n </div>\n <div className=\"ml-3 w-0 flex-1\">\n {t.title ? (\n <p className=\"text-sm font-medium text-[color:var(--ck-text-primary)]\">{t.title}</p>\n ) : null}\n <p className=\"whitespace-pre-wrap text-sm text-[color:var(--ck-text-primary)]\">{t.message}</p>\n </div>\n <div className=\"ml-4 flex shrink-0\">\n <button\n type=\"button\"\n onClick={() => dismiss(t.id)}\n className=\"inline-flex rounded-md bg-transparent text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]\"\n aria-label=\"Dismiss\"\n title=\"Dismiss\"\n >\n <span className=\"sr-only\">Close</span>\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5\">\n <path d=\"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 10-1.06-1.06L10 8.94 6.28 5.22z\" />\n </svg>\n </button>\n </div>\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n </ToastContext.Provider>\n );\n}\n\nexport function useToast() {\n const ctx = useContext(ToastContext);\n if (!ctx) throw new Error(\"useToast must be used within ToastProvider\");\n return ctx;\n}\n","\"use client\";\n\nimport { useSyncExternalStore } from \"react\";\n\nconst EVENT_NAME = \"ck-selected-team-changed\";\n\nfunction readSelectedTeamId(): string {\n if (typeof window === \"undefined\") return \"\";\n try {\n return (localStorage.getItem(\"ck-selected-team\") || \"\").trim();\n } catch {\n return \"\";\n }\n}\n\nfunction subscribe(cb: () => void) {\n if (typeof window === \"undefined\") return () => {};\n\n const handler = () => cb();\n\n // `storage` only fires across documents; we also dispatch a same-tab custom event.\n window.addEventListener(\"storage\", handler);\n window.addEventListener(EVENT_NAME, handler);\n\n return () => {\n window.removeEventListener(\"storage\", handler);\n window.removeEventListener(EVENT_NAME, handler);\n };\n}\n\nexport function useSelectedTeamId(): string {\n return useSyncExternalStore(subscribe, readSelectedTeamId, () => \"\");\n}\n\nexport function dispatchSelectedTeamChanged() {\n if (typeof window === \"undefined\") return;\n try {\n window.dispatchEvent(new Event(EVENT_NAME));\n } catch {\n // ignore\n }\n}\n","\"use client\";\n\nimport Link from \"next/link\";\nimport { usePathname, useRouter } from \"next/navigation\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { dispatchSelectedTeamChanged } from \"@/lib/selected-team\";\nimport { ErrorBoundary } from \"@/components/ErrorBoundary\";\nimport { fetchJson } from \"@/lib/fetch-json\";\nimport { ThemeToggle } from \"@/components/ThemeToggle\";\nimport { ToastProvider } from \"@/components/ToastProvider\";\n\nfunction Icon({ children }: { children: React.ReactNode }) {\n return (\n <span\n className=\"grid size-7 place-items-center text-[color:var(--ck-text-secondary)]\"\n aria-hidden\n >\n {children}\n </span>\n );\n}\n\nfunction SideNavLink({\n href,\n label,\n icon,\n active,\n collapsed,\n}: {\n href: string;\n label: string;\n icon: React.ReactNode;\n active: boolean;\n collapsed: boolean;\n}) {\n return (\n <Link\n href={href}\n title={label}\n className={\n (\n active\n ? \"flex items-center rounded-[var(--ck-radius-sm)] bg-white/10 text-sm font-medium text-[color:var(--ck-text-primary)]\"\n : \"flex items-center rounded-[var(--ck-radius-sm)] text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n ) +\n (collapsed ? \" justify-center px-0 py-3\" : \" gap-4 px-4 py-3\")\n }\n >\n {icon}\n {collapsed ? null : <span>{label}</span>}\n </Link>\n );\n}\n\nexport function AppShell({ children }: { children: React.ReactNode }) {\n const pathname = usePathname() || \"/\";\n const router = useRouter();\n const teamIdFromPath = useMemo(() => {\n const m = pathname.match(/^\\/teams\\/([^/]+)(?:\\/|$)/);\n return m ? decodeURIComponent(m[1]) : null;\n }, [pathname]);\n\n const isTeamEditorRoute = useMemo(() => pathname.startsWith(\"/teams/\"), [pathname]);\n\n const [storedTeamId, setStoredTeamId] = useState<string>(\"\");\n\n const selectedTeamId = (teamIdFromPath || storedTeamId).trim();\n\n function withTeamQuery(href: string, teamId: string): string {\n const [pathPart, qs] = href.split(\"?\");\n const sp = new URLSearchParams(qs ?? \"\");\n sp.set(\"team\", teamId);\n return `${pathPart}?${sp.toString()}`;\n }\n\n function navHref(href: string): string {\n if (!selectedTeamId) return href;\n // Only carry team context for pages that currently support it.\n if (href === \"/tickets\" || href === \"/goals\" || href === \"/cron-jobs\" || href === \"/runs\") {\n return withTeamQuery(href, selectedTeamId);\n }\n return href;\n }\n\n function syncTeamToCurrentUrl(teamId: string) {\n // Team editor routes already encode team in the path.\n if (pathname.startsWith(\"/teams/\")) return;\n // Only enforce on pages that support it.\n if (pathname !== \"/tickets\" && pathname !== \"/goals\" && pathname !== \"/cron-jobs\" && pathname !== \"/runs\") return;\n\n try {\n const url = new URL(window.location.href);\n\n if (!teamId) {\n if (!url.searchParams.has(\"team\")) return;\n url.searchParams.delete(\"team\");\n const qs = url.searchParams.toString();\n router.replace(url.pathname + (qs ? `?${qs}` : \"\"));\n return;\n }\n\n if ((url.searchParams.get(\"team\") ?? \"\").trim() === teamId) return;\n url.searchParams.set(\"team\", teamId);\n router.replace(url.pathname + \"?\" + url.searchParams.toString());\n } catch {\n // ignore\n }\n }\n\n // Load persisted selected team after hydration to avoid SSR/client mismatch.\n useEffect(() => {\n try {\n setStoredTeamId((localStorage.getItem(\"ck-selected-team\") || \"\").trim());\n } catch {\n // ignore\n }\n }, []);\n\n // Keep URL in sync with the selected team on pages that support team filtering.\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n syncTeamToCurrentUrl(selectedTeamId);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- sync uses window.location\n }, [pathname, selectedTeamId]);\n\n // Keep localStorage in sync with the effective selected team (when we can compute it).\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n try {\n if (selectedTeamId) localStorage.setItem(\"ck-selected-team\", selectedTeamId);\n else localStorage.removeItem(\"ck-selected-team\");\n } catch {\n // ignore\n }\n }, [selectedTeamId]);\n\n const [collapsed, setCollapsed] = useState(false);\n\n // Avoid hydration mismatch: render un-collapsed on the server, then sync from localStorage after mount.\n useEffect(() => {\n try {\n const v = localStorage.getItem(\"ck-leftnav-collapsed\");\n \n setCollapsed(v === \"1\");\n } catch {\n // ignore\n }\n }, []);\n\n\n\n function toggleCollapsed() {\n setCollapsed((v) => {\n const next = !v;\n try {\n localStorage.setItem(\"ck-leftnav-collapsed\", next ? \"1\" : \"0\");\n } catch {\n // ignore\n }\n return next;\n });\n }\n\n // Minimal team list (for switcher). We rely on existing /api/recipes.\n const [teamIds, setTeamIds] = useState<string[]>([]);\n useEffect(() => {\n (async () => {\n try {\n const json = await fetchJson<{ agents?: Array<{ workspace?: string }> }>(\"/api/agents\", { cache: \"no-store\" });\n const agents = Array.isArray(json.agents)\n ? (json.agents as Array<{ workspace?: string }> )\n : [];\n\n const s = new Set<string>();\n for (const a of agents) {\n const ws = String(a.workspace ?? \"\");\n const parts = ws.split(\"/\").filter(Boolean);\n const wsPart = parts.find((p) => p.startsWith(\"workspace-\")) ?? \"\";\n if (!wsPart) continue;\n const teamId = wsPart.slice(\"workspace-\".length);\n if (teamId && teamId !== \"workspace\") s.add(teamId);\n }\n\n setTeamIds(Array.from(s).sort());\n } catch {\n setTeamIds([]);\n }\n })();\n }, []);\n\n const globalNav = [\n {\n href: `/`,\n label: \"Agents\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M3 11l9-8 9 8\" />\n <path d=\"M5 10v10h14V10\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: `/recipes`,\n label: \"Recipes\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M6 4h12v16H6z\" />\n <path d=\"M9 8h6\" />\n <path d=\"M9 12h6\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/tickets`),\n label: \"Tickets\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M4 7h16v4a2 2 0 0 1 0 4v4H4v-4a2 2 0 0 0 0-4z\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: `/channels`,\n label: \"Channels\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M4 6h16\" />\n <path d=\"M4 12h16\" />\n <path d=\"M4 18h16\" />\n <path d=\"M7 9h0\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/goals`),\n label: \"Goals\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v5l3 3\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/cron-jobs`),\n label: \"Cron jobs\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v5\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/runs`),\n label: \"Runs\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M4 19h16\" />\n <path d=\"M6 16l4-4 3 3 5-7\" />\n <circle cx=\"10\" cy=\"12\" r=\"1\" />\n <circle cx=\"13\" cy=\"15\" r=\"1\" />\n <circle cx=\"18\" cy=\"8\" r=\"1\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: `/settings`,\n label: \"Settings\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z\" />\n <path d=\"M19.4 15a7.9 7.9 0 0 0 .1-1l2-1.5-2-3.5-2.4.5a7.8 7.8 0 0 0-1.7-1L13.5 3h-4L8.6 6.5a7.8 7.8 0 0 0-1.7 1L4.5 7l-2 3.5 2 1.5a7.9 7.9 0 0 0 .1 1l-2 1.5 2 3.5 2.4-.5a7.8 7.8 0 0 0 1.7 1L10.5 21h4l.9-3.5a7.8 7.8 0 0 0 1.7-1l2.4.5 2-3.5-2-1.5Z\" />\n </svg>\n </Icon>\n ),\n },\n ];\n\n const sideWidth = collapsed ? \"w-16\" : \"w-72\";\n\n return (\n <ToastProvider>\n <div className=\"flex h-dvh w-dvw overflow-hidden\">\n <aside className={`flex shrink-0 flex-col border-r border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] backdrop-blur-[var(--ck-glass-blur)] ${sideWidth}`}>\n <div className=\"flex h-14 items-center justify-between gap-2 border-b border-[color:var(--ck-border-subtle)] px-3\">\n <Link href=\"/\" className=\"text-sm font-semibold tracking-tight\" title=\"Home\">\n {collapsed ? \"CK\" : \"Claw Kitchen\"}\n </Link>\n <button\n onClick={toggleCollapsed}\n className=\"rounded-[var(--ck-radius-sm)] px-2 py-1 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n title={collapsed ? \"Expand\" : \"Collapse\"}\n >\n {collapsed ? \"»\" : \"«\"}\n </button>\n </div>\n\n <div className=\"border-b border-[color:var(--ck-border-subtle)] p-2\">\n {collapsed ? (\n <button\n className=\"w-full rounded-[var(--ck-radius-sm)] bg-white/5 px-2 py-2 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/10\"\n title={selectedTeamId ? `Team: ${selectedTeamId}` : \"Select team\"}\n onClick={() => {\n const id = teamIds[0] || \"\";\n if (!id) return;\n setStoredTeamId(id);\n try {\n localStorage.setItem(\"ck-selected-team\", id);\n } catch {\n // ignore\n }\n\n syncTeamToCurrentUrl(id);\n }}\n >\n 👥\n </button>\n ) : (\n <div className=\"flex flex-col gap-1\">\n <div className=\"px-2 pt-1 text-xs font-semibold uppercase tracking-wide text-[color:var(--ck-text-tertiary)]\">\n Team\n </div>\n <select\n value={selectedTeamId ?? \"\"}\n disabled={isTeamEditorRoute}\n onChange={(e) => {\n const id = (e.target.value || \"\").trim();\n setStoredTeamId(id);\n try {\n if (id) localStorage.setItem(\"ck-selected-team\", id);\n else localStorage.removeItem(\"ck-selected-team\");\n } catch {\n // ignore\n }\n\n dispatchSelectedTeamChanged();\n syncTeamToCurrentUrl(id);\n }}\n className={\n \"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]\" +\n (isTeamEditorRoute ? \" cursor-not-allowed opacity-60\" : \"\")\n }\n >\n <option value=\"\">All teams</option>\n {teamIds.map((id) => (\n <option key={id} value={id}>\n {id}\n </option>\n ))}\n </select>\n\n {selectedTeamId ? (\n <Link\n href={`/teams/${encodeURIComponent(selectedTeamId)}`}\n className=\"px-2 pb-1 text-xs font-medium text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-secondary)]\"\n >\n Edit team\n </Link>\n ) : null}\n </div>\n )}\n </div>\n\n <nav className=\"min-h-0 flex-1 overflow-auto p-2\">\n <div className=\"mt-2 px-2 pb-2 pt-2\">\n {/* section label intentionally omitted */}\n </div>\n {globalNav.map((it) => (\n <SideNavLink\n key={it.href}\n href={it.href}\n label={it.label}\n icon={<span aria-hidden>{it.icon}</span>}\n collapsed={collapsed}\n active={(() => {\n const hrefPath = it.href.split(\"?\")[0];\n return pathname === hrefPath || pathname.startsWith(hrefPath + \"/\");\n })()}\n />\n ))}\n </nav>\n\n <div className=\"flex items-center justify-between gap-2 border-t border-[color:var(--ck-border-subtle)] p-2\">\n <a\n href=\"https://github.com/JIGGAI/ClawRecipes/tree/main/docs\"\n target=\"_blank\"\n rel=\"noreferrer\"\n className={\n collapsed\n ? \"mx-auto rounded-[var(--ck-radius-sm)] px-2 py-2 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n : \"rounded-[var(--ck-radius-sm)] px-3 py-2 text-sm font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n }\n title=\"Docs\"\n >\n {collapsed ? \"📖\" : \"Docs\"}\n </a>\n {collapsed ? null : <ThemeToggle />}\n </div>\n </aside>\n\n <div className=\"min-w-0 flex-1\">\n <main className=\"h-full overflow-auto p-4 md:p-6\">\n <ErrorBoundary>{children}</ErrorBoundary>\n </main>\n </div>\n </div>\n </ToastProvider>\n );\n}","\"use client\";\n\nimport React from \"react\";\nimport Link from \"next/link\";\n\ntype Props = {\n children: React.ReactNode;\n fallback?: React.ReactNode;\n};\n\ntype State = {\n hasError: boolean;\n error: Error | null;\n};\n\n/**\n * React Error Boundary for graceful crash handling.\n * Catches runtime errors in child components and shows a fallback UI.\n */\nexport class ErrorBoundary extends React.Component<Props, State> {\n constructor(props: Props) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error): State {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n console.error(\"ErrorBoundary caught:\", error, errorInfo);\n }\n\n render() {\n if (this.state.hasError && this.state.error) {\n if (this.props.fallback) {\n return this.props.fallback;\n }\n return (\n <div className=\"ck-glass mx-auto max-w-2xl p-6 sm:p-8\">\n <h1 className=\"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]\">\n Something went wrong\n </h1>\n <p className=\"mt-2 text-sm text-[color:var(--ck-text-secondary)]\">\n An unexpected error occurred. You can try refreshing the page or go back home.\n </p>\n <pre className=\"mt-4 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-3 font-mono text-xs text-[color:var(--ck-text-secondary)]\">\n {this.state.error.message}\n </pre>\n <div className=\"mt-6 flex flex-wrap gap-3\">\n <button\n type=\"button\"\n onClick={() => window.location.reload()}\n className=\"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-4 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] hover:bg-[var(--ck-accent-red)]/90\"\n >\n Refresh page\n </button>\n <Link\n href=\"/\"\n className=\"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-4 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10\"\n >\n Go home\n </Link>\n </div>\n </div>\n );\n }\n return this.props.children;\n }\n}\n","\"use client\";\n\nfunction IconSvg({ className, children }: { className?: string; children: React.ReactNode }) {\n return (\n <svg\n className={className}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n {children}\n </svg>\n );\n}\n\nexport function SunIcon({ className }: { className?: string }) {\n return (\n <IconSvg className={className}>\n <path\n d=\"M12 18a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n />\n <path d=\"M12 2v2.5\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M12 19.5V22\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M2 12h2.5\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M19.5 12H22\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M4.2 4.2 6 6\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M18 18l1.8 1.8\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M18 6l1.8-1.8\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M4.2 19.8 6 18\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n </IconSvg>\n );\n}\n\nexport function MoonIcon({ className }: { className?: string }) {\n return (\n <IconSvg className={className}>\n <path\n d=\"M21 14.2A7.8 7.8 0 0 1 9.8 3a7 7 0 1 0 11.2 11.2Z\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinejoin=\"round\"\n />\n </IconSvg>\n );\n}\n","\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { MoonIcon, SunIcon } from \"@/components/icons\";\n\nexport type Theme = \"light\" | \"dark\";\n\nconst STORAGE_KEY = \"ck-theme\";\n\nfunction readInitialTheme(): Theme {\n // Default: dark mode.\n if (typeof window === \"undefined\") return \"dark\";\n const saved = window.localStorage.getItem(STORAGE_KEY);\n return saved === \"light\" ? \"light\" : \"dark\";\n}\n\nfunction applyTheme(theme: Theme) {\n document.documentElement.dataset.theme = theme;\n}\n\nexport function ThemeToggle() {\n const [theme, setTheme] = useState<Theme>(readInitialTheme);\n\n useEffect(() => {\n applyTheme(theme);\n window.localStorage.setItem(STORAGE_KEY, theme);\n }, [theme]);\n\n function toggle() {\n setTheme((t) => (t === \"dark\" ? \"light\" : \"dark\"));\n }\n\n const label = theme === \"dark\" ? \"Switch to light mode\" : \"Switch to dark mode\";\n\n return (\n <button\n type=\"button\"\n onClick={toggle}\n className=\"grid h-9 w-9 place-items-center rounded-full border border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:var(--ck-bg-glass-strong)]\"\n aria-label={label}\n title={label}\n >\n <span className=\"sr-only\" suppressHydrationWarning>\n {label}\n </span>\n {theme === \"dark\" ? (\n <MoonIcon className=\"h-4.5 w-4.5\" />\n ) : (\n <SunIcon className=\"h-4.5 w-4.5\" />\n )}\n </button>\n );\n}\n"],"names":["module","exports","require","vendored","HooksClientContext","ServerInsertedHtml","process","env","NEXT_RUNTIME","__NEXT_EXPERIMENTAL_REACT","NODE_ENV","TURBOPACK","ReactJsxRuntime","React","AppRouterContext","ReactServerDOMTurbopackClient"],"mappings":"4CAAAA,GAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,QAAW,CAACC,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,CAAA,CACH,KAAM,CAAC,OAAO,EAAE,mBAAmB,GAAA,CAAiB,CACpD,UAAU,0HACX,cAGC,UAKV,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,6CACb,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,wBAGd,EAAU,GAAG,CAAC,AAAC,IAQV,IAAM,QAPV,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAEC,KAAM,EAAG,IAAI,CACb,MAAO,EAAG,KAAK,CACf,KAAM,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,aAAW,CAAA,CAAA,WAAE,EAAG,IAAI,GAChC,UAAW,EACX,MAAA,CAES,CAFD,CAAC,KACU,EAAG,IAAI,AACJ,CADK,KAAK,CAAC,IAAI,CAAC,EAAE,GACN,EAAS,UAAU,CAAC,EAAW,MAP5D,EAAG,IAAI,OAalB,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,wGACb,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CACC,KAAK,uDACL,OAAO,SACP,IAAI,aACJ,UACE,EACI,2JACA,+JAEN,MAAM,gBAEL,EAAY,KAAO,SAErB,EAAY,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAA,SAIzB,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,0BACb,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,2CACd,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,UAAe,YAM5B","ignoreList":[0,1,2,3,4,5,6]}
|
|
1
|
+
{"version":3,"sources":["../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/hooks-client-context.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/server-inserted-html.ts","../../../../node_modules/next/src/server/route-modules/app-page/module.compiled.js","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-jsx-runtime.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/contexts/app-router-context.ts","../../../../node_modules/next/src/server/route-modules/app-page/vendored/ssr/react-server-dom-turbopack-client.ts","../../../../src/lib/fetch-json.ts","../../../../src/components/ToastProvider.tsx","../../../../src/lib/selected-team.ts","../../../../src/components/AppShell.tsx","../../../../src/components/ErrorBoundary.tsx","../../../../src/components/icons.tsx","../../../../src/components/ThemeToggle.tsx"],"sourcesContent":["module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].HooksClientContext\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].ServerInsertedHtml\n","if (process.env.NEXT_RUNTIME === 'edge') {\n module.exports = require('next/dist/server/route-modules/app-page/module.js')\n} else {\n if (process.env.__NEXT_EXPERIMENTAL_REACT) {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page-experimental.runtime.prod.js')\n }\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.dev.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.dev.js')\n }\n } else {\n if (process.env.TURBOPACK) {\n module.exports = require('next/dist/compiled/next-server/app-page-turbo.runtime.prod.js')\n } else {\n module.exports = require('next/dist/compiled/next-server/app-page.runtime.prod.js')\n }\n }\n }\n}\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactJsxRuntime\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.React\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['contexts'].AppRouterContext\n","module.exports = (\n require('../../module.compiled') as typeof import('../../module.compiled')\n).vendored['react-ssr']!.ReactServerDOMTurbopackClient\n","/** Fetches multiple URLs in parallel with cache: \"no-store\". */\nexport async function fetchAll(urls: string[]): Promise<Response[]> {\n return Promise.all(urls.map((url) => fetch(url, { cache: \"no-store\" })));\n}\n\n/**\n * Fetches JSON and throws on !res.ok.\n * Use errorMessage(e) in catch blocks.\n */\nexport async function fetchJson<T = unknown>(url: string, opts?: RequestInit): Promise<T> {\n const res = await fetch(url, opts);\n const json = (await res.json()) as { error?: string };\n if (!res.ok) throw new Error(json.error ?? \"Request failed\");\n return json as T;\n}\n\n/**\n * Fetches JSON and returns result with status. Use when you need to handle specific\n * HTTP status codes (e.g. 409) differently from generic errors.\n */\nexport async function fetchJsonWithStatus<T = unknown>(\n url: string,\n opts?: RequestInit\n): Promise<{ ok: true; data: T } | { ok: false; status: number; error: string }> {\n const res = await fetch(url, opts);\n const json = (await res.json()) as { error?: string };\n if (res.ok) return { ok: true, data: json as T };\n return { ok: false, status: res.status, error: json.error ?? \"Request failed\" };\n}\n","\"use client\";\n\nimport { createContext, useCallback, useContext, useMemo, useState } from \"react\";\n\nexport type ToastKind = \"success\" | \"error\" | \"info\";\n\ntype ToastInternal = Toast & { state: \"enter\" | \"show\" | \"leave\" };\nexport type Toast = {\n id: string;\n kind: ToastKind;\n title?: string;\n message: string;\n timeoutMs?: number;\n};\n\ntype ToastContextValue = {\n push: (t: Omit<Toast, \"id\">) => void;\n};\n\nconst ToastContext = createContext<ToastContextValue | null>(null);\n\nfunction randomHex(bytes: number): string {\n const arr = new Uint8Array(bytes);\n crypto.getRandomValues(arr);\n return Array.from(arr, (b) => b.toString(16).padStart(2, \"0\")).join(\"\");\n}\n\nfunction getToastMotionClass(state: \"enter\" | \"show\" | \"leave\"): string {\n if (state === \"enter\") return \"translate-x-[-16px] opacity-0\";\n if (state === \"leave\") return \"translate-x-[-16px] opacity-0\";\n return \"translate-x-0 opacity-100\";\n}\n\nfunction ToastIcon({ kind }: { kind: ToastKind }) {\n if (kind === \"success\") {\n return (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5 text-emerald-400\">\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.707a1 1 0 00-1.414-1.414L9 10.172 7.707 8.879a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n }\n if (kind === \"error\") {\n return (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5 text-red-400\">\n <path\n fillRule=\"evenodd\"\n d=\"M10 18a8 8 0 100-16 8 8 0 000 16zm-1-5a1 1 0 112 0 1 1 0 01-2 0zm0-8a1 1 0 012 0v6a1 1 0 11-2 0V5z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n }\n return (\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5 text-slate-300\">\n <path\n fillRule=\"evenodd\"\n d=\"M18 10A8 8 0 11 2 10a8 8 0 0116 0zM9 9a1 1 0 112 0v5a1 1 0 11-2 0V9zm0-3a1 1 0 112 0 1 1 0 01-2 0z\"\n clipRule=\"evenodd\"\n />\n </svg>\n );\n}\n\nexport function ToastProvider({ children }: { children: React.ReactNode }) {\n const [toasts, setToasts] = useState<ToastInternal[]>([]);\n\n const removeNow = useCallback((id: string) => {\n setToasts((prev) => prev.filter((t) => t.id !== id));\n }, []);\n\n const dismiss = useCallback(\n (id: string) => {\n // Start leave animation, then remove.\n setToasts((prev) => prev.map((t) => (t.id === id ? { ...t, state: \"leave\" } : t)));\n window.setTimeout(() => removeNow(id), 250);\n },\n [removeNow],\n );\n\n const promoteToShow = useCallback((id: string) => {\n setToasts((prev) => prev.map((x) => (x.id === id ? { ...x, state: \"show\" } : x)));\n }, []);\n\n const push = useCallback(\n (t: Omit<Toast, \"id\">) => {\n const id = `${Date.now()}-${randomHex(8)}`;\n const toast: ToastInternal = { id, timeoutMs: 5000, state: \"enter\", ...t };\n setToasts((prev) => [toast, ...prev].slice(0, 4));\n\n window.setTimeout(() => promoteToShow(id), 10);\n\n const ms = toast.timeoutMs;\n if (ms && ms > 0) {\n window.setTimeout(() => dismiss(id), ms);\n }\n },\n [dismiss, promoteToShow],\n );\n\n const value = useMemo(() => ({ push }), [push]);\n\n return (\n <ToastContext.Provider value={value}>\n {children}\n\n {/* Tailwind UI-inspired notifications */}\n <div\n aria-live=\"assertive\"\n className=\"pointer-events-none fixed inset-0 z-[100] flex items-end px-4 py-6 sm:p-6\"\n >\n <div className=\"flex w-full flex-col items-start space-y-4\">\n {toasts.map((t) => (\n <div\n key={t.id}\n className={\n \"pointer-events-auto w-full max-w-sm overflow-hidden rounded-lg border bg-[color:var(--ck-toast-bg)] shadow-[var(--ck-shadow-2)] transition-all duration-200 ease-out border-[color:var(--ck-toast-border)] \" +\n getToastMotionClass(t.state)\n }\n >\n <div className=\"p-4\">\n <div className=\"flex items-start\">\n <div className=\"shrink-0\">\n <ToastIcon kind={t.kind} />\n </div>\n <div className=\"ml-3 w-0 flex-1\">\n {t.title ? (\n <p className=\"text-sm font-medium text-[color:var(--ck-text-primary)]\">{t.title}</p>\n ) : null}\n <p className=\"whitespace-pre-wrap text-sm text-[color:var(--ck-text-primary)]\">{t.message}</p>\n </div>\n <div className=\"ml-4 flex shrink-0\">\n <button\n type=\"button\"\n onClick={() => dismiss(t.id)}\n className=\"inline-flex rounded-md bg-transparent text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-primary)]\"\n aria-label=\"Dismiss\"\n title=\"Dismiss\"\n >\n <span className=\"sr-only\">Close</span>\n <svg viewBox=\"0 0 20 20\" fill=\"currentColor\" className=\"h-5 w-5\">\n <path d=\"M6.28 5.22a.75.75 0 00-1.06 1.06L8.94 10l-3.72 3.72a.75.75 0 101.06 1.06L10 11.06l3.72 3.72a.75.75 0 101.06-1.06L11.06 10l3.72-3.72a.75.75 0 10-1.06-1.06L10 8.94 6.28 5.22z\" />\n </svg>\n </button>\n </div>\n </div>\n </div>\n </div>\n ))}\n </div>\n </div>\n </ToastContext.Provider>\n );\n}\n\nexport function useToast() {\n const ctx = useContext(ToastContext);\n if (!ctx) throw new Error(\"useToast must be used within ToastProvider\");\n return ctx;\n}\n","\"use client\";\n\nimport { useSyncExternalStore } from \"react\";\n\nconst EVENT_NAME = \"ck-selected-team-changed\";\n\nfunction readSelectedTeamId(): string {\n if (typeof window === \"undefined\") return \"\";\n try {\n return (localStorage.getItem(\"ck-selected-team\") || \"\").trim();\n } catch {\n return \"\";\n }\n}\n\nfunction subscribe(cb: () => void) {\n if (typeof window === \"undefined\") return () => {};\n\n const handler = () => cb();\n\n // `storage` only fires across documents; we also dispatch a same-tab custom event.\n window.addEventListener(\"storage\", handler);\n window.addEventListener(EVENT_NAME, handler);\n\n return () => {\n window.removeEventListener(\"storage\", handler);\n window.removeEventListener(EVENT_NAME, handler);\n };\n}\n\nexport function useSelectedTeamId(): string {\n return useSyncExternalStore(subscribe, readSelectedTeamId, () => \"\");\n}\n\nexport function dispatchSelectedTeamChanged() {\n if (typeof window === \"undefined\") return;\n try {\n window.dispatchEvent(new Event(EVENT_NAME));\n } catch {\n // ignore\n }\n}\n","\"use client\";\n\nimport Link from \"next/link\";\nimport { usePathname, useRouter } from \"next/navigation\";\nimport { useEffect, useMemo, useState } from \"react\";\nimport { dispatchSelectedTeamChanged } from \"@/lib/selected-team\";\nimport { ErrorBoundary } from \"@/components/ErrorBoundary\";\nimport { fetchJson } from \"@/lib/fetch-json\";\nimport { ThemeToggle } from \"@/components/ThemeToggle\";\nimport { ToastProvider } from \"@/components/ToastProvider\";\n\nfunction Icon({ children }: { children: React.ReactNode }) {\n return (\n <span\n className=\"grid size-7 place-items-center text-[color:var(--ck-text-secondary)]\"\n aria-hidden\n >\n {children}\n </span>\n );\n}\n\nfunction SideNavLink({\n href,\n label,\n icon,\n active,\n collapsed,\n}: {\n href: string;\n label: string;\n icon: React.ReactNode;\n active: boolean;\n collapsed: boolean;\n}) {\n return (\n <Link\n href={href}\n title={label}\n className={\n (\n active\n ? \"flex items-center rounded-[var(--ck-radius-sm)] bg-white/10 text-sm font-medium text-[color:var(--ck-text-primary)]\"\n : \"flex items-center rounded-[var(--ck-radius-sm)] text-sm font-medium text-[color:var(--ck-text-secondary)] transition-colors hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n ) +\n (collapsed ? \" justify-center px-0 py-3\" : \" gap-4 px-4 py-3\")\n }\n >\n {icon}\n {collapsed ? null : <span>{label}</span>}\n </Link>\n );\n}\n\nexport function AppShell({ children }: { children: React.ReactNode }) {\n const pathname = usePathname() || \"/\";\n const router = useRouter();\n const teamIdFromPath = useMemo(() => {\n const m = pathname.match(/^\\/teams\\/([^/]+)(?:\\/|$)/);\n return m ? decodeURIComponent(m[1]) : null;\n }, [pathname]);\n\n const isTeamEditorRoute = useMemo(() => pathname.startsWith(\"/teams/\"), [pathname]);\n\n const [storedTeamId, setStoredTeamId] = useState<string>(\"\");\n\n const selectedTeamId = (teamIdFromPath || storedTeamId).trim();\n\n function withTeamQuery(href: string, teamId: string): string {\n const [pathPart, qs] = href.split(\"?\");\n const sp = new URLSearchParams(qs ?? \"\");\n sp.set(\"team\", teamId);\n return `${pathPart}?${sp.toString()}`;\n }\n\n function navHref(href: string): string {\n if (!selectedTeamId) return href;\n // Only carry team context for pages that currently support it.\n if (href === \"/tickets\" || href === \"/goals\" || href === \"/cron-jobs\" || href === \"/runs\") {\n return withTeamQuery(href, selectedTeamId);\n }\n return href;\n }\n\n function syncTeamToCurrentUrl(teamId: string) {\n // Team editor routes already encode team in the path.\n if (pathname.startsWith(\"/teams/\")) return;\n // Only enforce on pages that support it.\n if (pathname !== \"/tickets\" && pathname !== \"/goals\" && pathname !== \"/cron-jobs\" && pathname !== \"/runs\") return;\n\n try {\n const url = new URL(window.location.href);\n\n if (!teamId) {\n if (!url.searchParams.has(\"team\")) return;\n url.searchParams.delete(\"team\");\n const qs = url.searchParams.toString();\n router.replace(url.pathname + (qs ? `?${qs}` : \"\"));\n return;\n }\n\n if ((url.searchParams.get(\"team\") ?? \"\").trim() === teamId) return;\n url.searchParams.set(\"team\", teamId);\n router.replace(url.pathname + \"?\" + url.searchParams.toString());\n } catch {\n // ignore\n }\n }\n\n // Load persisted selected team after hydration to avoid SSR/client mismatch.\n useEffect(() => {\n try {\n setStoredTeamId((localStorage.getItem(\"ck-selected-team\") || \"\").trim());\n } catch {\n // ignore\n }\n }, []);\n\n // Keep URL in sync with the selected team on pages that support team filtering.\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n syncTeamToCurrentUrl(selectedTeamId);\n // eslint-disable-next-line react-hooks/exhaustive-deps -- sync uses window.location\n }, [pathname, selectedTeamId]);\n\n // Keep localStorage in sync with the effective selected team (when we can compute it).\n useEffect(() => {\n if (typeof window === \"undefined\") return;\n try {\n if (selectedTeamId) localStorage.setItem(\"ck-selected-team\", selectedTeamId);\n else localStorage.removeItem(\"ck-selected-team\");\n } catch {\n // ignore\n }\n }, [selectedTeamId]);\n\n const [collapsed, setCollapsed] = useState(false);\n\n // Avoid hydration mismatch: render un-collapsed on the server, then sync from localStorage after mount.\n useEffect(() => {\n try {\n const v = localStorage.getItem(\"ck-leftnav-collapsed\");\n \n setCollapsed(v === \"1\");\n } catch {\n // ignore\n }\n }, []);\n\n\n\n function toggleCollapsed() {\n setCollapsed((v) => {\n const next = !v;\n try {\n localStorage.setItem(\"ck-leftnav-collapsed\", next ? \"1\" : \"0\");\n } catch {\n // ignore\n }\n return next;\n });\n }\n\n // Minimal team list (for switcher). We rely on existing /api/recipes.\n const [teamIds, setTeamIds] = useState<string[]>([]);\n useEffect(() => {\n (async () => {\n try {\n const json = await fetchJson<{ agents?: Array<{ workspace?: string }> }>(\"/api/agents\", { cache: \"no-store\" });\n const agents = Array.isArray(json.agents)\n ? (json.agents as Array<{ workspace?: string }> )\n : [];\n\n const s = new Set<string>();\n\n // Always include the personal \"main\" scope so users can filter goals/tickets\n // for the personal OpenClaw workspace (agents.defaults.workspace).\n s.add(\"main\");\n\n for (const a of agents) {\n const ws = String(a.workspace ?? \"\");\n const parts = ws.split(\"/\").filter(Boolean);\n const wsPart = parts.find((p) => p.startsWith(\"workspace-\")) ?? \"\";\n if (!wsPart) continue;\n const teamId = wsPart.slice(\"workspace-\".length);\n if (teamId && teamId !== \"workspace\") s.add(teamId);\n }\n\n setTeamIds(Array.from(s).sort());\n } catch {\n setTeamIds([]);\n }\n })();\n }, []);\n\n const globalNav = [\n {\n href: `/`,\n label: \"Agents\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M3 11l9-8 9 8\" />\n <path d=\"M5 10v10h14V10\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: `/recipes`,\n label: \"Recipes\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M6 4h12v16H6z\" />\n <path d=\"M9 8h6\" />\n <path d=\"M9 12h6\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/tickets`),\n label: \"Tickets\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M4 7h16v4a2 2 0 0 1 0 4v4H4v-4a2 2 0 0 0 0-4z\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: `/channels`,\n label: \"Channels\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M4 6h16\" />\n <path d=\"M4 12h16\" />\n <path d=\"M4 18h16\" />\n <path d=\"M7 9h0\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/goals`),\n label: \"Goals\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v5l3 3\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/cron-jobs`),\n label: \"Cron jobs\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <circle cx=\"12\" cy=\"12\" r=\"9\" />\n <path d=\"M12 7v5\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: navHref(`/runs`),\n label: \"Runs\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M4 19h16\" />\n <path d=\"M6 16l4-4 3 3 5-7\" />\n <circle cx=\"10\" cy=\"12\" r=\"1\" />\n <circle cx=\"13\" cy=\"15\" r=\"1\" />\n <circle cx=\"18\" cy=\"8\" r=\"1\" />\n </svg>\n </Icon>\n ),\n },\n {\n href: `/settings`,\n label: \"Settings\",\n icon: (\n <Icon>\n <svg viewBox=\"0 0 24 24\" className=\"h-6 w-6\" fill=\"none\" stroke=\"currentColor\" strokeWidth=\"2\">\n <path d=\"M12 15.5a3.5 3.5 0 1 0 0-7 3.5 3.5 0 0 0 0 7Z\" />\n <path d=\"M19.4 15a7.9 7.9 0 0 0 .1-1l2-1.5-2-3.5-2.4.5a7.8 7.8 0 0 0-1.7-1L13.5 3h-4L8.6 6.5a7.8 7.8 0 0 0-1.7 1L4.5 7l-2 3.5 2 1.5a7.9 7.9 0 0 0 .1 1l-2 1.5 2 3.5 2.4-.5a7.8 7.8 0 0 0 1.7 1L10.5 21h4l.9-3.5a7.8 7.8 0 0 0 1.7-1l2.4.5 2-3.5-2-1.5Z\" />\n </svg>\n </Icon>\n ),\n },\n ];\n\n const sideWidth = collapsed ? \"w-16\" : \"w-72\";\n\n return (\n <ToastProvider>\n <div className=\"flex h-dvh w-dvw overflow-hidden\">\n <aside className={`flex shrink-0 flex-col border-r border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] backdrop-blur-[var(--ck-glass-blur)] ${sideWidth}`}>\n <div className=\"flex h-14 items-center justify-between gap-2 border-b border-[color:var(--ck-border-subtle)] px-3\">\n <Link href=\"/\" className=\"text-sm font-semibold tracking-tight\" title=\"Home\">\n {collapsed ? \"CK\" : \"Claw Kitchen\"}\n </Link>\n <button\n onClick={toggleCollapsed}\n className=\"rounded-[var(--ck-radius-sm)] px-2 py-1 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n title={collapsed ? \"Expand\" : \"Collapse\"}\n >\n {collapsed ? \"»\" : \"«\"}\n </button>\n </div>\n\n <div className=\"border-b border-[color:var(--ck-border-subtle)] p-2\">\n {collapsed ? (\n <button\n className=\"w-full rounded-[var(--ck-radius-sm)] bg-white/5 px-2 py-2 text-xs font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/10\"\n title={selectedTeamId ? `Team: ${selectedTeamId}` : \"Select team\"}\n onClick={() => {\n const id = teamIds[0] || \"\";\n if (!id) return;\n setStoredTeamId(id);\n try {\n localStorage.setItem(\"ck-selected-team\", id);\n } catch {\n // ignore\n }\n\n syncTeamToCurrentUrl(id);\n }}\n >\n 👥\n </button>\n ) : (\n <div className=\"flex flex-col gap-1\">\n <div className=\"px-2 pt-1 text-xs font-semibold uppercase tracking-wide text-[color:var(--ck-text-tertiary)]\">\n Team\n </div>\n <select\n value={selectedTeamId ?? \"\"}\n disabled={isTeamEditorRoute}\n onChange={(e) => {\n const id = (e.target.value || \"\").trim();\n setStoredTeamId(id);\n try {\n if (id) localStorage.setItem(\"ck-selected-team\", id);\n else localStorage.removeItem(\"ck-selected-team\");\n } catch {\n // ignore\n }\n\n dispatchSelectedTeamChanged();\n syncTeamToCurrentUrl(id);\n }}\n className={\n \"w-full rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 px-2 py-2 text-sm text-[color:var(--ck-text-primary)]\" +\n (isTeamEditorRoute ? \" cursor-not-allowed opacity-60\" : \"\")\n }\n >\n <option value=\"\">All teams</option>\n {teamIds.map((id) => (\n <option key={id} value={id}>\n {id}\n </option>\n ))}\n </select>\n\n {selectedTeamId ? (\n <Link\n href={`/teams/${encodeURIComponent(selectedTeamId)}`}\n className=\"px-2 pb-1 text-xs font-medium text-[color:var(--ck-text-tertiary)] hover:text-[color:var(--ck-text-secondary)]\"\n >\n Edit team\n </Link>\n ) : null}\n </div>\n )}\n </div>\n\n <nav className=\"min-h-0 flex-1 overflow-auto p-2\">\n <div className=\"mt-2 px-2 pb-2 pt-2\">\n {/* section label intentionally omitted */}\n </div>\n {globalNav.map((it) => (\n <SideNavLink\n key={it.href}\n href={it.href}\n label={it.label}\n icon={<span aria-hidden>{it.icon}</span>}\n collapsed={collapsed}\n active={(() => {\n const hrefPath = it.href.split(\"?\")[0];\n return pathname === hrefPath || pathname.startsWith(hrefPath + \"/\");\n })()}\n />\n ))}\n </nav>\n\n <div className=\"flex items-center justify-between gap-2 border-t border-[color:var(--ck-border-subtle)] p-2\">\n <a\n href=\"https://github.com/JIGGAI/ClawRecipes/tree/main/docs\"\n target=\"_blank\"\n rel=\"noreferrer\"\n className={\n collapsed\n ? \"mx-auto rounded-[var(--ck-radius-sm)] px-2 py-2 text-sm text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n : \"rounded-[var(--ck-radius-sm)] px-3 py-2 text-sm font-medium text-[color:var(--ck-text-secondary)] hover:bg-white/5 hover:text-[color:var(--ck-text-primary)]\"\n }\n title=\"Docs\"\n >\n {collapsed ? \"📖\" : \"Docs\"}\n </a>\n {collapsed ? null : <ThemeToggle />}\n </div>\n </aside>\n\n <div className=\"min-w-0 flex-1\">\n <main className=\"h-full overflow-auto p-4 md:p-6\">\n <ErrorBoundary>{children}</ErrorBoundary>\n </main>\n </div>\n </div>\n </ToastProvider>\n );\n}","\"use client\";\n\nimport React from \"react\";\nimport Link from \"next/link\";\n\ntype Props = {\n children: React.ReactNode;\n fallback?: React.ReactNode;\n};\n\ntype State = {\n hasError: boolean;\n error: Error | null;\n};\n\n/**\n * React Error Boundary for graceful crash handling.\n * Catches runtime errors in child components and shows a fallback UI.\n */\nexport class ErrorBoundary extends React.Component<Props, State> {\n constructor(props: Props) {\n super(props);\n this.state = { hasError: false, error: null };\n }\n\n static getDerivedStateFromError(error: Error): State {\n return { hasError: true, error };\n }\n\n componentDidCatch(error: Error, errorInfo: React.ErrorInfo) {\n console.error(\"ErrorBoundary caught:\", error, errorInfo);\n }\n\n render() {\n if (this.state.hasError && this.state.error) {\n if (this.props.fallback) {\n return this.props.fallback;\n }\n return (\n <div className=\"ck-glass mx-auto max-w-2xl p-6 sm:p-8\">\n <h1 className=\"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]\">\n Something went wrong\n </h1>\n <p className=\"mt-2 text-sm text-[color:var(--ck-text-secondary)]\">\n An unexpected error occurred. You can try refreshing the page or go back home.\n </p>\n <pre className=\"mt-4 overflow-auto rounded-[var(--ck-radius-sm)] border border-white/10 bg-black/25 p-3 font-mono text-xs text-[color:var(--ck-text-secondary)]\">\n {this.state.error.message}\n </pre>\n <div className=\"mt-6 flex flex-wrap gap-3\">\n <button\n type=\"button\"\n onClick={() => window.location.reload()}\n className=\"rounded-[var(--ck-radius-sm)] bg-[var(--ck-accent-red)] px-4 py-2 text-sm font-medium text-white shadow-[var(--ck-shadow-1)] hover:bg-[var(--ck-accent-red)]/90\"\n >\n Refresh page\n </button>\n <Link\n href=\"/\"\n className=\"rounded-[var(--ck-radius-sm)] border border-white/10 bg-white/5 px-4 py-2 text-sm font-medium text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] hover:bg-white/10\"\n >\n Go home\n </Link>\n </div>\n </div>\n );\n }\n return this.props.children;\n }\n}\n","\"use client\";\n\nfunction IconSvg({ className, children }: { className?: string; children: React.ReactNode }) {\n return (\n <svg\n className={className}\n viewBox=\"0 0 24 24\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n aria-hidden=\"true\"\n >\n {children}\n </svg>\n );\n}\n\nexport function SunIcon({ className }: { className?: string }) {\n return (\n <IconSvg className={className}>\n <path\n d=\"M12 18a6 6 0 1 0 0-12 6 6 0 0 0 0 12Z\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n />\n <path d=\"M12 2v2.5\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M12 19.5V22\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M2 12h2.5\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M19.5 12H22\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M4.2 4.2 6 6\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M18 18l1.8 1.8\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M18 6l1.8-1.8\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n <path d=\"M4.2 19.8 6 18\" stroke=\"currentColor\" strokeWidth=\"1.8\" strokeLinecap=\"round\" />\n </IconSvg>\n );\n}\n\nexport function MoonIcon({ className }: { className?: string }) {\n return (\n <IconSvg className={className}>\n <path\n d=\"M21 14.2A7.8 7.8 0 0 1 9.8 3a7 7 0 1 0 11.2 11.2Z\"\n stroke=\"currentColor\"\n strokeWidth=\"1.8\"\n strokeLinejoin=\"round\"\n />\n </IconSvg>\n );\n}\n","\"use client\";\n\nimport { useEffect, useState } from \"react\";\nimport { MoonIcon, SunIcon } from \"@/components/icons\";\n\nexport type Theme = \"light\" | \"dark\";\n\nconst STORAGE_KEY = \"ck-theme\";\n\nfunction readInitialTheme(): Theme {\n // Default: dark mode.\n if (typeof window === \"undefined\") return \"dark\";\n const saved = window.localStorage.getItem(STORAGE_KEY);\n return saved === \"light\" ? \"light\" : \"dark\";\n}\n\nfunction applyTheme(theme: Theme) {\n document.documentElement.dataset.theme = theme;\n}\n\nexport function ThemeToggle() {\n const [theme, setTheme] = useState<Theme>(readInitialTheme);\n\n useEffect(() => {\n applyTheme(theme);\n window.localStorage.setItem(STORAGE_KEY, theme);\n }, [theme]);\n\n function toggle() {\n setTheme((t) => (t === \"dark\" ? \"light\" : \"dark\"));\n }\n\n const label = theme === \"dark\" ? \"Switch to light mode\" : \"Switch to dark mode\";\n\n return (\n <button\n type=\"button\"\n onClick={toggle}\n className=\"grid h-9 w-9 place-items-center rounded-full border border-[color:var(--ck-border-subtle)] bg-[color:var(--ck-bg-glass)] text-[color:var(--ck-text-primary)] shadow-[var(--ck-shadow-1)] transition-colors hover:bg-[color:var(--ck-bg-glass-strong)]\"\n aria-label={label}\n title={label}\n >\n <span className=\"sr-only\" suppressHydrationWarning>\n {label}\n </span>\n {theme === \"dark\" ? (\n <MoonIcon className=\"h-4.5 w-4.5\" />\n ) : (\n <SunIcon className=\"h-4.5 w-4.5\" />\n )}\n </button>\n );\n}\n"],"names":["module","exports","require","vendored","HooksClientContext","ServerInsertedHtml","process","env","NEXT_RUNTIME","__NEXT_EXPERIMENTAL_REACT","NODE_ENV","TURBOPACK","ReactJsxRuntime","React","AppRouterContext","ReactServerDOMTurbopackClient"],"mappings":"4CAAAA,GAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,QAAW,CAACC,kBAAkB,+BCFzCJ,EAAOC,OAAO,CACZC,EAAQ,CAAA,CAAA,IAAA,GACRC,QAAQ,CAAC,QAA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,UAAU,0HACX,cAGC,UAKV,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,6CACb,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,wBAGd,EAAU,GAAG,CAAC,AAAC,IAQV,IAAM,QAPV,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAEC,KAAM,EAAG,IAAI,CACb,MAAO,EAAG,KAAK,CACf,KAAM,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,aAAW,CAAA,CAAA,WAAE,EAAG,IAAI,GAChC,UAAW,EACX,MAAA,CAES,CAFD,CAAC,KACU,EAAG,IAAI,AACJ,CADK,KAAK,CAAC,IAAI,CAAC,EAAE,GACN,EAAS,UAAU,CAAC,EAAW,MAP5D,EAAG,IAAI,OAalB,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,wGACb,CAAA,EAAA,EAAA,GAAA,EAAC,IAAA,CACC,KAAK,uDACL,OAAO,SACP,IAAI,aACJ,UACE,EACI,2JACA,+JAEN,MAAM,gBAEL,EAAY,KAAO,SAErB,EAAY,KAAO,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,CAAA,SAIzB,CAAA,EAAA,EAAA,GAAA,EAAC,MAAA,CAAI,UAAU,0BACb,CAAA,EAAA,EAAA,GAAA,EAAC,OAAA,CAAK,UAAU,2CACd,CAAA,EAAA,EAAA,GAAA,EAAC,EAAA,UAAe,YAM5B","ignoreList":[0,1,2,3,4,5,6]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},69264,a=>{a.n(a.i(54832))},50645,a=>{a.n(a.i(27572))},17537,a=>{a.n(a.i(3363))},13718,a=>{a.n(a.i(85523))},18198,a=>{a.n(a.i(45518))},37941,a=>{"use strict";var b=a.i(12714),c=a.i(60526),d=a.i(50227);function e(a){return a.includes("/")||a.includes("\\")}function f(a,b="development-team"){let g=e(b)?b:function(a){if(!/^[a-z0-9][a-z0-9-]{1,63}$/.test(a))throw Error(`Invalid teamId "${a}"`);return d.default.join(c.default.homedir(),".openclaw",`workspace-${a}`)}(b);return d.default.join(g,{backlog:"work/backlog","in-progress":"work/in-progress",testing:"work/testing",done:"work/done"}[a])}async function g(a="development-team"){let c,h=e(a)?(c=d.default.basename(a)).startsWith("workspace-")?c.slice(10):c:a,i=[];for(let c of["backlog","in-progress","testing","done"]){let e=[];try{e=await b.default.readdir(f(c,a))}catch{e=[]}for(let g of e){if(!g.endsWith(".md"))continue;let e=function(a){let b=a.match(/^(\d{4})-/);return b?Number(b[1]):null}(g);if(null==e)continue;let j=d.default.join(f(c,a),g),[k,l]=await Promise.all([b.default.readFile(j,"utf8"),b.default.stat(j)]),m=function(a){let b=a.split("\n")[0]??"",c=b.startsWith("# ")?b.slice(2).trim():"",d=c.indexOf(" ");if(d>0){let a=c.slice(d+1).trim();if(a)return a}let e=c.replace(/^\d{4}-/,"").replace(/[-_]+/g," ").replace(/\s+/g," ").trim(),f=new Set(["api","cli","ui","ux","gpu","cpu","npm","pr","ci","cd","json","yaml","md"]),g=e?e.split(" ").filter(Boolean).map(a=>{let b=a.toLowerCase();return f.has(b)?a.toUpperCase():b.startsWith("v")&&/^\d/.test(b.slice(1))||/^[\d.]+$/.test(a)?a:a.slice(0,1).toUpperCase()+a.slice(1)}).join(" "):"";return g||c||"(untitled)"}(k),n=function(a,b){let c=RegExp(`^${b}:\\s*(.*)$`,"mi"),d=a.match(c);return d?.[1]?.trim()||null}(k,"Owner"),o=l.mtime.toISOString(),p=(Date.now()-l.mtimeMs)/36e5;i.push({teamId:h,number:e,id:g.replace(/\.md$/,""),title:m,owner:n,stage:c,file:j,updatedAt:o,ageHours:p})}}return i.sort((a,b)=>a.number-b.number),i}async function h(a,b="development-team"){let c=await g(b),d=a.trim(),e=d.match(/^\d+$/)?c.find(a=>a.number===Number(d)):null;return c.find(a=>a.id===d)??e??null}async function i(a,c){let d=await h(c,a);return d?{teamId:d.teamId,id:d.id,file:d.file,markdown:await b.default.readFile(d.file,"utf8"),owner:d.owner,stage:d.stage}:null}a.s(["getTicketMarkdown",()=>i,"listTickets",()=>g])},65892,a=>{"use strict";a.s(["TicketDetailClient",()=>c,"isPostCommentDisabled",()=>d]);var b=a.i(11857);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call TicketDetailClient() from the server but TicketDetailClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/tickets/TicketDetailClient.tsx <module evaluation>","TicketDetailClient"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call isPostCommentDisabled() from the server but isPostCommentDisabled is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/tickets/TicketDetailClient.tsx <module evaluation>","isPostCommentDisabled")},95433,a=>{"use strict";a.s(["TicketDetailClient",()=>c,"isPostCommentDisabled",()=>d]);var b=a.i(11857);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call TicketDetailClient() from the server but TicketDetailClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/tickets/TicketDetailClient.tsx","TicketDetailClient"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call isPostCommentDisabled() from the server but isPostCommentDisabled is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/tickets/TicketDetailClient.tsx","isPostCommentDisabled")},18192,a=>{"use strict";a.i(65892);var b=a.i(95433);a.n(b)},33084,a=>{"use strict";var b=a.i(7997),c=a.i(37941),d=a.i(18192);async function e({params:a,searchParams:e}){let{ticket:f}=await a,g=await e,h=("string"==typeof g.team?g.team.trim():"")||"development-team",i=await (0,c.getTicketMarkdown)(h,f);return i?(0,b.jsx)(d.TicketDetailClient,{teamId:h,ticketId:i.id,file:i.file,markdown:i.markdown,stage:i.stage,currentOwner:i.owner}):(0,b.jsxs)("div",{className:"ck-glass p-6",children:[(0,b.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"Ticket not found"}),(0,b.jsxs)("p",{className:"mt-3 text-sm text-[color:var(--ck-text-secondary)]",children:["Couldn’t locate “",f,"” in backlog/in-progress/testing/done."]})]})}a.s(["default",()=>e,"dynamic",0,"force-dynamic"])}];
|
|
1
|
+
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},69264,a=>{a.n(a.i(54832))},50645,a=>{a.n(a.i(27572))},17537,a=>{a.n(a.i(3363))},13718,a=>{a.n(a.i(85523))},18198,a=>{a.n(a.i(45518))},37941,a=>{"use strict";var b=a.i(12714),c=a.i(60526),d=a.i(50227);function e(a){return a.includes("/")||a.includes("\\")}function f(a,b="development-team"){let g=e(b)?b:function(a){if(!/^[a-z0-9][a-z0-9-]{1,63}$/.test(a))throw Error(`Invalid teamId "${a}"`);return d.default.join(c.default.homedir(),".openclaw",`workspace-${a}`)}(b);return d.default.join(g,{backlog:"work/backlog","in-progress":"work/in-progress",testing:"work/testing",done:"work/done"}[a])}async function g(a="development-team"){let c,h=e(a)?"workspace"===(c=d.default.basename(a))?"main":c.startsWith("workspace-")?c.slice(10):c:a,i=[];for(let c of["backlog","in-progress","testing","done"]){let e=[];try{e=await b.default.readdir(f(c,a))}catch{e=[]}for(let g of e){if(!g.endsWith(".md"))continue;let e=function(a){let b=a.match(/^(\d{4})-/);return b?Number(b[1]):null}(g);if(null==e)continue;let j=d.default.join(f(c,a),g),[k,l]=await Promise.all([b.default.readFile(j,"utf8"),b.default.stat(j)]),m=function(a){let b=a.split("\n")[0]??"",c=b.startsWith("# ")?b.slice(2).trim():"",d=c.indexOf(" ");if(d>0){let a=c.slice(d+1).trim();if(a)return a}let e=c.replace(/^\d{4}-/,"").replace(/[-_]+/g," ").replace(/\s+/g," ").trim(),f=new Set(["api","cli","ui","ux","gpu","cpu","npm","pr","ci","cd","json","yaml","md"]),g=e?e.split(" ").filter(Boolean).map(a=>{let b=a.toLowerCase();return f.has(b)?a.toUpperCase():b.startsWith("v")&&/^\d/.test(b.slice(1))||/^[\d.]+$/.test(a)?a:a.slice(0,1).toUpperCase()+a.slice(1)}).join(" "):"";return g||c||"(untitled)"}(k),n=function(a,b){let c=RegExp(`^${b}:\\s*(.*)$`,"mi"),d=a.match(c);return d?.[1]?.trim()||null}(k,"Owner"),o=l.mtime.toISOString(),p=(Date.now()-l.mtimeMs)/36e5;i.push({teamId:h,number:e,id:g.replace(/\.md$/,""),title:m,owner:n,stage:c,file:j,updatedAt:o,ageHours:p})}}return i.sort((a,b)=>a.number-b.number),i}async function h(a,b="development-team"){let c=await g(b),d=a.trim(),e=d.match(/^\d+$/)?c.find(a=>a.number===Number(d)):null;return c.find(a=>a.id===d)??e??null}async function i(a,c){let d=await h(c,a);return d?{teamId:d.teamId,id:d.id,file:d.file,markdown:await b.default.readFile(d.file,"utf8"),owner:d.owner,stage:d.stage}:null}a.s(["getTicketMarkdown",()=>i,"listTickets",()=>g])},65892,a=>{"use strict";a.s(["TicketDetailClient",()=>c,"isPostCommentDisabled",()=>d]);var b=a.i(11857);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call TicketDetailClient() from the server but TicketDetailClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/tickets/TicketDetailClient.tsx <module evaluation>","TicketDetailClient"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call isPostCommentDisabled() from the server but isPostCommentDisabled is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/tickets/TicketDetailClient.tsx <module evaluation>","isPostCommentDisabled")},95433,a=>{"use strict";a.s(["TicketDetailClient",()=>c,"isPostCommentDisabled",()=>d]);var b=a.i(11857);let c=(0,b.registerClientReference)(function(){throw Error("Attempted to call TicketDetailClient() from the server but TicketDetailClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/tickets/TicketDetailClient.tsx","TicketDetailClient"),d=(0,b.registerClientReference)(function(){throw Error("Attempted to call isPostCommentDisabled() from the server but isPostCommentDisabled is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/tickets/TicketDetailClient.tsx","isPostCommentDisabled")},18192,a=>{"use strict";a.i(65892);var b=a.i(95433);a.n(b)},33084,a=>{"use strict";var b=a.i(7997),c=a.i(37941),d=a.i(18192);async function e({params:a,searchParams:e}){let{ticket:f}=await a,g=await e,h=("string"==typeof g.team?g.team.trim():"")||"development-team",i=await (0,c.getTicketMarkdown)(h,f);return i?(0,b.jsx)(d.TicketDetailClient,{teamId:h,ticketId:i.id,file:i.file,markdown:i.markdown,stage:i.stage,currentOwner:i.owner}):(0,b.jsxs)("div",{className:"ck-glass p-6",children:[(0,b.jsx)("h1",{className:"text-xl font-semibold tracking-tight",children:"Ticket not found"}),(0,b.jsxs)("p",{className:"mt-3 text-sm text-[color:var(--ck-text-secondary)]",children:["Couldn’t locate “",f,"” in backlog/in-progress/testing/done."]})]})}a.s(["default",()=>e,"dynamic",0,"force-dynamic"])}];
|
|
2
2
|
|
|
3
3
|
//# sourceMappingURL=%5Broot-of-the-server%5D__49281b4c._.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../../src/lib/tickets.ts","../../../../src/app/tickets/TicketDetailClient.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/tickets/%5Bticket%5D/page.tsx"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nexport type TicketStage = \"backlog\" | \"in-progress\" | \"testing\" | \"done\";\n\nexport interface TicketSummary {\n teamId: string;\n number: number;\n id: string;\n title: string;\n owner: string | null;\n stage: TicketStage;\n file: string;\n updatedAt: string; // ISO\n ageHours: number;\n}\n\nfunction assertSafeTeamId(teamId: string) {\n // Conservative: matches OpenClaw team ids like \"development-team\".\n if (!/^[a-z0-9][a-z0-9-]{1,63}$/.test(teamId)) {\n throw new Error(`Invalid teamId \"${teamId}\"`);\n }\n}\n\nfunction isPathLike(s: string) {\n return s.includes(\"/\") || s.includes(\"\\\\\");\n}\n\nexport function teamWorkspace(teamId: string) {\n assertSafeTeamId(teamId);\n return path.join(os.homedir(), \".openclaw\", `workspace-${teamId}`);\n}\n\n/**\n * Back-compat helper for older non-team-scoped code paths.\n * Prefer passing explicit teamId into APIs instead.\n */\nexport function getTeamWorkspaceDir(teamId?: string): string {\n if (teamId) return teamWorkspace(teamId);\n return process.env.CK_TEAM_WORKSPACE_DIR ?? teamWorkspace(process.env.CK_TEAM_ID ?? \"development-team\");\n}\n\nexport function stageDir(stage: TicketStage, teamIdOrDir: string = \"development-team\") {\n const map: Record<TicketStage, string> = {\n backlog: \"work/backlog\",\n \"in-progress\": \"work/in-progress\",\n testing: \"work/testing\",\n done: \"work/done\",\n };\n\n const base = isPathLike(teamIdOrDir) ? teamIdOrDir : teamWorkspace(teamIdOrDir);\n return path.join(base, map[stage]);\n}\n\nexport function parseTitle(md: string) {\n // Ticket markdown files typically start with: # 0033-some-slug\n const firstLine = md.split(\"\\n\")[0] ?? \"\";\n const header = firstLine.startsWith(\"# \") ? firstLine.slice(2).trim() : \"\";\n\n // If header is like: \"<id> <title...>\" keep the explicit title portion.\n const firstSpace = header.indexOf(\" \");\n if (firstSpace > 0) {\n const afterSpace = header.slice(firstSpace + 1).trim();\n if (afterSpace) return afterSpace;\n }\n\n // Otherwise derive from the slug: strip leading number + hyphen, then de-kebab.\n const derivedRaw = header\n .replace(/^\\d{4}-/, \"\")\n .replace(/[-_]+/g, \" \")\n .replace(/\\s+/g, \" \")\n .trim();\n\n const ACRONYMS = new Set([\"api\", \"cli\", \"ui\", \"ux\", \"gpu\", \"cpu\", \"npm\", \"pr\", \"ci\", \"cd\", \"json\", \"yaml\", \"md\"]);\n const titleCase = (s: string) =>\n s\n .split(\" \")\n .filter(Boolean)\n .map((w) => {\n const lower = w.toLowerCase();\n if (ACRONYMS.has(lower)) return w.toUpperCase();\n if (lower.startsWith(\"v\") && /^\\d/.test(lower.slice(1))) return w; // version-like\n if (/^[\\d.]+$/.test(w)) return w; // numbers/semver\n return w.slice(0, 1).toUpperCase() + w.slice(1);\n })\n .join(\" \");\n\n const derived = derivedRaw ? titleCase(derivedRaw) : \"\";\n\n if (derived) return derived;\n return header || \"(untitled)\";\n}\n\nfunction parseField(md: string, field: string): string | null {\n const re = new RegExp(`^${field}:\\\\s*(.*)$`, \"mi\");\n const m = md.match(re);\n return m?.[1]?.trim() || null;\n}\n\nexport function parseNumberFromFilename(filename: string): number | null {\n const m = filename.match(/^(\\d{4})-/);\n if (!m) return null;\n return Number(m[1]);\n}\n\nfunction teamIdFromTeamDir(teamDir: string): string {\n const base = path.basename(teamDir);\n if (base.startsWith(\"workspace-\")) return base.slice(\"workspace-\".length);\n return base;\n}\n\nexport async function discoverTeamIds(): Promise<string[]> {\n // Convention: ~/.openclaw/workspace-<teamId>\n const root = path.join(os.homedir(), \".openclaw\");\n let entries: string[] = [];\n try {\n entries = await fs.readdir(root);\n } catch {\n return [];\n }\n\n return entries\n .filter((e) => e.startsWith(\"workspace-\"))\n .map((e) => e.slice(\"workspace-\".length))\n .filter((id) => Boolean(id) && id !== \"workspace\")\n .sort();\n}\n\n/**\n * List tickets for a specific team (recommended).\n * - listTickets(\"development-team\")\n * - listTickets(teamWorkspaceDir)\n */\nexport async function listTickets(teamIdOrDir: string = \"development-team\"): Promise<TicketSummary[]> {\n const teamId = isPathLike(teamIdOrDir) ? teamIdFromTeamDir(teamIdOrDir) : teamIdOrDir;\n const stages: TicketStage[] = [\"backlog\", \"in-progress\", \"testing\", \"done\"];\n const all: TicketSummary[] = [];\n\n for (const stage of stages) {\n let files: string[] = [];\n try {\n files = await fs.readdir(stageDir(stage, teamIdOrDir));\n } catch {\n files = [];\n }\n\n for (const f of files) {\n if (!f.endsWith(\".md\")) continue;\n const number = parseNumberFromFilename(f);\n if (number == null) continue;\n\n const file = path.join(stageDir(stage, teamIdOrDir), f);\n const [md, stat] = await Promise.all([fs.readFile(file, \"utf8\"), fs.stat(file)]);\n\n const title = parseTitle(md);\n const owner = parseField(md, \"Owner\");\n const updatedAt = stat.mtime.toISOString();\n const ageHours = (Date.now() - stat.mtimeMs) / (1000 * 60 * 60);\n\n all.push({\n teamId,\n number,\n id: f.replace(/\\.md$/, \"\"),\n title,\n owner,\n stage,\n file,\n updatedAt,\n ageHours,\n });\n }\n }\n\n all.sort((a, b) => a.number - b.number);\n return all;\n}\n\n/**\n * List tickets across all discovered teams (used for /tickets?team=all).\n */\nexport async function listAllTeamsTickets(): Promise<TicketSummary[]> {\n const teamIds = await discoverTeamIds();\n const all: TicketSummary[] = [];\n\n for (const teamId of teamIds) {\n all.push(...(await listTickets(teamId)));\n }\n\n all.sort((a, b) => (a.teamId === b.teamId ? a.number - b.number : a.teamId.localeCompare(b.teamId)));\n return all;\n}\n\n/**\n * Back-compat helper used by some API routes.\n */\nexport async function getTicketByIdOrNumber(ticketIdOrNumber: string, teamIdOrDir: string = \"development-team\") {\n const tickets = await listTickets(teamIdOrDir);\n const normalized = ticketIdOrNumber.trim();\n\n const byNumber = normalized.match(/^\\d+$/) ? tickets.find((t) => t.number === Number(normalized)) : null;\n const byId = tickets.find((t) => t.id === normalized);\n return byId ?? byNumber ?? null;\n}\n\nexport async function resolveTicket(teamId: string, ticketIdOrNumber: string): Promise<TicketSummary | null> {\n return getTicketByIdOrNumber(ticketIdOrNumber, teamId);\n}\n\n/**\n * getTicketMarkdown(teamId, ticketIdOrNumber)\n */\nexport async function getTicketMarkdown(\n teamId: string,\n ticketIdOrNumber: string,\n): Promise<{ teamId: string; id: string; file: string; markdown: string; owner: string | null; stage: TicketStage } | null> {\n const hit = await getTicketByIdOrNumber(ticketIdOrNumber, teamId);\n if (!hit) return null;\n\n return {\n teamId: hit.teamId,\n id: hit.id,\n file: hit.file,\n markdown: await fs.readFile(hit.file, \"utf8\"),\n owner: hit.owner,\n stage: hit.stage,\n };\n}\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport const TicketDetailClient = registerClientReference(\n function() { throw new Error(\"Attempted to call TicketDetailClient() from the server but TicketDetailClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/tickets/TicketDetailClient.tsx\",\n \"TicketDetailClient\",\n);\nexport const isPostCommentDisabled = registerClientReference(\n function() { throw new Error(\"Attempted to call isPostCommentDisabled() from the server but isPostCommentDisabled is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/tickets/TicketDetailClient.tsx\",\n \"isPostCommentDisabled\",\n);\n","import { getTicketMarkdown } from \"@/lib/tickets\";\nimport { TicketDetailClient } from \"@/app/tickets/TicketDetailClient\";\n\n// Ticket detail should always reflect current stage/file; do not cache.\nexport const dynamic = \"force-dynamic\";\n\nexport default async function TicketDetailPage({\n params,\n searchParams,\n}: {\n params: Promise<{ ticket: string }>;\n searchParams: Promise<Record<string, string | string[] | undefined>>;\n}) {\n const { ticket } = await params;\n const sp = await searchParams;\n const team = typeof sp.team === \"string\" ? sp.team.trim() : \"\";\n const teamId = team || \"development-team\";\n\n const data = await getTicketMarkdown(teamId, ticket);\n\n if (!data) {\n return (\n <div className=\"ck-glass p-6\">\n <h1 className=\"text-xl font-semibold tracking-tight\">Ticket not found</h1>\n <p className=\"mt-3 text-sm text-[color:var(--ck-text-secondary)]\">\n Couldn’t locate “{ticket}” in backlog/in-progress/testing/done.\n </p>\n </div>\n );\n }\n\n return (\n <TicketDetailClient\n teamId={teamId}\n ticketId={data.id}\n file={data.file}\n markdown={data.markdown}\n stage={data.stage}\n currentOwner={data.owner}\n />\n );\n}\n"],"names":[],"mappings":"6hBAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAuBA,SAAS,EAAW,CAAS,EAC3B,OAAO,EAAE,QAAQ,CAAC,MAAQ,EAAE,QAAQ,CAAC,KACvC,CAgBO,SAAS,EAAS,CAAkB,CAAE,EAAsB,kBAAkB,EAQnF,IAAM,EAAO,EAAW,GAAe,EAtBlC,AAsBgD,SAtBvC,AAAc,CAAc,EAT1C,GAAI,CAAC,4BAA4B,IAAI,CAAC,GACpC,MAAM,AAAI,AADmC,MAC7B,CAAC,gBAAgB,EAAE,AASpB,EAT2B,CAAC,CAAC,EAU9C,OAAO,EAAA,OAAI,CAAC,IAAI,CAAC,EAAA,OAAE,CAAC,OAAO,GAAI,YAAa,CAAC,UAAU,EAAE,EAAA,CAAQ,CACnE,EAmBqE,GACnE,OAAO,EAAA,OAAI,CAAC,IAAI,CAAC,EARwB,AAQlB,CAPrB,QAAS,eACT,cAAe,mBACf,QAAS,eACT,KAAM,WACR,CAG0B,CAAC,EAAM,CACnC,CAiFO,eAAe,EAAY,EAAsB,kBAAkB,QAClE,EAAS,EAAW,GA3B1B,AAAI,CADE,EAAO,EAAA,OAAI,AA4BwB,CA5BvB,QAAQ,CAAC,AA4BgC,IA3BlD,UAAU,CAAC,cAAsB,CAAP,CAAY,KAAK,CAAC,IAC9C,EA0BmE,EAEpE,EAAuB,EAAE,CA7BmC,AA+BlE,IAAK,EA/BmE,EA+B7D,IAHmB,CAAC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,EACR,SAAU,EAAK,EAAE,CACjB,KAAM,EAAK,IAAI,CACf,SAAU,EAAK,QAAQ,CACvB,MAAO,EAAK,KAAK,CACjB,aAAc,EAAK,KAAK,GAhBxB,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,yBACb,CAAA,EAAA,EAAA,GAAA,EAAC,KAAA,CAAG,UAAU,gDAAuC,qBACrD,CAAA,EAAA,EAAA,IAAA,EAAC,IAAA,CAAE,UAAU,+DAAqD,oBAC9C,EAAO,8CAgBnC,kCArCuB","ignoreList":[1]}
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/tickets.ts","../../../../src/app/tickets/TicketDetailClient.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/tickets/%5Bticket%5D/page.tsx"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\nexport type TicketStage = \"backlog\" | \"in-progress\" | \"testing\" | \"done\";\n\nexport interface TicketSummary {\n teamId: string;\n number: number;\n id: string;\n title: string;\n owner: string | null;\n stage: TicketStage;\n file: string;\n updatedAt: string; // ISO\n ageHours: number;\n}\n\nfunction assertSafeTeamId(teamId: string) {\n // Conservative: matches OpenClaw team ids like \"development-team\".\n if (!/^[a-z0-9][a-z0-9-]{1,63}$/.test(teamId)) {\n throw new Error(`Invalid teamId \"${teamId}\"`);\n }\n}\n\nfunction isPathLike(s: string) {\n return s.includes(\"/\") || s.includes(\"\\\\\");\n}\n\nexport function teamWorkspace(teamId: string) {\n assertSafeTeamId(teamId);\n return path.join(os.homedir(), \".openclaw\", `workspace-${teamId}`);\n}\n\n/**\n * Back-compat helper for older non-team-scoped code paths.\n * Prefer passing explicit teamId into APIs instead.\n */\nexport function getTeamWorkspaceDir(teamId?: string): string {\n if (teamId) return teamWorkspace(teamId);\n return process.env.CK_TEAM_WORKSPACE_DIR ?? teamWorkspace(process.env.CK_TEAM_ID ?? \"development-team\");\n}\n\nexport function stageDir(stage: TicketStage, teamIdOrDir: string = \"development-team\") {\n const map: Record<TicketStage, string> = {\n backlog: \"work/backlog\",\n \"in-progress\": \"work/in-progress\",\n testing: \"work/testing\",\n done: \"work/done\",\n };\n\n const base = isPathLike(teamIdOrDir) ? teamIdOrDir : teamWorkspace(teamIdOrDir);\n return path.join(base, map[stage]);\n}\n\nexport function parseTitle(md: string) {\n // Ticket markdown files typically start with: # 0033-some-slug\n const firstLine = md.split(\"\\n\")[0] ?? \"\";\n const header = firstLine.startsWith(\"# \") ? firstLine.slice(2).trim() : \"\";\n\n // If header is like: \"<id> <title...>\" keep the explicit title portion.\n const firstSpace = header.indexOf(\" \");\n if (firstSpace > 0) {\n const afterSpace = header.slice(firstSpace + 1).trim();\n if (afterSpace) return afterSpace;\n }\n\n // Otherwise derive from the slug: strip leading number + hyphen, then de-kebab.\n const derivedRaw = header\n .replace(/^\\d{4}-/, \"\")\n .replace(/[-_]+/g, \" \")\n .replace(/\\s+/g, \" \")\n .trim();\n\n const ACRONYMS = new Set([\"api\", \"cli\", \"ui\", \"ux\", \"gpu\", \"cpu\", \"npm\", \"pr\", \"ci\", \"cd\", \"json\", \"yaml\", \"md\"]);\n const titleCase = (s: string) =>\n s\n .split(\" \")\n .filter(Boolean)\n .map((w) => {\n const lower = w.toLowerCase();\n if (ACRONYMS.has(lower)) return w.toUpperCase();\n if (lower.startsWith(\"v\") && /^\\d/.test(lower.slice(1))) return w; // version-like\n if (/^[\\d.]+$/.test(w)) return w; // numbers/semver\n return w.slice(0, 1).toUpperCase() + w.slice(1);\n })\n .join(\" \");\n\n const derived = derivedRaw ? titleCase(derivedRaw) : \"\";\n\n if (derived) return derived;\n return header || \"(untitled)\";\n}\n\nfunction parseField(md: string, field: string): string | null {\n const re = new RegExp(`^${field}:\\\\s*(.*)$`, \"mi\");\n const m = md.match(re);\n return m?.[1]?.trim() || null;\n}\n\nexport function parseNumberFromFilename(filename: string): number | null {\n const m = filename.match(/^(\\d{4})-/);\n if (!m) return null;\n return Number(m[1]);\n}\n\nfunction teamIdFromTeamDir(teamDir: string): string {\n const base = path.basename(teamDir);\n if (base === \"workspace\") return \"main\";\n if (base.startsWith(\"workspace-\")) return base.slice(\"workspace-\".length);\n return base;\n}\n\nexport async function discoverTeamIds(): Promise<string[]> {\n // Convention: ~/.openclaw/workspace-<teamId>\n const root = path.join(os.homedir(), \".openclaw\");\n let entries: string[] = [];\n try {\n entries = await fs.readdir(root);\n } catch {\n return [];\n }\n\n const teamIds = entries\n .filter((e) => e.startsWith(\"workspace-\"))\n .map((e) => e.slice(\"workspace-\".length))\n .filter((id) => Boolean(id) && id !== \"workspace\");\n\n // Also include personal workspace scope.\n teamIds.push(\"main\");\n\n return Array.from(new Set(teamIds)).sort();\n}\n\n/**\n * List tickets for a specific team (recommended).\n * - listTickets(\"development-team\")\n * - listTickets(teamWorkspaceDir)\n */\nexport async function listTickets(teamIdOrDir: string = \"development-team\"): Promise<TicketSummary[]> {\n const teamId = isPathLike(teamIdOrDir) ? teamIdFromTeamDir(teamIdOrDir) : teamIdOrDir;\n const stages: TicketStage[] = [\"backlog\", \"in-progress\", \"testing\", \"done\"];\n const all: TicketSummary[] = [];\n\n for (const stage of stages) {\n let files: string[] = [];\n try {\n files = await fs.readdir(stageDir(stage, teamIdOrDir));\n } catch {\n files = [];\n }\n\n for (const f of files) {\n if (!f.endsWith(\".md\")) continue;\n const number = parseNumberFromFilename(f);\n if (number == null) continue;\n\n const file = path.join(stageDir(stage, teamIdOrDir), f);\n const [md, stat] = await Promise.all([fs.readFile(file, \"utf8\"), fs.stat(file)]);\n\n const title = parseTitle(md);\n const owner = parseField(md, \"Owner\");\n const updatedAt = stat.mtime.toISOString();\n const ageHours = (Date.now() - stat.mtimeMs) / (1000 * 60 * 60);\n\n all.push({\n teamId,\n number,\n id: f.replace(/\\.md$/, \"\"),\n title,\n owner,\n stage,\n file,\n updatedAt,\n ageHours,\n });\n }\n }\n\n all.sort((a, b) => a.number - b.number);\n return all;\n}\n\n/**\n * List tickets across all discovered teams (used for /tickets?team=all).\n */\nexport async function listAllTeamsTickets(): Promise<TicketSummary[]> {\n const teamIds = await discoverTeamIds();\n const all: TicketSummary[] = [];\n\n for (const teamId of teamIds) {\n all.push(...(await listTickets(teamId)));\n }\n\n all.sort((a, b) => (a.teamId === b.teamId ? a.number - b.number : a.teamId.localeCompare(b.teamId)));\n return all;\n}\n\n/**\n * Back-compat helper used by some API routes.\n */\nexport async function getTicketByIdOrNumber(ticketIdOrNumber: string, teamIdOrDir: string = \"development-team\") {\n const tickets = await listTickets(teamIdOrDir);\n const normalized = ticketIdOrNumber.trim();\n\n const byNumber = normalized.match(/^\\d+$/) ? tickets.find((t) => t.number === Number(normalized)) : null;\n const byId = tickets.find((t) => t.id === normalized);\n return byId ?? byNumber ?? null;\n}\n\nexport async function resolveTicket(teamId: string, ticketIdOrNumber: string): Promise<TicketSummary | null> {\n return getTicketByIdOrNumber(ticketIdOrNumber, teamId);\n}\n\n/**\n * getTicketMarkdown(teamId, ticketIdOrNumber)\n */\nexport async function getTicketMarkdown(\n teamId: string,\n ticketIdOrNumber: string,\n): Promise<{ teamId: string; id: string; file: string; markdown: string; owner: string | null; stage: TicketStage } | null> {\n const hit = await getTicketByIdOrNumber(ticketIdOrNumber, teamId);\n if (!hit) return null;\n\n return {\n teamId: hit.teamId,\n id: hit.id,\n file: hit.file,\n markdown: await fs.readFile(hit.file, \"utf8\"),\n owner: hit.owner,\n stage: hit.stage,\n };\n}\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport const TicketDetailClient = registerClientReference(\n function() { throw new Error(\"Attempted to call TicketDetailClient() from the server but TicketDetailClient is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/tickets/TicketDetailClient.tsx\",\n \"TicketDetailClient\",\n);\nexport const isPostCommentDisabled = registerClientReference(\n function() { throw new Error(\"Attempted to call isPostCommentDisabled() from the server but isPostCommentDisabled is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/tickets/TicketDetailClient.tsx\",\n \"isPostCommentDisabled\",\n);\n","import { getTicketMarkdown } from \"@/lib/tickets\";\nimport { TicketDetailClient } from \"@/app/tickets/TicketDetailClient\";\n\n// Ticket detail should always reflect current stage/file; do not cache.\nexport const dynamic = \"force-dynamic\";\n\nexport default async function TicketDetailPage({\n params,\n searchParams,\n}: {\n params: Promise<{ ticket: string }>;\n searchParams: Promise<Record<string, string | string[] | undefined>>;\n}) {\n const { ticket } = await params;\n const sp = await searchParams;\n const team = typeof sp.team === \"string\" ? sp.team.trim() : \"\";\n const teamId = team || \"development-team\";\n\n const data = await getTicketMarkdown(teamId, ticket);\n\n if (!data) {\n return (\n <div className=\"ck-glass p-6\">\n <h1 className=\"text-xl font-semibold tracking-tight\">Ticket not found</h1>\n <p className=\"mt-3 text-sm text-[color:var(--ck-text-secondary)]\">\n Couldn’t locate “{ticket}” in backlog/in-progress/testing/done.\n </p>\n </div>\n );\n }\n\n return (\n <TicketDetailClient\n teamId={teamId}\n ticketId={data.id}\n file={data.file}\n markdown={data.markdown}\n stage={data.stage}\n currentOwner={data.owner}\n />\n );\n}\n"],"names":[],"mappings":"6hBAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAuBA,SAAS,EAAW,CAAS,EAC3B,OAAO,EAAE,QAAQ,CAAC,MAAQ,EAAE,QAAQ,CAAC,KACvC,CAgBO,SAAS,EAAS,CAAkB,CAAE,EAAsB,kBAAkB,EAQnF,IAAM,EAAO,EAAW,GAAe,EAtBlC,AAsBgD,SAtBvC,AAAc,CAAc,EAT1C,GAAI,CAAC,4BAA4B,IAAI,CAUpB,AAVqB,GACpC,MAAM,AAAI,AADmC,MAC7B,CAAC,gBAAgB,EAAE,EAAO,CAAC,CAAC,EAU9C,OAAO,EAAA,OAAI,CAAC,IAAI,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ES,EAAwB,CAAA,EAAA,EAAA,uBAAA,AAAuB,EACxD,WAAa,MAAM,AAAI,MAAM,wPAA0P,EACvR,mDACA,4HCVJ,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAKe,eAAe,EAAiB,QAC7C,CAAM,cACN,CAAY,CAIb,EACC,GAAM,QAAE,CAAM,CAAE,CAAG,MAAM,EACnB,EAAK,MAAM,EAEX,EAAS,CADiB,UAAnB,OAAO,EAAG,IAAI,CAAgB,EAAG,IAAI,CAAC,IAAI,GAAK,EAAA,GACrC,mBAEjB,EAAO,MAAM,CAAA,EAAA,EAAA,iBAAA,AAAiB,EAAC,EAAQ,UAE7C,AAAK,EAYH,CAAA,CAZE,CAYF,CAZS,CAYT,GAAA,EAAC,EAAA,kBAAkB,CAAA,CACjB,OAAQ,EACR,SAAU,EAAK,EAAE,CACjB,KAAM,EAAK,IAAI,CACf,SAAU,EAAK,QAAQ,CACvB,MAAO,EAAK,KAAK,CACjB,aAAc,EAAK,KAAK,GAhBxB,CAAA,EAAA,EAAA,IAAA,EAAC,MAAA,CAAI,UAAU,yBACb,CAAA,EAAA,EAAA,GAAA,EAAC,KAAA,CAAG,UAAU,gDAAuC,qBACrD,CAAA,EAAA,EAAA,IAAA,EAAC,IAAA,CAAE,UAAU,+DAAqD,oBAC9C,EAAO,8CAgBnC,kCArCuB","ignoreList":[1]}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
module.exports=[93695,(a,b,c)=>{b.exports=a.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},12714,(a,b,c)=>{b.exports=a.x("node:fs/promises",()=>require("node:fs/promises"))},50227,(a,b,c)=>{b.exports=a.x("node:path",()=>require("node:path"))},60526,(a,b,c)=>{b.exports=a.x("node:os",()=>require("node:os"))},74533,(a,b,c)=>{b.exports=a.x("node:child_process",()=>require("node:child_process"))},12057,(a,b,c)=>{b.exports=a.x("node:util",()=>require("node:util"))},69264,a=>{a.n(a.i(54832))},50645,a=>{a.n(a.i(27572))},17537,a=>{a.n(a.i(3363))},13718,a=>{a.n(a.i(85523))},18198,a=>{a.n(a.i(45518))},5365,(a,b,c)=>{b.exports=a.x("process",()=>require("process"))},874,(a,b,c)=>{b.exports=a.x("buffer",()=>require("buffer"))},28215,a=>{"use strict";var b=a.i(12714),c=a.i(60526),d=a.i(50227);async function e(){let a=d.default.join(c.default.homedir(),".openclaw","openclaw.json");return JSON.parse(await b.default.readFile(a,"utf8"))}async function f(){let a=await e(),b=a.agents?.defaults?.workspace;if(!b)throw Error("agents.defaults.workspace is not set in ~/.openclaw/openclaw.json");return b}async function g(a){let b=c.default.homedir();if(!b)throw Error("Could not resolve home directory");return d.default.join(b,".openclaw",`workspace-${a}`)}a.s(["getTeamWorkspaceDir",()=>g,"getWorkspaceDir",()=>f])},790,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(11857);a.n(d("[project]/node_modules/next/dist/client/app-dir/link.js <module evaluation>"))},84707,(a,b,c)=>{let{createClientModuleProxy:d}=a.r(11857);a.n(d("[project]/node_modules/next/dist/client/app-dir/link.js"))},97647,a=>{"use strict";a.i(790);var b=a.i(84707);a.n(b)},95936,(a,b,c)=>{"use strict";Object.defineProperty(c,"__esModule",{value:!0});var d={default:function(){return i},useLinkStatus:function(){return h.useLinkStatus}};for(var e in d)Object.defineProperty(c,e,{enumerable:!0,get:d[e]});let f=a.r(64240),g=a.r(7997),h=f._(a.r(97647));function i(a){let b=a.legacyBehavior,c="string"==typeof a.children||"number"==typeof a.children||"string"==typeof a.children?.type,d=a.children?.type?.$$typeof===Symbol.for("react.client.reference");return!b||c||d||(a.children?.type?.$$typeof===Symbol.for("react.lazy")?console.error("Using a Lazy Component as a direct child of `<Link legacyBehavior>` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's `<a>` tag."):console.error("Using a Server Component as a direct child of `<Link legacyBehavior>` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's `<a>` tag.")),(0,g.jsx)(h.default,{...a})}("function"==typeof c.default||"object"==typeof c.default&&null!==c.default)&&void 0===c.default.__esModule&&(Object.defineProperty(c.default,"__esModule",{value:!0}),Object.assign(c.default,c),b.exports=c.default)},23279,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/app/teams/[teamId]/team-editor/index.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/teams/[teamId]/team-editor/index.tsx <module evaluation>","default")},30067,a=>{"use strict";a.s(["default",()=>b]);let b=(0,a.i(11857).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/src/app/teams/[teamId]/team-editor/index.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/src/app/teams/[teamId]/team-editor/index.tsx","default")},81254,a=>{"use strict";a.i(23279);var b=a.i(30067);a.n(b)},33201,a=>{"use strict";var b=a.i(7997),c=a.i(95936),d=a.i(18558),e=a.i(15629),f=a.i(81254);async function g({params:a,searchParams:g}){(0,d.unstable_noStore)();let{teamId:h}=await a,i=(await g??{}).tab,j=Array.isArray(i)?i[0]:i,k=await (0,e.getTeamDisplayName)(h);return(0,b.jsxs)("div",{className:"flex flex-col gap-4 p-6",children:[(0,b.jsxs)("div",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,b.jsxs)("div",{children:[(0,b.jsx)("div",{className:"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]",children:k||h}),(0,b.jsx)("div",{className:"text-xs text-[color:var(--ck-text-tertiary)]",children:h})]}),(0,b.jsx)("div",{className:"flex items-center gap-3",children:(0,b.jsx)(c.default,{href:`/goals?team=${encodeURIComponent(h)}`,className:"text-sm font-medium text-[color:var(--ck-text-secondary)] hover:underline",children:"View goals →"})})]}),(0,b.jsx)(f.default,{teamId:h,initialTab:"string"==typeof j?j:void 0})]})}a.s(["default",()=>g,"dynamic",0,"force-dynamic","revalidate",0,0])}];
|
|
2
|
+
|
|
3
|
+
//# sourceMappingURL=%5Broot-of-the-server%5D__8756d76d._.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../../src/lib/paths.ts","../../../../node_modules/next/dist/client/app-dir/link.js/__nextjs-internal-proxy.cjs","../../../../node_modules/next/src/client/app-dir/link.tsx","../../../../node_modules/next/src/client/app-dir/link.react-server.tsx","../../../../src/app/teams/%5BteamId%5D/team-editor/index.tsx/__nextjs-internal-proxy.mjs","../../../../src/app/teams/%5BteamId%5D/page.tsx"],"sourcesContent":["import fs from \"node:fs/promises\";\nimport os from \"node:os\";\nimport path from \"node:path\";\n\ntype OpenClawConfig = {\n agents?: { defaults?: { workspace?: string } };\n gateway?: { port?: number; auth?: { token?: string } };\n tools?: {\n agentToAgent?: {\n enabled?: boolean;\n allow?: string[];\n };\n };\n plugins?: {\n installs?: { recipes?: { installPath?: string; sourcePath?: string } };\n load?: { paths?: string[] };\n };\n // OpenClaw message routing bindings (used for HITL approvals, etc.)\n bindings?: unknown[];\n};\n\nexport async function readOpenClawConfig(): Promise<OpenClawConfig> {\n const p = path.join(os.homedir(), \".openclaw\", \"openclaw.json\");\n const text = await fs.readFile(p, \"utf8\");\n return JSON.parse(text) as OpenClawConfig;\n}\n\nexport async function getWorkspaceDir() {\n const cfg = await readOpenClawConfig();\n const ws = cfg.agents?.defaults?.workspace;\n if (!ws) throw new Error(\"agents.defaults.workspace is not set in ~/.openclaw/openclaw.json\");\n return ws;\n}\n\nexport async function getWorkspaceRecipesDir() {\n const ws = await getWorkspaceDir();\n return path.join(ws, \"recipes\");\n}\n\nexport async function getWorkspaceGoalsDir() {\n const ws = await getWorkspaceDir();\n\n // Back-compat: some installs keep goals at <workspace>/goals.\n // Prefer that when present, otherwise fall back to <workspace>/notes/goals.\n const direct = path.join(ws, \"goals\");\n try {\n const st = await fs.stat(direct);\n if (st.isDirectory()) return direct;\n } catch {\n // ignore\n }\n\n return path.join(ws, \"notes\", \"goals\");\n}\n\nexport async function getTeamWorkspaceDir(teamId: string) {\n const home = os.homedir();\n if (!home) throw new Error(\"Could not resolve home directory\");\n return path.join(home, \".openclaw\", `workspace-${teamId}`);\n}\n\n/** Team workspace dir derived from agents.defaults.workspace (sibling: .. / workspace-{teamId}) */\nexport function teamDirFromBaseWorkspace(baseWorkspace: string, teamId: string) {\n // Special-case: treat \"main\" as the personal workspace (agents.defaults.workspace).\n // This lets Kitchen expose a selectable \"main\" scope without creating a separate\n // ~/.openclaw/workspace-main folder.\n if (teamId === \"main\") return path.resolve(baseWorkspace);\n return path.resolve(baseWorkspace, \"..\", `workspace-${teamId}`);\n}\n\n/** Rejects path traversal and empty names; returns normalized name. */\nexport function assertSafeRelativeFileName(name: string): string {\n const n = name.replace(/\\\\/g, \"/\");\n if (!n || n.startsWith(\"/\") || n.includes(\"..\")) throw new Error(\"Invalid file name\");\n return n;\n}\n\nexport async function getBuiltinRecipesDir() {\n const cfg = await readOpenClawConfig();\n const p =\n cfg.plugins?.installs?.recipes?.installPath ||\n cfg.plugins?.installs?.recipes?.sourcePath ||\n cfg.plugins?.load?.paths?.[0];\n if (!p) throw new Error(\"Could not determine recipes plugin install path from ~/.openclaw/openclaw.json\");\n return path.join(p, \"recipes\", \"default\");\n}\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nconst { createClientModuleProxy } = require(\"react-server-dom-turbopack/server\");\n\n__turbopack_context__.n(createClientModuleProxy(\"[project]/node_modules/next/dist/client/app-dir/link.js\"));\n","'use client'\n\nimport React, { createContext, useContext, useOptimistic, useRef } from 'react'\nimport type { UrlObject } from 'url'\nimport { formatUrl } from '../../shared/lib/router/utils/format-url'\nimport { AppRouterContext } from '../../shared/lib/app-router-context.shared-runtime'\nimport { useMergedRef } from '../use-merged-ref'\nimport { isAbsoluteUrl } from '../../shared/lib/utils'\nimport { addBasePath } from '../add-base-path'\nimport { warnOnce } from '../../shared/lib/utils/warn-once'\nimport type { PENDING_LINK_STATUS } from '../components/links'\nimport {\n IDLE_LINK_STATUS,\n mountLinkInstance,\n onNavigationIntent,\n unmountLinkForCurrentNavigation,\n unmountPrefetchableInstance,\n type LinkInstance,\n} from '../components/links'\nimport { isLocalURL } from '../../shared/lib/router/utils/is-local-url'\nimport {\n FetchStrategy,\n type PrefetchTaskFetchStrategy,\n} from '../components/segment-cache/types'\nimport { errorOnce } from '../../shared/lib/utils/error-once'\n\ntype Url = string | UrlObject\ntype RequiredKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? never : K\n}[keyof T]\ntype OptionalKeys<T> = {\n [K in keyof T]-?: {} extends Pick<T, K> ? K : never\n}[keyof T]\n\ntype OnNavigateEventHandler = (event: { preventDefault: () => void }) => void\n\ntype InternalLinkProps = {\n /**\n * **Required**. The path or URL to navigate to. It can also be an object (similar to `URL`).\n *\n * @example\n * ```tsx\n * // Navigate to /dashboard:\n * <Link href=\"/dashboard\">Dashboard</Link>\n *\n * // Navigate to /about?name=test:\n * <Link href={{ pathname: '/about', query: { name: 'test' } }}>\n * About\n * </Link>\n * ```\n *\n * @remarks\n * - For external URLs, use a fully qualified URL such as `https://...`.\n * - In the App Router, dynamic routes must not include bracketed segments in `href`.\n */\n href: Url\n\n /**\n * @deprecated v10.0.0: `href` props pointing to a dynamic route are\n * automatically resolved and no longer require the `as` prop.\n */\n as?: Url\n\n /**\n * Replace the current `history` state instead of adding a new URL into the stack.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/about\" replace>\n * About (replaces the history state)\n * </Link>\n * ```\n */\n replace?: boolean\n\n /**\n * Whether to override the default scroll behavior. If `true`, Next.js attempts to maintain\n * the scroll position if the newly navigated page is still visible. If not, it scrolls to the top.\n *\n * If `false`, Next.js will not modify the scroll behavior at all.\n *\n * @defaultValue `true`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" scroll={false}>\n * No auto scroll\n * </Link>\n * ```\n */\n scroll?: boolean\n\n /**\n * Update the path of the current page without rerunning data fetching methods\n * like `getStaticProps`, `getServerSideProps`, or `getInitialProps`.\n *\n * @remarks\n * `shallow` only applies to the Pages Router. For the App Router, see the\n * [following documentation](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#using-the-native-history-api).\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/blog\" shallow>\n * Shallow navigation\n * </Link>\n * ```\n */\n shallow?: boolean\n\n /**\n * Forces `Link` to pass its `href` to the child component. Useful if the child is a custom\n * component that wraps an `<a>` tag, or if you're using certain styling libraries.\n *\n * @defaultValue `false`\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" passHref legacyBehavior>\n * <MyStyledAnchor>Dashboard</MyStyledAnchor>\n * </Link>\n * ```\n */\n passHref?: boolean\n\n /**\n * Prefetch the page in the background.\n * Any `<Link />` that is in the viewport (initially or through scroll) will be prefetched.\n * Prefetch can be disabled by passing `prefetch={false}`.\n *\n * @remarks\n * Prefetching is only enabled in production.\n *\n * - In the **App Router**:\n * - `\"auto\"`, `null`, `undefined` (default): Prefetch behavior depends on static vs dynamic routes:\n * - Static routes: fully prefetched\n * - Dynamic routes: partial prefetch to the nearest segment with a `loading.js`\n * - `true`: Always prefetch the full route and data.\n * - `false`: Disable prefetching on both viewport and hover.\n * - In the **Pages Router**:\n * - `true` (default): Prefetches the route and data in the background on viewport or hover.\n * - `false`: Prefetch only on hover, not on viewport.\n *\n * @defaultValue `true` (Pages Router) or `null` (App Router)\n *\n * @example\n * ```tsx\n * <Link href=\"/dashboard\" prefetch={false}>\n * Dashboard\n * </Link>\n * ```\n */\n prefetch?: boolean | 'auto' | null\n\n /**\n * (unstable) Switch to a full prefetch on hover. Effectively the same as\n * updating the prefetch prop to `true` in a mouse event.\n */\n unstable_dynamicOnHover?: boolean\n\n /**\n * The active locale is automatically prepended in the Pages Router. `locale` allows for providing\n * a different locale, or can be set to `false` to opt out of automatic locale behavior.\n *\n * @remarks\n * Note: locale only applies in the Pages Router and is ignored in the App Router.\n *\n * @example\n * ```tsx\n * // Use the 'fr' locale:\n * <Link href=\"/about\" locale=\"fr\">\n * About (French)\n * </Link>\n *\n * // Disable locale prefix:\n * <Link href=\"/about\" locale={false}>\n * About (no locale prefix)\n * </Link>\n * ```\n */\n locale?: string | false\n\n /**\n * Enable legacy link behavior.\n *\n * @deprecated This will be removed in a future version\n * @defaultValue `false`\n * @see https://github.com/vercel/next.js/commit/489e65ed98544e69b0afd7e0cfc3f9f6c2b803b7\n */\n legacyBehavior?: boolean\n\n /**\n * Optional event handler for when the mouse pointer is moved onto the `<Link>`.\n */\n onMouseEnter?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is touched.\n */\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is clicked.\n */\n onClick?: React.MouseEventHandler<HTMLAnchorElement>\n\n /**\n * Optional event handler for when the `<Link>` is navigated.\n */\n onNavigate?: OnNavigateEventHandler\n}\n\n// TODO-APP: Include the full set of Anchor props\n// adding this to the publicly exported type currently breaks existing apps\n\n// `RouteInferType` is a stub here to avoid breaking `typedRoutes` when the type\n// isn't generated yet. It will be replaced when type generation runs.\n// eslint-disable-next-line @typescript-eslint/no-unused-vars\nexport type LinkProps<RouteInferType = any> = InternalLinkProps\ntype LinkPropsRequired = RequiredKeys<LinkProps>\ntype LinkPropsOptional = OptionalKeys<Omit<InternalLinkProps, 'locale'>>\n\nfunction isModifiedEvent(event: React.MouseEvent): boolean {\n const eventTarget = event.currentTarget as HTMLAnchorElement | SVGAElement\n const target = eventTarget.getAttribute('target')\n return (\n (target && target !== '_self') ||\n event.metaKey ||\n event.ctrlKey ||\n event.shiftKey ||\n event.altKey || // triggers resource download\n (event.nativeEvent && event.nativeEvent.which === 2)\n )\n}\n\nfunction linkClicked(\n e: React.MouseEvent,\n href: string,\n as: string,\n linkInstanceRef: React.RefObject<LinkInstance | null>,\n replace?: boolean,\n scroll?: boolean,\n onNavigate?: OnNavigateEventHandler\n): void {\n if (typeof window !== 'undefined') {\n const { nodeName } = e.currentTarget\n\n // anchors inside an svg have a lowercase nodeName\n const isAnchorNodeName = nodeName.toUpperCase() === 'A'\n if (\n (isAnchorNodeName && isModifiedEvent(e)) ||\n e.currentTarget.hasAttribute('download')\n ) {\n // ignore click for browser’s default behavior\n return\n }\n\n if (!isLocalURL(href)) {\n if (replace) {\n // browser default behavior does not replace the history state\n // so we need to do it manually\n e.preventDefault()\n location.replace(href)\n }\n\n // ignore click for browser’s default behavior\n return\n }\n\n e.preventDefault()\n\n if (onNavigate) {\n let isDefaultPrevented = false\n\n onNavigate({\n preventDefault: () => {\n isDefaultPrevented = true\n },\n })\n\n if (isDefaultPrevented) {\n return\n }\n }\n\n const { dispatchNavigateAction } =\n require('../components/app-router-instance') as typeof import('../components/app-router-instance')\n\n React.startTransition(() => {\n dispatchNavigateAction(\n as || href,\n replace ? 'replace' : 'push',\n scroll ?? true,\n linkInstanceRef.current\n )\n })\n }\n}\n\nfunction formatStringOrUrl(urlObjOrString: UrlObject | string): string {\n if (typeof urlObjOrString === 'string') {\n return urlObjOrString\n }\n\n return formatUrl(urlObjOrString)\n}\n\n/**\n * A React component that extends the HTML `<a>` element to provide\n * [prefetching](https://nextjs.org/docs/app/building-your-application/routing/linking-and-navigating#2-prefetching)\n * and client-side navigation. This is the primary way to navigate between routes in Next.js.\n *\n * @remarks\n * - Prefetching is only enabled in production.\n *\n * @see https://nextjs.org/docs/app/api-reference/components/link\n */\nexport default function LinkComponent(\n props: LinkProps & {\n children: React.ReactNode\n ref: React.Ref<HTMLAnchorElement>\n }\n) {\n const [linkStatus, setOptimisticLinkStatus] = useOptimistic(IDLE_LINK_STATUS)\n\n let children: React.ReactNode\n\n const linkInstanceRef = useRef<LinkInstance | null>(null)\n\n const {\n href: hrefProp,\n as: asProp,\n children: childrenProp,\n prefetch: prefetchProp = null,\n passHref,\n replace,\n shallow,\n scroll,\n onClick,\n onMouseEnter: onMouseEnterProp,\n onTouchStart: onTouchStartProp,\n legacyBehavior = false,\n onNavigate,\n ref: forwardedRef,\n unstable_dynamicOnHover,\n ...restProps\n } = props\n\n children = childrenProp\n\n if (\n legacyBehavior &&\n (typeof children === 'string' || typeof children === 'number')\n ) {\n children = <a>{children}</a>\n }\n\n const router = React.useContext(AppRouterContext)\n\n const prefetchEnabled = prefetchProp !== false\n\n const fetchStrategy =\n prefetchProp !== false\n ? getFetchStrategyFromPrefetchProp(prefetchProp)\n : // TODO: it makes no sense to assign a fetchStrategy when prefetching is disabled.\n FetchStrategy.PPR\n\n if (process.env.NODE_ENV !== 'production') {\n function createPropError(args: {\n key: string\n expected: string\n actual: string\n }) {\n return new Error(\n `Failed prop type: The prop \\`${args.key}\\` expects a ${args.expected} in \\`<Link>\\`, but got \\`${args.actual}\\` instead.` +\n (typeof window !== 'undefined'\n ? \"\\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n\n // TypeScript trick for type-guarding:\n const requiredPropsGuard: Record<LinkPropsRequired, true> = {\n href: true,\n } as const\n const requiredProps: LinkPropsRequired[] = Object.keys(\n requiredPropsGuard\n ) as LinkPropsRequired[]\n requiredProps.forEach((key: LinkPropsRequired) => {\n if (key === 'href') {\n if (\n props[key] == null ||\n (typeof props[key] !== 'string' && typeof props[key] !== 'object')\n ) {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: props[key] === null ? 'null' : typeof props[key],\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n\n // TypeScript trick for type-guarding:\n const optionalPropsGuard: Record<LinkPropsOptional, true> = {\n as: true,\n replace: true,\n scroll: true,\n shallow: true,\n passHref: true,\n prefetch: true,\n unstable_dynamicOnHover: true,\n onClick: true,\n onMouseEnter: true,\n onTouchStart: true,\n legacyBehavior: true,\n onNavigate: true,\n } as const\n const optionalProps: LinkPropsOptional[] = Object.keys(\n optionalPropsGuard\n ) as LinkPropsOptional[]\n optionalProps.forEach((key: LinkPropsOptional) => {\n const valType = typeof props[key]\n\n if (key === 'as') {\n if (props[key] && valType !== 'string' && valType !== 'object') {\n throw createPropError({\n key,\n expected: '`string` or `object`',\n actual: valType,\n })\n }\n } else if (\n key === 'onClick' ||\n key === 'onMouseEnter' ||\n key === 'onTouchStart' ||\n key === 'onNavigate'\n ) {\n if (props[key] && valType !== 'function') {\n throw createPropError({\n key,\n expected: '`function`',\n actual: valType,\n })\n }\n } else if (\n key === 'replace' ||\n key === 'scroll' ||\n key === 'shallow' ||\n key === 'passHref' ||\n key === 'legacyBehavior' ||\n key === 'unstable_dynamicOnHover'\n ) {\n if (props[key] != null && valType !== 'boolean') {\n throw createPropError({\n key,\n expected: '`boolean`',\n actual: valType,\n })\n }\n } else if (key === 'prefetch') {\n if (\n props[key] != null &&\n valType !== 'boolean' &&\n props[key] !== 'auto'\n ) {\n throw createPropError({\n key,\n expected: '`boolean | \"auto\"`',\n actual: valType,\n })\n }\n } else {\n // TypeScript trick for type-guarding:\n const _: never = key\n }\n })\n }\n\n if (process.env.NODE_ENV !== 'production') {\n if (props.locale) {\n warnOnce(\n 'The `locale` prop is not supported in `next/link` while using the `app` router. Read more about app router internalization: https://nextjs.org/docs/app/building-your-application/routing/internationalization'\n )\n }\n if (!asProp) {\n let href: string | undefined\n if (typeof hrefProp === 'string') {\n href = hrefProp\n } else if (\n typeof hrefProp === 'object' &&\n typeof hrefProp.pathname === 'string'\n ) {\n href = hrefProp.pathname\n }\n\n if (href) {\n const hasDynamicSegment = href\n .split('/')\n .some((segment) => segment.startsWith('[') && segment.endsWith(']'))\n\n if (hasDynamicSegment) {\n throw new Error(\n `Dynamic href \\`${href}\\` found in <Link> while using the \\`/app\\` router, this is not supported. Read more: https://nextjs.org/docs/messages/app-dir-dynamic-href`\n )\n }\n }\n }\n }\n\n const { href, as } = React.useMemo(() => {\n const resolvedHref = formatStringOrUrl(hrefProp)\n return {\n href: resolvedHref,\n as: asProp ? formatStringOrUrl(asProp) : resolvedHref,\n }\n }, [hrefProp, asProp])\n\n // This will return the first child, if multiple are provided it will throw an error\n let child: any\n if (legacyBehavior) {\n if ((children as any)?.$$typeof === Symbol.for('react.lazy')) {\n throw new Error(\n `\\`<Link legacyBehavior>\\` received a direct child that is either a Server Component, or JSX that was loaded with React.lazy(). This is not supported. Either remove legacyBehavior, or make the direct child a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n\n if (process.env.NODE_ENV === 'development') {\n if (onClick) {\n console.warn(\n `\"onClick\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onClick be set on the child of next/link`\n )\n }\n if (onMouseEnterProp) {\n console.warn(\n `\"onMouseEnter\" was passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but \"legacyBehavior\" was set. The legacy behavior requires onMouseEnter be set on the child of next/link`\n )\n }\n try {\n child = React.Children.only(children)\n } catch (err) {\n if (!children) {\n throw new Error(\n `No children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but one child is required https://nextjs.org/docs/messages/link-no-children`\n )\n }\n throw new Error(\n `Multiple children were passed to <Link> with \\`href\\` of \\`${hrefProp}\\` but only one child is supported https://nextjs.org/docs/messages/link-multiple-children` +\n (typeof window !== 'undefined'\n ? \" \\nOpen your browser's console to view the Component stack trace.\"\n : '')\n )\n }\n } else {\n child = React.Children.only(children)\n }\n } else {\n if (process.env.NODE_ENV === 'development') {\n if ((children as any)?.type === 'a') {\n throw new Error(\n 'Invalid <Link> with <a> child. Please remove <a> or use <Link legacyBehavior>.\\nLearn more: https://nextjs.org/docs/messages/invalid-new-link-with-extra-anchor'\n )\n }\n }\n }\n\n const childRef: any = legacyBehavior\n ? child && typeof child === 'object' && child.ref\n : forwardedRef\n\n // Use a callback ref to attach an IntersectionObserver to the anchor tag on\n // mount. In the future we will also use this to keep track of all the\n // currently mounted <Link> instances, e.g. so we can re-prefetch them after\n // a revalidation or refresh.\n const observeLinkVisibilityOnMount = React.useCallback(\n (element: HTMLAnchorElement | SVGAElement) => {\n if (router !== null) {\n linkInstanceRef.current = mountLinkInstance(\n element,\n href,\n router,\n fetchStrategy,\n prefetchEnabled,\n setOptimisticLinkStatus\n )\n }\n\n return () => {\n if (linkInstanceRef.current) {\n unmountLinkForCurrentNavigation(linkInstanceRef.current)\n linkInstanceRef.current = null\n }\n unmountPrefetchableInstance(element)\n }\n },\n [prefetchEnabled, href, router, fetchStrategy, setOptimisticLinkStatus]\n )\n\n const mergedRef = useMergedRef(observeLinkVisibilityOnMount, childRef)\n\n const childProps: {\n onTouchStart?: React.TouchEventHandler<HTMLAnchorElement>\n onMouseEnter: React.MouseEventHandler<HTMLAnchorElement>\n onClick: React.MouseEventHandler<HTMLAnchorElement>\n href?: string\n ref?: any\n } = {\n ref: mergedRef,\n onClick(e) {\n if (process.env.NODE_ENV !== 'production') {\n if (!e) {\n throw new Error(\n `Component rendered inside next/link has to pass click event to \"onClick\" prop.`\n )\n }\n }\n\n if (!legacyBehavior && typeof onClick === 'function') {\n onClick(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onClick === 'function'\n ) {\n child.props.onClick(e)\n }\n\n if (!router) {\n return\n }\n if (e.defaultPrevented) {\n return\n }\n linkClicked(e, href, as, linkInstanceRef, replace, scroll, onNavigate)\n },\n onMouseEnter(e) {\n if (!legacyBehavior && typeof onMouseEnterProp === 'function') {\n onMouseEnterProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onMouseEnter === 'function'\n ) {\n child.props.onMouseEnter(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled || process.env.NODE_ENV === 'development') {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n onTouchStart: process.env.__NEXT_LINK_NO_TOUCH_START\n ? undefined\n : function onTouchStart(e) {\n if (!legacyBehavior && typeof onTouchStartProp === 'function') {\n onTouchStartProp(e)\n }\n\n if (\n legacyBehavior &&\n child.props &&\n typeof child.props.onTouchStart === 'function'\n ) {\n child.props.onTouchStart(e)\n }\n\n if (!router) {\n return\n }\n if (!prefetchEnabled) {\n return\n }\n\n const upgradeToDynamicPrefetch = unstable_dynamicOnHover === true\n onNavigationIntent(\n e.currentTarget as HTMLAnchorElement | SVGAElement,\n upgradeToDynamicPrefetch\n )\n },\n }\n\n // If the url is absolute, we can bypass the logic to prepend the basePath.\n if (isAbsoluteUrl(as)) {\n childProps.href = as\n } else if (\n !legacyBehavior ||\n passHref ||\n (child.type === 'a' && !('href' in child.props))\n ) {\n childProps.href = addBasePath(as)\n }\n\n let link: React.ReactNode\n\n if (legacyBehavior) {\n if (process.env.NODE_ENV === 'development') {\n errorOnce(\n '`legacyBehavior` is deprecated and will be removed in a future ' +\n 'release. A codemod is available to upgrade your components:\\n\\n' +\n 'npx @next/codemod@latest new-link .\\n\\n' +\n 'Learn more: https://nextjs.org/docs/app/building-your-application/upgrading/codemods#remove-a-tags-from-link-components'\n )\n }\n link = React.cloneElement(child, childProps)\n } else {\n link = (\n <a {...restProps} {...childProps}>\n {children}\n </a>\n )\n }\n\n return (\n <LinkStatusContext.Provider value={linkStatus}>\n {link}\n </LinkStatusContext.Provider>\n )\n}\n\nconst LinkStatusContext = createContext<\n typeof PENDING_LINK_STATUS | typeof IDLE_LINK_STATUS\n>(IDLE_LINK_STATUS)\n\nexport const useLinkStatus = () => {\n return useContext(LinkStatusContext)\n}\n\nfunction getFetchStrategyFromPrefetchProp(\n prefetchProp: Exclude<LinkProps['prefetch'], undefined | false>\n): PrefetchTaskFetchStrategy {\n if (process.env.__NEXT_CACHE_COMPONENTS) {\n if (prefetchProp === true) {\n return FetchStrategy.Full\n }\n\n // `null` or `\"auto\"`: this is the default \"auto\" mode, where we will prefetch partially if the link is in the viewport.\n // This will also include invalid prop values that don't match the types specified here.\n // (although those should've been filtered out by prop validation in dev)\n prefetchProp satisfies null | 'auto'\n return FetchStrategy.PPR\n } else {\n return prefetchProp === null || prefetchProp === 'auto'\n ? // We default to PPR, and we'll discover whether or not the route supports it with the initial prefetch.\n FetchStrategy.PPR\n : // In the old implementation without runtime prefetches, `prefetch={true}` forces all dynamic data to be prefetched.\n // To preserve backwards-compatibility, anything other than `false`, `null`, or `\"auto\"` results in a full prefetch.\n // (although invalid values should've been filtered out by prop validation in dev)\n FetchStrategy.Full\n }\n}\n","import type { ComponentProps } from 'react'\nimport ClientLinkComponent, { type LinkProps, useLinkStatus } from './link'\n\nexport default function LinkComponent(\n props: ComponentProps<typeof ClientLinkComponent>\n) {\n const isLegacyBehavior = props.legacyBehavior\n const childIsHostComponent =\n typeof props.children === 'string' ||\n typeof props.children === 'number' ||\n typeof (props.children as any)?.type === 'string'\n const childIsClientComponent =\n (props.children as any)?.type?.$$typeof ===\n Symbol.for('react.client.reference')\n\n if (isLegacyBehavior && !childIsHostComponent && !childIsClientComponent) {\n if ((props.children as any)?.type?.$$typeof === Symbol.for('react.lazy')) {\n console.error(\n `Using a Lazy Component as a direct child of \\`<Link legacyBehavior>\\` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n } else {\n console.error(\n `Using a Server Component as a direct child of \\`<Link legacyBehavior>\\` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's \\`<a>\\` tag.`\n )\n }\n }\n\n return <ClientLinkComponent {...props} />\n}\n\nexport { type LinkProps, useLinkStatus }\n","// This file is generated by next-core EcmascriptClientReferenceModule.\nimport { registerClientReference } from \"react-server-dom-turbopack/server\";\nexport default registerClientReference(\n function() { throw new Error(\"Attempted to call the default export of [project]/src/app/teams/[teamId]/team-editor/index.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.\"); },\n \"[project]/src/app/teams/[teamId]/team-editor/index.tsx\",\n \"default\",\n);\n","import Link from \"next/link\";\nimport { unstable_noStore as noStore } from \"next/cache\";\n\nimport { getTeamDisplayName } from \"@/lib/recipes\";\nimport TeamEditor from \"./team-editor\";\n\nexport const dynamic = \"force-dynamic\";\nexport const revalidate = 0;\n\nexport default async function TeamPage({\n params,\n searchParams,\n}: {\n params: Promise<{ teamId: string }>;\n searchParams?: Promise<Record<string, string | string[] | undefined>>;\n}) {\n // Team pages depend on live OpenClaw state; never serve cached HTML.\n noStore();\n\n const { teamId } = await params;\n const sp = (await searchParams) ?? {};\n const tabRaw = sp.tab;\n const tab = Array.isArray(tabRaw) ? tabRaw[0] : tabRaw;\n const name = await getTeamDisplayName(teamId);\n\n return (\n <div className=\"flex flex-col gap-4 p-6\">\n <div className=\"flex flex-wrap items-start justify-between gap-4\">\n <div>\n <div className=\"text-xl font-semibold tracking-tight text-[color:var(--ck-text-primary)]\">\n {name || teamId}\n </div>\n <div className=\"text-xs text-[color:var(--ck-text-tertiary)]\">{teamId}</div>\n </div>\n\n <div className=\"flex items-center gap-3\">\n <Link\n href={`/goals?team=${encodeURIComponent(teamId)}`}\n className=\"text-sm font-medium text-[color:var(--ck-text-secondary)] hover:underline\"\n >\n View goals →\n </Link>\n </div>\n </div>\n\n <TeamEditor teamId={teamId} initialTab={typeof tab === \"string\" ? tab : undefined} />\n </div>\n );\n}\n"],"names":["LinkComponent","useLinkStatus","isModifiedEvent","event","eventTarget","currentTarget","target","getAttribute","metaKey","ctrlKey","shiftKey","altKey","nativeEvent","which","linkClicked","e","href","as","linkInstanceRef","replace","scroll","onNavigate","window","nodeName","isAnchorNodeName","toUpperCase","hasAttribute","isLocalURL","preventDefault","location","isDefaultPrevented","dispatchNavigateAction","require","React","startTransition","current","formatStringOrUrl","urlObjOrString","formatUrl","props","linkStatus","setOptimisticLinkStatus","useOptimistic","IDLE_LINK_STATUS","children","useRef","hrefProp","asProp","childrenProp","prefetch","prefetchProp","passHref","shallow","onClick","onMouseEnter","onMouseEnterProp","onTouchStart","onTouchStartProp","legacyBehavior","ref","forwardedRef","unstable_dynamicOnHover","restProps","a","router","useContext","AppRouterContext","prefetchEnabled","fetchStrategy","getFetchStrategyFromPrefetchProp","FetchStrategy","PPR","process","env","NODE_ENV","createPropError","args","Error","key","expected","actual","requiredPropsGuard","requiredProps","Object","keys","forEach","_","optionalPropsGuard","optionalProps","valType","locale","warnOnce","pathname","hasDynamicSegment","split","some","segment","startsWith","endsWith","useMemo","resolvedHref","child","$$typeof","Symbol","for","console","warn","Children","only","err","type","childRef","observeLinkVisibilityOnMount","useCallback","element","mountLinkInstance","unmountLinkForCurrentNavigation","unmountPrefetchableInstance","mergedRef","useMergedRef","childProps","defaultPrevented","upgradeToDynamicPrefetch","onNavigationIntent","__NEXT_LINK_NO_TOUCH_START","undefined","isAbsoluteUrl","addBasePath","link","errorOnce","cloneElement","LinkStatusContext","Provider","value","createContext","__NEXT_CACHE_COMPONENTS","Full","isLegacyBehavior","childIsHostComponent","childIsClientComponent","error","ClientLinkComponent"],"mappings":"szBAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OAmBO,eAAe,IACpB,IAAM,EAAI,EAAA,OAAI,CAAC,IAAI,CAAC,EAAA,OAAE,CAAC,OAAO,GAAI,YAAa,iBAE/C,OAAO,KAAK,KAAK,CADJ,AACK,MADC,EAAA,OAAE,CAAC,QAAQ,CAAC,EAAG,QAEpC,CAEO,eAAe,IACpB,IAAM,EAAM,MAAM,IACZ,EAAK,EAAI,MAAM,EAAE,UAAU,UACjC,GAAI,CAAC,EAAI,MAAM,AAAI,MAAM,qEACzB,OAAO,CACT,CAuBO,eAAe,EAAoB,CAAc,EACtD,IAAM,EAAO,EAAA,OAAE,CAAC,OAAO,GACvB,GAAI,CAAC,EAAM,MAAM,AAAI,MAAM,oCAC3B,OAAO,EAAA,OAAI,CAAC,IAAI,CAAC,EAAM,YAAa,CAAC,UAAU,EAAE,EAAA,CAAQ,CAC3D,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