@shawnstack/quickforge 1.6.12 → 1.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/README.md +1 -1
  2. package/dist/assets/AgentProfilesPage-DQ8URegq.js +1 -0
  3. package/dist/assets/ChatPanelHost-vi1tDqlJ.js +291 -0
  4. package/dist/assets/{PluginsPage-qXTjDrpd.js → PluginsPage-B8bHMwfv.js} +1 -1
  5. package/dist/assets/ScheduledTasksPage-AaUz5el2.js +2 -0
  6. package/dist/assets/{SettingsWorkspacePage-CnFDmGvW.js → SettingsWorkspacePage-BOP9CtoI.js} +112 -105
  7. package/dist/assets/{SharedConversationPage-CkQ-XwYS.js → SharedConversationPage-9A4L9UcQ.js} +1 -1
  8. package/dist/assets/TerminalDock-DQOXpaDe.js +2 -0
  9. package/dist/assets/WorkspaceInspector-DaM7TJHb.js +13 -0
  10. package/dist/assets/icons-ko_i0WpN.js +1 -0
  11. package/dist/assets/index-B2eauKpo.css +3 -0
  12. package/dist/assets/index-B8Awq5FV.js +63 -0
  13. package/dist/assets/{mcp-servers-dialog-CsRQxx7A.js → mcp-servers-dialog-XE4K8PCO.js} +2 -2
  14. package/dist/assets/{monaco-CdOyGlWD.js → monaco-C13M09wD.js} +1 -1
  15. package/dist/assets/{react-vendor-VqdnQHHS.js → react-vendor-2RKYr-A4.js} +1 -1
  16. package/dist/assets/{skills-dialog-CmVLi_h6.js → skills-dialog-MpoxntiV.js} +1 -1
  17. package/dist/index.html +6 -6
  18. package/dist/licenses/material-icon-theme.txt +8 -0
  19. package/package.json +1 -1
  20. package/server/agent-manager.mjs +182 -39
  21. package/server/auto-archive.mjs +137 -0
  22. package/server/auto-compaction.mjs +15 -18
  23. package/server/conversation-compaction.mjs +69 -3
  24. package/server/custom-commands.mjs +17 -0
  25. package/server/image-generation.mjs +130 -0
  26. package/server/index.mjs +12 -1
  27. package/server/provider-config.mjs +78 -0
  28. package/server/routes/agent.mjs +9 -0
  29. package/server/routes/session-assets.mjs +49 -0
  30. package/server/routes/shared-conversation.mjs +10 -0
  31. package/server/routes/storage.mjs +4 -0
  32. package/server/routes/tools.mjs +1 -1
  33. package/server/routes/workspace.mjs +5 -2
  34. package/server/session-assets.mjs +134 -0
  35. package/server/session-persistence-lock.mjs +9 -0
  36. package/server/storage.mjs +24 -1
  37. package/server/tools/definitions.mjs +10 -0
  38. package/server/tools/index.mjs +2 -0
  39. package/dist/assets/AgentProfilesPage-CooGLweI.js +0 -1
  40. package/dist/assets/ChatPanelHost-TEbv0lnL.js +0 -260
  41. package/dist/assets/ScheduledTasksPage-BBor8Yb2.js +0 -2
  42. package/dist/assets/TerminalDock-CvqBBMPg.js +0 -2
  43. package/dist/assets/WorkspaceInspector-6JGc6VGb.js +0 -13
  44. package/dist/assets/icons-C7j5jdKo.js +0 -1
  45. package/dist/assets/index-DxNzlPmc.js +0 -63
  46. package/dist/assets/index-HVxfqXfB.css +0 -3
