@gobing-ai/spur 0.3.78 → 0.3.81

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 (177) hide show
  1. package/.claude-plugin/marketplace.json +1 -1
  2. package/config/config.example.yaml +29 -18
  3. package/config/config.global.yaml +10 -11
  4. package/config/pipeline-budgets.json +34 -2
  5. package/config/plugin-scripts.json +25 -0
  6. package/config/rules/boundary/config-loading-ownership.yaml +0 -3
  7. package/config/rules/boundary/dao-boundary.yaml +4 -17
  8. package/config/rules/boundary/planning-folder-hardcode.yaml +0 -1
  9. package/config/rules/boundary/sp-no-vendor-refs.yaml +3 -2
  10. package/config/rules/boundary/sp-runtime-path.yaml +3 -14
  11. package/config/rules/quality/coverage-gate.yaml +3 -14
  12. package/config/rules/quality/tsdoc-exports.yaml +4 -7
  13. package/config/rules/strict/http-boundaries.yaml +5 -8
  14. package/config/rules/strict/runtime-boundaries.yaml +1 -5
  15. package/config/rules/structure/protected-files.yaml +9 -3
  16. package/config/rules/structure/test-focus-skip.yaml +0 -2
  17. package/config/rules/structure/test-location.yaml +0 -5
  18. package/config/rules/surface/check-cli-surface.yaml +3 -2
  19. package/config/rules/typescript/bun-tooling.yaml +5 -7
  20. package/config/rules/typescript/guarded-happy-dom-register.yaml +0 -2
  21. package/config/rules/typescript/happy-dom-teardown.yaml +0 -2
  22. package/config/rules/typescript/no-biome-suppressions.yaml +0 -2
  23. package/config/rules/typescript/no-debugger.yaml +0 -2
  24. package/config/rules/typescript/no-eslint-suppressions.yaml +0 -4
  25. package/config/rules/typescript/no-leaky-module-mocks.yaml +6 -13
  26. package/config/rules/typescript/no-module-scope-import-calls.yaml +0 -2
  27. package/config/rules/typescript/no-syscall-emulation-in-boundary-mock.yaml +0 -3
  28. package/config/rules/typescript/no-unmocked-module-eval-side-effects.yaml +0 -3
  29. package/config/rules/typescript/output-boundaries.yaml +0 -3
  30. package/config/rules/typescript/prefer-accessible-role-for-button-queries.yaml +0 -3
  31. package/config/rules/ui/ui-import-boundary.yaml +1 -5
  32. package/config/templates/AGENTS.md +26 -23
  33. package/config/templates/docs/00_ADR.md +13 -23
  34. package/config/templates/docs/01_PRD.md +5 -2
  35. package/config/templates/docs/02_ROADMAP.md +9 -13
  36. package/config/templates/docs/03_ARCHITECTURE.md +2 -2
  37. package/config/templates/docs/04_DESIGN.md +12 -31
  38. package/config/templates/docs/05_FEATURES.md +6 -18
  39. package/config/templates/docs/99_PROJECT_CONSTITUTION.md +162 -394
  40. package/config/transition-shims.json +7 -7
  41. package/config/workflows/basic.yaml +4 -0
  42. package/config/workflows/docs-pipeline.yaml +13 -14
  43. package/config/workflows/feature-dev.yaml +20 -65
  44. package/config/workflows/history-anatomy.yaml +22 -1
  45. package/config/workflows/idea-pipeline.yaml +53 -97
  46. package/config/workflows/pr-review.yaml +21 -33
  47. package/config/workflows/task-pipeline.yaml +87 -330
  48. package/config/workflows/wayfinder-resolution.yaml +12 -26
  49. package/config/workflows/wrapup-pipeline.yaml +48 -189
  50. package/package.json +9 -9
  51. package/plugins/sp/README.md +22 -8
  52. package/plugins/sp/agents/expert-spur.md +41 -19
  53. package/plugins/sp/agents/super-reviewer.md +43 -8
  54. package/plugins/sp/lib/idea-handoff.generated.d.mts +17 -0
  55. package/plugins/sp/lib/idea-handoff.generated.mjs +1301 -0
  56. package/plugins/sp/plugin.json +1 -1
  57. package/plugins/sp/scripts/feature-dev-precheck.mjs +146 -0
  58. package/plugins/sp/scripts/feature-dev-precheck.ts +238 -0
  59. package/plugins/sp/scripts/idea-handoff.mjs +27 -0
  60. package/plugins/sp/scripts/idea-handoff.ts +44 -0
  61. package/plugins/sp/scripts/quality-gate.mjs +165 -0
  62. package/plugins/sp/scripts/quality-gate.ts +217 -0
  63. package/plugins/sp/scripts/verify-answer-lint.ts +21 -3
  64. package/plugins/sp/scripts/workflow-step-profile.mjs +319 -0
  65. package/plugins/sp/scripts/workflow-step-profile.ts +456 -0
  66. package/plugins/sp/scripts/wrapup-steps.mjs +350 -0
  67. package/plugins/sp/scripts/wrapup-steps.ts +466 -0
  68. package/plugins/sp/skills/conflict-finding/SKILL.md +6 -0
  69. package/plugins/sp/skills/daily-summary/SKILL.md +1 -1
  70. package/plugins/sp/skills/doc-evolve/SKILL.md +26 -40
  71. package/plugins/sp/skills/doc-evolve/references/operations.md +17 -30
  72. package/plugins/sp/skills/parallel-execution/references/dispatch-surface.md +1 -1
  73. package/plugins/sp/skills/spec-decomposition/references/decomposition.md +29 -0
  74. package/plugins/sp/skills/spur-cli/references/agent.md +56 -14
  75. package/plugins/sp/skills/spur-cli/references/message.md +30 -3
  76. package/plugins/sp/skills/spur-cli/references/projects.md +45 -1
  77. package/plugins/sp/skills/spur-cli/references/self.md +5 -4
  78. package/plugins/sp/skills/spur-cli/references/serve.md +5 -4
  79. package/plugins/sp/skills/spur-cli/references/tasks/verbs.md +17 -1
  80. package/plugins/sp/skills/spur-cli/references/tasks.md +32 -2
  81. package/plugins/sp/skills/spur-cli/references/team.md +21 -1
  82. package/plugins/sp/skills/spur-cli/references/workflows/operations.md +6 -3
  83. package/plugins/sp/skills/spur-cli/references/workflows/workflow-fit-and-tuning.md +57 -18
  84. package/plugins/sp/skills/spur-composer/SKILL.md +145 -0
  85. package/plugins/sp/skills/spur-dev/references/ac-style-guide.md +14 -0
  86. package/plugins/sp/skills/spur-dev/references/cross-cutting.md +3 -3
  87. package/plugins/sp/skills/spur-dev/references/done-housekeeping.md +12 -0
  88. package/plugins/sp/skills/spur-dev/references/inline-pipeline-driver.md +46 -4
  89. package/plugins/sp/skills/spur-dev/references/planning-workflow.md +24 -0
  90. package/plugins/sp/skills/spur-doctor/SKILL.md +138 -0
  91. package/plugins/sp/skills/taste-refactoring-api/README.md +43 -0
  92. package/plugins/sp/skills/taste-refactoring-api/SKILL.md +334 -0
  93. package/plugins/sp/skills/taste-refactoring-api/checklists/daily-api-review.md +71 -0
  94. package/plugins/sp/skills/taste-refactoring-api/examples/refactor-example.md +72 -0
  95. package/plugins/sp/skills/taste-refactoring-api/examples/review-template.md +93 -0
  96. package/plugins/sp/skills/taste-refactoring-api/references/api-refactoring-playbook.md +253 -0
  97. package/plugins/sp/skills/taste-refactoring-api/references/protocol-modes.md +79 -0
  98. package/plugins/sp/skills/taste-refactoring-api/references/research-basis.md +58 -0
  99. package/plugins/sp/skills/taste-refactoring-architect/README.md +26 -0
  100. package/plugins/sp/skills/taste-refactoring-architect/SKILL.md +471 -0
  101. package/plugins/sp/skills/taste-refactoring-architect/checklists/daily-architecture-review.md +48 -0
  102. package/plugins/sp/skills/taste-refactoring-architect/examples/refactor-example.md +55 -0
  103. package/plugins/sp/skills/taste-refactoring-architect/examples/review-template.md +51 -0
  104. package/plugins/sp/skills/taste-refactoring-architect/references/architecture-refactoring-playbook.md +173 -0
  105. package/plugins/sp/skills/taste-refactoring-architect/references/research-basis.md +28 -0
  106. package/plugins/sp/skills/taste-refactoring-tests/README.md +28 -0
  107. package/plugins/sp/skills/taste-refactoring-tests/SKILL.md +482 -0
  108. package/plugins/sp/skills/taste-refactoring-tests/checklists/daily-test-review.md +39 -0
  109. package/plugins/sp/skills/taste-refactoring-tests/examples/refactor-example.md +85 -0
  110. package/plugins/sp/skills/taste-refactoring-tests/examples/review-template.md +59 -0
  111. package/plugins/sp/skills/taste-refactoring-tests/references/research-basis.md +47 -0
  112. package/plugins/sp/skills/taste-refactoring-tests/references/test-refactoring-playbook.md +222 -0
  113. package/plugins/sp/skills/taste-refactoring-ui/README.md +12 -0
  114. package/plugins/sp/skills/taste-refactoring-ui/SKILL.md +290 -0
  115. package/plugins/sp/skills/taste-refactoring-ui/checklists/daily-ui-review.md +72 -0
  116. package/plugins/sp/skills/taste-refactoring-ui/examples/review-template.md +51 -0
  117. package/plugins/sp/skills/taste-refactoring-ui/references/refactoring-ui-playbook.md +170 -0
  118. package/plugins/sp/skills/wayfinder/SKILL.md +2 -2
  119. package/plugins/sp/skills/wayfinder/references/pipeline-resolution.md +30 -0
  120. package/schemas/spur-config.schema.json +49 -0
  121. package/spur.js +46936 -44198
  122. package/web/_astro/{BoardApp.CHQ1lycZ.js → BoardApp.B1U26g3I.js} +97 -95
  123. package/web/_astro/BoardApp.Csgyg-lS.js +1 -0
  124. package/web/_astro/{TaskDetail.GKfQJ60c.js → TaskDetail.DwPqpq7v.js} +1 -1
  125. package/web/_astro/{arc.DWEtA3Tx.js → arc.CweZEjN2.js} +1 -1
  126. package/web/_astro/{architectureDiagram-3BPJPVTR.DB42oWmP.js → architectureDiagram-3BPJPVTR.D89pbDuv.js} +1 -1
  127. package/web/_astro/{blockDiagram-GPEHLZMM.rhv-zNQV.js → blockDiagram-GPEHLZMM.BOuTeEpX.js} +1 -1
  128. package/web/_astro/{c4Diagram-AAUBKEIU.Ci4-4VvY.js → c4Diagram-AAUBKEIU.CASbkWZF.js} +1 -1
  129. package/web/_astro/channel.Cx6sXxhq.js +1 -0
  130. package/web/_astro/{chunk-2J33WTMH.Cc9veUgf.js → chunk-2J33WTMH.BKQYtOvY.js} +1 -1
  131. package/web/_astro/{chunk-4BX2VUAB.Bec9c4eI.js → chunk-4BX2VUAB.9sHLdMtG.js} +1 -1
  132. package/web/_astro/{chunk-55IACEB6.DoV8S1iB.js → chunk-55IACEB6.wOLXWlPs.js} +1 -1
  133. package/web/_astro/{chunk-727SXJPM.DwR-Qlyj.js → chunk-727SXJPM.DovFbwg3.js} +1 -1
  134. package/web/_astro/{chunk-AQP2D5EJ.ND_a81WY.js → chunk-AQP2D5EJ.B1Weod1X.js} +1 -1
  135. package/web/_astro/{chunk-FMBD7UC4.Wv_jwG48.js → chunk-FMBD7UC4.TEMS04st.js} +1 -1
  136. package/web/_astro/{chunk-ND2GUHAM.CXKXCMmp.js → chunk-ND2GUHAM.Cp8VT1wQ.js} +1 -1
  137. package/web/_astro/{chunk-QZHKN3VN.nkaoNYQq.js → chunk-QZHKN3VN.BzATdEcP.js} +1 -1
  138. package/web/_astro/{classDiagram-4FO5ZUOK.cMQcVlQu.js → classDiagram-4FO5ZUOK.C9BOCfAO.js} +1 -1
  139. package/web/_astro/{classDiagram-v2-Q7XG4LA2.cMQcVlQu.js → classDiagram-v2-Q7XG4LA2.C9BOCfAO.js} +1 -1
  140. package/web/_astro/{cose-bilkent-S5V4N54A.OaDJ7Mr2.js → cose-bilkent-S5V4N54A.DUnr4UAw.js} +1 -1
  141. package/web/_astro/{cynefin-OW5HDTMX.Chi8IphF.js → cynefin-OW5HDTMX.rYq5uM3D.js} +1 -1
  142. package/web/_astro/{cytoscape.esm.DzSz-X2X.js → cytoscape.esm.BB4DxJjf.js} +1 -1
  143. package/web/_astro/{dagre-BM42HDAG.CzK2t_Fp.js → dagre-BM42HDAG.CWeNKe3I.js} +1 -1
  144. package/web/_astro/{diagram-2AECGRRQ.DRvxlVS7.js → diagram-2AECGRRQ.DCkfls10.js} +1 -1
  145. package/web/_astro/{diagram-5GNKFQAL.CnYvNdwA.js → diagram-5GNKFQAL.D5U4JCka.js} +1 -1
  146. package/web/_astro/{diagram-KO2AKTUF.CpLpMw5R.js → diagram-KO2AKTUF.BZJgqaqG.js} +1 -1
  147. package/web/_astro/{diagram-LMA3HP47.JTb78qUA.js → diagram-LMA3HP47.DoMeHvPR.js} +1 -1
  148. package/web/_astro/{diagram-OG6HWLK6.Bk-1jDIb.js → diagram-OG6HWLK6.B50qwwWX.js} +1 -1
  149. package/web/_astro/{erDiagram-TEJ5UH35.D8hN9GZq.js → erDiagram-TEJ5UH35.DdGPG6LK.js} +1 -1
  150. package/web/_astro/{flowDiagram-I6XJVG4X.-6zQr6m5.js → flowDiagram-I6XJVG4X.QP2MJ12u.js} +1 -1
  151. package/web/_astro/{ganttDiagram-6RSMTGT7.DboLQ9ca.js → ganttDiagram-6RSMTGT7.BI6LgKSy.js} +1 -1
  152. package/web/_astro/{gitGraphDiagram-PVQCEYII.4tYvJKGR.js → gitGraphDiagram-PVQCEYII.npPZiC2G.js} +1 -1
  153. package/web/_astro/index.DayyIngm.css +1 -0
  154. package/web/_astro/{infoDiagram-5YYISTIA.Bd9rXpsB.js → infoDiagram-5YYISTIA.DCJCBVbp.js} +1 -1
  155. package/web/_astro/{ishikawaDiagram-YF4QCWOH.CvMoaf67.js → ishikawaDiagram-YF4QCWOH.BMLV-3I1.js} +1 -1
  156. package/web/_astro/{journeyDiagram-JHISSGLW.Ccy1CA7y.js → journeyDiagram-JHISSGLW.LE58crde.js} +1 -1
  157. package/web/_astro/{kanban-definition-UN3LZRKU.0MaMqHNS.js → kanban-definition-UN3LZRKU.BPbz8rH9.js} +1 -1
  158. package/web/_astro/{linear.CHXgcIbN.js → linear.DhZaBtYh.js} +1 -1
  159. package/web/_astro/{mermaid.core.Ca-kcelG.js → mermaid.core.BD5-jXum.js} +6 -6
  160. package/web/_astro/{mindmap-definition-RKZ34NQL.BUIDlHa0.js → mindmap-definition-RKZ34NQL.MTJyrQ65.js} +1 -1
  161. package/web/_astro/ordinal.BYWQX77i.js +1 -0
  162. package/web/_astro/{pieDiagram-4H26LBE5.2dX3CU1s.js → pieDiagram-4H26LBE5.BrDhDvIS.js} +1 -1
  163. package/web/_astro/{quadrantDiagram-W4KKPZXB.B3LBlRiv.js → quadrantDiagram-W4KKPZXB.71d73_5N.js} +1 -1
  164. package/web/_astro/{requirementDiagram-4Y6WPE33.X12I2uNx.js → requirementDiagram-4Y6WPE33.Bga6UF-z.js} +1 -1
  165. package/web/_astro/{sankeyDiagram-5OEKKPKP.BXohIHqx.js → sankeyDiagram-5OEKKPKP.BnHs4K82.js} +1 -1
  166. package/web/_astro/{sequenceDiagram-3UESZ5HK.C37ZIUzg.js → sequenceDiagram-3UESZ5HK.DsfY2gnj.js} +1 -1
  167. package/web/_astro/{stateDiagram-AJRCARHV.BRgz317z.js → stateDiagram-AJRCARHV.DvsTSc9a.js} +1 -1
  168. package/web/_astro/{stateDiagram-v2-BHNVJYJU.7VYSXN9-.js → stateDiagram-v2-BHNVJYJU.DxzzmHUR.js} +1 -1
  169. package/web/_astro/{timeline-definition-PNZ67QCA.BVNz_HiN.js → timeline-definition-PNZ67QCA.4ZuQmOTt.js} +1 -1
  170. package/web/_astro/{vennDiagram-CIIHVFJN.CHVDkPX4.js → vennDiagram-CIIHVFJN.Ck5Q86SG.js} +1 -1
  171. package/web/_astro/{wardleyDiagram-YWT4CUSO.EQQ_qT9v.js → wardleyDiagram-YWT4CUSO.BK7k2hXr.js} +1 -1
  172. package/web/_astro/{xychartDiagram-2RQKCTM6.DrAT9WoP.js → xychartDiagram-2RQKCTM6.DfCrgauK.js} +1 -1
  173. package/web/index.html +2 -2
  174. package/web/_astro/BoardApp.DV9kx0wo.js +0 -1
  175. package/web/_astro/channel.BAI6xLeV.js +0 -1
  176. package/web/_astro/index.Dcr_8fiK.css +0 -1
  177. package/web/_astro/ordinal.DBvzRdQf.js +0 -1
