@agent-spaces/server 0.3.62 → 0.3.64
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/dist/adapters/agent-runtime-types.js +12 -0
- package/dist/adapters/claude-code-runtime/index.js +3 -0
- package/dist/adapters/claude-code-runtime/message-format.js +1 -1
- package/dist/adapters/codex-runtime.js +2 -2
- package/dist/adapters/git.js +161 -57
- package/dist/adapters/langchain-runtime.js +2 -2
- package/dist/adapters/open-agent-sdk-runtime.js +2 -2
- package/dist/agents/agent-designer.js +66 -12
- package/dist/agents/commit-agent.js +1 -0
- package/dist/agents/issue-agent-progress.js +4 -2
- package/dist/agents/issue-agent-runner.js +5 -5
- package/dist/agents/issue-task-controller.js +96 -15
- package/dist/app.js +123 -5
- package/dist/package.json +1 -1
- package/dist/routes/agent-commands.js +72 -0
- package/dist/routes/agent-sse.js +10 -2
- package/dist/routes/agent.js +15 -1
- package/dist/routes/database.js +345 -0
- package/dist/routes/git.js +52 -1
- package/dist/routes/hooks.js +88 -0
- package/dist/routes/issue.js +59 -1
- package/dist/routes/kanban.js +39 -0
- package/dist/routes/output-style.js +48 -0
- package/dist/routes/prompt-template.js +2 -2
- package/dist/routes/skill.js +86 -15
- package/dist/routes/task.js +13 -1
- package/dist/services/agent-commands.js +168 -0
- package/dist/services/builtin-tools/command-tools.js +117 -0
- package/dist/services/builtin-tools/database-tools.js +578 -0
- package/dist/services/builtin-tools/index.js +5 -0
- package/dist/services/builtin-tools/input-helpers.js +26 -0
- package/dist/services/builtin-tools/issue-tools.js +209 -0
- package/dist/services/builtin-tools/kanban-tools.js +277 -0
- package/dist/services/database-vector.js +244 -0
- package/dist/services/hook-engine.js +118 -0
- package/dist/services/issue.js +6 -0
- package/dist/services/kanban.js +50 -0
- package/dist/services/notification-hub/bot-agent.js +1 -0
- package/dist/services/output-style.js +134 -0
- package/dist/services/prompt-template.js +2 -2
- package/dist/services/skill.js +148 -35
- package/dist/storage/database-store.js +365 -0
- package/dist/storage/hook-store.js +55 -0
- package/dist/storage/kanban-store.js +142 -0
- package/dist/web/404.html +1 -1
- package/dist/web/__next.__PAGE__.txt +4 -4
- package/dist/web/__next._full.txt +26 -30
- package/dist/web/__next._head.txt +4 -4
- package/dist/web/__next._index.txt +14 -14
- package/dist/web/__next._tree.txt +3 -8
- package/dist/web/_next/static/chunks/0-9194nbxy_6d.js +1 -0
- package/dist/web/_next/static/chunks/0-f~0xmwl__u5.js +1 -0
- package/dist/web/_next/static/chunks/0.n~yfwf4~6w-.js +1 -0
- package/dist/web/_next/static/chunks/002_j970b9gdx.js +1 -0
- package/dist/web/_next/static/chunks/01iqv28_snwus.js +1 -0
- package/dist/web/_next/static/chunks/01~quun6sefgl.js +1 -0
- package/dist/web/_next/static/chunks/02mf61htij8g0.js +31 -0
- package/dist/web/_next/static/chunks/03scq1-0ykve3.js +1 -0
- package/dist/web/_next/static/chunks/04a4vsq2wknm4.js +1 -0
- package/dist/web/_next/static/chunks/04dg4l4hv11q2.js +3 -0
- package/dist/web/_next/static/chunks/04fxddw-y20~-.js +7 -0
- package/dist/web/_next/static/chunks/04w7~5ooz_pwm.js +1 -0
- package/dist/web/_next/static/chunks/05oc21sj24wtq.js +1 -0
- package/dist/web/_next/static/chunks/{0zd1o3u04~qvo.js → 05psi2gtx~bev.js} +7 -7
- package/dist/web/_next/static/chunks/{0-oog4zg4_m~m.css → 062f9zqctzg.b.css} +0 -3
- package/dist/web/_next/static/chunks/{12odetnu-lyrr.js → 06whz1~s_7pva.js} +12 -12
- package/dist/web/_next/static/chunks/08ckpwmmwlors.js +3 -0
- package/dist/web/_next/static/chunks/08k~meqbd8d6v.js +1 -0
- package/dist/web/_next/static/chunks/099h96wjsdb25.js +2 -0
- package/dist/web/_next/static/chunks/09h23logvq65m.js +1 -0
- package/dist/web/_next/static/chunks/{0njy89g5coeyi.js → 0_8dm7bxp18xo.js} +6 -6
- package/dist/web/_next/static/chunks/0_mvduwjsm35w.js +1 -0
- package/dist/web/_next/static/chunks/0_vi1a~g4wx46.js +3 -0
- package/dist/web/_next/static/chunks/0a5y-vhf4i5id.js +3 -0
- package/dist/web/_next/static/chunks/0ake2f3x2uan4.js +24 -0
- package/dist/web/_next/static/chunks/{0tvd~rxgf0oh_.js → 0bbmx45w_h5np.js} +1 -1
- package/dist/web/_next/static/chunks/0ck8dw_9-1cdx.js +1 -0
- package/dist/web/_next/static/chunks/{07a0rktf_nr5h.js → 0ctg5qmw7uu.1.js} +2 -2
- package/dist/web/_next/static/chunks/0ewceguykiut5.js +1 -0
- package/dist/web/_next/static/chunks/0f7cb9li~3jra.js +67 -0
- package/dist/web/_next/static/chunks/0fttswpzu69qx.js +1 -0
- package/dist/web/_next/static/chunks/0ghs9on7wodrm.js +1 -0
- package/dist/web/_next/static/chunks/0ghx3j_.-gdyd.js +1 -0
- package/dist/web/_next/static/chunks/{0202ia13sijwb.js → 0h18ej5yf974e.js} +1 -1
- package/dist/web/_next/static/chunks/0h9cu-k6z5o08.js +1 -0
- package/dist/web/_next/static/chunks/0i39jifmxla7q.js +1 -0
- package/dist/web/_next/static/chunks/0iuf30t0rjsjv.js +19 -0
- package/dist/web/_next/static/chunks/0jb4~3qqkw2ps.js +1 -0
- package/dist/web/_next/static/chunks/0k4zdm72k_bfy.js +1 -0
- package/dist/web/_next/static/chunks/{08o-zmr-40r5g.js → 0m11vvph7q94-.js} +1 -1
- package/dist/web/_next/static/chunks/0n6_4so_afuwk.js +71 -0
- package/dist/web/_next/static/chunks/0nb8.iteznuvx.js +1 -0
- package/dist/web/_next/static/chunks/0np.d~hc1-pmh.js +4 -0
- package/dist/web/_next/static/chunks/{0qpq0~_58fe9a.js → 0oaq67r7ix.vg.js} +1 -1
- package/dist/web/_next/static/chunks/{0d_dp_4ofz0l3.css → 0ojcao3hdm36s.css} +0 -1
- package/dist/web/_next/static/chunks/0os58q93stt7j.js +3 -0
- package/dist/web/_next/static/chunks/{0gig.k.rq8d0x.js → 0ppr271hz0xoq.js} +1 -1
- package/dist/web/_next/static/chunks/0s9lmk8iauou3.js +1 -0
- package/dist/web/_next/static/chunks/0sp_zbx~w0am7.js +1 -0
- package/dist/web/_next/static/chunks/0tel~zsv4z8l_.js +1 -0
- package/dist/web/_next/static/chunks/0twamv4wr_dbv.js +1 -0
- package/dist/web/_next/static/chunks/0uhol5wafdbl~.js +1 -0
- package/dist/web/_next/static/chunks/0v3a_x4vt42kx.js +5 -0
- package/dist/web/_next/static/chunks/{002-dxhags4dj.js → 0v6hte2z-32ca.js} +2 -2
- package/dist/web/_next/static/chunks/0v7q4mys.mnm..css +1 -0
- package/dist/web/_next/static/chunks/0vbqaynjq8ga..js +3 -0
- package/dist/web/_next/static/chunks/0xbaakj0dfc0..js +1 -0
- package/dist/web/_next/static/chunks/{0..g0jl-8qup7.js → 0xoo17yef_b8g.js} +1 -1
- package/dist/web/_next/static/chunks/0xt-8wk21gs7g.js +1 -0
- package/dist/web/_next/static/chunks/0za1r07-6az6w.js +1 -0
- package/dist/web/_next/static/chunks/0z~vqzbm_q371.js +1 -0
- package/dist/web/_next/static/chunks/0~3xm80~j9ddg.js +1 -0
- package/dist/web/_next/static/chunks/0~u.5r3-t7179.js +1 -0
- package/dist/web/_next/static/chunks/10l-9myrdo3x9.js +1 -0
- package/dist/web/_next/static/chunks/11-czmcci_55y.js +1 -0
- package/dist/web/_next/static/chunks/11k-.49r~1mfm.js +1 -0
- package/dist/web/_next/static/chunks/{0k.8qdk7oi_os.js → 128ugqd34tr_-.js} +1 -1
- package/dist/web/_next/static/chunks/12jm4gwmvq-0q.js +90 -0
- package/dist/web/_next/static/chunks/{0rke_patcovgr.js → 1442stwa0gbxe.js} +1 -1
- package/dist/web/_next/static/chunks/{0jokpgh485~28.js → 14hqmid8q4apf.js} +11 -11
- package/dist/web/_next/static/chunks/14s37n6h0_q3x.js +16 -0
- package/dist/web/_next/static/chunks/161ik5kfyuwtd.js +1 -0
- package/dist/web/_next/static/chunks/16sg-lflc8csx.js +1 -0
- package/dist/web/_next/static/chunks/17k~zbv0_4rep.js +1 -0
- package/dist/web/_next/static/chunks/17oc2l.ekcs8b.css +1 -0
- package/dist/web/_next/static/chunks/{turbopack-0lrdxynxb9-1t.js → turbopack-0ndm2zc_pdptk.js} +1 -1
- package/dist/web/_not-found/__next._full.txt +30 -31
- package/dist/web/_not-found/__next._head.txt +4 -4
- package/dist/web/_not-found/__next._index.txt +14 -14
- package/dist/web/_not-found/__next._not-found.__PAGE__.txt +2 -2
- package/dist/web/_not-found/__next._not-found.txt +3 -3
- package/dist/web/_not-found/__next._tree.txt +3 -3
- package/dist/web/_not-found.html +1 -1
- package/dist/web/_not-found.txt +30 -31
- package/dist/web/index.html +1 -1
- package/dist/web/index.txt +26 -30
- package/dist/web/login/__next._full.txt +32 -36
- package/dist/web/login/__next._head.txt +4 -4
- package/dist/web/login/__next._index.txt +14 -14
- package/dist/web/login/__next._tree.txt +3 -8
- package/dist/web/login/__next.login.__PAGE__.txt +4 -4
- package/dist/web/login/__next.login.txt +3 -3
- package/dist/web/login.html +1 -1
- package/dist/web/login.txt +32 -36
- package/dist/web/settings/__next._full.txt +29 -34
- package/dist/web/settings/__next._head.txt +4 -4
- package/dist/web/settings/__next._index.txt +14 -14
- package/dist/web/settings/__next._tree.txt +3 -8
- package/dist/web/settings/__next.settings.__PAGE__.txt +4 -4
- package/dist/web/settings/__next.settings.txt +5 -5
- package/dist/web/settings/agents/__next._full.txt +27 -32
- package/dist/web/settings/agents/__next._head.txt +4 -4
- package/dist/web/settings/agents/__next._index.txt +14 -14
- package/dist/web/settings/agents/__next._tree.txt +3 -8
- package/dist/web/settings/agents/__next.settings.agents.__PAGE__.txt +4 -4
- package/dist/web/settings/agents/__next.settings.agents.txt +3 -3
- package/dist/web/settings/agents/__next.settings.txt +5 -5
- package/dist/web/settings/agents.html +1 -1
- package/dist/web/settings/agents.txt +27 -32
- package/dist/web/settings/mcps/__next._full.txt +27 -32
- package/dist/web/settings/mcps/__next._head.txt +4 -4
- package/dist/web/settings/mcps/__next._index.txt +14 -14
- package/dist/web/settings/mcps/__next._tree.txt +3 -8
- package/dist/web/settings/mcps/__next.settings.mcps.__PAGE__.txt +4 -4
- package/dist/web/settings/mcps/__next.settings.mcps.txt +3 -3
- package/dist/web/settings/mcps/__next.settings.txt +5 -5
- package/dist/web/settings/mcps.html +1 -1
- package/dist/web/settings/mcps.txt +27 -32
- package/dist/web/settings/models/__next._full.txt +27 -32
- package/dist/web/settings/models/__next._head.txt +4 -4
- package/dist/web/settings/models/__next._index.txt +14 -14
- package/dist/web/settings/models/__next._tree.txt +3 -8
- package/dist/web/settings/models/__next.settings.models.__PAGE__.txt +4 -4
- package/dist/web/settings/models/__next.settings.models.txt +3 -3
- package/dist/web/settings/models/__next.settings.txt +5 -5
- package/dist/web/settings/models.html +1 -1
- package/dist/web/settings/models.txt +27 -32
- package/dist/web/settings/output-styles/__next._full.txt +38 -0
- package/dist/web/settings/output-styles/__next._head.txt +6 -0
- package/dist/web/settings/output-styles/__next._index.txt +15 -0
- package/dist/web/settings/output-styles/__next._tree.txt +3 -0
- package/dist/web/settings/output-styles/__next.settings.output-styles.__PAGE__.txt +9 -0
- package/dist/web/settings/output-styles/__next.settings.output-styles.txt +5 -0
- package/dist/web/settings/output-styles/__next.settings.txt +7 -0
- package/dist/web/settings/output-styles.html +1 -0
- package/dist/web/settings/output-styles.txt +38 -0
- package/dist/web/settings/prompts/__next._full.txt +27 -32
- package/dist/web/settings/prompts/__next._head.txt +4 -4
- package/dist/web/settings/prompts/__next._index.txt +14 -14
- package/dist/web/settings/prompts/__next._tree.txt +3 -8
- package/dist/web/settings/prompts/__next.settings.prompts.__PAGE__.txt +4 -4
- package/dist/web/settings/prompts/__next.settings.prompts.txt +3 -3
- package/dist/web/settings/prompts/__next.settings.txt +5 -5
- package/dist/web/settings/prompts.html +1 -1
- package/dist/web/settings/prompts.txt +27 -32
- package/dist/web/settings/providers/__next._full.txt +27 -32
- package/dist/web/settings/providers/__next._head.txt +4 -4
- package/dist/web/settings/providers/__next._index.txt +14 -14
- package/dist/web/settings/providers/__next._tree.txt +3 -8
- package/dist/web/settings/providers/__next.settings.providers.__PAGE__.txt +4 -4
- package/dist/web/settings/providers/__next.settings.providers.txt +3 -3
- package/dist/web/settings/providers/__next.settings.txt +5 -5
- package/dist/web/settings/providers.html +1 -1
- package/dist/web/settings/providers.txt +27 -32
- package/dist/web/settings/skills/__next._full.txt +27 -32
- package/dist/web/settings/skills/__next._head.txt +4 -4
- package/dist/web/settings/skills/__next._index.txt +14 -14
- package/dist/web/settings/skills/__next._tree.txt +3 -8
- package/dist/web/settings/skills/__next.settings.skills.__PAGE__.txt +4 -4
- package/dist/web/settings/skills/__next.settings.skills.txt +3 -3
- package/dist/web/settings/skills/__next.settings.txt +5 -5
- package/dist/web/settings/skills.html +1 -1
- package/dist/web/settings/skills.txt +27 -32
- package/dist/web/settings/tools/__next._full.txt +38 -0
- package/dist/web/settings/tools/__next._head.txt +6 -0
- package/dist/web/settings/tools/__next._index.txt +15 -0
- package/dist/web/settings/tools/__next._tree.txt +3 -0
- package/dist/web/settings/tools/__next.settings.tools.__PAGE__.txt +9 -0
- package/dist/web/settings/tools/__next.settings.tools.txt +5 -0
- package/dist/web/settings/tools/__next.settings.txt +7 -0
- package/dist/web/settings/tools.html +1 -0
- package/dist/web/settings/tools.txt +38 -0
- package/dist/web/settings.html +1 -1
- package/dist/web/settings.txt +29 -34
- package/dist/web/workflows/__next._full.txt +34 -37
- package/dist/web/workflows/__next._head.txt +4 -4
- package/dist/web/workflows/__next._index.txt +14 -14
- package/dist/web/workflows/__next._tree.txt +3 -8
- package/dist/web/workflows/__next.workflows.__PAGE__.txt +4 -4
- package/dist/web/workflows/__next.workflows.txt +3 -3
- package/dist/web/workflows.html +1 -1
- package/dist/web/workflows.txt +34 -37
- package/dist/web/workspace/_/__next._full.txt +32 -77
- package/dist/web/workspace/_/__next._head.txt +4 -4
- package/dist/web/workspace/_/__next._index.txt +14 -14
- package/dist/web/workspace/_/__next._tree.txt +4 -23
- package/dist/web/workspace/_/__next.workspace.$d$id.__PAGE__.txt +3 -18
- package/dist/web/workspace/_/__next.workspace.$d$id.txt +3 -3
- package/dist/web/workspace/_/__next.workspace.txt +3 -3
- package/dist/web/workspace/_.html +1 -1
- package/dist/web/workspace/_.txt +32 -77
- package/dist/web/workspaces/__next._full.txt +32 -38
- package/dist/web/workspaces/__next._head.txt +4 -4
- package/dist/web/workspaces/__next._index.txt +14 -14
- package/dist/web/workspaces/__next._tree.txt +3 -8
- package/dist/web/workspaces/__next.workspaces.__PAGE__.txt +4 -4
- package/dist/web/workspaces/__next.workspaces.txt +3 -3
- package/dist/web/workspaces.html +1 -1
- package/dist/web/workspaces.txt +32 -38
- package/dist/ws/agent-prompt.js +45 -8
- package/dist/ws/agent-runner.js +10 -6
- package/package.json +11 -10
- package/public/output-styles/carmack-mode.md +381 -0
- package/public/output-styles/codex-rigor-mode.md +114 -0
- package/public/output-styles/dhh-mode.md +265 -0
- package/public/output-styles/evan-you-mode.md +539 -0
- package/public/output-styles/index.json +37 -0
- package/public/output-styles/jobs-mode.md +369 -0
- package/public/output-styles/linus-mode.md +135 -0
- package/public/output-styles/uncle-bob-mode.md +221 -0
- package/public/prompt/andrej-karpathy-skills.md +65 -0
- package/public/prompt/claude-token-efficient-coding.md +35 -0
- package/public/prompt/index.json +12 -0
- package/public/skills/index.json +92 -0
- package/public/skills/planning-with-files/planning-with-files-zh/SKILL.md +243 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/check-complete.ps1 +44 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/check-complete.sh +46 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/init-session.ps1 +124 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/init-session.sh +124 -0
- package/public/skills/planning-with-files/planning-with-files-zh/scripts/session-catchup.py +438 -0
- package/public/skills/planning-with-files/planning-with-files-zh/templates/findings.md +29 -0
- package/public/skills/planning-with-files/planning-with-files-zh/templates/progress.md +40 -0
- package/public/skills/planning-with-files/planning-with-files-zh/templates/task_plan.md +58 -0
- package/public/skills/superpowers/brainstorming/SKILL.md +164 -0
- package/public/skills/superpowers/brainstorming/scripts/frame-template.html +214 -0
- package/public/skills/superpowers/brainstorming/scripts/helper.js +88 -0
- package/public/skills/superpowers/brainstorming/scripts/server.cjs +354 -0
- package/public/skills/superpowers/brainstorming/scripts/start-server.sh +148 -0
- package/public/skills/superpowers/brainstorming/scripts/stop-server.sh +56 -0
- package/public/skills/superpowers/brainstorming/spec-document-reviewer-prompt.md +49 -0
- package/public/skills/superpowers/brainstorming/visual-companion.md +287 -0
- package/public/skills/superpowers/dispatching-parallel-agents/SKILL.md +182 -0
- package/public/skills/superpowers/executing-plans/SKILL.md +70 -0
- package/public/skills/superpowers/finishing-a-development-branch/SKILL.md +251 -0
- package/public/skills/superpowers/receiving-code-review/SKILL.md +213 -0
- package/public/skills/superpowers/requesting-code-review/SKILL.md +103 -0
- package/public/skills/superpowers/requesting-code-review/code-reviewer.md +168 -0
- package/public/skills/superpowers/subagent-driven-development/SKILL.md +279 -0
- package/public/skills/superpowers/subagent-driven-development/code-quality-reviewer-prompt.md +25 -0
- package/public/skills/superpowers/subagent-driven-development/implementer-prompt.md +113 -0
- package/public/skills/superpowers/subagent-driven-development/spec-reviewer-prompt.md +61 -0
- package/public/skills/superpowers/systematic-debugging/CREATION-LOG.md +119 -0
- package/public/skills/superpowers/systematic-debugging/SKILL.md +296 -0
- package/public/skills/superpowers/systematic-debugging/condition-based-waiting-example.ts +158 -0
- package/public/skills/superpowers/systematic-debugging/condition-based-waiting.md +115 -0
- package/public/skills/superpowers/systematic-debugging/defense-in-depth.md +122 -0
- package/public/skills/superpowers/systematic-debugging/find-polluter.sh +63 -0
- package/public/skills/superpowers/systematic-debugging/root-cause-tracing.md +169 -0
- package/public/skills/superpowers/systematic-debugging/test-academic.md +14 -0
- package/public/skills/superpowers/systematic-debugging/test-pressure-1.md +58 -0
- package/public/skills/superpowers/systematic-debugging/test-pressure-2.md +68 -0
- package/public/skills/superpowers/systematic-debugging/test-pressure-3.md +69 -0
- package/public/skills/superpowers/test-driven-development/SKILL.md +371 -0
- package/public/skills/superpowers/test-driven-development/testing-anti-patterns.md +299 -0
- package/public/skills/superpowers/using-git-worktrees/SKILL.md +215 -0
- package/public/skills/superpowers/using-superpowers/SKILL.md +117 -0
- package/public/skills/superpowers/using-superpowers/references/codex-tools.md +59 -0
- package/public/skills/superpowers/using-superpowers/references/copilot-tools.md +42 -0
- package/public/skills/superpowers/using-superpowers/references/gemini-tools.md +51 -0
- package/public/skills/superpowers/verification-before-completion/SKILL.md +139 -0
- package/public/skills/superpowers/writing-plans/SKILL.md +152 -0
- package/public/skills/superpowers/writing-plans/plan-document-reviewer-prompt.md +49 -0
- package/public/skills/superpowers/writing-skills/SKILL.md +655 -0
- package/public/skills/superpowers/writing-skills/anthropic-best-practices.md +1150 -0
- package/public/skills/superpowers/writing-skills/examples/CLAUDE_MD_TESTING.md +189 -0
- package/public/skills/superpowers/writing-skills/graphviz-conventions.dot +172 -0
- package/public/skills/superpowers/writing-skills/persuasion-principles.md +187 -0
- package/public/skills/superpowers/writing-skills/render-graphs.js +168 -0
- package/public/skills/superpowers/writing-skills/testing-skills-with-subagents.md +384 -0
- package/dist/web/_next/static/chunks/0-81wi7xr2nd-.js +0 -270
- package/dist/web/_next/static/chunks/00lca9lsasdm7.js +0 -1
- package/dist/web/_next/static/chunks/01gi~q0c6ez6..js +0 -1
- package/dist/web/_next/static/chunks/02shswpmybici.js +0 -1
- package/dist/web/_next/static/chunks/05tx6hzdtkgi9.js +0 -2
- package/dist/web/_next/static/chunks/07nbyndvzftr1.js +0 -3
- package/dist/web/_next/static/chunks/0bn~onkv~9xza.js +0 -1
- package/dist/web/_next/static/chunks/0g-0n6glz_z6w.js +0 -1
- package/dist/web/_next/static/chunks/0gyede80jpy3n.js +0 -4
- package/dist/web/_next/static/chunks/0hrbuvzuxrjfl.js +0 -1
- package/dist/web/_next/static/chunks/0i51q.5s_-.vh.css +0 -1
- package/dist/web/_next/static/chunks/0qf163pbrwy4z.js +0 -1
- package/dist/web/_next/static/chunks/0rnt-f3pjxb-d.js +0 -5
- package/dist/web/_next/static/chunks/0tgbcgsca9mrg.js +0 -1
- package/dist/web/_next/static/chunks/0tyhv6.y7~yxd.js +0 -1
- package/dist/web/_next/static/chunks/0u7_qd9hzqwac.js +0 -1
- package/dist/web/_next/static/chunks/0vuvql8rloda5.js +0 -1
- package/dist/web/_next/static/chunks/0wv0h27jafag4.js +0 -1
- package/dist/web/_next/static/chunks/0wwvc4zc2q6bn.js +0 -1
- package/dist/web/_next/static/chunks/0xmmk3vebw8xs.js +0 -1
- package/dist/web/_next/static/chunks/0xwqf.llmm_u2.js +0 -31
- package/dist/web/_next/static/chunks/0yo22_w53mo~5.js +0 -1
- package/dist/web/_next/static/chunks/12c0jp0qvlr1t.js +0 -1
- package/dist/web/_next/static/chunks/12pg1nn3v~~5k.js +0 -1
- package/dist/web/_next/static/chunks/16cyr8ilpx1nn.js +0 -1
- package/dist/web/_next/static/media/0a7740363b4d4863-s.1110aazvokzp..woff2 +0 -0
- package/dist/web/_next/static/media/0da9c7f357bd9d4d-s.0ek5sshv8wk3m.woff2 +0 -0
- package/dist/web/_next/static/media/1b99372b3eaef0c8-s.p.0gx2haw2tmll8.woff2 +0 -0
- package/dist/web/_next/static/media/41e95f694c5c4549-s.0r1jrq7neqdsq.woff2 +0 -0
- package/dist/web/_next/static/media/5c285b27cdda1fe8-s.p.0yo6-5yoeeudq.woff2 +0 -0
- package/dist/web/_next/static/media/5f9d24ebef5d5292-s.0esuu2f5si~v8.woff2 +0 -0
- package/dist/web/_next/static/media/6c55a692938ebbbc-s.0g6rbszwfgn9y.woff2 +0 -0
- package/dist/web/_next/static/media/8e6fa89aa22d24ec-s.p.0uvzar8hswo3p.woff2 +0 -0
- package/dist/web/_next/static/media/a218039a3287bcfd-s.p.17-1enzs_j91b.woff2 +0 -0
- package/dist/web/_next/static/media/b2ea385cb5ae8625-s.0kjod.kaq1k69.woff2 +0 -0
- package/dist/web/_next/static/media/bdc7e24a509eb931-s.0apt5mko2.qn3.woff2 +0 -0
- package/dist/web/_next/static/media/c3cb240f9c892514-s.163v2i5cux7-c.woff2 +0 -0
- package/dist/web/_next/static/media/e2334d715941921e-s.p.12skym0rqknxy.woff2 +0 -0
- package/public/avatars/1777813826407-bea0ja-minimax.svg +0 -1
- package/public/avatars/1777813967088-3xlvd0-minimax.svg +0 -1
- package/public/avatars/1777814041714-yp0qeq-minimax.svg +0 -1
- package/public/avatars/1777904986095-rg26je-icon.png +0 -0
- package/public/avatars/1778953228323-5je54x-user.jpg +0 -0
- package/public/avatars/1778954057880-g01q6y-user.jpg +0 -0
- /package/dist/web/_next/static/{GS3b40oeaeLxm7i9-ibaj → e8w3vd9Eov_LDYWj_0zsE}/_buildManifest.js +0 -0
- /package/dist/web/_next/static/{GS3b40oeaeLxm7i9-ibaj → e8w3vd9Eov_LDYWj_0zsE}/_clientMiddlewareManifest.js +0 -0
- /package/dist/web/_next/static/{GS3b40oeaeLxm7i9-ibaj → e8w3vd9Eov_LDYWj_0zsE}/_ssgManifest.js +0 -0
- /package/public/avatars/{1777815865622-08wp9m-user.jpg → user.jpg} +0 -0
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,553030,(e,t,i)=>{var r={675:function(e,t){"use strict";t.byteLength=function(e){var t=l(e),i=t[0],r=t[1];return(i+r)*3/4-r},t.toByteArray=function(e){var t,i,s=l(e),o=s[0],a=s[1],u=new n((o+a)*3/4-a),c=0,f=a>0?o-4:o;for(i=0;i<f;i+=4)t=r[e.charCodeAt(i)]<<18|r[e.charCodeAt(i+1)]<<12|r[e.charCodeAt(i+2)]<<6|r[e.charCodeAt(i+3)],u[c++]=t>>16&255,u[c++]=t>>8&255,u[c++]=255&t;return 2===a&&(t=r[e.charCodeAt(i)]<<2|r[e.charCodeAt(i+1)]>>4,u[c++]=255&t),1===a&&(t=r[e.charCodeAt(i)]<<10|r[e.charCodeAt(i+1)]<<4|r[e.charCodeAt(i+2)]>>2,u[c++]=t>>8&255,u[c++]=255&t),u},t.fromByteArray=function(e){for(var t,r=e.length,n=r%3,s=[],o=0,a=r-n;o<a;o+=16383)s.push(function(e,t,r){for(var n,s=[],o=t;o<r;o+=3)n=(e[o]<<16&0xff0000)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(i[n>>18&63]+i[n>>12&63]+i[n>>6&63]+i[63&n]);return s.join("")}(e,o,o+16383>a?a:o+16383));return 1===n?s.push(i[(t=e[r-1])>>2]+i[t<<4&63]+"=="):2===n&&s.push(i[(t=(e[r-2]<<8)+e[r-1])>>10]+i[t>>4&63]+i[t<<2&63]+"="),s.join("")};for(var i=[],r=[],n="u">typeof Uint8Array?Uint8Array:Array,s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,a=s.length;o<a;++o)i[o]=s[o],r[s.charCodeAt(o)]=o;function l(e){var t=e.length;if(t%4>0)throw Error("Invalid string. Length must be a multiple of 4");var i=e.indexOf("=");-1===i&&(i=t);var r=i===t?0:4-i%4;return[i,r]}r[45]=62,r[95]=63},72:function(e,t,i){"use strict";var r=i(675),n=i(783),s="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;function o(e){if(e>0x7fffffff)throw RangeError('The value "'+e+'" is invalid for option "size"');var t=new Uint8Array(e);return Object.setPrototypeOf(t,a.prototype),t}function a(e,t,i){if("number"==typeof e){if("string"==typeof t)throw TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,i)}function l(e,t,i){if("string"==typeof e){var r=e,n=t;if(("string"!=typeof n||""===n)&&(n="utf8"),!a.isEncoding(n))throw TypeError("Unknown encoding: "+n);var s=0|d(r,n),l=o(s),u=l.write(r,n);return u!==s&&(l=l.slice(0,u)),l}if(ArrayBuffer.isView(e))return f(e);if(null==e)throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(O(e,ArrayBuffer)||e&&O(e.buffer,ArrayBuffer)||"u">typeof SharedArrayBuffer&&(O(e,SharedArrayBuffer)||e&&O(e.buffer,SharedArrayBuffer)))return function(e,t,i){var r;if(t<0||e.byteLength<t)throw RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(i||0))throw RangeError('"length" is outside of buffer bounds');return Object.setPrototypeOf(r=void 0===t&&void 0===i?new Uint8Array(e):void 0===i?new Uint8Array(e,t):new Uint8Array(e,t,i),a.prototype),r}(e,t,i);if("number"==typeof e)throw TypeError('The "value" argument must not be of type number. Received type number');var c=e.valueOf&&e.valueOf();if(null!=c&&c!==e)return a.from(c,t,i);var h=function(e){if(a.isBuffer(e)){var t=0|p(e.length),i=o(t);return 0===i.length||e.copy(i,0,0,t),i}return void 0!==e.length?"number"!=typeof e.length||function(e){return e!=e}(e.length)?o(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(h)return h;if("u">typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return a.from(e[Symbol.toPrimitive]("string"),t,i);throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function u(e){if("number"!=typeof e)throw TypeError('"size" argument must be of type number');if(e<0)throw RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return u(e),o(e<0?0:0|p(e))}function f(e){for(var t=e.length<0?0:0|p(e.length),i=o(t),r=0;r<t;r+=1)i[r]=255&e[r];return i}t.Buffer=a,t.SlowBuffer=function(e){return+e!=e&&(e=0),a.alloc(+e)},t.INSPECT_MAX_BYTES=50,t.kMaxLength=0x7fffffff,a.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),!a.TYPED_ARRAY_SUPPORT&&"u">typeof console&&"function"==typeof console.error&&console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(e,t,i){return l(e,t,i)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(e,t,i){return(u(e),e<=0)?o(e):void 0!==t?"string"==typeof i?o(e).fill(t,i):o(e).fill(t):o(e)},a.allocUnsafe=function(e){return c(e)},a.allocUnsafeSlow=function(e){return c(e)};function p(e){if(e>=0x7fffffff)throw RangeError("Attempt to allocate Buffer larger than maximum size: 0x7fffffff bytes");return 0|e}function d(e,t){if(a.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||O(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var i=e.length,r=arguments.length>2&&!0===arguments[2];if(!r&&0===i)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return i;case"utf8":case"utf-8":return E(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*i;case"hex":return i>>>1;case"base64":return P(e).length;default:if(n)return r?-1:E(e).length;t=(""+t).toLowerCase(),n=!0}}function h(e,t,i){var n,s,o,a=!1;if((void 0===t||t<0)&&(t=0),t>this.length||((void 0===i||i>this.length)&&(i=this.length),i<=0||(i>>>=0)<=(t>>>=0)))return"";for(e||(e="utf8");;)switch(e){case"hex":return function(e,t,i){var r=e.length;(!t||t<0)&&(t=0),(!i||i<0||i>r)&&(i=r);for(var n="",s=t;s<i;++s)n+=R[e[s]];return n}(this,t,i);case"utf8":case"utf-8":return _(this,t,i);case"ascii":return function(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(127&e[n]);return r}(this,t,i);case"latin1":case"binary":return function(e,t,i){var r="";i=Math.min(e.length,i);for(var n=t;n<i;++n)r+=String.fromCharCode(e[n]);return r}(this,t,i);case"base64":return n=this,s=t,o=i,0===s&&o===n.length?r.fromByteArray(n):r.fromByteArray(n.slice(s,o));case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return function(e,t,i){for(var r=e.slice(t,i),n="",s=0;s<r.length;s+=2)n+=String.fromCharCode(r[s]+256*r[s+1]);return n}(this,t,i);default:if(a)throw TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function g(e,t,i){var r=e[t];e[t]=e[i],e[i]=r}function m(e,t,i,r,n){var s;if(0===e.length)return -1;if("string"==typeof i?(r=i,i=0):i>0x7fffffff?i=0x7fffffff:i<-0x80000000&&(i=-0x80000000),(s=i*=1)!=s&&(i=n?0:e.length-1),i<0&&(i=e.length+i),i>=e.length)if(n)return -1;else i=e.length-1;else if(i<0)if(!n)return -1;else i=0;if("string"==typeof t&&(t=a.from(t,r)),a.isBuffer(t))return 0===t.length?-1:y(e,t,i,r,n);if("number"==typeof t){if(t&=255,"function"==typeof Uint8Array.prototype.indexOf)if(n)return Uint8Array.prototype.indexOf.call(e,t,i);else return Uint8Array.prototype.lastIndexOf.call(e,t,i);return y(e,[t],i,r,n)}throw TypeError("val must be string, number or Buffer")}function y(e,t,i,r,n){var s,o=1,a=e.length,l=t.length;if(void 0!==r&&("ucs2"===(r=String(r).toLowerCase())||"ucs-2"===r||"utf16le"===r||"utf-16le"===r)){if(e.length<2||t.length<2)return -1;o=2,a/=2,l/=2,i/=2}function u(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(n){var c=-1;for(s=i;s<a;s++)if(u(e,s)===u(t,-1===c?0:s-c)){if(-1===c&&(c=s),s-c+1===l)return c*o}else -1!==c&&(s-=s-c),c=-1}else for(i+l>a&&(i=a-l),s=i;s>=0;s--){for(var f=!0,p=0;p<l;p++)if(u(e,s+p)!==u(t,p)){f=!1;break}if(f)return s}return -1}a.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==a.prototype},a.compare=function(e,t){if(O(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),O(t,Uint8Array)&&(t=a.from(t,t.offset,t.byteLength)),!a.isBuffer(e)||!a.isBuffer(t))throw TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;for(var i=e.length,r=t.length,n=0,s=Math.min(i,r);n<s;++n)if(e[n]!==t[n]){i=e[n],r=t[n];break}return i<r?-1:+(r<i)},a.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},a.concat=function(e,t){if(!Array.isArray(e))throw TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return a.alloc(0);if(void 0===t)for(i=0,t=0;i<e.length;++i)t+=e[i].length;var i,r=a.allocUnsafe(t),n=0;for(i=0;i<e.length;++i){var s=e[i];if(O(s,Uint8Array)&&(s=a.from(s)),!a.isBuffer(s))throw TypeError('"list" argument must be an Array of Buffers');s.copy(r,n),n+=s.length}return r},a.byteLength=d,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)g(this,t,t+1);return this},a.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)g(this,t,t+3),g(this,t+1,t+2);return this},a.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},a.prototype.toString=function(){var e=this.length;return 0===e?"":0==arguments.length?_(this,0,e):h.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(e){if(!a.isBuffer(e))throw TypeError("Argument must be a Buffer");return this===e||0===a.compare(this,e)},a.prototype.inspect=function(){var e="",i=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,i).replace(/(.{2})/g,"$1 ").trim(),this.length>i&&(e+=" ... "),"<Buffer "+e+">"},s&&(a.prototype[s]=a.prototype.inspect),a.prototype.compare=function(e,t,i,r,n){if(O(e,Uint8Array)&&(e=a.from(e,e.offset,e.byteLength)),!a.isBuffer(e))throw TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===i&&(i=e?e.length:0),void 0===r&&(r=0),void 0===n&&(n=this.length),t<0||i>e.length||r<0||n>this.length)throw RangeError("out of range index");if(r>=n&&t>=i)return 0;if(r>=n)return -1;if(t>=i)return 1;if(t>>>=0,i>>>=0,r>>>=0,n>>>=0,this===e)return 0;for(var s=n-r,o=i-t,l=Math.min(s,o),u=this.slice(r,n),c=e.slice(t,i),f=0;f<l;++f)if(u[f]!==c[f]){s=u[f],o=c[f];break}return s<o?-1:+(o<s)},a.prototype.includes=function(e,t,i){return -1!==this.indexOf(e,t,i)},a.prototype.indexOf=function(e,t,i){return m(this,e,t,i,!0)},a.prototype.lastIndexOf=function(e,t,i){return m(this,e,t,i,!1)};function _(e,t,i){i=Math.min(e.length,i);for(var r=[],n=t;n<i;){var s,o,a,l,u=e[n],c=null,f=u>239?4:u>223?3:u>191?2:1;if(n+f<=i)switch(f){case 1:u<128&&(c=u);break;case 2:(192&(s=e[n+1]))==128&&(l=(31&u)<<6|63&s)>127&&(c=l);break;case 3:s=e[n+1],o=e[n+2],(192&s)==128&&(192&o)==128&&(l=(15&u)<<12|(63&s)<<6|63&o)>2047&&(l<55296||l>57343)&&(c=l);break;case 4:s=e[n+1],o=e[n+2],a=e[n+3],(192&s)==128&&(192&o)==128&&(192&a)==128&&(l=(15&u)<<18|(63&s)<<12|(63&o)<<6|63&a)>65535&&l<1114112&&(c=l)}null===c?(c=65533,f=1):c>65535&&(c-=65536,r.push(c>>>10&1023|55296),c=56320|1023&c),r.push(c),n+=f}var p=r,d=p.length;if(d<=4096)return String.fromCharCode.apply(String,p);for(var h="",g=0;g<d;)h+=String.fromCharCode.apply(String,p.slice(g,g+=4096));return h}function v(e,t,i){if(e%1!=0||e<0)throw RangeError("offset is not uint");if(e+t>i)throw RangeError("Trying to access beyond buffer length")}function b(e,t,i,r,n,s){if(!a.isBuffer(e))throw TypeError('"buffer" argument must be a Buffer instance');if(t>n||t<s)throw RangeError('"value" argument is out of bounds');if(i+r>e.length)throw RangeError("Index out of range")}function j(e,t,i,r,n,s){if(i+r>e.length||i<0)throw RangeError("Index out of range")}function k(e,t,i,r,s){return t*=1,i>>>=0,s||j(e,t,i,4,34028234663852886e22,-34028234663852886e22),n.write(e,t,i,r,23,4),i+4}function x(e,t,i,r,s){return t*=1,i>>>=0,s||j(e,t,i,8,17976931348623157e292,-17976931348623157e292),n.write(e,t,i,r,52,8),i+8}a.prototype.write=function(e,t,i,r){if(void 0===t)r="utf8",i=this.length,t=0;else if(void 0===i&&"string"==typeof t)r=t,i=this.length,t=0;else if(isFinite(t))t>>>=0,isFinite(i)?(i>>>=0,void 0===r&&(r="utf8")):(r=i,i=void 0);else throw Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var n,s,o,a,l,u,c,f,p=this.length-t;if((void 0===i||i>p)&&(i=p),e.length>0&&(i<0||t<0)||t>this.length)throw RangeError("Attempt to write outside buffer bounds");r||(r="utf8");for(var d=!1;;)switch(r){case"hex":return function(e,t,i,r){i=Number(i)||0;var n=e.length-i;r?(r=Number(r))>n&&(r=n):r=n;var s=t.length;r>s/2&&(r=s/2);for(var o=0;o<r;++o){var a,l=parseInt(t.substr(2*o,2),16);if((a=l)!=a)break;e[i+o]=l}return o}(this,e,t,i);case"utf8":case"utf-8":return n=t,s=i,C(E(e,this.length-n),this,n,s);case"ascii":return o=t,a=i,C(S(e),this,o,a);case"latin1":case"binary":return function(e,t,i,r){return C(S(t),e,i,r)}(this,e,t,i);case"base64":return l=t,u=i,C(P(e),this,l,u);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return c=t,f=i,C(function(e,t){for(var i,r,n=[],s=0;s<e.length&&!((t-=2)<0);++s)r=(i=e.charCodeAt(s))>>8,n.push(i%256),n.push(r);return n}(e,this.length-c),this,c,f);default:if(d)throw TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),d=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},a.prototype.slice=function(e,t){var i=this.length;e=~~e,t=void 0===t?i:~~t,e<0?(e+=i)<0&&(e=0):e>i&&(e=i),t<0?(t+=i)<0&&(t=0):t>i&&(t=i),t<e&&(t=e);var r=this.subarray(e,t);return Object.setPrototypeOf(r,a.prototype),r},a.prototype.readUIntLE=function(e,t,i){e>>>=0,t>>>=0,i||v(e,t,this.length);for(var r=this[e],n=1,s=0;++s<t&&(n*=256);)r+=this[e+s]*n;return r},a.prototype.readUIntBE=function(e,t,i){e>>>=0,t>>>=0,i||v(e,t,this.length);for(var r=this[e+--t],n=1;t>0&&(n*=256);)r+=this[e+--t]*n;return r},a.prototype.readUInt8=function(e,t){return e>>>=0,t||v(e,1,this.length),this[e]},a.prototype.readUInt16LE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]|this[e+1]<<8},a.prototype.readUInt16BE=function(e,t){return e>>>=0,t||v(e,2,this.length),this[e]<<8|this[e+1]},a.prototype.readUInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+0x1000000*this[e+3]},a.prototype.readUInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),0x1000000*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},a.prototype.readIntLE=function(e,t,i){e>>>=0,t>>>=0,i||v(e,t,this.length);for(var r=this[e],n=1,s=0;++s<t&&(n*=256);)r+=this[e+s]*n;return r>=(n*=128)&&(r-=Math.pow(2,8*t)),r},a.prototype.readIntBE=function(e,t,i){e>>>=0,t>>>=0,i||v(e,t,this.length);for(var r=t,n=1,s=this[e+--r];r>0&&(n*=256);)s+=this[e+--r]*n;return s>=(n*=128)&&(s-=Math.pow(2,8*t)),s},a.prototype.readInt8=function(e,t){return(e>>>=0,t||v(e,1,this.length),128&this[e])?-((255-this[e]+1)*1):this[e]},a.prototype.readInt16LE=function(e,t){e>>>=0,t||v(e,2,this.length);var i=this[e]|this[e+1]<<8;return 32768&i?0xffff0000|i:i},a.prototype.readInt16BE=function(e,t){e>>>=0,t||v(e,2,this.length);var i=this[e+1]|this[e]<<8;return 32768&i?0xffff0000|i:i},a.prototype.readInt32LE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},a.prototype.readInt32BE=function(e,t){return e>>>=0,t||v(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},a.prototype.readFloatLE=function(e,t){return e>>>=0,t||v(e,4,this.length),n.read(this,e,!0,23,4)},a.prototype.readFloatBE=function(e,t){return e>>>=0,t||v(e,4,this.length),n.read(this,e,!1,23,4)},a.prototype.readDoubleLE=function(e,t){return e>>>=0,t||v(e,8,this.length),n.read(this,e,!0,52,8)},a.prototype.readDoubleBE=function(e,t){return e>>>=0,t||v(e,8,this.length),n.read(this,e,!1,52,8)},a.prototype.writeUIntLE=function(e,t,i,r){if(e*=1,t>>>=0,i>>>=0,!r){var n=Math.pow(2,8*i)-1;b(this,e,t,i,n,0)}var s=1,o=0;for(this[t]=255&e;++o<i&&(s*=256);)this[t+o]=e/s&255;return t+i},a.prototype.writeUIntBE=function(e,t,i,r){if(e*=1,t>>>=0,i>>>=0,!r){var n=Math.pow(2,8*i)-1;b(this,e,t,i,n,0)}var s=i-1,o=1;for(this[t+s]=255&e;--s>=0&&(o*=256);)this[t+s]=e/o&255;return t+i},a.prototype.writeUInt8=function(e,t,i){return e*=1,t>>>=0,i||b(this,e,t,1,255,0),this[t]=255&e,t+1},a.prototype.writeUInt16LE=function(e,t,i){return e*=1,t>>>=0,i||b(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeUInt16BE=function(e,t,i){return e*=1,t>>>=0,i||b(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeUInt32LE=function(e,t,i){return e*=1,t>>>=0,i||b(this,e,t,4,0xffffffff,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},a.prototype.writeUInt32BE=function(e,t,i){return e*=1,t>>>=0,i||b(this,e,t,4,0xffffffff,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeIntLE=function(e,t,i,r){if(e*=1,t>>>=0,!r){var n=Math.pow(2,8*i-1);b(this,e,t,i,n-1,-n)}var s=0,o=1,a=0;for(this[t]=255&e;++s<i&&(o*=256);)e<0&&0===a&&0!==this[t+s-1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+i},a.prototype.writeIntBE=function(e,t,i,r){if(e*=1,t>>>=0,!r){var n=Math.pow(2,8*i-1);b(this,e,t,i,n-1,-n)}var s=i-1,o=1,a=0;for(this[t+s]=255&e;--s>=0&&(o*=256);)e<0&&0===a&&0!==this[t+s+1]&&(a=1),this[t+s]=(e/o|0)-a&255;return t+i},a.prototype.writeInt8=function(e,t,i){return e*=1,t>>>=0,i||b(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},a.prototype.writeInt16LE=function(e,t,i){return e*=1,t>>>=0,i||b(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},a.prototype.writeInt16BE=function(e,t,i){return e*=1,t>>>=0,i||b(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},a.prototype.writeInt32LE=function(e,t,i){return e*=1,t>>>=0,i||b(this,e,t,4,0x7fffffff,-0x80000000),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},a.prototype.writeInt32BE=function(e,t,i){return e*=1,t>>>=0,i||b(this,e,t,4,0x7fffffff,-0x80000000),e<0&&(e=0xffffffff+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},a.prototype.writeFloatLE=function(e,t,i){return k(this,e,t,!0,i)},a.prototype.writeFloatBE=function(e,t,i){return k(this,e,t,!1,i)},a.prototype.writeDoubleLE=function(e,t,i){return x(this,e,t,!0,i)},a.prototype.writeDoubleBE=function(e,t,i){return x(this,e,t,!1,i)},a.prototype.copy=function(e,t,i,r){if(!a.isBuffer(e))throw TypeError("argument should be a Buffer");if(i||(i=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<i&&(r=i),r===i||0===e.length||0===this.length)return 0;if(t<0)throw RangeError("targetStart out of bounds");if(i<0||i>=this.length)throw RangeError("Index out of range");if(r<0)throw RangeError("sourceEnd out of bounds");r>this.length&&(r=this.length),e.length-t<r-i&&(r=e.length-t+i);var n=r-i;if(this===e&&"function"==typeof Uint8Array.prototype.copyWithin)this.copyWithin(t,i,r);else if(this===e&&i<t&&t<r)for(var s=n-1;s>=0;--s)e[s+t]=this[s+i];else Uint8Array.prototype.set.call(e,this.subarray(i,r),t);return n},a.prototype.fill=function(e,t,i,r){if("string"==typeof e){if("string"==typeof t?(r=t,t=0,i=this.length):"string"==typeof i&&(r=i,i=this.length),void 0!==r&&"string"!=typeof r)throw TypeError("encoding must be a string");if("string"==typeof r&&!a.isEncoding(r))throw TypeError("Unknown encoding: "+r);if(1===e.length){var n,s=e.charCodeAt(0);("utf8"===r&&s<128||"latin1"===r)&&(e=s)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<i)throw RangeError("Out of range index");if(i<=t)return this;if(t>>>=0,i=void 0===i?this.length:i>>>0,e||(e=0),"number"==typeof e)for(n=t;n<i;++n)this[n]=e;else{var o=a.isBuffer(e)?e:a.from(e,r),l=o.length;if(0===l)throw TypeError('The value "'+e+'" is invalid for argument "value"');for(n=0;n<i-t;++n)this[n+t]=o[n%l]}return this};var w=/[^+/0-9A-Za-z-_]/g;function E(e,t){t=t||1/0;for(var i,r=e.length,n=null,s=[],o=0;o<r;++o){if((i=e.charCodeAt(o))>55295&&i<57344){if(!n){if(i>56319||o+1===r){(t-=3)>-1&&s.push(239,191,189);continue}n=i;continue}if(i<56320){(t-=3)>-1&&s.push(239,191,189),n=i;continue}i=(n-55296<<10|i-56320)+65536}else n&&(t-=3)>-1&&s.push(239,191,189);if(n=null,i<128){if((t-=1)<0)break;s.push(i)}else if(i<2048){if((t-=2)<0)break;s.push(i>>6|192,63&i|128)}else if(i<65536){if((t-=3)<0)break;s.push(i>>12|224,i>>6&63|128,63&i|128)}else if(i<1114112){if((t-=4)<0)break;s.push(i>>18|240,i>>12&63|128,i>>6&63|128,63&i|128)}else throw Error("Invalid code point")}return s}function S(e){for(var t=[],i=0;i<e.length;++i)t.push(255&e.charCodeAt(i));return t}function P(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(w,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function C(e,t,i,r){for(var n=0;n<r&&!(n+i>=t.length)&&!(n>=e.length);++n)t[n+i]=e[n];return n}function O(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}var R=function(){for(var e="0123456789abcdef",t=Array(256),i=0;i<16;++i)for(var r=16*i,n=0;n<16;++n)t[r+n]=e[i]+e[n];return t}()},783:function(e,t){t.read=function(e,t,i,r,n){var s,o,a=8*n-r-1,l=(1<<a)-1,u=l>>1,c=-7,f=i?n-1:0,p=i?-1:1,d=e[t+f];for(f+=p,s=d&(1<<-c)-1,d>>=-c,c+=a;c>0;s=256*s+e[t+f],f+=p,c-=8);for(o=s&(1<<-c)-1,s>>=-c,c+=r;c>0;o=256*o+e[t+f],f+=p,c-=8);if(0===s)s=1-u;else{if(s===l)return o?NaN:1/0*(d?-1:1);o+=Math.pow(2,r),s-=u}return(d?-1:1)*o*Math.pow(2,s-r)},t.write=function(e,t,i,r,n,s){var o,a,l,u=8*s-n-1,c=(1<<u)-1,f=c>>1,p=5960464477539062e-23*(23===n),d=r?0:s-1,h=r?1:-1,g=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(a=+!!isNaN(t),o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=p/l:t+=p*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(a=0,o=c):o+f>=1?(a=(t*l-1)*Math.pow(2,n),o+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,n),o=0));n>=8;e[i+d]=255&a,d+=h,a/=256,n-=8);for(o=o<<n|a,u+=n;u>0;e[i+d]=255&o,d+=h,o/=256,u-=8);e[i+d-h]|=128*g}}},n={};function s(e){var t=n[e];if(void 0!==t)return t.exports;var i=n[e]={exports:{}},o=!0;try{r[e](i,i.exports,s),o=!1}finally{o&&delete n[e]}return i.exports}s.ab="/ROOT/node_modules/.pnpm/next@16.2.4_@babel+core@7.29.0_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/next/dist/compiled/buffer/",t.exports=s(72)},940361,e=>{"use strict";var t=e.i(344180);e.s([],2365),e.i(2365);var i=e.i(764556),r=e.i(394822),n=e.i(174465),s=e.i(648224),o=e.i(35359);e.i(8890);var a=e.i(422561),l=e.i(526850),u=e.i(232449),c=e.i(410421),f=e.i(150129),p=e.i(969490),d=e.i(602453),h=e.i(817955),g=e.i(742665),m=e.i(87709);let y=i.forwardRef(function(e,t){let{render:r,className:s,style:y,..._}=e,{setAnchor:v,actionsRef:b,internalBackdropRef:j,backdropRef:k,positionerRef:x,allowMouseUpTriggerRef:w,initialCursorPointRef:E,rootId:S}=(0,n.useContextMenuRootContext)(!1),{store:P}=(0,o.useMenuRootContext)(!1),C=P.useState("open"),O=P.useState("disabled"),R=i.useRef(null),M=i.useRef(null),I=(0,u.useTimeout)(),A=(0,u.useTimeout)(),L=i.useRef(!1);function T(e,t,i){let r=i.type.startsWith("touch");E.current={x:e,y:t},v({getBoundingClientRect:()=>DOMRect.fromRect({width:10*!!r,height:10*!!r,x:e,y:t})}),L.current=!1,b.current?.setOpen(!0,(0,d.createChangeEventDetails)(g.REASONS.triggerPress,i)),A.start(500,()=>{L.current=!0})}function z(){I.clear(),M.current=null}return i.useEffect(()=>{let e=(0,l.ownerDocument)(R.current);return(0,a.addEventListener)(e,"contextmenu",function(e){if(O)return;let t=(0,c.getTarget)(e);((0,c.contains)(R.current,t)||(0,c.contains)(j.current,t)||(0,c.contains)(k.current,t))&&e.preventDefault()})},[k,O,j]),(0,p.useRenderElement)("div",e,{state:{open:C},ref:[R,t],props:[{onContextMenu:function(e){if(O)return;w.current=!0,(0,f.stopEvent)(e),T(e.clientX,e.clientY,e.nativeEvent);let t=(0,l.ownerDocument)(R.current);(0,a.addEventListener)(t,"mouseup",e=>{if(w.current=!1,!L.current)return;A.clear(),L.current=!1;let t=(0,c.getTarget)(e);(0,c.contains)(x.current,t)||S&&t&&(0,m.findRootOwnerId)(t)===S||b.current?.setOpen(!1,(0,d.createChangeEventDetails)(g.REASONS.cancelOpen,e))},{once:!0})},onTouchStart:function(e){if(!O&&(w.current=!1,1===e.touches.length)){e.stopPropagation();let t=e.touches[0];M.current={x:t.clientX,y:t.clientY},I.start(500,()=>{M.current&&T(M.current.x,M.current.y,e.nativeEvent)})}},onTouchMove:function(e){if(I.isStarted()&&M.current&&1===e.touches.length){let t=e.touches[0],i=Math.abs(t.clientX-M.current.x),r=Math.abs(t.clientY-M.current.y);(i>10||r>10)&&I.clear()}},onTouchEnd:z,onTouchCancel:z,style:{WebkitTouchCallout:"none"}},_],stateAttributesMapping:h.pressableTriggerOpenStateMapping})});var _=e.i(487455),v=e.i(293209),b=e.i(503662),j=e.i(33427),k=e.i(324573),x=e.i(582883),w=e.i(277658),E=e.i(349204),S=e.i(28051),P=e.i(597375),C=e.i(81752),O=e.i(59354),R=e.i(300637),M=e.i(281478),I=e.i(65255),A=e.i(327794),L=e.i(362962);e.s(["Arrow",()=>k.MenuArrow,"Backdrop",()=>_.MenuBackdrop,"CheckboxItem",()=>S.MenuCheckboxItem,"CheckboxItemIndicator",()=>P.MenuCheckboxItemIndicator,"Group",()=>x.MenuGroup,"GroupLabel",()=>w.MenuGroupLabel,"Item",()=>E.MenuItem,"LinkItem",()=>C.MenuLinkItem,"Popup",()=>j.MenuPopup,"Portal",()=>v.MenuPortal,"Positioner",()=>b.MenuPositioner,"RadioGroup",()=>O.MenuRadioGroup,"RadioItem",()=>R.MenuRadioItem,"RadioItemIndicator",()=>M.MenuRadioItemIndicator,"Root",0,function(e){let[a,l]=i.useState({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,x:0,y:0})}),u=i.useRef(null),c=i.useRef(null),f=i.useRef(null),p=i.useRef(null),d=i.useRef(!0),h=i.useRef(null),g=(0,r.useId)(),m=i.useMemo(()=>({anchor:a,setAnchor:l,actionsRef:f,backdropRef:u,internalBackdropRef:c,positionerRef:p,allowMouseUpTriggerRef:d,initialCursorPointRef:h,rootId:g}),[a,g]);return(0,t.jsx)(n.ContextMenuRootContext.Provider,{value:m,children:(0,t.jsx)(o.MenuRootContext.Provider,{value:void 0,children:(0,t.jsx)(s.Menu.Root,{...e})})})},"Separator",()=>L.Separator,"SubmenuRoot",()=>I.MenuSubmenuRoot,"SubmenuTrigger",()=>A.MenuSubmenuTrigger,"Trigger",0,y],912001);var T=e.i(912001),T=T,z=e.i(465458),B=e.i(932031);function D({className:e,align:i="start",alignOffset:r=4,side:n="right",sideOffset:s=0,...o}){return(0,t.jsx)(T.Portal,{children:(0,t.jsx)(T.Positioner,{className:"isolate z-50 outline-none",align:i,alignOffset:r,side:n,sideOffset:s,children:(0,t.jsx)(T.Popup,{"data-slot":"context-menu-content",className:(0,z.cn)("z-50 max-h-(--available-height) min-w-36 origin-(--transform-origin) overflow-x-hidden overflow-y-auto rounded-lg bg-popover p-1 text-popover-foreground shadow-md ring-1 ring-foreground/10 duration-100 outline-none data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...o})})})}e.i(299648),e.s(["ContextMenu",0,function({...e}){return(0,t.jsx)(T.Root,{"data-slot":"context-menu",...e})},"ContextMenuContent",0,D,"ContextMenuItem",0,function({className:e,inset:i,variant:r="default",...n}){return(0,t.jsx)(T.Item,{"data-slot":"context-menu-item","data-inset":i,"data-variant":r,className:(0,z.cn)("group/context-menu-item relative flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 data-disabled:pointer-events-none data-disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 focus:*:[svg]:text-accent-foreground data-[variant=destructive]:*:[svg]:text-destructive",e),...n})},"ContextMenuSeparator",0,function({className:e,...i}){return(0,t.jsx)(T.Separator,{"data-slot":"context-menu-separator",className:(0,z.cn)("-mx-1 my-1 h-px bg-border",e),...i})},"ContextMenuSub",0,function({...e}){return(0,t.jsx)(T.SubmenuRoot,{"data-slot":"context-menu-sub",...e})},"ContextMenuSubContent",0,function({...e}){return(0,t.jsx)(D,{"data-slot":"context-menu-sub-content",className:"shadow-lg",side:"right",...e})},"ContextMenuSubTrigger",0,function({className:e,inset:i,children:r,...n}){return(0,t.jsxs)(T.SubmenuTrigger,{"data-slot":"context-menu-sub-trigger","data-inset":i,className:(0,z.cn)("flex cursor-default items-center gap-1.5 rounded-md px-1.5 py-1 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-inset:pl-7 data-open:bg-accent data-open:text-accent-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",e),...n,children:[r,(0,t.jsx)(B.ChevronRightIcon,{className:"ml-auto"})]})},"ContextMenuTrigger",0,function({className:e,...i}){return(0,t.jsx)(T.Trigger,{"data-slot":"context-menu-trigger",className:(0,z.cn)("select-none",e),...i})}],940361)},120276,e=>{"use strict";let t;e.i(836406),e.i(859073),e.i(664195),e.i(347410),e.i(768224),e.i(93151),e.i(158555),e.i(517965),e.i(742150),e.i(500127),e.i(874243),e.i(686882),e.i(127819),e.i(640883),e.i(604257),e.i(869416),e.i(116427),e.i(836354),e.i(473864),e.i(318209),e.i(172781),e.i(250182),e.i(131624),e.i(238015),e.i(534662),e.i(433140),e.i(663159),e.i(119260),e.i(877059),e.i(808e3),e.i(645831),e.i(764894),e.i(551501),e.i(337525),e.i(335283),e.i(615239),e.i(324240),e.i(33999),e.i(745026),e.i(637114),e.i(705067),e.i(948539),e.i(768797),e.i(633666),e.i(405261),e.i(231009),e.i(72895),e.i(862215),e.i(273544),e.i(844168),e.i(843210),e.i(767312),e.i(116013),e.i(735564),e.i(44118),e.i(486172),e.i(321915),e.i(171733),e.i(6838),e.i(45048),e.i(526568),e.i(646675),e.i(426208),e.i(772315),e.i(137475),e.i(504183),e.i(656092),e.i(126391),e.i(925665),e.i(756500);var i=e.i(680590);t="object"==typeof self&&self.constructor&&"DedicatedWorkerGlobalScope"===self.constructor.name&&void 0!==globalThis.workerttPolicy?globalThis.workerttPolicy:function(e,t){let i=globalThis.MonacoEnvironment;if(i?.createTrustedTypesPolicy)try{return i.createTrustedTypesPolicy(e,t)}catch(e){console.error(e);return}try{return globalThis.trustedTypes?.createPolicy(e,t)}catch(e){console.error(e);return}}("defaultWorkerFactory",{createScriptURL:e=>e}),e.s(["createWebWorker",0,function(e){let r=Promise.resolve(function(e){let i=e.label,r=globalThis.MonacoEnvironment;if(r){if("function"==typeof r.getWorker)return r.getWorker("workerMain.js",i);if("function"==typeof r.getWorkerUrl){let e=r.getWorkerUrl("workerMain.js",i);return new Worker(t?t.createScriptURL(e):e,{name:i,type:"module"})}}if(e.createWorker)return e.createWorker();throw Error("You must define a function MonacoEnvironment.getWorkerUrl or MonacoEnvironment.getWorker")}({label:e.label??"monaco-editor-worker",moduleId:e.moduleId,createWorker:e.createWorker})).then(t=>(t.postMessage("ignore"),t.postMessage(e.createData),t));return i.editor.createWebWorker({worker:r,host:e.host,keepIdleModels:e.keepIdleModels})}])},60293,e=>{"use strict";var t=e.i(816709),i=e.i(437122);let r=(0,t.create)((e,t)=>({favorites:[],loadedWorkspaceId:null,pendingFavorite:null,load:async r=>{let{loadedWorkspaceId:n}=t();if(n!==r)try{let t=await (0,i.fetchWithAuth)(`/api/workspaces/${r}/code-favorites`);if(t.ok){let i=await t.json();e({favorites:i,loadedWorkspaceId:r})}else e({favorites:[],loadedWorkspaceId:r})}catch{e({favorites:[],loadedWorkspaceId:r})}},addFavorite:async r=>{let{loadedWorkspaceId:n}=t();if(n)try{let t=await (0,i.fetchWithAuth)(`/api/workspaces/${n}/code-favorites`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(t.ok){let i=await t.json();e(e=>({favorites:[i,...e.favorites]}))}}catch{}},removeFavorite:async r=>{let{loadedWorkspaceId:n}=t();if(n)try{(await (0,i.fetchWithAuth)(`/api/workspaces/${n}/code-favorites/${encodeURIComponent(r)}`,{method:"DELETE"})).ok&&e(e=>({favorites:e.favorites.filter(e=>e.id!==r)}))}catch{}},clearFavorites:async t=>{try{(await (0,i.fetchWithAuth)(`/api/workspaces/${t}/code-favorites`,{method:"DELETE"})).ok&&e({favorites:[],loadedWorkspaceId:t})}catch{}},setPendingFavorite:t=>e({pendingFavorite:t})}));e.s(["useCodeFavoritesStore",0,r])},551959,e=>{"use strict";e.i(836406),e.i(859073),e.i(664195),e.i(347410),e.i(768224),e.i(93151),e.i(158555),e.i(517965),e.i(742150),e.i(500127),e.i(874243),e.i(686882),e.i(127819),e.i(640883),e.i(604257),e.i(869416),e.i(116427),e.i(836354),e.i(473864),e.i(318209),e.i(172781),e.i(250182),e.i(131624),e.i(238015),e.i(534662),e.i(433140),e.i(663159),e.i(119260),e.i(877059),e.i(808e3),e.i(645831),e.i(764894),e.i(551501),e.i(337525),e.i(335283),e.i(615239),e.i(324240),e.i(33999),e.i(745026),e.i(637114),e.i(705067),e.i(948539),e.i(768797),e.i(633666),e.i(405261),e.i(231009),e.i(72895),e.i(862215),e.i(273544),e.i(844168),e.i(843210),e.i(767312),e.i(116013),e.i(735564),e.i(44118),e.i(486172),e.i(321915),e.i(171733),e.i(6838),e.i(45048),e.i(526568),e.i(646675),e.i(426208),e.i(772315),e.i(137475),e.i(504183),e.i(656092),e.i(126391),e.i(925665),e.i(756500);var t,i,r,n,s,o=e.i(680590),a=((t=a||{})[t.None=0]="None",t[t.CommonJS=1]="CommonJS",t[t.AMD=2]="AMD",t[t.UMD=3]="UMD",t[t.System=4]="System",t[t.ES2015=5]="ES2015",t[t.ESNext=99]="ESNext",t),l=((i=l||{})[i.None=0]="None",i[i.Preserve=1]="Preserve",i[i.React=2]="React",i[i.ReactNative=3]="ReactNative",i[i.ReactJSX=4]="ReactJSX",i[i.ReactJSXDev=5]="ReactJSXDev",i),u=((r=u||{})[r.CarriageReturnLineFeed=0]="CarriageReturnLineFeed",r[r.LineFeed=1]="LineFeed",r),c=((n=c||{})[n.ES3=0]="ES3",n[n.ES5=1]="ES5",n[n.ES2015=2]="ES2015",n[n.ES2016=3]="ES2016",n[n.ES2017=4]="ES2017",n[n.ES2018=5]="ES2018",n[n.ES2019=6]="ES2019",n[n.ES2020=7]="ES2020",n[n.ESNext=99]="ESNext",n[n.JSON=100]="JSON",n[n.Latest=99]="Latest",n),f=((s=f||{})[s.Classic=1]="Classic",s[s.NodeJs=2]="NodeJs",s);class p{constructor(e,t,i,r,n){this._onDidChange=new o.Emitter,this._onDidExtraLibsChange=new o.Emitter,this._extraLibs=Object.create(null),this._removedExtraLibs=Object.create(null),this._eagerModelSync=!1,this.setCompilerOptions(e),this.setDiagnosticsOptions(t),this.setWorkerOptions(i),this.setInlayHintsOptions(r),this.setModeConfiguration(n),this._onDidExtraLibsChangeTimeout=-1}get onDidChange(){return this._onDidChange.event}get onDidExtraLibsChange(){return this._onDidExtraLibsChange.event}get modeConfiguration(){return this._modeConfiguration}get workerOptions(){return this._workerOptions}get inlayHintsOptions(){return this._inlayHintsOptions}getExtraLibs(){return this._extraLibs}addExtraLib(e,t){let i;if(i=void 0===t?`ts:extralib-${Math.random().toString(36).substring(2,15)}`:t,this._extraLibs[i]&&this._extraLibs[i].content===e)return{dispose:()=>{}};let r=1;return this._removedExtraLibs[i]&&(r=this._removedExtraLibs[i]+1),this._extraLibs[i]&&(r=this._extraLibs[i].version+1),this._extraLibs[i]={content:e,version:r},this._fireOnDidExtraLibsChangeSoon(),{dispose:()=>{let e=this._extraLibs[i];e&&e.version===r&&(delete this._extraLibs[i],this._removedExtraLibs[i]=r,this._fireOnDidExtraLibsChangeSoon())}}}setExtraLibs(e){for(let e in this._extraLibs)this._removedExtraLibs[e]=this._extraLibs[e].version;if(this._extraLibs=Object.create(null),e&&e.length>0)for(let t of e){let e=t.filePath||`ts:extralib-${Math.random().toString(36).substring(2,15)}`,i=t.content,r=1;this._removedExtraLibs[e]&&(r=this._removedExtraLibs[e]+1),this._extraLibs[e]={content:i,version:r}}this._fireOnDidExtraLibsChangeSoon()}_fireOnDidExtraLibsChangeSoon(){-1===this._onDidExtraLibsChangeTimeout&&(this._onDidExtraLibsChangeTimeout=window.setTimeout(()=>{this._onDidExtraLibsChangeTimeout=-1,this._onDidExtraLibsChange.fire(void 0)},0))}getCompilerOptions(){return this._compilerOptions}setCompilerOptions(e){this._compilerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}getDiagnosticsOptions(){return this._diagnosticsOptions}setDiagnosticsOptions(e){this._diagnosticsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setWorkerOptions(e){this._workerOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setInlayHintsOptions(e){this._inlayHintsOptions=e||Object.create(null),this._onDidChange.fire(void 0)}setMaximumWorkerIdleTime(e){}setEagerModelSync(e){this._eagerModelSync=e}getEagerModelSync(){return this._eagerModelSync}setModeConfiguration(e){this._modeConfiguration=e||Object.create(null),this._onDidChange.fire(void 0)}}let d={completionItems:!0,hovers:!0,documentSymbols:!0,definitions:!0,references:!0,documentHighlights:!0,rename:!0,diagnostics:!0,documentRangeFormattingEdits:!0,signatureHelp:!0,onTypeFormattingEdits:!0,codeActions:!0,inlayHints:!0},h=new p({allowNonTsExtensions:!0,target:99},{noSemanticValidation:!1,noSyntaxValidation:!1,onlyVisible:!1},{},{},d),g=new p({allowNonTsExtensions:!0,allowJs:!0,target:99},{noSemanticValidation:!0,noSyntaxValidation:!1,onlyVisible:!1},{},{},d);function m(){return e.A(69588)}o.languages.onLanguage("typescript",()=>m().then(e=>e.setupTypeScript(h))),o.languages.onLanguage("javascript",()=>m().then(e=>e.setupJavaScript(g))),e.s(["JsxEmit",0,l,"ModuleKind",0,a,"ModuleResolutionKind",0,f,"NewLineKind",0,u,"ScriptTarget",0,c,"getJavaScriptWorker",0,()=>m().then(e=>e.getJavaScriptWorker()),"getTypeScriptWorker",0,()=>m().then(e=>e.getTypeScriptWorker()),"javascriptDefaults",0,g,"typescriptDefaults",0,h,"typescriptVersion",0,"5.9.3"],551959)},106452,e=>{"use strict";var t=e.i(281482),i=e.i(487106),r=e.i(554250),n=e.i(488259),s=e.i(922292),o=e.i(535567),a=e.i(107700);e.i(963631),e.i(619122),e.i(117282),e.i(261968),e.i(611130),e.i(621826);var l=e.i(4160);e.i(318581),e.i(686380),e.i(718596);var u=e.i(2267),c=e.i(501891);e.i(575129),e.i(698014),e.i(140331),e.i(471999),e.i(900329),e.i(785266),e.i(181268),e.i(70177),e.i(575210),e.i(890787),e.i(67920),e.i(601293),e.i(168221),e.i(771275),e.i(354244);var f=e.i(905670),p=e.i(107043),d=e.i(299051),h=e.i(827522),g=e.i(526097);e.i(568101);var m=e.i(79522);e.i(899890),e.i(932956),e.i(781808);var y=e.i(553638),_=e.i(856884),v=e.i(9753),b=e.i(84513),j=e.i(846960),k=e.i(536766),x=e.i(975445),w=e.i(853457),E=e.i(428048);function S(e){let t=e;return class extends t{constructor(...t){super(...t.slice(1),...function(e,t){return e.invokeFunction(e=>n._util.getServiceDependencies(t).sort((e,t)=>e.index-t.index).map(t=>e.get(t.id)))}(t[0],e))}}}var P=e.i(861593);function C(e,t){let i=(0,o.isObject)(e.editor)?(0,a.deepClone)(e.editor):Object.create(null);return Object.assign(i,(0,a.deepClone)(t)),i}function O(e,t){let i=C(e);if((0,o.isObject)(e.diffEditor)){let t=(0,a.deepClone)(e.diffEditor);t.diffCodeLens=t.codeLens,delete t.codeLens,t.diffWordWrap=t.wordWrap,delete t.wordWrap,Object.assign(i,t)}return i.accessibilityVerbose=e.accessibility?.verbosity?.diffEditor??!1,Object.assign(i,(0,a.deepClone)(t)),i}function R(e){let i=class extends e{constructor(e,t={},i,r){const{theme:n,autoDetectHighContrast:s,model:o,value:a,language:l,accessibilityHelpUrl:u,ariaContainerElement:c,overflowWidgetsDomNode:f,dimension:p,...h}=t,g=C(r.getValue(t.model?.uri),h);super(i,e,{...g,overflowWidgetsDomNode:f,dimension:p,theme:n,autoDetectHighContrast:s,model:o,value:a,language:l,accessibilityHelpUrl:u,ariaContainerElement:c}),this.textResourceConfigurationService=r,this.optionsOverrides={},this.lastAppliedEditorOptions=g,this.optionsOverrides=h,this._register(r.onDidChangeConfiguration(e=>{let t=this.getModel()?.uri;null!=t&&e.affectsConfiguration(t,"editor")&&this.updateEditorConfiguration()})),this._register(this.onDidChangeModelLanguage(()=>this.updateEditorConfiguration())),this._register(this.onDidChangeModel(()=>this.updateEditorConfiguration())),this.updateEditorConfiguration();const m=i.createChild(new d.ServiceCollection([v.IContextKeyService,this._contextKeyService])),y=this._register(m.createInstance(_.ResourceContextKey));this.onDidChangeModel(e=>{y.set(e.newModelUrl)}),y.set(this.getModel()?.uri)}updateEditorConfiguration(){if(!this.hasModel()||null==this.textResourceConfigurationService)return;let e=this.getModel().uri,t=this.textResourceConfigurationService.getValue(e);if(null==t)return;let i=C(t,this.optionsOverrides),r=i;null!=this.lastAppliedEditorOptions&&(r=(0,a.distinct)(this.lastAppliedEditorOptions,r)),Object.keys(r).length>0&&(this.lastAppliedEditorOptions=i,super.updateOptions(r))}updateOptions(e){this.optionsOverrides??(this.optionsOverrides={}),c.EditorOptionsUtil.applyUpdate(this.optionsOverrides,e)&&this.updateEditorConfiguration()}};return(0,t.__decorate)([(0,t.__param)(2,n.IInstantiationService),(0,t.__param)(3,r.ITextResourceConfigurationService)],i)}e.i(478697);let M=R(S(s.StandaloneCodeEditor)),I=R(S(s.StandaloneEditor)),A=class extends S(s.StandaloneDiffEditor2){constructor(e,t={},i,r){const{theme:n,autoDetectHighContrast:s,modifiedAriaLabel:o,originalAriaLabel:a,overflowWidgetsDomNode:l,dimension:u,...c}=t,f=O(r.getValue(void 0),c);super(i,e,{...f,overflowWidgetsDomNode:l,dimension:u,theme:n,autoDetectHighContrast:s,modifiedAriaLabel:o,originalAriaLabel:a}),this.textResourceConfigurationService=r,this.optionsOverrides={},this.lastAppliedEditorOptions=f,this.optionsOverrides=c,this._register(r.onDidChangeConfiguration(e=>{let t=this._targetEditor.getModel()?.uri;null!=t&&(e.affectsConfiguration(t,"editor")||e.affectsConfiguration(t,"diffEditor")||e.affectsConfiguration(t,"accessibility.verbosity.diffEditor"))&&this.updateEditorConfiguration()})),this._register(this._targetEditor.onDidChangeModelLanguage(()=>this.updateEditorConfiguration())),this._register(this.onDidChangeModel(()=>this.updateEditorConfiguration())),this.updateEditorConfiguration()}updateEditorConfiguration(){if(null==this.getModel()||null==this.textResourceConfigurationService)return;let e=this._targetEditor.getModel()?.uri,t=this.textResourceConfigurationService.getValue(e);if(null==t)return;let i=O(t,this.optionsOverrides),r=i;null!=this.lastAppliedEditorOptions&&(r=(0,a.distinct)(this.lastAppliedEditorOptions,r)),Object.keys(r).length>0&&(this.lastAppliedEditorOptions=i,super.updateOptions(r))}updateOptions(e){this.optionsOverrides??(this.optionsOverrides={}),this.optionsOverrides={...this.optionsOverrides,...e},this.updateEditorConfiguration()}_createInnerEditor(e,t,i){return e.createInstance(M,t,i)}};async function L(e,t){let i=await (0,P.getService)(y.IFileService);await i.writeFile(e,p.VSBuffer.fromString(t))}async function T(e,t){null!=t&&await L(e,t);let i=await (0,P.getService)(f.ITextModelService);return await i.createModelReference(e)}A=(0,t.__decorate)([(0,t.__param)(2,n.IInstantiationService),(0,t.__param)(3,r.ITextResourceConfigurationService)],A);let z=class extends i.StandaloneKeybindingService{constructor(e,t,i,r,n,s,o){super(t,i,r,n,s,o),this.delegate=e,this._register(e.registerKeybindingProvider({provideKeybindings:()=>this.getUserKeybindingItems(),onDidChangeKeybindings:this.onDidUpdateKeybindings}))}_getResolver(){return this.delegate._getResolver()}resolveKeyboardEvent(e){return this.delegate.resolveKeyboardEvent(e)}resolveKeybinding(e){return this.delegate.resolveKeybinding(e)}resolveUserBinding(e){return this.delegate.resolveUserBinding(e)}_dumpDebugInfo(){return this.delegate._dumpDebugInfo()}_dumpDebugInfoJSON(){return this.delegate._dumpDebugInfoJSON()}enableKeybindingHoldMode(e){return this.delegate.enableKeybindingHoldMode(e)}};z=(0,t.__decorate)([(0,t.__param)(1,v.IContextKeyService),(0,t.__param)(2,j.ICommandService),(0,t.__param)(3,k.ITelemetryService),(0,t.__param)(4,x.INotificationService),(0,t.__param)(5,w.ILogService),(0,t.__param)(6,m.ICodeEditorService)],z);let B=null;function D(e){if(null==B){let t=new d.ServiceCollection;t.set(E.IQuickInputService,new g.SyncDescriptor(h.StandaloneQuickInputService,[],!0));let r=e.get(b.IKeybindingService);r instanceof i.StandaloneKeybindingService||null==r.registerKeybindingProvider||t.set(b.IKeybindingService,new g.SyncDescriptor(z,[r],!0)),B=e.get(n.IInstantiationService).createChild(t)}return B}l.Extensions,u.Extensions,e.s(["createConfiguredDiffEditor",0,(e,t,r)=>i.StandaloneServices.initialize(r??{}).invokeFunction(D).createInstance(A,e,t),"createConfiguredEditor",0,(e,t,r)=>i.StandaloneServices.initialize(r??{}).invokeFunction(D).createInstance(I,e,t),"createModelReference",0,T,"writeFile",0,L],106452)},843982,(e,t,i)=>{"use strict";function r({widthInt:e,heightInt:t,blurWidth:i,blurHeight:n,blurDataURL:s,objectFit:o}){let a=i?40*i:e,l=n?40*n:t,u=a&&l?`viewBox='0 0 ${a} ${l}'`:"";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${u}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='20'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${u?"none":"contain"===o?"xMidYMid":"cover"===o?"xMidYMid slice":"none"}' style='filter: url(%23b);' href='${s}'/%3E%3C/svg%3E`}Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},500680,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r={VALID_LOADERS:function(){return s},imageConfigDefault:function(){return o}};for(var n in r)Object.defineProperty(i,n,{enumerable:!0,get:r[n]});let s=["default","imgix","cloudinary","akamai","custom"],o={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumDiskCacheSize:void 0,maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1,customCacheHandler:!1}},622398,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"getImgProps",{enumerable:!0,get:function(){return u}}),e.r(837121);let r=e.r(745137),n=e.r(843982),s=e.r(500680),o=["-moz-initial","fill","none","scale-down",void 0];function a(e){return void 0!==e.default}function l(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function u({src:e,sizes:t,unoptimized:i=!1,priority:c=!1,preload:f=!1,loading:p,className:d,quality:h,width:g,height:m,fill:y=!1,style:_,overrideSrc:v,onLoad:b,onLoadingComplete:j,placeholder:k="empty",blurDataURL:x,fetchPriority:w,decoding:E="async",layout:S,objectFit:P,objectPosition:C,lazyBoundary:O,lazyRoot:R,...M},I){var A;let L,T,z,{imgConf:B,showAltText:D,blurComplete:U,defaultLoader:q}=I,N=B||s.imageConfigDefault;if("allSizes"in N)L=N;else{let e=[...N.deviceSizes,...N.imageSizes].sort((e,t)=>e-t),t=N.deviceSizes.sort((e,t)=>e-t),i=N.qualities?.sort((e,t)=>e-t);L={...N,allSizes:e,deviceSizes:t,qualities:i}}if(void 0===q)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let W=M.loader||q;delete M.loader,delete M.srcSet;let F="__next_img_default"in W;if(F){if("custom"===L.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
|
|
2
|
+
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=W;W=t=>{let{config:i,...r}=t;return e(r)}}if(S){"fill"===S&&(y=!0);let e={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[S];e&&(_={..._,...e});let i={responsive:"100vw",fill:"100vw"}[S];i&&!t&&(t=i)}let $="",K=l(g),J=l(m);if((A=e)&&"object"==typeof A&&(a(A)||void 0!==A.src)){let t=a(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(T=t.blurWidth,z=t.blurHeight,x=x||t.blurDataURL,$=t.src,!y)if(K||J){if(K&&!J){let e=K/t.width;J=Math.round(t.height*e)}else if(!K&&J){let e=J/t.height;K=Math.round(t.width*e)}}else K=t.width,J=t.height}let V=!c&&!f&&("lazy"===p||void 0===p);(!(e="string"==typeof e?e:$)||e.startsWith("data:")||e.startsWith("blob:"))&&(i=!0,V=!1),L.unoptimized&&(i=!0),F&&!L.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(i=!0);let G=l(h),H=Object.assign(y?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:P,objectPosition:C}:{},D?{}:{color:"transparent"},_),X=U||"empty"===k?null:"blur"===k?`url("data:image/svg+xml;charset=utf-8,${(0,n.getImageBlurSvg)({widthInt:K,heightInt:J,blurWidth:T,blurHeight:z,blurDataURL:x||"",objectFit:H.objectFit})}")`:`url("${k}")`,Y=o.includes(H.objectFit)?"fill"===H.objectFit?"100% 100%":"cover":H.objectFit,Q=X?{backgroundSize:Y,backgroundPosition:H.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:X}:{},Z=function({config:e,src:t,unoptimized:i,width:n,quality:s,sizes:o,loader:a}){if(i){if(t.startsWith("/")&&!t.startsWith("//")){let e=(0,r.getDeploymentId)();if(e){let i=t.indexOf("?");if(-1!==i){let r=new URLSearchParams(t.slice(i+1));r.get("dpl")||(r.append("dpl",e),t=t.slice(0,i)+"?"+r.toString())}else t+=`?dpl=${e}`}}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:l,kind:u}=function({deviceSizes:e,allSizes:t},i,r){if(r){let i=/(^|\s)(1?\d?\d)vw/g,n=[];for(let e;e=i.exec(r);)n.push(parseInt(e[2]));if(n.length){let i=.01*Math.min(...n);return{widths:t.filter(t=>t>=e[0]*i),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof i?{widths:e,kind:"w"}:{widths:[...new Set([i,2*i].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}(e,n,o),c=l.length-1;return{sizes:o||"w"!==u?o:"100vw",srcSet:l.map((i,r)=>`${a({config:e,src:t,quality:s,width:i})} ${"w"===u?i:r+1}${u}`).join(", "),src:a({config:e,src:t,quality:s,width:l[c]})}}({config:L,src:e,unoptimized:i,width:K,quality:G,sizes:t,loader:W}),ee=V?"lazy":p;return{props:{...M,loading:ee,fetchPriority:w,width:K,height:J,decoding:E,className:d,style:{...H,...Q},sizes:Z.sizes,srcSet:Z.srcSet,src:v||Z.src},meta:{unoptimized:i,preload:f||c,placeholder:k,fill:y}}}},852824,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return a}});let r=e.r(764556),n="u"<typeof window,s=n?()=>{}:r.useLayoutEffect,o=n?()=>{}:r.useEffect;function a(e){let{headManager:t,reduceComponentsToState:i}=e;function a(){if(t&&t.mountedInstances){let e=r.Children.toArray(Array.from(t.mountedInstances).filter(Boolean));t.updateHead(i(e))}}return n&&(t?.mountedInstances?.add(e.children),a()),s(()=>(t?.mountedInstances?.add(e.children),()=>{t?.mountedInstances?.delete(e.children)})),s(()=>(t&&(t._pendingUpdate=a),()=>{t&&(t._pendingUpdate=a)})),o(()=>(t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null),()=>{t&&t._pendingUpdate&&(t._pendingUpdate(),t._pendingUpdate=null)})),null}},120333,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r={default:function(){return g},defaultHead:function(){return f}};for(var n in r)Object.defineProperty(i,n,{enumerable:!0,get:r[n]});let s=e.r(481258),o=e.r(744066),a=e.r(344180),l=o._(e.r(764556)),u=s._(e.r(852824)),c=e.r(57426);function f(){return[(0,a.jsx)("meta",{charSet:"utf-8"},"charset"),(0,a.jsx)("meta",{name:"viewport",content:"width=device-width"},"viewport")]}function p(e,t){return"string"==typeof t||"number"==typeof t?e:t.type===l.default.Fragment?e.concat(l.default.Children.toArray(t.props.children).reduce((e,t)=>"string"==typeof t||"number"==typeof t?e:e.concat(t),[])):e.concat(t)}e.r(837121);let d=["name","httpEquiv","charSet","itemProp"];function h(e){let t,i,r,n;return e.reduce(p,[]).reverse().concat(f().reverse()).filter((t=new Set,i=new Set,r=new Set,n={},e=>{let s=!0,o=!1;if(e.key&&"number"!=typeof e.key&&e.key.indexOf("$")>0){o=!0;let i=e.key.slice(e.key.indexOf("$")+1);t.has(i)?s=!1:t.add(i)}switch(e.type){case"title":case"base":i.has(e.type)?s=!1:i.add(e.type);break;case"meta":for(let t=0,i=d.length;t<i;t++){let i=d[t];if(e.props.hasOwnProperty(i))if("charSet"===i)r.has(i)?s=!1:r.add(i);else{let t=e.props[i],r=n[i]||new Set;("name"!==i||!o)&&r.has(t)?s=!1:(r.add(t),n[i]=r)}}}return s})).reverse().map((e,t)=>{let i=e.key||t;return l.default.cloneElement(e,{key:i})})}let g=function({children:e}){let t=(0,l.useContext)(c.HeadManagerContext);return(0,a.jsx)(u.default,{reduceComponentsToState:h,headManager:t,children:e})};("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},914272,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"ImageConfigContext",{enumerable:!0,get:function(){return s}});let r=e.r(481258)._(e.r(764556)),n=e.r(500680),s=r.default.createContext(n.imageConfigDefault)},338431,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"RouterContext",{enumerable:!0,get:function(){return r}});let r=e.r(481258)._(e.r(764556)).default.createContext(null)},741186,(e,t,i)=>{"use strict";function r(e,t){let i=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-i)<Math.abs(e-i)?t:e,t.qualities[0]):i}Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"findClosestQuality",{enumerable:!0,get:function(){return r}})},99552,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return o}});let r=e.r(741186),n=e.r(745137);function s({config:e,src:t,width:i,quality:o}){let a=(0,n.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")){let e=t.indexOf("?");if(-1!==e){let i=new URLSearchParams(t.slice(e+1)),r=i.get("dpl");if(r){a=r,i.delete("dpl");let n=i.toString();t=t.slice(0,e)+(n?"?"+n:"")}}}if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
|
|
3
|
+
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let l=(0,r.findClosestQuality)(o,e);return`${e.path}?url=${encodeURIComponent(t)}&w=${i}&q=${l}${t.startsWith("/")&&a?`&dpl=${a}`:""}`}s.__next_img_default=!0;let o=s},822862,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"useMergedRef",{enumerable:!0,get:function(){return n}});let r=e.r(764556);function n(e,t){let i=(0,r.useRef)(null),n=(0,r.useRef)(null);return(0,r.useCallback)(r=>{if(null===r){let e=i.current;e&&(i.current=null,e());let t=n.current;t&&(n.current=null,t())}else e&&(i.current=s(e,r)),t&&(n.current=s(t,r))},[e,t])}function s(e,t){if("function"!=typeof e)return e.current=t,()=>{e.current=null};{let i=e(t);return"function"==typeof i?i:()=>e(null)}}("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},810034,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"Image",{enumerable:!0,get:function(){return b}});let r=e.r(481258),n=e.r(744066),s=e.r(344180),o=n._(e.r(764556)),a=r._(e.r(106206)),l=r._(e.r(120333)),u=e.r(622398),c=e.r(500680),f=e.r(914272);e.r(837121);let p=e.r(338431),d=r._(e.r(99552)),h=e.r(822862),g={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1};function m(e,t,i,r,n,s,o){let a=e?.src;e&&e["data-loaded-src"]!==a&&(e["data-loaded-src"]=a,("decode"in e?e.decode():Promise.resolve()).catch(()=>{}).then(()=>{if(e.parentElement&&e.isConnected){if("empty"!==t&&n(!0),i?.current){let t=new Event("load");Object.defineProperty(t,"target",{writable:!1,value:e});let r=!1,n=!1;i.current({...t,nativeEvent:t,currentTarget:e,target:e,isDefaultPrevented:()=>r,isPropagationStopped:()=>n,persist:()=>{},preventDefault:()=>{r=!0,t.preventDefault()},stopPropagation:()=>{n=!0,t.stopPropagation()}})}r?.current&&r.current(e)}}))}function y(e){return o.use?{fetchPriority:e}:{fetchpriority:e}}"u"<typeof window&&(globalThis.__NEXT_IMAGE_IMPORTED=!0);let _=(0,o.forwardRef)(({src:e,srcSet:t,sizes:i,height:r,width:n,decoding:a,className:l,style:u,fetchPriority:c,placeholder:f,loading:p,unoptimized:d,fill:g,onLoadRef:_,onLoadingCompleteRef:v,setBlurComplete:b,setShowAltText:j,sizesInput:k,onLoad:x,onError:w,...E},S)=>{let P=(0,o.useCallback)(e=>{e&&(w&&(e.src=e.src),e.complete&&m(e,f,_,v,b,d,k))},[e,f,_,v,b,w,d,k]),C=(0,h.useMergedRef)(S,P);return(0,s.jsx)("img",{...E,...y(c),loading:p,width:n,height:r,decoding:a,"data-nimg":g?"fill":"1",className:l,style:u,sizes:i,srcSet:t,src:e,ref:C,onLoad:e=>{m(e.currentTarget,f,_,v,b,d,k)},onError:e=>{j(!0),"empty"!==f&&b(!0),w&&w(e)}})});function v({isAppRouter:e,imgAttributes:t}){let i={as:"image",imageSrcSet:t.srcSet,imageSizes:t.sizes,crossOrigin:t.crossOrigin,referrerPolicy:t.referrerPolicy,...y(t.fetchPriority)};return e&&a.default.preload?(a.default.preload(t.src,i),null):(0,s.jsx)(l.default,{children:(0,s.jsx)("link",{rel:"preload",href:t.srcSet?void 0:t.src,...i},"__nimg-"+t.src+t.srcSet+t.sizes)})}let b=(0,o.forwardRef)((e,t)=>{let i=(0,o.useContext)(p.RouterContext),r=(0,o.useContext)(f.ImageConfigContext),n=(0,o.useMemo)(()=>{let e=g||r||c.imageConfigDefault,t=[...e.deviceSizes,...e.imageSizes].sort((e,t)=>e-t),i=e.deviceSizes.sort((e,t)=>e-t),n=e.qualities?.sort((e,t)=>e-t);return{...e,allSizes:t,deviceSizes:i,qualities:n,localPatterns:"u"<typeof window?r?.localPatterns:e.localPatterns}},[r]),{onLoad:a,onLoadingComplete:l}=e,h=(0,o.useRef)(a);(0,o.useEffect)(()=>{h.current=a},[a]);let m=(0,o.useRef)(l);(0,o.useEffect)(()=>{m.current=l},[l]);let[y,b]=(0,o.useState)(!1),[j,k]=(0,o.useState)(!1),{props:x,meta:w}=(0,u.getImgProps)(e,{defaultLoader:d.default,imgConf:n,blurComplete:y,showAltText:j});return(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)(_,{...x,unoptimized:w.unoptimized,placeholder:w.placeholder,fill:w.fill,onLoadRef:h,onLoadingCompleteRef:m,setBlurComplete:b,setShowAltText:k,sizesInput:e.sizes,ref:t}),w.preload?(0,s.jsx)(v,{isAppRouter:!i,imgAttributes:x}):null]})});("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},776785,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});var r={default:function(){return c},getImageProps:function(){return u}};for(var n in r)Object.defineProperty(i,n,{enumerable:!0,get:r[n]});let s=e.r(481258),o=e.r(622398),a=e.r(810034),l=s._(e.r(99552));function u(e){let{props:t}=(0,o.getImgProps)(e,{defaultLoader:l.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[75],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,i]of Object.entries(t))void 0===i&&delete t[e];return{props:t}}let c=a.Image},253937,(e,t,i)=>{t.exports=e.r(776785)},359209,e=>{"use strict";var t=e.i(344180),i=e.i(253937);let r={".ts":"file_type_typescript",".tsx":"file_type_reactts",".js":"file_type_js",".jsx":"file_type_reactjs",".mjs":"file_type_js",".cjs":"file_type_js",".json":"file_type_json",".json5":"file_type_json5",".jsonc":"file_type_json",".md":"file_type_markdown",".mdx":"file_type_mdx",".css":"file_type_css",".scss":"file_type_scss",".less":"file_type_less",".html":"file_type_html",".svg":"file_type_svg",".png":"file_type_image",".jpg":"file_type_image",".jpeg":"file_type_image",".gif":"file_type_image",".webp":"file_type_webp",".ico":"file_type_favicon",".yaml":"file_type_yaml",".yml":"file_type_yaml",".toml":"file_type_toml",".xml":"file_type_xml",".graphql":"file_type_graphql",".gql":"file_type_graphql",".prisma":"file_type_prisma",".sql":"file_type_sql",".sh":"file_type_shell",".bash":"file_type_shell",".zsh":"file_type_shell",".py":"file_type_python",".rb":"file_type_ruby",".go":"file_type_go",".rs":"file_type_rust",".java":"file_type_java",".kt":"file_type_kotlin",".swift":"file_type_swift",".c":"file_type_c",".cpp":"file_type_cpp",".h":"file_type_cheader",".hpp":"file_type_cppheader",".cs":"file_type_csharp",".php":"file_type_php",".vue":"file_type_vue",".svelte":"file_type_svelte",".dart":"file_type_dartlang",".lua":"file_type_lua",".r":"file_type_r",".ex":"file_type_elixir",".exs":"file_type_elixir",".erl":"file_type_erlang",".hs":"file_type_haskell",".scala":"file_type_scala",".clj":"file_type_clojure",".cljs":"file_type_clojurescript",".coffee":"file_type_coffeescript",".dockerfile":"file_type_docker",".makefile":"file_type_makefile",".txt":"file_type_text",".log":"file_type_log",".env":"file_type_config",".gitignore":"file_type_git",".editorconfig":"file_type_editorconfig",".prettierrc":"file_type_prettier",".eslintrc":"file_type_eslint",".lock":"file_type_lock",".wasm":"file_type_wasm",".pdf":"file_type_pdf",".mp4":"file_type_video",".webm":"file_type_video",".mov":"file_type_video",".avi":"file_type_video",".mkv":"file_type_video",".flv":"file_type_video",".mp3":"file_type_audio",".wav":"file_type_audio",".ogg":"file_type_audio",".flac":"file_type_audio",".aac":"file_type_audio",".m4a":"file_type_audio",".wma":"file_type_audio",".zip":"file_type_zip",".tar":"file_type_zip",".gz":"file_type_zip"},n={"tsconfig.json":"file_type_tsconfig","tsconfig.build.json":"file_type_tsconfig","jsconfig.json":"file_type_jsconfig","package.json":"file_type_npm","package-lock.json":"file_type_npm","pnpm-lock.yaml":"file_type_pnpm","pnpm-workspace.yaml":"file_type_pnpm",".pnpmfile.cjs":"file_type_pnpm","yarn.lock":"file_type_yarn",".yarnrc":"file_type_yarn","next.config.ts":"file_type_next","next.config.js":"file_type_next","next.config.mjs":"file_type_next","vite.config.ts":"file_type_vite","vite.config.js":"file_type_vite","tailwind.config.ts":"file_type_tailwind","tailwind.config.js":"file_type_tailwind","postcss.config.mjs":"file_type_postcss","postcss.config.js":"file_type_postcss",".eslintrc":"file_type_eslint",".eslintrc.js":"file_type_eslint",".eslintrc.json":"file_type_eslint",".eslintrc.cjs":"file_type_eslint",".prettierrc":"file_type_prettier",".prettierrc.js":"file_type_prettier",".prettierrc.json":"file_type_prettier",".gitignore":"file_type_git",".gitattributes":"file_type_git",".editorconfig":"file_type_editorconfig",dockerfile:"file_type_docker","docker-compose.yml":"file_type_docker","docker-compose.yaml":"file_type_docker",makefile:"file_type_makefile","readme.md":"file_type_markdown",license:"file_type_license","license.md":"file_type_license",".env":"file_type_config",".env.local":"file_type_config",".env.development":"file_type_config",".env.production":"file_type_config",".env.test":"file_type_config",".npmrc":"file_type_npm",".babelrc":"file_type_babel","babel.config.js":"file_type_babel","babel.config.json":"file_type_babel",".babelrc.js":"file_type_babel",".babelrc.json":"file_type_babel","jest.config.ts":"file_type_jest","jest.config.js":"file_type_jest","vitest.config.ts":"file_type_vite","vitest.config.js":"file_type_vite","webpack.config.js":"file_type_webpack","webpack.config.ts":"file_type_webpack","rollup.config.js":"file_type_rollup","rollup.config.ts":"file_type_rollup","renovate.json":"file_type_renovate",".prettierignore":"file_type_prettier",".eslintignore":"file_type_eslint",".dockerignore":"file_type_docker",prisma:"file_type_prisma"},s={src:"folder_type_src",lib:"folder_type_library",dist:"folder_type_dist",build:"folder_type_dist",out:"folder_type_dist",public:"folder_type_public",assets:"folder_type_asset",static:"folder_type_asset",components:"folder_type_component",pages:"folder_type_view",views:"folder_type_view",routes:"folder_type_route",api:"folder_type_api",server:"folder_type_server",client:"folder_type_client",test:"folder_type_test",tests:"folder_type_test",__tests__:"folder_type_test",spec:"folder_type_test",specs:"folder_type_test",e2e:"folder_type_e2e",docs:"folder_type_docs",config:"folder_type_config",configs:"folder_type_config",scripts:"folder_type_script",styles:"folder_type_style",css:"folder_type_css",images:"folder_type_images",img:"folder_type_images",icons:"folder_type_images",fonts:"folder_type_fonts",types:"folder_type_typescript",typings:"folder_type_typings",hooks:"folder_type_hook",utils:"folder_type_helper",helpers:"folder_type_helper",tools:"folder_type_tools",services:"folder_type_services",middleware:"folder_type_middleware",models:"folder_type_model",store:"folder_type_redux",stores:"folder_type_redux",state:"folder_type_redux",node_modules:"folder_type_node",".git":"folder_type_git",".github":"folder_type_github",".vscode":"folder_type_vscode",".idea":"folder_type_idea",docker:"folder_type_docker",".docker":"folder_type_docker",kubernetes:"folder_type_kubernetes",k8s:"folder_type_kubernetes",".husky":"folder_type_husky",coverage:"folder_type_coverage",".next":"folder_type_next",".nuxt":"folder_type_nuxt",ios:"folder_type_ios",android:"folder_type_android",app:"folder_type_app",packages:"folder_type_package",modules:"folder_type_module",plugins:"folder_type_plugin",templates:"folder_type_template",i18n:"folder_type_locale",locales:"folder_type_locale",lang:"folder_type_locale",translations:"folder_type_locale",prisma:"folder_type_db",db:"folder_type_db",database:"folder_type_db",migrations:"folder_type_db",seeds:"folder_type_db",storybook:"folder_type_story",stories:"folder_type_story",".storybook":"folder_type_story",".cache":"folder_type_temp",temp:"folder_type_temp",tmp:"folder_type_temp"};e.s(["FileIconImg",0,function({name:e}){return(0,t.jsx)(i.default,{src:function(e){let t,i=e.toLowerCase();if(n[i])return`/icons/${n[i]}.svg`;let s=(t=e.lastIndexOf("."))>=0?e.slice(t).toLowerCase():"";return s&&r[s]?`/icons/${r[s]}.svg`:"/icons/default_file.svg"}(e),alt:e,width:16,height:16,className:"size-4 shrink-0",unoptimized:!0})},"FolderIconImg",0,function({name:e,isOpen:r}){let n;return(0,t.jsx)(i.default,{src:(n=s[e.toLowerCase()])?`/icons/${n}${r?"_opened":""}.svg`:r?"/icons/default_folder_opened.svg":"/icons/default_folder.svg",alt:e,width:16,height:16,className:"size-4 shrink-0",unoptimized:!0})}])},867295,e=>{"use strict";let t=(0,e.i(433721).default)("eye",[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["default",0,t])},332277,e=>{"use strict";var t=e.i(867295);e.s(["Eye",()=>t.default])},303867,e=>{"use strict";let t=(0,e.i(433721).default)("code",[["path",{d:"m16 18 6-6-6-6",key:"eg8j8"}],["path",{d:"m8 6-6 6 6 6",key:"ppft3o"}]]);e.s(["Code",0,t],303867)},771485,e=>{e.v(t=>Promise.all(["static/chunks/0qtc_rbo1oghu.js","static/chunks/035l5i6hvxwm4.js"].map(t=>e.l(t))).then(()=>t(462988)))},918487,e=>{e.v(t=>Promise.all(["static/chunks/004wt62de8617.js","static/chunks/035l5i6hvxwm4.js"].map(t=>e.l(t))).then(()=>t(343355)))},134924,e=>{e.v(t=>Promise.all(["static/chunks/01iqv28_snwus.js","static/chunks/035l5i6hvxwm4.js"].map(t=>e.l(t))).then(()=>t(813595)))},69588,e=>{e.v(t=>Promise.all(["static/chunks/08kpa0nox.bb1.js"].map(t=>e.l(t))).then(()=>t(319120)))},635811,e=>{e.v(t=>Promise.all(["static/chunks/09j3~tko9ep2k.js"].map(t=>e.l(t))).then(()=>t(10039)))},264749,e=>{e.v(t=>Promise.all(["static/chunks/0sjpil-vio33w.js"].map(t=>e.l(t))).then(()=>t(785424)))},317605,e=>{e.v(t=>Promise.all(["static/chunks/0rfeqjw8k-viv.js"].map(t=>e.l(t))).then(()=>t(947234)))},704590,e=>{e.v(t=>Promise.all(["static/chunks/100t886jj0x0x.js"].map(t=>e.l(t))).then(()=>t(459451)))},153742,e=>{e.v(t=>Promise.all(["static/chunks/05tqezrd9jb7y.js"].map(t=>e.l(t))).then(()=>t(419759)))},629448,e=>{e.v(t=>Promise.all(["static/chunks/0d8lm7uud1uuc.js"].map(t=>e.l(t))).then(()=>t(675039)))},124011,e=>{e.v(t=>Promise.all(["static/chunks/0xgw6nacc67av.js"].map(t=>e.l(t))).then(()=>t(786142)))},331538,e=>{e.v(t=>Promise.all(["static/chunks/0b9oy9dat2g6l.js"].map(t=>e.l(t))).then(()=>t(612156)))},940085,e=>{e.v(t=>Promise.all(["static/chunks/0rx7dmtxo4d6p.js"].map(t=>e.l(t))).then(()=>t(434780)))},158993,e=>{e.v(t=>Promise.all(["static/chunks/0jm496tvvtjqx.js"].map(t=>e.l(t))).then(()=>t(644426)))},189140,e=>{e.v(t=>Promise.all(["static/chunks/0ztjb8i4tqvql.js"].map(t=>e.l(t))).then(()=>t(829708)))},12065,e=>{e.v(t=>Promise.all(["static/chunks/0yuyx75r122y-.js"].map(t=>e.l(t))).then(()=>t(969420)))},546118,e=>{e.v(t=>Promise.all(["static/chunks/0h5q90v_js2e0.js"].map(t=>e.l(t))).then(()=>t(389449)))},468355,e=>{e.v(t=>Promise.all(["static/chunks/13vl889h_tb-~.js"].map(t=>e.l(t))).then(()=>t(377384)))},292453,e=>{e.v(t=>Promise.all(["static/chunks/0358_-ep6szf..js"].map(t=>e.l(t))).then(()=>t(43559)))},699591,e=>{e.v(t=>Promise.all(["static/chunks/0zb1vymmeoc9o.js"].map(t=>e.l(t))).then(()=>t(318640)))},357037,e=>{e.v(t=>Promise.all(["static/chunks/0q01i3ypmm4rg.js"].map(t=>e.l(t))).then(()=>t(433920)))},766246,e=>{e.v(t=>Promise.all(["static/chunks/11n6upyldh80p.js"].map(t=>e.l(t))).then(()=>t(219782)))},301403,e=>{e.v(t=>Promise.all(["static/chunks/0brr7g0p8esun.js"].map(t=>e.l(t))).then(()=>t(652984)))},806910,e=>{e.v(t=>Promise.all(["static/chunks/0kp1m06cg897x.js"].map(t=>e.l(t))).then(()=>t(32456)))},961253,e=>{e.v(t=>Promise.all(["static/chunks/0gkx0n_plricw.js"].map(t=>e.l(t))).then(()=>t(141471)))},264559,e=>{e.v(t=>Promise.all(["static/chunks/0d4o_4v0-e97a.js"].map(t=>e.l(t))).then(()=>t(623124)))},30518,e=>{e.v(t=>Promise.all(["static/chunks/0-y43ovhjaeo_.js"].map(t=>e.l(t))).then(()=>t(64384)))},768474,e=>{e.v(t=>Promise.all(["static/chunks/0f0-0to._hvah.js"].map(t=>e.l(t))).then(()=>t(717049)))},504826,e=>{e.v(t=>Promise.all(["static/chunks/0ghe5b2-kyi7-.js"].map(t=>e.l(t))).then(()=>t(976570)))},524721,e=>{e.v(t=>Promise.all(["static/chunks/0m9t_esdrum7w.js"].map(t=>e.l(t))).then(()=>t(790307)))},365570,e=>{e.v(t=>Promise.all(["static/chunks/0_yb4aw3n-lks.js"].map(t=>e.l(t))).then(()=>t(195962)))},787804,e=>{e.v(t=>Promise.all(["static/chunks/02ucy02hzl4vo.js"].map(t=>e.l(t))).then(()=>t(68378)))},979480,e=>{e.v(t=>Promise.all(["static/chunks/00n.pmqcipjyd.js"].map(t=>e.l(t))).then(()=>t(3717)))},850064,e=>{e.v(t=>Promise.all(["static/chunks/0.-4-1p34akka.js"].map(t=>e.l(t))).then(()=>t(118112)))},236120,e=>{e.v(t=>Promise.all(["static/chunks/0_gm.-h0brxaf.js"].map(t=>e.l(t))).then(()=>t(854779)))},769302,e=>{e.v(t=>Promise.all(["static/chunks/0g3ypwmflp2mx.js"].map(t=>e.l(t))).then(()=>t(183995)))},511259,e=>{e.v(t=>Promise.all(["static/chunks/0i0psxcvhdp9w.js"].map(t=>e.l(t))).then(()=>t(479742)))},778189,e=>{e.v(t=>Promise.all(["static/chunks/0ss8hcog1_n1i.js"].map(t=>e.l(t))).then(()=>t(671135)))},391583,e=>{e.v(t=>Promise.all(["static/chunks/0rs7_x_.71x1k.js"].map(t=>e.l(t))).then(()=>t(624545)))},4206,e=>{e.v(t=>Promise.all(["static/chunks/0nq24vo2_9kp4.js"].map(t=>e.l(t))).then(()=>t(495584)))},816552,e=>{e.v(t=>Promise.all(["static/chunks/0d5sgidwe_pcg.js"].map(t=>e.l(t))).then(()=>t(788024)))},718384,e=>{e.v(t=>Promise.all(["static/chunks/0hu5nx-z4fj7v.js"].map(t=>e.l(t))).then(()=>t(495619)))},284913,e=>{e.v(t=>Promise.all(["static/chunks/0y.6d96hu3k6k.js"].map(t=>e.l(t))).then(()=>t(547756)))},581714,e=>{e.v(t=>Promise.all(["static/chunks/0q7h6v.~-hcln.js"].map(t=>e.l(t))).then(()=>t(166861)))},261034,e=>{e.v(t=>Promise.all(["static/chunks/0vemm6g3yufzf.js"].map(t=>e.l(t))).then(()=>t(779542)))},93611,e=>{e.v(t=>Promise.all(["static/chunks/186mu8y9np1sy.js"].map(t=>e.l(t))).then(()=>t(417164)))},862727,e=>{e.v(t=>Promise.all(["static/chunks/17a_qp~nx3_r1.js"].map(t=>e.l(t))).then(()=>t(879006)))},697377,e=>{e.v(t=>Promise.all(["static/chunks/060_mn7wcaphv.js"].map(t=>e.l(t))).then(()=>t(217792)))},347750,e=>{e.v(t=>Promise.all(["static/chunks/0w-ftk2~z_w0f.js"].map(t=>e.l(t))).then(()=>t(895880)))},461792,e=>{e.v(t=>Promise.all(["static/chunks/15gjlpek9nxo4.js"].map(t=>e.l(t))).then(()=>t(539576)))},84791,e=>{e.v(t=>Promise.all(["static/chunks/12ae7z-332nqe.js"].map(t=>e.l(t))).then(()=>t(759422)))},590375,e=>{e.v(t=>Promise.all(["static/chunks/0n.gs01bd1s_w.js"].map(t=>e.l(t))).then(()=>t(591135)))},146984,e=>{e.v(t=>Promise.all(["static/chunks/06vb1.5j-tuzp.js"].map(t=>e.l(t))).then(()=>t(45058)))},64443,e=>{e.v(t=>Promise.all(["static/chunks/0q38twk.8uk88.js"].map(t=>e.l(t))).then(()=>t(139429)))},402493,e=>{e.v(t=>Promise.all(["static/chunks/15s4k5wdbcagm.js"].map(t=>e.l(t))).then(()=>t(707280)))},294884,e=>{e.v(t=>Promise.all(["static/chunks/09qqxs3eg7e46.js"].map(t=>e.l(t))).then(()=>t(570275)))},445468,e=>{e.v(t=>Promise.all(["static/chunks/14j.uts4xnh.u.js"].map(t=>e.l(t))).then(()=>t(81057)))},250392,e=>{e.v(t=>Promise.all(["static/chunks/11x5nw_8yy5d0.js"].map(t=>e.l(t))).then(()=>t(894793)))},35431,e=>{e.v(t=>Promise.all(["static/chunks/0ck3is68a9586.js"].map(t=>e.l(t))).then(()=>t(413019)))},185498,e=>{e.v(t=>Promise.all(["static/chunks/15abz60ucjy3t.js"].map(t=>e.l(t))).then(()=>t(509728)))},288688,e=>{e.v(t=>Promise.all(["static/chunks/11~8.35p7_vky.js"].map(t=>e.l(t))).then(()=>t(327571)))},257081,e=>{e.v(t=>Promise.all(["static/chunks/05irsi.vzfofq.js"].map(t=>e.l(t))).then(()=>t(827750)))},434615,e=>{e.v(t=>Promise.all(["static/chunks/0jxj3xh399qcn.js"].map(t=>e.l(t))).then(()=>t(570842)))},611325,e=>{e.v(t=>Promise.all(["static/chunks/0qtd.b3zhzf38.js"].map(t=>e.l(t))).then(()=>t(891824)))},199304,e=>{e.v(t=>Promise.all(["static/chunks/02~6z3ja20ogz.js"].map(t=>e.l(t))).then(()=>t(211678)))},424725,e=>{e.v(t=>Promise.all(["static/chunks/14qoup0y_1j0t.js"].map(t=>e.l(t))).then(()=>t(270100)))},575894,e=>{e.v(t=>Promise.all(["static/chunks/13w2r5w~ikt_6.js"].map(t=>e.l(t))).then(()=>t(895660)))},440673,e=>{e.v(t=>Promise.all(["static/chunks/0wm70l0hod.sw.js"].map(t=>e.l(t))).then(()=>t(592785)))},647192,e=>{e.v(t=>Promise.all(["static/chunks/0gqhau02~fg83.js"].map(t=>e.l(t))).then(()=>t(399133)))},30427,e=>{e.v(t=>Promise.all(["static/chunks/0zj_8cn9~m2~g.js"].map(t=>e.l(t))).then(()=>t(210032)))},509854,e=>{e.v(t=>Promise.all(["static/chunks/0extjypm.j7dp.js"].map(t=>e.l(t))).then(()=>t(637149)))},641974,e=>{e.v(t=>Promise.all(["static/chunks/0t1pc5h0n0y3..js"].map(t=>e.l(t))).then(()=>t(637056)))},66225,e=>{e.v(t=>Promise.all(["static/chunks/0uiiaq~dh4jdx.js"].map(t=>e.l(t))).then(()=>t(57079)))},252541,e=>{e.v(t=>Promise.all(["static/chunks/06xd5s9wkyu0_.js"].map(t=>e.l(t))).then(()=>t(441745)))},769837,e=>{e.v(t=>Promise.all(["static/chunks/0bm-i9rs31uos.js"].map(t=>e.l(t))).then(()=>t(534975)))},215611,e=>{e.v(t=>Promise.all(["static/chunks/0ggkvx5v53lvc.js"].map(t=>e.l(t))).then(()=>t(473166)))},316227,e=>{e.v(t=>Promise.all(["static/chunks/05tbg-zp1~2c_.js"].map(t=>e.l(t))).then(()=>t(282279)))},240972,e=>{e.v(t=>Promise.all(["static/chunks/05gu5s~8nh2wc.js"].map(t=>e.l(t))).then(()=>t(60065)))},216930,e=>{e.v(t=>Promise.all(["static/chunks/0sz5yhrzrrx-_.js"].map(t=>e.l(t))).then(()=>t(240783)))},755019,e=>{e.v(t=>Promise.all(["static/chunks/0p~x_p9pgpnmh.js"].map(t=>e.l(t))).then(()=>t(970178)))},717277,e=>{e.v(t=>Promise.all(["static/chunks/184ukbf139de1.js"].map(t=>e.l(t))).then(()=>t(418864)))},308554,e=>{e.v(t=>Promise.all(["static/chunks/0_-20qzivafad.js"].map(t=>e.l(t))).then(()=>t(797989)))},943272,e=>{e.v(t=>Promise.all(["static/chunks/0w52~a1.76e6y.js"].map(t=>e.l(t))).then(()=>t(493215)))},867512,e=>{e.v(t=>Promise.all(["static/chunks/0.hcqmse3gu~-.js"].map(t=>e.l(t))).then(()=>t(392020)))},611958,e=>{e.v(t=>Promise.all(["static/chunks/0lkfsj~tpr.u8.js"].map(t=>e.l(t))).then(()=>t(148296)))},560866,e=>{e.v(t=>Promise.all(["static/chunks/0jh9xnkimjkyh.js"].map(t=>e.l(t))).then(()=>t(618121)))},137857,e=>{e.v(t=>Promise.all(["static/chunks/0m11vvph7q94-.js"].map(t=>e.l(t))).then(()=>t(873278)))},963197,e=>{e.v(t=>Promise.all(["static/chunks/023lpc7n70tav.css","static/chunks/11_tltlhc8.sj.js"].map(t=>e.l(t))).then(()=>t(102199)))},940730,e=>{e.v(t=>Promise.all(["static/chunks/03scq1-0ykve3.js","static/chunks/16sg-lflc8csx.js","static/chunks/0ejc_zlyocy_r.css"].map(t=>e.l(t))).then(()=>t(635473)))},509433,e=>{e.v(t=>Promise.all(["static/chunks/0esty_4gmxfq3.js","static/chunks/0rv0nj__24y60.js"].map(t=>e.l(t))).then(()=>t(934731)))},545594,e=>{e.v(t=>Promise.all(["static/chunks/10jfi.9fw5g48.js"].map(t=>e.l(t))).then(()=>t(775846)))},872082,e=>{e.v(t=>Promise.all(["static/chunks/07ge_85i__6pb.js","static/chunks/0c_vfzf1z7-rt.js","static/chunks/12md9ajfx2o85.css"].map(t=>e.l(t))).then(()=>t(831214)))},924017,e=>{e.v(t=>Promise.all(["static/chunks/0i_gi.kq2dau8.css","static/chunks/0qz5~3wquy~3q.css","static/chunks/05gt_g_vbzh-5.css","static/chunks/0cjmfclopcxho.css","static/chunks/0kvsjgpj7zcb9.css","static/chunks/0hl_7y464qll6.css","static/chunks/0lh~x2tf~i1hd.css","static/chunks/12md9ajfx2o85.css","static/chunks/0me8ho8j4tq7_.css","static/chunks/0dws-faof-ryx.css","static/chunks/0bzmgi.ynrn.0.css","static/chunks/0za1r07-6az6w.js","static/chunks/12u4g4uzrlten.js","static/chunks/0oaq67r7ix.vg.js","static/chunks/14hqmid8q4apf.js"].map(t=>e.l(t))).then(()=>t(797492)))},974099,e=>{e.v(t=>Promise.all(["static/chunks/0hl_7y464qll6.css","static/chunks/0lh~x2tf~i1hd.css","static/chunks/0kvsjgpj7zcb9.css","static/chunks/12md9ajfx2o85.css","static/chunks/0me8ho8j4tq7_.css","static/chunks/0dws-faof-ryx.css","static/chunks/0i_gi.kq2dau8.css","static/chunks/0i39jifmxla7q.js","static/chunks/06whz1~s_7pva.js","static/chunks/0i_3.3rdsu2mw.js"].map(t=>e.l(t))).then(()=>t(108792)))},473446,e=>{e.v(t=>Promise.all(["static/chunks/0l5ab99s37x5f.js"].map(t=>e.l(t))).then(()=>t(70280)))},876468,e=>{e.v(t=>Promise.all(["static/chunks/0~2l1-8o4delc.js"].map(t=>e.l(t))).then(()=>t(964938)))}]);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,837121,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"warnOnce",{enumerable:!0,get:function(){return s}});let s=e=>{}},361031,e=>{"use strict";let t=(0,e.i(816709).create)(e=>({workspaces:[],setWorkspaces:t=>e({workspaces:t}),upsertWorkspace:t=>{e(e=>{let a=e.workspaces.findIndex(e=>e.id===t.id);if(-1===a)return{workspaces:[...e.workspaces,t]};let s=[...e.workspaces];return s[a]=t,{workspaces:s}})},removeWorkspace:t=>{e(e=>({workspaces:e.workspaces.filter(e=>e.id!==t)}))}}));e.s(["useWorkspaceStore",0,t])},613087,e=>{"use strict";var t=e.i(344180),a=e.i(465458);e.s(["Skeleton",0,function({className:e,...s}){return(0,t.jsx)("div",{"data-slot":"skeleton",className:(0,a.cn)("animate-pulse rounded-md bg-muted",e),...s})},"SkeletonGroup",0,function({count:e=3,children:a}){return(0,t.jsx)(t.Fragment,{children:Array.from({length:e},(e,s)=>(0,t.jsx)("div",{children:a(s)},s))})}])},817854,e=>{"use strict";var t=e.i(344180),a=e.i(465458);e.s(["Label",0,function({className:e,...s}){return(0,t.jsx)("label",{"data-slot":"label",className:(0,a.cn)("flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50",e),...s})}])},210,e=>{"use strict";let t=(0,e.i(433721).default)("settings-2",[["path",{d:"M14 17H5",key:"gfn3mx"}],["path",{d:"M19 7h-9",key:"6i9tg"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}],["circle",{cx:"7",cy:"7",r:"3",key:"dfmy0x"}]]);e.s(["Settings2",0,t],210)},226651,e=>{"use strict";let t=(0,e.i(433721).default)("ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);e.s(["default",0,t])},315775,e=>{"use strict";var t=e.i(226651);e.s(["MoreHorizontal",()=>t.default])},381253,e=>{"use strict";let t=(0,e.i(433721).default)("file-code",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}]]);e.s(["FileCode",0,t],381253)},905724,e=>{"use strict";let t=(0,e.i(433721).default)("file-text",[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]]);e.s(["default",0,t])},989484,e=>{"use strict";var t=e.i(905724);e.s(["FileText",()=>t.default])},974267,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"BailoutToCSR",{enumerable:!0,get:function(){return n}});let s=e.r(981225);function n({reason:e,children:t}){if("u"<typeof window)throw Object.defineProperty(new s.BailoutToCSRError(e),"__NEXT_ERROR_CODE",{value:"E394",enumerable:!1,configurable:!0});return t}},404590,(e,t,a)=>{"use strict";function s(e){return e.split("/").map(e=>encodeURIComponent(e)).join("/")}Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"encodeURIPath",{enumerable:!0,get:function(){return s}})},172441,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"PreloadChunks",{enumerable:!0,get:function(){return o}});let s=e.r(344180),n=e.r(106206),i=e.r(94932),r=e.r(404590),l=e.r(745137);function o({moduleIds:e}){if("u">typeof window)return null;let t=i.workAsyncStorage.getStore();if(void 0===t)return null;let a=[];if(t.reactLoadableManifest&&e){let s=t.reactLoadableManifest;for(let t of e){if(!s[t])continue;let e=s[t].files;a.push(...e)}}if(0===a.length)return null;let c=(0,l.getAssetTokenQuery)();return(0,s.jsx)(s.Fragment,{children:a.map(e=>{let a=`${t.assetPrefix}/_next/${(0,r.encodeURIPath)(e)}${c}`;return e.endsWith(".css")?(0,s.jsx)("link",{precedence:"dynamic",href:a,rel:"stylesheet",as:"style",nonce:t.nonce},e):((0,n.preload)(a,{as:"script",fetchPriority:"low",nonce:t.nonce}),null)})})}},672479,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"default",{enumerable:!0,get:function(){return c}});let s=e.r(344180),n=e.r(764556),i=e.r(974267),r=e.r(172441);function l(e){return{default:e&&"default"in e?e.default:e}}let o={loader:()=>Promise.resolve(l(()=>null)),loading:null,ssr:!0},c=function(e){let t={...o,...e},a=(0,n.lazy)(()=>t.loader().then(l)),c=t.loading;function d(e){let l=c?(0,s.jsx)(c,{isLoading:!0,pastDelay:!0,error:null}):null,o=!t.ssr||!!t.loading,d=o?n.Suspense:n.Fragment,u=t.ssr?(0,s.jsxs)(s.Fragment,{children:["u"<typeof window?(0,s.jsx)(r.PreloadChunks,{moduleIds:t.modules}):null,(0,s.jsx)(a,{...e})]}):(0,s.jsx)(i.BailoutToCSR,{reason:"next/dynamic",children:(0,s.jsx)(a,{...e})});return(0,s.jsx)(d,{...o?{fallback:l}:{},children:u})}return d.displayName="LoadableComponent",d}},887836,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0}),Object.defineProperty(a,"default",{enumerable:!0,get:function(){return n}});let s=e.r(481258)._(e.r(672479));function n(e,t){let a={};"function"==typeof e&&(a.loader=e);let n={...a,...t};return(0,s.default)({...n,modules:n.loadableGenerated?.modules})}("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},977694,e=>{"use strict";let t=(0,e.i(433721).default)("rocket",[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]]);e.s(["Rocket",0,t],977694)},401058,e=>{"use strict";let t=(0,e.i(433721).default)("ellipsis-vertical",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"12",cy:"5",r:"1",key:"gxeob9"}],["circle",{cx:"12",cy:"19",r:"1",key:"lyex9k"}]]);e.s(["MoreVertical",0,t],401058)},239340,e=>{"use strict";var t=e.i(344180),a=e.i(209988),s=e.i(260218),n=e.i(611176),i=e.i(972846),r=e.i(465458);e.s(["AgentPickerDialog",0,function({open:e,onClose:l,onConfirm:o,title:c,description:d,agents:u,selected:m,onToggle:p,cancelText:h,confirmText:f,loading:x}){return(0,t.jsx)(a.Dialog,{open:e,onOpenChange:e=>{e||l()},children:(0,t.jsxs)(a.DialogContent,{className:"sm:max-w-sm flex flex-col gap-0 overflow-hidden p-0",children:[(0,t.jsxs)(a.DialogHeader,{className:"shrink-0 px-6 py-4",children:[(0,t.jsx)(a.DialogTitle,{children:c}),d&&(0,t.jsx)(a.DialogDescription,{children:d})]}),(0,t.jsxs)("div",{className:"min-h-0 flex-1 pb-2 overflow-y-auto px-6 space-y-3",children:[(0,t.jsx)("div",{className:"space-y-0.5",children:u.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>p(e.id),className:"flex items-center gap-2 w-full px-2 py-1.5 rounded-md hover:bg-muted text-left text-sm transition-colors",children:[(0,t.jsx)(n.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-5 rounded-full"}),(0,t.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,t.jsx)("span",{className:"block truncate",children:e.name}),e.description&&(0,t.jsx)("span",{className:"block truncate text-xs text-muted-foreground",children:e.description})]}),(0,t.jsx)("div",{className:(0,r.cn)("flex items-center justify-center size-4 rounded border shrink-0",m.includes(e.id)?"bg-primary border-primary text-primary-foreground":"border-input")})]},e.id))}),m.length>0&&(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:m.map(e=>{let a=u.find(t=>t.id===e);return(0,t.jsxs)("span",{className:"inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs max-w-[160px] min-w-0",children:[(0,t.jsx)(n.AgentIcon,{agentId:e,name:a?.name,avatarUrl:a?.avatarUrl,className:"size-3.5 rounded-full shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:a?.name||e}),(0,t.jsx)("button",{type:"button",onClick:()=>p(e),className:"hover:text-destructive shrink-0 cursor-pointer",children:(0,t.jsx)(i.X,{className:"size-3"})})]},e)})})]}),(0,t.jsxs)("div",{className:"shrink-0 flex justify-end gap-2 border-t px-6 py-4",children:[(0,t.jsx)(s.Button,{variant:"outline",onClick:l,children:h||"Cancel"}),(0,t.jsx)(s.Button,{onClick:o,disabled:x||0===m.length,children:f||"Confirm"})]})]})})}])},513501,e=>{"use strict";let t=(0,e.i(433721).default)("store",[["path",{d:"M15 21v-5a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v5",key:"slp6dd"}],["path",{d:"M17.774 10.31a1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.451 0 1.12 1.12 0 0 0-1.548 0 2.5 2.5 0 0 1-3.452 0 1.12 1.12 0 0 0-1.549 0 2.5 2.5 0 0 1-3.77-3.248l2.889-4.184A2 2 0 0 1 7 2h10a2 2 0 0 1 1.653.873l2.895 4.192a2.5 2.5 0 0 1-3.774 3.244",key:"o0xfot"}],["path",{d:"M4 10.95V19a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8.05",key:"wn3emo"}]]);e.s(["Store",0,t],513501)},327962,e=>{"use strict";let t=(0,e.i(433721).default)("git-branch",[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]]);e.s(["GitBranch",0,t],327962)},964970,e=>{"use strict";var t=e.i(344180),a=e.i(764556),s=e.i(244073),n=e.i(260218),i=e.i(681622),r=e.i(817854),l=e.i(360112),o=e.i(437122);e.s(["GitSettingsForm",0,function({scope:e,workspaceId:c}){let d=(0,s.useTranslations)("git.settings"),u=(0,s.useTranslations)("common"),[m,p]=(0,a.useState)(""),[h,f]=(0,a.useState)(""),[x,g]=(0,a.useState)(""),[y,v]=(0,a.useState)(""),[j,w]=(0,a.useState)(!0),[b,k]=(0,a.useState)(!1),S=(0,a.useCallback)(async()=>{w(!0);try{let t="global"===e?"/api/git-config":`/api/workspaces/${c}/git/config`,a=await fetch(t,{headers:(0,o.authHeaders)()});if(a.ok){let e=await a.json();p(e.name??""),f(e.email??""),g(e.proxy??"")}if("local"===e&&c){let e=await fetch(`/api/workspaces/${c}/git/remote-url`,{headers:(0,o.authHeaders)()});if(e.ok){let t=await e.json();v(t.url??"")}}}catch{}w(!1)},[e,c]);(0,a.useEffect)(()=>{S()},[e,c,S]);let N=async()=>{k(!0);try{let t="global"===e?"/api/git-config":`/api/workspaces/${c}/git/config`;if(!(await fetch(t,{method:"POST",headers:{"Content-Type":"application/json",...(0,o.authHeaders)()},body:JSON.stringify({name:m,email:h,proxy:x})})).ok){l.toast.error(d("saveFailed")),k(!1);return}"local"===e&&c&&y&&await fetch(`/api/workspaces/${c}/git/remotes`,{method:"POST",headers:{"Content-Type":"application/json",...(0,o.authHeaders)()},body:JSON.stringify({name:"origin",url:y})}),l.toast.success(d("saved"))}catch{l.toast.error(d("saveFailed"))}k(!1)};return j?(0,t.jsx)("div",{className:"text-xs text-muted-foreground",children:d("loading")}):(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:"global"===e?d("globalScopeDescription"):d("localScopeDescription")}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(r.Label,{className:"text-xs text-muted-foreground",children:d("name")}),(0,t.jsx)(i.Input,{className:"h-7 text-xs",value:m,onChange:e=>p(e.target.value),placeholder:d("namePlaceholder")})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(r.Label,{className:"text-xs text-muted-foreground",children:d("email")}),(0,t.jsx)(i.Input,{className:"h-7 text-xs",value:h,onChange:e=>f(e.target.value),placeholder:d("emailPlaceholder")})]}),(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(r.Label,{className:"text-xs text-muted-foreground",children:d("proxy")}),(0,t.jsx)(i.Input,{className:"h-7 text-xs",value:x,onChange:e=>g(e.target.value),placeholder:d("proxyPlaceholder")})]}),"local"===e&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)(r.Label,{className:"text-xs text-muted-foreground",children:d("remoteUrl")}),(0,t.jsx)(i.Input,{className:"h-7 text-xs",value:y,onChange:e=>v(e.target.value),placeholder:d("remoteUrlPlaceholder")})]}),(0,t.jsx)(n.Button,{size:"sm",className:"text-xs",onClick:N,disabled:b,children:u(b?"loading":"save")})]})}])},951841,e=>{"use strict";let t;var a=e.i(764556);let s=new Set;e.s(["setCachedUserAvatarUrl",0,function(e){t=e,s.forEach(t=>t(e))},"useUserAvatar",0,function(){let[e,n]=(0,a.useState)(()=>void 0!==t?t:null);return(0,a.useEffect)(()=>(void 0===t&&fetch("/api/user/settings").then(e=>e.json()).then(e=>{e.avatarUrl&&(t=e.avatarUrl,n(e.avatarUrl))}).catch(()=>{}),s.add(n),()=>{s.delete(n)}),[]),e}])},249673,380797,e=>{"use strict";let t=(0,e.i(433721).default)("chevron-up",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);e.s(["default",0,t],380797),e.s(["ChevronUp",0,t],249673)},14452,e=>{"use strict";var t=e.i(344180),a=e.i(764556),s=e.i(724966),n=e.i(465458),i=e.i(260218),r=e.i(422373),l=e.i(250226);function o({...e}){return(0,t.jsx)(s.Dialog.Portal,{"data-slot":"sheet-portal",...e})}function c({className:e,...a}){return(0,t.jsx)(s.Dialog.Backdrop,{"data-slot":"sheet-overlay",className:(0,n.cn)("fixed inset-0 z-50 bg-black/10 transition-opacity duration-150 data-ending-style:opacity-0 data-starting-style:opacity-0 supports-backdrop-filter:backdrop-blur-xs",e),...a})}e.s(["Sheet",0,function({ignoreBack:e=!1,...n}){let i=a.useId(),r=(0,l.useMobilePanelStore)(e=>e.registerOverlay),o=(0,l.useMobilePanelStore)(e=>e.unregisterOverlay),c="open"in n?n.open:"defaultOpen"in n?n.defaultOpen:void 0,d=n.onOpenChange,u=a.useRef(d);return a.useEffect(()=>{u.current=d},[d]),a.useEffect(()=>c&&!e&&u.current?(r(i,()=>u.current?.(!1,{reason:void 0})),()=>o(i)):void o(i),[e,c,i,r,o]),(0,t.jsx)(s.Dialog.Root,{"data-slot":"sheet",...n})},"SheetContent",0,function({className:e,children:a,side:l="right",showCloseButton:d=!0,...u}){return(0,t.jsxs)(o,{children:[(0,t.jsx)(c,{}),(0,t.jsxs)(s.Dialog.Popup,{"data-slot":"sheet-content","data-side":l,className:(0,n.cn)("fixed z-50 flex flex-col gap-4 bg-popover bg-clip-padding text-sm text-popover-foreground shadow-lg transition duration-200 ease-in-out data-ending-style:opacity-0 data-starting-style:opacity-0 data-[side=bottom]:inset-x-0 data-[side=bottom]:bottom-0 data-[side=bottom]:h-auto data-[side=bottom]:border-t data-[side=bottom]:data-ending-style:translate-y-[2.5rem] data-[side=bottom]:data-starting-style:translate-y-[2.5rem] data-[side=left]:top-[var(--app-top-inset)] data-[side=left]:bottom-0 data-[side=left]:left-0 data-[side=left]:h-[calc(100dvh-var(--app-top-inset))] data-[side=left]:w-3/4 data-[side=left]:border-r data-[side=left]:data-ending-style:translate-x-[-2.5rem] data-[side=left]:data-starting-style:translate-x-[-2.5rem] data-[side=right]:top-[var(--app-top-inset)] data-[side=right]:right-0 data-[side=right]:bottom-0 data-[side=right]:h-[calc(100dvh-var(--app-top-inset))] data-[side=right]:w-3/4 data-[side=right]:border-l data-[side=right]:data-ending-style:translate-x-[2.5rem] data-[side=right]:data-starting-style:translate-x-[2.5rem] data-[side=top]:inset-x-0 data-[side=top]:top-[var(--app-top-inset)] data-[side=top]:h-auto data-[side=top]:border-b data-[side=top]:data-ending-style:translate-y-[-2.5rem] data-[side=top]:data-starting-style:translate-y-[-2.5rem] data-[side=left]:sm:max-w-sm data-[side=right]:sm:max-w-sm",e),...u,children:[a,d&&(0,t.jsxs)(s.Dialog.Close,{"data-slot":"sheet-close",render:(0,t.jsx)(i.Button,{variant:"ghost",className:"absolute top-3 right-3",size:"icon-sm"}),children:[(0,t.jsx)(r.XIcon,{}),(0,t.jsx)("span",{className:"sr-only",children:"Close"})]})]})]})},"SheetDescription",0,function({className:e,...a}){return(0,t.jsx)(s.Dialog.Description,{"data-slot":"sheet-description",className:(0,n.cn)("text-sm text-muted-foreground",e),...a})},"SheetHeader",0,function({className:e,...a}){return(0,t.jsx)("div",{"data-slot":"sheet-header",className:(0,n.cn)("flex flex-col gap-0.5 p-4",e),...a})},"SheetTitle",0,function({className:e,...a}){return(0,t.jsx)(s.Dialog.Title,{"data-slot":"sheet-title",className:(0,n.cn)("font-heading text-base font-medium text-foreground",e),...a})}])},157408,e=>{"use strict";var t=e.i(523592),a=e.i(437122);class s{workspaceId;ws;handlers;reconnectTimer;url;disposed;constructor(e){this.workspaceId=e,this.ws=null,this.handlers=new Map,this.reconnectTimer=null,this.disposed=!1,this.onVisibilityChange=()=>{"visible"!==document.visibilityState||this.disposed||this.ws&&this.ws.readyState!==WebSocket.CLOSED&&this.ws.readyState!==WebSocket.CLOSING||(console.log("[WS] page visible, reconnecting..."),this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.reconnectTimer=null,this.connect())};const s=(0,t.getActiveServerUrl)(),n=(0,a.getToken)(),i=new URL("/ws",s??window.location.origin);i.protocol="https:"===i.protocol?"wss:":"ws:",i.searchParams.set("workspaceId",e),n&&i.searchParams.set("token",n),this.url=i.toString(),document.addEventListener("visibilitychange",this.onVisibilityChange)}connect(){this.ws=new WebSocket(this.url),this.ws.onopen=()=>{console.log("[WS] connected");let e=this.handlers.get("connected");if(e)for(let t of e)t(void 0)},this.ws.onmessage=e=>{try{let t=JSON.parse(e.data),a=this.handlers.get(t.event);if(a)for(let e of a)e(t.data)}catch{console.error("[WS] parse error")}},this.ws.onclose=e=>{console.log(`[WS] disconnected (${e.code}${e.reason?`: ${e.reason}`:""}), reconnecting...`),this.reconnectTimer=setTimeout(()=>this.connect(),3e3)},this.ws.onerror=()=>{this.ws?.close()}}onVisibilityChange;disconnect(){this.disposed=!0,document.removeEventListener("visibilitychange",this.onVisibilityChange),this.reconnectTimer&&clearTimeout(this.reconnectTimer),this.ws?.close(),this.ws=null}send(e,t){this.ws?.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({event:e,data:t}))}on(e,t){return this.handlers.has(e)||this.handlers.set(e,new Set),this.handlers.get(e).add(t),()=>this.handlers.get(e)?.delete(t)}off(e,t){this.handlers.get(e)?.delete(t)}}let n=null;e.s(["getWS",0,function(e){return n&&n.workspaceId!==e&&(n.disconnect(),n=null),n||(n=new s(e)).connect(),n}])},31807,e=>{"use strict";var t=e.i(816709),a=e.i(157408);let s="agent-spaces:channel:",n=(0,t.create)((e,t)=>({workspaceId:null,channels:[],activeChannelId:null,channelSelectSeq:0,messages:{},loadChannels:async t=>{let a=await fetch(`/api/workspaces/${t}/channels`),n=await a.json(),i=function(e,t){try{let a=localStorage.getItem(s+e);if(a&&t.some(e=>e.id===a))return a}catch{}return t[0]?.id??null}(t,n);e({workspaceId:t,channels:n,activeChannelId:i})},createChannel:async(t,a,s="general",n)=>{let i=await fetch(`/api/workspaces/${t}/channels`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a,type:s,members:n})}),r=await i.json();e(e=>({channels:e.channels.some(e=>e.id===r.id)?e.channels.map(e=>e.id===r.id?r:e):[...e.channels,r],activeChannelId:r.id}))},updateChannel:async(t,a,s)=>{let n=await fetch(`/api/workspaces/${t}/channels/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)});if(!n.ok)throw Error("Failed to update channel");let i=await n.json();return e(e=>({channels:e.channels.map(e=>e.id===a?i:e)})),i},setActiveChannel:t=>{let{workspaceId:a}=n.getState();if(a)try{localStorage.setItem(s+a,t)}catch{}e(e=>({activeChannelId:t,channelSelectSeq:e.channelSelectSeq+1}))},loadMessages:async(t,a)=>{let s=await fetch(`/api/workspaces/${t}/channels/${a}/messages`),n=await s.json();e(e=>({messages:{...e.messages,[a]:n}}))},loadChannelState:async(e,t)=>{let a=await fetch(`/api/workspaces/${e}/channels/${t}/state`);return a.ok?await a.json():null},sendMessage:(e,t,s,n=[],i=[],r)=>{(0,a.getWS)(e).send("channel.message",{channelId:t,content:s,mentions:n,attachments:i,replyToMessageId:r})},addMessage:(t,a)=>{e(e=>({messages:{...e.messages,[t]:[...e.messages[t]||[],a]}}))},updateMessage:(t,a)=>{e(e=>({messages:{...e.messages,[t]:(e.messages[t]||[]).map(e=>e.id===a.id?a:e)}}))},stopProcessingMessages:t=>{e(e=>({messages:{...e.messages,[t]:(e.messages[t]||[]).map(e=>"pending"===e.status||"streaming"===e.status||"waiting_for_user"===e.status?{...e,status:"error",content:e.content||"Stopped by user"}:e)}}))},deleteMessage:(t,a)=>{e(e=>({messages:{...e.messages,[t]:(e.messages[t]||[]).filter(e=>e.id!==a)}}))},clearMessages:async(t,a)=>{await fetch(`/api/workspaces/${t}/channels/${a}/messages`,{method:"DELETE"}),e(e=>({messages:{...e.messages,[a]:[]}}))},deleteChannel:async(e,a)=>{await fetch(`/api/workspaces/${e}/channels/${a}`,{method:"DELETE"}),t().removeChannelLocal(a)},removeChannelLocal:t=>{e(e=>{let a=e.channels.filter(e=>e.id!==t),s={...e.messages};return delete s[t],{channels:a,activeChannelId:e.activeChannelId===t?a[0]?.id??null:e.activeChannelId,messages:s}})},upsertChannel:t=>{e(e=>{let a=e.channels.findIndex(e=>e.id===t.id);if(a<0)return"string"==typeof t.workspaceId&&"string"==typeof t.name&&("general"===t.type||"issue"===t.type||"agent"===t.type)&&Array.isArray(t.members)&&"string"==typeof t.createdAt?{channels:[...e.channels,t]}:{channels:e.channels};let s=[...e.channels],n=s[a];return s[a]={...n,...t,members:Array.isArray(t.members)?t.members:n.members},{channels:s}})},saveDraft:async(t,a,s)=>{let i=n.getState().channels.find(e=>e.id===a);if(i?.draft?.content===s)return;let r={content:s,updatedAt:new Date().toISOString()};e(e=>({channels:e.channels.map(e=>e.id===a?{...e,draft:r}:e)})),await fetch(`/api/workspaces/${t}/channels/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({draft:r})})},clearDraft:async(t,a)=>{e(e=>({channels:e.channels.map(e=>e.id===a?{...e,draft:void 0}:e)})),await fetch(`/api/workspaces/${t}/channels/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({draft:null})})},ensureAndActivateChannel:async(a,s)=>{let{channels:n}=t();if(!n.some(e=>e.id===s)){let t=await fetch(`/api/workspaces/${a}/channels`);t.ok&&e({channels:await t.json()})}t().setActiveChannel(s)}}));e.s(["useChannelStore",0,n])},873111,e=>{"use strict";let t=(0,e.i(816709).create)((e,t)=>({tasks:[],loading:!1,loadTasks:async(t,a)=>{e({loading:!0});try{let s=a?`?issueId=${a}`:"",n=await fetch(`/api/workspaces/${t}/tasks${s}`),i=await n.json();e({tasks:i,loading:!1})}catch{e({loading:!1})}},createTask:async(e,a,s,n,i)=>{let r=await fetch(`/api/workspaces/${e}/tasks`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({issueId:a,title:s,description:n,agentConfigId:i})}),l=await r.json();return t().upsertTask(l),l},updateTask:async(e,a,s)=>{let n=await fetch(`/api/workspaces/${e}/tasks/${a}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(s)}),i=await n.json();t().upsertTask(i)},deleteTask:async(t,a)=>{await fetch(`/api/workspaces/${t}/tasks/${a}`,{method:"DELETE"}),e(e=>({tasks:e.tasks.filter(e=>e.id!==a)}))},retryTask:async(e,a)=>{let s=await fetch(`/api/workspaces/${e}/tasks/${a}/retry`,{method:"POST"}),n=await s.json();t().upsertTask(n)},cancelTask:async(e,a)=>{let s=await fetch(`/api/workspaces/${e}/tasks/${a}/cancel`,{method:"POST"}),n=await s.json();t().upsertTask(n)},reorderTasks:async(e,t,a)=>{await fetch(`/api/workspaces/${e}/tasks/reorder`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({issueId:t,taskIds:a})})},upsertTask:t=>{e(e=>{let a=e.tasks.findIndex(e=>e.id===t.id);if(a>=0){let s=[...e.tasks];return s[a]=t,{tasks:s}}return{tasks:[...e.tasks,t]}})}}));e.s(["useTaskStore",0,t])},327964,e=>{"use strict";var t=e.i(816709),a=e.i(31807),s=e.i(873111);let n="agent-spaces:issue:",i=(0,t.create)((t,r)=>({workspaceId:null,issues:[],activeIssueId:null,issueSelectSeq:0,loading:!1,loadIssues:async e=>{t({loading:!0});try{let a=await fetch(`/api/workspaces/${e}/issues`),s=await a.json(),i=function(e,t){try{let a=localStorage.getItem(n+e);if(a&&t.some(e=>e.id===a))return a}catch{}return null}(e,s);t({workspaceId:e,issues:s,activeIssueId:i,loading:!1})}catch{t({loading:!1})}},createIssue:async(e,t,a,s,n)=>{let i=await fetch(`/api/workspaces/${e}/issues`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({title:t,description:a,members:s,workflowId:n})}),l=await i.json();r().upsertIssue(l),r().setActiveIssue(l.id)},setActiveIssue:e=>{let{workspaceId:a}=i.getState();if(a&&e)try{localStorage.setItem(n+a,e)}catch{}t(t=>({activeIssueId:e,issueSelectSeq:t.issueSelectSeq+1}))},updateIssue:async(e,t,a)=>{let s=await fetch(`/api/workspaces/${e}/issues/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)}),n=await s.json();r().upsertIssue(n)},updateIssueStatus:async(e,t,a)=>{await fetch(`/api/workspaces/${e}/issues/${t}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({status:a})})},startIssue:async(t,a)=>{let s=await fetch(`/api/workspaces/${t}/issues/${a}/start`,{method:"POST"});if(!s.ok){let t=await s.json(),{toast:a}=await e.A(930010);a.error(t.error||t.message||"Failed to start issue");return}let n=await s.json();r().upsertIssue(n)},resumeIssue:async(e,t)=>{let a=await fetch(`/api/workspaces/${e}/issues/${t}/resume`,{method:"POST"}),s=await a.json();r().upsertIssue(s)},continueIssue:async(e,t)=>{let a=await fetch(`/api/workspaces/${e}/issues/${t}/continue`,{method:"POST"});if(!a.ok)return;let s=await a.json();r().upsertIssue(s)},interruptIssue:async(e,t)=>{let a=await fetch(`/api/workspaces/${e}/issues/${t}/interrupt`,{method:"POST"});if(!a.ok)return;let s=await a.json();r().upsertIssue(s)},deleteIssue:async(e,t)=>{let n=r().issues.find(e=>e.id===t);if(await fetch(`/api/workspaces/${e}/issues/${t}`,{method:"DELETE"}),r().removeIssue(t),n?.channelId){let{removeChannelLocal:e}=a.useChannelStore.getState();e(n.channelId)}let{tasks:i}=s.useTaskStore.getState(),l=i.filter(e=>e.issueId===t);if(l.length>0){let e=new Set(l.map(e=>e.id));s.useTaskStore.setState(t=>({tasks:t.tasks.filter(t=>!e.has(t.id))}))}},upsertIssue:e=>{t(t=>{let a=t.issues.findIndex(t=>t.id===e.id);if(a>=0){let s=[...t.issues];return s[a]=e,{issues:s}}return{issues:[...t.issues,e]}})},removeIssue:e=>{t(t=>({issues:t.issues.filter(t=>t.id!==e),activeIssueId:t.activeIssueId===e?null:t.activeIssueId}))}}));e.s(["useIssueStore",0,i])},592039,e=>{"use strict";let t=(0,e.i(433721).default)("circle-dot",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]]);e.s(["CircleDot",0,t],592039)},938306,e=>{"use strict";let t=(0,e.i(433721).default)("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]);e.s(["MessageCircle",0,t],938306)},506037,e=>{"use strict";var t=e.i(816709),a=e.i(437122);let s=(0,t.create)((e,t)=>({notifications:[],loaded:!1,load:async t=>{try{let s=await (0,a.fetchWithAuth)(`/api/workspaces/${t}/notifications`),n=await s.json();e({notifications:n,loaded:!0})}catch{e({loaded:!0})}},addNotification:t=>{e(e=>({notifications:[t,...e.notifications]}))},clearAll:async t=>{await (0,a.fetchWithAuth)(`/api/workspaces/${t}/notifications`,{method:"DELETE"}),e({notifications:[]})},markRead:async(t,s)=>{await (0,a.fetchWithAuth)(`/api/workspaces/${t}/notifications/${s}/read`,{method:"PUT"}),e(e=>({notifications:e.notifications.map(e=>e.id===s?{...e,read:!0}:e)}))},markAllRead:async t=>{await (0,a.fetchWithAuth)(`/api/workspaces/${t}/notifications/read-all`,{method:"PUT"}),e(e=>({notifications:e.notifications.map(e=>({...e,read:!0}))}))},reset:()=>e({notifications:[],loaded:!1})}));e.s(["useNotificationStore",0,s])},307858,e=>{"use strict";let t=(0,e.i(433721).default)("external-link",[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]]);e.s(["ExternalLink",0,t],307858)},100559,e=>{"use strict";let t=(0,e.i(433721).default)("server",[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]]);e.s(["Server",0,t],100559)},757106,e=>{"use strict";let t=(0,e.i(433721).default)("brain",[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]]);e.s(["default",0,t])},990336,e=>{"use strict";var t=e.i(757106);e.s(["Brain",()=>t.default])},651850,939760,e=>{"use strict";var t=e.i(433721);let a=(0,t.default)("panel-left",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]]);e.s(["default",0,a],651850);let s=(0,t.default)("settings",[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]]);e.s(["Settings",0,s],939760)},417092,e=>{"use strict";var t=e.i(344180),a=e.i(764556);function s(e,t){try{localStorage.setItem(e,JSON.stringify(t))}catch{}}let n=(0,a.forwardRef)(function({size:e=44,lsKey:n,onClick:i,children:r,className:l,style:o,visible:c=!0,snapThreshold:d=60,minimizeDelay:u=2e3,unhoverDelay:m=2e3,defaultPosition:p},h){let f=(0,a.useRef)({x:0,y:0}),[x,g]=(0,a.useState)({x:0,y:0}),[y,v]=(0,a.useState)(!1),[j,w]=(0,a.useState)(!1),b=(0,a.useRef)(!1),k=(0,a.useRef)({x:0,y:0}),S=(0,a.useRef)(!1),N=(0,a.useRef)(void 0),C=(0,a.useRef)(void 0),T=(0,a.useRef)("right"),P=(0,a.useRef)(null),D=e/2;(0,a.useEffect)(()=>{let t=function(e){try{let t=localStorage.getItem(e);return t?JSON.parse(t):null}catch{return null}}(n),a={x:p?.x??window.innerWidth-e-20,y:p?.y??window.innerHeight-e-28},s=t?{x:Math.min(t.x,window.innerWidth-e),y:Math.min(t.y,window.innerHeight-e)}:a;f.current=s,g(s),v(!0)},[n,e,p]);let M=(0,a.useCallback)(e=>{w(!0),f.current={x:"left"===e?-D:window.innerWidth-D,y:f.current.y},g(f.current)},[D]),O=(0,a.useCallback)(()=>{clearTimeout(N.current),N.current=void 0,clearTimeout(C.current),C.current=void 0},[]),I=(0,a.useCallback)(()=>{O(),w(!1);let t=window.innerWidth,a={x:f.current.x<t/2?12:t-e-12,y:f.current.y};f.current=a,g(a),s(n,a)},[O,e,n]),z=(0,a.useCallback)(()=>{j&&I(),clearTimeout(C.current),C.current=void 0},[j,I]),E=(0,a.useCallback)(()=>{P.current&&(C.current=setTimeout(()=>M(T.current),m))},[M,m]),A=(0,a.useCallback)(e=>{b.current=!0,S.current=!1,P.current=null,O(),j&&I(),k.current={x:e.clientX-f.current.x,y:e.clientY-f.current.y},e.target.setPointerCapture(e.pointerId)},[O,j,I]),R=(0,a.useCallback)(t=>{if(!b.current)return;S.current=!0;let a=Math.max(0,Math.min(window.innerWidth-e,t.clientX-k.current.x)),s=Math.max(0,Math.min(window.innerHeight-e,t.clientY-k.current.y));f.current={x:a,y:s},g({x:a,y:s})},[e]),$=(0,a.useCallback)(()=>{b.current=!1;let{x:t,y:a}=f.current,r=window.innerWidth,l=t<d,o=t>r-e-d,c=Math.max(12,Math.min(window.innerHeight-e-12,a));if(l||o){let t=l?"left":"right";T.current=t,P.current=t;let a={x:l?12:r-e-12,y:c};f.current=a,g(a),s(n,a),N.current=setTimeout(()=>M(t),u)}else P.current=null,f.current={x:t,y:c},g(f.current),s(n,{x:t,y:c});if(!S.current&&i){let e=t=>{t.stopPropagation(),t.preventDefault(),document.removeEventListener("click",e,!0)};document.addEventListener("click",e,!0),i()}},[i,M,e,d,u,n]);return((0,a.useEffect)(()=>{let t=()=>{O();let t=window.innerWidth;if(j){let a=f.current.x<t/2;f.current={x:a?-D:t-D,y:Math.min(f.current.y,window.innerHeight-e-12)}}else f.current={x:Math.min(f.current.x,t-e-12),y:Math.min(f.current.y,window.innerHeight-e-12)};g(f.current)};return window.addEventListener("resize",t),()=>window.removeEventListener("resize",t)},[O,j,D,e]),(0,a.useEffect)(()=>O,[O]),c&&y)?(0,t.jsx)("div",{ref:h,onPointerDown:A,onPointerMove:R,onPointerUp:$,onMouseEnter:z,onMouseLeave:E,className:l,style:{position:"fixed",left:x.x,top:x.y,width:e,height:e,borderRadius:"50%",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",zIndex:99999,touchAction:"none",userSelect:"none",transition:b.current?"none":"left 0.3s ease-out, top 0.3s ease-out",...o},children:r}):null});e.s(["FloatingBall",0,n])},549705,e=>{"use strict";var t=e.i(344180),a=e.i(764556),s=e.i(244073),n=e.i(209988),i=e.i(260218),r=e.i(681622),l=e.i(562918),o=e.i(767467),c=e.i(100559),d=e.i(953700),u=e.i(137340),m=e.i(990336),p=e.i(307858),h=e.i(368942);let f={vision:"bg-blue-500/10 text-blue-600 border-blue-200",reasoning:"bg-purple-500/10 text-purple-600 border-purple-200",embedding:"bg-green-500/10 text-green-600 border-green-200"};function x({providers:e,providerModels:a,onEdit:n,onDelete:r,onAddModel:o}){let d=(0,s.useTranslations)("providers");return(0,t.jsxs)("div",{className:"flex flex-col p-2",children:[e.map(e=>{let s=a.find(t=>t.id===e.id),h=s?.models??[];return(0,t.jsxs)("div",{className:"group rounded-lg px-3 py-2.5 hover:bg-muted/50 cursor-pointer transition-colors",onClick:()=>n(e),children:[(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[(0,t.jsx)("div",{className:"flex size-8 items-center justify-center rounded-lg bg-primary/10",children:(0,t.jsx)(c.Server,{className:"size-4 text-primary"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground truncate",children:e.apiBase||d("list.noApiBase")})]}),(0,t.jsxs)(l.Badge,{variant:"outline",className:"text-[10px] h-4 px-1.5",children:[h.length," ",d("list.modelsCount")]}),(0,t.jsx)(i.Button,{variant:"ghost",size:"icon-xs",className:"opacity-0 group-hover:opacity-100 transition-opacity",onClick:t=>{t.stopPropagation(),r(e.id)},children:(0,t.jsx)(u.Trash2,{className:"size-3 text-destructive"})})]}),h.length>0&&(0,t.jsx)("div",{className:"mt-2 ml-11 flex flex-wrap gap-1",children:h.map(e=>(0,t.jsxs)("span",{className:"inline-flex items-center gap-0.5 text-[11px] text-muted-foreground",children:[(0,t.jsx)(m.Brain,{className:"size-3"}),e.name,["vision","reasoning","embedding"].map(a=>e[a]?(0,t.jsx)("span",{className:`inline-block rounded px-1 text-[9px] font-medium border ${f[a]}`,children:a[0].toUpperCase()},a):null)]},e.id))}),(0,t.jsxs)(i.Button,{variant:"ghost",size:"xs",className:"mt-1 ml-11 h-6 text-[11px] text-muted-foreground",onClick:t=>{t.stopPropagation(),o(e.name)},children:[(0,t.jsx)(p.ExternalLink,{className:"size-3"}),d("list.addModel")]})]},e.id)}),0===e.length&&(0,t.jsxs)("div",{className:"flex flex-col items-center justify-center py-12 text-muted-foreground",children:[(0,t.jsx)(c.Server,{className:"size-10 mb-2 opacity-30"}),(0,t.jsx)("p",{className:"text-sm",children:d("list.empty")})]})]})}function g({draft:e,onChange:a}){let n=(0,s.useTranslations)("providers");return(0,t.jsx)("div",{className:"flex flex-col gap-5 p-5",children:(0,t.jsxs)("div",{className:"flex flex-col gap-2.5",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground uppercase tracking-wider",children:n("form.connection")}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:n("form.name")}),(0,t.jsx)(r.Input,{value:e.name||"",onChange:e=>a("name",e.target.value),placeholder:n("form.namePlaceholder")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:n("form.apiBase")}),(0,t.jsx)(r.Input,{value:e.apiBase||"",onChange:e=>a("apiBase",e.target.value),placeholder:n("form.apiBasePlaceholder")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("label",{className:"text-xs text-muted-foreground",children:n("form.apiKey")}),(0,t.jsx)(r.Input,{type:"password",value:e.apiKey||"",onChange:e=>a("apiKey",e.target.value),placeholder:n("form.apiKeyPlaceholder")})]})]})})}e.s(["ProvidersDialog",0,function({open:e,onOpenChange:r,onAddModel:l,standalone:c}){let u=(0,s.useTranslations)("providers"),m=(0,s.useTranslations)("common"),{models:p,providers:f,ensure:y,addProvider:v,updateProvider:j,removeProvider:w}=(0,h.useLLMStore)(),[b,k]=(0,a.useState)(null),[S,N]=(0,a.useState)(null),[C,T]=(0,a.useState)(!1),[P,D]=(0,a.useState)(!1),[M,O]=(0,a.useState)(null);(0,a.useEffect)(()=>{e&&(T(!0),O(null),y().finally(()=>T(!1)))},[e,y]);let I=()=>{k(null),N(null)},z=()=>{k(null),N({name:"",apiBase:"",apiKey:""})},E=async()=>{if(S&&S.name){D(!0),O(null);try{let e=!b,t=await fetch(e?"/api/providers":`/api/providers/${b.id}`,{method:e?"POST":"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(S)});if(!t.ok)throw Error();let a=await t.json();e?v(a):j(a),I()}catch{O(u("error.saveFailed"))}finally{D(!1)}}},A=async e=>{if(confirm(u("confirm.delete"))){D(!0);try{if(!(await fetch(`/api/providers/${e}`,{method:"DELETE"})).ok)throw Error();w(e),b?.id===e&&I()}catch{O(u("error.deleteFailed"))}finally{D(!1)}}},R=(0,t.jsxs)(t.Fragment,{children:[!c&&(0,t.jsxs)("div",{className:"flex items-center gap-3 border-b px-5 py-4",children:[S&&(0,t.jsx)(i.Button,{variant:"ghost",size:"icon-sm",onClick:I,children:(0,t.jsx)(o.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)(n.DialogHeader,{className:"flex-1 space-y-0",children:[(0,t.jsx)(n.DialogTitle,{className:"text-base",children:S?b?u("dialog.editTitle"):u("dialog.addTitle"):u("dialog.title")}),(0,t.jsx)(n.DialogDescription,{className:"text-xs",children:S?u("dialog.editDescription"):u("dialog.listDescription")})]}),!S&&(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",onClick:z,className:"mr-6",children:[(0,t.jsx)(d.Plus,{className:"size-3.5"}),u("dialog.add")]})]}),c&&!S&&(0,t.jsx)("div",{className:"flex items-center justify-end px-5 py-3 border-b",children:(0,t.jsxs)(i.Button,{variant:"outline",size:"sm",onClick:z,children:[(0,t.jsx)(d.Plus,{className:"size-3.5"}),u("dialog.add")]})}),c&&S&&(0,t.jsxs)("div",{className:"flex items-center gap-3 px-5 py-3 border-b",children:[(0,t.jsx)(i.Button,{variant:"ghost",size:"icon-sm",onClick:I,children:(0,t.jsx)(o.ArrowLeft,{className:"size-4"})}),(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsx)("h2",{className:"text-base font-medium truncate",children:b?u("dialog.editTitle"):u("dialog.addTitle")}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:u("dialog.editDescription")})]})]}),(0,t.jsxs)("div",{className:"flex-1 overflow-y-auto",children:[M&&(0,t.jsx)("div",{className:"mx-5 mt-4 rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-xs text-destructive",children:M}),C?(0,t.jsx)("div",{className:"py-12 text-center text-sm text-muted-foreground",children:u("dialog.loading")}):S?(0,t.jsx)(g,{draft:S,onChange:(e,t)=>{N(a=>a?{...a,[e]:t}:a)}}):(0,t.jsx)(x,{providers:f,providerModels:f.map(e=>{let t;return{id:e.id,models:(t=e.name,p.filter(e=>e.provider===t))}}),onEdit:e=>{k(e),N({...e})},onDelete:A,onAddModel:e=>{c||r(!1),l(e)}})]}),S&&(0,t.jsxs)("div",{className:"flex justify-end gap-2 border-t px-5 py-3",children:[(0,t.jsx)(i.Button,{variant:"outline",size:"sm",onClick:I,disabled:P,children:m("cancel")}),(0,t.jsx)(i.Button,{size:"sm",onClick:E,disabled:P||!S.name,children:m(P?"saving":"save")})]})]});return c?(0,t.jsx)("div",{className:"h-full flex flex-col",children:R}):(0,t.jsx)(n.Dialog,{open:e,onOpenChange:e=>{e||I(),r(e)},children:(0,t.jsx)(n.DialogContent,{className:"sm:max-w-2xl max-h-[85vh] flex flex-col p-0 gap-0",children:R})})}])},894920,e=>{"use strict";var t=e.i(344180),a=e.i(764556),s=e.i(209988),n=e.i(260218),i=e.i(681622),r=e.i(788010),l=e.i(344118),o=e.i(962562),c=e.i(953700),d=e.i(100559),u=e.i(137340);let m=(0,e.i(433721).default)("wifi",[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]]);var p=e.i(244073);e.s(["ServerManagerDialog",0,function({open:e,onOpenChange:h,servers:f,activeId:x,onUpdate:g,onRemove:y,onSwitch:v}){let j=(0,p.useTranslations)("sidebar"),w=(0,p.useTranslations)("common"),[b,k]=a.useState(null),[S,N]=a.useState(""),[C,T]=a.useState(""),[P,D]=a.useState(""),[M,O]=a.useState(""),[I,z]=a.useState(""),[E,A]=a.useState(""),[R,$]=a.useState(""),[L,F]=a.useState(null),B=()=>{k(null),N(""),T(""),D("")},W=()=>{if(!S.trim()||!C.trim())return;let e=C.trim().replace(/\/$/,"");/^https?:\/\//.test(e)||(e="http://"+e),g(f.map(t=>t.id===b?{...t,name:S.trim(),url:e,secret:P.trim()||void 0}:t)),B()},U=a.useCallback(e=>{console.log(`[server-diagnostic] ${e}`),$(t=>`${t}${t?"\n":""}${e}`)},[]),H=async e=>{F(e.id),$("");let t=e.url.replace(/\/$/,""),a=`${t}/api/health`,s=new URL("/ws",t);s.protocol="https:"===s.protocol?"wss:":"ws:",s.searchParams.set("workspaceId","__diagnostic__"),s.searchParams.set("token",e.secret||"__diagnostic__"),U(`time: ${new Date().toISOString()}`),U(`window.origin: ${window.location.origin}`),U(`window.href: ${window.location.href}`),U(`navigator.onLine: ${navigator.onLine}`),U(`target: ${t}`),U(`health: ${a}`);let n=performance.now();try{let e=new AbortController,t=window.setTimeout(()=>e.abort(),1e4),s=await fetch(a,{method:"GET",cache:"no-store",mode:"cors",signal:e.signal});window.clearTimeout(t);let i=await s.text();U(`fetch /api/health: OK ${s.status} ${s.statusText} (${Math.round(performance.now()-n)}ms)`),U(`fetch response: ${i.slice(0,500)||"<empty>"}`)}catch(t){let e=t instanceof Error?t:Error(String(t));U(`fetch /api/health: FAILED ${e.name}: ${e.message} (${Math.round(performance.now()-n)}ms)`)}U(`websocket: ${s.toString()}`),await new Promise(e=>{let t=performance.now(),a=!1,n=(s,n)=>{if(!a){a=!0,U(`${s} (${Math.round(performance.now()-t)}ms)`);try{n?.close()}catch{}e()}};try{let e=new WebSocket(s.toString()),t=window.setTimeout(()=>n("websocket: TIMEOUT",e),1e4);e.onopen=()=>{window.clearTimeout(t),n("websocket: OPEN",e)},e.onerror=()=>{window.clearTimeout(t),n("websocket: ERROR",e)},e.onclose=a=>{window.clearTimeout(t),n(`websocket: CLOSE code=${a.code} reason=${a.reason||"<empty>"}`,e)}}catch(t){let e=t instanceof Error?t:Error(String(t));n(`websocket: FAILED ${e.name}: ${e.message}`)}}),F(null)};return(0,t.jsx)(s.Dialog,{open:e,onOpenChange:e=>{h(e),e||B()},children:(0,t.jsxs)(s.DialogContent,{className:"max-w-md",children:[(0,t.jsxs)(s.DialogHeader,{children:[(0,t.jsx)(s.DialogTitle,{children:j("server.manageServers")}),(0,t.jsx)(s.DialogDescription,{children:j("server.manageDescription")})]}),(0,t.jsx)("div",{className:"space-y-1",children:f.map(e=>(0,t.jsxs)("div",{className:"flex items-center gap-3 rounded-md border px-3 py-2",children:[(0,t.jsx)(d.Server,{className:"size-4 shrink-0 text-muted-foreground"}),b===e.id?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.Input,{className:"h-7 text-sm flex-1",value:S,onChange:e=>N(e.target.value),placeholder:"Name",autoFocus:!0}),(0,t.jsx)(i.Input,{className:"h-7 text-sm flex-[1.5]",value:C,onChange:e=>T(e.target.value),placeholder:"http://...",onKeyDown:e=>"Enter"===e.key&&e.preventDefault()}),(0,t.jsx)(n.Button,{size:"sm",variant:"ghost",onClick:W,className:"h-7 px-2",children:w("save")}),(0,t.jsx)(n.Button,{size:"sm",variant:"ghost",onClick:B,className:"h-7 px-2",children:w("cancel")})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0 cursor-pointer",onClick:()=>{e.id!==x&&v(e)},children:[(0,t.jsx)("div",{className:"text-sm font-medium truncate",children:e.name}),(0,t.jsx)("div",{className:"text-xs text-muted-foreground truncate",children:e.url})]}),e.id===x?(0,t.jsx)(l.Check,{className:"size-4 shrink-0 text-primary"}):(0,t.jsx)(n.Button,{size:"sm",variant:"ghost",onClick:()=>v(e),className:"h-7 px-2 text-xs shrink-0",children:j("server.switch")}),(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(m,{className:"size-3.5 shrink-0 text-muted-foreground cursor-pointer hover:text-foreground",onClick:()=>H(e)}),(0,t.jsx)(o.Pencil,{className:"size-3.5 shrink-0 text-muted-foreground cursor-pointer hover:text-foreground",onClick:()=>{k(e.id),N(e.name),T(e.url),D(e.secret||"")}}),"default"!==e.id&&(0,t.jsx)(u.Trash2,{className:"size-3.5 shrink-0 text-muted-foreground cursor-pointer hover:text-destructive",onClick:()=>y(e.id)})]})]})]},e.id))}),null===b&&(0,t.jsxs)("div",{className:"border-t pt-3 mt-2 space-y-2",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground mb-2",children:j("server.newServer")}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsx)(i.Input,{className:"h-8 text-sm",value:M,onChange:e=>O(e.target.value),placeholder:"Name"}),(0,t.jsx)(n.Button,{size:"sm",onClick:()=>{if(!M.trim()||!I.trim())return;let e=I.trim().replace(/\/$/,"");/^https?:\/\//.test(e)||(e="http://"+e),g([...f,{id:Date.now().toString(),name:M.trim(),url:e,secret:E.trim()||void 0}]),O(""),z(""),A("")},disabled:!M.trim()||!I.trim(),children:(0,t.jsx)(c.Plus,{className:"size-4"})})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(i.Input,{className:"h-8 text-sm flex-1",value:I,onChange:e=>z(e.target.value),placeholder:"http://..."})}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsx)(i.Input,{className:"h-8 text-sm flex-1",type:"password",value:E,onChange:e=>A(e.target.value),placeholder:j("server.secretOptionalPlaceholder"),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()})})]}),(0,t.jsxs)("div",{className:"border-t pt-3 mt-2 space-y-2",children:[(0,t.jsxs)("div",{className:"flex items-center justify-between",children:[(0,t.jsx)("div",{className:"text-xs font-medium text-muted-foreground",children:"Network diagnostics"}),(0,t.jsx)(n.Button,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",disabled:!f.find(e=>e.id===x)||null!==L,onClick:()=>{let e=f.find(e=>e.id===x);e&&H(e)},children:L?"Testing...":"Test active"})]}),(0,t.jsx)(r.Textarea,{readOnly:!0,value:R||"Tap the Wi-Fi icon next to a server, or use Test active.",className:"h-36 resize-none font-mono text-[11px]"})]})]})})}],894920)},164202,511518,487122,e=>{"use strict";let t=(0,e.i(433721).default)("zap",[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]]);e.s(["Zap",0,t],164202);let a=Symbol.for("constructDateFrom");e.s(["constructFromSymbol",0,a,"millisecondsInDay",0,864e5,"millisecondsInWeek",0,6048e5,"minutesInDay",0,1440,"minutesInMonth",0,43200],511518),e.s(["constructFrom",0,function(e,t){return"function"==typeof e?e(t):e&&"object"==typeof e&&a in e?e[a](t):e instanceof Date?new e.constructor(t):new Date(t)}],487122)},238153,244874,e=>{"use strict";var t;let a={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function s(e){return (t={})=>{let a=t.width?String(t.width):e.defaultWidth;return e.formats[a]||e.formats[e.defaultWidth]}}let n={date:s({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:s({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:s({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},i={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"};function r(e){return(t,a)=>{let s;if("formatting"===(a?.context?String(a.context):"standalone")&&e.formattingValues){let t=e.defaultFormattingWidth||e.defaultWidth,n=a?.width?String(a.width):t;s=e.formattingValues[n]||e.formattingValues[t]}else{let t=e.defaultWidth,n=a?.width?String(a.width):e.defaultWidth;s=e.values[n]||e.values[t]}return s[e.argumentCallback?e.argumentCallback(t):t]}}function l(e){return(t,a={})=>{let s,n=a.width,i=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],r=t.match(i);if(!r)return null;let l=r[0],o=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(o)?function(e,t){for(let a=0;a<e.length;a++)if(t(e[a]))return a}(o,e=>e.test(l)):function(e,t){for(let a in e)if(Object.prototype.hasOwnProperty.call(e,a)&&t(e[a]))return a}(o,e=>e.test(l));return s=e.valueCallback?e.valueCallback(c):c,{value:s=a.valueCallback?a.valueCallback(s):s,rest:t.slice(l.length)}}}let o={code:"en-US",formatDistance:(e,t,s)=>{let n,i=a[e];if(n="string"==typeof i?i:1===t?i.one:i.other.replace("{{count}}",t.toString()),s?.addSuffix)if(s.comparison&&s.comparison>0)return"in "+n;else return n+" ago";return n},formatLong:n,formatRelative:(e,t,a,s)=>i[e],localize:{ordinalNumber:(e,t)=>{let a=Number(e),s=a%100;if(s>20||s<10)switch(s%10){case 1:return a+"st";case 2:return a+"nd";case 3:return a+"rd"}return a+"th"},era:r({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:r({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:e=>e-1}),month:r({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:r({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:r({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},match:{ordinalNumber:(t={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:e=>parseInt(e,10)},(e,a={})=>{let s=e.match(t.matchPattern);if(!s)return null;let n=s[0],i=e.match(t.parsePattern);if(!i)return null;let r=t.valueCallback?t.valueCallback(i[0]):i[0];return{value:r=a.valueCallback?a.valueCallback(r):r,rest:e.slice(n.length)}}),era:l({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:l({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:e=>e+1}),month:l({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:l({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:l({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},options:{weekStartsOn:0,firstWeekContainsDate:1}};e.s(["enUS",0,o],244874),e.s(["defaultLocale",0,o],238153)},492421,e=>{"use strict";let t={};e.s(["getDefaultOptions",0,function(){return t}])},632713,516467,e=>{"use strict";var t=e.i(487122);function a(e,a){return(0,t.constructFrom)(a||e,e)}e.s(["toDate",0,a],516467),e.s(["getTimezoneOffsetInMilliseconds",0,function(e){let t=a(e),s=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return s.setUTCFullYear(t.getFullYear()),e-s}],632713)},539392,e=>{"use strict";var t=e.i(487122);e.s(["normalizeDates",0,function(e,...a){let s=t.constructFrom.bind(null,e||a.find(e=>"object"==typeof e));return a.map(s)}])},731285,e=>{"use strict";var t=e.i(539392);e.s(["differenceInCalendarMonths",0,function(e,a,s){let[n,i]=(0,t.normalizeDates)(s?.in,e,a);return 12*(n.getFullYear()-i.getFullYear())+(n.getMonth()-i.getMonth())}])},936765,e=>{"use strict";var t=e.i(516467);e.s(["endOfMonth",0,function(e,a){let s=(0,t.toDate)(e,a?.in),n=s.getMonth();return s.setFullYear(s.getFullYear(),n+1,0),s.setHours(23,59,59,999),s}])},524,e=>{"use strict";var t=e.i(344180),a=e.i(764556),s=e.i(209988),n=e.i(260218),i=e.i(355819),r=e.i(193251),l=e.i(62669),o=e.i(511800),c=e.i(681622),d=e.i(434805),u=e.i(660748),m=e.i(244073);function p({open:e,onOpenChange:h,workspace:f,onSubmit:x}){let g=(0,m.useTranslations)("workspace"),y=(0,m.useTranslations)("common"),v=(0,i.useAgentStore)(e=>e.agents),[j,w]=(0,a.useState)(f?.name??""),[b,k]=(0,a.useState)(f?.boundDirs[0]??""),[S,N]=(0,a.useState)(!1),[C,T]=(0,a.useState)(!1),[P,D]=(0,a.useState)(""),[M,O]=(0,a.useState)(!1),[I,z]=(0,a.useState)(null),E=!!f,A=async()=>{if(j&&b){N(!0);try{await x({name:j,boundDirs:[b]}),h(!1)}finally{N(!1)}}},R=(0,a.useCallback)(async()=>{if(P&&b){O(!0),z(null);try{let e=await fetch("/api/workspaces/clone",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({url:P,targetDir:b})});if(!e.ok){let t=await e.json();z({phase:"error",progress:0,error:t.error||g("clone.cloneFailed")}),O(!1);return}let t=e.body?.getReader();if(!t){z({phase:"error",progress:0,error:g("clone.noResponseBody")}),O(!1);return}let a=new TextDecoder,s="";for(;;){let{done:e,value:n}=await t.read();if(e)break;let i=(s+=a.decode(n,{stream:!0})).split("\n");for(let e of(s=i.pop()||"",i))if(e.startsWith("data: "))try{let t=JSON.parse(e.slice(6));z(t),("done"===t.phase||"error"===t.phase)&&(O(!1),"done"===t.phase&&t.cloneDir&&(k(t.cloneDir),j||w(P.split("/").pop()?.replace(".git","")||""),T(!1),D(""),z(null)))}catch{}}}catch(e){z({phase:"error",progress:0,error:e instanceof Error?e.message:String(e)}),O(!1)}}},[P,b,j,g]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(s.Dialog,{open:e,onOpenChange:h,children:(0,t.jsxs)(s.DialogContent,{children:[(0,t.jsxs)(s.DialogHeader,{children:[(0,t.jsx)(s.DialogTitle,{children:E?g("dialog.editTitle"):g("dialog.newTitle")}),(0,t.jsx)(s.DialogDescription,{children:E?g("dialog.editDescription"):g("dialog.newDescription")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 py-2",children:[(0,t.jsx)(c.Input,{className:"rounded-xl py-2.5",placeholder:g("dialog.namePlaceholder"),value:j,onChange:e=>w(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault()}),(0,t.jsx)("div",{children:(0,t.jsx)(d.FolderPicker,{value:b,onChange:k,placeholder:"/path/to/project"})}),!E&&(0,t.jsxs)(n.Button,{type:"button",variant:"outline",size:"sm",className:"w-full gap-1.5",onClick:()=>T(!0),disabled:!b,title:b?g("clone.fromGitTooltip"):g("clone.selectFolderFirst"),children:[(0,t.jsx)(r.Download,{className:"size-4"}),g("clone.createFromGit")]}),E&&v.length>0&&(0,t.jsxs)("div",{className:"rounded-xl border border-border p-3",children:[(0,t.jsxs)("div",{className:"mb-2 flex items-center gap-2 text-sm font-medium",children:[(0,t.jsx)("span",{className:"text-muted-foreground",children:v.length}),(0,t.jsx)("span",{children:g("agents")})]}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1.5",children:v.map(e=>(0,t.jsx)("span",{className:"inline-flex items-center gap-1 rounded-md bg-muted px-2 py-0.5 text-xs",children:e.name||e.role},e.id))})]})]}),(0,t.jsxs)(s.DialogFooter,{children:[(0,t.jsx)(n.Button,{variant:"outline",onClick:()=>h(!1),disabled:S,children:y("cancel")}),(0,t.jsx)(n.Button,{onClick:A,disabled:!j||!b||S,children:y(E?"save":"create")})]})]})}),(0,t.jsx)(s.Dialog,{open:C,onOpenChange:e=>{M||T(e)},children:(0,t.jsxs)(s.DialogContent,{children:[(0,t.jsxs)(s.DialogHeader,{children:[(0,t.jsx)(s.DialogTitle,{children:g("clone.title")}),(0,t.jsx)(s.DialogDescription,{children:g("clone.description")})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-3 py-2",children:[(0,t.jsx)(c.Input,{className:"rounded-xl py-2.5",placeholder:"https://github.com/user/repo.git",value:P,onChange:e=>D(e.target.value),onKeyDown:e=>"Enter"===e.key&&e.preventDefault(),disabled:M}),(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[g("clone.cloneTo"),b,"/",P?P.split("/").pop()?.replace(".git","")||"repo":"..."]}),I&&"done"!==I.phase&&"error"!==I.phase&&(0,t.jsxs)("div",{className:"space-y-1.5",children:[(0,t.jsxs)(u.Progress,{value:I.progress,children:[(0,t.jsx)(u.ProgressLabel,{children:g(`clone.phase.${I.phase}`)}),(0,t.jsxs)("span",{className:"ml-auto text-sm text-muted-foreground tabular-nums",children:[I.progress,"%"]}),(0,t.jsx)(u.ProgressTrack,{children:(0,t.jsx)(u.ProgressIndicator,{})})]}),null!=I.received&&null!=I.total&&(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:[I.received," / ",I.total," ",g("clone.objects")]})]}),I?.phase==="error"&&(0,t.jsxs)("div",{className:"flex items-start gap-2 rounded-lg border border-destructive/50 bg-destructive/5 p-3",children:[(0,t.jsx)(o.AlertCircle,{className:"size-4 mt-0.5 shrink-0 text-destructive"}),(0,t.jsx)("p",{className:"text-sm text-destructive",children:I.error})]})]}),(0,t.jsxs)(s.DialogFooter,{children:[(0,t.jsx)(n.Button,{variant:"outline",onClick:()=>{M||T(!1)},disabled:M,children:y("cancel")}),(0,t.jsx)(n.Button,{onClick:R,disabled:!P||M,children:M?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(l.Loader2,{className:"size-4 animate-spin"}),g("clone.cloning")]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(r.Download,{className:"size-4"}),g("clone.clone")]})})]})]})})]})}e.s(["WorkspaceDialog",0,function({open:e,onOpenChange:a,workspace:s,onSubmit:n}){return(0,t.jsx)(p,{open:e,onOpenChange:a,workspace:s,onSubmit:n},e?s?.id??"new":"closed")}])},842809,203922,e=>{"use strict";let t=new Map;function a(e,a,s){return null==e?"":(function(e,a){let s=JSON.stringify({locale:e,options:a}),n=t.get(s);if(n)return n;let i=new Intl.NumberFormat(e,a);return t.set(s,i),i})(a,s).format(e)}e.s(["formatNumber",0,a,"formatNumberValue",0,function(e,t,s){return null==e?"":s?a(e,t,s):a(e/100,t,{style:"percent"})}],842809),e.s(["valueToPercent",0,function(e,t,a){return(e-t)*100/(a-t)}],203922)},612505,e=>{"use strict";let t=(0,e.i(433721).default)("circle-alert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["default",0,t])},511800,e=>{"use strict";var t=e.i(612505);e.s(["AlertCircle",()=>t.default])},660748,e=>{"use strict";var t,a=e.i(344180);e.s([],606106),e.i(606106),e.i(8890);var s=e.i(764556),n=e.i(106045),i=e.i(236706),r=e.i(842809),l=e.i(969490),o=e.i(267805);let c=s.createContext(void 0);function d(){let e=s.useContext(c);if(void 0===e)throw Error((0,o.default)(51));return e}let u=((t={}).complete="data-complete",t.indeterminate="data-indeterminate",t.progressing="data-progressing",t),m={status:e=>"progressing"===e?{[u.progressing]:""}:"complete"===e?{[u.complete]:""}:"indeterminate"===e?{[u.indeterminate]:""}:null};function p(e,t){return null==t?"indeterminate progress":e||`${t}%`}let h=s.forwardRef(function(e,t){let{format:o,getAriaValueText:d=p,locale:u,max:h=100,min:f=0,value:x,render:g,className:y,children:v,style:j,...w}=e,[b,k]=s.useState(),S=(0,n.useValueAsRef)(o),N="indeterminate";Number.isFinite(x)&&(N=x===h?"complete":"progressing");let C=(0,r.formatNumberValue)(x,u,S.current),T=s.useMemo(()=>({status:N}),[N]),P={"aria-labelledby":b,"aria-valuemax":h,"aria-valuemin":f,"aria-valuenow":x??void 0,"aria-valuetext":d(C,x),role:"progressbar",children:(0,a.jsxs)(s.Fragment,{children:[v,(0,a.jsx)("span",{role:"presentation",style:i.visuallyHidden,children:"x"})]})},D=s.useMemo(()=>({formattedValue:C,max:h,min:f,setLabelId:k,state:T,status:N,value:x}),[C,h,f,k,T,N,x]),M=(0,l.useRenderElement)("div",e,{state:T,ref:t,props:[P,w],stateAttributesMapping:m});return(0,a.jsx)(c.Provider,{value:D,children:M})}),f=s.forwardRef(function(e,t){let{render:a,className:s,style:n,...i}=e,{state:r}=d();return(0,l.useRenderElement)("div",e,{state:r,ref:t,props:i,stateAttributesMapping:m})});var x=e.i(203922);let g=s.forwardRef(function(e,t){let{render:a,className:n,style:i,...r}=e,{max:o,min:c,value:u,state:p}=d(),h=Number.isFinite(u)&&null!==u?(0,x.valueToPercent)(u,c,o):null,f=s.useCallback(()=>null==h?{}:{insetInlineStart:0,height:"inherit",width:`${h}%`},[h]);return(0,l.useRenderElement)("div",e,{state:p,ref:t,props:[{style:f()},r],stateAttributesMapping:m})}),y=s.forwardRef(function(e,t){let{className:a,render:s,children:n,style:i,...r}=e,{value:o,formattedValue:c,state:u}=d(),p=null==o?"indeterminate":c,h=null==o?null:c;return(0,l.useRenderElement)("span",e,{state:u,ref:t,props:[{"aria-hidden":!0,children:"function"==typeof n?n(p,o):h},r],stateAttributesMapping:m})});var v=e.i(559713);let j=s.forwardRef(function(e,t){let{render:a,className:s,style:n,id:i,...r}=e,{setLabelId:o,state:c}=d(),u=(0,v.useRegisteredLabelId)(i,o);return(0,l.useRenderElement)("span",e,{state:c,ref:t,props:[{id:u,role:"presentation"},r],stateAttributesMapping:m})});e.s(["Indicator",0,g,"Label",0,j,"Root",0,h,"Track",0,f,"Value",0,y],729535);var w=e.i(729535),w=w,b=e.i(465458);function k({className:e,...t}){return(0,a.jsx)(w.Track,{className:(0,b.cn)("relative flex h-1 w-full items-center overflow-x-hidden rounded-full bg-muted",e),"data-slot":"progress-track",...t})}function S({className:e,...t}){return(0,a.jsx)(w.Indicator,{"data-slot":"progress-indicator",className:(0,b.cn)("h-full bg-primary transition-all",e),...t})}e.s(["Progress",0,function({className:e,children:t,value:s,...n}){return(0,a.jsxs)(w.Root,{value:s,"data-slot":"progress",className:(0,b.cn)("flex flex-wrap gap-3",e),...n,children:[t,(0,a.jsx)(k,{children:(0,a.jsx)(S,{})})]})},"ProgressIndicator",0,S,"ProgressLabel",0,function({className:e,...t}){return(0,a.jsx)(w.Label,{className:(0,b.cn)("text-sm font-medium",e),"data-slot":"progress-label",...t})},"ProgressTrack",0,k],660748)},361421,e=>{"use strict";let t=(0,e.i(433721).default)("folder-search",[["path",{d:"M10.7 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v4.1",key:"1bw5m7"}],["path",{d:"m21 21-1.9-1.9",key:"1g2n9r"}],["circle",{cx:"17",cy:"17",r:"3",key:"18b49y"}]]);e.s(["default",0,t])},244644,e=>{"use strict";var t=e.i(361421);e.s(["FolderSearch",()=>t.default])},756638,e=>{"use strict";var t=e.i(344180),a=e.i(764556),s=e.i(244073),n=e.i(887836),i=e.i(209988),r=e.i(260218),l=e.i(681622),o=e.i(191118),c=e.i(239340),d=e.i(460578),u=e.i(996652),m=e.i(917955),p=e.i(887354),h=e.i(401058),f=e.i(137340),x=e.i(977694),g=e.i(111343),y=e.i(953700),v=e.i(426022),j=e.i(129981),w=e.i(193251),b=e.i(513501),k=e.i(989484);let S=(0,n.default)(()=>e.A(863812).then(e=>e.default),{loadableGenerated:{modules:[158480]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Loading editor..."})});e.s(["PromptsDialog",0,function({open:e,onOpenChange:n,standalone:N}){let C=(0,s.useTranslations)("prompts"),T=(0,s.useTranslations)("common"),[P,D]=(0,a.useState)("local"),[M,O]=(0,a.useState)([]),[I,z]=(0,a.useState)([]),[E,A]=(0,a.useState)(!1),[R,$]=(0,a.useState)(""),[L,F]=(0,a.useState)([]),[B,W]=(0,a.useState)(!1),[U,H]=(0,a.useState)(new Set),[J,V]=(0,a.useState)(!1),[_,q]=(0,a.useState)([]),[X,Y]=(0,a.useState)(null),[K,G]=(0,a.useState)([]),[Q,Z]=(0,a.useState)(!1),[ee,et]=(0,a.useState)(null),[ea,es]=(0,a.useState)(!1),[en,ei]=(0,a.useState)(""),[er,el]=(0,a.useState)(""),[eo,ec]=(0,a.useState)(!1),ed=(0,a.useCallback)(async()=>{A(!0);try{let e=await fetch("/api/prompt-templates");e.ok&&O(await e.json())}catch{}A(!1)},[]),eu=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/prompt-templates/agents");e.ok&&z(await e.json())}catch{}},[]),em=(0,a.useCallback)(async()=>{W(!0);try{let e=await fetch("/public/prompt/index.json");e.ok&&F(await e.json())}catch{}W(!1)},[]);(0,a.useEffect)(()=>{(e||N)&&(ed(),eu(),em())},[e,N,ed,eu,em]);let ep=new Set(M.filter(e=>e.storeId).map(e=>e.storeId)),eh=async()=>{if(0!==_.length){if(1===_.length){let e=await _[0].file.text(),t=_[0].file.name.replace(/\.(md|txt|markdown)$/i,"");q([]),V(!1),et(null),es(!0),ei(t),el(e);return}for(let e of _){let t=await e.file.text(),a=e.file.name.replace(/\.(md|txt|markdown)$/i,"");await fetch("/api/prompt-templates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:a,content:t})})}q([]),V(!1),ed()}},ef=async e=>{if(!(ep.has(e.id)||U.has(e.id))){H(t=>new Set(t).add(e.id));try{let t=await fetch(`/public/prompt/${e.filename}`);if(!t.ok)return;let a=await t.text(),s=await fetch("/api/prompt-templates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,content:a,storeId:e.id})});if(s.ok){let e=await s.json();O(t=>[...t,e])}}catch{}H(t=>{let a=new Set(t);return a.delete(e.id),a})}},ex=()=>{et(null),es(!1),ei(""),el("")},eg=async()=>{if(en.trim()&&er.trim()){ec(!0);try{if(ee){let e=await fetch(`/api/prompt-templates/${ee.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:en,content:er})});if(e.ok){let t=await e.json();O(e=>e.map(e=>e.id===t.id?t:e)),ex()}}else{let e=await fetch("/api/prompt-templates",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:en,content:er})});if(e.ok){let t=await e.json();O(e=>[...e,t]),ex()}}}catch{}ec(!1)}},ey=async e=>{try{(await fetch(`/api/prompt-templates/${e.id}`,{method:"DELETE"})).ok&&O(t=>t.filter(t=>t.id!==e.id))}catch{}},ev=async()=>{if(X&&0!==K.length){Z(!0);try{await fetch(`/api/prompt-templates/${X.id}/apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentIds:K})}),Y(null)}catch{}Z(!1)}},ej=M.filter(e=>{if(!R)return!0;let t=R.toLowerCase();return e.name.toLowerCase().includes(t)||e.content.toLowerCase().includes(t)}),ew=L.filter(e=>{if(!R)return!0;let t=R.toLowerCase();return e.name.toLowerCase().includes(t)||e.id.toLowerCase().includes(t)}),eb=(N||e)&&!X&&!ee&&!ea,ek=I.map(e=>({id:e.id,name:e.name,avatarUrl:e.avatarUrl,description:e.description})),eS=(0,t.jsx)("div",{className:"flex items-center gap-1 border-b border-border px-1",children:[["local",k.FileText,C("tabLocal")],["store",b.Store,C("tabStore")]].map(([e,a,s])=>(0,t.jsxs)("button",{onClick:()=>D(e),className:`flex items-center gap-1.5 px-3 py-2 text-sm font-medium border-b-2 transition-colors ${P===e?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[(0,t.jsx)(a,{className:"size-3.5"}),s]},e))}),eN=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-auto shrink-0 pt-2",children:[(0,t.jsxs)(u.Popover,{open:J,onOpenChange:V,children:[(0,t.jsx)(u.PopoverTrigger,{render:(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",children:[(0,t.jsx)(j.Upload,{className:"size-3.5 mr-1"}),C("import")]})}),(0,t.jsx)(u.PopoverContent,{className:"w-80",align:"end",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:C("importTitle")}),(0,t.jsx)(d.FileUpload,{value:_,onChange:q,accept:{"text/markdown":[".md",".txt"],"":[".md",".txt"]},placeholder:C("importPlaceholder"),maxFiles:10}),(0,t.jsx)(r.Button,{size:"sm",onClick:eh,disabled:0===_.length,className:"w-full",children:C("importConfirm")})]})})]}),(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",onClick:()=>{et(null),es(!0),ei(""),el("")},children:[(0,t.jsx)(y.Plus,{className:"size-3.5 mr-1"}),C("create")]})]}),(0,t.jsx)(o.ScrollArea,{className:"flex-1",children:E?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:T("loading")}):0===ej.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:C("empty")}):(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 pr-2",children:ej.map(e=>(0,t.jsx)("div",{className:"rounded-xl border border-border bg-background p-4 hover:bg-accent/30 transition-colors cursor-pointer",onClick:()=>{et(e),es(!1),ei(e.name),el(e.content)},children:(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(v.MessageSquare,{className:"size-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"font-medium text-sm truncate",children:e.name})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",className:"h-6 px-1.5 text-xs",onClick:()=>{Y(e),G([])},children:[(0,t.jsx)(x.Rocket,{className:"size-3 mr-0.5"}),C("apply")]}),(0,t.jsxs)(m.DropdownMenu,{children:[(0,t.jsx)(m.DropdownMenuTrigger,{render:(0,t.jsx)(r.Button,{variant:"ghost",size:"icon",className:"size-6"}),children:(0,t.jsx)(h.MoreVertical,{className:"size-3"})}),(0,t.jsx)(m.DropdownMenuContent,{align:"end",children:(0,t.jsxs)(m.DropdownMenuItem,{className:"text-destructive focus:text-destructive",onClick:()=>ey(e),children:[(0,t.jsx)(f.Trash2,{className:"size-3 mr-1.5"}),C("delete")]})})]})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-3",children:e.content.slice(0,200).replace(/^#\s+/,"")})]})},e.id))})})]}),eC=(0,t.jsx)(o.ScrollArea,{className:"flex-1",children:B?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:T("loading")}):0===ew.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:C("storeEmpty")}):(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 pr-2",children:ew.map(e=>{let a=ep.has(e.id),s=U.has(e.id);return(0,t.jsx)("div",{className:"rounded-xl border border-border bg-background p-4 hover:bg-accent/30 transition-colors",children:(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(b.Store,{className:"size-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"font-medium text-sm truncate",children:e.name})]}),(0,t.jsx)(r.Button,{variant:a?"ghost":"outline",size:"sm",className:"h-6 px-1.5 text-xs shrink-0",disabled:a||s,onClick:()=>ef(e),children:a?(0,t.jsx)(t.Fragment,{children:C("imported")}):s?(0,t.jsx)(t.Fragment,{children:C("importing")}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Download,{className:"size-3 mr-0.5"}),C("importTo")]})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.id})]})},e.id)})})}),eT=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.DialogHeader,{children:(0,t.jsx)("div",{className:"flex items-center justify-between pr-8",children:(0,t.jsxs)("div",{className:"hidden md:block",children:[N?(0,t.jsx)("h2",{className:"text-base font-semibold",children:C("title")}):(0,t.jsx)(i.DialogTitle,{children:C("title")}),N?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:C("description")}):(0,t.jsx)(i.DialogDescription,{children:C("description")})]})})}),eS,(0,t.jsx)("div",{className:"flex flex-1 min-h-0 gap-4 pt-2",children:(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(p.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(l.Input,{value:R,onChange:e=>$(e.target.value),placeholder:C("search"),className:"pl-8"})]}),"local"===P?eN:eC]})})]});return(0,t.jsxs)(t.Fragment,{children:[N&&eb&&(0,t.jsx)("div",{className:"h-full flex flex-col",children:eT}),!N&&(0,t.jsx)(i.Dialog,{open:eb,onOpenChange:n,children:(0,t.jsx)(i.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:eT})}),(0,t.jsx)(i.Dialog,{open:!!ee||ea,onOpenChange:e=>{e||ex()},children:(0,t.jsxs)(i.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:[(0,t.jsx)(i.DialogHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between pr-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(i.DialogTitle,{children:ee?C("editTitle",{name:ee.name}):C("createTitle")}),(0,t.jsx)(i.DialogDescription,{children:C("editDescription")})]}),(0,t.jsxs)(r.Button,{size:"sm",onClick:eg,disabled:eo||!en.trim()||!er.trim(),children:[(0,t.jsx)(g.Save,{className:"size-3.5 mr-1"}),T("save")]})]})}),(0,t.jsx)("div",{className:"space-y-3 pb-2",children:(0,t.jsx)(l.Input,{value:en,onChange:e=>ei(e.target.value),placeholder:C("namePlaceholder")})}),(0,t.jsx)("div",{className:"flex-1 min-h-0",children:(0,t.jsx)(S,{height:"100%",language:"markdown",value:er,onChange:e=>el(e||""),theme:"vs-dark",options:{fontSize:13,minimap:{enabled:!1},scrollBeyondLastLine:!1,padding:{top:8},renderLineHighlight:"gutter",wordWrap:"on"}})})]})}),(0,t.jsx)(c.AgentPickerDialog,{open:!!X,onClose:()=>Y(null),onConfirm:ev,title:C("applyTitle",{name:X?.name||""}),description:C("applyDescription"),agents:ek,selected:K,onToggle:e=>G(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),cancelText:T("cancel"),confirmText:C("applyConfirm",{count:K.length}),loading:Q})]})}])},841734,e=>{"use strict";var t=e.i(344180),a=e.i(764556),s=e.i(244073),n=e.i(887836),i=e.i(209988),r=e.i(260218),l=e.i(681622),o=e.i(191118),c=e.i(239340),d=e.i(460578),u=e.i(996652),m=e.i(917955),p=e.i(887354),h=e.i(401058),f=e.i(137340),x=e.i(953700),g=e.i(962562),y=e.i(129981),v=e.i(193251),j=e.i(977694),w=e.i(513501),b=e.i(989484);let k=(0,n.default)(()=>e.A(863812).then(e=>e.default),{loadableGenerated:{modules:[158480]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Loading editor..."})});e.s(["OutputStylesDialog",0,function({open:e,onOpenChange:n,standalone:S}){let N=(0,s.useTranslations)("outputStyles"),C=(0,s.useTranslations)("common"),[T,P]=(0,a.useState)("local"),[D,M]=(0,a.useState)([]),[O,I]=(0,a.useState)([]),[z,E]=(0,a.useState)(!1),[A,R]=(0,a.useState)(""),[$,L]=(0,a.useState)([]),[F,B]=(0,a.useState)(!1),[W,U]=(0,a.useState)(new Set),[H,J]=(0,a.useState)(!1),[V,_]=(0,a.useState)([]),[q,X]=(0,a.useState)(null),[Y,K]=(0,a.useState)(!1),[G,Q]=(0,a.useState)(""),[Z,ee]=(0,a.useState)(""),[et,ea]=(0,a.useState)(""),[es,en]=(0,a.useState)(!1),[ei,er]=(0,a.useState)(null),[el,eo]=(0,a.useState)([]),[ec,ed]=(0,a.useState)(!1),eu=(0,a.useCallback)(async()=>{E(!0);try{let e=await fetch("/api/output-styles");e.ok&&M(await e.json())}catch{}E(!1)},[]),em=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/output-styles/agents");e.ok&&I(await e.json())}catch{}},[]),ep=(0,a.useCallback)(async()=>{B(!0);try{let e=await fetch("/public/output-styles/index.json");e.ok&&L(await e.json())}catch{}B(!1)},[]);(0,a.useEffect)(()=>{(e||S)&&(eu(),em(),ep())},[e,S,eu,em,ep]);let eh=new Set(D.filter(e=>e.storeId).map(e=>e.storeId));function ef(e){let t=e.match(/^---\r?\n([\s\S]*?)\r?\n---\r?\n?/);if(!t)return{content:e};let a=t[1],s=e.slice(t[0].length),n=a.match(/^name:\s*(.+)$/m),i=a.match(/^description:\s*(.+)$/m);return{name:n?.[1]?.trim(),description:i?.[1]?.trim(),content:s}}let ex=async()=>{if(0!==V.length){if(1===V.length){let e=await V[0].file.text(),t=ef(e),a=t.name||V[0].file.name.replace(/\.(md|txt|markdown)$/i,"");_([]),J(!1),X(null),K(!0),Q(a),ee(t.description||""),ea(t.content||e);return}for(let e of V){let t=await e.file.text(),a=ef(t),s=a.name||e.file.name.replace(/\.(md|txt|markdown)$/i,"");await fetch("/api/output-styles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:s,content:a.content||t,description:a.description})})}_([]),J(!1),eu()}},eg=async e=>{if(!(eh.has(e.id)||W.has(e.id))){U(t=>new Set(t).add(e.id));try{let t=await fetch(`/public/output-styles/${e.filename}`);if(!t.ok)return;let a=await t.text(),s=ef(a),n=await fetch("/api/output-styles",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:e.name,content:s.content||a,storeId:e.id,description:s.description})});if(n.ok){let e=await n.json();M(t=>[...t,e])}}catch{}U(t=>{let a=new Set(t);return a.delete(e.id),a})}},ey=()=>{X(null),K(!1),Q(""),ee(""),ea("")},ev=async()=>{if(G.trim()&&et.trim()){en(!0);try{let e=q?`/api/output-styles/${q.id}`:"/api/output-styles",t=q?"PUT":"POST",a=await fetch(e,{method:t,headers:{"Content-Type":"application/json"},body:JSON.stringify({name:G,content:et,description:Z||void 0})});if(a.ok){let e=await a.json();M(t=>q?t.map(t=>t.id===e.id?e:t):[...t,e]),ey()}}catch{}en(!1)}},ej=async e=>{try{(await fetch(`/api/output-styles/${e.id}`,{method:"DELETE"})).ok&&M(t=>t.filter(t=>t.id!==e.id))}catch{}},ew=async()=>{if(ei&&0!==el.length){ed(!0);try{await fetch(`/api/output-styles/${ei.id}/apply`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({agentIds:el})}),er(null)}catch{}ed(!1)}},eb=D.filter(e=>{if(!A)return!0;let t=A.toLowerCase();return e.name.toLowerCase().includes(t)||e.content.toLowerCase().includes(t)}),ek=$.filter(e=>{if(!A)return!0;let t=A.toLowerCase();return e.name.toLowerCase().includes(t)||e.id.toLowerCase().includes(t)}),eS=(S||e)&&!ei&&!q&&!Y,eN=(0,t.jsx)("div",{className:"flex items-center gap-1 border-b border-border px-1",children:[["local",b.FileText,N("tabLocal")],["store",w.Store,N("tabStore")]].map(([e,a,s])=>(0,t.jsxs)("button",{onClick:()=>P(e),className:`flex items-center gap-1.5 px-3 py-2 text-sm font-medium border-b-2 transition-colors ${T===e?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"}`,children:[(0,t.jsx)(a,{className:"size-3.5"}),s]},e))}),eC=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"flex items-center gap-2 ml-auto shrink-0 pt-2",children:[(0,t.jsxs)(u.Popover,{open:H,onOpenChange:J,children:[(0,t.jsx)(u.PopoverTrigger,{render:(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",children:[(0,t.jsx)(y.Upload,{className:"size-3.5 mr-1"}),N("import")]})}),(0,t.jsx)(u.PopoverContent,{className:"w-80",align:"end",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:N("importTitle")}),(0,t.jsx)(d.FileUpload,{value:V,onChange:_,accept:{"text/markdown":[".md",".txt"],"":[".md",".txt"]},placeholder:N("importPlaceholder"),maxFiles:10}),(0,t.jsx)(r.Button,{size:"sm",onClick:ex,disabled:0===V.length,className:"w-full",children:N("importConfirm")})]})})]}),(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",onClick:()=>{X(null),K(!0),Q(""),ee(""),ea("")},children:[(0,t.jsx)(x.Plus,{className:"size-3.5 mr-1"}),N("create")]})]}),(0,t.jsx)(o.ScrollArea,{className:"flex-1",children:z?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:C("loading")}):0===eb.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:N("empty")}):(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 pr-2",children:eb.map(e=>(0,t.jsx)("div",{className:"rounded-xl border border-border bg-background p-4 hover:bg-accent/30 transition-colors cursor-pointer",onClick:()=>{X(e),K(!1),Q(e.name),ee(e.description||""),ea(e.content)},children:(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(g.Pencil,{className:"size-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"font-medium text-sm truncate",children:e.name})]}),(0,t.jsxs)("div",{className:"flex items-center gap-0.5 shrink-0",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",className:"h-6 px-1.5 text-xs",onClick:()=>{er(e),eo([])},children:[(0,t.jsx)(j.Rocket,{className:"size-3 mr-0.5"}),N("apply")]}),(0,t.jsxs)(m.DropdownMenu,{children:[(0,t.jsx)(m.DropdownMenuTrigger,{render:(0,t.jsx)(r.Button,{variant:"ghost",size:"icon",className:"size-6"}),children:(0,t.jsx)(h.MoreVertical,{className:"size-3"})}),(0,t.jsx)(m.DropdownMenuContent,{align:"end",children:(0,t.jsxs)(m.DropdownMenuItem,{className:"text-destructive focus:text-destructive",onClick:()=>ej(e),children:[(0,t.jsx)(f.Trash2,{className:"size-3 mr-1.5"}),N("delete")]})})]})]})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground line-clamp-3",children:e.description||e.content.slice(0,200)})]})},e.id))})})]}),eT=(0,t.jsx)(o.ScrollArea,{className:"flex-1",children:F?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:C("loading")}):0===ek.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:N("storeEmpty")}):(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3 pr-2",children:ek.map(e=>{let a=eh.has(e.id),s=W.has(e.id);return(0,t.jsx)("div",{className:"rounded-xl border border-border bg-background p-4 hover:bg-accent/30 transition-colors",children:(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-2",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5 min-w-0",children:[(0,t.jsx)(w.Store,{className:"size-3.5 text-muted-foreground shrink-0"}),(0,t.jsx)("span",{className:"font-medium text-sm truncate",children:e.name})]}),(0,t.jsx)(r.Button,{variant:a?"ghost":"outline",size:"sm",className:"h-6 px-1.5 text-xs shrink-0",disabled:a||s,onClick:()=>eg(e),children:a?(0,t.jsx)(t.Fragment,{children:N("imported")}):s?(0,t.jsx)(t.Fragment,{children:N("importing")}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(v.Download,{className:"size-3 mr-0.5"}),N("importTo")]})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:e.id})]})},e.id)})})}),eP=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.DialogHeader,{children:(0,t.jsx)("div",{className:"flex items-center justify-between pr-8",children:(0,t.jsxs)("div",{className:"hidden md:block",children:[S?(0,t.jsx)("h2",{className:"text-base font-semibold",children:N("title")}):(0,t.jsx)(i.DialogTitle,{children:N("title")}),S?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:N("description")}):(0,t.jsx)(i.DialogDescription,{children:N("description")})]})})}),eN,(0,t.jsx)("div",{className:"flex flex-1 min-h-0 gap-4 pt-2",children:(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(p.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(l.Input,{value:A,onChange:e=>R(e.target.value),placeholder:N("search"),className:"pl-8"})]}),"local"===T?eC:eT]})})]});return(0,t.jsxs)(t.Fragment,{children:[S&&eS&&(0,t.jsx)("div",{className:"h-full flex flex-col",children:eP}),!S&&(0,t.jsx)(i.Dialog,{open:eS,onOpenChange:n,children:(0,t.jsx)(i.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:eP})}),(0,t.jsx)(i.Dialog,{open:!!q||Y,onOpenChange:e=>{e||ey()},children:(0,t.jsxs)(i.DialogContent,{className:"sm:max-w-2xl h-[80vh] flex flex-col",children:[(0,t.jsxs)(i.DialogHeader,{children:[(0,t.jsx)(i.DialogTitle,{children:q?N("editTitle",{name:q.name}):N("createTitle")}),(0,t.jsx)(i.DialogDescription,{children:N("editDescription")})]}),(0,t.jsx)(l.Input,{value:G,onChange:e=>Q(e.target.value),placeholder:N("namePlaceholder")}),(0,t.jsx)(l.Input,{value:Z,onChange:e=>ee(e.target.value),placeholder:N("descriptionPlaceholder")}),(0,t.jsx)("div",{className:"flex-1 min-h-0 overflow-hidden rounded-md border border-border",children:(0,t.jsx)(k,{height:"100%",language:"markdown",value:et,onChange:e=>ea(e||""),theme:"vs-dark",options:{fontSize:13,minimap:{enabled:!1},scrollBeyondLastLine:!1,padding:{top:8},renderLineHighlight:"gutter",wordWrap:"on"}})}),(0,t.jsxs)("div",{className:"flex justify-end gap-2 pt-2",children:[(0,t.jsx)(r.Button,{variant:"outline",onClick:ey,disabled:es,children:C("cancel")}),(0,t.jsx)(r.Button,{onClick:ev,disabled:es||!G.trim()||!et.trim(),children:C(es?"saving":"save")})]})]})}),(0,t.jsx)(c.AgentPickerDialog,{open:!!ei,onClose:()=>er(null),onConfirm:ew,title:N("applyTitle",{name:ei?.name||""}),description:N("applyDescription"),agents:O.map(e=>({id:e.id,name:e.name,avatarUrl:e.avatarUrl,description:e.description})),selected:el,onToggle:e=>eo(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e]),cancelText:C("cancel"),confirmText:N("applyConfirm",{count:el.length}),loading:ec})]})}])},255742,e=>{"use strict";let t=(0,e.i(433721).default)("star",[["path",{d:"M11.525 2.295a.53.53 0 0 1 .95 0l2.31 4.679a2.123 2.123 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.736 3.638a2.123 2.123 0 0 0-.611 1.878l.882 5.14a.53.53 0 0 1-.771.56l-4.618-2.428a2.122 2.122 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.122 2.122 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a2.122 2.122 0 0 0 1.597-1.16z",key:"r04s7s"}]]);e.s(["Star",0,t],255742)},111343,e=>{"use strict";let t=(0,e.i(433721).default)("save",[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]]);e.s(["Save",0,t],111343)},973767,e=>{"use strict";let t=(0,e.i(433721).default)("star-off",[["path",{d:"m10.344 4.688 1.181-2.393a.53.53 0 0 1 .95 0l2.31 4.679a2.12 2.12 0 0 0 1.595 1.16l5.166.756a.53.53 0 0 1 .294.904l-3.237 3.152",key:"19ctli"}],["path",{d:"m17.945 17.945.43 2.505a.53.53 0 0 1-.771.56l-4.618-2.428a2.12 2.12 0 0 0-1.973 0L6.396 21.01a.53.53 0 0 1-.77-.56l.881-5.139a2.12 2.12 0 0 0-.611-1.879L2.16 9.795a.53.53 0 0 1 .294-.906l5.165-.755a8 8 0 0 0 .4-.099",key:"ptqqvy"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]]);e.s(["StarOff",0,t],973767)},22906,191202,e=>{"use strict";var t=e.i(344180),a=e.i(764556),s=e.i(244073),n=e.i(887836),i=e.i(209988),r=e.i(260218),l=e.i(681622),o=e.i(788010),c=e.i(191118),d=e.i(917955),u=e.i(996652),m=e.i(188815),p=e.i(611176),h=e.i(239340),f=e.i(255742),x=e.i(973767),g=e.i(129981),y=e.i(887354);let v=(0,e.i(433721).default)("plug",[["path",{d:"M12 22v-5",key:"1ega77"}],["path",{d:"M15 8V2",key:"18g5xt"}],["path",{d:"M17 8a1 1 0 0 1 1 1v4a4 4 0 0 1-4 4h-4a4 4 0 0 1-4-4V9a1 1 0 0 1 1-1z",key:"1xoxul"}],["path",{d:"M9 8V2",key:"14iosj"}]]);e.s(["Plug",0,v],191202);var j=e.i(401058),w=e.i(137340),b=e.i(977694),k=e.i(111343),S=e.i(465458);e.i(462506);let N=(0,n.default)(()=>e.A(863812).then(e=>e.default),{loadableGenerated:{modules:[158480]},ssr:!1,loading:()=>(0,t.jsx)("div",{className:"flex items-center justify-center h-full text-muted-foreground text-sm",children:"Loading editor..."})});e.s(["McpsDialog",0,function({open:e,onOpenChange:n,standalone:C}){let T=(0,s.useTranslations)("mcps"),P=(0,s.useTranslations)("common"),[D,M]=(0,a.useState)([]),[O,I]=(0,a.useState)([]),[z,E]=(0,a.useState)(!1),[A,R]=(0,a.useState)(""),[$,L]=(0,a.useState)("all"),[F,B]=(0,a.useState)(""),[W,U]=(0,a.useState)(!1),[H,J]=(0,a.useState)(""),[V,_]=(0,a.useState)(""),[q,X]=(0,a.useState)(null),[Y,K]=(0,a.useState)([]),[G,Q]=(0,a.useState)(null),[Z,ee]=(0,a.useState)(""),et=(0,a.useCallback)(async()=>{E(!0);try{let e=await fetch("/api/mcps");e.ok&&M(await e.json())}catch{}E(!1)},[]),ea=(0,a.useCallback)(async()=>{try{let e=await fetch("/api/agents/presets");if(e.ok){let t=await e.json();I(t.map(e=>({id:e.id,name:e.name,avatarUrl:e.avatarUrl,description:e.description})))}}catch{}},[]);(0,a.useEffect)(()=>{(e||C)&&(et(),ea())},[e,C,et,ea]);let es=async e=>{try{let t=await fetch(`/api/mcps/${encodeURIComponent(e.name)}/favorite`,{method:"POST"});if(t.ok){let{favorited:a}=await t.json();M(t=>t.map(t=>t.name===e.name?{...t,favorited:a}:t))}}catch{}},en=async()=>{_("");try{JSON.parse(H)}catch{_(T("importInvalidJson"));return}try{let e=await fetch("/api/mcps/import",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({jsonText:H})});if(e.ok)J(""),U(!1),et();else{let t=await e.json();_(t.error||T("importFailed"))}}catch{_(T("importFailed"))}},ei=async()=>{let e;if(G){try{e=JSON.parse(Z)}catch{return}try{(await fetch(`/api/mcps/${encodeURIComponent(G.name)}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({config:e})})).ok&&(M(t=>t.map(t=>t.name===G.name?{...t,config:e}:t)),Q(null))}catch{}}},er=async e=>{try{(await fetch(`/api/mcps/${encodeURIComponent(e.name)}`,{method:"DELETE"})).ok&&M(t=>t.filter(t=>t.name!==e.name))}catch{}},el=async()=>{if(q){for(let e of O){let t=q.boundAgents.some(t=>t.id===e.id),a=Y.includes(e.id);if(t&&!a){let t=await fetch(`/api/agents/presets/${e.id}`);if(!t.ok)continue;let a=await t.json(),s=a.mcps||{},n={...s.mcpServers||{}};delete n[q.name],await fetch(`/api/agents/presets/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,mcps:{...s,mcpServers:n}})})}else if(!t&&a){let t=await fetch(`/api/agents/presets/${e.id}`);if(!t.ok)continue;let a=await t.json(),s=a.mcps||{},n={...s.mcpServers||{}};q.name in n||(n[q.name]=q.config,await fetch(`/api/agents/presets/${e.id}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({...a,mcps:{...s,mcpServers:n}})}))}}X(null),et()}},eo=D.filter(e=>{if(A){let t=A.toLowerCase();if(!e.name.toLowerCase().includes(t)&&!e.description.toLowerCase().includes(t))return!1}return("favorites"!==$||!!e.favorited)&&("agent"!==$||!F||!!e.boundAgents.some(e=>e.id===F))}),ec=(C||e)&&!q&&!G,ed=(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.DialogHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-end pr-8 pt-2",children:[(0,t.jsxs)("div",{className:"hidden md:block",children:[C?(0,t.jsx)("h2",{className:"text-base font-semibold",children:T("title")}):(0,t.jsx)(i.DialogTitle,{children:T("title")}),C?(0,t.jsx)("p",{className:"text-xs text-muted-foreground",children:T("description")}):(0,t.jsx)(i.DialogDescription,{children:T("description")})]}),(0,t.jsx)("div",{className:"flex items-center gap-2",children:(0,t.jsxs)(u.Popover,{open:W,onOpenChange:U,children:[(0,t.jsx)(u.PopoverTrigger,{render:(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",children:[(0,t.jsx)(g.Upload,{className:"size-3.5 mr-1"}),T("import")]})}),(0,t.jsx)(u.PopoverContent,{className:"w-96",align:"end",children:(0,t.jsxs)("div",{className:"space-y-3",children:[(0,t.jsx)("p",{className:"text-sm font-medium",children:T("importTitle")}),(0,t.jsx)(o.Textarea,{value:H,onChange:e=>{J(e.target.value),_("")},placeholder:'{\n "mcpServers": {\n "server-name": {\n "command": "npx",\n "args": ["-y", "package"],\n "env": {}\n }\n }\n}',className:"font-mono text-xs min-h-[180px] resize-none"}),V&&(0,t.jsx)("p",{className:"text-xs text-destructive",children:V}),(0,t.jsx)(r.Button,{size:"sm",onClick:en,disabled:!H.trim(),className:"w-full",children:T("importConfirm")})]})})]})})]})}),(0,t.jsxs)("div",{className:"flex flex-1 min-h-0 gap-4 pt-2",children:[(0,t.jsxs)("div",{className:"hidden md:flex w-44 shrink-0 flex-col gap-3",children:[(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsxs)(r.Button,{variant:"all"===$?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{L("all"),B("")},children:[(0,t.jsx)(v,{className:"size-3.5 mr-1.5"}),T("filterAll")]}),(0,t.jsxs)(r.Button,{variant:"favorites"===$?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{L("favorites"),B("")},children:[(0,t.jsx)(f.Star,{className:"size-3.5 mr-1.5"}),T("filterFavorites")]})]}),O.length>0&&(0,t.jsxs)("div",{className:"space-y-1",children:[(0,t.jsx)("p",{className:"text-xs font-medium text-muted-foreground px-2",children:T("filterByAgent")}),(0,t.jsx)(c.ScrollArea,{className:"max-h-48",children:O.map(e=>(0,t.jsxs)(r.Button,{variant:"agent"===$&&F===e.id?"secondary":"ghost",size:"sm",className:"w-full justify-start",onClick:()=>{L("agent"),B(e.id)},children:[(0,t.jsx)(p.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-4 mr-1.5 rounded-full"}),(0,t.jsx)("span",{className:"truncate",children:e.name})]},e.id))})]})]}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-col gap-3",children:[(0,t.jsxs)("div",{className:"flex md:hidden flex-col gap-2",children:[(0,t.jsxs)("div",{className:"relative",children:[(0,t.jsx)(y.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(l.Input,{value:A,onChange:e=>R(e.target.value),placeholder:T("search"),className:"pl-8"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("div",{className:"flex rounded-lg border border-input p-0.5",children:[(0,t.jsx)("button",{type:"button",className:(0,S.cn)("px-2.5 py-1 rounded-md text-xs font-medium transition-colors","all"===$?"bg-muted":"text-muted-foreground hover:text-foreground"),onClick:()=>{L("all"),B("")},children:T("filterAll")}),(0,t.jsxs)("button",{type:"button",className:(0,S.cn)("px-2.5 py-1 rounded-md text-xs font-medium transition-colors","favorites"===$?"bg-muted":"text-muted-foreground hover:text-foreground"),onClick:()=>{L("favorites"),B("")},children:[(0,t.jsx)(f.Star,{className:"size-3 inline-block mr-0.5 -mt-px"}),T("filterFavorites")]})]}),O.length>0&&(0,t.jsx)(m.SearchSelect,{value:"agent"===$?F:"",onChange:e=>{e?(L("agent"),B(e)):(L("all"),B(""))},options:O.map(e=>({value:e.id,label:e.name})),placeholder:T("filterByAgent"),allowCustom:!1,className:"flex-1 min-w-0"})]})]}),(0,t.jsxs)("div",{className:"hidden md:block relative",children:[(0,t.jsx)(y.Search,{className:"size-3.5 absolute left-2.5 top-1/2 -translate-y-1/2 text-muted-foreground"}),(0,t.jsx)(l.Input,{value:A,onChange:e=>R(e.target.value),placeholder:T("search"),className:"pl-8"})]}),(0,t.jsx)(c.ScrollArea,{className:"flex-1",children:z?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:P("loading")}):0===eo.length?(0,t.jsx)("div",{className:"flex items-center justify-center py-12 text-muted-foreground text-sm",children:T("empty")}):(0,t.jsx)("div",{className:"grid grid-cols-1 gap-3 pr-2",children:eo.map(e=>(0,t.jsxs)("div",{className:"rounded-xl border border-border bg-background p-4 hover:bg-accent/30 transition-colors cursor-pointer",onClick:()=>{Q(e),ee(JSON.stringify(e.config,null,2))},children:[(0,t.jsxs)("div",{className:"flex items-start justify-between gap-3",children:[(0,t.jsxs)("div",{className:"flex-1 min-w-0",children:[(0,t.jsxs)("div",{className:"flex items-center gap-1.5",children:[(0,t.jsx)(v,{className:"size-3.5 text-muted-foreground"}),(0,t.jsx)("span",{className:"font-medium text-sm",children:e.name}),(0,t.jsx)("button",{type:"button",className:"flex items-center justify-center size-5 rounded hover:bg-accent cursor-pointer",onClick:t=>{t.stopPropagation(),es(e)},children:e.favorited?(0,t.jsx)(f.Star,{className:"size-3.5 text-yellow-500 fill-yellow-500"}):(0,t.jsx)(x.StarOff,{className:"size-3.5 text-muted-foreground"})})]}),(0,t.jsx)("p",{className:"text-xs text-muted-foreground mt-1 line-clamp-2",children:e.description||e.config.command||e.config.url||JSON.stringify(e.config).slice(0,100)})]}),(0,t.jsxs)("div",{className:"flex items-center gap-1 shrink-0",onClick:e=>e.stopPropagation(),children:[(0,t.jsxs)(r.Button,{variant:"outline",size:"sm",onClick:()=>{X(e),K(e.boundAgents.map(e=>e.id))},children:[(0,t.jsx)(b.Rocket,{className:"size-3.5 mr-1"}),T("apply")]}),(0,t.jsxs)(d.DropdownMenu,{children:[(0,t.jsx)(d.DropdownMenuTrigger,{render:(0,t.jsx)(r.Button,{variant:"ghost",size:"icon",className:"size-7"}),children:(0,t.jsx)(j.MoreVertical,{className:"size-3.5"})}),(0,t.jsx)(d.DropdownMenuContent,{align:"end",children:(0,t.jsxs)(d.DropdownMenuItem,{className:"text-destructive focus:text-destructive",onClick:()=>er(e),children:[(0,t.jsx)(w.Trash2,{className:"size-3.5 mr-1.5"}),T("delete")]})})]})]})]}),e.boundAgents.length>0&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 mt-2.5 pt-2.5 border-t border-border/50",children:[e.boundAgents.map(e=>(0,t.jsx)(p.AgentIcon,{agentId:e.id,name:e.name,avatarUrl:e.avatarUrl,className:"size-5 rounded-full"},e.id)),(0,t.jsx)("span",{className:"text-xs text-muted-foreground ml-1",children:e.boundAgents.length})]})]},e.name))})})]})]})]});return(0,t.jsxs)(t.Fragment,{children:[C&&ec&&(0,t.jsx)("div",{className:"h-full flex flex-col",children:ed}),!C&&(0,t.jsx)(i.Dialog,{open:ec,onOpenChange:n,children:(0,t.jsx)(i.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:ed})}),(0,t.jsx)(i.Dialog,{open:!!G,onOpenChange:e=>{e||Q(null)},children:(0,t.jsxs)(i.DialogContent,{className:"!w-[80vw] !max-w-[80vw] !h-[80vh] flex flex-col",children:[(0,t.jsx)(i.DialogHeader,{children:(0,t.jsxs)("div",{className:"flex items-center justify-between pr-8",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)(i.DialogTitle,{children:T("editTitle",{name:G?.name||""})}),(0,t.jsx)(i.DialogDescription,{children:T("editDescription")})]}),(0,t.jsxs)(r.Button,{size:"sm",onClick:ei,children:[(0,t.jsx)(k.Save,{className:"size-3.5 mr-1"}),P("save")]})]})}),(0,t.jsx)("div",{className:"flex-1 min-h-0 pt-2",children:(0,t.jsx)(N,{height:"100%",language:"json",value:Z,onChange:e=>ee(e||""),theme:"vs-dark",options:{fontSize:13,minimap:{enabled:!1},scrollBeyondLastLine:!1,padding:{top:8},renderLineHighlight:"gutter",wordWrap:"on",formatOnPaste:!0}})})]})}),(0,t.jsx)(h.AgentPickerDialog,{open:!!q,onClose:()=>X(null),onConfirm:el,title:T("bindTitle",{name:q?.name||""}),description:T("bindDescription"),agents:O,selected:Y,onToggle:e=>{K(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},cancelText:P("cancel"),confirmText:P("confirm")})]})}],22906)},601039,e=>{"use strict";let t=(0,e.i(433721).default)("refresh-cw",[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]]);e.s(["RefreshCw",0,t],601039)},384389,e=>{"use strict";var t=e.i(764556),a=e.i(106206),s=e.i(128108),n=e.i(344180);let i=t.forwardRef(function(e,i){let{children:r,container:l,className:o,render:c,style:d,...u}=e,{portalNode:m,portalSubtree:p}=(0,s.useFloatingPortalNode)({container:l,ref:i,componentProps:e,elementProps:u});return p||m?(0,n.jsxs)(t.Fragment,{children:[p,m&&a.createPortal(r,m)]}):null});e.s(["FloatingPortalLite",0,i])},638322,e=>{"use strict";var t,a,s=e.i(344180);e.s([],935002),e.i(935002),e.i(8890);var n=e.i(764556),i=e.i(155461),r=e.i(166392),l=e.i(277642),o=e.i(267805);let c=n.createContext(void 0);function d(e){let t=n.useContext(c);if(void 0===t&&!e)throw Error((0,o.default)(72));return t}var u=e.i(92615),m=e.i(422561),p=e.i(29905),h=e.i(410421),f=e.i(150129);function x(e){return null!=e&&null!=e.clientX}var g=e.i(538501),y=e.i(427396),v=e.i(602453),j=e.i(279501),w=e.i(106206),b=e.i(332976),k=e.i(493696),S=e.i(549154),N=e.i(107164),C=e.i(742665),T=e.i(695011),P=e.i(561213);let D={...T.popupStoreSelectors,disabled:(0,b.createSelector)(e=>e.disabled),instantType:(0,b.createSelector)(e=>e.instantType),isInstantPhase:(0,b.createSelector)(e=>e.isInstantPhase),trackCursorAxis:(0,b.createSelector)(e=>e.trackCursorAxis),disableHoverablePopup:(0,b.createSelector)(e=>e.disableHoverablePopup),lastOpenChangeReason:(0,b.createSelector)(e=>e.openChangeReason),closeOnClick:(0,b.createSelector)(e=>e.closeOnClick),closeDelay:(0,b.createSelector)(e=>e.closeDelay),hasViewport:(0,b.createSelector)(e=>e.hasViewport)};class M extends k.ReactStore{constructor(e){super({...(0,T.createInitialPopupStoreState)(),disabled:!1,instantType:void 0,isInstantPhase:!1,trackCursorAxis:"none",disableHoverablePopup:!1,openChangeReason:null,closeOnClick:!0,closeDelay:0,hasViewport:!1,...e},{popupRef:n.createRef(),onOpenChange:void 0,onOpenChangeComplete:void 0,triggerElements:new P.PopupTriggerMap},D)}setOpen=(e,t)=>{let a=t.reason,s=a===C.REASONS.triggerHover,n=e&&a===C.REASONS.triggerFocus,i=!e&&(a===C.REASONS.triggerPress||a===C.REASONS.escapeKey);if(t.preventUnmountOnClose=()=>{this.set("preventUnmountingOnClose",!0)},this.context.onOpenChange?.(e,t),t.isCanceled)return;this.state.floatingRootContext.dispatchOpenChange(e,t);let r=()=>{let s={open:e,openChangeReason:a};n?s.instantType="focus":i?s.instantType="dismiss":a===C.REASONS.triggerHover&&(s.instantType=void 0);let r=t.trigger?.id??null;(r||e)&&(s.activeTriggerId=r,s.activeTriggerElement=t.trigger??null),this.update(s)};s?w.flushSync(r):r()};static useStore(e,t){let a=(0,S.useRefWithInit)(()=>new M(t)).current,s=e??a,n=(0,N.useSyncedFloatingRootContext)({popupStore:s,onOpenChange:s.setOpen});return s.state.floatingRootContext=n,s}}let O=(0,i.fastComponent)(function(e){let{disabled:t=!1,defaultOpen:a=!1,open:i,disableHoverablePopup:o=!1,trackCursorAxis:d="none",actionsRef:w,onOpenChange:b,onOpenChangeComplete:k,handle:S,triggerId:N,defaultTriggerId:T=null,children:P}=e,D=M.useStore(S?.store,{open:a,openProp:i,activeTriggerId:T,triggerIdProp:N});(0,r.useOnFirstRender)(()=>{void 0===i&&!1===D.state.open&&!0===a&&D.update({open:!0,activeTriggerId:T})}),D.useControlledProp("openProp",i),D.useControlledProp("triggerIdProp",N),D.useContextCallback("onOpenChange",b),D.useContextCallback("onOpenChangeComplete",k);let O=D.useState("open"),I=!t&&O,z=D.useState("activeTriggerId"),E=D.useState("payload");D.useSyncedValues({trackCursorAxis:d,disableHoverablePopup:o}),(0,l.useIsoLayoutEffect)(()=>{O&&t&&D.setOpen(!1,(0,v.createChangeEventDetails)(C.REASONS.disabled))},[O,t,D]),D.useSyncedValue("disabled",t),(0,j.useImplicitActiveTrigger)(D);let{forceUnmount:A,transitionStatus:R}=(0,j.useOpenStateTransitions)(I,D),$=D.select("floatingRootContext"),L=D.useState("isInstantPhase"),F=D.useState("instantType"),B=D.useState("lastOpenChangeReason"),W=n.useRef(null);(0,l.useIsoLayoutEffect)(()=>{"ending"===R&&B===C.REASONS.none||"ending"!==R&&L?("delay"!==F&&(W.current=F),D.set("instantType","delay")):null!==W.current&&(D.set("instantType",W.current),W.current=null)},[R,L,B,F,D]),(0,l.useIsoLayoutEffect)(()=>{I&&null==z&&D.set("payload",void 0)},[D,z,I]);let U=n.useCallback(()=>{D.setOpen(!1,(0,v.createChangeEventDetails)(C.REASONS.imperativeAction))},[D]);n.useImperativeHandle(w,()=>({unmount:A,close:U}),[A,U]);let H=(0,g.useDismiss)($,{enabled:!t,referencePress:()=>D.select("closeOnClick")}),J=function(e,t={}){let a="rootStore"in e?e.rootStore:e,s=a.useState("open"),i=a.useState("floatingElement"),r=a.useState("domReferenceElement"),l=a.context.dataRef,{enabled:o=!0,axis:c="both"}=t,d=n.useRef(!1),g=n.useRef(null),[y,v]=n.useState(),[j,w]=n.useState([]),b=(0,p.useStableCallback)((e,t,s)=>{if(!d.current&&(!l.current.openEvent||x(l.current.openEvent))){var n,i;let o,d,u;a.set("positionReference",(n=s??r,i={x:e,y:t,axis:c,dataRef:l,pointerType:y},o=null,d=null,u=!1,{contextElement:n||void 0,getBoundingClientRect(){let e=n?.getBoundingClientRect()||{width:0,height:0,x:0,y:0},t="x"===i.axis||"both"===i.axis,a="y"===i.axis||"both"===i.axis,s=["mouseenter","mousemove"].includes(i.dataRef.current.openEvent?.type||"")&&"touch"!==i.pointerType,r=e.width,l=e.height,c=e.x,m=e.y;return null==o&&i.x&&t&&(o=e.x-i.x),null==d&&i.y&&a&&(d=e.y-i.y),c-=o||0,m-=d||0,r=0,l=0,!u||s?(r="y"===i.axis?e.width:0,l="x"===i.axis?e.height:0,c=t&&null!=i.x?i.x:c,m=a&&null!=i.y?i.y:m):u&&!s&&(l="x"===i.axis?e.height:l,r="y"===i.axis?e.width:r),u=!0,{width:r,height:l,x:c,y:m,top:m,right:c+r,bottom:m+l,left:c}}}))}}),k=(0,p.useStableCallback)(e=>{s?g.current||w([]):b(e.clientX,e.clientY,e.currentTarget)}),S=(0,f.isMouseLikePointerType)(y)?i:s,N=n.useCallback(()=>{if(!S||!o)return;let e=(0,u.getWindow)(i);if(!l.current.openEvent||x(l.current.openEvent))return g.current=(0,m.addEventListener)(e,"mousemove",function(e){let t=(0,h.getTarget)(e);(0,h.contains)(i,t)?(g.current?.(),g.current=null):b(e.clientX,e.clientY)}),()=>{g.current?.(),g.current=null};a.set("positionReference",r)},[S,o,i,l,r,a,b]);n.useEffect(()=>N(),[N,j]),n.useEffect(()=>{o&&!i&&(d.current=!1)},[o,i]),n.useEffect(()=>{!o&&s&&(d.current=!0)},[o,s]);let C=n.useMemo(()=>{function e(e){v(e.pointerType)}return{onPointerDown:e,onPointerEnter:e,onMouseMove:k,onMouseEnter:k}},[k]);return n.useMemo(()=>o?{reference:C,trigger:C}:{},[o,C])}($,{enabled:!t&&"none"!==d,axis:"none"===d?void 0:d}),{getReferenceProps:V,getFloatingProps:_,getTriggerProps:q}=(0,y.useInteractions)([H,J]),X=n.useMemo(()=>V(),[V]),Y=n.useMemo(()=>q(),[q]),K=n.useMemo(()=>_(),[_]);return D.useSyncedValues({activeTriggerProps:X,inactiveTriggerProps:Y,popupProps:K}),(0,s.jsx)(c.Provider,{value:D,children:"function"==typeof P?P({payload:E}):P})});var I=e.i(817955),z=e.i(969490),E=e.i(139236);let A=n.createContext(void 0);var R=e.i(499198),$=e.i(232449),L=e.i(49863);let F=n.createContext({hasProvider:!1,timeoutMs:0,delayRef:{current:0},initialDelayRef:{current:0},timeout:new $.Timeout,currentIdRef:{current:null},currentContextRef:{current:null}});function B(e){let{children:t,delay:a,timeoutMs:i=0}=e,r=n.useRef(a),l=n.useRef(a),o=n.useRef(null),c=n.useRef(null),d=(0,$.useTimeout)();return(0,s.jsx)(F.Provider,{value:n.useMemo(()=>({hasProvider:!0,delayRef:r,initialDelayRef:l,currentIdRef:o,timeoutMs:i,currentContextRef:c,timeout:d}),[i,d]),children:t})}var W=e.i(604921),U=e.i(480283);let H=((t={})[t.popupOpen=I.CommonTriggerDataAttributes.popupOpen]="popupOpen",t.triggerDisabled="data-trigger-disabled",t),J=(0,i.fastComponentRef)(function(e,t){let{className:a,render:s,handle:i,payload:r,disabled:c,delay:u,closeOnClick:m=!0,closeDelay:p,id:h,style:f,...x}=e,g=d(!0),y=i?.store??g;if(!y)throw Error((0,o.default)(82));let w=(0,E.useBaseUiId)(h),b=y.useState("isTriggerActive",w),k=y.useState("isOpenedByTrigger",w),S=y.useState("floatingRootContext"),N=n.useRef(null),T=u??600,P=p??0,{registerTrigger:D,isMountedByThisTrigger:M}=(0,j.useTriggerDataForwarding)(w,N,y,{payload:r,closeOnClick:m,closeDelay:P}),O=n.useContext(A),{delayRef:$,isInstantPhase:B,hasProvider:J}=function(e,t={open:!1}){let a="rootStore"in e?e.rootStore:e,s=a.useState("floatingId"),{open:i}=t,{currentIdRef:r,delayRef:o,timeoutMs:c,initialDelayRef:d,currentContextRef:u,hasProvider:m,timeout:p}=n.useContext(F),[h,f]=n.useState(!1);return(0,l.useIsoLayoutEffect)(()=>{function e(){f(!1),u.current?.setIsInstantPhase(!1),r.current=null,u.current=null,o.current=d.current}if(r.current&&!i&&r.current===s){if(f(!1),c)return p.start(c,()=>{a.select("open")||r.current&&r.current!==s||e()}),()=>{p.clear()};e()}},[i,s,r,o,c,d,u,p,a]),(0,l.useIsoLayoutEffect)(()=>{if(!i)return;let e=u.current,t=r.current;p.clear(),u.current={onOpenChange:a.setOpen,setIsInstantPhase:f},r.current=s,o.current={open:0,close:(0,L.getDelay)(d.current,"close")},null!==t&&t!==s?(f(!0),e?.setIsInstantPhase(!0),e?.onOpenChange(!1,(0,v.createChangeEventDetails)(C.REASONS.none))):(f(!1),e?.setIsInstantPhase(!1))},[i,s,a,r,o,c,d,u,p]),(0,l.useIsoLayoutEffect)(()=>()=>{u.current=null},[u]),n.useMemo(()=>({hasProvider:m,delayRef:o,isInstantPhase:h}),[m,o,h])}(S,{open:k});y.useSyncedValue("isInstantPhase",B);let V=y.useState("disabled"),_=c??V,q=y.useState("trackCursorAxis"),X=y.useState("disableHoverablePopup"),Y=(0,U.useHoverReferenceInteraction)(S,{enabled:!_,mouseOnly:!0,move:!1,handleClose:X||"both"===q?null:(0,R.safePolygon)(),restMs(){let e=O?.delay,t="object"==typeof $.current?$.current.open:void 0,a=T;return J&&(a=0!==t?u??e??T:0),a},delay(){let e="object"==typeof $.current?$.current.close:void 0,t=P;return null==p&&J&&(t=e),{close:t}},triggerElementRef:N,isActiveTrigger:b,isClosing:()=>"ending"===y.select("transitionStatus")}),K=(0,W.useFocus)(S,{enabled:!_}).reference,G=y.useState("triggerProps",M);return(0,z.useRenderElement)("button",e,{state:{open:k},ref:[t,D,N],props:[Y,K,G,{onPointerDown(){y.set("closeOnClick",m)},id:w,[H.triggerDisabled]:_?"":void 0},x],stateAttributesMapping:I.triggerOpenStateMapping})}),V=n.createContext(void 0);var _=e.i(384389);let q=n.forwardRef(function(e,t){let{keepMounted:a=!1,...n}=e;return d().useState("mounted")||a?(0,s.jsx)(V.Provider,{value:a,children:(0,s.jsx)(_.FloatingPortalLite,{ref:t,...n})}):null}),X=n.createContext(void 0);function Y(){let e=n.useContext(X);if(void 0===e)throw Error((0,o.default)(71));return e}var K=e.i(576557),G=e.i(576487),Q=e.i(909852),Z=e.i(263635);let ee=n.forwardRef(function(e,t){let{render:a,className:i,anchor:r,positionMethod:l="absolute",side:c="top",align:u="center",sideOffset:m=0,alignOffset:p=0,collisionBoundary:h="clipping-ancestors",collisionPadding:f=5,arrowPadding:x=5,sticky:g=!1,disableAnchorTracking:y=!1,collisionAvoidance:v=G.POPUP_COLLISION_AVOIDANCE,style:j,...w}=e,b=d(),k=function(){let e=n.useContext(V);if(void 0===e)throw Error((0,o.default)(70));return e}(),S=b.useState("open"),N=b.useState("mounted"),C=b.useState("trackCursorAxis"),T=b.useState("disableHoverablePopup"),P=b.useState("floatingRootContext"),D=b.useState("instantType"),M=b.useState("transitionStatus"),O=b.useState("hasViewport"),I=(0,K.useAnchorPositioning)({anchor:r,positionMethod:l,floatingRootContext:P,mounted:N,side:c,sideOffset:m,align:u,alignOffset:p,collisionBoundary:h,collisionPadding:f,sticky:g,arrowPadding:x,disableAnchorTracking:y,keepMounted:k,collisionAvoidance:v,adaptiveOrigin:O?Q.adaptiveOrigin:void 0}),z=n.useMemo(()=>({open:S,side:I.side,align:I.align,anchorHidden:I.anchorHidden,instant:"none"!==C?"tracking-cursor":D}),[S,I.side,I.align,I.anchorHidden,C,D]),E=(0,Z.usePositioner)(e,z,{styles:I.positionerStyles,transitionStatus:M,props:w,refs:[t,b.useStateSetter("positionerElement")],hidden:!N,inert:!S||"both"===C||T});return(0,s.jsx)(X.Provider,{value:I,children:E})});var et=e.i(282458),ea=e.i(273598),es=e.i(328657),en=e.i(795914);let ei={...I.popupStateMapping,...et.transitionStatusMapping},er=n.forwardRef(function(e,t){let{className:a,render:s,style:n,...i}=e,r=d(),{side:l,align:o}=Y(),c=r.useState("open"),u=r.useState("instantType"),m=r.useState("transitionStatus"),p=r.useState("popupProps"),h=r.useState("floatingRootContext");(0,ea.useOpenChangeComplete)({open:c,ref:r.context.popupRef,onComplete(){c&&r.context.onOpenChangeComplete?.(!0)}});let f=r.useState("disabled"),x=r.useState("closeDelay");return(0,en.useHoverFloatingInteraction)(h,{enabled:!f,closeDelay:x}),(0,z.useRenderElement)("div",e,{state:{open:c,side:l,align:o,instant:u,transitionStatus:m},ref:[t,r.context.popupRef,r.useStateSetter("popupElement")],props:[p,(0,es.getDisabledMountTransitionStyles)(m),i],stateAttributesMapping:ei})}),el=n.forwardRef(function(e,t){let{className:a,render:s,style:n,...i}=e,r=d(),l=r.useState("open"),o=r.useState("instantType"),{arrowRef:c,side:u,align:m,arrowUncentered:p,arrowStyles:h}=Y();return(0,z.useRenderElement)("div",e,{state:{open:l,side:u,align:m,uncentered:p,instant:o},ref:[t,c],props:[{style:h,"aria-hidden":!0},i],stateAttributesMapping:I.popupStateMapping})}),eo=((a={}).popupWidth="--popup-width",a.popupHeight="--popup-height",a);var ec=e.i(3310);let ed={activationDirection:e=>e?{"data-activation-direction":e}:null},eu=n.forwardRef(function(e,t){let{render:a,className:s,style:n,children:i,...r}=e,l=d(),o=Y(),c=l.useState("instantType"),{children:u,state:m}=(0,ec.usePopupViewport)({store:l,side:o.side,cssVars:eo,children:i}),p={activationDirection:m.activationDirection,transitioning:m.transitioning,instant:c};return(0,z.useRenderElement)("div",e,{state:p,ref:t,props:[r,{children:u}],stateAttributesMapping:ed})});class em{constructor(){this.store=new M}open(e){let t=e?this.store.context.triggerElements.getById(e):void 0;if(e&&!t)throw Error((0,o.default)(81,e));this.store.setOpen(!0,(0,v.createChangeEventDetails)(C.REASONS.imperativeAction,void 0,t))}close(){this.store.setOpen(!1,(0,v.createChangeEventDetails)(C.REASONS.imperativeAction,void 0,void 0))}get isOpen(){return this.store.state.open}}e.s(["Arrow",0,el,"Handle",0,em,"Popup",0,er,"Portal",0,q,"Positioner",0,ee,"Provider",0,function(e){let{delay:t,closeDelay:a,timeout:i=400}=e,r=n.useMemo(()=>({delay:t,closeDelay:a}),[t,a]),l=n.useMemo(()=>({open:t,close:a}),[t,a]);return(0,s.jsx)(A.Provider,{value:r,children:(0,s.jsx)(B,{delay:l,timeoutMs:i,children:e.children})})},"Root",0,O,"Trigger",0,J,"Viewport",0,eu,"createHandle",0,function(){return new em}],638295);var ep=e.i(638295),ep=ep,eh=e.i(465458);e.s(["Tooltip",0,function({...e}){return(0,s.jsx)(ep.Root,{"data-slot":"tooltip",...e})},"TooltipContent",0,function({className:e,side:t="top",sideOffset:a=4,align:n="center",alignOffset:i=0,children:r,...l}){return(0,s.jsx)(ep.Portal,{children:(0,s.jsx)(ep.Positioner,{align:n,alignOffset:i,side:t,sideOffset:a,className:"isolate z-50",children:(0,s.jsxs)(ep.Popup,{"data-slot":"tooltip-content",className:(0,eh.cn)("z-50 inline-flex w-fit max-w-xs origin-(--transform-origin) items-center gap-1.5 rounded-md bg-foreground px-3 py-1.5 text-xs text-background has-data-[slot=kbd]:pr-1.5 data-[side=bottom]:slide-in-from-top-2 data-[side=inline-end]:slide-in-from-left-2 data-[side=inline-start]:slide-in-from-right-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 **:data-[slot=kbd]:relative **:data-[slot=kbd]:isolate **:data-[slot=kbd]:z-50 **:data-[slot=kbd]:rounded-sm data-[state=delayed-open]:animate-in data-[state=delayed-open]:fade-in-0 data-[state=delayed-open]:zoom-in-95 data-open:animate-in data-open:fade-in-0 data-open:zoom-in-95 data-closed:animate-out data-closed:fade-out-0 data-closed:zoom-out-95",e),...l,children:[r,(0,s.jsx)(ep.Arrow,{className:"z-50 size-2.5 translate-y-[calc(-50%-2px)] rotate-45 rounded-[2px] bg-foreground fill-foreground data-[side=bottom]:top-1 data-[side=inline-end]:top-1/2! data-[side=inline-end]:-left-1 data-[side=inline-end]:-translate-y-1/2 data-[side=inline-start]:top-1/2! data-[side=inline-start]:-right-1 data-[side=inline-start]:-translate-y-1/2 data-[side=left]:top-1/2! data-[side=left]:-right-1 data-[side=left]:-translate-y-1/2 data-[side=right]:top-1/2! data-[side=right]:-left-1 data-[side=right]:-translate-y-1/2 data-[side=top]:-bottom-2.5"})]})})})},"TooltipProvider",0,function({delay:e=0,...t}){return(0,s.jsx)(ep.Provider,{"data-slot":"tooltip-provider",delay:e,...t})},"TooltipTrigger",0,function({...e}){return(0,s.jsx)(ep.Trigger,{"data-slot":"tooltip-trigger",...e})}],638322)},92457,e=>{"use strict";let t=(0,e.i(433721).default)("monitor",[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]]);e.s(["Monitor",0,t],92457)},36539,e=>{"use strict";let t=(0,e.i(433721).default)("bell",[["path",{d:"M10.268 21a2 2 0 0 0 3.464 0",key:"vwvbt9"}],["path",{d:"M3.262 15.326A1 1 0 0 0 4 17h16a1 1 0 0 0 .74-1.673C19.41 13.956 18 12.499 18 8A6 6 0 0 0 6 8c0 4.499-1.411 5.956-2.738 7.326",key:"11g9vi"}]]);e.s(["default",0,t])},980476,e=>{e.v(t=>Promise.all(["static/chunks/05f8cnmzqd5wb.js","static/chunks/128ugqd34tr_-.js"].map(t=>e.l(t))).then(()=>t(65666)))},863812,e=>{e.v(t=>Promise.all(["static/chunks/168ojsxhm7ypc.js"].map(t=>e.l(t))).then(()=>t(158480)))},930010,e=>{e.v(e=>Promise.resolve().then(()=>e(360112)))}]);
|