local-diff-reviewer 4.0.3 → 4.0.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/SKILL.md +3 -1
- package/dist/cli/start.js +63 -7
- package/dist/web/assets/{arc-BR56UJ2q.js → arc-0o6D6fKz.js} +1 -1
- package/dist/web/assets/{architectureDiagram-3BPJPVTR-QSNoOmcD.js → architectureDiagram-3BPJPVTR-vxrFw3rM.js} +1 -1
- package/dist/web/assets/{blockDiagram-GPEHLZMM-DIZH0QR3.js → blockDiagram-GPEHLZMM-BFze21fu.js} +1 -1
- package/dist/web/assets/{c4Diagram-AAUBKEIU-CPDSbt6E.js → c4Diagram-AAUBKEIU-TnNsx9da.js} +1 -1
- package/dist/web/assets/channel-WQNUbBEK.js +1 -0
- package/dist/web/assets/{chunk-2J33WTMH-DfV1Wxzg.js → chunk-2J33WTMH-CAZdPu7U.js} +1 -1
- package/dist/web/assets/{chunk-3OPIFGDE-B7UZbk4f.js → chunk-3OPIFGDE-BwK_nZBV.js} +1 -1
- package/dist/web/assets/{chunk-4BX2VUAB-urkKkocB.js → chunk-4BX2VUAB-DLTOSc23.js} +1 -1
- package/dist/web/assets/{chunk-55IACEB6-C8ylU6mt.js → chunk-55IACEB6-mfgqoexE.js} +1 -1
- package/dist/web/assets/{chunk-5ZQYHXKU-Cy7POa4x.js → chunk-5ZQYHXKU-CBVlWYLH.js} +1 -1
- package/dist/web/assets/{chunk-727SXJPM-C8E8Y71j.js → chunk-727SXJPM-s9OghfXq.js} +1 -1
- package/dist/web/assets/{chunk-AQP2D5EJ-D9rMJpjr.js → chunk-AQP2D5EJ-bclvtRYA.js} +1 -1
- package/dist/web/assets/{chunk-BSJP7CBP-DPOxgIuA.js → chunk-BSJP7CBP-xGJuUMzb.js} +1 -1
- package/dist/web/assets/{chunk-CSCIHK7Q-NalEqjEe.js → chunk-CSCIHK7Q-BriO3ChF.js} +1 -1
- package/dist/web/assets/{chunk-FMBD7UC4-CqHu0Ddy.js → chunk-FMBD7UC4-CSeJ9GeL.js} +1 -1
- package/dist/web/assets/{chunk-KSCS5N6A-4DOHUm1X.js → chunk-KSCS5N6A-7wXC4Qqe.js} +1 -1
- package/dist/web/assets/{chunk-L5ZTLDWV-C2ELgJzw.js → chunk-L5ZTLDWV-BpxPBNR9.js} +1 -1
- package/dist/web/assets/{chunk-LZXEDZCA-BB0BR9oJ.js → chunk-LZXEDZCA-B6Sh2I42.js} +2 -2
- package/dist/web/assets/{chunk-ND2GUHAM-Xhn_2Cqz.js → chunk-ND2GUHAM-CqUsCFOU.js} +1 -1
- package/dist/web/assets/{chunk-NZK2D7GU-zYi1cs9Z.js → chunk-NZK2D7GU-C6SVCG_c.js} +1 -1
- package/dist/web/assets/{chunk-O5CBEL6O-BODJA_dy.js → chunk-O5CBEL6O-ChesuwyP.js} +1 -1
- package/dist/web/assets/chunk-QZHKN3VN-DZyjp7GK.js +1 -0
- package/dist/web/assets/chunk-WU5MYG2G-C1JfqPSQ.js +1 -0
- package/dist/web/assets/{chunk-XPW4576I-D8_9GoWv.js → chunk-XPW4576I-BDzlKPtl.js} +1 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-BqnqV1iS.js +1 -0
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-CINvRrky.js +1 -0
- package/dist/web/assets/{cose-bilkent-S5V4N54A-BsloOG1M.js → cose-bilkent-S5V4N54A-D0rmbTbG.js} +1 -1
- package/dist/web/assets/{dagre-BM42HDAG-C2KIEcH-.js → dagre-BM42HDAG-BSTmAYNP.js} +1 -1
- package/dist/web/assets/{diagram-2AECGRRQ-BUwRJ9KM.js → diagram-2AECGRRQ-DSd4MNOn.js} +1 -1
- package/dist/web/assets/{diagram-5GNKFQAL-BZPhOzmo.js → diagram-5GNKFQAL-DSOmzQOx.js} +1 -1
- package/dist/web/assets/{diagram-KO2AKTUF-CAUK4gKm.js → diagram-KO2AKTUF-DYH0wUFL.js} +1 -1
- package/dist/web/assets/{diagram-LMA3HP47-C_r9DVs_.js → diagram-LMA3HP47-B4e5Al0b.js} +1 -1
- package/dist/web/assets/{diagram-OG6HWLK6-31p4uFXJ.js → diagram-OG6HWLK6-Dm_NeCB_.js} +1 -1
- package/dist/web/assets/{dist-Ck1Zve1a.js → dist-6-gM8fD6.js} +1 -1
- package/dist/web/assets/{erDiagram-TEJ5UH35-C8EeJM7j.js → erDiagram-TEJ5UH35-2m35KAjK.js} +1 -1
- package/dist/web/assets/{flowDiagram-I6XJVG4X-BQqB8kKF.js → flowDiagram-I6XJVG4X-CLmtZ7PN.js} +1 -1
- package/dist/web/assets/{ganttDiagram-6RSMTGT7-4NPFmdaW.js → ganttDiagram-6RSMTGT7-D4vKTt6J.js} +1 -1
- package/dist/web/assets/{gitGraphDiagram-PVQCEYII-CDmvFqiZ.js → gitGraphDiagram-PVQCEYII-SAgfCs6E.js} +1 -1
- package/dist/web/assets/index-BzQMA1VX.css +1 -0
- package/dist/web/assets/{index-B_58iLIC.js → index-VSsPuDu2.js} +21 -20
- package/dist/web/assets/{infoDiagram-5YYISTIA-B7bI0yw0.js → infoDiagram-5YYISTIA-CgRR9-1B.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-YF4QCWOH-D5xBBsAU.js → ishikawaDiagram-YF4QCWOH-DwVmJABH.js} +1 -1
- package/dist/web/assets/{journeyDiagram-JHISSGLW-Bx7sCi9m.js → journeyDiagram-JHISSGLW-Dg9DxssA.js} +1 -1
- package/dist/web/assets/{kanban-definition-UN3LZRKU-BZMYOpbE.js → kanban-definition-UN3LZRKU-DMNt3d4H.js} +1 -1
- package/dist/web/assets/{line-D_c4pLL_.js → line-BJrg_IAS.js} +1 -1
- package/dist/web/assets/{linear-jch8k3gY.js → linear-dLK3_SMN.js} +1 -1
- package/dist/web/assets/{mermaid-parser.core-meE2GJWa.js → mermaid-parser.core-j4pTXsmA.js} +1 -1
- package/dist/web/assets/{mermaid.core-CED8hy6R.js → mermaid.core-BoJWm_3o.js} +3 -3
- package/dist/web/assets/{mindmap-definition-RKZ34NQL-Dq5CdJkT.js → mindmap-definition-RKZ34NQL-Dx4oQwA9.js} +1 -1
- package/dist/web/assets/{pieDiagram-4H26LBE5-tlCDWqfO.js → pieDiagram-4H26LBE5-CQt5lGzJ.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-W4KKPZXB-DxqMe-7l.js → quadrantDiagram-W4KKPZXB-CQKer1hi.js} +1 -1
- package/dist/web/assets/{requirementDiagram-4Y6WPE33-Cit2aJnc.js → requirementDiagram-4Y6WPE33-BTC5ic4L.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-5OEKKPKP-DxOco6qW.js → sankeyDiagram-5OEKKPKP-BMOkp_l1.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-3UESZ5HK-FxR-x1T2.js → sequenceDiagram-3UESZ5HK-BaBjScGO.js} +1 -1
- package/dist/web/assets/{src-R6QfzeRb.js → src-CQpxAcTl.js} +1 -1
- package/dist/web/assets/{stateDiagram-AJRCARHV-D_w-AmGN.js → stateDiagram-AJRCARHV-DaPrqDDd.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-BtLEnQvL.js +1 -0
- package/dist/web/assets/{timeline-definition-PNZ67QCA--m6p5F06.js → timeline-definition-PNZ67QCA-CaBCJ3NO.js} +1 -1
- package/dist/web/assets/{vennDiagram-CIIHVFJN-BvTLOSov.js → vennDiagram-CIIHVFJN-DW8korad.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-YWT4CUSO-suMirVgL.js → wardleyDiagram-YWT4CUSO-C4MkKHg5.js} +1 -1
- package/dist/web/assets/{xychartDiagram-2RQKCTM6-BDTgsmAY.js → xychartDiagram-2RQKCTM6-C-8LqvcG.js} +1 -1
- package/dist/web/index.html +2 -2
- package/package.json +1 -1
- package/dist/web/assets/channel-B1I9H9NN.js +0 -1
- package/dist/web/assets/chunk-QZHKN3VN-ByJ-AwbE.js +0 -1
- package/dist/web/assets/chunk-WU5MYG2G-D1aTMOQw.js +0 -1
- package/dist/web/assets/classDiagram-4FO5ZUOK-DqiTlcHU.js +0 -1
- package/dist/web/assets/classDiagram-v2-Q7XG4LA2-BCTUlGPz.js +0 -1
- package/dist/web/assets/index-Bp6Az-HB.css +0 -1
- package/dist/web/assets/stateDiagram-v2-BHNVJYJU-CEnMp_RU.js +0 -1
package/README.md
CHANGED
|
@@ -60,7 +60,7 @@ local-diff-reviewer --repo /path/to/project
|
|
|
60
60
|
|
|
61
61
|
停止当前项目已启动的 review 进程:
|
|
62
62
|
|
|
63
|
-
- `stop`:按当前 Git
|
|
63
|
+
- `stop`:按当前 Git 仓库范围强制关闭该仓库启动过的 review 运行进程(包含其 API 端口进程);会先尝试优雅退出,超时后自动升级为强制终止。
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
66
|
local-diff-reviewer stop
|
|
@@ -108,7 +108,7 @@ local-diff-reviewer --repo /path/to/project staged
|
|
|
108
108
|
npx skills add Mone-Lee/diff-review
|
|
109
109
|
```
|
|
110
110
|
|
|
111
|
-
skill 会以目标 workspace 作为命令工作目录运行 `npx --yes local-diff-reviewer [args...]`,因此 `/diff-review` 会审查当前项目,而不是 skill
|
|
111
|
+
skill 会以目标 workspace 作为命令工作目录运行 `npx --yes local-diff-reviewer [args...]`,因此 `/diff-review` 会审查当前项目,而不是 skill 安装目录。用户要求停止、关闭或结束当前项目的 Diff Review 时,skill 应直接执行 `/diff-review stop`,而不是只提示这条命令。
|
|
112
112
|
|
|
113
113
|
### 预置 agent 评论
|
|
114
114
|
|
package/SKILL.md
CHANGED
|
@@ -16,7 +16,7 @@ Use this skill when the user asks for `/diff-review`, wants to inspect current w
|
|
|
16
16
|
- `/diff-review staged`: review staged diff.
|
|
17
17
|
- `/diff-review <base> <target>`: review diff between two Git revisions.
|
|
18
18
|
- `/diff-review --new-session`: preserve the current snapshot and open a separate review session.
|
|
19
|
-
- `/diff-review stop`:
|
|
19
|
+
- `/diff-review stop`: force close all review runtimes created for the current workspace repository.
|
|
20
20
|
|
|
21
21
|
Do not ask the user to run a shell CLI manually. Determine the target workspace/repository from the user's active environment context, then run the package command with that repository as the command working directory:
|
|
22
22
|
|
|
@@ -26,6 +26,8 @@ npx --yes local-diff-reviewer [args...]
|
|
|
26
26
|
|
|
27
27
|
Set the shell/tool `cwd` to `/absolute/path/to/target/workspace` before running the command. Do not pass `--repo` from this skill; older published CLI versions treat unknown args as revision args. Do not use the skill package directory or this skill's install directory as the review target unless that is the workspace the user asked to review.
|
|
28
28
|
|
|
29
|
+
When the user asks to `stop`, `关闭`, `结束`, or otherwise shut down Diff Review for the current project, execute `/diff-review stop` immediately. Do not only explain the command or leave the existing runtime running.
|
|
30
|
+
|
|
29
31
|
When you have concrete review findings or answers to existing review comments, preload them with one `--comment` JSON argument per comment before launching the viewer:
|
|
30
32
|
|
|
31
33
|
```bash
|
package/dist/cli/start.js
CHANGED
|
@@ -718,6 +718,9 @@ import { createHash as createHash4 } from "node:crypto";
|
|
|
718
718
|
import { access, mkdir as mkdir2, readFile as readFile3, writeFile as writeFile2 } from "node:fs/promises";
|
|
719
719
|
import { homedir as homedir2, platform as platform2 } from "node:os";
|
|
720
720
|
import { basename as basename2, dirname as dirname2, join as join3 } from "node:path";
|
|
721
|
+
var TERM_WAIT_MS = 800;
|
|
722
|
+
var KILL_WAIT_MS = 1200;
|
|
723
|
+
var POLL_INTERVAL_MS = 100;
|
|
721
724
|
async function recordRuntime(entry) {
|
|
722
725
|
const path = runtimePath(entry.repoRoot);
|
|
723
726
|
const store = await readRuntime(path);
|
|
@@ -734,6 +737,7 @@ async function stopRecordedRuntimes(repoRoot) {
|
|
|
734
737
|
const path = runtimePath(repoRoot);
|
|
735
738
|
const store = await readRuntime(path);
|
|
736
739
|
const stopped = [];
|
|
740
|
+
const forced = [];
|
|
737
741
|
const stale = [];
|
|
738
742
|
for (const entry of store.entries) {
|
|
739
743
|
const parentAlive = isPidAlive(entry.pid);
|
|
@@ -742,16 +746,21 @@ async function stopRecordedRuntimes(repoRoot) {
|
|
|
742
746
|
stale.push(entry);
|
|
743
747
|
continue;
|
|
744
748
|
}
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
if (viteAlive) process.kill(entry.vitePid, "SIGTERM");
|
|
749
|
+
const termination = await terminateRuntime(entry);
|
|
750
|
+
if (termination.status === "stopped") {
|
|
748
751
|
stopped.push(entry);
|
|
749
|
-
|
|
752
|
+
continue;
|
|
753
|
+
}
|
|
754
|
+
if (termination.status === "forced") {
|
|
755
|
+
forced.push(entry);
|
|
756
|
+
continue;
|
|
757
|
+
}
|
|
758
|
+
if (termination.status === "stale") {
|
|
750
759
|
stale.push(entry);
|
|
751
760
|
}
|
|
752
761
|
}
|
|
753
762
|
await writeRuntime(path, { entries: [] });
|
|
754
|
-
return { stopped, stale };
|
|
763
|
+
return { stopped, forced, stale };
|
|
755
764
|
}
|
|
756
765
|
function runtimePath(repoRoot) {
|
|
757
766
|
const repoName = basename2(repoRoot) || "repo";
|
|
@@ -793,6 +802,45 @@ function isPidAlive(pid) {
|
|
|
793
802
|
return false;
|
|
794
803
|
}
|
|
795
804
|
}
|
|
805
|
+
async function terminateRuntime(entry) {
|
|
806
|
+
const pids = collectTargetPids(entry);
|
|
807
|
+
if (pids.length === 0) return { status: "stale" };
|
|
808
|
+
const terminated = await terminatePids(pids, "SIGTERM", TERM_WAIT_MS);
|
|
809
|
+
if (terminated) return { status: "stopped" };
|
|
810
|
+
const forced = await terminatePids(pids, "SIGKILL", KILL_WAIT_MS);
|
|
811
|
+
return forced ? { status: "forced" } : { status: "stale" };
|
|
812
|
+
}
|
|
813
|
+
function collectTargetPids(entry) {
|
|
814
|
+
const pids = [];
|
|
815
|
+
if (typeof entry.vitePid === "number" && isPidAlive(entry.vitePid)) pids.push(entry.vitePid);
|
|
816
|
+
if (isPidAlive(entry.pid)) pids.push(entry.pid);
|
|
817
|
+
return pids;
|
|
818
|
+
}
|
|
819
|
+
async function terminatePids(pids, signal, waitMs) {
|
|
820
|
+
let signaled = false;
|
|
821
|
+
for (const pid of pids) {
|
|
822
|
+
if (!isPidAlive(pid)) continue;
|
|
823
|
+
try {
|
|
824
|
+
process.kill(pid, signal);
|
|
825
|
+
signaled = true;
|
|
826
|
+
} catch {
|
|
827
|
+
return false;
|
|
828
|
+
}
|
|
829
|
+
}
|
|
830
|
+
if (!signaled) return true;
|
|
831
|
+
return waitForExit(pids, waitMs);
|
|
832
|
+
}
|
|
833
|
+
async function waitForExit(pids, waitMs) {
|
|
834
|
+
const deadline = Date.now() + waitMs;
|
|
835
|
+
while (Date.now() < deadline) {
|
|
836
|
+
if (pids.every((pid) => !isPidAlive(pid))) return true;
|
|
837
|
+
await sleep(POLL_INTERVAL_MS);
|
|
838
|
+
}
|
|
839
|
+
return pids.every((pid) => !isPidAlive(pid));
|
|
840
|
+
}
|
|
841
|
+
function sleep(ms) {
|
|
842
|
+
return new Promise((resolve3) => setTimeout(resolve3, ms));
|
|
843
|
+
}
|
|
796
844
|
async function hasRuntimeRecord(repoRoot) {
|
|
797
845
|
try {
|
|
798
846
|
await access(runtimePath(repoRoot));
|
|
@@ -1644,8 +1692,8 @@ function logImportResult(comments, result) {
|
|
|
1644
1692
|
async function stopCommand(repo) {
|
|
1645
1693
|
const repoRoot = await getRepoRoot(repo ?? process.cwd());
|
|
1646
1694
|
const hasRecord = await hasRuntimeRecord(repoRoot);
|
|
1647
|
-
const { stopped, stale } = await stopRecordedRuntimes(repoRoot);
|
|
1648
|
-
const total = stopped.length + stale.length;
|
|
1695
|
+
const { stopped, forced, stale } = await stopRecordedRuntimes(repoRoot);
|
|
1696
|
+
const total = stopped.length + forced.length + stale.length;
|
|
1649
1697
|
if (total === 0) {
|
|
1650
1698
|
if (hasRecord) {
|
|
1651
1699
|
console.log("No running review process found for this repo.");
|
|
@@ -1660,6 +1708,14 @@ async function stopCommand(repo) {
|
|
|
1660
1708
|
`- pid=${entry.pid} vitePid=${entry.vitePid ?? "-"} apiPort=${entry.apiPort} vitePort=${entry.vitePort ?? "-"} vite=${entry.usesVite ? "yes" : "no"} startedAt=${entry.startedAt}`
|
|
1661
1709
|
);
|
|
1662
1710
|
}
|
|
1711
|
+
if (forced.length > 0) {
|
|
1712
|
+
console.log(`Force killed review runtimes: ${forced.length}`);
|
|
1713
|
+
for (const entry of forced) {
|
|
1714
|
+
console.log(
|
|
1715
|
+
`- pid=${entry.pid} vitePid=${entry.vitePid ?? "-"} apiPort=${entry.apiPort} vitePort=${entry.vitePort ?? "-"} vite=${entry.usesVite ? "yes" : "no"} startedAt=${entry.startedAt}`
|
|
1716
|
+
);
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1663
1719
|
if (stale.length > 0) {
|
|
1664
1720
|
console.log(`Skipped stale records: ${stale.length}`);
|
|
1665
1721
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{n as e,t}from"./path-BJQEcSo7.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-
|
|
1
|
+
import{n as e,t}from"./path-BJQEcSo7.js";import{a as n,c as r,d as i,f as a,i as o,l as s,m as c,n as l,o as u,p as d,r as f,u as p}from"./dist-6-gM8fD6.js";function m(e){return e.innerRadius}function h(e){return e.outerRadius}function g(e){return e.startAngle}function _(e){return e.endAngle}function v(e){return e&&e.padAngle}function y(e,t,n,r,i,a,o,s){var c=n-e,l=r-t,u=o-i,d=s-a,f=d*c-u*l;if(!(f*f<1e-12))return f=(u*(t-a)-d*(e-i))/f,[e+f*c,t+f*l]}function b(e,t,n,r,i,a,o){var c=e-n,l=t-r,u=(o?a:-a)/d(c*c+l*l),f=u*l,p=-u*c,m=e+f,h=t+p,g=n+f,_=r+p,v=(m+g)/2,y=(h+_)/2,b=g-m,x=_-h,S=b*b+x*x,C=i-a,w=m*_-g*h,T=(x<0?-1:1)*d(s(0,C*C*S-w*w)),E=(w*x-b*T)/S,D=(-w*b-x*T)/S,O=(w*x+b*T)/S,k=(-w*b+x*T)/S,A=E-v,j=D-y,M=O-v,N=k-y;return A*A+j*j>M*M+N*N&&(E=O,D=k),{cx:E,cy:D,x01:-f,y01:-p,x11:E*(i/C-1),y11:D*(i/C-1)}}function x(){var s=m,x=h,S=e(0),C=null,w=g,T=_,E=v,D=null,O=t(k);function k(){var e,t,m=+s.apply(this,arguments),h=+x.apply(this,arguments),g=w.apply(this,arguments)-r,_=T.apply(this,arguments)-r,v=l(_-g),k=_>g;if(D||=e=O(),h<m&&(t=h,h=m,m=t),!(h>1e-12))D.moveTo(0,0);else if(v>c-1e-12)D.moveTo(h*u(g),h*a(g)),D.arc(0,0,h,g,_,!k),m>1e-12&&(D.moveTo(m*u(_),m*a(_)),D.arc(0,0,m,_,g,k));else{var A=g,j=_,M=g,N=_,P=v,F=v,I=E.apply(this,arguments)/2,L=I>1e-12&&(C?+C.apply(this,arguments):d(m*m+h*h)),R=p(l(h-m)/2,+S.apply(this,arguments)),z=R,B=R,V,H;if(L>1e-12){var U=o(L/m*a(I)),W=o(L/h*a(I));(P-=U*2)>1e-12?(U*=k?1:-1,M+=U,N-=U):(P=0,M=N=(g+_)/2),(F-=W*2)>1e-12?(W*=k?1:-1,A+=W,j-=W):(F=0,A=j=(g+_)/2)}var G=h*u(A),K=h*a(A),q=m*u(N),J=m*a(N);if(R>1e-12){var Y=h*u(j),X=h*a(j),Z=m*u(M),Q=m*a(M),$;if(v<i)if($=y(G,K,Z,Q,Y,X,q,J)){var ee=G-$[0],te=K-$[1],ne=Y-$[0],re=X-$[1],ie=1/a(f((ee*ne+te*re)/(d(ee*ee+te*te)*d(ne*ne+re*re)))/2),ae=d($[0]*$[0]+$[1]*$[1]);z=p(R,(m-ae)/(ie-1)),B=p(R,(h-ae)/(ie+1))}else z=B=0}F>1e-12?B>1e-12?(V=b(Z,Q,G,K,h,B,k),H=b(Y,X,q,J,h,B,k),D.moveTo(V.cx+V.x01,V.cy+V.y01),B<R?D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,B,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,h,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),!k),D.arc(H.cx,H.cy,B,n(H.y11,H.x11),n(H.y01,H.x01),!k))):(D.moveTo(G,K),D.arc(0,0,h,A,j,!k)):D.moveTo(G,K),!(m>1e-12)||!(P>1e-12)?D.lineTo(q,J):z>1e-12?(V=b(q,J,Y,X,m,-z,k),H=b(G,K,Z,Q,m,-z,k),D.lineTo(V.cx+V.x01,V.cy+V.y01),z<R?D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(H.y01,H.x01),!k):(D.arc(V.cx,V.cy,z,n(V.y01,V.x01),n(V.y11,V.x11),!k),D.arc(0,0,m,n(V.cy+V.y11,V.cx+V.x11),n(H.cy+H.y11,H.cx+H.x11),k),D.arc(H.cx,H.cy,z,n(H.y11,H.x11),n(H.y01,H.x01),!k))):D.arc(0,0,m,N,M,k)}if(D.closePath(),e)return D=null,e+``||null}return k.centroid=function(){var e=(+s.apply(this,arguments)+ +x.apply(this,arguments))/2,t=(+w.apply(this,arguments)+ +T.apply(this,arguments))/2-i/2;return[u(t)*e,a(t)*e]},k.innerRadius=function(t){return arguments.length?(s=typeof t==`function`?t:e(+t),k):s},k.outerRadius=function(t){return arguments.length?(x=typeof t==`function`?t:e(+t),k):x},k.cornerRadius=function(t){return arguments.length?(S=typeof t==`function`?t:e(+t),k):S},k.padRadius=function(t){return arguments.length?(C=t==null?null:typeof t==`function`?t:e(+t),k):C},k.startAngle=function(t){return arguments.length?(w=typeof t==`function`?t:e(+t),k):w},k.endAngle=function(t){return arguments.length?(T=typeof t==`function`?t:e(+t),k):T},k.padAngle=function(t){return arguments.length?(E=typeof t==`function`?t:e(+t),k):E},k.context=function(e){return arguments.length?(D=e??null,k):D},k}export{x as t};
|