@economic/agents-playground 0.0.1-beta.6 → 1.0.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.
- package/README.md +9 -9
- package/bin/cli.mjs +8 -3
- package/dist/assets/{_basePickBy-BZNHaCnJ.js → _basePickBy-yrdMoyRa.js} +1 -1
- package/dist/assets/{_baseUniq-CEuT_w6h.js → _baseUniq-BdCUZ9M5.js} +1 -1
- package/dist/assets/architecture-PBZL5I3N-Cad1LrWT.js +1 -0
- package/dist/assets/architectureDiagram-2XIMDMQ5-CXe1GsCp.js +36 -0
- package/dist/assets/{blockDiagram-WCTKOSBZ-BVPSFu72.js → blockDiagram-WCTKOSBZ-WvVIvKo3.js} +1 -1
- package/dist/assets/{chunk-7E7YKBS2-ClGSdO9P.js → chunk-7E7YKBS2-BGpfhwxh.js} +1 -1
- package/dist/assets/{chunk-C72U2L5F-C9vw6Vph.js → chunk-C72U2L5F-BO7XGzNn.js} +1 -1
- package/dist/assets/{chunk-EGIJ26TM-C_G2Pjv-.js → chunk-EGIJ26TM-BJdFILT0.js} +1 -1
- package/dist/assets/{chunk-L3YUKLVL-3RCwiwN1.js → chunk-L3YUKLVL-BmMfhz2B.js} +1 -1
- package/dist/assets/{chunk-NQ4KR5QH-CYGSW7DX.js → chunk-NQ4KR5QH-f5X7YUdy.js} +1 -1
- package/dist/assets/{chunk-OZEHJAEY-D4zEs9SV.js → chunk-OZEHJAEY-BdHqIz8_.js} +1 -1
- package/dist/assets/{chunk-R5LLSJPH-B5kh1kkd.js → chunk-R5LLSJPH-9LnZ-s_V.js} +1 -1
- package/dist/assets/{chunk-WL4C6EOR-DE1IVTFw.js → chunk-WL4C6EOR-SO8Rq4UE.js} +1 -1
- package/dist/assets/{chunk-XIRO2GV7-DF8ctPHD.js → chunk-XIRO2GV7-BVE8qECr.js} +1 -1
- package/dist/assets/{chunk-XZSTWKYB-MNkGMgzF.js → chunk-XZSTWKYB-DCEIWIqq.js} +1 -1
- package/dist/assets/classDiagram-VBA2DB6C-BEQm-49f.js +1 -0
- package/dist/assets/classDiagram-v2-RAHNMMFH-fw-8tC0c.js +1 -0
- package/dist/assets/clone-CGkAhfYR.js +1 -0
- package/dist/assets/{dagre-Bwu_YNAf.js → dagre-4O7tL0je.js} +1 -1
- package/dist/assets/dagre-KLK3FWXG-Cn3uXM0V.js +4 -0
- package/dist/assets/diagram-E7M64L7V-CCy1m6PJ.js +24 -0
- package/dist/assets/diagram-IFDJBPK2-SbqNcW81.js +43 -0
- package/dist/assets/diagram-P4PSJMXO-DDVenWMc.js +24 -0
- package/dist/assets/{erDiagram-INFDFZHY--_9ENSqk.js → erDiagram-INFDFZHY-C3LYWEpo.js} +1 -1
- package/dist/assets/{flowDiagram-PKNHOUZH-BDKsv5d1.js → flowDiagram-PKNHOUZH-DCj5WLbj.js} +1 -1
- package/dist/assets/ganttDiagram-A5KZAMGK-BEoHssiP.js +292 -0
- package/dist/assets/gitGraph-HDMCJU4V-Cn-UK-sq.js +1 -0
- package/dist/assets/gitGraphDiagram-K3NZZRJ6-CV51mwUg.js +65 -0
- package/dist/assets/{graphlib-C0KzFwj0.js → graphlib-Bm7lcrUK.js} +1 -1
- package/dist/assets/{highlighted-body-OFNGDK62-DErzHI0L.js → highlighted-body-OFNGDK62-Dp3ztwIT.js} +1 -1
- package/dist/assets/{index-Dh2p7GUF.js → index-DXEtzDAV.js} +10 -10
- package/dist/assets/info-3K5VOQVL-CE6MZbxN.js +1 -0
- package/dist/assets/infoDiagram-LFFYTUFH-Djc7zwh9.js +2 -0
- package/dist/assets/{ishikawaDiagram-PHBUUO56-_TPEs2m0.js → ishikawaDiagram-PHBUUO56-BJ58d9Jk.js} +1 -1
- package/dist/assets/{journeyDiagram-4ABVD52K-C-U1F_87.js → journeyDiagram-4ABVD52K-BbJAX67K.js} +1 -1
- package/dist/assets/{kanban-definition-K7BYSVSG-Cw87Rab7.js → kanban-definition-K7BYSVSG-_PQKDb6G.js} +1 -1
- package/dist/assets/mermaid-GHXKKRXX-BjkWKRgx.js +1 -0
- package/dist/assets/mermaid-parser.core-CCnSeR0B.js +4 -0
- package/dist/assets/{mindmap-definition-YRQLILUH-B68Q6TU2.js → mindmap-definition-YRQLILUH-DlEtVP2j.js} +1 -1
- package/dist/assets/{ordinal-t_ha_BUo.js → ordinal-BffLatsF.js} +1 -1
- package/dist/assets/packet-RMMSAZCW-CQjOaPM8.js +1 -0
- package/dist/assets/pie-UPGHQEXC-CxFpgwTC.js +1 -0
- package/dist/assets/{pieDiagram-SKSYHLDU-DOeqI-Xk.js → pieDiagram-SKSYHLDU-C7-s9HqH.js} +1 -1
- package/dist/assets/{quadrantDiagram-337W2JSQ-C3xMuDjL.js → quadrantDiagram-337W2JSQ-BYRgqy3l.js} +1 -1
- package/dist/assets/radar-KQ55EAFF-CXSI5zhq.js +1 -0
- package/dist/assets/{requirementDiagram-Z7DCOOCP-J8L4B0bp.js → requirementDiagram-Z7DCOOCP-z1GE-T5H.js} +1 -1
- package/dist/assets/{sankeyDiagram-WA2Y5GQK-Bemb6KrC.js → sankeyDiagram-WA2Y5GQK-ljtUGdwd.js} +1 -1
- package/dist/assets/{sequenceDiagram-2WXFIKYE-CL-UgQPN.js → sequenceDiagram-2WXFIKYE-Dmj3tYFt.js} +1 -1
- package/dist/assets/stateDiagram-RAJIS63D-U-EujGed.js +1 -0
- package/dist/assets/stateDiagram-v2-FVOUBMTO-2uVNjycs.js +1 -0
- package/dist/assets/treemap-KZPCXAKY-DKNko2Ay.js +1 -0
- package/dist/assets/{vennDiagram-LZ73GAT5-D9K7I756.js → vennDiagram-LZ73GAT5-B1RIPDjh.js} +1 -1
- package/dist/assets/{xychartDiagram-JWTSCODW-DD5SCVwn.js → xychartDiagram-JWTSCODW-D9kjPJFQ.js} +1 -1
- package/dist/index.html +2 -2
- package/package.json +3 -3
- package/dist/assets/architecture-PBZL5I3N-FUwzdylc.js +0 -1
- package/dist/assets/architectureDiagram-2XIMDMQ5-DDn8BtZj.js +0 -36
- package/dist/assets/classDiagram-VBA2DB6C-D7qqO9na.js +0 -1
- package/dist/assets/classDiagram-v2-RAHNMMFH-k5MipEDV.js +0 -1
- package/dist/assets/clone-D8XnF9wK.js +0 -1
- package/dist/assets/dagre-KLK3FWXG-Cb7G7hCx.js +0 -4
- package/dist/assets/diagram-E7M64L7V-Cm-DvWIK.js +0 -24
- package/dist/assets/diagram-IFDJBPK2-CtHh-A5R.js +0 -43
- package/dist/assets/diagram-P4PSJMXO-D2EIGF-1.js +0 -24
- package/dist/assets/ganttDiagram-A5KZAMGK-CS4Q9uqC.js +0 -292
- package/dist/assets/gitGraph-HDMCJU4V-W7hXAzyz.js +0 -1
- package/dist/assets/gitGraphDiagram-K3NZZRJ6-CkL70slu.js +0 -65
- package/dist/assets/info-3K5VOQVL-Td3WeFrt.js +0 -1
- package/dist/assets/infoDiagram-LFFYTUFH-DRYt9NL6.js +0 -2
- package/dist/assets/mermaid-GHXKKRXX-vQhYRIRq.js +0 -1
- package/dist/assets/mermaid-parser.core-jqGiw51o.js +0 -4
- package/dist/assets/packet-RMMSAZCW-B_JuUQQV.js +0 -1
- package/dist/assets/pie-UPGHQEXC-zZj-EEcS.js +0 -1
- package/dist/assets/radar-KQ55EAFF-DyUfi1WF.js +0 -1
- package/dist/assets/stateDiagram-RAJIS63D-CsnUtyN1.js +0 -1
- package/dist/assets/stateDiagram-v2-FVOUBMTO-D-fQGq-k.js +0 -1
- package/dist/assets/treemap-KZPCXAKY-B231VXy0.js +0 -1
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import{g as e,h as t,p as n}from"./src-B0URjIBy.js";import{B as r,C as i,V as a,W as o,_ as s,a as c,d as l,q as u,s as d,v as f,y as p}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{h as ee,p as te,r as m}from"./chunk-GEFDOKGD-D5eIWnuf.js";import"./dist-CpWSQIlk.js";import"./chunk-XZSTWKYB-MNkGMgzF.js";import"./chunk-R5LLSJPH-B5kh1kkd.js";import"./chunk-7E7YKBS2-ClGSdO9P.js";import"./chunk-EGIJ26TM-C_G2Pjv-.js";import"./chunk-C72U2L5F-C9vw6Vph.js";import"./chunk-XIRO2GV7-DF8ctPHD.js";import"./chunk-L3YUKLVL-3RCwiwN1.js";import"./chunk-OZEHJAEY-D4zEs9SV.js";import{t as h}from"./chunk-4BX2VUAB-BMQY333L.js";import{t as g}from"./mermaid-parser.core-jqGiw51o.js";import{t as ne}from"./chunk-QZHKN3VN-C-zFVA0L.js";var _={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},re=l.gitGraph,v=t(()=>m({...re,...p().gitGraph}),`getConfig`),y=new ne(()=>{let e=v(),t=e.mainBranchName,n=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:n}]]),branches:new Map([[t,null]]),currBranch:t,direction:`LR`,seq:0,options:{}}});function b(){return te({length:7})}t(b,`getID`);function x(e,t){let n=Object.create(null);return e.reduce((e,r)=>{let i=t(r);return n[i]||(n[i]=!0,e.push(r)),e},[])}t(x,`uniqBy`);var S=t(function(e){y.records.direction=e},`setDirection`),C=t(function(t){e.debug(`options str`,t),t=t?.trim(),t||=`{}`;try{y.records.options=JSON.parse(t)}catch(t){e.error(`error while parsing gitGraph options`,t.message)}},`setOptions`),ie=t(function(){return y.records.options},`getOptions`),ae=t(function(t){let n=t.msg,r=t.id,i=t.type,a=t.tags;e.info(`commit`,n,r,i,a),e.debug(`Entering commit:`,n,r,i,a);let o=v();r=d.sanitizeText(r,o),n=d.sanitizeText(n,o),a=a?.map(e=>d.sanitizeText(e,o));let s={id:r||y.records.seq+`-`+b(),message:n,seq:y.records.seq++,type:i??_.NORMAL,tags:a??[],parents:y.records.head==null?[]:[y.records.head.id],branch:y.records.currBranch};y.records.head=s,e.info(`main branch`,o.mainBranchName),y.records.commits.has(s.id)&&e.warn(`Commit ID ${s.id} already exists`),y.records.commits.set(s.id,s),y.records.branches.set(y.records.currBranch,s.id),e.debug(`in pushCommit `+s.id)},`commit`),oe=t(function(t){let n=t.name,r=t.order;if(n=d.sanitizeText(n,v()),y.records.branches.has(n))throw Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${n}")`);y.records.branches.set(n,y.records.head==null?null:y.records.head.id),y.records.branchConfig.set(n,{name:n,order:r}),w(n),e.debug(`in createBranch`)},`branch`),se=t(t=>{let n=t.branch,r=t.id,i=t.type,a=t.tags,o=v();n=d.sanitizeText(n,o),r&&=d.sanitizeText(r,o);let s=y.records.branches.get(y.records.currBranch),c=y.records.branches.get(n),l=s?y.records.commits.get(s):void 0,u=c?y.records.commits.get(c):void 0;if(l&&u&&l.branch===n)throw Error(`Cannot merge branch '${n}' into itself.`);if(y.records.currBranch===n){let e=Error(`Incorrect usage of "merge". Cannot merge a branch to itself`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(l===void 0||!l){let e=Error(`Incorrect usage of "merge". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`commit`]},e}if(!y.records.branches.has(n)){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) does not exist`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch ${n}`]},e}if(u===void 0||!u){let e=Error(`Incorrect usage of "merge". Branch to be merged (`+n+`) has no commits`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`"commit"`]},e}if(l===u){let e=Error(`Incorrect usage of "merge". Both branches have same head`);throw e.hash={text:`merge ${n}`,token:`merge ${n}`,expected:[`branch abc`]},e}if(r&&y.records.commits.has(r)){let e=Error(`Incorrect usage of "merge". Commit with id:`+r+` already exists, use different custom id`);throw e.hash={text:`merge ${n} ${r} ${i} ${a?.join(` `)}`,token:`merge ${n} ${r} ${i} ${a?.join(` `)}`,expected:[`merge ${n} ${r}_UNIQUE ${i} ${a?.join(` `)}`]},e}let f=c||``,p={id:r||`${y.records.seq}-${b()}`,message:`merged branch ${n} into ${y.records.currBranch}`,seq:y.records.seq++,parents:y.records.head==null?[]:[y.records.head.id,f],branch:y.records.currBranch,type:_.MERGE,customType:i,customId:!!r,tags:a??[]};y.records.head=p,y.records.commits.set(p.id,p),y.records.branches.set(y.records.currBranch,p.id),e.debug(y.records.branches),e.debug(`in mergeBranch`)},`merge`),ce=t(function(t){let n=t.id,r=t.targetId,i=t.tags,a=t.parent;e.debug(`Entering cherryPick:`,n,r,i);let o=v();if(n=d.sanitizeText(n,o),r=d.sanitizeText(r,o),i=i?.map(e=>d.sanitizeText(e,o)),a=d.sanitizeText(a,o),!n||!y.records.commits.has(n)){let e=Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let s=y.records.commits.get(n);if(s===void 0||!s)throw Error(`Incorrect usage of "cherryPick". Source commit id should exist and provided`);if(a&&!(Array.isArray(s.parents)&&s.parents.includes(a)))throw Error(`Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.`);let c=s.branch;if(s.type===_.MERGE&&!a)throw Error(`Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.`);if(!r||!y.records.commits.has(r)){if(c===y.records.currBranch){let e=Error(`Incorrect usage of "cherryPick". Source commit is already on current branch`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let t=y.records.branches.get(y.records.currBranch);if(t===void 0||!t){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let o=y.records.commits.get(t);if(o===void 0||!o){let e=Error(`Incorrect usage of "cherry-pick". Current branch (${y.records.currBranch})has no commits`);throw e.hash={text:`cherryPick ${n} ${r}`,token:`cherryPick ${n} ${r}`,expected:[`cherry-pick abc`]},e}let l={id:y.records.seq+`-`+b(),message:`cherry-picked ${s?.message} into ${y.records.currBranch}`,seq:y.records.seq++,parents:y.records.head==null?[]:[y.records.head.id,s.id],branch:y.records.currBranch,type:_.CHERRY_PICK,tags:i?i.filter(Boolean):[`cherry-pick:${s.id}${s.type===_.MERGE?`|parent:${a}`:``}`]};y.records.head=l,y.records.commits.set(l.id,l),y.records.branches.set(y.records.currBranch,l.id),e.debug(y.records.branches),e.debug(`in cherryPick`)}},`cherryPick`),w=t(function(e){if(e=d.sanitizeText(e,v()),y.records.branches.has(e)){y.records.currBranch=e;let t=y.records.branches.get(y.records.currBranch);t===void 0||!t?y.records.head=null:y.records.head=y.records.commits.get(t)??null}else{let t=Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${e}")`);throw t.hash={text:`checkout ${e}`,token:`checkout ${e}`,expected:[`branch ${e}`]},t}},`checkout`);function T(e,t,n){let r=e.indexOf(t);r===-1?e.push(n):e.splice(r,1,n)}t(T,`upsert`);function E(t){let n=t.reduce((e,t)=>e.seq>t.seq?e:t,t[0]),r=``;t.forEach(function(e){e===n?r+=` *`:r+=` |`});let i=[r,n.id,n.seq];for(let e in y.records.branches)y.records.branches.get(e)===n.id&&i.push(e);if(e.debug(i.join(` `)),n.parents&&n.parents.length==2&&n.parents[0]&&n.parents[1]){let e=y.records.commits.get(n.parents[0]);T(t,n,e),n.parents[1]&&t.push(y.records.commits.get(n.parents[1]))}else if(n.parents.length==0)return;else if(n.parents[0]){let e=y.records.commits.get(n.parents[0]);T(t,n,e)}t=x(t,e=>e.id),E(t)}t(E,`prettyPrintCommitHistory`);var le=t(function(){e.debug(y.records.commits);let t=D()[0];E([t])},`prettyPrint`),ue=t(function(){y.reset(),c()},`clear`),de=t(function(){return[...y.records.branchConfig.values()].map((e,t)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${t}`)}).sort((e,t)=>(e.order??0)-(t.order??0)).map(({name:e})=>({name:e}))},`getBranchesAsObjArray`),fe=t(function(){return y.records.branches},`getBranches`),pe=t(function(){return y.records.commits},`getCommits`),D=t(function(){let t=[...y.records.commits.values()];return t.forEach(function(t){e.debug(t.id)}),t.sort((e,t)=>e.seq-t.seq),t},`getCommitsArray`),O={commitType:_,getConfig:v,setDirection:S,setOptions:C,getOptions:ie,commit:ae,branch:oe,merge:se,cherryPick:ce,checkout:w,prettyPrint:le,clear:ue,getBranchesAsObjArray:de,getBranches:fe,getCommits:pe,getCommitsArray:D,getCurrentBranch:t(function(){return y.records.currBranch},`getCurrentBranch`),getDirection:t(function(){return y.records.direction},`getDirection`),getHead:t(function(){return y.records.head},`getHead`),setAccTitle:a,getAccTitle:f,getAccDescription:s,setAccDescription:r,setDiagramTitle:o,getDiagramTitle:i},k=t((e,t)=>{h(e,t),e.dir&&t.setDirection(e.dir);for(let n of e.statements)A(n,t)},`populate`),A=t((n,r)=>{let i={Commit:t(e=>r.commit(j(e)),`Commit`),Branch:t(e=>r.branch(M(e)),`Branch`),Merge:t(e=>r.merge(N(e)),`Merge`),Checkout:t(e=>r.checkout(P(e)),`Checkout`),CherryPicking:t(e=>r.cherryPick(F(e)),`CherryPicking`)}[n.$type];i?i(n):e.error(`Unknown statement type: ${n.$type}`)},`parseStatement`),j=t(e=>({id:e.id,msg:e.message??``,type:e.type===void 0?_.NORMAL:_[e.type],tags:e.tags??void 0}),`parseCommit`),M=t(e=>({name:e.name,order:e.order??0}),`parseBranch`),N=t(e=>({branch:e.branch,id:e.id??``,type:e.type===void 0?void 0:_[e.type],tags:e.tags??void 0}),`parseMerge`),P=t(e=>e.branch,`parseCheckout`),F=t(e=>({id:e.id,targetId:``,tags:e.tags?.length===0?void 0:e.tags,parent:e.parent}),`parseCherryPicking`),I={parse:t(async t=>{let n=await g(`gitGraph`,t);e.debug(n),k(n,O)},`parse`)},L=10,R=40,z=4,B=2,V=8,H=new Map,U=new Map,W=30,G=new Map,K=[],q=0,J=`LR`,me=t(()=>{H.clear(),U.clear(),G.clear(),q=0,K=[],J=`LR`},`clear`),Y=t(e=>{let t=document.createElementNS(`http://www.w3.org/2000/svg`,`text`);return(typeof e==`string`?e.split(/\\n|\n|<br\s*\/?>/gi):e).forEach(e=>{let n=document.createElementNS(`http://www.w3.org/2000/svg`,`tspan`);n.setAttributeNS(`http://www.w3.org/XML/1998/namespace`,`xml:space`,`preserve`),n.setAttribute(`dy`,`1em`),n.setAttribute(`x`,`0`),n.setAttribute(`class`,`row`),n.textContent=e.trim(),t.appendChild(n)}),t},`drawText`),X=t(e=>{let n,r,i;return J===`BT`?(r=t((e,t)=>e<=t,`comparisonFunc`),i=1/0):(r=t((e,t)=>e>=t,`comparisonFunc`),i=0),e.forEach(e=>{let t=J===`TB`||J==`BT`?U.get(e)?.y:U.get(e)?.x;t!==void 0&&r(t,i)&&(n=e,i=t)}),n},`findClosestParent`),he=t(e=>{let t=``,n=1/0;return e.forEach(e=>{let r=U.get(e).y;r<=n&&(t=e,n=r)}),t||void 0},`findClosestParentBT`),ge=t((e,t,n)=>{let r=n,i=n,a=[];e.forEach(e=>{let n=t.get(e);if(!n)throw Error(`Commit not found for key ${e}`);n.parents.length?(r=ve(n),i=Math.max(r,i)):a.push(n),ye(n,r)}),r=i,a.forEach(e=>{be(e,r,n)}),e.forEach(e=>{let n=t.get(e);if(n?.parents.length){let e=he(n.parents);r=U.get(e).y-R,r<=i&&(i=r);let t=H.get(n.branch).pos,a=r-L;U.set(n.id,{x:t,y:a})}})},`setParallelBTPos`),_e=t(e=>{let t=X(e.parents.filter(e=>e!==null));if(!t)throw Error(`Closest parent not found for commit ${e.id}`);let n=U.get(t)?.y;if(n===void 0)throw Error(`Closest parent position not found for commit ${e.id}`);return n},`findClosestParentPos`),ve=t(e=>_e(e)+R,`calculateCommitPosition`),ye=t((e,t)=>{let n=H.get(e.branch);if(!n)throw Error(`Branch not found for commit ${e.id}`);let r=n.pos,i=t+L;return U.set(e.id,{x:r,y:i}),{x:r,y:i}},`setCommitPosition`),be=t((e,t,n)=>{let r=H.get(e.branch);if(!r)throw Error(`Branch not found for commit ${e.id}`);let i=t+n,a=r.pos;U.set(e.id,{x:a,y:i})},`setRootPosition`),xe=t((e,t,n,r,i,a)=>{if(a===_.HIGHLIGHT)e.append(`rect`).attr(`x`,n.x-10).attr(`y`,n.y-10).attr(`width`,20).attr(`height`,20).attr(`class`,`commit ${t.id} commit-highlight${i%V} ${r}-outer`),e.append(`rect`).attr(`x`,n.x-6).attr(`y`,n.y-6).attr(`width`,12).attr(`height`,12).attr(`class`,`commit ${t.id} commit${i%V} ${r}-inner`);else if(a===_.CHERRY_PICK)e.append(`circle`).attr(`cx`,n.x).attr(`cy`,n.y).attr(`r`,10).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x-3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`circle`).attr(`cx`,n.x+3).attr(`cy`,n.y+2).attr(`r`,2.75).attr(`fill`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x+3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`),e.append(`line`).attr(`x1`,n.x-3).attr(`y1`,n.y+1).attr(`x2`,n.x).attr(`y2`,n.y-5).attr(`stroke`,`#fff`).attr(`class`,`commit ${t.id} ${r}`);else{let o=e.append(`circle`);if(o.attr(`cx`,n.x),o.attr(`cy`,n.y),o.attr(`r`,t.type===_.MERGE?9:10),o.attr(`class`,`commit ${t.id} commit${i%V}`),a===_.MERGE){let a=e.append(`circle`);a.attr(`cx`,n.x),a.attr(`cy`,n.y),a.attr(`r`,6),a.attr(`class`,`commit ${r} ${t.id} commit${i%V}`)}a===_.REVERSE&&e.append(`path`).attr(`d`,`M ${n.x-5},${n.y-5}L${n.x+5},${n.y+5}M${n.x-5},${n.y+5}L${n.x+5},${n.y-5}`).attr(`class`,`commit ${r} ${t.id} commit${i%V}`)}},`drawCommitBullet`),Se=t((e,t,n,r,i)=>{if(t.type!==_.CHERRY_PICK&&(t.customId&&t.type===_.MERGE||t.type!==_.MERGE)&&i.showCommitLabel){let a=e.append(`g`),o=a.insert(`rect`).attr(`class`,`commit-label-bkg`),s=a.append(`text`).attr(`x`,r).attr(`y`,n.y+25).attr(`class`,`commit-label`).text(t.id),c=s.node()?.getBBox();if(c&&(o.attr(`x`,n.posWithOffset-c.width/2-B).attr(`y`,n.y+13.5).attr(`width`,c.width+2*B).attr(`height`,c.height+2*B),J===`TB`||J===`BT`?(o.attr(`x`,n.x-(c.width+4*z+5)).attr(`y`,n.y-12),s.attr(`x`,n.x-(c.width+4*z)).attr(`y`,n.y+c.height-12)):s.attr(`x`,n.posWithOffset-c.width/2),i.rotateCommitLabel))if(J===`TB`||J===`BT`)s.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`),o.attr(`transform`,`rotate(-45, `+n.x+`, `+n.y+`)`);else{let e=-7.5-(c.width+10)/25*9.5,t=10+c.width/25*8.5;a.attr(`transform`,`translate(`+e+`, `+t+`) rotate(-45, `+r+`, `+n.y+`)`)}}},`drawCommitLabel`),Z=t((e,t,n,r)=>{if(t.tags.length>0){let i=0,a=0,o=0,s=[];for(let r of t.tags.reverse()){let t=e.insert(`polygon`),c=e.append(`circle`),l=e.append(`text`).attr(`y`,n.y-16-i).attr(`class`,`tag-label`).text(r),u=l.node()?.getBBox();if(!u)throw Error(`Tag bbox not found`);a=Math.max(a,u.width),o=Math.max(o,u.height),l.attr(`x`,n.posWithOffset-u.width/2),s.push({tag:l,hole:c,rect:t,yOffset:i}),i+=20}for(let{tag:e,hole:t,rect:i,yOffset:c}of s){let s=o/2,l=n.y-19.2-c;if(i.attr(`class`,`tag-label-bkg`).attr(`points`,`
|
|
2
|
-
${r-a/2-z/2},${l+B}
|
|
3
|
-
${r-a/2-z/2},${l-B}
|
|
4
|
-
${n.posWithOffset-a/2-z},${l-s-B}
|
|
5
|
-
${n.posWithOffset+a/2+z},${l-s-B}
|
|
6
|
-
${n.posWithOffset+a/2+z},${l+s+B}
|
|
7
|
-
${n.posWithOffset-a/2-z},${l+s+B}`),t.attr(`cy`,l).attr(`cx`,r-a/2+z/2).attr(`r`,1.5).attr(`class`,`tag-hole`),J===`TB`||J===`BT`){let o=r+c;i.attr(`class`,`tag-label-bkg`).attr(`points`,`
|
|
8
|
-
${n.x},${o+2}
|
|
9
|
-
${n.x},${o-2}
|
|
10
|
-
${n.x+L},${o-s-2}
|
|
11
|
-
${n.x+L+a+4},${o-s-2}
|
|
12
|
-
${n.x+L+a+4},${o+s+2}
|
|
13
|
-
${n.x+L},${o+s+2}`).attr(`transform`,`translate(12,12) rotate(45, `+n.x+`,`+r+`)`),t.attr(`cx`,n.x+z/2).attr(`cy`,o).attr(`transform`,`translate(12,12) rotate(45, `+n.x+`,`+r+`)`),e.attr(`x`,n.x+5).attr(`y`,o+3).attr(`transform`,`translate(14,14) rotate(45, `+n.x+`,`+r+`)`)}}}},`drawCommitTags`),Ce=t(e=>{switch(e.customType??e.type){case _.NORMAL:return`commit-normal`;case _.REVERSE:return`commit-reverse`;case _.HIGHLIGHT:return`commit-highlight`;case _.MERGE:return`commit-merge`;case _.CHERRY_PICK:return`commit-cherry-pick`;default:return`commit-normal`}},`getCommitClassType`),we=t((e,t,n,r)=>{let i={x:0,y:0};if(e.parents.length>0){let n=X(e.parents);if(n){let a=r.get(n)??i;return t===`TB`?a.y+R:t===`BT`?(r.get(e.id)??i).y-R:a.x+R}}else if(t===`TB`)return W;else if(t===`BT`)return(r.get(e.id)??i).y-R;else return 0;return 0},`calculatePosition`),Te=t((e,t,n)=>{let r=J===`BT`&&n?t:t+L,i=J===`TB`||J===`BT`?r:H.get(e.branch)?.pos,a=J===`TB`||J===`BT`?H.get(e.branch)?.pos:r;if(a===void 0||i===void 0)throw Error(`Position were undefined for commit ${e.id}`);return{x:a,y:i,posWithOffset:r}},`getCommitPosition`),Q=t((e,n,r,i)=>{let a=e.append(`g`).attr(`class`,`commit-bullets`),o=e.append(`g`).attr(`class`,`commit-labels`),s=J===`TB`||J===`BT`?W:0,c=[...n.keys()],l=i.parallelCommits??!1,u=t((e,t)=>{let r=n.get(e)?.seq,i=n.get(t)?.seq;return r!==void 0&&i!==void 0?r-i:0},`sortKeys`),d=c.sort(u);J===`BT`&&(l&&ge(d,n,s),d=d.reverse()),d.forEach(e=>{let t=n.get(e);if(!t)throw Error(`Commit not found for key ${e}`);l&&(s=we(t,J,s,U));let c=Te(t,s,l);if(r){let e=Ce(t),n=t.customType??t.type;xe(a,t,c,e,H.get(t.branch)?.index??0,n),Se(o,t,c,s,i),Z(o,t,c,s)}J===`TB`||J===`BT`?U.set(t.id,{x:c.x,y:c.posWithOffset}):U.set(t.id,{x:c.posWithOffset,y:c.y}),s=J===`BT`&&l?s+R:s+R+L,s>q&&(q=s)})},`drawCommits`),Ee=t((e,n,r,i,a)=>{let o=(J===`TB`||J===`BT`?r.x<i.x:r.y<i.y)?n.branch:e.branch,s=t(e=>e.branch===o,`isOnBranchToGetCurve`),c=t(t=>t.seq>e.seq&&t.seq<n.seq,`isBetweenCommits`);return[...a.values()].some(e=>c(e)&&s(e))},`shouldRerouteArrow`),$=t((e,t,n=0)=>{let r=e+Math.abs(e-t)/2;return n>5?r:K.every(e=>Math.abs(e-r)>=10)?(K.push(r),r):$(e,t-Math.abs(e-t)/5,n+1)},`findLane`),De=t((e,t,n,r)=>{let i=U.get(t.id),a=U.get(n.id);if(i===void 0||a===void 0)throw Error(`Commit positions not found for commits ${t.id} and ${n.id}`);let o=Ee(t,n,i,a,r),s=``,c=``,l=0,u=0,d=H.get(n.branch)?.index;n.type===_.MERGE&&t.id!==n.parents[0]&&(d=H.get(t.branch)?.index);let f;if(o){s=`A 10 10, 0, 0, 0,`,c=`A 10 10, 0, 0, 1,`,l=10,u=10;let e=i.y<a.y?$(i.y,a.y):$(a.y,i.y),n=i.x<a.x?$(i.x,a.x):$(a.x,i.x);J===`TB`?i.x<a.x?f=`M ${i.x} ${i.y} L ${n-l} ${i.y} ${c} ${n} ${i.y+u} L ${n} ${a.y-l} ${s} ${n+u} ${a.y} L ${a.x} ${a.y}`:(d=H.get(t.branch)?.index,f=`M ${i.x} ${i.y} L ${n+l} ${i.y} ${s} ${n} ${i.y+u} L ${n} ${a.y-l} ${c} ${n-u} ${a.y} L ${a.x} ${a.y}`):J===`BT`?i.x<a.x?f=`M ${i.x} ${i.y} L ${n-l} ${i.y} ${s} ${n} ${i.y-u} L ${n} ${a.y+l} ${c} ${n+u} ${a.y} L ${a.x} ${a.y}`:(d=H.get(t.branch)?.index,f=`M ${i.x} ${i.y} L ${n+l} ${i.y} ${c} ${n} ${i.y-u} L ${n} ${a.y+l} ${s} ${n-u} ${a.y} L ${a.x} ${a.y}`):i.y<a.y?f=`M ${i.x} ${i.y} L ${i.x} ${e-l} ${s} ${i.x+u} ${e} L ${a.x-l} ${e} ${c} ${a.x} ${e+u} L ${a.x} ${a.y}`:(d=H.get(t.branch)?.index,f=`M ${i.x} ${i.y} L ${i.x} ${e+l} ${c} ${i.x+u} ${e} L ${a.x-l} ${e} ${s} ${a.x} ${e-u} L ${a.x} ${a.y}`)}else s=`A 20 20, 0, 0, 0,`,c=`A 20 20, 0, 0, 1,`,l=20,u=20,J===`TB`?(i.x<a.x&&(f=n.type===_.MERGE&&t.id!==n.parents[0]?`M ${i.x} ${i.y} L ${i.x} ${a.y-l} ${s} ${i.x+u} ${a.y} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${a.x-l} ${i.y} ${c} ${a.x} ${i.y+u} L ${a.x} ${a.y}`),i.x>a.x&&(s=`A 20 20, 0, 0, 0,`,c=`A 20 20, 0, 0, 1,`,l=20,u=20,f=n.type===_.MERGE&&t.id!==n.parents[0]?`M ${i.x} ${i.y} L ${i.x} ${a.y-l} ${c} ${i.x-u} ${a.y} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${a.x+l} ${i.y} ${s} ${a.x} ${i.y+u} L ${a.x} ${a.y}`),i.x===a.x&&(f=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):J===`BT`?(i.x<a.x&&(f=n.type===_.MERGE&&t.id!==n.parents[0]?`M ${i.x} ${i.y} L ${i.x} ${a.y+l} ${c} ${i.x+u} ${a.y} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${a.x-l} ${i.y} ${s} ${a.x} ${i.y-u} L ${a.x} ${a.y}`),i.x>a.x&&(s=`A 20 20, 0, 0, 0,`,c=`A 20 20, 0, 0, 1,`,l=20,u=20,f=n.type===_.MERGE&&t.id!==n.parents[0]?`M ${i.x} ${i.y} L ${i.x} ${a.y+l} ${s} ${i.x-u} ${a.y} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${a.x+l} ${i.y} ${c} ${a.x} ${i.y-u} L ${a.x} ${a.y}`),i.x===a.x&&(f=`M ${i.x} ${i.y} L ${a.x} ${a.y}`)):(i.y<a.y&&(f=n.type===_.MERGE&&t.id!==n.parents[0]?`M ${i.x} ${i.y} L ${a.x-l} ${i.y} ${c} ${a.x} ${i.y+u} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${i.x} ${a.y-l} ${s} ${i.x+u} ${a.y} L ${a.x} ${a.y}`),i.y>a.y&&(f=n.type===_.MERGE&&t.id!==n.parents[0]?`M ${i.x} ${i.y} L ${a.x-l} ${i.y} ${s} ${a.x} ${i.y-u} L ${a.x} ${a.y}`:`M ${i.x} ${i.y} L ${i.x} ${a.y+l} ${c} ${i.x+u} ${a.y} L ${a.x} ${a.y}`),i.y===a.y&&(f=`M ${i.x} ${i.y} L ${a.x} ${a.y}`));if(f===void 0)throw Error(`Line definition not found`);e.append(`path`).attr(`d`,f).attr(`class`,`arrow arrow`+d%V)},`drawArrow`),Oe=t((e,t)=>{let n=e.append(`g`).attr(`class`,`commit-arrows`);[...t.keys()].forEach(e=>{let r=t.get(e);r.parents&&r.parents.length>0&&r.parents.forEach(e=>{De(n,t.get(e),r,t)})})},`drawArrows`),ke=t((e,t,n)=>{let r=e.append(`g`);t.forEach((e,t)=>{let i=t%V,a=H.get(e.name)?.pos;if(a===void 0)throw Error(`Position not found for branch ${e.name}`);let o=r.append(`line`);o.attr(`x1`,0),o.attr(`y1`,a),o.attr(`x2`,q),o.attr(`y2`,a),o.attr(`class`,`branch branch`+i),J===`TB`?(o.attr(`y1`,W),o.attr(`x1`,a),o.attr(`y2`,q),o.attr(`x2`,a)):J===`BT`&&(o.attr(`y1`,q),o.attr(`x1`,a),o.attr(`y2`,W),o.attr(`x2`,a)),K.push(a);let s=e.name,c=Y(s),l=r.insert(`rect`),u=r.insert(`g`).attr(`class`,`branchLabel`).insert(`g`).attr(`class`,`label branch-label`+i);u.node().appendChild(c);let d=c.getBBox();l.attr(`class`,`branchLabelBkg label`+i).attr(`rx`,4).attr(`ry`,4).attr(`x`,-d.width-4-(n.rotateCommitLabel===!0?30:0)).attr(`y`,-d.height/2+8).attr(`width`,d.width+18).attr(`height`,d.height+4),u.attr(`transform`,`translate(`+(-d.width-14-(n.rotateCommitLabel===!0?30:0))+`, `+(a-d.height/2-1)+`)`),J===`TB`?(l.attr(`x`,a-d.width/2-10).attr(`y`,0),u.attr(`transform`,`translate(`+(a-d.width/2-5)+`, 0)`)):J===`BT`?(l.attr(`x`,a-d.width/2-10).attr(`y`,q),u.attr(`transform`,`translate(`+(a-d.width/2-5)+`, `+q+`)`)):l.attr(`transform`,`translate(-19, `+(a-d.height/2)+`)`)})},`drawBranches`),Ae=t(function(e,t,n,r,i){return H.set(e,{pos:t,index:n}),t+=50+(i?40:0)+(J===`TB`||J===`BT`?r.width/2:0),t},`setBranchPosition`),je={parser:I,db:O,renderer:{draw:t(function(t,r,i,a){me(),e.debug(`in gitgraph renderer`,t+`
|
|
14
|
-
`,`id:`,r,i);let o=a.db;if(!o.getConfig){e.error(`getConfig method is not available on db`);return}let s=o.getConfig(),c=s.rotateCommitLabel??!1;G=o.getCommits();let l=o.getBranchesAsObjArray();J=o.getDirection();let d=n(`[id="${r}"]`),f=0;l.forEach((e,t)=>{let n=Y(e.name),r=d.append(`g`),i=r.insert(`g`).attr(`class`,`branchLabel`),a=i.insert(`g`).attr(`class`,`label branch-label`);a.node()?.appendChild(n);let o=n.getBBox();f=Ae(e.name,f,t,o,c),a.remove(),i.remove(),r.remove()}),Q(d,G,!1,s),s.showBranches&&ke(d,l,s),Oe(d,G),Q(d,G,!0,s),ee.insertTitle(d,`gitTitleText`,s.titleTopMargin??0,o.getDiagramTitle()),u(void 0,d,s.diagramPadding,s.useMaxWidth)},`draw`)},styles:t(e=>`
|
|
15
|
-
.commit-id,
|
|
16
|
-
.commit-msg,
|
|
17
|
-
.branch-label {
|
|
18
|
-
fill: lightgrey;
|
|
19
|
-
color: lightgrey;
|
|
20
|
-
font-family: 'trebuchet ms', verdana, arial, sans-serif;
|
|
21
|
-
font-family: var(--mermaid-font-family);
|
|
22
|
-
}
|
|
23
|
-
${[0,1,2,3,4,5,6,7].map(t=>`
|
|
24
|
-
.branch-label${t} { fill: ${e[`gitBranchLabel`+t]}; }
|
|
25
|
-
.commit${t} { stroke: ${e[`git`+t]}; fill: ${e[`git`+t]}; }
|
|
26
|
-
.commit-highlight${t} { stroke: ${e[`gitInv`+t]}; fill: ${e[`gitInv`+t]}; }
|
|
27
|
-
.label${t} { fill: ${e[`git`+t]}; }
|
|
28
|
-
.arrow${t} { stroke: ${e[`git`+t]}; }
|
|
29
|
-
`).join(`
|
|
30
|
-
`)}
|
|
31
|
-
|
|
32
|
-
.branch {
|
|
33
|
-
stroke-width: 1;
|
|
34
|
-
stroke: ${e.lineColor};
|
|
35
|
-
stroke-dasharray: 2;
|
|
36
|
-
}
|
|
37
|
-
.commit-label { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelColor};}
|
|
38
|
-
.commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelBackground}; opacity: 0.5; }
|
|
39
|
-
.tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};}
|
|
40
|
-
.tag-label-bkg { fill: ${e.tagLabelBackground}; stroke: ${e.tagLabelBorder}; }
|
|
41
|
-
.tag-hole { fill: ${e.textColor}; }
|
|
42
|
-
|
|
43
|
-
.commit-merge {
|
|
44
|
-
stroke: ${e.primaryColor};
|
|
45
|
-
fill: ${e.primaryColor};
|
|
46
|
-
}
|
|
47
|
-
.commit-reverse {
|
|
48
|
-
stroke: ${e.primaryColor};
|
|
49
|
-
fill: ${e.primaryColor};
|
|
50
|
-
stroke-width: 3;
|
|
51
|
-
}
|
|
52
|
-
.commit-highlight-outer {
|
|
53
|
-
}
|
|
54
|
-
.commit-highlight-inner {
|
|
55
|
-
stroke: ${e.primaryColor};
|
|
56
|
-
fill: ${e.primaryColor};
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
.arrow { stroke-width: 8; stroke-linecap: round; fill: none}
|
|
60
|
-
.gitTitleText {
|
|
61
|
-
text-anchor: middle;
|
|
62
|
-
font-size: 18px;
|
|
63
|
-
fill: ${e.textColor};
|
|
64
|
-
}
|
|
65
|
-
`,`getStyles`)};export{je as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-XZSTWKYB-MNkGMgzF.js";import{n as e}from"./chunk-EGIJ26TM-C_G2Pjv-.js";export{e as createInfoServices};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{g as e,h as t}from"./src-B0URjIBy.js";import{c as n}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{p as r}from"./index-Dh2p7GUF.js";import"./chunk-XZSTWKYB-MNkGMgzF.js";import"./chunk-R5LLSJPH-B5kh1kkd.js";import"./chunk-7E7YKBS2-ClGSdO9P.js";import"./chunk-EGIJ26TM-C_G2Pjv-.js";import"./chunk-C72U2L5F-C9vw6Vph.js";import"./chunk-XIRO2GV7-DF8ctPHD.js";import"./chunk-L3YUKLVL-3RCwiwN1.js";import"./chunk-OZEHJAEY-D4zEs9SV.js";import{t as i}from"./mermaid-parser.core-jqGiw51o.js";var a={parse:t(async t=>{let n=await i(`info`,t);e.debug(n)},`parse`)},o={version:`11.13.0`},s={parser:a,db:{getVersion:t(()=>o.version,`getVersion`)},renderer:{draw:t((t,i,a)=>{e.debug(`rendering info diagram
|
|
2
|
-
`+t);let o=r(i);n(o,100,400,!0),o.append(`g`).append(`text`).attr(`x`,100).attr(`y`,40).attr(`class`,`version`).attr(`font-size`,32).style(`text-anchor`,`middle`).text(`v${a}`)},`draw`)}};export{s as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e}from"./index-Dh2p7GUF.js";export{e as Mermaid};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/info-3K5VOQVL-Td3WeFrt.js","assets/chunk-XZSTWKYB-MNkGMgzF.js","assets/chunk-CFjPhJqf.js","assets/index-Dh2p7GUF.js","assets/preload-helper-DSXbuxSR.js","assets/dist-CpWSQIlk.js","assets/chunk-PU5JKC2W-KA2MZku5.js","assets/src-B0URjIBy.js","assets/chunk-GEFDOKGD-D5eIWnuf.js","assets/math-wh5kcxAa.js","assets/chunk-7R4GIKGN-B0Nk6xl6.js","assets/_createAssigner-BmxrMTIs.js","assets/katex--tSeZgTA.js","assets/chunk-KYZI473N-CXcIXlKo.js","assets/chunk-PQ6SQG4A-DB1drAIU.js","assets/chunk-YBOYWFTD-i-hva81G.js","assets/rough.esm-C7RslGBg.js","assets/chunk-MX3YWQON-FdgNOTEP.js","assets/chunk-O4XLMI2P-n-oWchCV.js","assets/line-Dte_HEDa.js","assets/path-BoFZ_ZCz.js","assets/array-CYHT4lxU.js","assets/index-Bs0WL9nT.css","assets/_baseUniq-CEuT_w6h.js","assets/_basePickBy-BZNHaCnJ.js","assets/clone-D8XnF9wK.js","assets/chunk-EGIJ26TM-C_G2Pjv-.js","assets/packet-RMMSAZCW-B_JuUQQV.js","assets/chunk-C72U2L5F-C9vw6Vph.js","assets/pie-UPGHQEXC-zZj-EEcS.js","assets/chunk-XIRO2GV7-DF8ctPHD.js","assets/architecture-PBZL5I3N-FUwzdylc.js","assets/chunk-R5LLSJPH-B5kh1kkd.js","assets/gitGraph-HDMCJU4V-W7hXAzyz.js","assets/chunk-7E7YKBS2-ClGSdO9P.js","assets/radar-KQ55EAFF-DyUfi1WF.js","assets/chunk-L3YUKLVL-3RCwiwN1.js","assets/treemap-KZPCXAKY-B231VXy0.js","assets/chunk-OZEHJAEY-D4zEs9SV.js"])))=>i.map(i=>d[i]);
|
|
2
|
-
import{t as e}from"./preload-helper-DSXbuxSR.js";import{f as t}from"./chunk-XZSTWKYB-MNkGMgzF.js";var n={},r={info:t(async()=>{let{createInfoServices:t}=await e(async()=>{let{createInfoServices:e}=await import(`./info-3K5VOQVL-Td3WeFrt.js`);return{createInfoServices:e}},__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]));n.info=t().Info.parser.LangiumParser},`info`),packet:t(async()=>{let{createPacketServices:t}=await e(async()=>{let{createPacketServices:e}=await import(`./packet-RMMSAZCW-B_JuUQQV.js`);return{createPacketServices:e}},__vite__mapDeps([27,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,28]));n.packet=t().Packet.parser.LangiumParser},`packet`),pie:t(async()=>{let{createPieServices:t}=await e(async()=>{let{createPieServices:e}=await import(`./pie-UPGHQEXC-zZj-EEcS.js`);return{createPieServices:e}},__vite__mapDeps([29,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,30]));n.pie=t().Pie.parser.LangiumParser},`pie`),architecture:t(async()=>{let{createArchitectureServices:t}=await e(async()=>{let{createArchitectureServices:e}=await import(`./architecture-PBZL5I3N-FUwzdylc.js`);return{createArchitectureServices:e}},__vite__mapDeps([31,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,32]));n.architecture=t().Architecture.parser.LangiumParser},`architecture`),gitGraph:t(async()=>{let{createGitGraphServices:t}=await e(async()=>{let{createGitGraphServices:e}=await import(`./gitGraph-HDMCJU4V-W7hXAzyz.js`);return{createGitGraphServices:e}},__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,34]));n.gitGraph=t().GitGraph.parser.LangiumParser},`gitGraph`),radar:t(async()=>{let{createRadarServices:t}=await e(async()=>{let{createRadarServices:e}=await import(`./radar-KQ55EAFF-DyUfi1WF.js`);return{createRadarServices:e}},__vite__mapDeps([35,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,36]));n.radar=t().Radar.parser.LangiumParser},`radar`),treemap:t(async()=>{let{createTreemapServices:t}=await e(async()=>{let{createTreemapServices:e}=await import(`./treemap-KZPCXAKY-B231VXy0.js`);return{createTreemapServices:e}},__vite__mapDeps([37,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,38]));n.treemap=t().Treemap.parser.LangiumParser},`treemap`)};async function i(e,t){let i=r[e];if(!i)throw Error(`Unknown diagram type: ${e}`);n[e]||await i();let o=n[e].parse(t);if(o.lexerErrors.length>0||o.parserErrors.length>0)throw new a(o);return o.value}t(i,`parse`);var a=class extends Error{constructor(e){let t=e.lexerErrors.map(e=>`Lexer error on line ${e.line!==void 0&&!isNaN(e.line)?e.line:`?`}, column ${e.column!==void 0&&!isNaN(e.column)?e.column:`?`}: ${e.message}`).join(`
|
|
3
|
-
`),n=e.parserErrors.map(e=>`Parse error on line ${e.token.startLine!==void 0&&!isNaN(e.token.startLine)?e.token.startLine:`?`}, column ${e.token.startColumn!==void 0&&!isNaN(e.token.startColumn)?e.token.startColumn:`?`}: ${e.message}`).join(`
|
|
4
|
-
`);super(`Parsing failed: ${t} ${n}`),this.result=e}static{t(this,`MermaidParseError`)}};export{i as t};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-XZSTWKYB-MNkGMgzF.js";import{n as e}from"./chunk-C72U2L5F-C9vw6Vph.js";export{e as createPacketServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-XZSTWKYB-MNkGMgzF.js";import{n as e}from"./chunk-XIRO2GV7-DF8ctPHD.js";export{e as createPieServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-XZSTWKYB-MNkGMgzF.js";import{n as e}from"./chunk-L3YUKLVL-3RCwiwN1.js";export{e as createRadarServices};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{g as e,h as t,p as n}from"./src-B0URjIBy.js";import{D as r,b as i,c as a,s as o}from"./chunk-7R4GIKGN-B0Nk6xl6.js";import{E as s,h as c}from"./chunk-GEFDOKGD-D5eIWnuf.js";import{t as l}from"./line-Dte_HEDa.js";import"./chunk-MX3YWQON-FdgNOTEP.js";import"./dist-CpWSQIlk.js";import"./chunk-YBOYWFTD-i-hva81G.js";import"./chunk-PQ6SQG4A-DB1drAIU.js";import"./chunk-PU5JKC2W-KA2MZku5.js";import"./chunk-KYZI473N-CXcIXlKo.js";import"./chunk-O4XLMI2P-n-oWchCV.js";import"./index-Dh2p7GUF.js";import{t as u}from"./dagre-Bwu_YNAf.js";import{t as d}from"./graphlib-C0KzFwj0.js";import"./chunk-55IACEB6-CLHg9Ulb.js";import"./chunk-KX2RTZJC-yDo9-99g.js";import{i as f,n as p,t as m}from"./chunk-NQ4KR5QH-CYGSW7DX.js";var h=t(e=>e.append(`circle`).attr(`class`,`start-state`).attr(`r`,i().state.sizeUnit).attr(`cx`,i().state.padding+i().state.sizeUnit).attr(`cy`,i().state.padding+i().state.sizeUnit),`drawStartState`),g=t(e=>e.append(`line`).style(`stroke`,`grey`).style(`stroke-dasharray`,`3`).attr(`x1`,i().state.textHeight).attr(`class`,`divider`).attr(`x2`,i().state.textHeight*2).attr(`y1`,0).attr(`y2`,0),`drawDivider`),_=t((e,t)=>{let n=e.append(`text`).attr(`x`,2*i().state.padding).attr(`y`,i().state.textHeight+2*i().state.padding).attr(`font-size`,i().state.fontSize).attr(`class`,`state-title`).text(t.id),r=n.node().getBBox();return e.insert(`rect`,`:first-child`).attr(`x`,i().state.padding).attr(`y`,i().state.padding).attr(`width`,r.width+2*i().state.padding).attr(`height`,r.height+2*i().state.padding).attr(`rx`,i().state.radius),n},`drawSimpleState`),v=t((e,n)=>{let r=t(function(e,t,n){let r=e.append(`tspan`).attr(`x`,2*i().state.padding).text(t);n||r.attr(`dy`,i().state.textHeight)},`addTspan`),a=e.append(`text`).attr(`x`,2*i().state.padding).attr(`y`,i().state.textHeight+1.3*i().state.padding).attr(`font-size`,i().state.fontSize).attr(`class`,`state-title`).text(n.descriptions[0]).node().getBBox(),o=a.height,s=e.append(`text`).attr(`x`,i().state.padding).attr(`y`,o+i().state.padding*.4+i().state.dividerMargin+i().state.textHeight).attr(`class`,`state-description`),c=!0,l=!0;n.descriptions.forEach(function(e){c||(r(s,e,l),l=!1),c=!1});let u=e.append(`line`).attr(`x1`,i().state.padding).attr(`y1`,i().state.padding+o+i().state.dividerMargin/2).attr(`y2`,i().state.padding+o+i().state.dividerMargin/2).attr(`class`,`descr-divider`),d=s.node().getBBox(),f=Math.max(d.width,a.width);return u.attr(`x2`,f+3*i().state.padding),e.insert(`rect`,`:first-child`).attr(`x`,i().state.padding).attr(`y`,i().state.padding).attr(`width`,f+2*i().state.padding).attr(`height`,d.height+o+2*i().state.padding).attr(`rx`,i().state.radius),e},`drawDescrState`),y=t((e,t,n)=>{let r=i().state.padding,a=2*i().state.padding,o=e.node().getBBox(),s=o.width,c=o.x,l=e.append(`text`).attr(`x`,0).attr(`y`,i().state.titleShift).attr(`font-size`,i().state.fontSize).attr(`class`,`state-title`).text(t.id),u=l.node().getBBox().width+a,d=Math.max(u,s);d===s&&(d+=a);let f,p=e.node().getBBox();t.doc,f=c-r,u>s&&(f=(s-d)/2+r),Math.abs(c-p.x)<r&&u>s&&(f=c-(u-s)/2);let m=1-i().state.textHeight;return e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,m).attr(`class`,n?`alt-composit`:`composit`).attr(`width`,d).attr(`height`,p.height+i().state.textHeight+i().state.titleShift+1).attr(`rx`,`0`),l.attr(`x`,f+r),u<=s&&l.attr(`x`,c+(d-a)/2-u/2+r),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,i().state.titleShift-i().state.textHeight-i().state.padding).attr(`width`,d).attr(`height`,i().state.textHeight*3).attr(`rx`,i().state.radius),e.insert(`rect`,`:first-child`).attr(`x`,f).attr(`y`,i().state.titleShift-i().state.textHeight-i().state.padding).attr(`width`,d).attr(`height`,p.height+3+2*i().state.textHeight).attr(`rx`,i().state.radius),e},`addTitleAndBox`),b=t(e=>(e.append(`circle`).attr(`class`,`end-state-outer`).attr(`r`,i().state.sizeUnit+i().state.miniPadding).attr(`cx`,i().state.padding+i().state.sizeUnit+i().state.miniPadding).attr(`cy`,i().state.padding+i().state.sizeUnit+i().state.miniPadding),e.append(`circle`).attr(`class`,`end-state-inner`).attr(`r`,i().state.sizeUnit).attr(`cx`,i().state.padding+i().state.sizeUnit+2).attr(`cy`,i().state.padding+i().state.sizeUnit+2)),`drawEndState`),x=t((e,t)=>{let n=i().state.forkWidth,r=i().state.forkHeight;if(t.parentId){let e=n;n=r,r=e}return e.append(`rect`).style(`stroke`,`black`).style(`fill`,`black`).attr(`width`,n).attr(`height`,r).attr(`x`,i().state.padding).attr(`y`,i().state.padding)},`drawForkJoinState`),S=t((e,t,n,r)=>{let a=0,s=r.append(`text`);s.style(`text-anchor`,`start`),s.attr(`class`,`noteText`);let c=e.replace(/\r\n/g,`<br/>`);c=c.replace(/\n/g,`<br/>`);let l=c.split(o.lineBreakRegex),u=1.25*i().state.noteMargin;for(let e of l){let r=e.trim();if(r.length>0){let e=s.append(`tspan`);if(e.text(r),u===0){let t=e.node().getBBox();u+=t.height}a+=u,e.attr(`x`,t+i().state.noteMargin),e.attr(`y`,n+a+1.25*i().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:a}},`_drawLongText`),C=t((e,t)=>{t.attr(`class`,`state-note`);let n=t.append(`rect`).attr(`x`,0).attr(`y`,i().state.padding),{textWidth:r,textHeight:a}=S(e,0,0,t.append(`g`));return n.attr(`height`,a+2*i().state.noteMargin),n.attr(`width`,r+i().state.noteMargin*2),n},`drawNote`),w=t(function(e,t){let n=t.id,r={id:n,label:t.id,width:0,height:0},a=e.append(`g`).attr(`id`,n).attr(`class`,`stateGroup`);t.type===`start`&&h(a),t.type===`end`&&b(a),(t.type===`fork`||t.type===`join`)&&x(a,t),t.type===`note`&&C(t.note.text,a),t.type===`divider`&&g(a),t.type===`default`&&t.descriptions.length===0&&_(a,t),t.type===`default`&&t.descriptions.length>0&&v(a,t);let o=a.node().getBBox();return r.width=o.width+2*i().state.padding,r.height=o.height+2*i().state.padding,r},`drawState`),T=0,E=t(function(n,a,u){let d=t(function(e){switch(e){case m.relationType.AGGREGATION:return`aggregation`;case m.relationType.EXTENSION:return`extension`;case m.relationType.COMPOSITION:return`composition`;case m.relationType.DEPENDENCY:return`dependency`}},`getRelationType`);a.points=a.points.filter(e=>!Number.isNaN(e.y));let f=a.points,p=l().x(function(e){return e.x}).y(function(e){return e.y}).curve(s),h=n.append(`path`).attr(`d`,p(f)).attr(`id`,`edge`+T).attr(`class`,`transition`),g=``;if(i().state.arrowMarkerAbsolute&&(g=r(!0)),h.attr(`marker-end`,`url(`+g+`#`+d(m.relationType.DEPENDENCY)+`End)`),u.title!==void 0){let t=n.append(`g`).attr(`class`,`stateLabel`),{x:r,y:s}=c.calcLabelPosition(a.points),l=o.getRows(u.title),d=0,f=[],p=0,m=0;for(let n=0;n<=l.length;n++){let i=t.append(`text`).attr(`text-anchor`,`middle`).text(l[n]).attr(`x`,r).attr(`y`,s+d),a=i.node().getBBox();p=Math.max(p,a.width),m=Math.min(m,a.x),e.info(a.x,r,s+d),d===0&&(d=i.node().getBBox().height,e.info(`Title height`,d,s)),f.push(i)}let h=d*l.length;if(l.length>1){let e=(l.length-1)*d*.5;f.forEach((t,n)=>t.attr(`y`,s+n*d-e)),h=d*l.length}let g=t.node().getBBox();t.insert(`rect`,`:first-child`).attr(`class`,`box`).attr(`x`,r-p/2-i().state.padding/2).attr(`y`,s-h/2-i().state.padding/2-3.5).attr(`width`,p+i().state.padding).attr(`height`,h+i().state.padding),e.info(g)}T++},`drawEdge`),D,O={},k=t(function(){},`setConf`),A=t(function(e){e.append(`defs`).append(`marker`).attr(`id`,`dependencyEnd`).attr(`refX`,19).attr(`refY`,7).attr(`markerWidth`,20).attr(`markerHeight`,28).attr(`orient`,`auto`).append(`path`).attr(`d`,`M 19,7 L9,13 L14,7 L9,1 Z`)},`insertMarkers`),j=t(function(t,r,o,s){D=i().state;let c=i().securityLevel,l;c===`sandbox`&&(l=n(`#i`+r));let u=n(c===`sandbox`?l.nodes()[0].contentDocument.body:`body`),d=c===`sandbox`?l.nodes()[0].contentDocument:document;e.debug(`Rendering diagram `+t);let f=u.select(`[id='${r}']`);A(f),N(s.db.getRootDoc(),f,void 0,!1,u,d,s);let p=D.padding,m=f.node().getBBox(),h=m.width+p*2,g=m.height+p*2;a(f,g,h*1.75,D.useMaxWidth),f.attr(`viewBox`,`${m.x-D.padding} ${m.y-D.padding} `+h+` `+g)},`draw`),M=t(e=>e?e.length*D.fontSizeFactor:1,`getLabelWidth`),N=t((t,n,r,i,a,s,c)=>{let l=new d({compound:!0,multigraph:!0}),f,p=!0;for(f=0;f<t.length;f++)if(t[f].stmt===`relation`){p=!1;break}r?l.setGraph({rankdir:`LR`,multigraph:!0,compound:!0,ranker:`tight-tree`,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,isMultiGraph:!0}):l.setGraph({rankdir:`TB`,multigraph:!0,compound:!0,ranksep:p?1:D.edgeLengthFactor,nodeSep:p?1:50,ranker:`tight-tree`,isMultiGraph:!0}),l.setDefaultEdgeLabel(function(){return{}});let m=c.db.getStates(),h=c.db.getRelations(),g=Object.keys(m);for(let e of g){let t=m[e];r&&(t.parentId=r);let o;if(t.doc){let e=n.append(`g`).attr(`id`,t.id).attr(`class`,`stateGroup`);o=N(t.doc,e,t.id,!i,a,s,c);{e=y(e,t,i);let n=e.node().getBBox();o.width=n.width,o.height=n.height+D.padding/2,O[t.id]={y:D.compositTitleSize}}}else o=w(n,t,l);if(t.note){let e=w(n,{descriptions:[],id:t.id+`-note`,note:t.note,type:`note`},l);t.note.position===`left of`?(l.setNode(o.id+`-note`,e),l.setNode(o.id,o)):(l.setNode(o.id,o),l.setNode(o.id+`-note`,e)),l.setParent(o.id,o.id+`-group`),l.setParent(o.id+`-note`,o.id+`-group`)}else l.setNode(o.id,o)}e.debug(`Count=`,l.nodeCount(),l);let _=0;h.forEach(function(t){_++,e.debug(`Setting edge`,t),l.setEdge(t.id1,t.id2,{relation:t,width:M(t.title),height:D.labelHeight*o.getRows(t.title).length,labelpos:`c`},`id`+_)}),u(l),e.debug(`Graph after layout`,l.nodes());let v=n.node();l.nodes().forEach(function(t){t!==void 0&&l.node(t)!==void 0?(e.warn(`Node `+t+`: `+JSON.stringify(l.node(t))),a.select(`#`+v.id+` #`+t).attr(`transform`,`translate(`+(l.node(t).x-l.node(t).width/2)+`,`+(l.node(t).y+(O[t]?O[t].y:0)-l.node(t).height/2)+` )`),a.select(`#`+v.id+` #`+t).attr(`data-x-shift`,l.node(t).x-l.node(t).width/2),s.querySelectorAll(`#`+v.id+` #`+t+` .divider`).forEach(e=>{let t=e.parentElement,n=0,r=0;t&&(t.parentElement&&(n=t.parentElement.getBBox().width),r=parseInt(t.getAttribute(`data-x-shift`),10),Number.isNaN(r)&&(r=0)),e.setAttribute(`x1`,0-r+8),e.setAttribute(`x2`,n-r-8)})):e.debug(`No Node `+t+`: `+JSON.stringify(l.node(t)))});let b=v.getBBox();l.edges().forEach(function(t){t!==void 0&&l.edge(t)!==void 0&&(e.debug(`Edge `+t.v+` -> `+t.w+`: `+JSON.stringify(l.edge(t))),E(n,l.edge(t),l.edge(t).relation))}),b=v.getBBox();let x={id:r||`root`,label:r||`root`,width:0,height:0};return x.width=b.width+2*D.padding,x.height=b.height+2*D.padding,e.debug(`Doc rendered`,x,l),x},`renderDoc`),P={parser:p,get db(){return new m(1)},renderer:{setConf:k,draw:j},styles:f,init:t(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{P as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e}from"./src-B0URjIBy.js";import"./chunk-7R4GIKGN-B0Nk6xl6.js";import"./chunk-GEFDOKGD-D5eIWnuf.js";import"./chunk-MX3YWQON-FdgNOTEP.js";import"./dist-CpWSQIlk.js";import"./chunk-YBOYWFTD-i-hva81G.js";import"./chunk-PQ6SQG4A-DB1drAIU.js";import"./chunk-PU5JKC2W-KA2MZku5.js";import"./chunk-KYZI473N-CXcIXlKo.js";import"./chunk-O4XLMI2P-n-oWchCV.js";import"./index-Dh2p7GUF.js";import"./chunk-55IACEB6-CLHg9Ulb.js";import"./chunk-KX2RTZJC-yDo9-99g.js";import{i as t,n,r,t as i}from"./chunk-NQ4KR5QH-CYGSW7DX.js";var a={parser:n,get db(){return new i(2)},renderer:r,styles:t,init:e(e=>{e.state||={},e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},`init`)};export{a as diagram};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import"./chunk-XZSTWKYB-MNkGMgzF.js";import{n as e}from"./chunk-OZEHJAEY-D4zEs9SV.js";export{e as createTreemapServices};
|