@fullstackhouse/cerber 1.6.5-pr.95.4276b94 → 1.6.5-pr.95.8074716

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 (63) hide show
  1. package/dist/core/autoreview.js +1 -1
  2. package/dist/core/gh.js +14 -23
  3. package/dist/server/daemon.js +9 -21
  4. package/package.json +1 -1
  5. package/web/dist/assets/{abnfDiagram-WEYOIA3C-ZVjk8TRR.js → abnfDiagram-WEYOIA3C-BR44kMtj.js} +1 -1
  6. package/web/dist/assets/{arc-DOWPP57-.js → arc-3ystEIhw.js} +1 -1
  7. package/web/dist/assets/{architectureDiagram-ZHVYKT53-BLa6AOgS.js → architectureDiagram-ZHVYKT53-DXqQcprP.js} +1 -1
  8. package/web/dist/assets/{blockDiagram-RJAE7QA3-1eiXMp4x.js → blockDiagram-RJAE7QA3-BP1Q4TtO.js} +1 -1
  9. package/web/dist/assets/{c4Diagram-XDPPPE54-Cvi16eFl.js → c4Diagram-XDPPPE54-CtJ6gTyt.js} +1 -1
  10. package/web/dist/assets/channel-D7LGJ7OI.js +1 -0
  11. package/web/dist/assets/{chunk-2E7WHVMD-D-_dw85f.js → chunk-2E7WHVMD-DR3KXQXv.js} +1 -1
  12. package/web/dist/assets/{chunk-2Q5K7J3B-fGO6Rj6K.js → chunk-2Q5K7J3B-y2NRT60i.js} +1 -1
  13. package/web/dist/assets/{chunk-4EMNKR2T-Cdjpm4mM.js → chunk-4EMNKR2T-BIdX0Ds_.js} +1 -1
  14. package/web/dist/assets/{chunk-55XCU76K-8vKcpusr.js → chunk-55XCU76K-Gan0lnQz.js} +1 -1
  15. package/web/dist/assets/{chunk-5VM5RSS4-CwqOf2Km.js → chunk-5VM5RSS4-Djpz9IvY.js} +1 -1
  16. package/web/dist/assets/{chunk-JWPE2WC7-DzKBdMkf.js → chunk-JWPE2WC7-Bixj1CbF.js} +1 -1
  17. package/web/dist/assets/{chunk-VQ5W62QI-DYd1jpy5.js → chunk-VQ5W62QI-Cmj0GKOF.js} +1 -1
  18. package/web/dist/assets/{chunk-XXDRQBXY-30xD2ao8.js → chunk-XXDRQBXY-DvlqGcP7.js} +1 -1
  19. package/web/dist/assets/{chunk-ZCHMQSOR-C1fPNQyM.js → chunk-ZCHMQSOR-eg5pae0j.js} +2 -2
  20. package/web/dist/assets/{classDiagram-v2-4MYWR3UA-cEFXJtWi.js → classDiagram-v2-4MYWR3UA-DgOd-PQK.js} +1 -1
  21. package/web/dist/assets/{cose-bilkent-JH36ORCC-BwnNG4V_.js → cose-bilkent-JH36ORCC-J_gvWNP0.js} +1 -1
  22. package/web/dist/assets/{cynefin-EF2NZ3EQ-KI3U995R.js → cynefin-EF2NZ3EQ-B_SKzor5.js} +1 -1
  23. package/web/dist/assets/{cynefinDiagram-WF24UDRP-CxK-GEja.js → cynefinDiagram-WF24UDRP-BfF5Qbgg.js} +1 -1
  24. package/web/dist/assets/{dagre-NK4GIZVX-DZg6HiOj.js → dagre-NK4GIZVX-CWBvgfMf.js} +1 -1
  25. package/web/dist/assets/{diagram-CBK3MWTC-OkPOrNUp.js → diagram-CBK3MWTC-DmJhvsT0.js} +1 -1
  26. package/web/dist/assets/{diagram-I5XIIV2D-Cx5Ko7MY.js → diagram-I5XIIV2D-BJP096jB.js} +1 -1
  27. package/web/dist/assets/{diagram-ODIL2UCW-BctjIVeG.js → diagram-ODIL2UCW-DXH-iGSW.js} +1 -1
  28. package/web/dist/assets/{diagram-PFBEJUXE-CHz5D9mp.js → diagram-PFBEJUXE-DahNwDhl.js} +1 -1
  29. package/web/dist/assets/{diagram-RJA3I4VV-8SX2X19I.js → diagram-RJA3I4VV-CqUUXvNd.js} +1 -1
  30. package/web/dist/assets/{diagram-TYUNFSNR-DurOnOhU.js → diagram-TYUNFSNR-BgNHeOUY.js} +1 -1
  31. package/web/dist/assets/{ebnfDiagram-V4P3TTPT-Cu--JXQi.js → ebnfDiagram-V4P3TTPT-HJCdw74K.js} +1 -1
  32. package/web/dist/assets/{elk-QONTBCTQ-6QbN31Uk.js → elk-QONTBCTQ-B-AM96rF.js} +1 -1
  33. package/web/dist/assets/{erDiagram-KYQIGQAA-DjmOgpYh.js → erDiagram-KYQIGQAA-CUFDCvC8.js} +1 -1
  34. package/web/dist/assets/{flowDiagram-IUGLLWBU-CDtY0JeV.js → flowDiagram-IUGLLWBU-COI4PSAH.js} +1 -1
  35. package/web/dist/assets/{ganttDiagram-R7GPNTJY-C0okldn-.js → ganttDiagram-R7GPNTJY-COwqNgzN.js} +1 -1
  36. package/web/dist/assets/{gitGraphDiagram-PDYL7XHY-CpoFa94u.js → gitGraphDiagram-PDYL7XHY-B52YBCM_.js} +1 -1
  37. package/web/dist/assets/{index-DSUaxe4H.js → index-pX1lTtx6.js} +42 -42
  38. package/web/dist/assets/{infoDiagram-MVDRKAX5-Ygztm1Pp.js → infoDiagram-MVDRKAX5-qPAx6ekp.js} +1 -1
  39. package/web/dist/assets/{ishikawaDiagram-HPEHV2GE-CEUgXYG-.js → ishikawaDiagram-HPEHV2GE-DL1RNW_l.js} +1 -1
  40. package/web/dist/assets/{journeyDiagram-BOSHW7O7-BeKRFtY5.js → journeyDiagram-BOSHW7O7-B5wiCWgX.js} +1 -1
  41. package/web/dist/assets/{kanban-definition-FNSA4HC5-DTiTF_cF.js → kanban-definition-FNSA4HC5-DMmdTutW.js} +1 -1
  42. package/web/dist/assets/{linear-DQ-15MJG.js → linear-UDQwLr4L.js} +1 -1
  43. package/web/dist/assets/{mermaid.core-a2mmm40M.js → mermaid.core-uOazfyc1.js} +4 -4
  44. package/web/dist/assets/{mindmap-definition-6OY57UG3-DBh5JyfG.js → mindmap-definition-6OY57UG3-Cn-sK0gY.js} +1 -1
  45. package/web/dist/assets/{pegDiagram-ECIUJNBX-DXSD-3Z7.js → pegDiagram-ECIUJNBX-BedOHpzJ.js} +1 -1
  46. package/web/dist/assets/{pieDiagram-GNMPY74T-B_CsO-Kg.js → pieDiagram-GNMPY74T-BeVcAjsQ.js} +1 -1
  47. package/web/dist/assets/{quadrantDiagram-D57K4MC3-BwPADVT9.js → quadrantDiagram-D57K4MC3-UmC-iPXF.js} +1 -1
  48. package/web/dist/assets/{railroadDiagram-Y72NRBL7-DZ-AJFkA.js → railroadDiagram-Y72NRBL7-CJelcBGC.js} +1 -1
  49. package/web/dist/assets/{requirementDiagram-EQYSW5RA-CINS96lV.js → requirementDiagram-EQYSW5RA-BzjyYj14.js} +1 -1
  50. package/web/dist/assets/{sankeyDiagram-SY24JHO5-BoiQiR0y.js → sankeyDiagram-SY24JHO5-onqTMiB4.js} +1 -1
  51. package/web/dist/assets/{sequenceDiagram-BLEHNHQU-48pmhSGP.js → sequenceDiagram-BLEHNHQU-B0VStBpK.js} +1 -1
  52. package/web/dist/assets/{sizeCapture-INFHLROL-DiiXSO89.js → sizeCapture-INFHLROL-ErSVibHr.js} +1 -1
  53. package/web/dist/assets/{stateDiagram-v2-A6IESKWZ-nQXJ4XNA.js → stateDiagram-v2-A6IESKWZ-DCs1Nd-f.js} +1 -1
  54. package/web/dist/assets/{swimlanes-B3ENRKFQ-Bt_0aKLf.js → swimlanes-B3ENRKFQ-CncsMWEi.js} +1 -1
  55. package/web/dist/assets/swimlanesDiagram-AYQRV4AK-CfNkGCeP.js +8 -0
  56. package/web/dist/assets/{timeline-definition-JXYKGLGB-4D3Uxq1w.js → timeline-definition-JXYKGLGB-CL8XykNQ.js} +1 -1
  57. package/web/dist/assets/{usecaseDiagram-WPOLBNNX-BsAFmexj.js → usecaseDiagram-WPOLBNNX-TZNARo13.js} +1 -1
  58. package/web/dist/assets/{vennDiagram-Q3Y3IDCW-D7zQVvBt.js → vennDiagram-Q3Y3IDCW-IGqYWfQ_.js} +1 -1
  59. package/web/dist/assets/{wardleyDiagram-IVAIDKWA-B4uR9tXq.js → wardleyDiagram-IVAIDKWA-CbRzgVFX.js} +1 -1
  60. package/web/dist/assets/{xychartDiagram-4URNHDU4-CCjgk3js.js → xychartDiagram-4URNHDU4--7AWBTst.js} +1 -1
  61. package/web/dist/index.html +1 -1
  62. package/web/dist/assets/channel-BJT1iYGK.js +0 -1
  63. package/web/dist/assets/swimlanesDiagram-AYQRV4AK-CFDsqMUA.js +0 -8