@@ -1,2 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-DWdDZTNf.js";import{Ct as t,D as n,Ft as r,Pt as i,Rt as a,Vt as o,Y as ee,_ as te,a as ne,dt as re,l as ie,lt as ae,t as oe,xt as se}from"./icons-C7j5jdKo.js";import{n as s}from"./react-vendor-VqdnQHHS.js";import{$ as ce,H as le,Q as ue,ct as de,dt as c,et as fe,ht as l,nt as pe,tt as me,ut as u}from"./index-DxNzlPmc.js";var d=e(o(),1),f=s(),he=[{value:`off`,label:()=>l(`thinkingOff`)},{value:`low`,label:()=>l(`thinkingLow`)},{value:`medium`,label:()=>l(`thinkingMedium`)},{value:`high`,label:()=>l(`thinkingHigh`)},{value:`xhigh`,label:()=>l(`thinkingXHigh`)}];function ge(e){return`${e.provider} / ${e.id}`}function _e(e,t){return!!(e&&t&&e.api===t.api&&e.provider===t.provider&&e.id===t.id)}function p(e){return String(e).padStart(2,`0`)}function m(e){if(!e)return`-`;let t=new Date(e);return Number.isNaN(t.getTime())?`-`:`${t.getFullYear()}-${p(t.getMonth()+1)}-${p(t.getDate())} ${p(t.getHours())}:${p(t.getMinutes())}`}function ve(e,t=20){let n=String(e||``).trim();return n.length>t?`${n.slice(0,t)}...`:n}function ye(){return{scheduleText:``,title:``,instruction:``,cronExpression:``,scheduleRule:``,nextRunAt:``,enabled:!0,agentId:``,executionMode:`serial`}}function h(){return{taskId:``,status:``,trigger:``,keyword:``,startedFrom:``,startedTo:``,page:1,pageSize:10}}function be(e){return{scheduleText:[e.scheduleRule,e.instruction].filter(Boolean).join(`
2
- `),title:e.title,instruction:e.instruction,cronExpression:e.cronExpression??``,scheduleRule:e.scheduleRule,nextRunAt:e.nextRunAt,enabled:e.status!==`paused`,agentId:e.agentId??``,executionMode:e.executionMode??`serial`}}function xe(e,t){return{...t,title:e.title,instruction:e.instruction,cronExpression:e.cronExpression??``,scheduleRule:e.scheduleRule,nextRunAt:e.nextRunAt,enabled:t.enabled}}function Se(e){return{title:e.title.trim(),instruction:e.instruction.trim(),scheduleType:`cron`,scheduleRule:e.scheduleRule.trim()||e.cronExpression.trim(),cronExpression:e.cronExpression.trim(),nextRunAt:e.nextRunAt,enabled:e.enabled,agentId:e.agentId||null,executionMode:e.executionMode}}function g(e){return!!(e.currentRunId||e.currentRunIds?.length)}function Ce(e){return(e.executionMode??`serial`)===`parallel`||!g(e)}function we(e){return l(e===`parallel`?`taskExecutionModeParallel`:`taskExecutionModeSerial`)}function Te(e){return!!(e.title.trim()&&e.instruction.trim()&&e.cronExpression.trim())}function Ee(e){return l(e===`enabled`?`taskEnabled`:e===`running`?`taskRunning`:e===`paused`?`taskPaused`:e===`completed`?`taskFinished`:e===`success`?`executionSuccess`:`taskFailed`)}function De(e){return e===`enabled`||e===`success`?`bg-emerald-500/10 text-emerald-700`:e===`running`?`bg-blue-500/10 text-blue-700`:e===`paused`?`bg-amber-500/10 text-amber-700`:`bg-muted text-muted-foreground`}async function _(e,t){let n=await fetch(e,{...t,headers:{"content-type":`application/json`,...t?.headers}}),r=await n.json().catch(()=>null);if(!n.ok)throw Error(r?.error||`请求失败`);return r}function v({onOpenSession:e}){let[o,s]=(0,d.useState)([]),[p,v]=(0,d.useState)(`tasks`),[y,b]=(0,d.useState)(()=>ye()),[x,Oe]=(0,d.useState)(null),[S,C]=(0,d.useState)(null),[w,T]=(0,d.useState)(null),[E,D]=(0,d.useState)(!1),[O,k]=(0,d.useState)(null),[ke,A]=(0,d.useState)(``),[j,M]=(0,d.useState)(!1),[N,P]=(0,d.useState)(``),[F,Ae]=(0,d.useState)([]),[I,L]=(0,d.useState)(),[R,z]=(0,d.useState)(`off`),[B,je]=(0,d.useState)([]),[Me,V]=(0,d.useState)(``),[H,U]=(0,d.useState)(()=>h()),[W,G]=(0,d.useState)(()=>h()),[K,Ne]=(0,d.useState)({runs:[],total:0,page:1,pageSize:10}),[Pe,Fe]=(0,d.useState)(!1),[Ie,Le]=(0,d.useState)(null),[Re,ze]=(0,d.useState)([]),Be=B[0]?.id??``;(0,d.useEffect)(()=>{if(!w)return;let e=()=>T(null);return window.addEventListener(`click`,e),window.addEventListener(`blur`,e),()=>{window.removeEventListener(`click`,e),window.removeEventListener(`blur`,e)}},[w]);async function Ve(){s((await _(`/api/scheduled-tasks`)).tasks)}async function q(e=W){Fe(!0),P(``);try{let t=new URLSearchParams;t.set(`page`,String(e.page)),t.set(`pageSize`,String(e.pageSize)),e.taskId&&t.set(`taskId`,e.taskId),e.status&&t.set(`status`,e.status),e.trigger&&t.set(`trigger`,e.trigger),e.keyword.trim()&&t.set(`keyword`,e.keyword.trim()),e.startedFrom&&t.set(`startedFrom`,e.startedFrom),e.startedTo&&t.set(`startedTo`,e.startedTo),Ne(await _(`/api/scheduled-tasks/runs?${t.toString()}`))}catch(e){P(e instanceof Error?e.message:l(`requestFailed`))}finally{Fe(!1)}}(0,d.useEffect)(()=>{let e=!1;async function t(){try{let t=await _(`/api/project`);if(e)return;je(t.projects??[])}catch{}}return t(),()=>{e=!0}},[]),(0,d.useEffect)(()=>{let e=!1;async function t(){try{let t=await fe(),n=await ce(t),r=await me(t),i=r.model??await pe(t)??n[0];if(e)return;Ae(n),L(i),z(r.thinkingLevel??ue(i))}catch(t){e||P(t instanceof Error?t.message:l(`requestFailed`))}}return t(),()=>{e=!0}},[]),(0,d.useEffect)(()=>{let e=!1,t=async()=>{try{let t=await _(`/api/scheduled-tasks`);e||s(t.tasks)}catch(t){e||P(t instanceof Error?t.message:l(`requestFailed`))}};t();let n=window.setInterval(t,10*1e3);return()=>{e=!0,window.clearInterval(n)}},[]),(0,d.useEffect)(()=>{let e=!1;async function t(){try{let t=await _(`/api/agent-profiles`);if(e)return;ze(t.agents)}catch(t){e||P(t instanceof Error?t.message:l(`requestFailed`))}}return t(),()=>{e=!0}},[]);let He=(0,d.useMemo)(()=>o.find(e=>e.id===x),[x,o]),J=(0,d.useMemo)(()=>o.find(e=>e.id===S)??null,[S,o]),Ue=(0,d.useMemo)(()=>o.filter(e=>e.status===`enabled`).length,[o]),Y=Math.max(1,Math.ceil(K.total/K.pageSize));function We(e){return e?Re.find(t=>t.id===e||t.name===e)?.label??e:l(`defaultAgent`)}function X(e,t){b(n=>({...n,[e]:t}))}function Z(e,t){U(n=>({...n,[e]:t}))}function Ge(){Oe(null),V(Be),b(ye()),k(null),A(``),P(``)}function Ke(){Ge(),D(!0)}function Q(){j||(D(!1),Ge())}function qe(){let e={...H,page:1};U(e),G(e),q(e)}function Je(){let e=h();U(e),G(e),q(e)}function Ye(e){let t=Math.min(Math.max(1,e),Y),n={...W,page:t};U(n),G(n),q(n)}function Xe(e){let t={...W,page:1,pageSize:e};U(t),G(t),q(t)}async function Ze(){let e=y.scheduleText.trim();if(e){M(!0),P(``);try{let t=await _(`/api/scheduled-tasks/parse`,{method:`POST`,body:JSON.stringify({instruction:e,model:I,thinkingLevel:R})});if(t.needMoreInfo||!t.task){A(t.question||`请补充任务信息。`),k(null);return}let n=t.task;A(``),k(n),b(e=>xe(n,e))}catch(e){P(e instanceof Error?e.message:l(`requestFailed`))}finally{M(!1)}}}async function Qe(){if(Te(y)){M(!0),P(``);try{let e=B.find(e=>e.id===Me),t={task:Se(y),model:I,thinkingLevel:R,projectId:e?.id,projectName:e?.name};x?await _(`/api/scheduled-tasks/${encodeURIComponent(x)}`,{method:`PUT`,body:JSON.stringify(t)}):await _(`/api/scheduled-tasks`,{method:`POST`,body:JSON.stringify(t)}),Q(),await Ve(),p===`history`&&await q(W)}catch(e){P(e instanceof Error?e.message:l(`requestFailed`))}finally{M(!1)}}}function $e(e){T(null),Oe(e.id),b(be(e)),k(null),A(``),P(``),V(e.projectId??``),e.model&&L(e.model),e.thinkingLevel&&z(e.thinkingLevel),D(!0)}async function $(e,t){if(P(``),T(null),!(t===`delete`&&!await le({description:l(`confirmDeleteTask`),confirmLabel:l(`confirmDelete`),cancelLabel:l(`cancel`),variant:`destructive`})))try{t===`delete`?(await _(`/api/scheduled-tasks/${encodeURIComponent(e)}`,{method:`DELETE`}),x===e&&Q(),S===e&&C(null)):await _(`/api/scheduled-tasks/${encodeURIComponent(e)}/${t}`,{method:`POST`}),await Ve(),p===`history`&&await q(W)}catch(e){P(e instanceof Error?e.message:l(`requestFailed`))}}function et(t){return(0,f.jsxs)(`div`,{className:`mt-2 space-y-2 text-xs text-muted-foreground`,children:[t.sessionId?(0,f.jsx)(u,{variant:`outline`,size:`sm`,onClick:()=>e?.(t.sessionId),children:l(`viewConversation`)}):null,(0,f.jsxs)(`div`,{children:[l(`executionAgent`),t.agentLabel||We(t.agentId)]}),t.warning?(0,f.jsx)(`div`,{className:`text-amber-600`,children:t.warning}):null,t.inputContent?(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`font-medium text-foreground`,children:l(`runInputContent`)}),(0,f.jsx)(`pre`,{className:`mt-1 max-h-32 overflow-auto whitespace-pre-wrap`,children:t.inputContent})]}):null,t.aiResult||t.result?(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`font-medium text-foreground`,children:l(`runAiResult`)}),(0,f.jsx)(`pre`,{className:`mt-1 max-h-48 overflow-auto whitespace-pre-wrap`,children:t.aiResult||t.result})]}):null,t.errorMessage?(0,f.jsx)(`div`,{className:`text-destructive`,children:t.errorMessage}):null,t.durationMs?(0,f.jsxs)(`div`,{children:[l(`runDuration`),t.durationMs,`ms`]}):null]})}return(0,f.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden bg-background`,children:[(0,f.jsxs)(`div`,{className:`border-b border-border px-6 py-5`,children:[(0,f.jsx)(`div`,{className:`flex flex-wrap items-center justify-end gap-3`,children:E||J?(0,f.jsxs)(u,{variant:`outline`,onClick:()=>{E?Q():C(null)},children:[(0,f.jsx)(a,{className:`mr-1 size-4`}),l(`back`)]}):(0,f.jsx)(u,{onClick:Ke,children:l(`createTask`)})}),!E&&!J?(0,f.jsxs)(`div`,{className:`mt-4 flex flex-wrap gap-2`,children:[(0,f.jsxs)(`button`,{type:`button`,className:c(`rounded-full px-4 py-2 text-sm font-medium transition-colors`,p===`tasks`?`bg-primary text-primary-foreground`:`bg-muted text-muted-foreground hover:text-foreground`),onClick:()=>v(`tasks`),children:[l(`taskListTab`),` `,(0,f.jsx)(`span`,{className:`opacity-80`,children:o.length})]}),(0,f.jsx)(`button`,{type:`button`,className:c(`rounded-full px-4 py-2 text-sm font-medium transition-colors`,p===`history`?`bg-primary text-primary-foreground`:`bg-muted text-muted-foreground hover:text-foreground`),onClick:()=>{v(`history`),q(W)},children:l(`executionHistoryTab`)})]}):null]}),(0,f.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto p-6`,children:(0,f.jsx)(`div`,{className:`mx-auto max-w-5xl space-y-5`,children:E?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsxs)(`div`,{className:`rounded-xl border border-border bg-card p-5 space-y-4`,children:[(0,f.jsxs)(`h2`,{className:`inline-flex items-center gap-1.5 text-base font-semibold text-foreground`,children:[l(He?`editTask`:`createTask`),(0,f.jsx)(de,{label:l(`quickAiParseTask`)})]}),(0,f.jsxs)(`label`,{className:`block text-sm font-medium text-foreground`,children:[l(`taskScheduleDescriptionLabel`),(0,f.jsx)(`textarea`,{className:`mt-1 min-h-24 w-full resize-y rounded-xl border border-input bg-background px-3 py-2 text-sm outline-none transition-colors placeholder:text-muted-foreground/65 focus:border-ring`,value:y.scheduleText,onChange:e=>X(`scheduleText`,e.target.value),placeholder:l(`taskScheduleDescriptionPlaceholder`)})]}),(0,f.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,f.jsxs)(u,{onClick:Ze,disabled:j||!I||!y.scheduleText.trim(),children:[(0,f.jsx)(ie,{className:`mr-1 size-3.5`}),l(`aiParseTask`)]}),ke?(0,f.jsx)(`span`,{className:`text-sm text-amber-600`,children:ke}):null]}),(0,f.jsxs)(`div`,{className:`grid gap-3 sm:grid-cols-2`,children:[(0,f.jsxs)(`label`,{className:`block text-sm font-medium text-foreground`,children:[l(`taskTitleLabel`),(0,f.jsx)(`input`,{className:`mt-1 h-10 w-full rounded-md border border-input bg-background px-3 text-sm outline-none focus:border-ring`,value:y.title,onChange:e=>X(`title`,e.target.value),placeholder:l(`taskTitlePlaceholder`)})]}),(0,f.jsxs)(`div`,{className:`block text-sm font-medium text-foreground`,children:[l(`executionRule`),(0,f.jsx)(`div`,{className:`mt-1 flex h-10 items-center rounded-md border border-input bg-muted/20 px-3 text-sm text-muted-foreground`,children:y.scheduleRule||`-`})]}),(0,f.jsxs)(`div`,{className:`block text-sm font-medium text-foreground`,children:[`cron`,(0,f.jsx)(`div`,{className:`mt-1 flex h-10 items-center rounded-md border border-input bg-muted/20 px-3 font-mono text-sm text-muted-foreground`,children:y.cronExpression||`-`})]}),(0,f.jsxs)(`div`,{className:`block text-sm font-medium text-foreground`,children:[l(`nextExecutionTime`),(0,f.jsx)(`div`,{className:`mt-1 flex h-10 items-center rounded-md border border-input bg-muted/20 px-3 text-sm text-muted-foreground`,children:m(y.nextRunAt)})]}),(0,f.jsxs)(`label`,{className:`block text-sm font-medium text-foreground sm:col-span-2`,children:[(0,f.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[l(`taskExecutionMode`),(0,f.jsx)(de,{label:l(`taskExecutionModeHelp`)})]}),(0,f.jsxs)(`select`,{className:`mt-1 h-10 w-full rounded-md border border-input bg-background px-3 text-sm text-foreground outline-none focus:border-ring`,value:y.executionMode,onChange:e=>X(`executionMode`,e.target.value),children:[(0,f.jsx)(`option`,{value:`serial`,children:l(`taskExecutionModeSerial`)}),(0,f.jsx)(`option`,{value:`parallel`,children:l(`taskExecutionModeParallel`)})]})]}),(0,f.jsxs)(`label`,{className:`block text-sm font-medium text-foreground sm:col-span-2`,children:[l(`promptContentLabel`),(0,f.jsx)(`textarea`,{className:`mt-1 min-h-28 w-full resize-y rounded-xl border border-input bg-background px-3 py-2 text-sm text-foreground outline-none transition-colors placeholder:text-muted-foreground/65 focus:border-ring`,value:y.instruction,onChange:e=>X(`instruction`,e.target.value),placeholder:l(`promptContentPlaceholder`)})]})]}),(0,f.jsxs)(`label`,{className:`flex items-center gap-2 text-sm text-foreground`,children:[(0,f.jsx)(`input`,{type:`checkbox`,checked:y.enabled,onChange:e=>X(`enabled`,e.target.checked)}),l(`taskEnabledSwitch`)]}),(0,f.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-xl border border-border bg-muted/20 px-2 py-2`,children:[(0,f.jsxs)(`span`,{className:`relative inline-flex items-center`,children:[(0,f.jsx)(ie,{className:`pointer-events-none absolute left-2 size-3.5 text-muted-foreground/70`}),(0,f.jsxs)(`select`,{className:`h-8 max-w-[240px] rounded-md border border-transparent bg-transparent pl-7 pr-2 text-xs text-muted-foreground outline-none hover:bg-background focus:border-ring`,value:I?`${I.provider}\u0000${I.id}`:``,onChange:e=>{let t=F.find(t=>`${t.provider}\u0000${t.id}`===e.target.value);L(t),z(ue(t))},title:l(`taskModel`),children:[F.length===0?(0,f.jsx)(`option`,{value:``,children:l(`noModelAvailable`)}):null,F.map(e=>(0,f.jsxs)(`option`,{value:`${e.provider}\u0000${e.id}`,children:[ge(e),_e(e,I)?` ✓`:``]},`${e.provider}:${e.id}`))]})]}),(0,f.jsxs)(`span`,{className:`relative inline-flex items-center`,children:[(0,f.jsx)(i,{className:`pointer-events-none absolute left-2 size-3.5 text-muted-foreground/70`}),(0,f.jsx)(`select`,{className:`h-8 rounded-md border border-transparent bg-transparent pl-7 pr-2 text-xs text-muted-foreground outline-none hover:bg-background focus:border-ring`,value:R,onChange:e=>z(e.target.value),title:l(`taskThinking`),children:he.map(e=>(0,f.jsx)(`option`,{value:e.value,children:e.label()},e.value))})]}),(0,f.jsxs)(`span`,{className:`relative inline-flex items-center`,children:[(0,f.jsx)(ee,{className:`pointer-events-none absolute left-2 size-3.5 text-muted-foreground/70`}),(0,f.jsxs)(`select`,{className:`h-8 max-w-[220px] rounded-md border border-transparent bg-transparent pl-7 pr-2 text-xs text-muted-foreground outline-none hover:bg-background focus:border-ring`,value:Me,onChange:e=>V(e.target.value),title:l(`taskProjectLabel`),children:[(0,f.jsx)(`option`,{value:``,children:l(`noProjectBound`)}),B.map(e=>(0,f.jsx)(`option`,{value:e.id,children:e.name},e.id))]})]}),(0,f.jsxs)(`span`,{className:`relative inline-flex items-center`,children:[(0,f.jsx)(r,{className:`pointer-events-none absolute left-2 size-3.5 text-muted-foreground/70`}),(0,f.jsxs)(`select`,{className:`h-8 max-w-[220px] rounded-md border border-transparent bg-transparent pl-7 pr-2 text-xs text-muted-foreground outline-none hover:bg-background focus:border-ring`,value:y.agentId,onChange:e=>X(`agentId`,e.target.value),title:l(`executionAgent`),children:[(0,f.jsx)(`option`,{value:``,children:l(`defaultAgent`)}),Re.map(e=>(0,f.jsx)(`option`,{value:e.id,children:e.label},e.id))]})]})]}),O?(0,f.jsxs)(`div`,{className:`rounded-xl border border-border bg-muted/30 p-3 text-sm`,children:[(0,f.jsxs)(`div`,{className:`mb-2 flex items-center gap-2 font-medium text-foreground`,children:[(0,f.jsx)(t,{className:`size-4 text-emerald-600`}),l(`aiParsed`)]}),(0,f.jsxs)(`div`,{className:`grid gap-2 text-muted-foreground sm:grid-cols-2`,children:[(0,f.jsxs)(`div`,{children:[l(`taskName`),(0,f.jsx)(`span`,{className:`text-foreground`,children:O.title})]}),(0,f.jsxs)(`div`,{children:[l(`executionRule`),(0,f.jsx)(`span`,{className:`text-foreground`,children:O.scheduleRule})]}),(0,f.jsxs)(`div`,{children:[`cron:`,(0,f.jsx)(`span`,{className:`font-mono text-foreground`,children:O.cronExpression??`-`})]}),(0,f.jsxs)(`div`,{children:[l(`nextExecutionTime`),(0,f.jsx)(`span`,{className:`text-foreground`,children:m(O.nextRunAt)})]}),(0,f.jsxs)(`div`,{className:`sm:col-span-2`,children:[l(`aiInstruction`),(0,f.jsx)(`span`,{className:`text-foreground`,children:O.instruction})]})]})]}):null,N?(0,f.jsx)(`div`,{className:`rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive`,children:N}):null]}),(0,f.jsxs)(`div`,{className:`flex justify-end gap-2`,children:[(0,f.jsx)(u,{variant:`outline`,onClick:Q,disabled:j,children:l(`cancel`)}),(0,f.jsx)(u,{onClick:Qe,disabled:j||!I||!Te(y),children:l(He?`saveTask`:`confirmCreate`)})]})]}):J?(0,f.jsxs)(`div`,{className:`rounded-xl border border-border bg-card`,children:[(0,f.jsx)(`div`,{className:`flex flex-wrap items-start justify-between gap-3 border-b border-border px-5 py-4`,children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`h2`,{className:`text-base font-semibold text-foreground`,children:J.title}),(0,f.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:J.scheduleRule})]})}),(0,f.jsx)(`div`,{className:`px-5 py-4`,children:(0,f.jsxs)(`div`,{className:`space-y-4 text-sm`,children:[(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`mb-1 font-medium text-foreground`,children:l(`taskContent`)}),(0,f.jsx)(`pre`,{className:`max-h-48 overflow-auto whitespace-pre-wrap rounded-xl border border-border bg-muted/20 p-3 text-muted-foreground`,children:J.instruction})]}),(0,f.jsxs)(`div`,{className:`grid gap-3 text-muted-foreground sm:grid-cols-2`,children:[(0,f.jsxs)(`div`,{children:[l(`executionRule`),(0,f.jsx)(`span`,{className:`text-foreground`,children:J.scheduleRule})]}),(0,f.jsxs)(`div`,{children:[l(`taskExecutionMode`),`:`,(0,f.jsx)(`span`,{className:`text-foreground`,children:we(J.executionMode)})]}),(0,f.jsxs)(`div`,{children:[`cron:`,(0,f.jsx)(`span`,{className:`font-mono text-foreground`,children:J.cronExpression??`-`})]}),(0,f.jsxs)(`div`,{children:[l(`lastExecution`),(0,f.jsx)(`span`,{className:`text-foreground`,children:m(J.lastRunAt)})]}),(0,f.jsxs)(`div`,{children:[l(`nextExecution`),(0,f.jsx)(`span`,{className:`text-foreground`,children:m(J.nextRunAt)})]}),(0,f.jsxs)(`div`,{children:[l(`executionAgent`),(0,f.jsx)(`span`,{className:`text-foreground`,children:We(J.agentId)})]}),J.projectName?(0,f.jsxs)(`div`,{children:[l(`taskProject`),(0,f.jsx)(`span`,{className:`text-foreground`,children:J.projectName})]}):null,J.model?(0,f.jsxs)(`div`,{children:[l(`taskModel`),`:`,(0,f.jsx)(`span`,{className:`text-foreground`,children:ge(J.model)})]}):null,J.thinkingLevel?(0,f.jsxs)(`div`,{children:[l(`taskThinkingLevel`),(0,f.jsx)(`span`,{className:`text-foreground`,children:he.find(e=>e.value===J.thinkingLevel)?.label()??J.thinkingLevel})]}):null,(0,f.jsxs)(`div`,{children:[l(`createdAt`),`:`,(0,f.jsx)(`span`,{className:`text-foreground`,children:m(J.createdAt)})]})]}),J.runs?.length>0?(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`div`,{className:`mb-2 font-medium text-foreground`,children:l(`recentExecutions`)}),(0,f.jsx)(`div`,{className:`space-y-2`,children:J.runs.slice(0,5).map(e=>(0,f.jsxs)(`details`,{className:`rounded-lg border border-border bg-muted/20 p-2 text-xs text-muted-foreground`,children:[(0,f.jsxs)(`summary`,{className:`cursor-pointer text-foreground`,children:[m(e.startedAt),` · `,e.trigger===`manual`?l(`manualRun`):l(`autoRun`),` · `,Ee(e.status)]}),et(e)]},e.id))})]}):null]})}),(0,f.jsx)(`div`,{className:`border-t border-border px-5 py-4`,children:(0,f.jsxs)(`div`,{className:`flex flex-wrap justify-end gap-2`,children:[J.lastSessionId?(0,f.jsx)(u,{variant:`outline`,onClick:()=>e?.(J.lastSessionId),children:l(`viewConversation`)}):null,(0,f.jsxs)(u,{variant:`outline`,disabled:!Ce(J),onClick:()=>void $(J.id,`run`),children:[(0,f.jsx)(oe,{className:`mr-1 size-3.5`}),l(`executeNow`)]}),(0,f.jsxs)(u,{variant:`outline`,disabled:g(J),onClick:()=>$e(J),children:[(0,f.jsx)(n,{className:`mr-1 size-3.5`}),l(`editTask`)]}),(0,f.jsxs)(u,{variant:`destructive`,disabled:g(J),onClick:()=>void $(J.id,`delete`),children:[(0,f.jsx)(ne,{className:`mr-1 size-3.5`}),l(`deleteTask`)]})]})})]}):(0,f.jsxs)(f.Fragment,{children:[N?(0,f.jsx)(`div`,{className:`rounded-md border border-destructive/30 bg-destructive/10 px-3 py-2 text-sm text-destructive`,children:N}):null,p===`tasks`?(0,f.jsxs)(f.Fragment,{children:[(0,f.jsx)(`div`,{className:`rounded-xl border border-border bg-card p-4`,children:(0,f.jsx)(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:(0,f.jsxs)(`div`,{children:[(0,f.jsx)(`h2`,{className:`text-base font-semibold text-foreground`,children:l(`taskList`)}),(0,f.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:l(`tasksCount`,{total:o.length,enabled:Ue})})]})})}),(0,f.jsx)(`div`,{className:`grid gap-4 md:grid-cols-2`,children:o.length===0?(0,f.jsx)(`div`,{className:`rounded-lg px-3 py-3 text-center text-xs text-muted-foreground/55 md:col-span-2`,children:l(`noScheduledTasks`)}):o.map(e=>{let t=e.status===`enabled`,i=e.status===`completed`,a=g(e);return(0,f.jsxs)(`div`,{className:`relative cursor-pointer rounded-xl border border-border bg-card p-4 transition-colors hover:bg-muted/15`,onClick:()=>C(e.id),children:[(0,f.jsxs)(`div`,{className:`flex items-start justify-between gap-3`,children:[(0,f.jsxs)(`div`,{className:`min-w-0`,children:[(0,f.jsx)(`div`,{className:`flex items-center gap-2`,children:(0,f.jsx)(`h3`,{className:`truncate text-sm font-medium text-foreground/90`,children:e.title})}),(0,f.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:ve(e.instruction,20)})]}),(0,f.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,onClick:e=>e.stopPropagation(),children:[(0,f.jsx)(`button`,{type:`button`,role:`switch`,"aria-checked":t,disabled:i,className:c(`relative h-6 w-11 rounded-full transition-colors disabled:cursor-not-allowed disabled:opacity-60`,t?`bg-emerald-500`:`bg-muted-foreground/30`),onClick:()=>void $(e.id,e.status===`paused`?`resume`:`pause`),title:e.status===`paused`?l(`enable`):l(`pauseTask`),children:(0,f.jsx)(`span`,{className:c(`absolute left-0.5 top-0.5 size-5 rounded-full bg-white shadow transition-transform`,t?`translate-x-5`:`translate-x-0`)})}),(0,f.jsxs)(`div`,{className:`relative`,children:[(0,f.jsx)(u,{variant:`ghost`,size:`icon`,onClick:()=>T(w===e.id?null:e.id),title:l(`moreActions`),children:(0,f.jsx)(re,{className:`size-4`})}),w===e.id?(0,f.jsxs)(`div`,{className:`absolute right-0 z-20 mt-1 w-36 overflow-hidden rounded-xl border border-border bg-popover py-1 text-sm shadow-quickforge`,children:[(0,f.jsxs)(`button`,{className:`flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50`,disabled:!Ce(e),onClick:()=>void $(e.id,`run`),children:[(0,f.jsx)(oe,{className:`size-3.5`}),l(`executeNow`)]}),(0,f.jsxs)(`button`,{className:`flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50`,disabled:a,onClick:()=>$e(e),children:[(0,f.jsx)(n,{className:`size-3.5`}),l(`editTask`)]}),(0,f.jsxs)(`button`,{className:`flex w-full items-center gap-2 px-3 py-2 text-left hover:bg-muted`,onClick:()=>{T(null),C(e.id)},children:[(0,f.jsx)(ae,{className:`size-3.5`}),l(`viewDetails`)]}),(0,f.jsxs)(`button`,{className:`flex w-full items-center gap-2 px-3 py-2 text-left text-destructive hover:bg-muted disabled:cursor-not-allowed disabled:opacity-50`,disabled:a,onClick:()=>void $(e.id,`delete`),children:[(0,f.jsx)(ne,{className:`size-3.5`}),l(`deleteTask`)]})]}):null]})]})]}),(0,f.jsxs)(`div`,{className:`mt-3 flex flex-wrap gap-x-4 gap-y-1 text-xs text-muted-foreground`,children:[(0,f.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,f.jsx)(se,{className:`size-3`}),e.scheduleRule]}),(0,f.jsxs)(`span`,{className:`inline-flex items-center gap-1`,children:[(0,f.jsx)(r,{className:`size-3`}),We(e.agentId)]}),(0,f.jsxs)(`span`,{children:[l(`taskExecutionMode`),`:`,we(e.executionMode)]}),e.projectName?(0,f.jsxs)(`span`,{children:[l(`taskProject`),e.projectName]}):null]}),(0,f.jsxs)(`div`,{className:`mt-4 grid gap-2 border-t border-border pt-3 text-xs text-muted-foreground sm:grid-cols-2`,children:[(0,f.jsxs)(`span`,{children:[l(`lastExecution`),m(e.lastRunAt)]}),(0,f.jsxs)(`span`,{children:[l(`nextExecution`),m(e.nextRunAt)]})]})]},e.id)})})]}):(0,f.jsxs)(`div`,{className:`space-y-4`,children:[(0,f.jsxs)(`div`,{className:`rounded-xl border border-border bg-card p-4`,children:[(0,f.jsxs)(`div`,{className:`mb-3 flex items-center gap-2 text-sm font-medium text-foreground`,children:[(0,f.jsx)(te,{className:`size-4`}),l(`historyFilters`)]}),(0,f.jsxs)(`div`,{className:`grid gap-3 md:grid-cols-3`,children:[(0,f.jsxs)(`label`,{className:`block text-xs font-medium text-muted-foreground`,children:[l(`taskName`),(0,f.jsxs)(`select`,{className:`mt-1 h-9 w-full rounded-md border border-input bg-background px-2 text-sm text-foreground`,value:H.taskId,onChange:e=>Z(`taskId`,e.target.value),children:[(0,f.jsx)(`option`,{value:``,children:l(`allTasks`)}),o.map(e=>(0,f.jsx)(`option`,{value:e.id,children:e.title},e.id))]})]}),(0,f.jsxs)(`label`,{className:`block text-xs font-medium text-muted-foreground`,children:[l(`status`),(0,f.jsxs)(`select`,{className:`mt-1 h-9 w-full rounded-md border border-input bg-background px-2 text-sm text-foreground`,value:H.status,onChange:e=>Z(`status`,e.target.value),children:[(0,f.jsx)(`option`,{value:``,children:l(`allStatuses`)}),(0,f.jsx)(`option`,{value:`running`,children:l(`executionRunning`)}),(0,f.jsx)(`option`,{value:`success`,children:l(`executionSuccess`)}),(0,f.jsx)(`option`,{value:`failed`,children:l(`taskFailed`)})]})]}),(0,f.jsxs)(`label`,{className:`block text-xs font-medium text-muted-foreground`,children:[l(`triggerType`),(0,f.jsxs)(`select`,{className:`mt-1 h-9 w-full rounded-md border border-input bg-background px-2 text-sm text-foreground`,value:H.trigger,onChange:e=>Z(`trigger`,e.target.value),children:[(0,f.jsx)(`option`,{value:``,children:l(`allTriggers`)}),(0,f.jsx)(`option`,{value:`schedule`,children:l(`autoRun`)}),(0,f.jsx)(`option`,{value:`manual`,children:l(`manualRun`)})]})]}),(0,f.jsxs)(`label`,{className:`block text-xs font-medium text-muted-foreground`,children:[l(`startTime`),(0,f.jsx)(`input`,{type:`datetime-local`,className:`mt-1 h-9 w-full rounded-md border border-input bg-background px-2 text-sm text-foreground`,value:H.startedFrom,onChange:e=>Z(`startedFrom`,e.target.value)})]}),(0,f.jsxs)(`label`,{className:`block text-xs font-medium text-muted-foreground`,children:[l(`endTime`),(0,f.jsx)(`input`,{type:`datetime-local`,className:`mt-1 h-9 w-full rounded-md border border-input bg-background px-2 text-sm text-foreground`,value:H.startedTo,onChange:e=>Z(`startedTo`,e.target.value)})]}),(0,f.jsxs)(`label`,{className:`block text-xs font-medium text-muted-foreground`,children:[l(`keyword`),(0,f.jsx)(`input`,{className:`mt-1 h-9 w-full rounded-md border border-input bg-background px-2 text-sm text-foreground`,value:H.keyword,onChange:e=>Z(`keyword`,e.target.value),placeholder:l(`keywordPlaceholder`)})]})]}),(0,f.jsxs)(`div`,{className:`mt-3 flex justify-end gap-2`,children:[(0,f.jsx)(u,{variant:`outline`,onClick:Je,children:l(`reset`)}),(0,f.jsx)(u,{onClick:qe,children:l(`query`)})]})]}),(0,f.jsxs)(`div`,{className:`overflow-hidden rounded-xl border border-border bg-card`,children:[(0,f.jsxs)(`div`,{className:`grid grid-cols-[1.3fr_0.7fr_0.7fr_1fr_0.7fr] gap-3 border-b border-border px-4 py-3 text-xs font-medium text-muted-foreground`,children:[(0,f.jsx)(`span`,{children:l(`taskName`)}),(0,f.jsx)(`span`,{children:l(`status`)}),(0,f.jsx)(`span`,{children:l(`triggerType`)}),(0,f.jsx)(`span`,{children:l(`startTime`)}),(0,f.jsx)(`span`,{children:l(`runDuration`)})]}),Pe?(0,f.jsx)(`div`,{className:`p-8 text-center text-sm text-muted-foreground`,children:l(`loading`)}):K.runs.length===0?(0,f.jsx)(`div`,{className:`p-8 text-center text-sm text-muted-foreground`,children:l(`noExecutionHistory`)}):K.runs.map(e=>(0,f.jsxs)(`div`,{className:`border-b border-border last:border-b-0`,children:[(0,f.jsxs)(`button`,{type:`button`,className:`grid w-full grid-cols-[1.3fr_0.7fr_0.7fr_1fr_0.7fr] gap-3 px-4 py-3 text-left text-sm hover:bg-muted/40`,onClick:()=>Le(Ie===e.id?null:e.id),children:[(0,f.jsx)(`span`,{className:`min-w-0 truncate text-foreground`,children:e.taskTitle}),(0,f.jsx)(`span`,{children:(0,f.jsx)(`span`,{className:c(`rounded-full px-2 py-0.5 text-xs`,De(e.status)),children:Ee(e.status)})}),(0,f.jsx)(`span`,{className:`text-muted-foreground`,children:e.trigger===`manual`?l(`manualRun`):l(`autoRun`)}),(0,f.jsx)(`span`,{className:`text-muted-foreground`,children:m(e.startedAt)}),(0,f.jsx)(`span`,{className:`text-muted-foreground`,children:e.durationMs?`${e.durationMs}ms`:`-`})]}),Ie===e.id?(0,f.jsx)(`div`,{className:`border-t border-border bg-muted/20 px-4 py-3`,children:et(e)}):null]},`${e.taskId}:${e.id}`)),(0,f.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 px-4 py-3 text-sm text-muted-foreground`,children:[(0,f.jsx)(`span`,{children:l(`paginationSummary`,{page:K.page,pages:Y,total:K.total})}),(0,f.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,f.jsx)(`select`,{className:`h-8 rounded-md border border-input bg-background px-2 text-sm`,value:K.pageSize,onChange:e=>Xe(Number(e.target.value)),children:[10,20,50,100].map(e=>(0,f.jsx)(`option`,{value:e,children:l(`pageSize`,{size:e})},e))}),(0,f.jsx)(u,{variant:`outline`,size:`sm`,disabled:K.page<=1,onClick:()=>Ye(K.page-1),children:l(`previousPage`)}),(0,f.jsx)(u,{variant:`outline`,size:`sm`,disabled:K.page>=Y,onClick:()=>Ye(K.page+1),children:l(`nextPage`)})]})]})]})]})]})})})]})}export{v as ScheduledTasksPage};
@@ -1,2 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-DWdDZTNf.js";import{At as t,B as n,C as r,N as i,R as a,Vt as o,c as s,n as c}from"./icons-C7j5jdKo.js";import{n as l}from"./react-vendor-VqdnQHHS.js";import{E as u,P as d,dt as f,ht as p,j as m,ut as h}from"./index-DxNzlPmc.js";import{n as ee,t as g}from"./xterm-CGiQzDiR.js";var _=e(o(),1);async function v(e,t){let n=await fetch(e,{cache:`no-store`,...t}),r=await n.json().catch(()=>null);if(!n.ok)throw Error(r?.error||`Request failed: ${n.status}`);return r}function y(){return v(`/api/terminal/capabilities`)}function b(e){return v(`/api/terminal/sessions${e?`?projectId=${encodeURIComponent(e)}`:``}`)}function x(e){return v(`/api/terminal/sessions`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify(e)})}function S(e){return v(`/api/terminal/sessions/${encodeURIComponent(e)}`,{method:`DELETE`})}function C(e,t){return v(`/api/terminal/sessions/${encodeURIComponent(e)}/input`,{method:`POST`,headers:{"content-type":`application/json`},body:JSON.stringify({data:t})})}function w(){return``}function te(){let e=w();if(e){let t=new URL(e);return t.protocol=t.protocol===`https:`?`wss:`:`ws:`,t.toString().replace(/\/$/,``)}return`${location.protocol===`https:`?`wss:`:`ws:`}//${location.host}`}function T(){let[e,t]=(0,_.useState)(()=>u());return(0,_.useEffect)(()=>{if(typeof document>`u`)return;let e=document.documentElement,n=()=>t(u());n();let r=new MutationObserver(n);return r.observe(e,{attributes:!0,attributeFilter:[`class`]}),()=>r.disconnect()},[]),e}var E=l(),D={light:{background:`#ffffff`,foreground:`#1f2937`,cursor:`#1f2937`,selectionBackground:`#dbeafe`},dark:{background:`#171717`,foreground:`#e5e7eb`,cursor:`#e5e7eb`,selectionBackground:`#3f3f46`}};function ne({session:e,active:t,height:n,onReady:r,onExited:i,onConnectionError:a}){let o=T(),s=D[o],c=(0,_.useRef)(null),l=(0,_.useRef)(null),u=(0,_.useRef)(null),f=(0,_.useRef)(null),h=(0,_.useRef)(null),v=(0,_.useRef)(null);return(0,_.useEffect)(()=>{let t=c.current;if(!t)return;let n=!1,o=!1,_=!1,y=!1,b=t=>{n||_||y||(y=!0,a(e.id,t))},x=d(),S=new ee({cursorBlink:!0,convertEol:!1,fontFamily:getComputedStyle(document.documentElement).getPropertyValue(`--font-mono`).trim()||`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace`,fontSize:x.fontSize,lineHeight:x.lineHeight,scrollback:5e3,theme:s}),C=new g;S.loadAddon(C),S.open(t),S.writeln(`\x1b[2mConnected to ${e.cwd}\x1b[0m`),l.current=S,u.current=C;let w=()=>{if(t.isConnected)try{C.fit();let{cols:e,rows:t}=S,n=f.current;n?.readyState===WebSocket.OPEN&&n.send(JSON.stringify({type:`resize`,cols:e,rows:t}))}catch{}},T=new WebSocket(`${te()}/api/terminal/sessions/${encodeURIComponent(e.id)}/ws`);f.current=T,T.addEventListener(`open`,()=>{o=!0,y=!1,a(e.id,void 0),h.current=S.onData(e=>{T.readyState===WebSocket.OPEN&&T.send(JSON.stringify({type:`input`,data:e}))}),window.setTimeout(w,0)}),T.addEventListener(`message`,t=>{try{let n=JSON.parse(String(t.data));n.type===`ready`?r(e.id):n.type===`output`?S.write(n.data):n.type===`exit`?(_=!0,S.writeln(``),S.writeln(`\x1b[33m[process exited with code ${n.exitCode??`unknown`}]\x1b[0m`),i(e.id)):n.type===`error`&&S.writeln(`\x1b[31m${n.message}\x1b[0m`)}catch{}}),T.addEventListener(`error`,()=>{b(p(o?`terminalConnectionClosedUnexpectedly`:`terminalConnectionFailed`))}),T.addEventListener(`close`,e=>{h.current?.dispose(),h.current=null,!(n||_)&&(!e.wasClean||e.code!==1e3)&&b(p(o?`terminalConnectionClosedUnexpectedly`:`terminalConnectionFailed`))});let E=new ResizeObserver(()=>w());E.observe(t),v.current=E;let D=()=>{let e=d();S.options.fontSize=e.fontSize,S.options.lineHeight=e.lineHeight,window.setTimeout(w,0)};return window.addEventListener(m,D),window.setTimeout(w,50),()=>{n=!0,window.removeEventListener(m,D),E.disconnect(),v.current=null,h.current?.dispose(),h.current=null,T.close(),f.current=null,S.dispose(),l.current=null,u.current=null}},[o,a,i,r,e.cwd,e.id,s]),(0,_.useEffect)(()=>{if(!t)return;let e=u.current,n=l.current;window.setTimeout(()=>{try{e?.fit(),n?.focus()}catch{}},0)},[t,n]),(0,E.jsx)(`div`,{className:t?`h-full min-h-0 w-full pl-2 md:pl-3`:`hidden`,"aria-hidden":!t,children:(0,E.jsx)(`div`,{ref:c,className:`h-full min-h-0 w-full`})})}var re=180,ie=.7,ae=320;function O(e,t){let n=t?t.name:`Terminal`,r=new Set(e.map(e=>e.name));if(n!==`Terminal`&&!r.has(n))return n;let i=1;for(;r.has(`${n} ${i}`);)i+=1;return`${n} ${i}`}function k(e,t){let n=e?.terminalShellProfiles||[],r=t||e?.defaultTerminalShellProfileId||``;return n.find(e=>e.id===r)||n[0]}function A({project:e,onCollapse:o,pendingCommand:l,onPendingCommandHandled:u,variant:d=`dock`,singleSession:m=!1,panelInstanceId:ee,panelSessionId:g,onPanelSessionReady:v}){let[w,te]=(0,_.useState)(null),[T,D]=(0,_.useState)([]),[A,j]=(0,_.useState)(),[M,oe]=(0,_.useState)(ae),[N,se]=(0,_.useState)(!0),[P,ce]=(0,_.useState)(!1),[le,F]=(0,_.useState)(),[ue,I]=(0,_.useState)({}),[L,R]=(0,_.useState)(!1),[z,de]=(0,_.useState)(!1),B=(0,_.useRef)(!1),V=(0,_.useRef)(!1),H=(0,_.useRef)(new Set),fe=(0,_.useRef)(l),U=(0,_.useRef)(new Set),W=(0,_.useRef)(new Set),G=(0,_.useRef)(new Map),K=(0,_.useRef)(!0),pe=(0,_.useRef)(v),[me,he]=(0,_.useState)(()=>new Set),ge=(0,_.useRef)(null),_e=(0,_.useRef)(null),q=e?.id,J=d===`panel`&&!!ee,Y=(0,_.useMemo)(()=>T.find(e=>e.id===A)??T[0],[A,T]);(0,_.useEffect)(()=>{fe.current=l},[l]),(0,_.useEffect)(()=>{pe.current=v},[v]),(0,_.useEffect)(()=>()=>{K.current=!1},[]);let ve=(0,_.useCallback)(async()=>{let e=await b(q);return D(e.sessions),j(t=>t&&e.sessions.some(e=>e.id===t)?t:e.sessions[0]?.id),e.sessions},[q]),ye=(0,_.useCallback)(async(e,t)=>{if(B.current)return;let n=k(w,t);B.current=!0,ce(!0),F(void 0),I({});try{let t=await x({projectId:q,name:O(e,n),cols:120,rows:30,shellProfileId:n?.id,shellProfileName:n?.name});D(e=>[...e,t]),j(t.id)}catch(e){F(e instanceof Error?e.message:p(`terminalCreateFailed`))}finally{B.current=!1,ce(!1)}},[w,q]);(0,_.useEffect)(()=>{let e=!1;return(async()=>{se(!0),F(void 0);try{let[t,n]=await Promise.all([y(),b(q)]);if(e)return;if(te(t),t.enabled&&J&&g&&n.sessions.some(e=>e.id===g)){V.current=!0,D(n.sessions),j(g);return}if(t.enabled&&J&&!V.current){V.current=!0;let r=k(t);try{let t=await x({projectId:q,name:O(n.sessions,r),cols:120,rows:30,shellProfileId:r?.id,shellProfileName:r?.name});if(e){S(t.id).catch(()=>{});return}D([...n.sessions,t]),j(t.id),pe.current?.(t.id);return}catch(t){e||F(t instanceof Error?t.message:p(`terminalCreateFailed`))}}if(D(n.sessions),j(n.sessions[0]?.id),t.enabled&&n.sessions.length===0&&!fe.current){let n=k(t);x({projectId:q,name:O([],n),cols:120,rows:30,shellProfileId:n?.id,shellProfileName:n?.name}).then(t=>{if(e){S(t.id).catch(()=>{});return}D([t]),j(t.id)}).catch(t=>{e||F(t instanceof Error?t.message:p(`terminalCreateFailed`))})}}catch(t){e||F(t instanceof Error?t.message:p(`terminalUnavailable`))}finally{e||se(!1)}})(),()=>{e=!0}},[J,g,q]),(0,_.useEffect)(()=>{if(!L)return;let e=e=>{_e.current?.contains(e.target)||R(!1)},t=e=>{e.key===`Escape`&&R(!1)};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[L]),(0,_.useEffect)(()=>{if(!z)return;let e=e=>{e.key===`Escape`&&de(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[z]),(0,_.useEffect)(()=>{if(!l||H.current.has(l.id)||G.current.has(l.id)||U.current.has(l.id)||N||P||!w)return;if(!w.enabled){H.current.add(l.id),window.setTimeout(()=>{F(w.reason||p(`terminalUnavailable`)),u?.(l.id)},0);return}let e=Y&&!Y.exited?Y:T.find(e=>!e.exited);if(e){G.current.set(l.id,e.id),window.setTimeout(()=>{K.current&&j(e.id)},0);return}U.current.add(l.id),window.setTimeout(()=>{K.current&&F(void 0)},0);let t=k(w);x({projectId:q,name:O(T,t),cols:120,rows:30,shellProfileId:t?.id,shellProfileName:t?.name}).then(e=>{if(!K.current){S(e.id).catch(()=>{});return}G.current.set(l.id,e.id),D(t=>t.some(t=>t.id===e.id)?t:[...t,e]),j(e.id)}).catch(e=>{K.current&&(F(e instanceof Error?e.message:p(`terminalCommandExecuteFailed`)),H.current.add(l.id),u?.(l.id))}).finally(()=>{U.current.delete(l.id)})},[Y,w,P,N,u,l,q,T]),(0,_.useEffect)(()=>{if(!l||H.current.has(l.id)||W.current.has(l.id))return;let e=G.current.get(l.id),t=e?T.find(t=>t.id===e):Y&&!Y.exited?Y:T.find(e=>!e.exited);!t||t.exited||!me.has(t.id)||(W.current.add(l.id),window.setTimeout(()=>{K.current&&(j(t.id),F(void 0))},0),(async()=>{try{if(l.execute){let e=l.command.split(`
2
- `),n=e.flatMap((t,n)=>n<e.length-1?[t,`\r`]:[t]);n.push(`\r`),await C(t.id,n.join(``))}else await C(t.id,l.command)}catch(e){K.current&&F(e instanceof Error?e.message:p(`terminalCommandExecuteFailed`))}finally{H.current.add(l.id),W.current.delete(l.id),G.current.delete(l.id),K.current&&u?.(l.id)}})())},[Y,u,l,me,T]);let be=async e=>{F(void 0),I(t=>{if(!t[e])return t;let n={...t};return delete n[e],n});let t=T.filter(t=>t.id!==e);D(t),A===e&&j(t[0]?.id);try{await S(e)}catch(e){F(e instanceof Error?e.message:p(`terminalCloseFailed`)),ve().catch(()=>{})}},xe=(0,_.useCallback)(e=>{D(t=>t.map(t=>t.id===e?{...t,exited:!0}:t)),he(t=>{if(!t.has(e))return t;let n=new Set(t);return n.delete(e),n})},[]),Se=(0,_.useCallback)(e=>{he(t=>{if(t.has(e))return t;let n=new Set(t);return n.add(e),n})},[]),Ce=(0,_.useCallback)((e,t)=>{I(n=>{if(!t){if(!n[e])return n;let t={...n};return delete t[e],t}return n[e]===t?n:{...n,[e]:t}})},[]),we=e=>{ge.current={startY:e.clientY,startHeight:M},e.currentTarget.setPointerCapture(e.pointerId)},Te=e=>{let t=ge.current;if(!t)return;let n=Math.max(re,Math.floor(window.innerHeight*ie));oe(Math.min(n,Math.max(re,t.startHeight+t.startY-e.clientY)))},Ee=e=>{ge.current=null;try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}},X=w?.terminalShellProfiles||[],De=w?.defaultTerminalShellProfileId||``,Oe=X.find(e=>e.id===De)||X[0],ke=!!(w&&T.length>=w.maxSessions),Ae=P||ke,je=Y?ue[Y.id]:void 0,Me=J&&Y?[Y]:T,Z=le??je,Q=d===`panel`,$=Q&&m,Ne=Q?void 0:z?Z?`calc(100% - 4.25rem)`:`calc(100% - 2.25rem)`:Z?M-72:M-45;return(0,E.jsxs)(`div`,{className:f(Q?`flex min-h-0 flex-1 flex-col bg-background`:`shrink-0 border-t border-border bg-background`,z&&`quickforge-terminal-fullscreen z-40 flex flex-col border-t-0`),style:z||Q?void 0:{height:M},children:[!z&&!Q?(0,E.jsx)(`div`,{className:`h-1 cursor-row-resize bg-transparent hover:bg-border`,onPointerDown:we,onPointerMove:Te,onPointerUp:Ee,onPointerCancel:Ee}):null,(0,E.jsxs)(`div`,{className:`flex h-9 items-center gap-1 border-b border-border px-2`,children:[(0,E.jsx)(s,{className:`size-4 shrink-0 text-muted-foreground/60`}),(0,E.jsx)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1 overflow-x-auto`,children:Me.map(e=>{let t=f(`flex max-w-44 shrink-0 items-center gap-1 rounded-md px-2 py-1 text-xs text-muted-foreground/72`,Y?.id===e.id&&`bg-muted/28 text-foreground/90`);return $?(0,E.jsxs)(`div`,{className:t,title:`${e.name} — ${e.cwd}`,children:[(0,E.jsx)(`span`,{className:f(`size-1.5 rounded-full`,e.exited?`bg-muted-foreground/40`:`bg-emerald-500/80`)}),(0,E.jsx)(`span`,{className:`truncate`,children:e.name})]},e.id):(0,E.jsxs)(`button`,{type:`button`,className:f(t,`hover:bg-muted/20 hover:text-foreground/85`),onClick:()=>j(e.id),title:`${e.name} — ${e.cwd}`,children:[(0,E.jsx)(`span`,{className:f(`size-1.5 rounded-full`,e.exited?`bg-muted-foreground/40`:`bg-emerald-500/80`)}),(0,E.jsx)(`span`,{className:`truncate`,children:e.name}),(0,E.jsx)(`span`,{role:`button`,tabIndex:0,className:`ml-1 rounded-sm p-0.5 opacity-60 hover:bg-background hover:opacity-100`,onClick:t=>{t.stopPropagation(),be(e.id)},onKeyDown:t=>{(t.key===`Enter`||t.key===` `)&&(t.preventDefault(),t.stopPropagation(),be(e.id))},"aria-label":p(`terminalCloseSession`,{name:e.name}),children:(0,E.jsx)(c,{className:`size-3`})})]},e.id)})}),$?null:(0,E.jsxs)(`div`,{className:`relative shrink-0`,ref:_e,children:[(0,E.jsxs)(`div`,{className:`flex items-center overflow-hidden rounded-md border border-border bg-background`,children:[(0,E.jsx)(`button`,{type:`button`,className:`inline-flex h-7 w-7 items-center justify-center text-foreground/85 transition-colors hover:bg-muted/20 disabled:pointer-events-none disabled:opacity-50`,onClick:()=>void ye(T),disabled:Ae,title:Oe?p(`terminalNewWithProfile`,{name:Oe.name}):p(`terminalNew`),"aria-label":p(`terminalNew`),children:P?(0,E.jsx)(n,{className:`size-3.5 animate-spin`}):(0,E.jsx)(r,{className:`size-3.5`})}),X.length>0?(0,E.jsx)(`button`,{type:`button`,className:`inline-flex h-7 w-7 items-center justify-center border-l border-border text-muted-foreground/72 transition-colors hover:bg-muted/20 hover:text-foreground/85 disabled:pointer-events-none disabled:opacity-50`,onClick:()=>R(e=>!e),disabled:Ae,title:p(`terminalSelectShell`),"aria-label":p(`terminalSelectShell`),"aria-expanded":L,children:(0,E.jsx)(t,{className:`size-3.5`})}):null]}),L?(0,E.jsxs)(`div`,{className:f(`absolute right-0 z-30 w-64 overflow-hidden rounded-lg border border-border bg-background p-1.5 shadow-[0_16px_38px_-22px_rgb(15_23_42_/_0.65)]`,Q?`top-9`:`bottom-9`),children:[(0,E.jsx)(`div`,{className:`px-2 pb-1.5 pt-1 text-[11px] font-medium uppercase tracking-wide text-muted-foreground/60`,children:p(`terminalNewWith`)}),X.map(e=>(0,E.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 rounded-md px-2 py-1.5 text-left text-xs text-muted-foreground/80 hover:bg-muted/20 hover:text-foreground/90`,onClick:()=>{R(!1),ye(T,e.id)},children:[(0,E.jsx)(`span`,{className:`inline-flex size-5 shrink-0 items-center justify-center rounded bg-muted/20 text-[10px] text-muted-foreground/70`,children:e.name.slice(0,1).toUpperCase()}),(0,E.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,E.jsx)(`span`,{className:`block truncate font-medium`,children:e.name}),(0,E.jsx)(`span`,{className:`block truncate font-mono text-[11px] text-muted-foreground/55`,children:e.command})]})]},e.id))]}):null]}),$?null:(0,E.jsx)(h,{variant:`ghost`,size:`icon`,className:`size-7`,onClick:()=>de(e=>!e),title:p(z?`terminalExitFullscreen`:`terminalFullscreen`),"aria-label":p(z?`terminalExitFullscreen`:`terminalFullscreen`),children:z?(0,E.jsx)(i,{className:`size-3.5`}):(0,E.jsx)(a,{className:`size-3.5`})}),(0,E.jsx)(h,{variant:`ghost`,size:`icon`,className:f(`size-7`,Q&&`hidden`),onClick:o,title:p(`terminalCollapse`),"aria-label":p(`terminalCollapse`),children:(0,E.jsx)(t,{className:`size-3.5`})})]}),Z?(0,E.jsx)(`div`,{className:`border-b border-border px-3 py-1.5 text-xs text-destructive`,children:Z}):null,(0,E.jsx)(`div`,{className:f(`min-h-0 bg-background`,Q&&`flex-1`),style:Ne===void 0?void 0:{height:Ne},children:N?(0,E.jsxs)(`div`,{className:`flex h-full items-center justify-center gap-2 text-xs text-muted-foreground/60`,children:[(0,E.jsx)(n,{className:`size-4 animate-spin`}),` `,p(`terminalStarting`)]}):w&&!w.enabled?(0,E.jsx)(`div`,{className:`flex h-full items-center justify-center px-4 text-center text-xs text-muted-foreground/60`,children:w.reason||p(`terminalUnavailable`)}):T.length===0?(0,E.jsx)(`div`,{className:`flex h-full items-center justify-center text-xs text-muted-foreground/60`,children:p(`terminalNoSessions`)}):T.map(e=>(0,E.jsx)(ne,{session:e,active:e.id===Y?.id,height:z?window.innerHeight-36:Q?0:M,onReady:Se,onExited:xe,onConnectionError:Ce},e.id))})]})}export{A as TerminalDock,T as t};
@@ -1,13 +0,0 @@
1
- import{i as e}from"./rolldown-runtime-DWdDZTNf.js";import{$ as t,At as n,B as r,C as i,Et as a,It as o,K as s,M as c,N as l,Ot as u,P as d,Q as f,R as p,Rt as m,U as h,Vt as g,W as _,Y as v,Z as ee,_ as y,_t as b,at as x,b as te,c as S,ct as C,et as ne,ft as re,gt as ie,ht as ae,jt as oe,lt as w,mt as se,n as ce,nt as le,o as ue,ot as T,pt as de,q as E,rt as fe,st as D,tt as pe,ut as me,v as he,x as ge}from"./icons-C7j5jdKo.js";import{n as _e}from"./react-vendor-VqdnQHHS.js";import{H as ve,N as ye,V as be,_ as xe,a as Se,b as Ce,d as we,dt as O,f as Te,g as Ee,h as De,ht as k,i as Oe,j as ke,lt as Ae,m as je,n as A,o as Me,p as Ne,r as j,t as M,u as Pe,ut as N,v as Fe,y as Ie}from"./index-DxNzlPmc.js";import{n as Le,r as Re,t as P}from"./mermaid-renderer-BmbSAmpG.js";import{TerminalDock as ze,t as Be}from"./TerminalDock-CvqBBMPg.js";import{n as F,t as Ve}from"./monaco-CdOyGlWD.js";var I=e(g(),1),L=_e();function He(e){let t=e.trim();if(!t.startsWith(`/api/workspace/preview/`))return!1;try{let e=new URL(t,window.location.origin);return e.origin===window.location.origin&&e.pathname.startsWith(`/api/workspace/preview/`)}catch{return!1}}function Ue(e){let t=e.trim().replace(/\\/g,`/`);return t.startsWith(`/`)||/^[a-zA-Z]:\//.test(t)}function We(e,t){let n=e.trim();if(!t||!He(n))return n;try{let e=new URL(n,window.location.origin),r=`/api/workspace/preview/${encodeURIComponent(t)}/`;return e.pathname.startsWith(r)?e.pathname.slice(r.length).split(`/`).map(e=>decodeURIComponent(e)).join(`/`):n}catch{return n}}function Ge(e,t){let n=e.trim();if(!n)return{url:``,displayUrl:``,error:``};if(He(n)){let e=new URL(n,window.location.origin);return{url:`${e.pathname}${e.search}${e.hash}`,displayUrl:We(n,t),error:``}}if(t&&Ue(n))return{url:Me(t,n),displayUrl:n,error:``};let r=/^https?:\/\//i.test(n)?n:`http://${n}`;try{let e=new URL(r);return e.protocol!==`http:`&&e.protocol!==`https:`?{url:``,displayUrl:n,error:k(`invalidPreviewUrl`)}:{url:e.toString(),displayUrl:e.toString(),error:``}}catch{return{url:``,displayUrl:n,error:k(`invalidPreviewUrl`)}}}function Ke({url:e,onUrlChange:t,projectId:n}){let r=(0,I.useMemo)(()=>Ge(e,n),[n,e]),[a,o]=(0,I.useState)({sourceUrl:e,value:r.displayUrl}),[s,l]=(0,I.useState)(``),[u,d]=(0,I.useState)(0),[f,p]=(0,I.useState)(!1),[h,g]=(0,I.useState)(100),v=(0,I.useRef)(null),ee=(0,I.useRef)(null),y=r.url,b=y.startsWith(`/api/workspace/preview/`)?`allow-scripts allow-same-origin allow-forms`:`allow-scripts allow-same-origin allow-forms allow-popups allow-downloads allow-modals allow-pointer-lock`,x=a.sourceUrl===e?a.value:r.displayUrl;(0,I.useEffect)(()=>{if(!f)return;function e(e){v.current?.contains(e.target)||p(!1)}return document.addEventListener(`pointerdown`,e),()=>document.removeEventListener(`pointerdown`,e)},[f]);function te(){try{ee.current?.contentWindow?.history.back()}catch{}}function S(e=x){let r=Ge(e,n);if(r.error){l(r.error);return}l(``),o({sourceUrl:r.displayUrl,value:r.displayUrl}),t(r.displayUrl),r.url&&d(e=>e+1)}function C(){y&&d(e=>e+1)}function ne(){y&&window.open(y,`_blank`,`noopener,noreferrer`)}return(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,L.jsxs)(`div`,{className:`flex shrink-0 flex-col gap-2 border-b border-border p-3`,children:[(0,L.jsxs)(`form`,{className:`flex items-center gap-2`,onSubmit:e=>{e.preventDefault(),S()},children:[(0,L.jsx)(N,{type:`button`,variant:`ghost`,size:`icon`,onClick:te,disabled:!y,"aria-label":k(`back`),title:k(`back`),children:(0,L.jsx)(m,{className:`size-4`})}),(0,L.jsx)(N,{type:`button`,variant:`ghost`,size:`icon`,onClick:C,disabled:!y,"aria-label":k(`refreshPreview`),title:k(`refreshPreview`),children:(0,L.jsx)(ge,{className:`size-4`})}),(0,L.jsxs)(`label`,{className:`mx-auto flex h-9 min-w-0 max-w-xl flex-1 items-center rounded-full border border-[color-mix(in_oklab,var(--border)_42%,transparent)] bg-muted/30 px-3 text-sm text-muted-foreground/65 focus-within:bg-background focus-within:text-foreground/85`,children:[(0,L.jsx)(`span`,{className:`sr-only`,children:k(`previewUrl`)}),(0,L.jsx)(`input`,{value:x,onChange:t=>{o({sourceUrl:e,value:t.target.value}),s&&l(``)},placeholder:k(`previewUrlPlaceholder`),className:`min-w-0 flex-1 bg-transparent text-center text-sm text-foreground/85 outline-none placeholder:text-muted-foreground/55`})]}),(0,L.jsx)(N,{type:`button`,variant:`ghost`,size:`icon`,onClick:ne,disabled:!y,"aria-label":k(`openInBrowser`),title:k(`openInBrowser`),children:(0,L.jsx)(me,{className:`size-4`})}),(0,L.jsxs)(`div`,{ref:v,className:`relative shrink-0`,children:[(0,L.jsx)(N,{type:`button`,variant:`ghost`,size:`icon`,onClick:()=>p(e=>!e),"aria-label":k(`more`),title:k(`more`),"aria-haspopup":`menu`,"aria-expanded":f,children:(0,L.jsx)(re,{className:`size-4`})}),f?(0,L.jsxs)(`div`,{className:`absolute right-0 top-10 z-30 w-48 rounded-2xl border border-[color-mix(in_oklab,var(--border)_34%,transparent)] bg-popover p-2 shadow-quickforge`,role:`menu`,children:[(0,L.jsx)(`div`,{className:`px-2 py-1.5 text-xs font-medium text-muted-foreground`,children:k(`zoom`)}),(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-2 rounded-xl px-1 py-1.5`,children:[(0,L.jsx)(N,{type:`button`,variant:`ghost`,size:`icon`,className:`size-8`,onClick:()=>g(e=>Math.max(50,e-10)),"aria-label":k(`zoomOut`),title:k(`zoomOut`),children:(0,L.jsx)(c,{className:`size-4`})}),(0,L.jsxs)(`button`,{type:`button`,className:`min-w-14 rounded-lg px-2 py-1 text-sm font-medium text-foreground/85 hover:bg-muted/50`,onClick:()=>g(100),title:k(`resetZoom`),children:[h,`%`]}),(0,L.jsx)(N,{type:`button`,variant:`ghost`,size:`icon`,className:`size-8`,onClick:()=>g(e=>Math.min(200,e+10)),"aria-label":k(`zoomIn`),title:k(`zoomIn`),children:(0,L.jsx)(i,{className:`size-4`})})]})]}):null]})]}),s?(0,L.jsx)(`div`,{className:`text-xs text-destructive`,children:s}):null]}),(0,L.jsx)(`div`,{className:`min-h-0 flex-1 bg-muted/10`,children:y?(0,L.jsx)(`div`,{className:`h-full w-full overflow-auto bg-background`,children:(0,L.jsx)(`iframe`,{ref:ee,title:k(`webPreview`),src:y,sandbox:b,className:`origin-top-left border-0 bg-background`,style:{width:`${1e4/h}%`,height:`${1e4/h}%`,transform:`scale(${h/100})`}},`${y}:${u}`)}):(0,L.jsxs)(`div`,{className:`flex h-full flex-col items-center justify-center px-8 text-center`,children:[(0,L.jsx)(_,{className:`size-20 stroke-[1.55] text-muted-foreground/75`}),(0,L.jsx)(`div`,{className:`mt-8 text-xl font-semibold tracking-tight text-foreground/88`,children:k(`noPreviewUrlTitle`)}),(0,L.jsx)(`div`,{className:`mt-4 max-w-xs text-base leading-6 text-muted-foreground/82`,children:k(`noPreviewUrlDescription`)})]})})]})}function qe({source:e}){let[t,n]=(0,I.useState)({source:e,value:`preview`}),[r,i]=(0,I.useState)({source:``,dataUrl:``,error:!1});(0,I.useEffect)(()=>{let t=!1;return Re(e).then(n=>{t||i({source:e,dataUrl:P(n),error:!1})}).catch(()=>{t||i({source:e,dataUrl:``,error:!0})}),()=>{t=!0}},[e]);let a=r.source===e?r:{source:e,dataUrl:``,error:!1},o=t.source===e?t.value:`preview`,s=r.source!==e,c=o===`source`||a.error;return(0,L.jsxs)(`figure`,{className:`my-5 overflow-hidden rounded-xl border border-border bg-muted/20`,children:[(0,L.jsxs)(`figcaption`,{className:`flex min-h-9 items-center justify-between gap-3 border-b border-border px-3 py-1.5`,children:[(0,L.jsx)(`span`,{className:`font-mono text-[11px] text-muted-foreground/65`,children:`mermaid`}),(0,L.jsxs)(`span`,{className:`inline-flex items-center gap-1 rounded-md bg-background/70 p-0.5`,children:[(0,L.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1 text-[11px] text-muted-foreground transition-colors hover:text-foreground disabled:cursor-not-allowed disabled:opacity-40`,disabled:!a.dataUrl,"aria-pressed":!c,onClick:()=>n({source:e,value:`preview`}),children:k(`svgPreviewMode`)}),(0,L.jsx)(`button`,{type:`button`,className:`rounded px-2 py-1 text-[11px] text-muted-foreground transition-colors hover:text-foreground`,"aria-pressed":c,onClick:()=>n({source:e,value:`source`}),children:k(`svgSourceMode`)})]})]}),s?(0,L.jsx)(`div`,{className:`flex min-h-28 items-center justify-center px-4 py-8 text-xs text-muted-foreground/70`,role:`status`,children:k(`mermaidRendering`)}):c?(0,L.jsxs)(L.Fragment,{children:[a.error?(0,L.jsx)(`p`,{className:`px-4 pt-3 text-xs text-muted-foreground`,children:k(`mermaidRenderFailed`)}):null,(0,L.jsx)(`pre`,{className:`overflow-auto p-4 text-[12px] leading-5`,children:(0,L.jsx)(`code`,{children:e})})]}):(0,L.jsx)(`div`,{className:`flex min-h-28 justify-center overflow-auto bg-background/45 p-4`,children:(0,L.jsx)(`img`,{className:`h-auto max-w-full object-contain`,src:a.dataUrl,alt:k(`mermaidPreviewLabel`)})})]})}function Je(){let[e,t]=(0,I.useState)(()=>ye());return(0,I.useEffect)(()=>{if(typeof window>`u`)return;let e=()=>t(ye());return window.addEventListener(ke,e),()=>window.removeEventListener(ke,e)},[]),e}function Ye({path:e,content:t,language:n}){let r=Be(),i=Je();return(0,L.jsx)(Ve,{value:t,language:n,theme:r===`dark`?`vs-dark`:`vs`,options:{readOnly:!0,contextmenu:!1,automaticLayout:!0,minimap:{enabled:!1},fontFamily:getComputedStyle(document.documentElement).getPropertyValue(`--font-mono`).trim()||`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace`,fontSize:i.fontSize,lineHeight:i.lineHeight,lineNumbers:`on`,scrollBeyondLastLine:!1,wordWrap:`off`,renderLineHighlight:`line`,folding:!1,glyphMargin:!1,scrollbar:{horizontal:`visible`,horizontalScrollbarSize:10,verticalScrollbarSize:8}}},e)}function Xe(e){let t=e.trim();if(t&&!/^(javascript|data|vbscript):/i.test(t)&&/^(https?:|mailto:|#|\/|\.\.?\/)/i.test(t))return t}function R(e,t){let n=[],r=/`([^`]+)`|\[([^\]]+)\]\(([^)\s]+)(?:\s+"[^"]*")?\)|\*\*([^*]+)\*\*|__([^_]+)__|\*([^*\n]+)\*|_([^_\n]+)_/g,i=0,a=0,o;for(;o=r.exec(e);){o.index>i&&n.push(e.slice(i,o.index));let s=`${t}-inline-${a++}`;if(o[1])n.push((0,L.jsx)(`code`,{className:`rounded bg-muted/35 px-1 py-0.5 font-mono text-[0.85em] text-foreground/90`,children:o[1]},s));else if(o[2]&&o[3]){let e=Xe(o[3]);n.push(e?(0,L.jsx)(`a`,{className:`text-primary underline-offset-4 hover:underline`,href:e,target:e.startsWith(`http`)?`_blank`:void 0,rel:`noreferrer`,children:o[2]},s):`[${o[2]}](${o[3]})`)}else o[4]||o[5]?n.push((0,L.jsx)(`strong`,{className:`font-semibold text-foreground/95`,children:o[4]||o[5]},s)):(o[6]||o[7])&&n.push((0,L.jsx)(`em`,{className:`italic`,children:o[6]||o[7]},s));i=r.lastIndex}return i<e.length&&n.push(e.slice(i)),n.length?n:[e]}function Ze(e,t){return e.split(`
2
- `).flatMap((e,n)=>{let r=R(e,`${t}-line-${n}`);return n===0?r:[(0,L.jsx)(`br`,{},`${t}-br-${n}`),...r]})}function z(e){return/^\s*(```|~~~)/.test(e)}function Qe(e){return/^\s*\|?\s*:?-{3,}:?\s*(\|\s*:?-{3,}:?\s*)+\|?\s*$/.test(e)}function $e(e,t){return!!(e[t]?.includes(`|`)&&e[t+1]&&Qe(e[t+1]))}function et(e,t){let n=e[t]??``;return z(n)||$e(e,t)||/^\s{0,3}#{1,6}\s+/.test(n)||/^\s{0,3}([-*_])(?:\s*\1){2,}\s*$/.test(n)||/^\s{0,3}>\s?/.test(n)||/^\s{0,3}[-*+]\s+/.test(n)||/^\s{0,3}\d+[.)]\s+/.test(n)}function B(e){return e.trim().replace(/^\|/,``).replace(/\|$/,``).split(`|`).map(e=>e.trim())}function tt(e){let t=e.replace(/\r\n?/g,`
3
- `).split(`
4
- `),n=[],r=0,i=0;for(;r<t.length;){let e=t[r],a=`markdown-block-${i++}`;if(!e.trim()){r+=1;continue}if(z(e)){let i=e.match(/^\s*(```|~~~)\s*([^`]*)$/),o=i?.[1]??"```",s=i?.[2]?.trim(),c=[];for(r+=1;r<t.length&&!t[r].trimStart().startsWith(o);)c.push(t[r]),r+=1;r<t.length&&(r+=1);let l=c.join(`
5
- `);Le(s)?n.push((0,L.jsx)(qe,{source:l},a)):n.push((0,L.jsxs)(`figure`,{className:`my-5 overflow-hidden rounded-xl border border-border bg-muted/20`,children:[s?(0,L.jsx)(`figcaption`,{className:`border-b border-border px-3 py-1.5 font-mono text-[11px] text-muted-foreground/65`,children:s}):null,(0,L.jsx)(`pre`,{className:`overflow-auto p-4 text-[12px] leading-5`,children:(0,L.jsx)(`code`,{children:l})})]},a));continue}let o=e.match(/^\s{0,3}(#{1,6})\s+(.+?)\s*#*\s*$/);if(o){let e=o[1].length,t=o[2],i=[`mt-8 mb-3 border-border text-foreground/95`,e===1?`border-b pb-3 text-3xl font-semibold tracking-tight`:``,e===2?`border-b pb-2 text-2xl font-semibold tracking-tight`:``,e===3?`text-xl font-semibold`:``,e===4?`text-lg font-semibold`:``,e>=5?`text-base font-semibold`:``].filter(Boolean).join(` `),s=R(t,`${a}-heading`);e===1?n.push((0,L.jsx)(`h1`,{className:i,children:s},a)):e===2?n.push((0,L.jsx)(`h2`,{className:i,children:s},a)):e===3?n.push((0,L.jsx)(`h3`,{className:i,children:s},a)):e===4?n.push((0,L.jsx)(`h4`,{className:i,children:s},a)):e===5?n.push((0,L.jsx)(`h5`,{className:i,children:s},a)):n.push((0,L.jsx)(`h6`,{className:i,children:s},a)),r+=1;continue}if(/^\s{0,3}([-*_])(?:\s*\1){2,}\s*$/.test(e)){n.push((0,L.jsx)(`hr`,{className:`my-6 border-border`},a)),r+=1;continue}if($e(t,r)){let e=B(t[r]);r+=2;let i=[];for(;r<t.length&&t[r].includes(`|`)&&t[r].trim();)i.push(B(t[r])),r+=1;n.push((0,L.jsx)(`div`,{className:`my-5 overflow-auto rounded-xl border border-border`,children:(0,L.jsxs)(`table`,{className:`w-full border-collapse text-left text-sm`,children:[(0,L.jsx)(`thead`,{className:`bg-muted/25 text-foreground/90`,children:(0,L.jsx)(`tr`,{children:e.map((e,t)=>(0,L.jsx)(`th`,{className:`border-b border-border px-3 py-2 font-semibold`,children:R(e,`${a}-th-${t}`)},`${a}-th-${t}`))})}),(0,L.jsx)(`tbody`,{children:i.map((t,n)=>(0,L.jsx)(`tr`,{className:`border-t border-border/70`,children:e.map((e,r)=>(0,L.jsx)(`td`,{className:`px-3 py-2 align-top text-foreground/85`,children:R(t[r]??``,`${a}-td-${n}-${r}`)},`${a}-td-${n}-${r}`))},`${a}-row-${n}`))})]})},a));continue}if(/^\s{0,3}>\s?/.test(e)){let e=[];for(;r<t.length&&/^\s{0,3}>\s?/.test(t[r]);)e.push(t[r].replace(/^\s{0,3}>\s?/,``)),r+=1;n.push((0,L.jsx)(`blockquote`,{className:`my-4 border-l-2 border-border pl-4 text-muted-foreground/85`,children:Ze(e.join(`
6
- `),`${a}-quote`)},a));continue}if(/^\s{0,3}[-*+]\s+/.test(e)){let e=[];for(;r<t.length&&/^\s{0,3}[-*+]\s+/.test(t[r]);)e.push(t[r].replace(/^\s{0,3}[-*+]\s+/,``)),r+=1;n.push((0,L.jsx)(`ul`,{className:`my-4 list-disc space-y-1 pl-6`,children:e.map((e,t)=>(0,L.jsx)(`li`,{children:R(e,`${a}-li-${t}`)},`${a}-li-${t}`))},a));continue}if(/^\s{0,3}\d+[.)]\s+/.test(e)){let e=[];for(;r<t.length&&/^\s{0,3}\d+[.)]\s+/.test(t[r]);)e.push(t[r].replace(/^\s{0,3}\d+[.)]\s+/,``)),r+=1;n.push((0,L.jsx)(`ol`,{className:`my-4 list-decimal space-y-1 pl-6`,children:e.map((e,t)=>(0,L.jsx)(`li`,{children:R(e,`${a}-li-${t}`)},`${a}-li-${t}`))},a));continue}let s=[];for(;r<t.length&&t[r].trim()&&!et(t,r);)s.push(t[r].trim()),r+=1;n.push((0,L.jsx)(`p`,{className:`my-4 text-foreground/86`,children:R(s.join(` `),`${a}-p`)},a))}return n}function nt({path:e,content:t,language:n,mode:r}){let i=(0,I.useMemo)(()=>tt(t),[t]);return(0,L.jsx)(`div`,{className:`flex h-full min-h-0 flex-col bg-background`,children:(0,L.jsx)(`div`,{className:`min-h-0 flex-1`,children:r===`source`?(0,L.jsx)(Ye,{path:e,content:t,language:n}):(0,L.jsx)(`div`,{className:`h-full overflow-auto bg-background`,children:(0,L.jsx)(`article`,{className:`quickforge-markdown-reader mx-auto max-w-3xl px-8 py-7 text-sm leading-7 text-foreground/88`,children:i.length?i:(0,L.jsx)(`p`,{className:`text-muted-foreground/70`,children:`This Markdown file is empty.`})})})})})}function rt({path:e,oldContent:t,newContent:n,language:r,status:i}){let a=Be(),o=Je();return(0,L.jsx)(F,{original:t,modified:n,language:r,theme:a===`dark`?`vs-dark`:`vs`,options:{readOnly:!0,contextmenu:!1,automaticLayout:!0,renderSideBySide:!0,minimap:{enabled:!1},fontFamily:getComputedStyle(document.documentElement).getPropertyValue(`--font-mono`).trim()||`ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace`,fontSize:o.fontSize,lineHeight:o.lineHeight,scrollBeyondLastLine:!1,ignoreTrimWhitespace:!1,folding:!1,glyphMargin:!1,scrollbar:{verticalScrollbarSize:8,horizontalScrollbarSize:8}}},`${i}:${e}`)}function V(e,t){let n=e.replace(/\r\n?/g,`
7
- `).split(`
8
- `),r=t.replace(/\r\n?/g,`
9
- `).split(`
10
- `),i=n.length,a=r.length;if(i*a>4e6)return;let o=Array(a+1).fill(0),s=Array(a+1).fill(0);for(let e=1;e<=i;e++){let t=n[e-1];for(let e=1;e<=a;e++)s[e]=t===r[e-1]?o[e-1]+1:Math.max(o[e],s[e-1]);let i=o;o=s,s=i}let c=o[a];return{added:a-c,removed:i-c}}var it=3,at=5e7;function ot(e){let t=e.replace(/\r\n/g,`
11
- `).replace(/\r/g,`
12
- `).split(`
13
- `);return t.length>1&&t[t.length-1]===``&&t.pop(),t}function st(e,t){let n=ot(e),r=ot(t);if(n.length*r.length>at)return;let i=Array.from({length:n.length+1},()=>new Uint32Array(r.length+1));for(let e=n.length-1;e>=0;--e)for(let t=r.length-1;t>=0;--t)i[e][t]=n[e]===r[t]?i[e+1][t+1]+1:Math.max(i[e+1][t],i[e][t+1]);let a=[],o=0,s=0,c=1,l=1;for(;o<n.length||s<r.length;){if(o<n.length&&s<r.length&&n[o]===r[s]){a.push({kind:`context`,oldLine:c,newLine:l,text:n[o]}),o+=1,s+=1,c+=1,l+=1;continue}if(s<r.length&&(o>=n.length||i[o][s+1]>=i[o+1][s])){a.push({kind:`add`,newLine:l,text:r[s]}),s+=1,l+=1;continue}o<n.length&&(a.push({kind:`delete`,oldLine:c,text:n[o]}),o+=1,c+=1)}return a}function H(e){let t=e.map(e=>e.kind!==`context`);e.forEach((n,r)=>{if(n.kind===`context`)return;let i=Math.max(0,r-it),a=Math.min(e.length-1,r+it);for(let e=i;e<=a;e+=1)t[e]=!0});let n=[],r=0,i=0;for(;r<e.length;){if(t[r]||e[r].kind!==`context`){n.push(e[r]),r+=1;continue}let a=r;for(;r<e.length&&!t[r]&&e[r].kind===`context`;)r+=1;let o=e.slice(a,r);n.push({kind:`collapsed`,id:`collapsed-${i++}-${a}`,count:o.length,rows:o})}return n}function ct(e){return e===`add`?`bg-emerald-500/12 text-foreground`:e===`delete`?`bg-red-500/12 text-foreground`:`bg-background text-foreground/90`}function U(e){return e===`add`?`+`:e===`delete`?`-`:` `}function W({row:e}){let t=e.kind===`delete`?e.oldLine:e.newLine??e.oldLine;return(0,L.jsxs)(`div`,{className:O(`grid w-max min-w-full grid-cols-[3rem_auto] text-[13px] leading-6`,ct(e.kind)),children:[(0,L.jsx)(`span`,{className:O(`select-none pr-3 text-right font-mono`,e.kind===`delete`&&`text-red-600 dark:text-red-500`,e.kind===`add`&&`text-emerald-600 dark:text-emerald-500`,e.kind===`context`&&`text-muted-foreground/62`),children:t??``}),(0,L.jsxs)(`code`,{className:`whitespace-pre pr-4 font-mono`,children:[(0,L.jsx)(`span`,{className:O(`mr-3 select-none`,e.kind===`add`&&`text-emerald-600 dark:text-emerald-500`,e.kind===`delete`&&`text-red-600 dark:text-red-500`),children:U(e.kind)}),e.text||` `]})]})}function lt(e,t,n){let r=new Set(e[t]??[]);return r.has(n)?r.delete(n):r.add(n),{...e,[t]:[...r]}}function ut({diff:e,loading:t,error:r}){let[i,a]=(0,I.useState)({}),o=e?`${e.path}\u0000${e.oldContent.length}\u0000${e.newContent.length}`:``,s=(0,I.useMemo)(()=>new Set(i[o]??[]),[o,i]),c=(0,I.useMemo)(()=>{if(!e)return;let t=st(e.oldContent,e.newContent);return t?H(t):void 0},[e]);return t?(0,L.jsx)(`div`,{className:`border-t border-[color-mix(in_oklab,var(--border)_34%,transparent)] bg-background px-3 py-4 text-sm text-muted-foreground/70`,children:k(`workspaceLoadingDiff`)}):r?(0,L.jsx)(`div`,{className:`border-t border-[color-mix(in_oklab,var(--border)_34%,transparent)] bg-background px-3 py-4 text-sm text-destructive`,children:r}):e?c?c.length===0?(0,L.jsx)(`div`,{className:`border-t border-[color-mix(in_oklab,var(--border)_34%,transparent)] bg-background px-3 py-4 text-sm text-muted-foreground/70`,children:k(`workspaceNoDiffPreview`)}):(0,L.jsx)(`div`,{className:`min-w-0 max-w-full overflow-hidden rounded-b-xl border-t border-[color-mix(in_oklab,var(--border)_34%,transparent)] bg-background`,children:(0,L.jsx)(`div`,{className:`max-h-[28rem] min-w-0 overflow-auto pb-1`,children:(0,L.jsx)(`div`,{className:`w-max min-w-full py-2`,children:c.map(e=>{if(e.kind!==`collapsed`)return(0,L.jsx)(W,{row:e},`${e.kind}:${e.oldLine??``}:${e.newLine??``}:${e.text}`);let t=s.has(e.id);return(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`div`,{className:`grid w-full min-w-0 grid-cols-[3rem_minmax(0,1fr)] gap-1 py-1 pr-4`,children:[(0,L.jsx)(`button`,{type:`button`,className:`flex h-12 items-center justify-center rounded-lg bg-muted/60 text-muted-foreground/75 transition-colors hover:bg-muted/78 hover:text-foreground/80`,onClick:()=>{a(t=>lt(t,o,e.id))},"aria-expanded":t,title:k(`workspaceUnmodifiedLines`,{count:e.count}),children:(0,L.jsx)(n,{className:O(`size-4 transition-transform`,t&&`rotate-180`)})}),(0,L.jsx)(`button`,{type:`button`,className:`flex h-12 items-center rounded-lg bg-muted/60 px-4 text-left text-base font-medium text-muted-foreground/80 transition-colors hover:bg-muted/78 hover:text-foreground/80`,onClick:()=>{a(t=>lt(t,o,e.id))},"aria-expanded":t,children:k(`workspaceUnmodifiedLines`,{count:e.count})})]}),t?e.rows.map(t=>(0,L.jsx)(W,{row:t},`hidden:${e.id}:${t.oldLine}:${t.newLine}`)):null]},e.id)})})})}):(0,L.jsx)(`div`,{className:`border-t border-[color-mix(in_oklab,var(--border)_34%,transparent)] bg-background px-3 py-4 text-sm text-muted-foreground/70`,children:k(`workspaceDiffTooLarge`)}):(0,L.jsx)(`div`,{className:`border-t border-[color-mix(in_oklab,var(--border)_34%,transparent)] bg-background px-3 py-4 text-sm text-muted-foreground/70`,children:k(`workspaceNoDiffPreview`)})}var dt={ts:`typescript`,tsx:`typescript`,js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,json:`json`,jsonc:`json`,css:`css`,scss:`scss`,less:`less`,html:`html`,htm:`html`,md:`markdown`,markdown:`markdown`,py:`python`,rb:`ruby`,go:`go`,rs:`rust`,java:`java`,c:`c`,h:`c`,cpp:`cpp`,cc:`cpp`,cxx:`cpp`,hpp:`cpp`,cs:`csharp`,php:`php`,swift:`swift`,kt:`kotlin`,kts:`kotlin`,sh:`shell`,bash:`shell`,zsh:`shell`,ps1:`powershell`,yml:`yaml`,yaml:`yaml`,xml:`xml`,sql:`sql`,dockerfile:`dockerfile`,toml:`toml`,ini:`ini`,env:`ini`};function ft(e){let t=e.split(`/`).pop()?.toLowerCase()??``;return t===`dockerfile`||t.endsWith(`.dockerfile`)?`dockerfile`:dt[t.includes(`.`)?t.split(`.`).pop()??``:t]??`plaintext`}function pt(e){return e.slice(e.lastIndexOf(`/`)+1)}function G(e){let t=e.lastIndexOf(`.`);return t>0?e.slice(t+1):``}var mt={typescript:{Icon:T,className:`text-sky-500 dark:text-sky-400`},javascript:{Icon:T,className:`text-amber-500 dark:text-amber-400`},python:{Icon:T,className:`text-blue-600 dark:text-blue-400`},go:{Icon:T,className:`text-cyan-600 dark:text-cyan-400`},rust:{Icon:T,className:`text-orange-600 dark:text-orange-400`},java:{Icon:T,className:`text-red-500 dark:text-red-400`},c:{Icon:T,className:`text-blue-500 dark:text-blue-400`},cpp:{Icon:T,className:`text-indigo-500 dark:text-indigo-400`},csharp:{Icon:T,className:`text-violet-500 dark:text-violet-400`},php:{Icon:T,className:`text-indigo-500 dark:text-indigo-400`},ruby:{Icon:T,className:`text-rose-500 dark:text-rose-400`},swift:{Icon:T,className:`text-orange-500 dark:text-orange-400`},kotlin:{Icon:T,className:`text-violet-500 dark:text-violet-400`},shell:{Icon:T,className:`text-green-600 dark:text-green-400`},powershell:{Icon:T,className:`text-blue-600 dark:text-blue-400`},json:{Icon:D,className:`text-amber-600 dark:text-amber-400`},css:{Icon:h,className:`text-sky-500 dark:text-sky-400`},scss:{Icon:h,className:`text-pink-500 dark:text-pink-400`},less:{Icon:h,className:`text-sky-500 dark:text-sky-400`},html:{Icon:de,className:`text-orange-500 dark:text-orange-400`},markdown:{Icon:ne,className:`text-slate-500 dark:text-slate-400`},yaml:{Icon:x,className:`text-slate-500 dark:text-slate-400`},toml:{Icon:x,className:`text-slate-500 dark:text-slate-400`},ini:{Icon:x,className:`text-slate-500 dark:text-slate-400`},xml:{Icon:T,className:`text-slate-500 dark:text-slate-400`},sql:{Icon:se,className:`text-indigo-500 dark:text-indigo-400`},dockerfile:{Icon:ie,className:`text-sky-600 dark:text-sky-400`},plaintext:{Icon:ne,className:`text-slate-500 dark:text-slate-400`}},K=new Set([`png`,`jpg`,`jpeg`,`gif`,`svg`,`ico`,`webp`,`bmp`,`avif`]),q=new Set([`zip`,`tar`,`gz`,`tgz`,`rar`,`7z`,`bz2`,`xz`]),J=new Set([`csv`,`tsv`,`xls`,`xlsx`]);function ht(e){if(e===`readme`||e.startsWith(`readme.`))return{Icon:o,className:`text-sky-500 dark:text-sky-400`};if(e===`license`||e.startsWith(`license.`)||e===`licence`||e.startsWith(`licence.`)||e===`copying`||e.startsWith(`copying.`))return{Icon:he,className:`text-slate-500 dark:text-slate-400`};if(e===`makefile`||e.startsWith(`makefile.`))return{Icon:ue,className:`text-slate-500 dark:text-slate-400`};if(e.startsWith(`docker-compose`))return{Icon:ie,className:`text-sky-600 dark:text-sky-400`};if(e===`.gitignore`||e===`.gitattributes`||e===`.gitmodules`)return{Icon:he,className:`text-orange-500 dark:text-orange-400`};if(e===`.env`||e.startsWith(`.env.`))return{Icon:x,className:`text-slate-500 dark:text-slate-400`};if(e.endsWith(`.lock`)||e.endsWith(`-lock.json`)||e.endsWith(`-lock.yaml`))return{Icon:le,className:`text-slate-500 dark:text-slate-400`}}function gt(e){let n=pt(e).toLowerCase(),r=ht(n);if(r)return r;let i=G(n);return K.has(i)?{Icon:fe,className:`text-purple-500 dark:text-purple-400`}:q.has(i)?{Icon:C,className:`text-slate-500 dark:text-slate-400`}:J.has(i)?{Icon:pe,className:`text-green-600 dark:text-green-400`}:mt[ft(e)]||{Icon:t,className:`text-slate-500 dark:text-slate-400`}}function Y(e,t){let n=e.toLowerCase();return n===`.git`||n===`.svn`||n===`.hg`?{Icon:f,className:`text-orange-500 dark:text-orange-400`}:{Icon:t?ee:v,className:`text-slate-500 dark:text-slate-400`}}function _t({path:e,className:t=`size-3.5`}){let{Icon:n,className:r}=gt(e);return(0,L.jsx)(n,{className:`${r} ${t}`})}function vt({name:e,open:t,className:n=`size-3.5`}){let{Icon:r,className:i}=Y(e,t);return(0,L.jsx)(r,{className:`${i} ${n}`})}function yt(e){return k(e===`added`?`workspaceStatusAdded`:e===`deleted`?`workspaceStatusDeleted`:e===`renamed`?`workspaceStatusRenamed`:e===`untracked`?`workspaceStatusUntracked`:e===`conflicted`?`workspaceStatusConflict`:`workspaceStatusModified`)}function bt(e){let t=e.replace(/\\/g,`/`);return t.split(`/`).filter(Boolean).pop()||t||`—`}function X(e,t,n){return e?.action===t&&(n?e.path===n:!e.path)}function xt(e){return!!(e.unstaged||e.status===`untracked`||e.conflict||!e.staged)}function St({files:e,selectedPath:t,expandedDiff:n,expandedLoading:a,expandedError:o,onSelectFile:s,onRestoreFile:l,onStageFile:u,onUnstageFile:d,onOpenFile:f,onRestoreAll:p,onStageAll:m,onUnstageAll:h,showUnstageAll:g=!1,pendingAction:_,emptyMessage:v=k(`workspaceNoWorkingTreeChanges`)}){let ee=e.filter(xt),y=e.filter(e=>e.staged),b=X(_,`restore`),x=X(_,`stage`),S=X(_,`unstage`),C=!!_;return(0,L.jsxs)(`div`,{className:`relative flex min-h-0 min-w-0 flex-1 flex-col bg-background`,children:[(0,L.jsx)(`div`,{className:`min-h-0 min-w-0 flex-1 overflow-auto px-2 pb-20 pt-1`,children:e.length===0?(0,L.jsx)(`div`,{className:`px-3 py-4 text-xs text-muted-foreground/70`,children:v}):(0,L.jsx)(`div`,{className:`min-w-0 divide-y divide-[color-mix(in_oklab,var(--border)_28%,transparent)]`,children:e.map(e=>{let p=t===e.path,m=bt(e.path),h=X(_,`restore`,e.path),v=X(_,`stage`,e.path),ee=X(_,`unstage`,e.path),y=e.status===`deleted`,b=g,x=C||(b?!d||!e.staged:!u||!xt(e)),S=C||!l,ne=C||!f||y,re=e.oldPath?`${e.oldPath} → ${e.path}`:e.path;return(0,L.jsxs)(`div`,{className:O(`group min-w-0 overflow-hidden`,p&&`rounded-xl bg-muted/30`),children:[(0,L.jsxs)(`div`,{className:O(`grid min-h-[40px] grid-cols-[minmax(0,1fr)_auto] items-center gap-2 rounded-xl transition-colors`,p?`bg-muted/40`:`hover:bg-muted/24`),children:[(0,L.jsxs)(`button`,{type:`button`,className:`grid min-w-0 grid-cols-[24px_minmax(0,1fr)_auto] items-center gap-3 px-3 py-2 text-left text-sm focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring`,onClick:()=>s(e.path),title:`${yt(e.status)} · ${re}`,"aria-expanded":p,children:[(0,L.jsx)(_t,{path:e.path,className:`size-[15px] shrink-0`}),(0,L.jsx)(`span`,{className:`min-w-0 truncate font-medium leading-[18px] text-foreground/90`,children:m}),typeof e.additions==`number`&&typeof e.deletions==`number`?(0,L.jsxs)(`span`,{className:`min-w-[64px] shrink-0 whitespace-nowrap text-right font-mono text-sm font-medium leading-[18px]`,children:[(0,L.jsxs)(`span`,{className:`text-emerald-600 dark:text-emerald-500`,children:[`+`,e.additions]}),(0,L.jsxs)(`span`,{className:`ml-1.5 text-red-600 dark:text-red-500`,children:[`-`,e.deletions]})]}):(0,L.jsx)(`span`,{className:`min-w-[64px]`})]}),(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1 pr-2 text-muted-foreground/55 opacity-80 transition-opacity group-hover:opacity-100`,children:[(0,L.jsx)(`button`,{type:`button`,className:`inline-flex size-[26px] items-center justify-center rounded-full transition-colors hover:bg-destructive/10 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-40`,onClick:()=>l?.(e),disabled:S,"aria-label":k(`workspaceRestoreFile`),title:k(`workspaceRestoreFile`),children:h?(0,L.jsx)(r,{className:`size-3.5 animate-spin`}):(0,L.jsx)(te,{className:`size-4`})}),(0,L.jsx)(`button`,{type:`button`,className:O(`inline-flex size-[26px] items-center justify-center rounded-full transition-colors disabled:cursor-not-allowed disabled:opacity-40`,b?`hover:bg-amber-500/10 hover:text-amber-600 dark:hover:text-amber-500`:`hover:bg-emerald-500/10 hover:text-emerald-600 dark:hover:text-emerald-500`),onClick:()=>b?d?.(e):u?.(e),disabled:x,"aria-label":k(b?`workspaceUnstageFile`:`workspaceStageFile`),title:k(b?`workspaceUnstageFile`:`workspaceStageFile`),children:v||ee?(0,L.jsx)(r,{className:`size-3.5 animate-spin`}):b?(0,L.jsx)(c,{className:`size-4`}):(0,L.jsx)(i,{className:`size-4`})}),(0,L.jsx)(`button`,{type:`button`,className:`inline-flex size-[26px] items-center justify-center rounded-full transition-colors hover:bg-muted/35 hover:text-foreground/85 disabled:cursor-not-allowed disabled:opacity-40`,onClick:()=>f?.(e),disabled:ne,"aria-label":k(`workspaceOpenFileInNewTab`),title:k(y?`workspaceCannotOpenDeletedFile`:`workspaceOpenFileInNewTab`),children:(0,L.jsx)(me,{className:`size-4`})})]})]}),p?(0,L.jsx)(ut,{diff:n,loading:a,error:o}):null]},`${e.status}:${e.oldPath??``}:${e.path}`)})})}),(0,L.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-4 z-20 flex justify-center px-2`,children:(0,L.jsxs)(`div`,{className:`pointer-events-auto inline-flex max-w-full items-center gap-1 rounded-full border border-[color-mix(in_oklab,var(--border)_34%,transparent)] bg-background/95 p-1 shadow-quickforge`,children:[(0,L.jsxs)(`button`,{type:`button`,className:`inline-flex h-8 min-w-0 items-center gap-2 rounded-full px-3 text-sm font-medium text-muted-foreground/78 transition-colors hover:bg-destructive/10 hover:text-destructive disabled:cursor-not-allowed disabled:opacity-40`,onClick:p,disabled:!p||e.length===0||C,"aria-label":k(`workspaceRestoreAll`),title:k(`workspaceRestoreAll`),children:[b?(0,L.jsx)(r,{className:`size-3.5 animate-spin`}):(0,L.jsx)(te,{className:`size-3.5`}),(0,L.jsx)(`span`,{className:`truncate`,children:k(`workspaceRestoreAll`)})]}),(0,L.jsxs)(`button`,{type:`button`,className:O(`inline-flex h-8 min-w-0 items-center gap-2 rounded-full px-3 text-sm font-medium text-muted-foreground/78 transition-colors disabled:cursor-not-allowed disabled:opacity-40`,g?`hover:bg-amber-500/10 hover:text-amber-600 dark:hover:text-amber-500`:`hover:bg-emerald-500/10 hover:text-emerald-600 dark:hover:text-emerald-500`),onClick:g?h:m,disabled:g?!h||y.length===0||C:!m||ee.length===0||C,"aria-label":k(g?`workspaceUnstageAll`:`workspaceStageAll`),title:k(g?`workspaceUnstageAll`:`workspaceStageAll`),children:[x||S?(0,L.jsx)(r,{className:`size-3.5 animate-spin`}):g?(0,L.jsx)(c,{className:`size-3.5`}):(0,L.jsx)(i,{className:`size-3.5`}),(0,L.jsx)(`span`,{className:`truncate`,children:k(g?`workspaceUnstageAll`:`workspaceStageAll`)})]})]})})]})}function Ct(e){return e?e.status===`added`?`A`:e.status===`deleted`?`D`:e.status===`renamed`?`R`:e.status===`untracked`?`U`:`M`:``}function wt({projectId:e,path:t}){let[n,r]=(0,I.useState)(!1);return n?(0,L.jsx)(_t,{path:t,className:`size-3.5 shrink-0`}):(0,L.jsx)(`img`,{src:Me(e,t),alt:``,"aria-hidden":!0,loading:`lazy`,decoding:`async`,onError:()=>r(!0),className:`size-3.5 shrink-0 rounded-[3px] object-cover ring-1 ring-black/5 dark:ring-white/10`})}function Tt({node:e,depth:t,selectedPath:n,gitStatuses:r,onSelectFile:i,onPreviewFile:a,projectId:o}){let[s,c]=(0,I.useState)(t<1),l=e.type===`directory`,d=n===e.path,f=Ct(r[e.path]),p=(l?void 0:A(e.path))===`image`,m=!!o&&p,h=!!a&&(p||Oe(e.path));function g(){a?.(e.path)}return(0,L.jsxs)(`div`,{children:[(0,L.jsxs)(`button`,{type:`button`,className:`group flex h-7 w-full items-center gap-1.5 rounded-md px-2 text-left text-xs transition-colors ${d?`bg-muted/28 text-foreground/90`:`text-muted-foreground/72 hover:bg-muted/20 hover:text-foreground/85`}`,style:{paddingLeft:`${.5+t*.75}rem`},onClick:()=>{l?c(e=>!e):p&&a?g():i(e.path)},title:e.path,children:[l?(0,L.jsx)(u,{className:`size-3 shrink-0 transition-transform ${s?`rotate-90`:``}`}):(0,L.jsx)(`span`,{className:`w-3 shrink-0`}),l?(0,L.jsx)(vt,{name:e.name,open:s,className:`size-3.5 shrink-0`}):m?(0,L.jsx)(wt,{projectId:o,path:e.path}):(0,L.jsx)(_t,{path:e.path,className:`size-3.5 shrink-0`}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.name}),f?(0,L.jsx)(`span`,{className:`shrink-0 font-mono text-[0.68rem] text-emerald-600 dark:text-emerald-500`,children:f}):null,h?(0,L.jsx)(`span`,{role:`button`,tabIndex:0,"aria-label":k(`openPreview`),title:k(`openPreview`),className:`-mr-1 shrink-0 rounded p-0.5 text-muted-foreground/60 opacity-0 transition-opacity hover:bg-muted/40 hover:text-foreground/85 focus-visible:opacity-100 focus-visible:text-foreground/85 focus-visible:outline-none group-hover:opacity-100`,onClick:e=>{e.stopPropagation(),g()},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),g())},children:(0,L.jsx)(w,{className:`size-3.5`})}):null]}),l&&s?(0,L.jsx)(`div`,{children:(e.children??[]).map(e=>(0,L.jsx)(Tt,{node:e,depth:t+1,selectedPath:n,gitStatuses:r,onSelectFile:i,onPreviewFile:a,projectId:o},e.path))}):null]})}function Et({tree:e,selectedPath:t,gitStatuses:n={},onSelectFile:r,onPreviewFile:i,projectId:a}){return e.length===0?(0,L.jsx)(`div`,{className:`px-2 py-3 text-xs text-muted-foreground/70`,children:k(`workspaceNoFilesToDisplay`)}):(0,L.jsx)(`div`,{className:`space-y-0.5`,children:e.map(e=>(0,L.jsx)(Tt,{node:e,depth:0,selectedPath:t,gitStatuses:n,onSelectFile:r,onPreviewFile:i,projectId:a},e.path))})}function Dt(e,t,n){return!!(e&&t&&e.projectId===t&&e.id!==n)}var Z=`quickforge:workspace-inspector-tabs:v1:`;function Ot(e){return`${Z}${e}`}function kt(e,t){return e===`browser`?`browser`:`${e}:${t}`}function At(e){return e===`files`||e===`review`||e===`terminal`||e===`browser`||e===`reader`}function jt(){try{return globalThis.localStorage}catch{return}}function Mt(e){if(!Array.isArray(e))return[];let t=new Set,n=[];for(let r of e){if(!r||typeof r!=`object`||Array.isArray(r))continue;let e=r;if(!(typeof e.id!=`string`||!e.id||!At(e.kind))){if(e.kind===`review`){if(t.has(e.kind))continue;t.add(e.kind)}if(e.kind===`reader`){let t=e.reader;if(!t||t.mode!==`file`||typeof t.path!=`string`||!t.path)continue;let r=kt(t.mode,t.path);n.push({id:e.id,kind:e.kind,readerTabs:[{id:r,mode:t.mode,path:t.path,loading:!0}],activeReaderTabId:r});continue}n.push({id:e.id,kind:e.kind,...e.kind===`browser`&&typeof e.url==`string`?{url:e.url}:{},...e.kind===`review`?{reviewView:e.reviewView===`review`?`review`:`changes`}:{},...e.kind===`terminal`&&typeof e.terminalSessionId==`string`?{terminalSessionId:e.terminalSessionId}:{},...e.kind===`files`||e.kind===`review`?{readerTabs:[],activeReaderTabId:void 0}:{}})}}return n}function Nt(e,t=jt()){if(!t)return{tabs:[]};try{let n=t.getItem(Ot(e));if(!n)return{tabs:[]};let r=JSON.parse(n),i=Mt(r?.tabs),a=typeof r?.activePanelTabId==`string`&&i.some(e=>e.id===r.activePanelTabId)?r.activePanelTabId:i[0]?.id;return a?{tabs:i,activePanelTabId:a}:{tabs:i}}catch{return{tabs:[]}}}function Pt(e,t){let n=e.flatMap(e=>{if(e.kind===`reader`){let t=e.readerTabs?.find(t=>t.id===e.activeReaderTabId)??e.readerTabs?.[0];return!t||t.mode!==`file`?[]:[{id:e.id,kind:e.kind,reader:{mode:t.mode,path:t.path}}]}return[{id:e.id,kind:e.kind,...e.kind===`browser`?{url:e.url||``}:{},...e.kind===`review`?{reviewView:e.reviewView||`changes`}:{},...e.kind===`terminal`&&e.terminalSessionId?{terminalSessionId:e.terminalSessionId}:{}}]});return{tabs:n,activePanelTabId:t&&n.some(e=>e.id===t)?t:n[0]?.id}}function Ft(e,t,n,r=jt()){if(!r)return!1;try{return r.setItem(Ot(e),JSON.stringify(Pt(t,n))),!0}catch{return!1}}function It(e){return e.reduce((e,t)=>{let n=t.id.match(/-(\d+)$/);if(!n)return e;let r=Number(n[1]);return Number.isFinite(r)?Math.max(e,r):e},0)+1}function Lt(){let e,t=0;return{token:n=>(n!==e&&(e=n,t+=1),{projectId:n,epoch:t}),isCurrent:n=>n.projectId===e&&n.epoch===t,invalidate:()=>(t+=1,t)}}function Rt(){if(typeof window>`u`)return 0;let e=window.getComputedStyle(document.body).getPropertyValue(`--quickforge-desktop-titlebar-height`).trim();if(!e)return 0;let t=Number.parseFloat(e);return Number.isFinite(t)?t:0}function zt(e,t){return e===`browser`?`browser`:`${e}:${t}`}var Bt=[{kind:`files`,label:k(`rightPanelFiles`),description:k(`rightPanelFilesDesc`),icon:v},{kind:`review`,label:k(`rightPanelReview`),description:k(`rightPanelReviewDesc`),icon:E},{kind:`terminal`,label:k(`rightPanelTerminal`),description:k(`rightPanelTerminalDesc`),icon:S},{kind:`browser`,label:k(`rightPanelBrowser`),description:k(`rightPanelBrowserDesc`),icon:_}],Vt=[{value:`unstaged`,label:k(`workspaceReviewFilterUnstaged`)},{value:`staged`,label:k(`workspaceReviewFilterStaged`)},{value:`all`,label:k(`workspaceReviewFilterAllBranches`)},{value:`last`,label:k(`workspaceReviewFilterLastRun`)}],Ht=Object.fromEntries(Bt.map(e=>[e.kind,e]));function Ut(e){return e===`review`?`changes`:e}function Wt(e){let t=e.trim();if(!t)return`about:blank`;if(/^[a-zA-Z]:[\\/]/.test(t))return M(t);try{let e=new URL(t);return e.protocol===`about:`?t:e.protocol===`file:`?M(decodeURIComponent(e.pathname)):e.host||t}catch{return M(t)}}function Gt(e,t){if(e.kind===`terminal`)return t||k(`rightPanelTerminal`);if(e.kind===`browser`)return Wt(e.url||``);if(e.kind===`reader`){let t=e.readerTabs?.find(t=>t.id===e.activeReaderTabId)??e.readerTabs?.[0];return t?M(t.path):k(`rightPanelFiles`)}return Ht[e.kind].label}function Kt(e,t){return e.kind===`browser`?e.url||t:e.kind===`reader`&&(e.readerTabs?.find(t=>t.id===e.activeReaderTabId)??e.readerTabs?.[0])?.path||t}var qt=340,Q=380,Jt=640,Yt=`quickforge_workspaceInspectorWidth_v2`,Xt=140,Zt=200,Qt=400;function $t(){if(typeof window>`u`)return Q;try{let e=window.localStorage.getItem(Yt);if(!e)return Q;let t=Number(e);return Number.isFinite(t)?Math.min(Jt,Math.max(qt,t)):Q}catch{return Q}}function en(e,t){let n=t.trim().toLowerCase();return n?e.flatMap(e=>{let t=e.children?en(e.children,n):void 0;return!(e.name.toLowerCase().includes(n)||e.path.toLowerCase().includes(n))&&(!t||t.length===0)?[]:[{...e,...t?{children:t}:{}}]}):e}function tn(e,t){let n=e?.trim();if(!n)return``;let r=n.replace(/\\/g,`/`).replace(/^\.\/+/g,``),i=t?.trim().replace(/\\/g,`/`).replace(/\/+$/g,``);return i&&r.startsWith(`${i}/`)&&(r=r.slice(i.length+1)),r.replace(/^\/+/,``)}function nn(e,t){let n=new Set;for(let r of e){let e=tn(r.path,t),i=tn(r.outputFile,t);e&&n.add(e),i&&n.add(i)}return n}function rn(e){return k(e===`staged`?`workspaceNoStagedChanges`:e===`last`?`workspaceNoLastRunChanges`:`workspaceNoWorkingTreeChanges`)}function an(e){return e?e.language===`markdown`||/\.(md|markdown)$/i.test(e.path):!1}function on(e,t=!1){return k(t?`readerFileMarkdownPrompt`:`readerFilePrompt`,{path:e})}function sn(e){return k(`readerDiffPrompt`,{path:e})}function $(e){return`Diff for ${e.oldPath?`${e.oldPath} -> ${e.path}`:e.path}\n\n--- OLD\n${e.oldContent}\n\n--- NEW\n${e.newContent}`}function cn({mode:e,file:t,diff:n,loading:r,error:i,onClose:a,onDraftRequest:o}){let[s,c]=(0,I.useState)(),[l,u]=(0,I.useState)(`preview`);async function f(e,t){t&&(await navigator.clipboard.writeText(t),c(e),window.setTimeout(()=>c(void 0),1200))}let p=e===`file`?t?.path:n?.path,m=e===`file`&&an(t),h=e===`file`?t?.content:n?$(n):void 0,g=e===`file`&&t?on(t.path,m):e===`diff`&&n?sn(n.path):void 0,_=(0,I.useMemo)(()=>e===`diff`&&n?V(n.oldContent,n.newContent):void 0,[e,n]);return(0,L.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col`,children:[(0,L.jsxs)(`div`,{className:`flex h-11 shrink-0 items-center gap-2 border-b border-border px-3`,children:[m?(0,L.jsx)(`div`,{className:`inline-flex rounded-full bg-muted/25 p-1 text-xs`,children:[`preview`,`source`].map(e=>(0,L.jsx)(`button`,{type:`button`,className:e===l?`rounded-full bg-background px-3 py-1 font-medium text-foreground/90 shadow-[0_8px_20px_-16px_rgb(15_23_42_/_0.42)]`:`rounded-full px-3 py-1 text-muted-foreground/70 hover:text-foreground/85`,onClick:()=>u(e),children:k(e===`preview`?`markdownPreview`:`markdownSource`)},e))}):null,_?(0,L.jsxs)(`span`,{className:`shrink-0 font-mono text-[11px] font-medium`,children:[(0,L.jsxs)(`span`,{className:`text-emerald-600 dark:text-emerald-400`,children:[`+`,_.added]}),(0,L.jsxs)(`span`,{className:`ml-1.5 text-red-600 dark:text-red-400`,children:[`-`,_.removed]})]}):null,(0,L.jsx)(`div`,{className:`flex-1`}),(0,L.jsx)(N,{variant:`ghost`,size:`icon`,className:`size-7`,onClick:()=>void f(`path`,p),disabled:!p,"aria-label":k(`copyPath`),title:k(`copyPath`),children:s===`path`?(0,L.jsx)(oe,{className:`size-3.5`}):(0,L.jsx)(ae,{className:`size-3.5`})}),(0,L.jsx)(N,{variant:`ghost`,size:`icon`,className:`size-7`,onClick:()=>void f(`content`,h),disabled:!h,"aria-label":k(`copyContent`),title:k(e===`file`?`copyContent`:`copyDiffContent`),children:s===`content`?(0,L.jsx)(oe,{className:`size-3.5`}):(0,L.jsx)(ae,{className:`size-3.5`})}),(0,L.jsx)(N,{variant:`ghost`,size:`icon`,className:`size-7`,onClick:()=>g&&o?.(g),disabled:!g||!o,"aria-label":k(`askAiAboutThis`),title:k(`askAiAboutThis`),children:(0,L.jsx)(d,{className:`size-3.5`})}),(0,L.jsx)(N,{variant:`ghost`,size:`icon`,className:`size-7`,onClick:a,"aria-label":k(`close`),title:k(`close`),children:(0,L.jsx)(ce,{className:`size-3.5`})})]}),(0,L.jsxs)(`div`,{className:`min-h-0 flex-1 bg-background`,children:[r?(0,L.jsx)(`div`,{className:`p-4 text-sm text-muted-foreground/70`,children:k(`openingReader`)}):null,!r&&i?(0,L.jsx)(`div`,{className:`p-4 text-sm text-destructive`,children:i}):null,!r&&!i&&e===`file`&&t?m?(0,L.jsx)(nt,{path:t.path,content:t.content,language:t.language,mode:l},t.path):(0,L.jsx)(Ye,{path:t.path,content:t.content,language:t.language}):null,!r&&!i&&e===`diff`&&n?(0,L.jsx)(rt,{path:n.path,oldContent:n.oldContent,newContent:n.newContent,language:n.language,status:n.status}):null]})]})}function ln({project:e,artifacts:t,changesCount:r,changedPaths:i,isGitRepository:a,gitBranch:o,onSelectFile:s,onSelectDiff:c,onPreviewFile:l}){let[u,d]=(0,I.useState)(!1),[f,p]=(0,I.useState)(()=>new Set),m=Se(t),h=t.filter(e=>e.command);function g(e){p(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})}return(0,L.jsxs)(`div`,{className:`space-y-3 p-2`,children:[(0,L.jsxs)(`div`,{className:`rounded-lg border border-border bg-background px-3 py-3`,children:[(0,L.jsxs)(`div`,{className:`flex items-center gap-2 text-xs font-semibold text-foreground/90`,children:[(0,L.jsx)(b,{className:`size-3.5 text-emerald-600 dark:text-emerald-500`}),k(`workspaceCurrentArtifacts`)]}),t.length===0?(0,L.jsx)(`div`,{className:`mt-2 text-xs leading-5 text-muted-foreground/70`,children:k(`workspaceNoArtifacts`)}):(0,L.jsxs)(`div`,{className:`mt-3 space-y-3`,children:[m.length?(0,L.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,L.jsxs)(`div`,{className:`text-[11px] font-medium uppercase tracking-wide text-muted-foreground/60`,children:[k(`workspaceFiles`),` `,m.length]}),m.slice(0,8).map(e=>{let t=e.path,n=j(t),r=i.has(t),a=typeof e.addedLines==`number`||typeof e.removedLines==`number`;return(0,L.jsxs)(`div`,{className:`group flex min-w-0 items-center gap-2 rounded-md px-2 py-1.5 text-xs text-foreground/85 transition-colors hover:bg-muted/20`,children:[(0,L.jsx)(`button`,{type:`button`,className:`min-w-0 flex-1 truncate text-left font-medium`,onClick:()=>n?l(t):r?c(t):s(t),title:t,children:e.title||M(t)}),a?(0,L.jsxs)(`span`,{className:`shrink-0 font-mono text-[10px] font-medium`,children:[(0,L.jsxs)(`span`,{className:`text-emerald-600 dark:text-emerald-400`,children:[`+`,e.addedLines??0]}),(0,L.jsxs)(`span`,{className:`ml-1 text-red-600 dark:text-red-400`,children:[`-`,e.removedLines??0]})]}):null,(0,L.jsx)(`span`,{className:`shrink-0 rounded-full bg-muted/30 px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground/70`,children:e.kind}),n?(0,L.jsx)(`button`,{type:`button`,className:`shrink-0 inline-flex size-5 items-center justify-center text-blue-600 opacity-0 transition-opacity hover:bg-blue-500/10 hover:text-blue-700 group-hover:opacity-100 dark:text-blue-400`,onClick:()=>l(t),"aria-label":k(`previewArtifact`),title:k(`previewArtifact`),children:(0,L.jsx)(w,{className:`size-3.5`})}):null,(0,L.jsx)(`button`,{type:`button`,className:`shrink-0 rounded-md px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground/70 opacity-0 transition-opacity hover:bg-muted/25 group-hover:opacity-100`,onClick:()=>r?c(t):s(t),children:k(r?`workspaceViewDiff`:`artifactPreviewViewSource`)})]},e.id)}),m.length>8?(0,L.jsxs)(`div`,{className:`px-2 text-[11px] text-muted-foreground/60`,children:[`+`,m.length-8]}):null]}):null,h.length?(0,L.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,L.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 rounded-md px-1 py-1 text-left text-[11px] font-medium uppercase tracking-wide text-muted-foreground/60 transition-colors hover:bg-muted/15 hover:text-foreground/75`,onClick:()=>d(e=>!e),"aria-expanded":u,children:[(0,L.jsx)(n,{className:O(`size-3.5 transition-transform`,u?``:`-rotate-90`)}),(0,L.jsxs)(`span`,{className:`min-w-0 flex-1 truncate`,children:[k(`workspaceCommands`),` `,h.length]})]}),u?(0,L.jsx)(`div`,{className:`space-y-1`,children:h.map((e,t)=>{let r=f.has(e.id);return(0,L.jsxs)(`div`,{className:`rounded-md bg-muted/15 text-[11px] text-muted-foreground/80`,children:[(0,L.jsxs)(`button`,{type:`button`,className:`flex w-full items-center gap-2 px-2 py-1.5 text-left transition-colors hover:bg-muted/20`,onClick:()=>g(e.id),"aria-expanded":r,children:[(0,L.jsx)(n,{className:O(`size-3 shrink-0 transition-transform`,r?``:`-rotate-90`)}),(0,L.jsxs)(`span`,{className:`shrink-0 font-medium text-muted-foreground/65`,children:[`#`,t+1]}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate font-mono`,children:e.command})]}),r?(0,L.jsxs)(`div`,{className:`space-y-1 px-2 pb-2 pt-1.5`,children:[(0,L.jsx)(`pre`,{className:`whitespace-pre-wrap break-words font-mono text-[11px] leading-5 text-foreground/80`,children:e.command}),e.outputFile?(0,L.jsxs)(`div`,{className:`text-[10px] text-muted-foreground/65`,children:[k(`workspaceCommandOutput`),`: `,(0,L.jsx)(`span`,{className:`font-mono`,children:e.outputFile})]}):null]}):null]},e.id)})}):null]}):null]})]}),(0,L.jsxs)(`div`,{className:`rounded-lg border border-border bg-muted/10 px-3 py-3`,children:[(0,L.jsx)(`div`,{className:`text-xs font-medium text-foreground/85`,children:e?.name??k(`noProjectSelected`)}),(0,L.jsx)(`div`,{className:`mt-1 text-[11px] text-muted-foreground/65`,children:a?`${k(`workspaceCurrentBranch`)}: ${o||k(`unknown`)} · ${r} ${k(`workspaceChangeCount`)}`:k(`workspaceNotGitRepository`)})]})]})}function un({project:e,open:t,onOpenChange:r,onOpenCommitPush:o,onOpenProjectInExplorer:c,onOpenProjectInVSCode:u,onOpenProjectInIDEA:d,onPreviewArtifact:f,onDraftRequest:m,request:h,onRequestHandled:g,artifacts:_=[],pendingTerminalCommand:v,onPendingTerminalCommandHandled:ee}){let[x,te]=(0,I.useState)([]),[S,C]=(0,I.useState)([]),[ne,re]=(0,I.useState)(),[ie,ae]=(0,I.useState)(!1),[w,se]=(0,I.useState)(!1),[le,ue]=(0,I.useState)(),[T,de]=(0,I.useState)(``),[E,fe]=(0,I.useState)(`unstaged`),[D,pe]=(0,I.useState)(),[me,he]=(0,I.useState)(),[_e,ye]=(0,I.useState)(!1),[Se,Oe]=(0,I.useState)(),ke=(0,I.useRef)(void 0);ke.current||=e?.id?Nt(e.id):{tabs:[]};let[A,Me]=(0,I.useState)(()=>ke.current?.tabs??[]),[j,M]=(0,I.useState)(()=>ke.current?.activePanelTabId),[Le,Re]=(0,I.useState)(!1),[P,Be]=(0,I.useState)(!1),[F,Ve]=(0,I.useState)(!1),[He,Ue]=(0,I.useState)(),[We,Ge]=(0,I.useState)(Zt),[qe,Je]=(0,I.useState)(!1),[Ye,Xe]=(0,I.useState)(t),[R,Ze]=(0,I.useState)(!1),[z,Qe]=(0,I.useState)($t),[$e,et]=(0,I.useState)(!1),[B,tt]=(0,I.useState)(!1),[nt,rt]=(0,I.useState)(!1),V=(0,I.useRef)(null),it=(0,I.useRef)(null),at=(0,I.useRef)(null),ot=(0,I.useRef)(null),st=(0,I.useRef)(null),H=(0,I.useRef)(null),ct=(0,I.useRef)(null),U=(0,I.useRef)(null),W=(0,I.useRef)(null),lt=(0,I.useRef)(null),ut=(0,I.useRef)(It(ke.current?.tabs??[])),dt=(0,I.useRef)(void 0),ft=(0,I.useRef)(void 0),pt=(0,I.useRef)(void 0),G=(0,I.useRef)(Lt()),mt=(0,I.useRef)(new Set),K=(0,I.useRef)(0);(0,I.useEffect)(()=>{let e=G.current;return()=>{e.invalidate()}},[]);let q=e?.id;q&&G.current.token(q);let J=(0,I.useMemo)(()=>A.find(e=>e.id===j),[j,A]),ht=J?.activeReaderTabId,gt=(0,I.useMemo)(()=>J?.readerTabs||[],[J?.readerTabs]),Y=(0,I.useMemo)(()=>gt.find(e=>e.id===ht),[ht,gt]),_t=!!(Y&&Y.mode!==`browser`&&(J?.kind===`reader`||J?.kind===`files`||J?.kind===`review`&&Y.mode===`diff`)),vt=J?.kind===`review`?J.reviewView===`review`?`overview`:`changes`:`files`,yt=(0,I.useMemo)(()=>{let e={};for(let t of S)e[t.path]=t;return e},[S]),bt=(0,I.useMemo)(()=>{let e=new Set;for(let t of S)e.add(t.path),t.oldPath&&e.add(t.oldPath);return e},[S]),X=(0,I.useMemo)(()=>en(x,T),[T,x]),xt=(0,I.useMemo)(()=>nn(_,e?.path),[_,e?.path]),Ct=(0,I.useMemo)(()=>E===`staged`?S.filter(e=>e.staged):E===`all`?S:E===`last`?S.filter(e=>xt.has(e.path)||(e.oldPath?xt.has(e.oldPath):!1)):S.filter(e=>e.unstaged||e.status===`untracked`||e.conflict||e.status===`conflicted`),[S,xt,E]),wt=D?Ct.find(e=>e.path===D):void 0;function Tt(e){C(e.files),re(e.branch),ae(e.isGitRepository)}async function Z(e,t,n,r){Ue({action:e,path:t});try{Tt(await n())}catch(e){await be(e instanceof Error?e.message:r)}finally{Ue(void 0)}}async function Ot(e){q&&await Z(`stage`,e.path,()=>Fe(q,e.path),k(`workspaceStageFailed`))}async function kt(){q&&await Z(`stage`,void 0,()=>xe(q),k(`workspaceStageFailed`))}async function At(e){q&&await Z(`unstage`,e.path,()=>Ce(q,e.path),k(`workspaceUnstageFailed`))}async function jt(){q&&await Z(`unstage`,void 0,()=>Ie(q),k(`workspaceUnstageFailed`))}async function Mt(e){q&&await ve({title:k(`workspaceRestoreConfirmTitle`),description:k(`workspaceRestoreFileConfirm`,{path:e.path}),confirmLabel:k(`workspaceRestoreFile`),cancelLabel:k(`cancel`),variant:`destructive`})&&await Z(`restore`,e.path,()=>Ee(q,e.path),k(`workspaceRestoreFailed`))}async function Pt(){q&&await ve({title:k(`workspaceRestoreConfirmTitle`),description:k(`workspaceRestoreAllConfirm`),confirmLabel:k(`workspaceRestoreAll`),cancelLabel:k(`cancel`),variant:`destructive`})&&await Z(`restore`,void 0,()=>De(q),k(`workspaceRestoreFailed`))}function Wt(e){e.status!==`deleted`&&mn(e.path)}async function Q(t){if(e){if(!wt){t===`explorer`?c?.(e):t===`idea`?d?.(e):u?.(e);return}if(q)try{await je(q,wt.path,t)}catch(e){let n=k(t===`explorer`?`openInExplorerFailed`:t===`idea`?`openInIDEAFailed`:`openInVSCodeFailed`);await be(e instanceof Error?e.message:n)}}}(0,I.useEffect)(()=>{!D||Ct.some(e=>e.path===D)||(pe(void 0),he(void 0),Oe(void 0),ye(!1))},[D,Ct]),(0,I.useEffect)(()=>{if(t){let e=!1;return queueMicrotask(()=>{e||(Xe(!0),window.requestAnimationFrame(()=>{e||Ze(!0)}))}),()=>{e=!0}}let e=!1;queueMicrotask(()=>{e||Ze(!1)});let n=window.setTimeout(()=>Xe(!1),180);return()=>{e=!0,window.clearTimeout(n)}},[t]),(0,I.useEffect)(()=>{if(!Le&&!P&&!F)return;let e=e=>{let t=e.target;Le&&!it.current?.contains(t)&&Re(!1),P&&!at.current?.contains(t)&&Be(!1),F&&!ot.current?.contains(t)&&Ve(!1)},t=e=>{e.key===`Escape`&&(Re(!1),Be(!1),Ve(!1))};return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[Le,F,P]),(0,I.useEffect)(()=>{!t||!Dt(h,q,pt.current)||(pt.current=h.id,h.kind===`review`?dt.current?.(`review`,h.view):h.kind===`reader`?ft.current?.(h.path):h.kind===`browser`?dt.current?.(`browser`,`browser`,{url:h.url}):dt.current?.(h.kind,Ut(h.kind)),g?.(h.id))},[g,t,q,h]),(0,I.useEffect)(()=>{try{window.localStorage.setItem(Yt,String(z))}catch{}},[z]);let tn=(0,I.useCallback)(()=>{Qe(e=>e<Jt?Jt:e)},[]);(0,I.useEffect)(()=>{!R||B||(J?.kind===`browser`||J?.kind===`terminal`||ht)&&tn()},[J?.kind,ht,R,B,tn]);let an=(0,I.useCallback)(async e=>{if(q){se(!0),ue(void 0);try{let[t,n]=await Promise.all([Ne(q),we(q)]);if(e?.())return;te(t.tree),C(n.files),re(n.branch),ae(n.isGitRepository)}catch(t){e?.()||ue(t instanceof Error?t.message:k(`workspaceLoadFailed`))}finally{e?.()||se(!1)}}},[q]);(0,I.useEffect)(()=>{let e=!1;if(!(!q||!t))return queueMicrotask(()=>{e||an(()=>e)}),()=>{e=!0}},[an,t,q]),(0,I.useEffect)(()=>{q&&Ft(q,A,j)},[j,A,q]),(0,I.useEffect)(()=>{!j||A.some(e=>e.id===j)||M(A[0]?.id)},[j,A]),(0,I.useEffect)(()=>{if(!q)return;let e=A.flatMap(e=>e.kind===`reader`?(e.readerTabs||[]).filter(e=>e.loading&&e.mode===`file`).map(t=>({panelTabId:e.id,reader:t})):[]);for(let{panelTabId:t,reader:n}of e){let e=`${q}:${n.id}`;if(mt.current.has(e))continue;mt.current.add(e);let r=G.current.token(q);Te(q,n.path).then(e=>({file:e})).then(e=>{G.current.isCurrent(r)&&$(t,t=>({...t,readerTabs:(t.readerTabs||[]).map(t=>t.id===n.id?{...t,...e,loading:!1,error:void 0}:t)}))}).catch(e=>{G.current.isCurrent(r)&&$(t,t=>({...t,readerTabs:(t.readerTabs||[]).map(t=>t.id===n.id?{...t,loading:!1,error:e instanceof Error?e.message:k(`workspaceOpenFileFailed`)}:t)}))}).finally(()=>{mt.current.delete(e)})}},[A,q]);function on(e,t){let n=`${e}-${ut.current++}`;return e===`browser`?{id:n,kind:e,url:t?.url||``}:e===`reader`?{id:n,kind:e,readerTabs:t?.readerTab?[t.readerTab]:[],activeReaderTabId:t?.readerTab?.id}:e===`files`||e===`review`?{id:n,kind:e,...e===`review`?{reviewView:t?.reviewView||`changes`}:{},readerTabs:t?.readerTab?[t.readerTab]:[],activeReaderTabId:t?.readerTab?.id}:{id:n,kind:e}}function sn(e){return on(`reader`,{readerTab:e})}function $(e,t){Me(n=>n.map(n=>n.id===e?t(n):n))}function un(e,t=Ut(e),n){let r=e===`review`?A.find(e=>e.kind===`review`):void 0,i=r||on(e,{...n,...e===`review`?{reviewView:t===`review`?`review`:`changes`}:{}});return r||Me(e=>[...e,i]),r?.kind===`review`&&$(r.id,e=>({...e,reviewView:t===`review`?`review`:`changes`})),M(i.id),Re(!1),i}dt.current=un;function dn(e){M(e.id)}function fn(e){Me(t=>{let n=t.findIndex(t=>t.id===e),i=t.filter(t=>t.id!==e);return i.length===0?(M(void 0),r(!1),i):(j===e&&M((i[n]??i[n-1])?.id),i)})}function pn(e){if(f&&q){f(q,e);return}mn(e)}async function mn(e){if(!q)return;let t=G.current.token(q),n=zt(`file`,e),r=A.find(e=>e.kind===`reader`&&e.readerTabs?.some(e=>e.id===n));if(r){M(r.id),$(r.id,e=>({...e,activeReaderTabId:n}));return}let i=sn({id:n,mode:`file`,path:e,loading:!0});Me(e=>[...e,i]),M(i.id);try{let r=await Te(q,e);if(!G.current.isCurrent(t))return;$(i.id,e=>({...e,readerTabs:(e.readerTabs||[]).map(e=>e.id===n?{...e,file:r,loading:!1,error:void 0}:e)}))}catch(e){if(!G.current.isCurrent(t))return;$(i.id,t=>({...t,readerTabs:(t.readerTabs||[]).map(t=>t.id===n?{...t,loading:!1,error:e instanceof Error?e.message:k(`workspaceOpenFileFailed`)}:t)}))}}ft.current=mn;async function hn(e,t){if(!q)return;let n=G.current.token(q),r=A.find(e=>e.kind===`review`)||un(`review`,t?`changes`:`review`);M(r.id),t&&r.kind===`review`&&$(r.id,e=>({...e,reviewView:`changes`}));let i=zt(`diff`,e);if(r.readerTabs?.some(e=>e.id===i)){$(r.id,e=>({...e,activeReaderTabId:i}));return}let a={id:i,mode:`diff`,path:e,loading:!0};$(r.id,e=>({...e,readerTabs:[...e.readerTabs||[],a],activeReaderTabId:i}));try{let t=await Pe(q,e);if(!G.current.isCurrent(n))return;$(r.id,e=>({...e,readerTabs:(e.readerTabs||[]).map(e=>e.id===i?{...e,diff:t,loading:!1,error:void 0}:e)}))}catch(e){if(!G.current.isCurrent(n))return;$(r.id,t=>({...t,readerTabs:(t.readerTabs||[]).map(t=>t.id===i?{...t,loading:!1,error:e instanceof Error?e.message:k(`workspaceOpenDiffFailed`)}:t)}))}}async function gn(e){if(!q)return;let t=G.current.token(q);if(D===e){K.current+=1,pe(void 0),he(void 0),Oe(void 0),ye(!1);return}let n=K.current+1;K.current=n,pe(e),he(void 0),Oe(void 0),ye(!0);try{let r=await Pe(q,e);if(K.current!==n||!G.current.isCurrent(t))return;he(r)}catch(e){if(K.current!==n||!G.current.isCurrent(t))return;Oe(e instanceof Error?e.message:k(`workspaceOpenDiffFailed`))}finally{K.current===n&&G.current.isCurrent(t)&&ye(!1)}}function _n(e){J&&$(J.id,t=>{let n=t.readerTabs||[],r=n.findIndex(t=>t.id===e),i=n.filter(t=>t.id!==e),a=t.activeReaderTabId===e?(i[r]??i[r-1])?.id:t.activeReaderTabId;return{...t,readerTabs:i,activeReaderTabId:a}})}async function vn(e){await hn(e,!1)}function yn(e){ct.current={startX:e.clientX,startWidth:z,currentWidth:z},lt.current={cursor:document.body.style.cursor,userSelect:document.body.style.userSelect},document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,et(!0),e.preventDefault();try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}}function bn(e){let t=ct.current,n=V.current;!t||!n||(t.currentWidth=Math.min(Jt,Math.max(qt,t.startWidth+t.startX-e.clientX)),U.current===null&&(U.current=window.requestAnimationFrame(()=>{U.current=null;let e=ct.current;!e||!V.current||(V.current.style.width=`${e.currentWidth}px`)})))}function xn(e){let t=ct.current?.currentWidth;ct.current=null,U.current!==null&&(window.cancelAnimationFrame(U.current),U.current=null),typeof t==`number`&&(V.current&&(V.current.style.width=`${t}px`),Qe(t));let n=lt.current;n&&(document.body.style.cursor=n.cursor,document.body.style.userSelect=n.userSelect,lt.current=null),et(!1);try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}}function Sn(e){st.current={startX:e.clientX,startWidth:We,currentWidth:We},document.body.style.cursor=`col-resize`,document.body.style.userSelect=`none`,Je(!0),e.preventDefault();try{e.currentTarget.setPointerCapture(e.pointerId)}catch{}}function Cn(e){let t=st.current;t&&(t.currentWidth=Math.min(Qt,Math.max(Xt,t.startWidth+e.clientX-t.startX)),H.current===null&&(H.current=window.requestAnimationFrame(()=>{H.current=null;let e=st.current;e&&Ge(e.currentWidth)})))}function wn(e){let t=st.current?.currentWidth;st.current=null,H.current!==null&&(window.cancelAnimationFrame(H.current),H.current=null),typeof t==`number`&&Ge(t),document.body.style.cursor=``,document.body.style.userSelect=``,Je(!1);try{e.currentTarget.releasePointerCapture(e.pointerId)}catch{}}let Tn=(0,I.useCallback)(()=>{let e=V.current;if(!e){tt(e=>!e);return}W.current?.cancel();let t=e.getBoundingClientRect(),n=window.innerWidth,r=Rt(),i=window.innerHeight-r,a=`${r}px`,o=`${i}px`,s=`cubic-bezier(0.22, 1, 0.36, 1)`;if(rt(!0),!B){window.requestAnimationFrame(()=>{let e=V.current;if(!e)return;Object.assign(e.style,{position:`fixed`,left:`${t.left}px`,top:`${t.top}px`,right:`auto`,bottom:`auto`,width:`${t.width}px`,height:`${t.height}px`,minWidth:`0px`,maxWidth:`none`,zIndex:`40`});let r=e.animate([{left:`${t.left}px`,top:`${t.top}px`,width:`${t.width}px`,height:`${t.height}px`},{left:`0px`,top:a,width:`${n}px`,height:o}],{duration:240,easing:s,fill:`forwards`});W.current=r,r.onfinish=()=>{W.current=null,tt(!0),window.requestAnimationFrame(()=>{r.cancel(),e.removeAttribute(`style`),window.requestAnimationFrame(()=>rt(!1))})},r.oncancel=()=>{W.current=null,rt(!1)}});return}window.requestAnimationFrame(()=>{let e=V.current;if(!e)return;Object.assign(e.style,{position:`fixed`,left:`0px`,top:a,right:`auto`,bottom:`auto`,width:`${t.width}px`,height:o,zIndex:`40`});let r=n-z,i=e.animate([{left:`0px`,top:a,width:`${t.width}px`,height:o},{left:`${r}px`,top:a,width:`${z}px`,height:o}],{duration:240,easing:s,fill:`forwards`});W.current=i,i.onfinish=()=>{W.current=null,tt(!1),window.requestAnimationFrame(()=>{i.cancel(),e.style.position=``,e.style.left=``,e.style.top=``,e.style.right=``,e.style.bottom=``,e.style.height=``,e.style.zIndex=``,e.style.width=`${z}px`,e.style.minWidth=`${qt}px`,e.style.maxWidth=`${Jt}px`,window.requestAnimationFrame(()=>rt(!1))})},i.oncancel=()=>{W.current=null,rt(!1)}})},[B,z]);return(0,I.useEffect)(()=>{if(!B)return;let e=e=>{e.key===`Escape`&&tt(!1)};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[B]),(0,I.useEffect)(()=>()=>{U.current!==null&&window.cancelAnimationFrame(U.current),H.current!==null&&window.cancelAnimationFrame(H.current),W.current?.cancel(),V.current&&V.current.removeAttribute(`style`);let e=lt.current;e&&(document.body.style.cursor=e.cursor,document.body.style.userSelect=e.userSelect)},[]),Ye?(0,L.jsx)(L.Fragment,{children:(0,L.jsxs)(`aside`,{ref:V,className:O(`relative hidden shrink-0 overflow-hidden flex-col bg-background transition-[width,min-width,max-width,opacity,transform] duration-200 ease-out will-change-[width,opacity,transform] lg:flex`,R?`translate-x-0 opacity-100`:`w-0 min-w-0 max-w-0 translate-x-4 opacity-0`,$e?`transition-none`:``,B?`quickforge-workspace-inspector-fullscreen z-40 rounded-none border-l-0`:`lg:rounded-l-2xl`),style:R?B?void 0:{width:z,minWidth:qt,maxWidth:Jt}:void 0,children:[R&&!B?(0,L.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,"aria-valuemin":qt,"aria-valuemax":Jt,"aria-valuenow":z,className:O(`group absolute inset-y-0 -left-2 z-20 flex w-4 cursor-col-resize items-center justify-center bg-transparent transition-colors hover:bg-border/40`,$e?`bg-border/45`:``),onPointerDown:yn,onPointerMove:bn,onPointerUp:xn,onPointerCancel:xn,children:(0,L.jsx)(`div`,{className:O(`flex h-10 w-3 items-center justify-center rounded-full border border-border bg-background text-muted-foreground/60 opacity-0 shadow-sm transition-opacity`,$e?`opacity-100`:`group-hover:opacity-100`),children:(0,L.jsx)(a,{className:`size-3`})})}):null,(0,L.jsxs)(`div`,{className:O(`flex h-14 shrink-0 items-center gap-2 border-b-[0.5px] border-[color-mix(in_oklab,var(--border)_34%,transparent)] bg-background px-3 pr-20 transition-opacity duration-150`,nt?`opacity-0`:`opacity-100`),children:[A.length>0?(0,L.jsxs)(`div`,{ref:at,className:`relative shrink-0`,children:[(0,L.jsx)(`button`,{type:`button`,className:`flex size-9 items-center justify-center rounded-2xl bg-transparent text-muted-foreground/85 transition-colors hover:bg-muted/45 hover:text-foreground/90`,onClick:()=>Be(e=>!e),"aria-label":k(`rightPanelOpenTabsTitle`),title:k(`rightPanelOpenTabsTitle`),"aria-haspopup":`menu`,"aria-expanded":P,children:(0,L.jsx)(n,{className:O(`size-4 transition-transform`,P&&`rotate-180`)})}),P?(0,L.jsx)(`div`,{className:`absolute left-0 top-12 z-40 w-72 max-w-[calc(100vw-2rem)] rounded-2xl border border-[color-mix(in_oklab,var(--border)_34%,transparent)] bg-popover p-2 shadow-quickforge`,role:`menu`,children:A.map(t=>{let n=(t.kind===`reader`?void 0:Ht[t.kind])?.icon??b,r=t.id===j,i=Gt(t,e?.name),a=Kt(t,i);return(0,L.jsxs)(`div`,{className:O(`group flex h-10 w-full items-center gap-2 rounded-xl px-2 transition-colors`,r?`bg-muted/55 text-foreground`:`text-foreground/86 hover:bg-muted/34 hover:text-foreground`),role:`none`,children:[(0,L.jsxs)(`button`,{type:`button`,className:`flex min-w-0 flex-1 items-center gap-2 text-left text-sm font-medium`,onClick:()=>{dn(t),Be(!1)},role:`menuitem`,title:a,children:[(0,L.jsx)(n,{className:`size-4 shrink-0 text-muted-foreground/80`}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:i})]}),(0,L.jsx)(`button`,{type:`button`,className:`inline-flex size-7 shrink-0 items-center justify-center rounded-full text-muted-foreground/70 opacity-70 transition-colors hover:bg-destructive/10 hover:text-destructive group-hover:opacity-100`,onClick:e=>{e.stopPropagation(),fn(t.id)},"aria-label":k(`close`),children:(0,L.jsx)(ce,{className:`size-3.5`})})]},t.id)})}):null]}):null,(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-center gap-1 overflow-hidden`,children:[A.map((t,n)=>{let r=(t.kind===`reader`?void 0:Ht[t.kind])?.icon??b,i=t.id===j,a=Gt(t,e?.name),o=Kt(t,a);return(0,L.jsxs)(`div`,{className:`flex shrink-0 items-center gap-1`,children:[n>0?(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`mx-0.5 h-3.5 w-px bg-[color-mix(in_oklab,var(--muted-foreground)_18%,transparent)]`}):null,(0,L.jsxs)(`button`,{type:`button`,className:O(`group flex h-10 max-w-40 items-center gap-2 rounded-2xl px-3 text-[13px] font-medium transition-colors`,i?`bg-[color-mix(in_oklab,var(--muted)_86%,transparent)] text-foreground/82 hover:bg-[color-mix(in_oklab,var(--muted)_86%,transparent)]`:`text-muted-foreground/45 hover:bg-[color-mix(in_oklab,var(--muted)_72%,transparent)] hover:text-muted-foreground/72`),onClick:()=>dn(t),title:o,children:[(0,L.jsx)(r,{className:O(`size-4 shrink-0`,i?`text-foreground/74`:`text-muted-foreground/45 group-hover:text-muted-foreground/72`)}),(0,L.jsx)(`span`,{className:`min-w-0 truncate`,children:a}),(0,L.jsx)(`span`,{role:`button`,tabIndex:0,className:O(`ml-0.5 inline-flex size-5 shrink-0 items-center justify-center rounded-full opacity-0 transition-all hover:bg-black hover:text-white group-hover:opacity-100`,i&&`opacity-100`),onClick:e=>{e.stopPropagation(),fn(t.id)},onKeyDown:e=>{(e.key===`Enter`||e.key===` `)&&(e.preventDefault(),e.stopPropagation(),fn(t.id))},"aria-label":k(`close`),children:(0,L.jsx)(ce,{className:`size-3.5`})})]})]},t.id)}),A.length===0?(0,L.jsx)(`div`,{className:`min-w-0 flex-1`}):null]}),A.length>0?(0,L.jsxs)(`div`,{ref:it,className:`relative shrink-0`,children:[(0,L.jsx)(`button`,{type:`button`,className:`flex size-9 items-center justify-center rounded-2xl bg-transparent text-muted-foreground/85 transition-colors hover:bg-muted/45 hover:text-foreground/90`,onClick:()=>Re(e=>!e),"aria-label":k(`rightPanelAddTab`),title:k(`rightPanelAddTab`),"aria-haspopup":`menu`,"aria-expanded":Le,children:(0,L.jsx)(i,{className:`size-4 stroke-[1.9]`})}),Le?(0,L.jsx)(`div`,{className:`absolute right-0 top-12 z-40 w-64 rounded-2xl border border-[color-mix(in_oklab,var(--border)_34%,transparent)] bg-popover p-2 shadow-quickforge`,role:`menu`,children:Bt.map(e=>{let t=e.icon;return(0,L.jsxs)(`button`,{type:`button`,className:O(`flex w-full items-center gap-3 rounded-xl px-3 py-2.5 text-left text-[15px] font-medium transition-colors`,e.kind===J?.kind?`bg-muted/55 text-foreground`:`text-foreground/86 hover:bg-muted/34 hover:text-foreground`),onClick:()=>un(e.kind,Ut(e.kind)),role:`menuitem`,children:[(0,L.jsx)(t,{className:`size-4 shrink-0 text-muted-foreground/80`}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label})]},e.kind)})}):null]}):null,(0,L.jsx)(N,{variant:`ghost`,size:`icon`,className:`shrink-0`,onClick:Tn,"aria-label":k(B?`workspaceExitFullscreen`:`workspaceFullscreen`),title:k(B?`workspaceExitFullscreen`:`workspaceFullscreen`),children:B?(0,L.jsx)(l,{className:`size-4`}):(0,L.jsx)(p,{className:`size-4`})})]}),(0,L.jsx)(`div`,{className:O(`flex min-h-0 flex-1 transition-opacity duration-150`,nt?`opacity-0`:`opacity-100`),children:e?.id?J?J.kind===`browser`?(0,L.jsx)(Ke,{url:J.url||``,onUrlChange:e=>{$(J.id,t=>({...t,url:e}))},projectId:e.id}):J.kind===`terminal`?(0,L.jsx)(ze,{project:e,pendingCommand:v,onPendingCommandHandled:ee,onCollapse:()=>fn(J.id),variant:`panel`,singleSession:!0,panelInstanceId:J.id,panelSessionId:J.terminalSessionId,onPanelSessionReady:e=>$(J.id,t=>({...t,terminalSessionId:e}))},J.id):(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{className:O(`flex min-h-0 min-w-0 flex-col bg-muted/20`,_t?`shrink-0 border-r-[0.5px] border-[color-mix(in_oklab,var(--border)_34%,transparent)]`:`flex-1`),style:_t?{width:We,minWidth:Xt,maxWidth:Qt}:void 0,children:le?(0,L.jsx)(`div`,{className:`p-4 text-sm text-destructive`,children:le}):(0,L.jsxs)(`div`,{className:O(`min-h-0 min-w-0 flex-1 p-2`,vt===`changes`?`flex flex-col overflow-hidden`:`overflow-auto`),children:[w?(0,L.jsx)(`div`,{className:`px-2 py-3 text-xs text-muted-foreground/70`,children:k(`workspaceLoading`)}):null,!w&&vt===`overview`?(0,L.jsx)(ln,{project:e,artifacts:_,changesCount:S.length,changedPaths:bt,isGitRepository:ie,gitBranch:ne,onSelectFile:mn,onSelectDiff:vn,onPreviewFile:pn}):null,!w&&vt===`files`?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsxs)(`label`,{className:`mb-2 flex items-center gap-2 rounded-md border-[0.5px] border-[color-mix(in_oklab,var(--border)_34%,transparent)] bg-background px-2 py-1.5 text-xs text-muted-foreground/65 focus-within:text-foreground/85`,children:[(0,L.jsx)(y,{className:`size-3.5 shrink-0`}),(0,L.jsx)(`input`,{value:T,onChange:e=>de(e.target.value),placeholder:k(`workspaceFilterFiles`),className:`min-w-0 flex-1 bg-transparent text-xs text-foreground/85 outline-none placeholder:text-muted-foreground/50`})]}),(0,L.jsx)(Et,{tree:X,selectedPath:Y?.mode===`file`?Y.path:void 0,gitStatuses:yt,onSelectFile:mn,onPreviewFile:pn,projectId:q})]}):null,!w&&vt===`changes`?ie?(0,L.jsxs)(`div`,{className:`flex min-h-0 min-w-0 flex-1 flex-col`,children:[(0,L.jsxs)(`div`,{className:`flex min-w-0 shrink-0 flex-wrap items-center justify-between gap-x-2 gap-y-1.5 pb-2`,children:[(0,L.jsxs)(`div`,{ref:ot,className:`relative min-w-24 flex-1`,children:[(0,L.jsxs)(`button`,{type:`button`,className:`inline-flex h-8 w-full min-w-0 max-w-full items-center gap-2 rounded-xl border border-[color-mix(in_oklab,var(--border)_45%,transparent)] bg-background px-3 text-sm font-medium text-foreground/86 transition-colors hover:border-border/60 hover:bg-muted/30 hover:text-foreground`,onClick:()=>Ve(e=>!e),"aria-haspopup":`menu`,"aria-expanded":F,title:k(`workspaceReviewFilter`),children:[(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-left`,children:Vt.find(e=>e.value===E)?.label}),(0,L.jsx)(n,{className:O(`size-3.5 shrink-0 text-muted-foreground/70 transition-transform`,F&&`rotate-180`)})]}),F?(0,L.jsx)(`div`,{className:`absolute left-0 top-10 z-40 w-48 rounded-2xl border border-[color-mix(in_oklab,var(--border)_34%,transparent)] bg-popover p-1.5 shadow-quickforge`,role:`menu`,"aria-label":k(`workspaceReviewFilter`),children:Vt.map(e=>{let t=e.value===E;return(0,L.jsxs)(`button`,{type:`button`,className:O(`flex h-9 w-full items-center gap-2 rounded-xl px-2.5 text-left text-sm font-medium transition-colors`,t?`bg-muted/55 text-foreground`:`text-foreground/82 hover:bg-muted/34 hover:text-foreground`),onClick:()=>{fe(e.value),Ve(!1)},role:`menuitemradio`,"aria-checked":t,children:[(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:e.label}),t?(0,L.jsx)(oe,{className:`size-3.5 shrink-0 text-muted-foreground/80`}):null]},e.value)})}):null]}),(0,L.jsxs)(`div`,{className:`ml-auto flex shrink-0 items-center gap-1`,children:[(0,L.jsx)(`button`,{type:`button`,className:`inline-flex size-8 shrink-0 items-center justify-center rounded-xl text-muted-foreground/72 transition-colors hover:bg-muted/30 hover:text-foreground/85 disabled:cursor-not-allowed disabled:opacity-60`,onClick:()=>void an(),disabled:w,"aria-label":k(`refreshWorkspace`),title:k(`refreshWorkspace`),children:(0,L.jsx)(ge,{className:O(`size-3.5`,w&&`animate-spin`)})}),(0,L.jsx)(Ae,{project:e,disabledTargets:wt?.status===`deleted`?{vscode:!0,idea:!0}:void 0,targetDisabledLabel:k(`workspaceCannotOpenDeletedFile`),onOpenInExplorer:()=>{Q(`explorer`)},onOpenInVSCode:()=>{Q(`vscode`)},onOpenInIDEA:()=>{Q(`idea`)}}),o?(0,L.jsx)(`button`,{type:`button`,className:`inline-flex size-8 shrink-0 items-center justify-center rounded-xl text-muted-foreground/72 transition-colors hover:bg-muted/30 hover:text-foreground/85`,onClick:o,"aria-label":k(`gitToolsCommitOrPush`),title:k(`gitToolsCommitOrPush`),children:(0,L.jsx)(s,{className:`size-3.5`})}):null]})]}),(0,L.jsx)(St,{files:Ct,selectedPath:D,expandedDiff:me,expandedLoading:_e,expandedError:Se,onSelectFile:gn,onRestoreFile:Mt,onStageFile:Ot,onUnstageFile:At,onOpenFile:Wt,onRestoreAll:Pt,onStageAll:kt,onUnstageAll:jt,showUnstageAll:E===`staged`,pendingAction:He,emptyMessage:rn(E)})]}):(0,L.jsx)(`div`,{className:`px-2 py-3 text-xs text-muted-foreground/70`,children:k(`workspaceNotGitRepository`)}):null]})}),_t?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`div`,{role:`separator`,"aria-orientation":`vertical`,"aria-valuemin":Xt,"aria-valuemax":Qt,"aria-valuenow":We,className:O(`group relative z-10 w-1.5 shrink-0 cursor-col-resize bg-transparent transition-colors`,qe?`bg-primary/30`:`hover:bg-[color-mix(in_oklab,var(--border)_52%,transparent)]`),onPointerDown:Sn,onPointerMove:Cn,onPointerUp:wn,onPointerCancel:wn}),(0,L.jsx)(`div`,{className:`flex min-w-0 flex-1 flex-col bg-background`,children:Y?(0,L.jsx)(cn,{mode:Y.mode,file:Y.file,diff:Y.diff,loading:Y.loading,error:Y.error,onClose:()=>J.kind===`reader`?fn(J.id):_n(Y.id),onDraftRequest:m}):null})]}):null]}):(0,L.jsx)(`div`,{className:`flex min-h-0 flex-1 items-center justify-center px-5`,children:(0,L.jsxs)(`div`,{className:`w-full max-w-[26rem] space-y-4`,children:[(0,L.jsxs)(`div`,{className:`text-center font-sans`,children:[(0,L.jsx)(`div`,{className:`text-lg font-semibold leading-tight tracking-[-0.01em] text-foreground/90`,children:k(`rightPanelOpenTabsTitle`)}),(0,L.jsx)(`div`,{className:`mt-2 text-sm leading-5 text-muted-foreground/70`,children:k(`rightPanelOpenTabsDescription`)})]}),(0,L.jsx)(`div`,{className:`space-y-2`,children:Bt.map(e=>{let t=e.icon;return(0,L.jsxs)(`button`,{type:`button`,className:`flex w-full cursor-pointer items-center gap-3 rounded-xl border border-[color-mix(in_oklab,var(--border)_34%,transparent)] bg-muted/60 px-4 py-3 text-left transition-colors hover:bg-muted/72 active:bg-muted/82`,onClick:()=>un(e.kind,Ut(e.kind)),children:[(0,L.jsx)(t,{className:`size-4 shrink-0 text-muted-foreground/78`}),(0,L.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,L.jsx)(`div`,{className:`text-sm font-medium text-foreground/90`,children:e.label}),(0,L.jsx)(`div`,{className:`mt-0.5 text-xs leading-4 text-muted-foreground/60`,children:e.description})]})]},e.kind)})})]})}):(0,L.jsx)(`div`,{className:`p-4 text-sm text-muted-foreground/70`,children:k(`workspaceSelectProject`)})})]})}):null}export{un as WorkspaceInspector};
@@ -1 +0,0 @@
1
- import{i as e,t}from"./rolldown-runtime-DWdDZTNf.js";var n=t((e=>{var t=Symbol.for(`react.transitional.element`),n=Symbol.for(`react.portal`),r=Symbol.for(`react.fragment`),i=Symbol.for(`react.strict_mode`),a=Symbol.for(`react.profiler`),o=Symbol.for(`react.consumer`),s=Symbol.for(`react.context`),c=Symbol.for(`react.forward_ref`),l=Symbol.for(`react.suspense`),u=Symbol.for(`react.memo`),d=Symbol.for(`react.lazy`),f=Symbol.for(`react.activity`),p=Symbol.iterator;function m(e){return typeof e!=`object`||!e?null:(e=p&&e[p]||e[`@@iterator`],typeof e==`function`?e:null)}var h={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g=Object.assign,_={};function v(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if(typeof e!=`object`&&typeof e!=`function`&&e!=null)throw Error(`takes an object of state variables to update or a function which returns an object of state variables.`);this.updater.enqueueSetState(this,e,t,`setState`)},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};function y(){}y.prototype=v.prototype;function b(e,t,n){this.props=e,this.context=t,this.refs=_,this.updater=n||h}var x=b.prototype=new y;x.constructor=b,g(x,v.prototype),x.isPureReactComponent=!0;var S=Array.isArray;function C(){}var w={H:null,A:null,T:null,S:null},T=Object.prototype.hasOwnProperty;function E(e,n,r){var i=r.ref;return{$$typeof:t,type:e,key:n,ref:i===void 0?null:i,props:r}}function D(e,t){return E(e.type,t,e.props)}function O(e){return typeof e==`object`&&!!e&&e.$$typeof===t}function k(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}var A=/\/+/g;function j(e,t){return typeof e==`object`&&e&&e.key!=null?k(``+e.key):t.toString(36)}function M(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(C,C):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function N(e,r,i,a,o){var s=typeof e;(s===`undefined`||s===`boolean`)&&(e=null);var c=!1;if(e===null)c=!0;else switch(s){case`bigint`:case`string`:case`number`:c=!0;break;case`object`:switch(e.$$typeof){case t:case n:c=!0;break;case d:return c=e._init,N(c(e._payload),r,i,a,o)}}if(c)return o=o(e),c=a===``?`.`+j(e,0):a,S(o)?(i=``,c!=null&&(i=c.replace(A,`$&/`)+`/`),N(o,r,i,``,function(e){return e})):o!=null&&(O(o)&&(o=D(o,i+(o.key==null||e&&e.key===o.key?``:(``+o.key).replace(A,`$&/`)+`/`)+c)),r.push(o)),1;c=0;var l=a===``?`.`:a+`:`;if(S(e))for(var u=0;u<e.length;u++)a=e[u],s=l+j(a,u),c+=N(a,r,i,s,o);else if(u=m(e),typeof u==`function`)for(e=u.call(e),u=0;!(a=e.next()).done;)a=a.value,s=l+j(a,u++),c+=N(a,r,i,s,o);else if(s===`object`){if(typeof e.then==`function`)return N(M(e),r,i,a,o);throw r=String(e),Error(`Objects are not valid as a React child (found: `+(r===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:r)+`). If you meant to render a collection of children, use an array instead.`)}return c}function P(e,t,n){if(e==null)return e;var r=[],i=0;return N(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function F(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(t){(e._status===0||e._status===-1)&&(e._status=1,e._result=t)},function(t){(e._status===0||e._status===-1)&&(e._status=2,e._result=t)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var I=typeof reportError==`function`?reportError:function(e){if(typeof window==`object`&&typeof window.ErrorEvent==`function`){var t=new window.ErrorEvent(`error`,{bubbles:!0,cancelable:!0,message:typeof e==`object`&&e&&typeof e.message==`string`?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process==`object`&&typeof process.emit==`function`){process.emit(`uncaughtException`,e);return}console.error(e)},L={map:P,forEach:function(e,t,n){P(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return P(e,function(){t++}),t},toArray:function(e){return P(e,function(e){return e})||[]},only:function(e){if(!O(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=f,e.Children=L,e.Component=v,e.Fragment=r,e.Profiler=a,e.PureComponent=b,e.StrictMode=i,e.Suspense=l,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=w,e.__COMPILER_RUNTIME={__proto__:null,c:function(e){return w.H.useMemoCache(e)}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=g({},e.props),i=e.key;if(t!=null)for(a in t.key!==void 0&&(i=``+t.key),t)!T.call(t,a)||a===`key`||a===`__self`||a===`__source`||a===`ref`&&t.ref===void 0||(r[a]=t[a]);var a=arguments.length-2;if(a===1)r.children=n;else if(1<a){for(var o=Array(a),s=0;s<a;s++)o[s]=arguments[s+2];r.children=o}return E(e.type,i,r)},e.createContext=function(e){return e={$$typeof:s,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:o,_context:e},e},e.createElement=function(e,t,n){var r,i={},a=null;if(t!=null)for(r in t.key!==void 0&&(a=``+t.key),t)T.call(t,r)&&r!==`key`&&r!==`__self`&&r!==`__source`&&(i[r]=t[r]);var o=arguments.length-2;if(o===1)i.children=n;else if(1<o){for(var s=Array(o),c=0;c<o;c++)s[c]=arguments[c+2];i.children=s}if(e&&e.defaultProps)for(r in o=e.defaultProps,o)i[r]===void 0&&(i[r]=o[r]);return E(e,a,i)},e.createRef=function(){return{current:null}},e.forwardRef=function(e){return{$$typeof:c,render:e}},e.isValidElement=O,e.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:F}},e.memo=function(e,t){return{$$typeof:u,type:e,compare:t===void 0?null:t}},e.startTransition=function(e){var t=w.T,n={};w.T=n;try{var r=e(),i=w.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&r.then(C,I)}catch(e){I(e)}finally{t!==null&&n.types!==null&&(t.types=n.types),w.T=t}},e.unstable_useCacheRefresh=function(){return w.H.useCacheRefresh()},e.use=function(e){return w.H.use(e)},e.useActionState=function(e,t,n){return w.H.useActionState(e,t,n)},e.useCallback=function(e,t){return w.H.useCallback(e,t)},e.useContext=function(e){return w.H.useContext(e)},e.useDebugValue=function(){},e.useDeferredValue=function(e,t){return w.H.useDeferredValue(e,t)},e.useEffect=function(e,t){return w.H.useEffect(e,t)},e.useEffectEvent=function(e){return w.H.useEffectEvent(e)},e.useId=function(){return w.H.useId()},e.useImperativeHandle=function(e,t,n){return w.H.useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return w.H.useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return w.H.useLayoutEffect(e,t)},e.useMemo=function(e,t){return w.H.useMemo(e,t)},e.useOptimistic=function(e,t){return w.H.useOptimistic(e,t)},e.useReducer=function(e,t,n){return w.H.useReducer(e,t,n)},e.useRef=function(e){return w.H.useRef(e)},e.useState=function(e){return w.H.useState(e)},e.useSyncExternalStore=function(e,t,n){return w.H.useSyncExternalStore(e,t,n)},e.useTransition=function(){return w.H.useTransition()},e.version=`19.2.5`})),r=t(((e,t)=>{t.exports=n()})),i=e(r(),1),a=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),o=e=>e.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase(),s=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(e,t,n)=>n?n.toUpperCase():t.toLowerCase()),c=e=>{let t=s(e);return t.charAt(0).toUpperCase()+t.slice(1)},l={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,strokeWidth:2,strokeLinecap:`round`,strokeLinejoin:`round`},u=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},d=(0,i.createContext)({});function f({children:e,size:t,color:n,strokeWidth:r,absoluteStrokeWidth:a,className:o}){let s=(0,i.useMemo)(()=>({size:t,color:n,strokeWidth:r,absoluteStrokeWidth:a,className:o}),[t,n,r,a,o]);return(0,i.createElement)(d.Provider,{value:s},e)}var p=()=>(0,i.useContext)(d),m=(0,i.forwardRef)(({color:e,size:t,strokeWidth:n,absoluteStrokeWidth:r,className:o=``,children:s,iconNode:c,...d},f)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,color:_=`currentColor`,className:v=``}=p()??{},y=r??g?Number(n??h)*24/Number(t??m):n??h;return(0,i.createElement)(`svg`,{ref:f,...l,width:t??m??l.width,height:t??m??l.height,stroke:e??_,strokeWidth:y,className:a(`lucide`,v,o),...!s&&!u(d)&&{"aria-hidden":`true`},...d},[...c.map(([e,t])=>(0,i.createElement)(e,t)),...Array.isArray(s)?s:[s]])}),h=(e,t)=>{let n=(0,i.forwardRef)(({className:n,...r},s)=>(0,i.createElement)(m,{ref:s,iconNode:t,className:a(`lucide-${o(c(e))}`,`lucide-${e}`,n),...r}));return n.displayName=c(e),n},g=h(`archive`,[[`rect`,{width:`20`,height:`5`,x:`2`,y:`3`,rx:`1`,key:`1wp1u1`}],[`path`,{d:`M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8`,key:`1s80jp`}],[`path`,{d:`M10 12h4`,key:`a56b0p`}]]),_=h(`arrow-left`,[[`path`,{d:`m12 19-7-7 7-7`,key:`1l729n`}],[`path`,{d:`M19 12H5`,key:`x3x0zl`}]]),v=h(`arrow-up-from-line`,[[`path`,{d:`m18 9-6-6-6 6`,key:`kcunyi`}],[`path`,{d:`M12 3v14`,key:`7cf3v8`}],[`path`,{d:`M5 21h14`,key:`11awu3`}]]),y=h(`book-open`,[[`path`,{d:`M12 7v14`,key:`1akyts`}],[`path`,{d:`M3 18a1 1 0 0 1-1-1V4a1 1 0 0 1 1-1h5a4 4 0 0 1 4 4 4 4 0 0 1 4-4h5a1 1 0 0 1 1 1v13a1 1 0 0 1-1 1h-6a3 3 0 0 0-3 3 3 3 0 0 0-3-3z`,key:`ruj8y`}]]),b=h(`bot`,[[`path`,{d:`M12 8V4H8`,key:`hb8ula`}],[`rect`,{width:`16`,height:`12`,x:`4`,y:`8`,rx:`2`,key:`enze0r`}],[`path`,{d:`M2 14h2`,key:`vft8re`}],[`path`,{d:`M20 14h2`,key:`4cs60a`}],[`path`,{d:`M15 13v2`,key:`1xurst`}],[`path`,{d:`M9 13v2`,key:`rq6x2g`}]]),x=h(`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`}]]),S=h(`calendar-clock`,[[`path`,{d:`M16 14v2.2l1.6 1`,key:`fo4ql5`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M21 7.5V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h3.5`,key:`1osxxc`}],[`path`,{d:`M3 10h5`,key:`r794hk`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}],[`circle`,{cx:`16`,cy:`16`,r:`6`,key:`qoo3c4`}]]),C=h(`calendar-plus`,[[`path`,{d:`M16 19h6`,key:`xwg31i`}],[`path`,{d:`M16 2v4`,key:`4m81vk`}],[`path`,{d:`M19 16v6`,key:`tddt3s`}],[`path`,{d:`M21 12.598V6a2 2 0 0 0-2-2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h8.5`,key:`1glfrc`}],[`path`,{d:`M3 10h18`,key:`8toen8`}],[`path`,{d:`M8 2v4`,key:`1cmpym`}]]),w=h(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),T=h(`chevron-down`,[[`path`,{d:`m6 9 6 6 6-6`,key:`qrunsl`}]]),E=h(`chevron-left`,[[`path`,{d:`m15 18-6-6 6-6`,key:`1wnfg3`}]]),D=h(`chevron-right`,[[`path`,{d:`m9 18 6-6-6-6`,key:`mthhwq`}]]),O=h(`chevrons-down-up`,[[`path`,{d:`m7 20 5-5 5 5`,key:`13a0gw`}],[`path`,{d:`m7 4 5 5 5-5`,key:`1kwcof`}]]),k=h(`chevrons-left-right`,[[`path`,{d:`m9 7-5 5 5 5`,key:`j5w590`}],[`path`,{d:`m15 7 5 5-5 5`,key:`1bl6da`}]]),A=h(`chevrons-up-down`,[[`path`,{d:`m7 15 5 5 5-5`,key:`1hf1tw`}],[`path`,{d:`m7 9 5-5 5 5`,key:`sgt6xg`}]]),j=h(`circle-check-big`,[[`path`,{d:`M21.801 10A10 10 0 1 1 17 3.335`,key:`yps3ct`}],[`path`,{d:`m9 11 3 3L22 4`,key:`1pflzl`}]]),M=h(`circle-check`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),N=h(`circle-x`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]]),P=h(`clock-3`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6h4`,key:`135r8i`}]]),F=h(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),I=h(`cloud-download`,[[`path`,{d:`M12 13v8l-4-4`,key:`1f5nwf`}],[`path`,{d:`m12 21 4-4`,key:`1lfcce`}],[`path`,{d:`M4.393 15.269A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.436 8.284`,key:`ui1hmy`}]]),L=h(`cloud-upload`,[[`path`,{d:`M12 13v8`,key:`1l5pq0`}],[`path`,{d:`M4 14.899A7 7 0 1 1 15.71 8h1.79a4.5 4.5 0 0 1 2.5 8.242`,key:`1pljnt`}],[`path`,{d:`m8 17 4-4 4 4`,key:`1quai1`}]]),ee=h(`code-xml`,[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]]),te=h(`container`,[[`path`,{d:`M22 7.7c0-.6-.4-1.2-.8-1.5l-6.3-3.9a1.72 1.72 0 0 0-1.7 0l-10.3 6c-.5.2-.9.8-.9 1.4v6.6c0 .5.4 1.2.8 1.5l6.3 3.9a1.72 1.72 0 0 0 1.7 0l10.3-6c.5-.3.9-1 .9-1.5Z`,key:`1t2lqe`}],[`path`,{d:`M10 21.9V14L2.1 9.1`,key:`o7czzq`}],[`path`,{d:`m10 14 11.9-6.9`,key:`zm5e20`}],[`path`,{d:`M14 19.8v-8.1`,key:`159ecu`}],[`path`,{d:`M18 17.5V9.4`,key:`11uown`}]]),R=h(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),z=h(`database`,[[`ellipse`,{cx:`12`,cy:`5`,rx:`9`,ry:`3`,key:`msslwz`}],[`path`,{d:`M3 5V19A9 3 0 0 0 21 19V5`,key:`1wlel7`}],[`path`,{d:`M3 12A9 3 0 0 0 21 12`,key:`mv7ke4`}]]),B=h(`earth`,[[`path`,{d:`M21.54 15H17a2 2 0 0 0-2 2v4.54`,key:`1djwo0`}],[`path`,{d:`M7 3.34V5a3 3 0 0 0 3 3a2 2 0 0 1 2 2c0 1.1.9 2 2 2a2 2 0 0 0 2-2c0-1.1.9-2 2-2h3.17`,key:`1tzkfa`}],[`path`,{d:`M11 21.95V18a2 2 0 0 0-2-2a2 2 0 0 1-2-2v-1a2 2 0 0 0-2-2H2.05`,key:`14pb5j`}],[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}]]),V=h(`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`}]]),H=h(`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`}]]),U=h(`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`}]]),W=h(`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`}]]),G=h(`file-archive`,[[`path`,{d:`M13.659 22H18a2 2 0 0 0 2-2V8a2.4 2.4 0 0 0-.706-1.706l-3.588-3.588A2.4 2.4 0 0 0 14 2H6a2 2 0 0 0-2 2v11.5`,key:`4pqfef`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 12v-1`,key:`1ej8lb`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M8 7V6`,key:`1nbb54`}],[`circle`,{cx:`8`,cy:`20`,r:`2`,key:`ckkr5m`}]]),K=h(`file-braces`,[[`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 12a1 1 0 0 0-1 1v1a1 1 0 0 1-1 1 1 1 0 0 1 1 1v1a1 1 0 0 0 1 1`,key:`1oajmo`}],[`path`,{d:`M14 18a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1 1 1 0 0 1-1-1v-1a1 1 0 0 0-1-1`,key:`mpwhp6`}]]),q=h(`file-code-corner`,[[`path`,{d:`M4 12.15V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3.35`,key:`1wthlu`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`m5 16-3 3 3 3`,key:`331omg`}],[`path`,{d:`m9 22 3-3-3-3`,key:`lsp7cz`}]]),J=h(`file-cog`,[[`path`,{d:`M15 8a1 1 0 0 1-1-1V2a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8z`,key:`1ckgky`}],[`path`,{d:`M20 8v12a2 2 0 0 1-2 2h-4.182`,key:`1726p0`}],[`path`,{d:`m3.305 19.53.923-.382`,key:`ao1pio`}],[`path`,{d:`M4 10.592V4a2 2 0 0 1 2-2h8`,key:`1foop0`}],[`path`,{d:`m4.228 16.852-.924-.383`,key:`1fv9zy`}],[`path`,{d:`m5.852 15.228-.383-.923`,key:`1a9hc2`}],[`path`,{d:`m5.852 20.772-.383.924`,key:`1sh9ke`}],[`path`,{d:`m8.148 15.228.383-.923`,key:`4yu6lf`}],[`path`,{d:`m8.53 21.696-.382-.924`,key:`18b0s9`}],[`path`,{d:`m9.773 16.852.922-.383`,key:`ti6xop`}],[`path`,{d:`m9.773 19.148.922.383`,key:`rws47d`}],[`circle`,{cx:`7`,cy:`18`,r:`3`,key:`lvkj7j`}]]),Y=h(`file-diff`,[[`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:`M9 10h6`,key:`9gxzsh`}],[`path`,{d:`M12 13V7`,key:`h0r20n`}],[`path`,{d:`M9 17h6`,key:`r8uit2`}]]),X=h(`file-image`,[[`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`}],[`circle`,{cx:`10`,cy:`12`,r:`2`,key:`737tya`}],[`path`,{d:`m20 17-1.296-1.296a2.41 2.41 0 0 0-3.408 0L9 22`,key:`wt3hpn`}]]),Z=h(`file-lock`,[[`path`,{d:`M4 9.8V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.706.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2h-3`,key:`1432pc`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M9 17v-2a2 2 0 0 0-4 0v2`,key:`168m41`}],[`rect`,{width:`8`,height:`5`,x:`3`,y:`17`,rx:`1`,key:`o8vfew`}]]),Q=h(`file-spreadsheet`,[[`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:`M8 13h2`,key:`yr2amv`}],[`path`,{d:`M14 13h2`,key:`un5t4a`}],[`path`,{d:`M8 17h2`,key:`2yhykz`}],[`path`,{d:`M14 17h2`,key:`10kma7`}]]),ne=h(`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`}]]),re=h(`file`,[[`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`}]]),ie=h(`folder-git-2`,[[`path`,{d:`M18 19a5 5 0 0 1-5-5v8`,key:`sz5oeg`}],[`path`,{d:`M9 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 2v5`,key:`1w6njk`}],[`circle`,{cx:`13`,cy:`12`,r:`2`,key:`1j92g6`}],[`circle`,{cx:`20`,cy:`19`,r:`2`,key:`1obnsp`}]]),ae=h(`folder-open`,[[`path`,{d:`m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 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.9H18a2 2 0 0 1 2 2v2`,key:`usdka0`}]]),oe=h(`folder-plus`,[[`path`,{d:`M12 10v6`,key:`1bos4e`}],[`path`,{d:`M9 13h6`,key:`1uhe8q`}],[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),se=h(`folder`,[[`path`,{d:`M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z`,key:`1kt360`}]]),ce=h(`gauge`,[[`path`,{d:`m12 14 4-4`,key:`9kzdfg`}],[`path`,{d:`M3.34 19a10 10 0 1 1 17.32 0`,key:`19p75a`}]]),le=h(`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`}]]),ue=h(`git-commit-horizontal`,[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]]),de=h(`git-graph`,[[`circle`,{cx:`5`,cy:`6`,r:`3`,key:`1qnov2`}],[`path`,{d:`M5 9v6`,key:`158jrl`}],[`circle`,{cx:`5`,cy:`18`,r:`3`,key:`104gr9`}],[`path`,{d:`M12 3v18`,key:`108xh3`}],[`circle`,{cx:`19`,cy:`6`,r:`3`,key:`108a5v`}],[`path`,{d:`M16 15.7A9 9 0 0 0 19 9`,key:`1e3vqb`}]]),fe=h(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),pe=h(`hash`,[[`line`,{x1:`4`,x2:`20`,y1:`9`,y2:`9`,key:`4lhtct`}],[`line`,{x1:`4`,x2:`20`,y1:`15`,y2:`15`,key:`vyu0kd`}],[`line`,{x1:`10`,x2:`8`,y1:`3`,y2:`21`,key:`1ggp8o`}],[`line`,{x1:`16`,x2:`14`,y1:`3`,y2:`21`,key:`weycgp`}]]),me=h(`info`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 16v-4`,key:`1dtifu`}],[`path`,{d:`M12 8h.01`,key:`e9boi3`}]]),he=h(`list`,[[`path`,{d:`M3 5h.01`,key:`18ugdj`}],[`path`,{d:`M3 12h.01`,key:`nlz23k`}],[`path`,{d:`M3 19h.01`,key:`noohij`}],[`path`,{d:`M8 5h13`,key:`1pao27`}],[`path`,{d:`M8 12h13`,key:`1za7za`}],[`path`,{d:`M8 19h13`,key:`m83p4d`}]]),ge=h(`loader-circle`,[[`path`,{d:`M21 12a9 9 0 1 1-6.219-8.56`,key:`13zald`}]]),_e=h(`log-out`,[[`path`,{d:`m16 17 5-5-5-5`,key:`1bji2h`}],[`path`,{d:`M21 12H9`,key:`dn1m92`}],[`path`,{d:`M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4`,key:`1uf3rs`}]]),ve=h(`maximize-2`,[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`m21 3-7 7`,key:`1l2asr`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M9 21H3v-6`,key:`wtvkvv`}]]),ye=h(`menu`,[[`path`,{d:`M4 5h16`,key:`1tepv9`}],[`path`,{d:`M4 12h16`,key:`1lakjw`}],[`path`,{d:`M4 19h16`,key:`1djgab`}]]),be=h(`message-square-plus`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M12 8v6`,key:`1ib9pf`}],[`path`,{d:`M9 11h6`,key:`1fldmi`}]]),xe=h(`message-square-text`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}],[`path`,{d:`M7 11h10`,key:`1twpyw`}],[`path`,{d:`M7 15h6`,key:`d9of3u`}],[`path`,{d:`M7 7h8`,key:`af5zfr`}]]),Se=h(`message-square`,[[`path`,{d:`M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z`,key:`18887p`}]]),Ce=h(`minimize-2`,[[`path`,{d:`m14 10 7-7`,key:`oa77jy`}],[`path`,{d:`M20 10h-6V4`,key:`mjg0md`}],[`path`,{d:`m3 21 7-7`,key:`tjx5ai`}],[`path`,{d:`M4 14h6v6`,key:`rmj7iw`}]]),we=h(`minus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}]]),Te=h(`palette`,[[`path`,{d:`M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z`,key:`e79jfc`}],[`circle`,{cx:`13.5`,cy:`6.5`,r:`.5`,fill:`currentColor`,key:`1okk4w`}],[`circle`,{cx:`17.5`,cy:`10.5`,r:`.5`,fill:`currentColor`,key:`f64h9f`}],[`circle`,{cx:`6.5`,cy:`12.5`,r:`.5`,fill:`currentColor`,key:`qy21gx`}],[`circle`,{cx:`8.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`fotxhn`}]]),Ee=h(`panel-left-open`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}],[`path`,{d:`m14 9 3 3-3 3`,key:`8010ee`}]]),De=h(`panel-left`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M9 3v18`,key:`fh3hqa`}]]),Oe=h(`panel-right`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}],[`path`,{d:`M15 3v18`,key:`14nvp0`}]]),ke=h(`pen-line`,[[`path`,{d:`M13 21h8`,key:`1jsn5i`}],[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}]]),Ae=h(`pencil`,[[`path`,{d:`M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z`,key:`1a8usu`}],[`path`,{d:`m15 5 4 4`,key:`1mk7zo`}]]),je=h(`pin-off`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M15 9.34V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H7.89`,key:`znwnzq`}],[`path`,{d:`m2 2 20 20`,key:`1ooewy`}],[`path`,{d:`M9 9v1.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h11`,key:`c9qhm2`}]]),Me=h(`pin`,[[`path`,{d:`M12 17v5`,key:`bb1du9`}],[`path`,{d:`M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z`,key:`1nkz8b`}]]),Ne=h(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),Pe=h(`puzzle`,[[`path`,{d:`M15.39 4.39a1 1 0 0 0 1.68-.474 2.5 2.5 0 1 1 3.014 3.015 1 1 0 0 0-.474 1.68l1.683 1.682a2.414 2.414 0 0 1 0 3.414L19.61 15.39a1 1 0 0 1-1.68-.474 2.5 2.5 0 1 0-3.014 3.015 1 1 0 0 1 .474 1.68l-1.683 1.682a2.414 2.414 0 0 1-3.414 0L8.61 19.61a1 1 0 0 0-1.68.474 2.5 2.5 0 1 1-3.014-3.015 1 1 0 0 0 .474-1.68l-1.683-1.682a2.414 2.414 0 0 1 0-3.414L4.39 8.61a1 1 0 0 1 1.68.474 2.5 2.5 0 1 0 3.014-3.015 1 1 0 0 1-.474-1.68l1.683-1.682a2.414 2.414 0 0 1 3.414 0z`,key:`w46dr5`}]]),Fe=h(`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`}]]),Ie=h(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),Le=h(`rotate-cw`,[[`path`,{d:`M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8`,key:`1p45f6`}],[`path`,{d:`M21 3v5h-5`,key:`1q7to0`}]]),Re=h(`scroll`,[[`path`,{d:`M19 17V5a2 2 0 0 0-2-2H4`,key:`zz82l3`}],[`path`,{d:`M8 21h12a2 2 0 0 0 2-2v-1a1 1 0 0 0-1-1H11a1 1 0 0 0-1 1v1a2 2 0 1 1-4 0V5a2 2 0 1 0-4 0v2a1 1 0 0 0 1 1h3`,key:`1ph1d7`}]]),ze=h(`search`,[[`path`,{d:`m21 21-4.34-4.34`,key:`14j7rj`}],[`circle`,{cx:`11`,cy:`11`,r:`8`,key:`4ej97u`}]]),Be=h(`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`}]]),Ve=h(`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`}]]),$=h(`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`}]]),He=h(`share-2`,[[`circle`,{cx:`18`,cy:`5`,r:`3`,key:`gq8acd`}],[`circle`,{cx:`6`,cy:`12`,r:`3`,key:`w7nqdw`}],[`circle`,{cx:`18`,cy:`19`,r:`3`,key:`1xt0gg`}],[`line`,{x1:`8.59`,x2:`15.42`,y1:`13.51`,y2:`17.49`,key:`47mynk`}],[`line`,{x1:`15.41`,x2:`8.59`,y1:`6.51`,y2:`10.49`,key:`1n3mei`}]]),Ue=h(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),We=h(`shield`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}]]),Ge=h(`sliders-horizontal`,[[`path`,{d:`M10 5H3`,key:`1qgfaw`}],[`path`,{d:`M12 19H3`,key:`yhmn1j`}],[`path`,{d:`M14 3v4`,key:`1sua03`}],[`path`,{d:`M16 17v4`,key:`1q0r14`}],[`path`,{d:`M21 12h-9`,key:`1o4lsq`}],[`path`,{d:`M21 19h-5`,key:`1rlt1p`}],[`path`,{d:`M21 5h-7`,key:`1oszz2`}],[`path`,{d:`M8 10v4`,key:`tgpxqk`}],[`path`,{d:`M8 12H3`,key:`a7s4jb`}]]),Ke=h(`sparkles`,[[`path`,{d:`M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z`,key:`1s2grr`}],[`path`,{d:`M20 2v4`,key:`1rf3ol`}],[`path`,{d:`M22 4h-4`,key:`gwowj6`}],[`circle`,{cx:`4`,cy:`20`,r:`2`,key:`6kqj1y`}]]),qe=h(`square-terminal`,[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]]),Je=h(`tag`,[[`path`,{d:`M12.586 2.586A2 2 0 0 0 11.172 2H4a2 2 0 0 0-2 2v7.172a2 2 0 0 0 .586 1.414l8.704 8.704a2.426 2.426 0 0 0 3.42 0l6.58-6.58a2.426 2.426 0 0 0 0-3.42z`,key:`vktsd0`}],[`circle`,{cx:`7.5`,cy:`7.5`,r:`.5`,fill:`currentColor`,key:`kqv944`}]]),Ye=h(`terminal`,[[`path`,{d:`M12 19h8`,key:`baeox8`}],[`path`,{d:`m4 17 6-6-6-6`,key:`1yngyt`}]]),Xe=h(`trash-2`,[[`path`,{d:`M10 11v6`,key:`nco0om`}],[`path`,{d:`M14 11v6`,key:`outv1u`}],[`path`,{d:`M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6`,key:`miytrc`}],[`path`,{d:`M3 6h18`,key:`d0wm0j`}],[`path`,{d:`M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2`,key:`e791ji`}]]),Ze=h(`triangle-alert`,[[`path`,{d:`m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3`,key:`wmoenq`}],[`path`,{d:`M12 9v4`,key:`juzpu7`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]]),Qe=h(`wrench`,[[`path`,{d:`M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z`,key:`1ngwbx`}]]),$e=h(`x`,[[`path`,{d:`M18 6 6 18`,key:`1bl5f8`}],[`path`,{d:`m6 6 12 12`,key:`d8bk6v`}]]),et=h(`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`}]]);export{re as $,Ee as A,T as At,ge as B,f as Bt,Ne as C,M as Ct,ke as D,O as Dt,Ae as E,k as Et,xe as F,b as Ft,de as G,me as H,be as I,y as It,ce as J,ue as K,ye as L,v as Lt,we as M,C as Mt,Ce as N,S as Nt,Oe as O,D as Ot,Se as P,x as Pt,ie as Q,ve as R,_ as Rt,Pe as S,N as St,je as T,A as Tt,pe as U,he as V,r as Vt,fe as W,oe as X,se as Y,ae as Z,ze as _,ee as _t,Xe as a,J as at,Ie as b,F as bt,qe as c,G as ct,We as d,H as dt,ne as et,Ue as f,V as ft,Be as g,te as gt,Ve as h,R as ht,Ze as i,Y as it,Te as j,w as jt,De as k,E as kt,Ke as l,W as lt,$ as m,z as mt,$e as n,Z as nt,Ye as o,q as ot,He as p,B as pt,le as q,Qe as r,X as rt,Je as s,K as st,et as t,Q as tt,Ge as u,U as ut,Re as v,L as vt,Me as w,j as wt,Fe as x,P as xt,Le as y,I as yt,_e as z,g as zt};