react-semaphor 0.0.614 → 0.0.615
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/dist/chunks/{_basePickBy-gRpPEYzl.js → _basePickBy-BjN-ebMF.js} +1 -1
- package/dist/chunks/{_basePickBy-Cxdt4vVw.js → _basePickBy-DoxAWdoa.js} +2 -2
- package/dist/chunks/{_baseUniq-C5sVZ00h.js → _baseUniq-C6j27TNu.js} +1 -1
- package/dist/chunks/{_baseUniq-DWDavHdn.js → _baseUniq-DqyqOsmS.js} +1 -1
- package/dist/chunks/{arc-DLNF2EJW.js → arc-BqNFdUcO.js} +1 -1
- package/dist/chunks/{arc-DOWUhC_S.js → arc-Cum0xm0_.js} +1 -1
- package/dist/chunks/{architecture-O4VJ6CD3-D3XwXpD9.js → architecture-O4VJ6CD3-DdZGsZCR.js} +1 -1
- package/dist/chunks/{architecture-O4VJ6CD3-VpbVJyT3.js → architecture-O4VJ6CD3-ZEfJFqmU.js} +1 -1
- package/dist/chunks/{architectureDiagram-KFL7JDKH-D_IuAvcF.js → architectureDiagram-KFL7JDKH-DIGpJjcj.js} +1 -1
- package/dist/chunks/{architectureDiagram-KFL7JDKH-CXqtrY8w.js → architectureDiagram-KFL7JDKH-DOga74N1.js} +4 -4
- package/dist/chunks/{blockDiagram-ZYB65J3Q-CEV-d5d5.js → blockDiagram-ZYB65J3Q-D2anq3B5.js} +5 -5
- package/dist/chunks/{blockDiagram-ZYB65J3Q-D1W1RxBI.js → blockDiagram-ZYB65J3Q-DW1WkGMO.js} +1 -1
- package/dist/chunks/{c4Diagram-AAMF2YG6-DIPVMZbj.js → c4Diagram-AAMF2YG6-C7kDsbEV.js} +1 -1
- package/dist/chunks/{c4Diagram-AAMF2YG6-CBLytKBl.js → c4Diagram-AAMF2YG6-D1nhaGMQ.js} +2 -2
- package/dist/chunks/channel-BL1J4mcN.js +1 -0
- package/dist/chunks/{channel-DIPzZihl.js → channel-DqEwbkJ5.js} +1 -1
- package/dist/chunks/{chunk-ANTBXLJU-Bgg_4C_x.js → chunk-ANTBXLJU-BGLg4kza.js} +1 -1
- package/dist/chunks/{chunk-ANTBXLJU-BHCnbaju.js → chunk-ANTBXLJU-CK2uNBZ1.js} +1 -1
- package/dist/chunks/{chunk-FHKO5MBM-CLAmVH6X.js → chunk-FHKO5MBM-Fi3oUOyz.js} +1 -1
- package/dist/chunks/{chunk-FHKO5MBM-C_ygAgk8.js → chunk-FHKO5MBM-U5X2zge_.js} +1 -1
- package/dist/chunks/{chunk-GLLZNHP4-D107voao.js → chunk-GLLZNHP4-BLprlm7a.js} +1 -1
- package/dist/chunks/{chunk-GLLZNHP4-B2CMhVV-.js → chunk-GLLZNHP4-gwcRW5kd.js} +1 -1
- package/dist/chunks/{chunk-JBRWN2VN-BN3xU0op.js → chunk-JBRWN2VN-DFbXAyDH.js} +1 -1
- package/dist/chunks/{chunk-JBRWN2VN-CrM1LSIW.js → chunk-JBRWN2VN-WfE9P3H9.js} +4 -4
- package/dist/chunks/{chunk-LXBSTHXV-B3v0_M5i.js → chunk-LXBSTHXV-71APvWXI.js} +3 -3
- package/dist/chunks/{chunk-LXBSTHXV-ATbe8S3M.js → chunk-LXBSTHXV-Dxy3lBPi.js} +1 -1
- package/dist/chunks/{chunk-NRVI72HA-DXcnSxt5.js → chunk-NRVI72HA-CwOhPG2b.js} +1 -1
- package/dist/chunks/{chunk-NRVI72HA-BIfF0Wg3.js → chunk-NRVI72HA-DjbFjO3o.js} +1 -1
- package/dist/chunks/{chunk-OMD6QJNC-CvCsgrcB.js → chunk-OMD6QJNC-D4Voi3CS.js} +1 -1
- package/dist/chunks/{chunk-OMD6QJNC-DiS1Ayiz.js → chunk-OMD6QJNC-WKu2bzIs.js} +1 -1
- package/dist/chunks/{chunk-WVR4S24B-BpZytCXN.js → chunk-WVR4S24B-7uW2HbKb.js} +1 -1
- package/dist/chunks/{chunk-WVR4S24B-DFTCs9J3.js → chunk-WVR4S24B-DKGJcqAc.js} +1 -1
- package/dist/chunks/{classDiagram-3BZAVTQC-BqfsUWtS.js → classDiagram-3BZAVTQC-BPY-1m6P.js} +1 -1
- package/dist/chunks/{classDiagram-v2-QTMF73CY-t-ZSGuXh.js → classDiagram-3BZAVTQC-C2gNsmci.js} +2 -2
- package/dist/chunks/{classDiagram-v2-QTMF73CY-BqfsUWtS.js → classDiagram-v2-QTMF73CY-BPY-1m6P.js} +1 -1
- package/dist/chunks/{classDiagram-3BZAVTQC-t-ZSGuXh.js → classDiagram-v2-QTMF73CY-C2gNsmci.js} +2 -2
- package/dist/chunks/clone-BbY68YHs.js +1 -0
- package/dist/chunks/{clone-3Tex2GuH.js → clone-DBXlyoxp.js} +1 -1
- package/dist/chunks/{dagre-2BBEFEWP-BwJustBN.js → dagre-2BBEFEWP-BcTumv5b.js} +1 -1
- package/dist/chunks/{dagre-2BBEFEWP-CgnYpyhn.js → dagre-2BBEFEWP-C8zMRA3F.js} +6 -6
- package/dist/chunks/{dashboard-plus-7t_N3pPP.js → dashboard-plus-Bh3rgtkD.js} +4801 -4791
- package/dist/chunks/{dashboard-plus-D-pZuR4O.js → dashboard-plus-yA1fkbzh.js} +15 -15
- package/dist/chunks/{diagram-4IRLE6MV-BoKKPdws.js → diagram-4IRLE6MV-Cbmi8Fyt.js} +4 -4
- package/dist/chunks/{diagram-4IRLE6MV-GctNVp6z.js → diagram-4IRLE6MV-DUBGgzQy.js} +1 -1
- package/dist/chunks/{diagram-GUPCWM2R-DftztrXs.js → diagram-GUPCWM2R-BcbGeBZe.js} +3 -3
- package/dist/chunks/{diagram-GUPCWM2R-D4NW2a60.js → diagram-GUPCWM2R-DSraOySI.js} +1 -1
- package/dist/chunks/{diagram-RP2FKANI-BTbPHapk.js → diagram-RP2FKANI-BIcRcsy-.js} +3 -3
- package/dist/chunks/{diagram-RP2FKANI-BCezi318.js → diagram-RP2FKANI-m-6BWsEL.js} +1 -1
- package/dist/chunks/{erDiagram-HZWUO2LU-BH8BMdgb.js → erDiagram-HZWUO2LU-DMYPXtez.js} +1 -1
- package/dist/chunks/{erDiagram-HZWUO2LU-CXF6fvGv.js → erDiagram-HZWUO2LU-lm0pJGHC.js} +4 -4
- package/dist/chunks/{flowDiagram-THRYKUMA-T0q0jDUN.js → flowDiagram-THRYKUMA-BxtQ5dvf.js} +1 -1
- package/dist/chunks/{flowDiagram-THRYKUMA-CCFyL1sb.js → flowDiagram-THRYKUMA-Ddd_JDrQ.js} +5 -5
- package/dist/chunks/{ganttDiagram-WV7ZQ7D5-DscVb-ar.js → ganttDiagram-WV7ZQ7D5-B9Kk1Q5C.js} +1 -1
- package/dist/chunks/{ganttDiagram-WV7ZQ7D5-DEAGnMzy.js → ganttDiagram-WV7ZQ7D5-BN1zCZwE.js} +3 -3
- package/dist/chunks/{gitGraph-ZV4HHKMB-D3lxeU9B.js → gitGraph-ZV4HHKMB-B4DCa0__.js} +1 -1
- package/dist/chunks/{gitGraph-ZV4HHKMB-IYjUOWTA.js → gitGraph-ZV4HHKMB-xvxkWlWf.js} +1 -1
- package/dist/chunks/{gitGraphDiagram-OJR772UL-Cd59ERQU.js → gitGraphDiagram-OJR772UL-B6myB29E.js} +4 -4
- package/dist/chunks/{gitGraphDiagram-OJR772UL-Cmh6EE22.js → gitGraphDiagram-OJR772UL-ChFhW4jp.js} +1 -1
- package/dist/chunks/{graph-CCt332TI.js → graph-B6fgcGxx.js} +1 -1
- package/dist/chunks/{graph-D6Ops9GK.js → graph-BF6LCaYH.js} +2 -2
- package/dist/chunks/{index-DEdAnDV8.js → index-BwS-4oFh.js} +23230 -23156
- package/dist/chunks/{index-z-UDaVom.js → index-CEBRe30q.js} +171 -171
- package/dist/chunks/{info-63CPKGFF-CvTwB4mO.js → info-63CPKGFF-C61AM7-q.js} +1 -1
- package/dist/chunks/info-63CPKGFF-D8cIYcqe.js +5 -0
- package/dist/chunks/{infoDiagram-DDUCL6P7-Bdsxts7K.js → infoDiagram-DDUCL6P7-Chr8bBqS.js} +2 -2
- package/dist/chunks/{infoDiagram-DDUCL6P7-BIztC5Lx.js → infoDiagram-DDUCL6P7-DpcIR8yV.js} +1 -1
- package/dist/chunks/{journeyDiagram-FFXJYRFH-DuDiXQy0.js → journeyDiagram-FFXJYRFH-BduSuiPB.js} +4 -4
- package/dist/chunks/{journeyDiagram-FFXJYRFH-BNcf5A9h.js → journeyDiagram-FFXJYRFH-DNZogbvW.js} +1 -1
- package/dist/chunks/{kanban-definition-KOZQBZVT-BER-wiQI.js → kanban-definition-KOZQBZVT-CUi8EJZV.js} +1 -1
- package/dist/chunks/{kanban-definition-KOZQBZVT-cDXM9UjJ.js → kanban-definition-KOZQBZVT-Cu7Lndxw.js} +2 -2
- package/dist/chunks/{layout-BVO7SKyA.js → layout-DLsbGTQz.js} +1 -1
- package/dist/chunks/{layout-DxvNIIBb.js → layout-Gthyofz2.js} +4 -4
- package/dist/chunks/{linear-C6hOD1PX.js → linear-Cm6KRnfp.js} +1 -1
- package/dist/chunks/{linear-DHTJ5Utp.js → linear-aBqM-t45.js} +2 -2
- package/dist/chunks/{mermaid-parser.core-D7NH2asJ.js → mermaid-parser.core-DQqietT8.js} +2 -2
- package/dist/chunks/{mermaid-parser.core-B4Bs-Ub3.js → mermaid-parser.core-IjhQ7eLj.js} +11 -11
- package/dist/chunks/{mermaid.core-CicsgttZ.js → mermaid.core-DUHba1Nm.js} +4 -4
- package/dist/chunks/{mermaid.core-CXBZU_5C.js → mermaid.core-lU3ermnX.js} +30 -30
- package/dist/chunks/{mindmap-definition-LNHGMQRG-DSL1S8jW.js → mindmap-definition-LNHGMQRG-CSWY7cEv.js} +2 -2
- package/dist/chunks/{mindmap-definition-LNHGMQRG-0DHndcLr.js → mindmap-definition-LNHGMQRG-CnRPozlJ.js} +1 -1
- package/dist/chunks/{packet-HUATNLJX-nVqL16dW.js → packet-HUATNLJX-DNiNJ_QS.js} +1 -1
- package/dist/chunks/{packet-HUATNLJX-CrlOu8rr.js → packet-HUATNLJX-e5GsrO0A.js} +1 -1
- package/dist/chunks/{pie-WTHONI2E-D2BApn1Q.js → pie-WTHONI2E-B0fw0fIH.js} +1 -1
- package/dist/chunks/pie-WTHONI2E-BUK-0d24.js +5 -0
- package/dist/chunks/{pieDiagram-DBDJKBY4-NV1APUIC.js → pieDiagram-DBDJKBY4-Bgkas5gV.js} +1 -1
- package/dist/chunks/{pieDiagram-DBDJKBY4-DMGJKCv0.js → pieDiagram-DBDJKBY4-D8WvuNxG.js} +4 -4
- package/dist/chunks/{quadrantDiagram-YPSRARAO-BGAeJVMc.js → quadrantDiagram-YPSRARAO-B28GRBdC.js} +2 -2
- package/dist/chunks/{quadrantDiagram-YPSRARAO-BIoOLeoN.js → quadrantDiagram-YPSRARAO-BOwHTTTg.js} +1 -1
- package/dist/chunks/{radar-NJJJXTRR-Bj0phiuA.js → radar-NJJJXTRR-D4ESC23K.js} +1 -1
- package/dist/chunks/radar-NJJJXTRR-Dn-O0H10.js +5 -0
- package/dist/chunks/{requirementDiagram-EGVEC5DT-FUYIPM2x.js → requirementDiagram-EGVEC5DT-CLbeqYB0.js} +3 -3
- package/dist/chunks/{requirementDiagram-EGVEC5DT-B8vpMnKI.js → requirementDiagram-EGVEC5DT-IVwVitxv.js} +1 -1
- package/dist/chunks/{sankeyDiagram-HRAUVNP4-BdA3o-xm.js → sankeyDiagram-HRAUVNP4-CxEb7Ili.js} +2 -2
- package/dist/chunks/{sankeyDiagram-HRAUVNP4-hAPwaSFy.js → sankeyDiagram-HRAUVNP4-cBbImrbs.js} +1 -1
- package/dist/chunks/{sequenceDiagram-4MX5Z3NR-CxU20DrS.js → sequenceDiagram-4MX5Z3NR-Bd5Er185.js} +1 -1
- package/dist/chunks/{sequenceDiagram-4MX5Z3NR-SrHfuftD.js → sequenceDiagram-4MX5Z3NR-Cfs33Jna.js} +3 -3
- package/dist/chunks/{stateDiagram-UUKSUZ4H-CCbFxvYg.js → stateDiagram-UUKSUZ4H-DcpSvFtY.js} +4 -4
- package/dist/chunks/{stateDiagram-UUKSUZ4H-Xs8e2Hgh.js → stateDiagram-UUKSUZ4H-TvBHkgHV.js} +1 -1
- package/dist/chunks/{stateDiagram-v2-EYPG3UTE-Dp29OnI_.js → stateDiagram-v2-EYPG3UTE-D-j9wmD4.js} +2 -2
- package/dist/chunks/{stateDiagram-v2-EYPG3UTE-CTwC6bAl.js → stateDiagram-v2-EYPG3UTE-DN3C1cMv.js} +1 -1
- package/dist/chunks/{timeline-definition-3HZDQTIS-DOuv1IhP.js → timeline-definition-3HZDQTIS-Br7UScbk.js} +2 -2
- package/dist/chunks/{timeline-definition-3HZDQTIS-C4Q22uNa.js → timeline-definition-3HZDQTIS-BuXUJ-V7.js} +1 -1
- package/dist/chunks/{treemap-75Q7IDZK-DsDG2jmp.js → treemap-75Q7IDZK-Dzq1jUW6.js} +1 -1
- package/dist/chunks/{treemap-75Q7IDZK-BNzx3Qvj.js → treemap-75Q7IDZK-xJ9nbk2Y.js} +1 -1
- package/dist/chunks/{xychartDiagram-FDP5SA34-Dfjk0HMw.js → xychartDiagram-FDP5SA34-Cghmm2Lo.js} +3 -3
- package/dist/chunks/{xychartDiagram-FDP5SA34-CZ9y_hcL.js → xychartDiagram-FDP5SA34-_k9wVk1s.js} +1 -1
- package/dist/dashboard/index.cjs +1 -1
- package/dist/dashboard/index.js +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/surfboard/index.cjs +1 -1
- package/dist/surfboard/index.js +1 -1
- package/package.json +1 -1
- package/dist/chunks/channel-B0wXZddY.js +0 -1
- package/dist/chunks/clone-DpLXwZrG.js +0 -1
- package/dist/chunks/info-63CPKGFF-ibFrbc-5.js +0 -5
- package/dist/chunks/pie-WTHONI2E-BHUCtLJr.js +0 -5
- package/dist/chunks/radar-NJJJXTRR-B7dccI7W.js +0 -5
package/dist/chunks/{gitGraphDiagram-OJR772UL-Cmh6EE22.js → gitGraphDiagram-OJR772UL-ChFhW4jp.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("./chunk-ANTBXLJU-BHCnbaju.js"),Q=require("./chunk-FHKO5MBM-CLAmVH6X.js"),s=require("./mermaid.core-CicsgttZ.js"),Z=require("./mermaid-parser.core-D7NH2asJ.js");var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},F=s.defaultConfig_default.gitGraph,I=s.__name(()=>s.cleanAndMerge({...F,...s.getConfig().gitGraph}),"getConfig"),d=new Q.ImperativeState(()=>{const t=I(),e=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:a}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});function G(){return s.random({length:7})}s.__name(G,"getID");function j(t,e){const a=Object.create(null);return t.reduce((o,r)=>{const n=e(r);return a[n]||(a[n]=!0,o.push(r)),o},[])}s.__name(j,"uniqBy");var U=s.__name(function(t){d.records.direction=t},"setDirection"),ee=s.__name(function(t){s.log.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{d.records.options=JSON.parse(t)}catch(e){s.log.error("error while parsing gitGraph options",e.message)}},"setOptions"),re=s.__name(function(){return d.records.options},"getOptions"),te=s.__name(function(t){let e=t.msg,a=t.id;const o=t.type;let r=t.tags;s.log.info("commit",e,a,o,r),s.log.debug("Entering commit:",e,a,o,r);const n=I();a=s.common_default.sanitizeText(a,n),e=s.common_default.sanitizeText(e,n),r=r==null?void 0:r.map(c=>s.common_default.sanitizeText(c,n));const i={id:a||d.records.seq+"-"+G(),message:e,seq:d.records.seq++,type:o??x.NORMAL,tags:r??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=i,s.log.info("main branch",n.mainBranchName),d.records.commits.has(i.id)&&s.log.warn(`Commit ID ${i.id} already exists`),d.records.commits.set(i.id,i),d.records.branches.set(d.records.currBranch,i.id),s.log.debug("in pushCommit "+i.id)},"commit"),ae=s.__name(function(t){let e=t.name;const a=t.order;if(e=s.common_default.sanitizeText(e,I()),d.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);d.records.branches.set(e,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(e,{name:e,order:a}),K(e),s.log.debug("in createBranch")},"branch"),ne=s.__name(t=>{let e=t.branch,a=t.id;const o=t.type,r=t.tags,n=I();e=s.common_default.sanitizeText(e,n),a&&(a=s.common_default.sanitizeText(a,n));const i=d.records.branches.get(d.records.currBranch),c=d.records.branches.get(e),$=i?d.records.commits.get(i):void 0,h=c?d.records.commits.get(c):void 0;if($&&h&&$.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(d.records.currBranch===e){const l=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw l.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},l}if($===void 0||!$){const l=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw l.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},l}if(!d.records.branches.has(e)){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw l.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},l}if(h===void 0||!h){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw l.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},l}if($===h){const l=new Error('Incorrect usage of "merge". Both branches have same head');throw l.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},l}if(a&&d.records.commits.has(a)){const l=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw l.hash={text:`merge ${e} ${a} ${o} ${r==null?void 0:r.join(" ")}`,token:`merge ${e} ${a} ${o} ${r==null?void 0:r.join(" ")}`,expected:[`merge ${e} ${a}_UNIQUE ${o} ${r==null?void 0:r.join(" ")}`]},l}const f=c||"",g={id:a||`${d.records.seq}-${G()}`,message:`merged branch ${e} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,f],branch:d.records.currBranch,type:x.MERGE,customType:o,customId:!!a,tags:r??[]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),s.log.debug(d.records.branches),s.log.debug("in mergeBranch")},"merge"),se=s.__name(function(t){let e=t.id,a=t.targetId,o=t.tags,r=t.parent;s.log.debug("Entering cherryPick:",e,a,o);const n=I();if(e=s.common_default.sanitizeText(e,n),a=s.common_default.sanitizeText(a,n),o=o==null?void 0:o.map($=>s.common_default.sanitizeText($,n)),r=s.common_default.sanitizeText(r,n),!e||!d.records.commits.has(e)){const $=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw $.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},$}const i=d.records.commits.get(e);if(i===void 0||!i)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(r&&!(Array.isArray(i.parents)&&i.parents.includes(r)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const c=i.branch;if(i.type===x.MERGE&&!r)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!d.records.commits.has(a)){if(c===d.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const $=d.records.branches.get(d.records.currBranch);if($===void 0||!$){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const h=d.records.commits.get($);if(h===void 0||!h){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const f={id:d.records.seq+"-"+G(),message:`cherry-picked ${i==null?void 0:i.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,i.id],branch:d.records.currBranch,type:x.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${i.id}${i.type===x.MERGE?`|parent:${r}`:""}`]};d.records.head=f,d.records.commits.set(f.id,f),d.records.branches.set(d.records.currBranch,f.id),s.log.debug(d.records.branches),s.log.debug("in cherryPick")}},"cherryPick"),K=s.__name(function(t){if(t=s.common_default.sanitizeText(t,I()),d.records.branches.has(t)){d.records.currBranch=t;const e=d.records.branches.get(d.records.currBranch);e===void 0||!e?d.records.head=null:d.records.head=d.records.commits.get(e)??null}else{const e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}},"checkout");function A(t,e,a){const o=t.indexOf(e);o===-1?t.push(a):t.splice(o,1,a)}s.__name(A,"upsert");function S(t){const e=t.reduce((r,n)=>r.seq>n.seq?r:n,t[0]);let a="";t.forEach(function(r){r===e?a+=" *":a+=" |"});const o=[a,e.id,e.seq];for(const r in d.records.branches)d.records.branches.get(r)===e.id&&o.push(r);if(s.log.debug(o.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){const r=d.records.commits.get(e.parents[0]);A(t,e,r),e.parents[1]&&t.push(d.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){const r=d.records.commits.get(e.parents[0]);A(t,e,r)}}t=j(t,r=>r.id),S(t)}s.__name(S,"prettyPrintCommitHistory");var oe=s.__name(function(){s.log.debug(d.records.commits);const t=N()[0];S([t])},"prettyPrint"),ce=s.__name(function(){d.reset(),s.clear()},"clear"),ie=s.__name(function(){return[...d.records.branchConfig.values()].map((e,a)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${a}`)}).sort((e,a)=>(e.order??0)-(a.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),de=s.__name(function(){return d.records.branches},"getBranches"),le=s.__name(function(){return d.records.commits},"getCommits"),N=s.__name(function(){const t=[...d.records.commits.values()];return t.forEach(function(e){s.log.debug(e.id)}),t.sort((e,a)=>e.seq-a.seq),t},"getCommitsArray"),he=s.__name(function(){return d.records.currBranch},"getCurrentBranch"),$e=s.__name(function(){return d.records.direction},"getDirection"),fe=s.__name(function(){return d.records.head},"getHead"),Y={commitType:x,getConfig:I,setDirection:U,setOptions:ee,getOptions:re,commit:te,branch:ae,merge:ne,cherryPick:se,checkout:K,prettyPrint:oe,clear:ce,getBranchesAsObjArray:ie,getBranches:de,getCommits:le,getCommitsArray:N,getCurrentBranch:he,getDirection:$e,getHead:fe,setAccTitle:s.setAccTitle,getAccTitle:s.getAccTitle,getAccDescription:s.getAccDescription,setAccDescription:s.setAccDescription,setDiagramTitle:s.setDiagramTitle,getDiagramTitle:s.getDiagramTitle},ge=s.__name((t,e)=>{J.populateCommonDb(t,e),t.dir&&e.setDirection(t.dir);for(const a of t.statements)ye(a,e)},"populate"),ye=s.__name((t,e)=>{const o={Commit:s.__name(r=>e.commit(ue(r)),"Commit"),Branch:s.__name(r=>e.branch(xe(r)),"Branch"),Merge:s.__name(r=>e.merge(me(r)),"Merge"),Checkout:s.__name(r=>e.checkout(pe(r)),"Checkout"),CherryPicking:s.__name(r=>e.cherryPick(be(r)),"CherryPicking")}[t.$type];o?o(t):s.log.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),ue=s.__name(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?x[t.type]:x.NORMAL,tags:t.tags??void 0}),"parseCommit"),xe=s.__name(t=>({name:t.name,order:t.order??0}),"parseBranch"),me=s.__name(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?x[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),pe=s.__name(t=>t.branch,"parseCheckout"),be=s.__name(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),we={parse:s.__name(async t=>{const e=await Z.parse("gitGraph",t);s.log.debug(e),ge(e,Y)},"parse")},H=s.getConfig2(),p=H==null?void 0:H.gitGraph,L=10,T=40,C=4,B=2,R=8,_=new Map,v=new Map,z=30,q=new Map,P=[],k=0,u="LR",_e=s.__name(()=>{_.clear(),v.clear(),q.clear(),k=0,P=[],u="LR"},"clear"),V=s.__name(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(o=>{const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),r.setAttribute("class","row"),r.textContent=o.trim(),e.appendChild(r)}),e},"drawText"),X=s.__name(t=>{let e,a,o;return u==="BT"?(a=s.__name((r,n)=>r<=n,"comparisonFunc"),o=1/0):(a=s.__name((r,n)=>r>=n,"comparisonFunc"),o=0),t.forEach(r=>{var i,c;const n=u==="TB"||u=="BT"?(i=v.get(r))==null?void 0:i.y:(c=v.get(r))==null?void 0:c.x;n!==void 0&&a(n,o)&&(e=r,o=n)}),e},"findClosestParent"),ve=s.__name(t=>{let e="",a=1/0;return t.forEach(o=>{const r=v.get(o).y;r<=a&&(e=o,a=r)}),e||void 0},"findClosestParentBT"),Ce=s.__name((t,e,a)=>{let o=a,r=a;const n=[];t.forEach(i=>{const c=e.get(i);if(!c)throw new Error(`Commit not found for key ${i}`);c.parents.length?(o=Ee(c),r=Math.max(o,r)):n.push(c),ke(c,o)}),o=r,n.forEach(i=>{Le(i,o,a)}),t.forEach(i=>{const c=e.get(i);if(c!=null&&c.parents.length){const $=ve(c.parents);o=v.get($).y-T,o<=r&&(r=o);const h=_.get(c.branch).pos,f=o-L;v.set(c.id,{x:h,y:f})}})},"setParallelBTPos"),Be=s.__name(t=>{var o;const e=X(t.parents.filter(r=>r!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(o=v.get(e))==null?void 0:o.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Ee=s.__name(t=>Be(t)+T,"calculateCommitPosition"),ke=s.__name((t,e)=>{const a=_.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const o=a.pos,r=e+L;return v.set(t.id,{x:o,y:r}),{x:o,y:r}},"setCommitPosition"),Le=s.__name((t,e,a)=>{const o=_.get(t.branch);if(!o)throw new Error(`Branch not found for commit ${t.id}`);const r=e+a,n=o.pos;v.set(t.id,{x:n,y:r})},"setRootPosition"),Te=s.__name((t,e,a,o,r,n)=>{if(n===x.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${r%R} ${o}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${r%R} ${o}-inner`);else if(n===x.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${e.id} ${o}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${o}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${o}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${o}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${o}`);else{const i=t.append("circle");if(i.attr("cx",a.x),i.attr("cy",a.y),i.attr("r",e.type===x.MERGE?9:10),i.attr("class",`commit ${e.id} commit${r%R}`),n===x.MERGE){const c=t.append("circle");c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",6),c.attr("class",`commit ${o} ${e.id} commit${r%R}`)}n===x.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${o} ${e.id} commit${r%R}`)}},"drawCommitBullet"),Me=s.__name((t,e,a,o)=>{var r;if(e.type!==x.CHERRY_PICK&&(e.customId&&e.type===x.MERGE||e.type!==x.MERGE)&&(p!=null&&p.showCommitLabel)){const n=t.append("g"),i=n.insert("rect").attr("class","commit-label-bkg"),c=n.append("text").attr("x",o).attr("y",a.y+25).attr("class","commit-label").text(e.id),$=(r=c.node())==null?void 0:r.getBBox();if($&&(i.attr("x",a.posWithOffset-$.width/2-B).attr("y",a.y+13.5).attr("width",$.width+2*B).attr("height",$.height+2*B),u==="TB"||u==="BT"?(i.attr("x",a.x-($.width+4*C+5)).attr("y",a.y-12),c.attr("x",a.x-($.width+4*C)).attr("y",a.y+$.height-12)):c.attr("x",a.posWithOffset-$.width/2),p.rotateCommitLabel))if(u==="TB"||u==="BT")c.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),i.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const h=-7.5-($.width+10)/25*9.5,f=10+$.width/25*8.5;n.attr("transform","translate("+h+", "+f+") rotate(-45, "+o+", "+a.y+")")}}},"drawCommitLabel"),Re=s.__name((t,e,a,o)=>{var r;if(e.tags.length>0){let n=0,i=0,c=0;const $=[];for(const h of e.tags.reverse()){const f=t.insert("polygon"),g=t.append("circle"),l=t.append("text").attr("y",a.y-16-n).attr("class","tag-label").text(h),y=(r=l.node())==null?void 0:r.getBBox();if(!y)throw new Error("Tag bbox not found");i=Math.max(i,y.width),c=Math.max(c,y.height),l.attr("x",a.posWithOffset-y.width/2),$.push({tag:l,hole:g,rect:f,yOffset:n}),n+=20}for(const{tag:h,hole:f,rect:g,yOffset:l}of $){const y=c/2,m=a.y-19.2-l;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const J=require("./chunk-ANTBXLJU-CK2uNBZ1.js"),Q=require("./chunk-FHKO5MBM-Fi3oUOyz.js"),s=require("./mermaid.core-DUHba1Nm.js"),Z=require("./mermaid-parser.core-DQqietT8.js");var x={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},F=s.defaultConfig_default.gitGraph,I=s.__name(()=>s.cleanAndMerge({...F,...s.getConfig().gitGraph}),"getConfig"),d=new Q.ImperativeState(()=>{const t=I(),e=t.mainBranchName,a=t.mainBranchOrder;return{mainBranchName:e,commits:new Map,head:null,branchConfig:new Map([[e,{name:e,order:a}]]),branches:new Map([[e,null]]),currBranch:e,direction:"LR",seq:0,options:{}}});function G(){return s.random({length:7})}s.__name(G,"getID");function j(t,e){const a=Object.create(null);return t.reduce((o,r)=>{const n=e(r);return a[n]||(a[n]=!0,o.push(r)),o},[])}s.__name(j,"uniqBy");var U=s.__name(function(t){d.records.direction=t},"setDirection"),ee=s.__name(function(t){s.log.debug("options str",t),t=t==null?void 0:t.trim(),t=t||"{}";try{d.records.options=JSON.parse(t)}catch(e){s.log.error("error while parsing gitGraph options",e.message)}},"setOptions"),re=s.__name(function(){return d.records.options},"getOptions"),te=s.__name(function(t){let e=t.msg,a=t.id;const o=t.type;let r=t.tags;s.log.info("commit",e,a,o,r),s.log.debug("Entering commit:",e,a,o,r);const n=I();a=s.common_default.sanitizeText(a,n),e=s.common_default.sanitizeText(e,n),r=r==null?void 0:r.map(c=>s.common_default.sanitizeText(c,n));const i={id:a||d.records.seq+"-"+G(),message:e,seq:d.records.seq++,type:o??x.NORMAL,tags:r??[],parents:d.records.head==null?[]:[d.records.head.id],branch:d.records.currBranch};d.records.head=i,s.log.info("main branch",n.mainBranchName),d.records.commits.has(i.id)&&s.log.warn(`Commit ID ${i.id} already exists`),d.records.commits.set(i.id,i),d.records.branches.set(d.records.currBranch,i.id),s.log.debug("in pushCommit "+i.id)},"commit"),ae=s.__name(function(t){let e=t.name;const a=t.order;if(e=s.common_default.sanitizeText(e,I()),d.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);d.records.branches.set(e,d.records.head!=null?d.records.head.id:null),d.records.branchConfig.set(e,{name:e,order:a}),K(e),s.log.debug("in createBranch")},"branch"),ne=s.__name(t=>{let e=t.branch,a=t.id;const o=t.type,r=t.tags,n=I();e=s.common_default.sanitizeText(e,n),a&&(a=s.common_default.sanitizeText(a,n));const i=d.records.branches.get(d.records.currBranch),c=d.records.branches.get(e),$=i?d.records.commits.get(i):void 0,h=c?d.records.commits.get(c):void 0;if($&&h&&$.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(d.records.currBranch===e){const l=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw l.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},l}if($===void 0||!$){const l=new Error(`Incorrect usage of "merge". Current branch (${d.records.currBranch})has no commits`);throw l.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["commit"]},l}if(!d.records.branches.has(e)){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist");throw l.hash={text:`merge ${e}`,token:`merge ${e}`,expected:[`branch ${e}`]},l}if(h===void 0||!h){const l=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits");throw l.hash={text:`merge ${e}`,token:`merge ${e}`,expected:['"commit"']},l}if($===h){const l=new Error('Incorrect usage of "merge". Both branches have same head');throw l.hash={text:`merge ${e}`,token:`merge ${e}`,expected:["branch abc"]},l}if(a&&d.records.commits.has(a)){const l=new Error('Incorrect usage of "merge". Commit with id:'+a+" already exists, use different custom id");throw l.hash={text:`merge ${e} ${a} ${o} ${r==null?void 0:r.join(" ")}`,token:`merge ${e} ${a} ${o} ${r==null?void 0:r.join(" ")}`,expected:[`merge ${e} ${a}_UNIQUE ${o} ${r==null?void 0:r.join(" ")}`]},l}const f=c||"",g={id:a||`${d.records.seq}-${G()}`,message:`merged branch ${e} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,f],branch:d.records.currBranch,type:x.MERGE,customType:o,customId:!!a,tags:r??[]};d.records.head=g,d.records.commits.set(g.id,g),d.records.branches.set(d.records.currBranch,g.id),s.log.debug(d.records.branches),s.log.debug("in mergeBranch")},"merge"),se=s.__name(function(t){let e=t.id,a=t.targetId,o=t.tags,r=t.parent;s.log.debug("Entering cherryPick:",e,a,o);const n=I();if(e=s.common_default.sanitizeText(e,n),a=s.common_default.sanitizeText(a,n),o=o==null?void 0:o.map($=>s.common_default.sanitizeText($,n)),r=s.common_default.sanitizeText(r,n),!e||!d.records.commits.has(e)){const $=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw $.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},$}const i=d.records.commits.get(e);if(i===void 0||!i)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(r&&!(Array.isArray(i.parents)&&i.parents.includes(r)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const c=i.branch;if(i.type===x.MERGE&&!r)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!a||!d.records.commits.has(a)){if(c===d.records.currBranch){const g=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const $=d.records.branches.get(d.records.currBranch);if($===void 0||!$){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const h=d.records.commits.get($);if(h===void 0||!h){const g=new Error(`Incorrect usage of "cherry-pick". Current branch (${d.records.currBranch})has no commits`);throw g.hash={text:`cherryPick ${e} ${a}`,token:`cherryPick ${e} ${a}`,expected:["cherry-pick abc"]},g}const f={id:d.records.seq+"-"+G(),message:`cherry-picked ${i==null?void 0:i.message} into ${d.records.currBranch}`,seq:d.records.seq++,parents:d.records.head==null?[]:[d.records.head.id,i.id],branch:d.records.currBranch,type:x.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${i.id}${i.type===x.MERGE?`|parent:${r}`:""}`]};d.records.head=f,d.records.commits.set(f.id,f),d.records.branches.set(d.records.currBranch,f.id),s.log.debug(d.records.branches),s.log.debug("in cherryPick")}},"cherryPick"),K=s.__name(function(t){if(t=s.common_default.sanitizeText(t,I()),d.records.branches.has(t)){d.records.currBranch=t;const e=d.records.branches.get(d.records.currBranch);e===void 0||!e?d.records.head=null:d.records.head=d.records.commits.get(e)??null}else{const e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw e.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},e}},"checkout");function A(t,e,a){const o=t.indexOf(e);o===-1?t.push(a):t.splice(o,1,a)}s.__name(A,"upsert");function S(t){const e=t.reduce((r,n)=>r.seq>n.seq?r:n,t[0]);let a="";t.forEach(function(r){r===e?a+=" *":a+=" |"});const o=[a,e.id,e.seq];for(const r in d.records.branches)d.records.branches.get(r)===e.id&&o.push(r);if(s.log.debug(o.join(" ")),e.parents&&e.parents.length==2&&e.parents[0]&&e.parents[1]){const r=d.records.commits.get(e.parents[0]);A(t,e,r),e.parents[1]&&t.push(d.records.commits.get(e.parents[1]))}else{if(e.parents.length==0)return;if(e.parents[0]){const r=d.records.commits.get(e.parents[0]);A(t,e,r)}}t=j(t,r=>r.id),S(t)}s.__name(S,"prettyPrintCommitHistory");var oe=s.__name(function(){s.log.debug(d.records.commits);const t=N()[0];S([t])},"prettyPrint"),ce=s.__name(function(){d.reset(),s.clear()},"clear"),ie=s.__name(function(){return[...d.records.branchConfig.values()].map((e,a)=>e.order!==null&&e.order!==void 0?e:{...e,order:parseFloat(`0.${a}`)}).sort((e,a)=>(e.order??0)-(a.order??0)).map(({name:e})=>({name:e}))},"getBranchesAsObjArray"),de=s.__name(function(){return d.records.branches},"getBranches"),le=s.__name(function(){return d.records.commits},"getCommits"),N=s.__name(function(){const t=[...d.records.commits.values()];return t.forEach(function(e){s.log.debug(e.id)}),t.sort((e,a)=>e.seq-a.seq),t},"getCommitsArray"),he=s.__name(function(){return d.records.currBranch},"getCurrentBranch"),$e=s.__name(function(){return d.records.direction},"getDirection"),fe=s.__name(function(){return d.records.head},"getHead"),Y={commitType:x,getConfig:I,setDirection:U,setOptions:ee,getOptions:re,commit:te,branch:ae,merge:ne,cherryPick:se,checkout:K,prettyPrint:oe,clear:ce,getBranchesAsObjArray:ie,getBranches:de,getCommits:le,getCommitsArray:N,getCurrentBranch:he,getDirection:$e,getHead:fe,setAccTitle:s.setAccTitle,getAccTitle:s.getAccTitle,getAccDescription:s.getAccDescription,setAccDescription:s.setAccDescription,setDiagramTitle:s.setDiagramTitle,getDiagramTitle:s.getDiagramTitle},ge=s.__name((t,e)=>{J.populateCommonDb(t,e),t.dir&&e.setDirection(t.dir);for(const a of t.statements)ye(a,e)},"populate"),ye=s.__name((t,e)=>{const o={Commit:s.__name(r=>e.commit(ue(r)),"Commit"),Branch:s.__name(r=>e.branch(xe(r)),"Branch"),Merge:s.__name(r=>e.merge(me(r)),"Merge"),Checkout:s.__name(r=>e.checkout(pe(r)),"Checkout"),CherryPicking:s.__name(r=>e.cherryPick(be(r)),"CherryPicking")}[t.$type];o?o(t):s.log.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),ue=s.__name(t=>({id:t.id,msg:t.message??"",type:t.type!==void 0?x[t.type]:x.NORMAL,tags:t.tags??void 0}),"parseCommit"),xe=s.__name(t=>({name:t.name,order:t.order??0}),"parseBranch"),me=s.__name(t=>({branch:t.branch,id:t.id??"",type:t.type!==void 0?x[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),pe=s.__name(t=>t.branch,"parseCheckout"),be=s.__name(t=>{var a;return{id:t.id,targetId:"",tags:((a=t.tags)==null?void 0:a.length)===0?void 0:t.tags,parent:t.parent}},"parseCherryPicking"),we={parse:s.__name(async t=>{const e=await Z.parse("gitGraph",t);s.log.debug(e),ge(e,Y)},"parse")},H=s.getConfig2(),p=H==null?void 0:H.gitGraph,L=10,T=40,C=4,B=2,R=8,_=new Map,v=new Map,z=30,q=new Map,P=[],k=0,u="LR",_e=s.__name(()=>{_.clear(),v.clear(),q.clear(),k=0,P=[],u="LR"},"clear"),V=s.__name(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");return(typeof t=="string"?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(o=>{const r=document.createElementNS("http://www.w3.org/2000/svg","tspan");r.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),r.setAttribute("dy","1em"),r.setAttribute("x","0"),r.setAttribute("class","row"),r.textContent=o.trim(),e.appendChild(r)}),e},"drawText"),X=s.__name(t=>{let e,a,o;return u==="BT"?(a=s.__name((r,n)=>r<=n,"comparisonFunc"),o=1/0):(a=s.__name((r,n)=>r>=n,"comparisonFunc"),o=0),t.forEach(r=>{var i,c;const n=u==="TB"||u=="BT"?(i=v.get(r))==null?void 0:i.y:(c=v.get(r))==null?void 0:c.x;n!==void 0&&a(n,o)&&(e=r,o=n)}),e},"findClosestParent"),ve=s.__name(t=>{let e="",a=1/0;return t.forEach(o=>{const r=v.get(o).y;r<=a&&(e=o,a=r)}),e||void 0},"findClosestParentBT"),Ce=s.__name((t,e,a)=>{let o=a,r=a;const n=[];t.forEach(i=>{const c=e.get(i);if(!c)throw new Error(`Commit not found for key ${i}`);c.parents.length?(o=Ee(c),r=Math.max(o,r)):n.push(c),ke(c,o)}),o=r,n.forEach(i=>{Le(i,o,a)}),t.forEach(i=>{const c=e.get(i);if(c!=null&&c.parents.length){const $=ve(c.parents);o=v.get($).y-T,o<=r&&(r=o);const h=_.get(c.branch).pos,f=o-L;v.set(c.id,{x:h,y:f})}})},"setParallelBTPos"),Be=s.__name(t=>{var o;const e=X(t.parents.filter(r=>r!==null));if(!e)throw new Error(`Closest parent not found for commit ${t.id}`);const a=(o=v.get(e))==null?void 0:o.y;if(a===void 0)throw new Error(`Closest parent position not found for commit ${t.id}`);return a},"findClosestParentPos"),Ee=s.__name(t=>Be(t)+T,"calculateCommitPosition"),ke=s.__name((t,e)=>{const a=_.get(t.branch);if(!a)throw new Error(`Branch not found for commit ${t.id}`);const o=a.pos,r=e+L;return v.set(t.id,{x:o,y:r}),{x:o,y:r}},"setCommitPosition"),Le=s.__name((t,e,a)=>{const o=_.get(t.branch);if(!o)throw new Error(`Branch not found for commit ${t.id}`);const r=e+a,n=o.pos;v.set(t.id,{x:n,y:r})},"setRootPosition"),Te=s.__name((t,e,a,o,r,n)=>{if(n===x.HIGHLIGHT)t.append("rect").attr("x",a.x-10).attr("y",a.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${r%R} ${o}-outer`),t.append("rect").attr("x",a.x-6).attr("y",a.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${r%R} ${o}-inner`);else if(n===x.CHERRY_PICK)t.append("circle").attr("cx",a.x).attr("cy",a.y).attr("r",10).attr("class",`commit ${e.id} ${o}`),t.append("circle").attr("cx",a.x-3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${o}`),t.append("circle").attr("cx",a.x+3).attr("cy",a.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} ${o}`),t.append("line").attr("x1",a.x+3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${o}`),t.append("line").attr("x1",a.x-3).attr("y1",a.y+1).attr("x2",a.x).attr("y2",a.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} ${o}`);else{const i=t.append("circle");if(i.attr("cx",a.x),i.attr("cy",a.y),i.attr("r",e.type===x.MERGE?9:10),i.attr("class",`commit ${e.id} commit${r%R}`),n===x.MERGE){const c=t.append("circle");c.attr("cx",a.x),c.attr("cy",a.y),c.attr("r",6),c.attr("class",`commit ${o} ${e.id} commit${r%R}`)}n===x.REVERSE&&t.append("path").attr("d",`M ${a.x-5},${a.y-5}L${a.x+5},${a.y+5}M${a.x-5},${a.y+5}L${a.x+5},${a.y-5}`).attr("class",`commit ${o} ${e.id} commit${r%R}`)}},"drawCommitBullet"),Me=s.__name((t,e,a,o)=>{var r;if(e.type!==x.CHERRY_PICK&&(e.customId&&e.type===x.MERGE||e.type!==x.MERGE)&&(p!=null&&p.showCommitLabel)){const n=t.append("g"),i=n.insert("rect").attr("class","commit-label-bkg"),c=n.append("text").attr("x",o).attr("y",a.y+25).attr("class","commit-label").text(e.id),$=(r=c.node())==null?void 0:r.getBBox();if($&&(i.attr("x",a.posWithOffset-$.width/2-B).attr("y",a.y+13.5).attr("width",$.width+2*B).attr("height",$.height+2*B),u==="TB"||u==="BT"?(i.attr("x",a.x-($.width+4*C+5)).attr("y",a.y-12),c.attr("x",a.x-($.width+4*C)).attr("y",a.y+$.height-12)):c.attr("x",a.posWithOffset-$.width/2),p.rotateCommitLabel))if(u==="TB"||u==="BT")c.attr("transform","rotate(-45, "+a.x+", "+a.y+")"),i.attr("transform","rotate(-45, "+a.x+", "+a.y+")");else{const h=-7.5-($.width+10)/25*9.5,f=10+$.width/25*8.5;n.attr("transform","translate("+h+", "+f+") rotate(-45, "+o+", "+a.y+")")}}},"drawCommitLabel"),Re=s.__name((t,e,a,o)=>{var r;if(e.tags.length>0){let n=0,i=0,c=0;const $=[];for(const h of e.tags.reverse()){const f=t.insert("polygon"),g=t.append("circle"),l=t.append("text").attr("y",a.y-16-n).attr("class","tag-label").text(h),y=(r=l.node())==null?void 0:r.getBBox();if(!y)throw new Error("Tag bbox not found");i=Math.max(i,y.width),c=Math.max(c,y.height),l.attr("x",a.posWithOffset-y.width/2),$.push({tag:l,hole:g,rect:f,yOffset:n}),n+=20}for(const{tag:h,hole:f,rect:g,yOffset:l}of $){const y=c/2,m=a.y-19.2-l;if(g.attr("class","tag-label-bkg").attr("points",`
|
|
2
2
|
${o-i/2-C/2},${m+B}
|
|
3
3
|
${o-i/2-C/2},${m-B}
|
|
4
4
|
${a.posWithOffset-i/2-C},${m-y-B}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";const a=require("./mermaid.core-
|
|
1
|
+
"use strict";const a=require("./mermaid.core-DUHba1Nm.js"),n=require("./_baseUniq-C6j27TNu.js");var b=a.baseRest(function(o){return n.baseUniq(n.baseFlatten(o,1,a.isArrayLikeObject,!0))}),E="\0",u="\0",g="";class f{constructor(e={}){this._isDirected=Object.prototype.hasOwnProperty.call(e,"directed")?e.directed:!0,this._isMultigraph=Object.prototype.hasOwnProperty.call(e,"multigraph")?e.multigraph:!1,this._isCompound=Object.prototype.hasOwnProperty.call(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=a.constant$1(void 0),this._defaultEdgeLabelFn=a.constant$1(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[u]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(e){return this._label=e,this}graph(){return this._label}setDefaultNodeLabel(e){return a.isFunction(e)||(e=a.constant$1(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return n.keys(this._nodes)}sources(){var e=this;return n.filter(this.nodes(),function(t){return a.isEmpty(e._in[t])})}sinks(){var e=this;return n.filter(this.nodes(),function(t){return a.isEmpty(e._out[t])})}setNodes(e,t){var s=arguments,i=this;return n.forEach(e,function(r){s.length>1?i.setNode(r,t):i.setNode(r)}),this}setNode(e,t){return Object.prototype.hasOwnProperty.call(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=t),this):(this._nodes[e]=arguments.length>1?t:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=u,this._children[e]={},this._children[u][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return Object.prototype.hasOwnProperty.call(this._nodes,e)}removeNode(e){if(Object.prototype.hasOwnProperty.call(this._nodes,e)){var t=s=>this.removeEdge(this._edgeObjs[s]);delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],n.forEach(this.children(e),s=>{this.setParent(s)}),delete this._children[e]),n.forEach(n.keys(this._in[e]),t),delete this._in[e],delete this._preds[e],n.forEach(n.keys(this._out[e]),t),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,t){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(n.isUndefined(t))t=u;else{t+="";for(var s=t;!n.isUndefined(s);s=this.parent(s))if(s===e)throw new Error("Setting "+t+" as parent of "+e+" would create a cycle");this.setNode(t)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=t,this._children[t][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var t=this._parent[e];if(t!==u)return t}}children(e){if(n.isUndefined(e)&&(e=u),this._isCompound){var t=this._children[e];if(t)return n.keys(t)}else{if(e===u)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var t=this._preds[e];if(t)return n.keys(t)}successors(e){var t=this._sucs[e];if(t)return n.keys(t)}neighbors(e){var t=this.predecessors(e);if(t)return b(t,this.successors(e))}isLeaf(e){var t;return this.isDirected()?t=this.successors(e):t=this.neighbors(e),t.length===0}filterNodes(e){var t=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});t.setGraph(this.graph());var s=this;n.forEach(this._nodes,function(h,d){e(d)&&t.setNode(d,h)}),n.forEach(this._edgeObjs,function(h){t.hasNode(h.v)&&t.hasNode(h.w)&&t.setEdge(h,s.edge(h))});var i={};function r(h){var d=s.parent(h);return d===void 0||t.hasNode(d)?(i[h]=d,d):d in i?i[d]:r(d)}return this._isCompound&&n.forEach(t.nodes(),function(h){t.setParent(h,r(h))}),t}setDefaultEdgeLabel(e){return a.isFunction(e)||(e=a.constant$1(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return n.values(this._edgeObjs)}setPath(e,t){var s=this,i=arguments;return n.reduce(e,function(r,h){return i.length>1?s.setEdge(r,h,t):s.setEdge(r,h),h}),this}setEdge(){var e,t,s,i,r=!1,h=arguments[0];typeof h=="object"&&h!==null&&"v"in h?(e=h.v,t=h.w,s=h.name,arguments.length===2&&(i=arguments[1],r=!0)):(e=h,t=arguments[1],s=arguments[3],arguments.length>2&&(i=arguments[2],r=!0)),e=""+e,t=""+t,n.isUndefined(s)||(s=""+s);var d=l(this._isDirected,e,t,s);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,d))return r&&(this._edgeLabels[d]=i),this;if(!n.isUndefined(s)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(t),this._edgeLabels[d]=r?i:this._defaultEdgeLabelFn(e,t,s);var _=y(this._isDirected,e,t,s);return e=_.v,t=_.w,Object.freeze(_),this._edgeObjs[d]=_,p(this._preds[t],e),p(this._sucs[e],t),this._in[t][d]=_,this._out[e][d]=_,this._edgeCount++,this}edge(e,t,s){var i=arguments.length===1?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,s);return this._edgeLabels[i]}hasEdge(e,t,s){var i=arguments.length===1?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,s);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(e,t,s){var i=arguments.length===1?c(this._isDirected,arguments[0]):l(this._isDirected,e,t,s),r=this._edgeObjs[i];return r&&(e=r.v,t=r.w,delete this._edgeLabels[i],delete this._edgeObjs[i],m(this._preds[t],e),m(this._sucs[e],t),delete this._in[t][i],delete this._out[e][i],this._edgeCount--),this}inEdges(e,t){var s=this._in[e];if(s){var i=n.values(s);return t?n.filter(i,function(r){return r.v===t}):i}}outEdges(e,t){var s=this._out[e];if(s){var i=n.values(s);return t?n.filter(i,function(r){return r.w===t}):i}}nodeEdges(e,t){var s=this.inEdges(e,t);if(s)return s.concat(this.outEdges(e,t))}}f.prototype._nodeCount=0;f.prototype._edgeCount=0;function p(o,e){o[e]?o[e]++:o[e]=1}function m(o,e){--o[e]||delete o[e]}function l(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var h=i;i=r,r=h}return i+g+r+g+(n.isUndefined(s)?E:s)}function y(o,e,t,s){var i=""+e,r=""+t;if(!o&&i>r){var h=i;i=r,r=h}var d={v:i,w:r};return s&&(d.name=s),d}function c(o,e){return l(o,e.v,e.w,e.name)}exports.Graph=f;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { as as N, at as v, au as f, av as b, aw as E } from "./mermaid.core-
|
|
2
|
-
import { a as j, c as P, k as _, f as g, d, i as l, v as p, r as w } from "./_baseUniq-
|
|
1
|
+
import { as as N, at as v, au as f, av as b, aw as E } from "./mermaid.core-lU3ermnX.js";
|
|
2
|
+
import { a as j, c as P, k as _, f as g, d, i as l, v as p, r as w } from "./_baseUniq-DqyqOsmS.js";
|
|
3
3
|
var D = N(function(o) {
|
|
4
4
|
return j(P(o, 1, v, !0));
|
|
5
5
|
}), F = "\0", a = "\0", O = "";
|