@@ -0,0 +1 @@
1
+ import{d as a}from"./BoardApp.B1U26g3I.js";import"./index.De90oHcH.js";export{a as default};
@@ -1 +1 @@
1
- import{u as ne,a as m,j as e,t as K,B as l,b as E,L as le,M as ie,c as de,S as ce,C as oe}from"./BoardApp.CHQ1lycZ.js";import{r}from"./index.De90oHcH.js";const xe={backlog:["refine","start","cancel"],todo:["plan","run","decompose","add-subtask","link-feature","block","cancel"],wip:["run","add-subtask","link-feature","block","cancel"],testing:["verify","complete","block","cancel"],blocked:["refine","unblock","cancel"],done:["reopen"],cancelled:[]},D={refine:"Refine",plan:"Plan",run:"Run",verify:"Verify",decompose:"Decompose","add-subtask":"+ Subtask","link-feature":"Link Feature",start:"Start",complete:"Complete",reopen:"Reopen",block:"Block",unblock:"Unblock",cancel:"Cancel"},ue={start:"todo",complete:"done",reopen:"wip",block:"blocked",unblock:"todo",cancel:"cancelled"},g=["backlog","todo","wip","testing","done"],pe=new Set(["blocked","cancelled"]);function he({task:a,onTransition:z,onClose:M}){const[f,h]=r.useState(""),[j,o]=r.useState(""),[T,x]=r.useState("preview"),[I,L]=r.useState(!1),[v,A]=r.useState(!1),[i,H]=r.useState({}),[b,U]=r.useState(!1),[w,B]=r.useState(null),[V,u]=r.useState(!1),[d,p]=r.useState(null),[_,W]=r.useState("claude"),[F,Y]=r.useState(!1),{setTasks:q}=ne(),N=a?.wbs;if(r.useEffect(()=>{if(!N){h(""),o(""),x("preview");return}let s=!1;return L(!0),m.task.show({wbs:N}).then(t=>{if(s)return;const{content:c,frontmatter:n}=t.data;h(c),o(c),H(n)}).catch(t=>{if(s)return;const c=t instanceof Error?t.message:"Failed to load task body";typeof window<"u"&&window.dispatchEvent(new CustomEvent("api-error",{detail:{message:c}}))}).finally(()=>{s||L(!1)}),()=>{s=!0}},[N]),!a)return e.jsx("div",{className:"flex items-center justify-center h-full text-spur-text-muted text-sm",children:"Select a task to view details"});const G=()=>{o(f),x("edit")},J=()=>{o(f),x("preview")},Q=async()=>{A(!0);try{await m.task.body({wbs:a.wbs,body:j}),h(j),x("preview");const t=(await m.task.show({wbs:a.wbs})).data.content;h(t),o(t)}catch(s){o(f),x("preview");const t=s instanceof Error?s.message:"Save failed";typeof window<"u"&&window.dispatchEvent(new CustomEvent("api-error",{detail:{message:t}}))}finally{A(!1)}},X=s=>{const t=ue[s];if(t!==void 0){if(s==="cancel"&&a){u(!0);return}a&&z(a.wbs,t);return}p(s)},Z=async()=>{if(!(!d||!a)){B(d),p(null);try{await m.task.action({wbs:a.wbs,action:d,channel:_,skipDeps:F});const s=await m.task.list({});q(s.data??[])}catch(s){const t=s instanceof Error?s.message:"Action failed";typeof window<"u"&&window.dispatchEvent(new CustomEvent("api-error",{detail:{message:t}}))}finally{B(null)}}},ee=s=>{const t=g.indexOf(s);return t>=0?t:-1},P=s=>{if(!s)return"";try{const t=new Date(s);return Number.isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}},R=s=>{if(!s)return"";try{const t=new Date(s);if(Number.isNaN(t.getTime()))return"";const c=Date.now()-t.getTime(),n=Math.floor(c/864e5);return n===0?"today":n===1?"yesterday":n<30?`${n}d ago`:n<365?`${Math.floor(n/30)}mo ago`:`${Math.floor(n/365)}y ago`}catch{return""}},y=Array.isArray(i.tags)?i.tags:[],k=P(i.created_at),se=R(i.created_at),C=P(i.updated_at),te=R(i.updated_at),$=ee(a.status),O=i.estimated_hours,S=i.impl_progress,ae=["planning","design","implementation","review","testing"],re=s=>s==="done"?"bg-spur-success":s==="in_progress"?"bg-spur-warning":"bg-spur-border";return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 p-3 border-b border-spur-border shrink-0",children:[e.jsxs("div",{className:"flex flex-col gap-1 overflow-hidden",children:[e.jsxs("h3",{className:"text-sm font-semibold text-spur-text truncate",children:[a.wbs," — ",a.name]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1","data-testid":"header-chips",children:[e.jsxs("span",{className:"px-2 py-0.5 rounded-full border border-spur-border text-xs text-spur-text-muted","data-testid":"status-pill",children:[K(a.status)," ",a.status]}),a.priority&&e.jsx("span",{className:"px-2 py-0.5 rounded-full bg-spur-surface-2 border border-spur-border text-xs text-spur-text-muted",children:a.priority}),a.featureId&&e.jsx("span",{className:"px-2 py-0.5 rounded-full bg-spur-surface-2 border border-spur-border text-xs text-spur-text-muted",children:a.featureId}),y.map(s=>e.jsx("span",{className:"px-2 py-0.5 rounded-full border border-spur-border text-xs text-spur-text-muted",children:s},s))]})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-1 shrink-0",children:[(xe[a.status]??[]).map(s=>e.jsx(l,{variant:s==="cancel"?"error":"accent",size:"xs",onClick:()=>X(s),disabled:w===s,"aria-label":D[s],children:w===s?"…":D[s]},s)),M&&e.jsx(l,{variant:"ghost",size:"xs",className:"text-spur-text-muted",onClick:M,"aria-label":"Close detail",children:"✕"})]})]}),e.jsxs("div",{className:"border-b border-spur-border shrink-0",children:[e.jsxs("button",{type:"button",onClick:()=>U(s=>!s),className:"flex items-center justify-between w-full p-3 text-xs font-semibold text-spur-text-muted uppercase tracking-wide hover:text-spur-text transition-colors","aria-expanded":b,children:[e.jsx("span",{children:"Metadata"}),e.jsxs("svg",{className:`w-3 h-3 transition-transform ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("title",{children:b?"Collapse metadata":"Expand metadata"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})]})]}),b&&e.jsxs("div",{className:"px-3 pb-3 space-y-3",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-spur-text-muted block mb-1.5",children:"Status"}),e.jsxs("span",{className:"text-sm text-spur-text","data-testid":"metadata-status",children:[K(a.status)," ",a.status]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-spur-text-muted block mb-1.5",children:"Progress"}),S?e.jsx("div",{className:"space-y-1",children:ae.map(s=>{const t=S[s]??"pending";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[10px] text-spur-text-muted w-20 shrink-0",children:s}),e.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-spur-border overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full ${re(t)}`,style:{width:t==="done"?"100%":t==="in_progress"?"50%":"0%"}})}),e.jsx("span",{className:"text-[10px] text-spur-text-muted w-16 shrink-0",children:t})]},s)})}):pe.has(a.status)?e.jsx(E,{variant:"warning",size:"xs",children:a.status}):e.jsx("div",{className:"flex items-center gap-1",children:g.map((s,t)=>{const c=t<=$,n=t===$;return e.jsxs("div",{className:"flex items-center gap-1 flex-1 last:flex-none",children:[e.jsx("div",{className:`h-1.5 rounded-full flex-1 ${c?"bg-spur-accent":"bg-spur-border"} ${n?"ring-1 ring-spur-accent/50":""}`,title:s}),t<g.length-1&&e.jsx("span",{className:"text-[10px] text-spur-text-muted w-0"})]},s)})}),!S&&e.jsx("div",{className:"flex justify-between mt-0.5",children:g.map(s=>e.jsx("span",{className:"text-[10px] text-spur-text-muted",children:s},s))})]}),(k||C)&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"text-xs text-spur-text-muted block",children:"Dates"}),k&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:"text-spur-text-muted w-14 shrink-0",children:"Created"}),e.jsx("span",{className:"text-spur-text",children:k}),e.jsxs("span",{className:"text-spur-text-muted",children:["(",se,")"]})]}),C&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:"text-spur-text-muted w-14 shrink-0",children:"Updated"}),e.jsx("span",{className:"text-spur-text",children:C}),e.jsxs("span",{className:"text-spur-text-muted",children:["(",te,")"]})]})]}),y.length>0&&e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-spur-text-muted block mb-1.5",children:"Tags"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:y.map(s=>e.jsx(E,{variant:"outline",size:"xs",className:"text-spur-text-muted",children:s},s))})]}),e.jsxs("div",{className:"space-y-1.5",children:[a.priority&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:"text-spur-text-muted w-14 shrink-0",children:"Priority"}),e.jsx(E,{variant:"outline",size:"xs",children:a.priority})]}),O!==void 0&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:"text-spur-text-muted w-14 shrink-0",children:"Est. Hours"}),e.jsxs("span",{className:"text-spur-text",children:[O,"h"]})]}),a.featureId&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:"text-spur-text-muted w-14 shrink-0",children:"Feature"}),e.jsx("span",{className:"text-spur-text",children:a.featureId})]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:"text-spur-text-muted w-14 shrink-0",children:"File"}),e.jsx("span",{className:"text-spur-text font-mono truncate",children:a.filePath})]})]})]})]}),e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden p-3","data-testid":"task-body-section",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2 shrink-0",children:[e.jsx("span",{className:"text-xs font-semibold text-spur-text-muted uppercase tracking-wide",children:"Body"}),e.jsx("div",{className:"flex gap-1",children:T==="preview"?e.jsx(l,{variant:"ghost",size:"xs",onClick:G,disabled:I,"aria-label":"Edit body",children:"Edit"}):e.jsxs(e.Fragment,{children:[e.jsx(l,{variant:"primary",size:"xs",onClick:Q,disabled:v,"aria-label":"Save body",children:v?"Saving…":"Save"}),e.jsx(l,{variant:"ghost",size:"xs",onClick:J,disabled:v,"aria-label":"Cancel edit",children:"Cancel"})]})})]}),I?e.jsxs("div",{className:"flex items-center gap-2 text-sm text-spur-text-muted",children:[e.jsx(le,{size:"xs",className:"text-spur-accent"}),"Loading body…"]}):T==="edit"?e.jsx("div",{className:"flex-1 min-h-0","data-testid":"body-editor",children:e.jsx(ie,{value:j,onChange:s=>o(s??""),height:"100%","data-color-mode":"light"})}):e.jsx("div",{className:"flex-1 overflow-y-auto","data-testid":"body-preview",children:e.jsx(de,{source:f})})]}),V&&e.jsx("div",{role:"dialog","aria-modal":"true","aria-label":"Confirm cancel task",tabIndex:-1,className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",onClick:s=>{s.target===s.currentTarget&&u(!1)},onKeyDown:s=>{s.key==="Escape"&&u(!1)},children:e.jsxs("div",{className:"bg-spur-surface border border-spur-border rounded-xl shadow-xl p-4 mx-4 max-w-xs w-full",children:[e.jsxs("p",{className:"text-sm text-spur-text mb-4",children:["Cancel task ",e.jsx("strong",{children:a.wbs}),"? This marks it as cancelled and cannot be undone from the board."]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(l,{variant:"ghost",size:"xs",onClick:()=>u(!1),children:"Keep"}),e.jsx(l,{variant:"error",size:"xs",onClick:()=>{u(!1),z(a.wbs,"cancelled")},children:"Cancel task"})]})]})}),d&&a&&e.jsx("div",{role:"dialog","aria-modal":"true","aria-label":`Configure ${d} action`,tabIndex:-1,className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",onClick:s=>{s.target===s.currentTarget&&p(null)},onKeyDown:s=>{s.key==="Escape"&&p(null)},children:e.jsxs("div",{className:"bg-spur-surface border border-spur-border rounded-xl shadow-xl p-4 mx-4 max-w-sm w-full",children:[e.jsxs("h4",{className:"text-sm font-semibold text-spur-text mb-3",children:[D[d]??d," — Select Channel"]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(ce,{variant:"bordered",size:"sm",className:"w-full bg-spur-bg text-spur-text",value:_,onChange:s=>W(s.target.value),children:["claude","codex","gemini","pi","opencode","antigravity","openclaw"].map(s=>e.jsx("option",{value:s,children:s},s))}),e.jsxs("label",{htmlFor:"skip-deps",className:"flex items-center gap-2 cursor-pointer",children:[e.jsx(oe,{id:"skip-deps",size:"xs",checked:F,onChange:s=>Y(s.target.checked)}),e.jsx("span",{className:"text-xs text-spur-text",children:"Skip dependencies"})]})]}),e.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[e.jsx(l,{variant:"ghost",size:"xs",onClick:()=>p(null),children:"Cancel"}),e.jsx(l,{variant:"primary",size:"xs",onClick:Z,children:w===d?"Dispatching…":"Dispatch"})]})]})})]})}export{he as default};
1
+ import{u as ne,a as m,j as e,t as K,B as l,b as E,L as le,M as ie,c as de,S as ce,C as oe}from"./BoardApp.B1U26g3I.js";import{r}from"./index.De90oHcH.js";const xe={backlog:["refine","start","cancel"],todo:["plan","run","decompose","add-subtask","link-feature","block","cancel"],wip:["run","add-subtask","link-feature","block","cancel"],testing:["verify","complete","block","cancel"],blocked:["refine","unblock","cancel"],done:["reopen"],cancelled:[]},D={refine:"Refine",plan:"Plan",run:"Run",verify:"Verify",decompose:"Decompose","add-subtask":"+ Subtask","link-feature":"Link Feature",start:"Start",complete:"Complete",reopen:"Reopen",block:"Block",unblock:"Unblock",cancel:"Cancel"},ue={start:"todo",complete:"done",reopen:"wip",block:"blocked",unblock:"todo",cancel:"cancelled"},g=["backlog","todo","wip","testing","done"],pe=new Set(["blocked","cancelled"]);function he({task:a,onTransition:z,onClose:M}){const[f,h]=r.useState(""),[j,o]=r.useState(""),[T,x]=r.useState("preview"),[I,L]=r.useState(!1),[v,A]=r.useState(!1),[i,H]=r.useState({}),[b,U]=r.useState(!1),[w,B]=r.useState(null),[V,u]=r.useState(!1),[d,p]=r.useState(null),[_,W]=r.useState("claude"),[F,Y]=r.useState(!1),{setTasks:q}=ne(),N=a?.wbs;if(r.useEffect(()=>{if(!N){h(""),o(""),x("preview");return}let s=!1;return L(!0),m.task.show({wbs:N}).then(t=>{if(s)return;const{content:c,frontmatter:n}=t.data;h(c),o(c),H(n)}).catch(t=>{if(s)return;const c=t instanceof Error?t.message:"Failed to load task body";typeof window<"u"&&window.dispatchEvent(new CustomEvent("api-error",{detail:{message:c}}))}).finally(()=>{s||L(!1)}),()=>{s=!0}},[N]),!a)return e.jsx("div",{className:"flex items-center justify-center h-full text-spur-text-muted text-sm",children:"Select a task to view details"});const G=()=>{o(f),x("edit")},J=()=>{o(f),x("preview")},Q=async()=>{A(!0);try{await m.task.body({wbs:a.wbs,body:j}),h(j),x("preview");const t=(await m.task.show({wbs:a.wbs})).data.content;h(t),o(t)}catch(s){o(f),x("preview");const t=s instanceof Error?s.message:"Save failed";typeof window<"u"&&window.dispatchEvent(new CustomEvent("api-error",{detail:{message:t}}))}finally{A(!1)}},X=s=>{const t=ue[s];if(t!==void 0){if(s==="cancel"&&a){u(!0);return}a&&z(a.wbs,t);return}p(s)},Z=async()=>{if(!(!d||!a)){B(d),p(null);try{await m.task.action({wbs:a.wbs,action:d,channel:_,skipDeps:F});const s=await m.task.list({});q(s.data??[])}catch(s){const t=s instanceof Error?s.message:"Action failed";typeof window<"u"&&window.dispatchEvent(new CustomEvent("api-error",{detail:{message:t}}))}finally{B(null)}}},ee=s=>{const t=g.indexOf(s);return t>=0?t:-1},P=s=>{if(!s)return"";try{const t=new Date(s);return Number.isNaN(t.getTime())?"":t.toLocaleDateString(void 0,{year:"numeric",month:"short",day:"numeric"})}catch{return""}},R=s=>{if(!s)return"";try{const t=new Date(s);if(Number.isNaN(t.getTime()))return"";const c=Date.now()-t.getTime(),n=Math.floor(c/864e5);return n===0?"today":n===1?"yesterday":n<30?`${n}d ago`:n<365?`${Math.floor(n/30)}mo ago`:`${Math.floor(n/365)}y ago`}catch{return""}},y=Array.isArray(i.tags)?i.tags:[],k=P(i.created_at),se=R(i.created_at),C=P(i.updated_at),te=R(i.updated_at),$=ee(a.status),O=i.estimated_hours,S=i.impl_progress,ae=["planning","design","implementation","review","testing"],re=s=>s==="done"?"bg-spur-success":s==="in_progress"?"bg-spur-warning":"bg-spur-border";return e.jsxs("div",{className:"flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3 p-3 border-b border-spur-border shrink-0",children:[e.jsxs("div",{className:"flex flex-col gap-1 overflow-hidden",children:[e.jsxs("h3",{className:"text-sm font-semibold text-spur-text truncate",children:[a.wbs," — ",a.name]}),e.jsxs("div",{className:"flex flex-wrap items-center gap-1","data-testid":"header-chips",children:[e.jsxs("span",{className:"px-2 py-0.5 rounded-full border border-spur-border text-xs text-spur-text-muted","data-testid":"status-pill",children:[K(a.status)," ",a.status]}),a.priority&&e.jsx("span",{className:"px-2 py-0.5 rounded-full bg-spur-surface-2 border border-spur-border text-xs text-spur-text-muted",children:a.priority}),a.featureId&&e.jsx("span",{className:"px-2 py-0.5 rounded-full bg-spur-surface-2 border border-spur-border text-xs text-spur-text-muted",children:a.featureId}),y.map(s=>e.jsx("span",{className:"px-2 py-0.5 rounded-full border border-spur-border text-xs text-spur-text-muted",children:s},s))]})]}),e.jsxs("div",{className:"flex flex-wrap items-center justify-end gap-1 shrink-0",children:[(xe[a.status]??[]).map(s=>e.jsx(l,{variant:s==="cancel"?"error":"accent",size:"xs",onClick:()=>X(s),disabled:w===s,"aria-label":D[s],children:w===s?"…":D[s]},s)),M&&e.jsx(l,{variant:"ghost",size:"xs",className:"text-spur-text-muted",onClick:M,"aria-label":"Close detail",children:"✕"})]})]}),e.jsxs("div",{className:"border-b border-spur-border shrink-0",children:[e.jsxs("button",{type:"button",onClick:()=>U(s=>!s),className:"flex items-center justify-between w-full p-3 text-xs font-semibold text-spur-text-muted uppercase tracking-wide hover:text-spur-text transition-colors","aria-expanded":b,children:[e.jsx("span",{children:"Metadata"}),e.jsxs("svg",{className:`w-3 h-3 transition-transform ${b?"rotate-180":""}`,fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:[e.jsx("title",{children:b?"Collapse metadata":"Expand metadata"}),e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M19 9l-7 7-7-7"})]})]}),b&&e.jsxs("div",{className:"px-3 pb-3 space-y-3",children:[e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-spur-text-muted block mb-1.5",children:"Status"}),e.jsxs("span",{className:"text-sm text-spur-text","data-testid":"metadata-status",children:[K(a.status)," ",a.status]})]}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-spur-text-muted block mb-1.5",children:"Progress"}),S?e.jsx("div",{className:"space-y-1",children:ae.map(s=>{const t=S[s]??"pending";return e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[10px] text-spur-text-muted w-20 shrink-0",children:s}),e.jsx("div",{className:"flex-1 h-1.5 rounded-full bg-spur-border overflow-hidden",children:e.jsx("div",{className:`h-full rounded-full ${re(t)}`,style:{width:t==="done"?"100%":t==="in_progress"?"50%":"0%"}})}),e.jsx("span",{className:"text-[10px] text-spur-text-muted w-16 shrink-0",children:t})]},s)})}):pe.has(a.status)?e.jsx(E,{variant:"warning",size:"xs",children:a.status}):e.jsx("div",{className:"flex items-center gap-1",children:g.map((s,t)=>{const c=t<=$,n=t===$;return e.jsxs("div",{className:"flex items-center gap-1 flex-1 last:flex-none",children:[e.jsx("div",{className:`h-1.5 rounded-full flex-1 ${c?"bg-spur-accent":"bg-spur-border"} ${n?"ring-1 ring-spur-accent/50":""}`,title:s}),t<g.length-1&&e.jsx("span",{className:"text-[10px] text-spur-text-muted w-0"})]},s)})}),!S&&e.jsx("div",{className:"flex justify-between mt-0.5",children:g.map(s=>e.jsx("span",{className:"text-[10px] text-spur-text-muted",children:s},s))})]}),(k||C)&&e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("span",{className:"text-xs text-spur-text-muted block",children:"Dates"}),k&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:"text-spur-text-muted w-14 shrink-0",children:"Created"}),e.jsx("span",{className:"text-spur-text",children:k}),e.jsxs("span",{className:"text-spur-text-muted",children:["(",se,")"]})]}),C&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:"text-spur-text-muted w-14 shrink-0",children:"Updated"}),e.jsx("span",{className:"text-spur-text",children:C}),e.jsxs("span",{className:"text-spur-text-muted",children:["(",te,")"]})]})]}),y.length>0&&e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-spur-text-muted block mb-1.5",children:"Tags"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:y.map(s=>e.jsx(E,{variant:"outline",size:"xs",className:"text-spur-text-muted",children:s},s))})]}),e.jsxs("div",{className:"space-y-1.5",children:[a.priority&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:"text-spur-text-muted w-14 shrink-0",children:"Priority"}),e.jsx(E,{variant:"outline",size:"xs",children:a.priority})]}),O!==void 0&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:"text-spur-text-muted w-14 shrink-0",children:"Est. Hours"}),e.jsxs("span",{className:"text-spur-text",children:[O,"h"]})]}),a.featureId&&e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:"text-spur-text-muted w-14 shrink-0",children:"Feature"}),e.jsx("span",{className:"text-spur-text",children:a.featureId})]}),e.jsxs("div",{className:"flex items-center gap-1.5 text-xs",children:[e.jsx("span",{className:"text-spur-text-muted w-14 shrink-0",children:"File"}),e.jsx("span",{className:"text-spur-text font-mono truncate",children:a.filePath})]})]})]})]}),e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden p-3","data-testid":"task-body-section",children:[e.jsxs("div",{className:"flex items-center justify-between mb-2 shrink-0",children:[e.jsx("span",{className:"text-xs font-semibold text-spur-text-muted uppercase tracking-wide",children:"Body"}),e.jsx("div",{className:"flex gap-1",children:T==="preview"?e.jsx(l,{variant:"ghost",size:"xs",onClick:G,disabled:I,"aria-label":"Edit body",children:"Edit"}):e.jsxs(e.Fragment,{children:[e.jsx(l,{variant:"primary",size:"xs",onClick:Q,disabled:v,"aria-label":"Save body",children:v?"Saving…":"Save"}),e.jsx(l,{variant:"ghost",size:"xs",onClick:J,disabled:v,"aria-label":"Cancel edit",children:"Cancel"})]})})]}),I?e.jsxs("div",{className:"flex items-center gap-2 text-sm text-spur-text-muted",children:[e.jsx(le,{size:"xs",className:"text-spur-accent"}),"Loading body…"]}):T==="edit"?e.jsx("div",{className:"flex-1 min-h-0","data-testid":"body-editor",children:e.jsx(ie,{value:j,onChange:s=>o(s??""),height:"100%","data-color-mode":"light"})}):e.jsx("div",{className:"flex-1 overflow-y-auto","data-testid":"body-preview",children:e.jsx(de,{source:f})})]}),V&&e.jsx("div",{role:"dialog","aria-modal":"true","aria-label":"Confirm cancel task",tabIndex:-1,className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",onClick:s=>{s.target===s.currentTarget&&u(!1)},onKeyDown:s=>{s.key==="Escape"&&u(!1)},children:e.jsxs("div",{className:"bg-spur-surface border border-spur-border rounded-xl shadow-xl p-4 mx-4 max-w-xs w-full",children:[e.jsxs("p",{className:"text-sm text-spur-text mb-4",children:["Cancel task ",e.jsx("strong",{children:a.wbs}),"? This marks it as cancelled and cannot be undone from the board."]}),e.jsxs("div",{className:"flex justify-end gap-2",children:[e.jsx(l,{variant:"ghost",size:"xs",onClick:()=>u(!1),children:"Keep"}),e.jsx(l,{variant:"error",size:"xs",onClick:()=>{u(!1),z(a.wbs,"cancelled")},children:"Cancel task"})]})]})}),d&&a&&e.jsx("div",{role:"dialog","aria-modal":"true","aria-label":`Configure ${d} action`,tabIndex:-1,className:"fixed inset-0 z-50 flex items-center justify-center bg-black/40",onClick:s=>{s.target===s.currentTarget&&p(null)},onKeyDown:s=>{s.key==="Escape"&&p(null)},children:e.jsxs("div",{className:"bg-spur-surface border border-spur-border rounded-xl shadow-xl p-4 mx-4 max-w-sm w-full",children:[e.jsxs("h4",{className:"text-sm font-semibold text-spur-text mb-3",children:[D[d]??d," — Select Channel"]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(ce,{variant:"bordered",size:"sm",className:"w-full bg-spur-bg text-spur-text",value:_,onChange:s=>W(s.target.value),children:["claude","codex","gemini","pi","opencode","antigravity","openclaw"].map(s=>e.jsx("option",{value:s,children:s},s))}),e.jsxs("label",{htmlFor:"skip-deps",className:"flex items-center gap-2 cursor-pointer",children:[e.jsx(oe,{id:"skip-deps",size:"xs",checked:F,onChange:s=>Y(s.target.checked)}),e.jsx("span",{className:"text-xs text-spur-text",children:"Skip dependencies"})]})]}),e.jsxs("div",{className:"flex justify-end gap-2 mt-4",children:[e.jsx(l,{variant:"ghost",size:"xs",onClick:()=>p(null),children:"Cancel"}),e.jsx(l,{variant:"primary",size:"xs",onClick:Z,children:w===d?"Dispatching…":"Dispatch"})]})]})})]})}export{he as default};
@@ -1 +1 @@
1
- import{$ as ln,a0 as an,a1 as G,a2 as q,a3 as z,a4 as un,a5 as y,a6 as tn,a7 as K,a8 as _,a9 as rn,aa as o,ab as on,ac as sn,ad as fn}from"./mermaid.core.Ca-kcelG.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,B,a){var O=I-l,i=D-h,n=B-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function V(l,h,I,D,v,A,B){var a=l-I,O=h-D,i=(B?A:-A)/K(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,C=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*K(on(0,T*T*R-P*P)),$=(P*g-m*S)/R,j=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=$-C,e=j-t,r=w-C,F=p-t;return x*x+e*e>r*r+F*F&&($=w,j=p),{cx:$,cy:j,x01:-n,y01:-d,x11:$*(v/T-1),y11:j*(v/T-1)}}function hn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=dn,B=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,C=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(C>tn-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*G(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=C,S=C,$=B.apply(this,arguments)/2,j=$>y&&(D?+D.apply(this,arguments):K(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(j>y){var F=sn(j/u*q($)),L=sn(j/s*q($));(P-=F*2)>y?(F*=t?1:-1,R+=F,T-=F):(P=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=t?1:-1,m+=L,g-=L):(S=0,m=g=(f+c)/2)}var H=s*G(m),J=s*q(m),M=u*G(T),N=u*q(T);if(w>y){var Q=s*G(g),U=s*q(g),W=u*G(R),X=u*q(R),E;if(C<an)if(E=pn(H,J,W,X,Q,U,M,N)){var Y=H-E[0],Z=J-E[1],b=Q-E[0],k=U-E[1],nn=1/q(fn((Y*b+Z*k)/(K(Y*Y+Z*Z)*K(b*b+k*k)))/2),en=K(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=V(W,X,H,J,s,x,t),r=V(Q,U,M,N,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(H,J),a.arc(0,0,s,m,g,!t)):a.moveTo(H,J),!(u>y)||!(P>y)?a.lineTo(M,N):p>y?(e=V(M,N,Q,U,u,-p,t),r=V(H,J,W,X,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[G(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:z(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:z(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:z(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:z(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:z(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:z(+n),i):A},i.padAngle=function(n){return arguments.length?(B=typeof n=="function"?n:z(+n),i):B},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
1
+ import{$ as ln,a0 as an,a1 as G,a2 as q,a3 as z,a4 as un,a5 as y,a6 as tn,a7 as K,a8 as _,a9 as rn,aa as o,ab as on,ac as sn,ad as fn}from"./mermaid.core.BD5-jXum.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,I,D,v,A,B,a){var O=I-l,i=D-h,n=B-v,d=a-A,u=d*O-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*O,h+u*i]}function V(l,h,I,D,v,A,B){var a=l-I,O=h-D,i=(B?A:-A)/K(a*a+O*O),n=i*O,d=-i*a,u=l+n,s=h+d,f=I+n,c=D+d,C=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,S=(g<0?-1:1)*K(on(0,T*T*R-P*P)),$=(P*g-m*S)/R,j=(-P*m-g*S)/R,w=(P*g+m*S)/R,p=(-P*m+g*S)/R,x=$-C,e=j-t,r=w-C,F=p-t;return x*x+e*e>r*r+F*F&&($=w,j=p),{cx:$,cy:j,x01:-n,y01:-d,x11:$*(v/T-1),y11:j*(v/T-1)}}function hn(){var l=cn,h=yn,I=z(0),D=null,v=gn,A=dn,B=mn,a=null,O=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,C=rn(c-f),t=c>f;if(a||(a=n=O()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(C>tn-y)a.moveTo(s*G(f),s*q(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*G(c),u*q(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=C,S=C,$=B.apply(this,arguments)/2,j=$>y&&(D?+D.apply(this,arguments):K(u*u+s*s)),w=_(rn(s-u)/2,+I.apply(this,arguments)),p=w,x=w,e,r;if(j>y){var F=sn(j/u*q($)),L=sn(j/s*q($));(P-=F*2)>y?(F*=t?1:-1,R+=F,T-=F):(P=0,R=T=(f+c)/2),(S-=L*2)>y?(L*=t?1:-1,m+=L,g-=L):(S=0,m=g=(f+c)/2)}var H=s*G(m),J=s*q(m),M=u*G(T),N=u*q(T);if(w>y){var Q=s*G(g),U=s*q(g),W=u*G(R),X=u*q(R),E;if(C<an)if(E=pn(H,J,W,X,Q,U,M,N)){var Y=H-E[0],Z=J-E[1],b=Q-E[0],k=U-E[1],nn=1/q(fn((Y*b+Z*k)/(K(Y*Y+Z*Z)*K(b*b+k*k)))/2),en=K(E[0]*E[0]+E[1]*E[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}S>y?x>y?(e=V(W,X,H,J,s,x,t),r=V(Q,U,M,N,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(H,J),a.arc(0,0,s,m,g,!t)):a.moveTo(H,J),!(u>y)||!(P>y)?a.lineTo(M,N):p>y?(e=V(M,N,Q,U,u,-p,t),r=V(H,J,W,X,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[G(d)*n,q(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:z(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:z(+n),i):h},i.cornerRadius=function(n){return arguments.length?(I=typeof n=="function"?n:z(+n),i):I},i.padRadius=function(n){return arguments.length?(D=n==null?null:typeof n=="function"?n:z(+n),i):D},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:z(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:z(+n),i):A},i.padAngle=function(n){return arguments.length?(B=typeof n=="function"?n:z(+n),i):B},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};