@@ -1,5 +1,5 @@
1
1
  export function autoReviewFor(knobs, pr) {
2
- if (pr.requestedViaTeam !== false && !knobs.autoReviewTeamRequests)
2
+ if (pr.requestedViaTeam && !knobs.autoReviewTeamRequests)
3
3
  return false;
4
4
  const want = `${pr.owner}/${pr.repo}`.toLowerCase();
5
5
  for (const [key, on] of Object.entries(knobs.autoReviewRepos)) {
package/dist/core/gh.js CHANGED
@@ -562,32 +562,23 @@ export function searchPrsArgs(search, repoFilter, limit = 50, updatedSince = nul
562
562
  return args;
563
563
  }
564
564
  export const searchAwaitingArgs = (repoFilter, limit = 50) => searchPrsArgs("review-requested", repoFilter, limit);
565
- /** Open PRs where the current gh user's review is requested, drafts included. */
566
- export async function searchAwaitingMe(repoFilter, limit = 50) {
567
- const out = await gh(searchAwaitingArgs(repoFilter, limit));
568
- return mapSearchResults(JSON.parse(out));
569
- }
570
- /** Open PRs where the current gh user's review is requested by name — a request of a team they are on does not count. */
571
- export async function searchNamingMe(repoFilter, limit = 50) {
572
- const out = await gh(searchPrsArgs("user-review-requested", repoFilter, limit));
573
- return mapSearchResults(JSON.parse(out));
574
- }
575
565
  /**
576
- * Mark each awaiting PR with whether the request named you or only a team
577
- * you are on.
566
+ * Open PRs where the current gh user's review is requested, drafts included,
567
+ * each marked with whether the request named you or only a team you are on.
578
568
  *
579
- * `review-requested:@me` matches both and cannot say which, so whatever the
580
- * by-name search lacks is a team's request. Its page holds a subset of the
581
- * awaiting one's, so it is only incomplete when more than a page of PRs name
582
- * you — and then the overflow reads as team-only, which at worst leaves a
583
- * draft to the click rather than writing one nobody wanted. `named` is null
584
- * when that search was not run or failed: then nothing is marked either way.
569
+ * `review-requested:@me` matches both and cannot say which, so the by-name
570
+ * search runs beside it and whatever it lacks is a team's request. Its page
571
+ * holds a subset of the first one's, so it is only incomplete when more than a
572
+ * page of PRs name you — and then the overflow reads as team-only, which at
573
+ * worst leaves a draft to the click rather than writing one nobody wanted.
585
574
  */
586
- export function markTeamRequests(awaiting, named) {
587
- if (named === null)
588
- return awaiting.map((pr) => ({ ...pr, requestedViaTeam: null }));
589
- const ids = new Set(named.map((pr) => artifactId(pr)));
590
- return awaiting.map((pr) => ({ ...pr, requestedViaTeam: !ids.has(artifactId(pr)) }));
575
+ export async function searchAwaitingMe(repoFilter, limit = 50) {
576
+ const [all, byName] = await Promise.all([
577
+ gh(searchAwaitingArgs(repoFilter, limit)),
578
+ gh(searchPrsArgs("user-review-requested", repoFilter, limit)),
579
+ ]);
580
+ const named = new Set(mapSearchResults(JSON.parse(byName)).map((pr) => artifactId(pr)));
581
+ return mapSearchResults(JSON.parse(all)).map((pr) => ({ ...pr, requestedViaTeam: !named.has(artifactId(pr)) }));
591
582
  }
592
583
  /**
593
584
  * Open PRs the current gh user opened, drafts included. They come to the inbox
@@ -2,7 +2,7 @@ import { SCHEMA_VERSION, artifactId, artifactKey } from "../core/artifact.js";
2
2
  import { evaluateAutoSend } from "../core/autosend.js";
3
3
  import { anyAutoReview, autoReviewFor, capAutoReview } from "../core/autoreview.js";
4
4
  import { loadConfig } from "../core/config.js";
5
- import { classifyReply, currentLogin, fetchConversation, fetchLastReviewRequest, fetchOwnReview, fetchPrInfo, fetchReviewRequests, lastMentionOfYou, lastWordOfYours, markTeamRequests, ownPrUpdatedSince, searchAuthoredByMe, searchAwaitingMe, searchNamingMe, stillRequested, submitReview, } from "../core/gh.js";
5
+ import { classifyReply, currentLogin, fetchConversation, fetchLastReviewRequest, fetchOwnReview, fetchPrInfo, fetchReviewRequests, lastMentionOfYou, lastWordOfYours, ownPrUpdatedSince, searchAuthoredByMe, searchAwaitingMe, stillRequested, submitReview, } from "../core/gh.js";
6
6
  import { withWriter } from "../core/history.js";
7
7
  import { isOwnPr } from "../core/own.js";
8
8
  import { pendingNews, notice, notify } from "../core/notify.js";
@@ -33,13 +33,12 @@ function awaitingPr(ref, reply) {
33
33
  return { id: artifactId(ref), reply, requestedViaTeam: ref.requestedViaTeam };
34
34
  }
35
35
  /**
36
- * Whether the last poll found this PR asking only a team of yours, or null if
37
- * it could not tell. A row the awaiting search did not return — your own PR,
38
- * one pulled in by hand — was asked of nobody, so of no team either.
36
+ * Whether the last poll found this PR asking only a team of yours. A row the
37
+ * awaiting search did not return — your own PR, one pulled in by hand — was
38
+ * asked of nobody, so of no team either.
39
39
  */
40
40
  export function requestedViaTeam(awaiting, id) {
41
- const entry = awaiting.find((a) => a.id === id);
42
- return entry ? entry.requestedViaTeam : false;
41
+ return awaiting.some((a) => a.id === id && a.requestedViaTeam);
43
42
  }
44
43
  /**
45
44
  * A pure discovery stub: enough artifact for the queue to show an awaiting row.
@@ -307,25 +306,14 @@ export function startDaemon(opts) {
307
306
  * PR decides nothing — a team you are on can be requested on your own PR,
308
307
  * and `isOwnPr` reads the author either way.
309
308
  */
310
- async function discover(me, ownPrMaxAgeDays, teamRequestsDrafted) {
309
+ async function discover(me, ownPrMaxAgeDays) {
311
310
  const filters = opts.repos.length > 0 ? opts.repos : [undefined];
312
311
  // Your own PRs only: a review request is never aged out. One that went
313
312
  // stale leaves the search, and the reaper below drops its stub like any
314
313
  // other the search stopped returning — a draft of yours stays put.
315
314
  const since = ownPrUpdatedSince(ownPrMaxAgeDays);
316
- const [awaiting, named, authored] = await Promise.all([
315
+ const [awaiting, authored] = await Promise.all([
317
316
  Promise.all(filters.map((repo) => searchAwaitingMe(repo))),
318
- // It only tells your requests from your teams', which changes nothing
319
- // while both are drafted — so it is only asked while they are not.
320
- // Failing, it costs that distinction for one poll rather than the poll:
321
- // discovery and the announcements go ahead, and a row nobody could
322
- // classify waits for the click like a team's.
323
- teamRequestsDrafted
324
- ? Promise.resolve(null)
325
- : Promise.all(filters.map((repo) => searchNamingMe(repo))).catch((err) => {
326
- log(`could not tell team review requests from yours: ${err instanceof Error ? err.message : String(err)}`);
327
- return null;
328
- }),
329
317
  me === null
330
318
  ? Promise.resolve(null)
331
319
  : Promise.all(filters.map((repo) => searchAuthoredByMe(repo, since))).catch((err) => {
@@ -334,7 +322,7 @@ export function startDaemon(opts) {
334
322
  }),
335
323
  ]);
336
324
  return {
337
- refs: dedupeDiscovered([...markTeamRequests(awaiting.flat(), named?.flat() ?? null), ...(authored ?? []).flat()]),
325
+ refs: dedupeDiscovered([...awaiting.flat(), ...(authored ?? []).flat()]),
338
326
  ownSearched: authored !== null,
339
327
  };
340
328
  }
@@ -904,7 +892,7 @@ export function startDaemon(opts) {
904
892
  status.lastSummary = "polling off (settings) — the queue only shows what you review by hand";
905
893
  return;
906
894
  }
907
- const { refs, ownSearched } = await discover(me, knobs.ownPrMaxAgeDays, knobs.autoReviewTeamRequests);
895
+ const { refs, ownSearched } = await discover(me, knobs.ownPrMaxAgeDays);
908
896
  // Your own PRs are synced into the queue with the rest, but nobody is
909
897
  // asking you for them: they are not "awaiting" in anything the strip
910
898
  // counts, and the cockpit's open-requests tab — "GitHub still lists you
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fullstackhouse/cerber",
3
- "version": "1.6.5-pr.95.4276b94",
3
+ "version": "1.6.5-pr.95.8074716",
4
4
  "description": "AI code-review cockpit: Claude reviews your PRs into local artifacts; nothing reaches GitHub until you say so.",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -1 +1 @@
1
- import{g as p,r as u,d as a}from"./chunk-2E7WHVMD-D-_dw85f.js";import{p as f}from"./chunk-JWPE2WC7-DzKBdMkf.js";import{_ as n,l as o}from"./mermaid.core-a2mmm40M.js";import{M as c,b as d}from"./cynefin-EF2NZ3EQ-KI3U995R.js";import"./index-DSUaxe4H.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},B={parser:R,db:a,renderer:u,styles:p};export{B as diagram};
1
+ import{g as p,r as u,d as a}from"./chunk-2E7WHVMD-DR3KXQXv.js";import{p as f}from"./chunk-JWPE2WC7-Bixj1CbF.js";import{_ as n,l as o}from"./mermaid.core-uOazfyc1.js";import{M as c,b as d}from"./cynefin-EF2NZ3EQ-B_SKzor5.js";import"./index-pX1lTtx6.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),l=t?parseInt(t,10):0,m=s?parseInt(s,10):1/0;return{min:l,max:m}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},B={parser:R,db:a,renderer:u,styles:p};export{B as diagram};
@@ -1 +1 @@
1
- import{a5 as ln,a6 as an,a7 as H,a8 as j,a9 as B,aa as un,ab as g,ac as tn,ad as L,ae as _,af as rn,ag as o,ah as on,ai as sn,aj as fn}from"./mermaid.core-a2mmm40M.js";function cn(l){return l.innerRadius}function gn(l){return l.outerRadius}function yn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,E,q,v,A,C,a){var I=E-l,i=q-h,n=C-v,d=a-A,u=d*I-n*i;if(!(u*u<g))return u=(n*(h-A)-d*(l-v))/u,[l+u*I,h+u*i]}function W(l,h,E,q,v,A,C){var a=l-E,I=h-q,i=(C?A:-A)/L(a*a+I*I),n=i*I,d=-i*a,u=l+n,s=h+d,f=E+n,c=q+d,F=(u+f)/2,t=(s+c)/2,m=f-u,y=c-s,R=m*m+y*y,T=v-A,P=u*c-f*s,O=(y<0?-1:1)*L(on(0,T*T*R-P*P)),S=(P*y-m*O)/R,z=(-P*m-y*O)/R,w=(P*y+m*O)/R,p=(-P*m+y*O)/R,x=S-F,e=z-t,r=w-F,G=p-t;return x*x+e*e>r*r+G*G&&(S=w,z=p),{cx:S,cy:z,x01:-n,y01:-d,x11:S*(v/T-1),y11:z*(v/T-1)}}function hn(){var l=cn,h=gn,E=B(0),q=null,v=yn,A=dn,C=mn,a=null,I=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,F=rn(c-f),t=c>f;if(a||(a=n=I()),s<u&&(d=s,s=u,u=d),!(s>g))a.moveTo(0,0);else if(F>tn-g)a.moveTo(s*H(f),s*j(f)),a.arc(0,0,s,f,c,!t),u>g&&(a.moveTo(u*H(c),u*j(c)),a.arc(0,0,u,c,f,t));else{var m=f,y=c,R=f,T=c,P=F,O=F,S=C.apply(this,arguments)/2,z=S>g&&(q?+q.apply(this,arguments):L(u*u+s*s)),w=_(rn(s-u)/2,+E.apply(this,arguments)),p=w,x=w,e,r;if(z>g){var G=sn(z/u*j(S)),M=sn(z/s*j(S));(P-=G*2)>g?(G*=t?1:-1,R+=G,T-=G):(P=0,R=T=(f+c)/2),(O-=M*2)>g?(M*=t?1:-1,m+=M,y-=M):(O=0,m=y=(f+c)/2)}var J=s*H(m),K=s*j(m),N=u*H(T),Q=u*j(T);if(w>g){var U=s*H(y),V=s*j(y),X=u*H(R),Y=u*j(R),D;if(F<an)if(D=pn(J,K,X,Y,U,V,N,Q)){var Z=J-D[0],$=K-D[1],b=U-D[0],k=V-D[1],nn=1/j(fn((Z*b+$*k)/(L(Z*Z+$*$)*L(b*b+k*k)))/2),en=L(D[0]*D[0]+D[1]*D[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}O>g?x>g?(e=W(X,Y,J,K,s,x,t),r=W(U,V,N,Q,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(J,K),a.arc(0,0,s,m,y,!t)):a.moveTo(J,K),!(u>g)||!(P>g)?a.lineTo(N,Q):p>g?(e=W(N,Q,U,V,u,-p,t),r=W(J,K,X,Y,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[H(d)*n,j(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:B(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:B(+n),i):h},i.cornerRadius=function(n){return arguments.length?(E=typeof n=="function"?n:B(+n),i):E},i.padRadius=function(n){return arguments.length?(q=n==null?null:typeof n=="function"?n:B(+n),i):q},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:B(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:B(+n),i):A},i.padAngle=function(n){return arguments.length?(C=typeof n=="function"?n:B(+n),i):C},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
1
+ import{a5 as ln,a6 as an,a7 as H,a8 as j,a9 as B,aa as un,ab as g,ac as tn,ad as L,ae as _,af as rn,ag as o,ah as on,ai as sn,aj as fn}from"./mermaid.core-uOazfyc1.js";function cn(l){return l.innerRadius}function gn(l){return l.outerRadius}function yn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,E,q,v,A,C,a){var I=E-l,i=q-h,n=C-v,d=a-A,u=d*I-n*i;if(!(u*u<g))return u=(n*(h-A)-d*(l-v))/u,[l+u*I,h+u*i]}function W(l,h,E,q,v,A,C){var a=l-E,I=h-q,i=(C?A:-A)/L(a*a+I*I),n=i*I,d=-i*a,u=l+n,s=h+d,f=E+n,c=q+d,F=(u+f)/2,t=(s+c)/2,m=f-u,y=c-s,R=m*m+y*y,T=v-A,P=u*c-f*s,O=(y<0?-1:1)*L(on(0,T*T*R-P*P)),S=(P*y-m*O)/R,z=(-P*m-y*O)/R,w=(P*y+m*O)/R,p=(-P*m+y*O)/R,x=S-F,e=z-t,r=w-F,G=p-t;return x*x+e*e>r*r+G*G&&(S=w,z=p),{cx:S,cy:z,x01:-n,y01:-d,x11:S*(v/T-1),y11:z*(v/T-1)}}function hn(){var l=cn,h=gn,E=B(0),q=null,v=yn,A=dn,C=mn,a=null,I=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,F=rn(c-f),t=c>f;if(a||(a=n=I()),s<u&&(d=s,s=u,u=d),!(s>g))a.moveTo(0,0);else if(F>tn-g)a.moveTo(s*H(f),s*j(f)),a.arc(0,0,s,f,c,!t),u>g&&(a.moveTo(u*H(c),u*j(c)),a.arc(0,0,u,c,f,t));else{var m=f,y=c,R=f,T=c,P=F,O=F,S=C.apply(this,arguments)/2,z=S>g&&(q?+q.apply(this,arguments):L(u*u+s*s)),w=_(rn(s-u)/2,+E.apply(this,arguments)),p=w,x=w,e,r;if(z>g){var G=sn(z/u*j(S)),M=sn(z/s*j(S));(P-=G*2)>g?(G*=t?1:-1,R+=G,T-=G):(P=0,R=T=(f+c)/2),(O-=M*2)>g?(M*=t?1:-1,m+=M,y-=M):(O=0,m=y=(f+c)/2)}var J=s*H(m),K=s*j(m),N=u*H(T),Q=u*j(T);if(w>g){var U=s*H(y),V=s*j(y),X=u*H(R),Y=u*j(R),D;if(F<an)if(D=pn(J,K,X,Y,U,V,N,Q)){var Z=J-D[0],$=K-D[1],b=U-D[0],k=V-D[1],nn=1/j(fn((Z*b+$*k)/(L(Z*Z+$*$)*L(b*b+k*k)))/2),en=L(D[0]*D[0]+D[1]*D[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}O>g?x>g?(e=W(X,Y,J,K,s,x,t),r=W(U,V,N,Q,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(J,K),a.arc(0,0,s,m,y,!t)):a.moveTo(J,K),!(u>g)||!(P>g)?a.lineTo(N,Q):p>g?(e=W(N,Q,U,V,u,-p,t),r=W(J,K,X,Y,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[H(d)*n,j(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:B(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:B(+n),i):h},i.cornerRadius=function(n){return arguments.length?(E=typeof n=="function"?n:B(+n),i):E},i.padRadius=function(n){return arguments.length?(q=n==null?null:typeof n=="function"?n:B(+n),i):q},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:B(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:B(+n),i):A},i.padAngle=function(n){return arguments.length?(C=typeof n=="function"?n:B(+n),i):C},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};