vibelet 1.2.249 → 1.2.251
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/index.cjs +7 -1
- package/dist/inventory-scan-worker.cjs +1 -1
- package/dist/runtime-version.cjs +1 -1
- package/dist/web/assets/App-Bx92ZYqP.js +2 -0
- package/dist/web/assets/App-C7OILF5b.css +97 -0
- package/dist/web/assets/{BrowserControlPanel-ChZyiZg8.js → BrowserControlPanel-BSBCQsTC.js} +1 -1
- package/dist/web/assets/ChatPane-CNkEpPZD.js +1 -0
- package/dist/web/assets/{ChipGroup-0exv9rzn.js → ChipGroup-BGteDQAS.js} +1 -1
- package/dist/web/assets/ComposerMenus-7XnPTSod.js +1 -0
- package/dist/web/assets/{DiffDrawer-D4eELjEe.js → DiffDrawer-DLUBB9ig.js} +1 -1
- package/dist/web/assets/FilesControlPanel-BC8Kvjf2.js +1 -0
- package/dist/web/assets/GlobalPendingDialog-ZjYyhVoG.js +1 -0
- package/dist/web/assets/{ImageViewer-BojwpCb-.js → ImageViewer-D_-eK1aP.js} +1 -1
- package/dist/web/assets/InteractionPolish-CQwU9CEi.css +1 -0
- package/dist/web/assets/{LanguageSettingsPanel-C1ZHQpVG.js → LanguageSettingsPanel-Btyc58mw.js} +1 -1
- package/dist/web/assets/{MarkdownModePanel-B4iVncFO.js → MarkdownModePanel-q63q8r9N.js} +1 -1
- package/dist/web/assets/{NewSessionDialog-eX_6NPbk.css → NewSessionDialog-CWW1T1s7.css} +1 -1
- package/dist/web/assets/NewSessionDialog-Cqymzgm4.js +1 -0
- package/dist/web/assets/{NotificationSettingsPanel-BA0Lj4kT.js → NotificationSettingsPanel-CKYNiUya.js} +1 -1
- package/dist/web/assets/{PanelFind-D_pRPFBN.js → PanelFind-BA1eUXgS.js} +1 -1
- package/dist/web/assets/{RemoteLifeOSBlock-CZkQLmE5.js → RemoteLifeOSBlock-Bq3YQBy7.js} +2 -2
- package/dist/web/assets/RemoteWorkspaceSettings-Cs_zzqpf.css +1 -0
- package/dist/web/assets/RemoteWorkspaceSettings-D8_jQ7Wt.js +1 -0
- package/dist/web/assets/{SessionTerminalPanel-B-TvX4Fz.js → SessionTerminalPanel-Dmt2m_B6.js} +2 -2
- package/dist/web/assets/{SpeechInputSettingsPanel-Buqwjrth.js → SpeechInputSettingsPanel-9qu4_cQx.js} +1 -1
- package/dist/web/assets/{ThemeSettingsPanel-Bph9zVcN.js → ThemeSettingsPanel-zefRQEDV.js} +1 -1
- package/dist/web/assets/{__vite-browser-external-2447137e-Dbwxx6PZ.js → __vite-browser-external-2447137e-BMiSckAV.js} +1 -1
- package/dist/web/assets/_baseMerge-CwDZKfvJ.js +1 -0
- package/dist/web/assets/{_initCloneObject-CgHgrY9n.js → _initCloneObject-C781OlVa.js} +1 -1
- package/dist/web/assets/{abnfDiagram-VRR7QNED-dJfL32qR.js → abnfDiagram-VRR7QNED-THI3SIgB.js} +1 -1
- package/dist/web/assets/arc-DgeTKeM5.js +1 -0
- package/dist/web/assets/{architectureDiagram-ZJ3FMSHR-LXgKoYZv.js → architectureDiagram-ZJ3FMSHR-CPVnaW5G.js} +1 -1
- package/dist/web/assets/{arrow-left-CagvtJU8.js → arrow-left-dANl3leX.js} +1 -1
- package/dist/web/assets/{arrow-right-CW797wzk.js → arrow-right-DTaF5t16.js} +1 -1
- package/dist/web/assets/{blockDiagram-677ZJIJ3-BOLqwY0y.js → blockDiagram-677ZJIJ3-BDME3ZFA.js} +1 -1
- package/dist/web/assets/{c4Diagram-LMCZKHZV-BvwC7DIr.js → c4Diagram-LMCZKHZV-CMY3o7XE.js} +1 -1
- package/dist/web/assets/channel-BE7FnnNv.js +1 -0
- package/dist/web/assets/chevron-up-C3_IR2td.js +1 -0
- package/dist/web/assets/{chunk-2Q5K7J3B-D2B_BdaG.js → chunk-2Q5K7J3B-Brbuto5C.js} +1 -1
- package/dist/web/assets/{chunk-32BRIVSS-B93XkYif.js → chunk-32BRIVSS-BGCuhDXk.js} +1 -1
- package/dist/web/assets/{chunk-5VM5RSS4-Uv1D4oA2.js → chunk-5VM5RSS4-D85xFHwk.js} +1 -1
- package/dist/web/assets/{chunk-EX3LRPZG-xZrFFOcj.js → chunk-EX3LRPZG-W6U7GsD7.js} +1 -1
- package/dist/web/assets/{chunk-JWPE2WC7-1--FpPFR.js → chunk-JWPE2WC7-CKdx8e0r.js} +1 -1
- package/dist/web/assets/{chunk-MOJQB5TN-BLOL5fhw.js → chunk-MOJQB5TN-Cjf1dDyf.js} +1 -1
- package/dist/web/assets/{chunk-RYQCIY6F-z7wmcSRp.js → chunk-RYQCIY6F-DFxqNYlG.js} +1 -1
- package/dist/web/assets/{chunk-V7JOEXUC-DPvobQwd.js → chunk-V7JOEXUC-lwXYy3Zq.js} +1 -1
- package/dist/web/assets/{chunk-VR4S4FIN-DD3Gj91z.js → chunk-VR4S4FIN-BxiP-OR0.js} +1 -1
- package/dist/web/assets/{chunk-XXDRQBXY-DoVRk31D.js → chunk-XXDRQBXY-BhED1rK6.js} +1 -1
- package/dist/web/assets/classDiagram-OUVF2IWQ-C0-VAw-b.js +1 -0
- package/dist/web/assets/classDiagram-v2-EOCWNBFH-C0-VAw-b.js +1 -0
- package/dist/web/assets/{clsx-DoZLeicy.js → clsx-Dy3K9oBb.js} +1 -1
- package/dist/web/assets/{collectMessageImages-B2EAkrhU.js → collectMessageImages-DEnoDhBs.js} +1 -1
- package/dist/web/assets/composerOptions-0DZvXA1-.js +1 -0
- package/dist/web/assets/{cose-bilkent-JH36ORCC-BQknAy25.js → cose-bilkent-JH36ORCC-DC9M3QOS.js} +1 -1
- package/dist/web/assets/{cynefin-VYW2F7L2-09uNSfvT.js → cynefin-VYW2F7L2-D1LRWQeS.js} +1 -1
- package/dist/web/assets/{cynefinDiagram-TSTJHNR4-CgKhj0m5.js → cynefinDiagram-TSTJHNR4-BJvzO8nK.js} +1 -1
- package/dist/web/assets/{dagre-VKFMJZFB-CLCxvrOo.js → dagre-VKFMJZFB-u4EU1mWb.js} +1 -1
- package/dist/web/assets/{diagram-FQU43EPY-B4VfNgsF.js → diagram-FQU43EPY-DfvPNd6F.js} +1 -1
- package/dist/web/assets/{diagram-G47NLZAW-CQC0I6zX.js → diagram-G47NLZAW-DlJwWs1J.js} +1 -1
- package/dist/web/assets/{diagram-NH7WQ7WH-CSBbTiMh.js → diagram-NH7WQ7WH-DcgpOjQV.js} +1 -1
- package/dist/web/assets/{diagram-OA4YK3LP-CkUx0v34.js → diagram-OA4YK3LP-BrNCuljO.js} +1 -1
- package/dist/web/assets/{diagram-WEI45ONY-dlEY_W2R.js → diagram-WEI45ONY-DxT28KUR.js} +1 -1
- package/dist/web/assets/{ebnfDiagram-CCIWWBDH-BsxdwE2E.js → ebnfDiagram-CCIWWBDH-FD63emzf.js} +1 -1
- package/dist/web/assets/{erDiagram-Q63AITRT-CE8BUsrY.js → erDiagram-Q63AITRT-COEH4rgh.js} +1 -1
- package/dist/web/assets/{file-editor-FileCodeEditor-HR6Wsm5I.js → file-editor-FileCodeEditor-B0qv9YKs.js} +2 -2
- package/dist/web/assets/{file-editor-ObsidianCodeEditor-BMcU5Aqo.js → file-editor-ObsidianCodeEditor-q_YWJSDk.js} +1 -1
- package/dist/web/assets/file-editor-ObsidianFileEditor-bdzeuwke.js +2 -0
- package/dist/web/assets/{file-editor-index-BXupf89-.js → file-editor-index-B6XepRuc.js} +1 -1
- package/dist/web/assets/{file-editor-index-DuqNWTkz.js → file-editor-index-BUPn4zC8.js} +1 -1
- package/dist/web/assets/{file-editor-index-Dc4mA3Mx.js → file-editor-index-BmcxkKR_.js} +1 -1
- package/dist/web/assets/{file-editor-index-ORJkxheE.js → file-editor-index-C-sivrT3.js} +1 -1
- package/dist/web/assets/{file-editor-index-D3hWXNQc.js → file-editor-index-C8hW6Muj.js} +1 -1
- package/dist/web/assets/{file-editor-index-CP7DVsyc.js → file-editor-index-CthnNAMC.js} +1 -1
- package/dist/web/assets/{file-editor-index-Ce_Hrot9.js → file-editor-index-DOP_6x0k.js} +1 -1
- package/dist/web/assets/{file-editor-index-BEhJJ-2S.js → file-editor-index-Db8cbNln.js} +1 -1
- package/dist/web/assets/{file-editor-index-CIj8OyuX.js → file-editor-index-Dg5e3Cpy.js} +1 -1
- package/dist/web/assets/{file-editor-index-DX8Fwz0S.js → file-editor-index-DqKTONJ4.js} +1 -1
- package/dist/web/assets/{file-editor-index-CrvkFqLZ.js → file-editor-index-JhH0nqee.js} +1 -1
- package/dist/web/assets/{file-editor-index-7BDUBERb.js → file-editor-index-WDJmssCC.js} +1 -1
- package/dist/web/assets/{file-editor-index-DL4CfMoo.js → file-editor-index-YBbEVrxT.js} +1 -1
- package/dist/web/assets/{flowDiagram-23GEKE2U-DUiI830l.js → flowDiagram-23GEKE2U-kWBomx5I.js} +1 -1
- package/dist/web/assets/{folder-plus-Byi2WQUY.js → folder-plus-ChLrua3z.js} +1 -1
- package/dist/web/assets/ganttDiagram-NO4QXBWP-bd158wNu.js +1 -0
- package/dist/web/assets/{gitGraphDiagram-IHSO6WYX-BJA7zQjW.js → gitGraphDiagram-IHSO6WYX-BsWMZB1T.js} +1 -1
- package/dist/web/assets/{highlighted-body-TPN3WLV5-lW0JmP5H.js → highlighted-body-TPN3WLV5-BcvTxHra.js} +1 -1
- package/dist/web/assets/index-kcB9N5v8.js +2 -0
- package/dist/web/assets/{infoDiagram-FWYZ7A6U-BfA2fWjL.js → infoDiagram-FWYZ7A6U-DtvGyYt0.js} +1 -1
- package/dist/web/assets/{ishikawaDiagram-FXEZZL3T-B7WW0j7E.js → ishikawaDiagram-FXEZZL3T-CHsj8iVR.js} +1 -1
- package/dist/web/assets/{journeyDiagram-5HDEW3XC-BEMtGLhR.js → journeyDiagram-5HDEW3XC-Ben3XW9L.js} +1 -1
- package/dist/web/assets/{kanban-definition-HUTT4EX6-DqIkrGPA.js → kanban-definition-HUTT4EX6-w1H0lvRK.js} +1 -1
- package/dist/web/assets/{key-round-y1oxWXOB.js → key-round-Csanuqei.js} +1 -1
- package/dist/web/assets/{layout-CAp4KseL.js → layout-DvVF2R1Q.js} +1 -1
- package/dist/web/assets/{linear-DRFQGBEA.js → linear-CYqpDCXS.js} +1 -1
- package/dist/web/assets/{map-XtUTTYLw.js → map-yP9qyz-l.js} +1 -1
- package/dist/web/assets/{mermaid-O7DHMXV3-9HC6mORt.js → mermaid-O7DHMXV3-DUoHFycq.js} +2 -2
- package/dist/web/assets/{mermaid-O7DHMXV3-DHmcgJGk.css → mermaid-O7DHMXV3-rMhXRrUE.css} +1 -1
- package/dist/web/assets/{mermaid.core-LEKKQwXZ.js → mermaid.core-CSuHyCbU.js} +2 -2
- package/dist/web/assets/{mic-BOKcmdUn.js → mic-D6yq4BVC.js} +1 -1
- package/dist/web/assets/{mindmap-definition-LN4V7U3C-Bt6LtGWO.js → mindmap-definition-LN4V7U3C-BariZ1mC.js} +1 -1
- package/dist/web/assets/newSessionDefaults-DY7-PuSf.js +1 -0
- package/dist/web/assets/pegDiagram-2B236MQR-DsjvsiG-.js +1 -0
- package/dist/web/assets/{pieDiagram-ENE6RG2P-CeQnXIl7.js → pieDiagram-ENE6RG2P-CVDkx6T3.js} +1 -1
- package/dist/web/assets/{quadrantDiagram-ABIIQ3AL-DNGl4Hse.js → quadrantDiagram-ABIIQ3AL-CZfhv8B5.js} +1 -1
- package/dist/web/assets/{railroadDiagram-RFXS5EU6-BiFr0x3V.js → railroadDiagram-RFXS5EU6-DPiV-o4k.js} +1 -1
- package/dist/web/assets/{requirementDiagram-TGXJPOKE-DIx4dpS7.js → requirementDiagram-TGXJPOKE-ifd3KNkN.js} +1 -1
- package/dist/web/assets/{sankeyDiagram-HTMAVEWB-D_zRhmQ_.js → sankeyDiagram-HTMAVEWB-BTgBAMv9.js} +1 -1
- package/dist/web/assets/{sequenceDiagram-DBY2YBRQ-ChMRMmPd.js → sequenceDiagram-DBY2YBRQ-6-7v8n8u.js} +1 -1
- package/dist/web/assets/{sizeCapture-X5ZJPWSS-CLVxFMDT.js → sizeCapture-X5ZJPWSS-BRFGoPEh.js} +1 -1
- package/dist/web/assets/{square-K9kFBDil.js → square-Dl4fOYPP.js} +1 -1
- package/dist/web/assets/{stateDiagram-2N3HPSRC-Dn7yCHtf.js → stateDiagram-2N3HPSRC-BBiXuN7R.js} +1 -1
- package/dist/web/assets/stateDiagram-v2-6OUMAXLB-DRJJe0JN.js +1 -0
- package/dist/web/assets/{swimlanes-5IMT3BWC-Dhut6RY-.js → swimlanes-5IMT3BWC-C40_UKFy.js} +2 -2
- package/dist/web/assets/swimlanesDiagram-G3AALYLV-DEaTTKbV.js +1 -0
- package/dist/web/assets/{timeline-definition-FHXFAJF6-D_9aY3SL.js → timeline-definition-FHXFAJF6-cuYaryrF.js} +1 -1
- package/dist/web/assets/useComposerCompletion-DBl1CTPC.js +1 -0
- package/dist/web/assets/{vennDiagram-L72KCM5P-Bxsjs1td.js → vennDiagram-L72KCM5P-BjSt5IQl.js} +1 -1
- package/dist/web/assets/{wardleyDiagram-EHGQE667-B8vO0orG.js → wardleyDiagram-EHGQE667-DAJYQgOm.js} +1 -1
- package/dist/web/assets/{xychartDiagram-FW5EYKEG-CUBLdGVB.js → xychartDiagram-FW5EYKEG-DwQxHkEv.js} +1 -1
- package/dist/web/assets/zap-D3JafXHq.js +1 -0
- package/dist/web/index.html +1 -1
- package/dist/web/obsidian-editor-assets.json +1 -1
- package/package.json +1 -1
- package/dist/web/assets/App-CqANyaMK.css +0 -97
- package/dist/web/assets/App-gwVbOIB1.js +0 -2
- package/dist/web/assets/ChatPane-fH0IY48w.js +0 -1
- package/dist/web/assets/ComposerMenus-DhMX49q9.js +0 -1
- package/dist/web/assets/FilesControlPanel-Bz4i0bf2.js +0 -1
- package/dist/web/assets/GlobalPendingDialog-tews3DVC.js +0 -1
- package/dist/web/assets/InteractionPolish-Nkww8pqM.css +0 -1
- package/dist/web/assets/NewSessionDialog-CsOHExrY.js +0 -1
- package/dist/web/assets/RemoteWorkspaceSettings-7jz8oX59.css +0 -1
- package/dist/web/assets/RemoteWorkspaceSettings-tDqbDqj4.js +0 -1
- package/dist/web/assets/_baseMerge-YHvLFG89.js +0 -1
- package/dist/web/assets/arc-BYAxnPQ_.js +0 -1
- package/dist/web/assets/channel-DpGkajT1.js +0 -1
- package/dist/web/assets/chevron-up-DfL2d5fV.js +0 -1
- package/dist/web/assets/classDiagram-OUVF2IWQ-oZMIKKng.js +0 -1
- package/dist/web/assets/classDiagram-v2-EOCWNBFH-oZMIKKng.js +0 -1
- package/dist/web/assets/file-editor-ObsidianFileEditor-BuzsfQwA.js +0 -2
- package/dist/web/assets/ganttDiagram-NO4QXBWP-x0WR7K4r.js +0 -1
- package/dist/web/assets/index-c9Eb0rEZ.js +0 -2
- package/dist/web/assets/pegDiagram-2B236MQR-DVdodUA1.js +0 -1
- package/dist/web/assets/shield-check-DM9poYLJ.js +0 -1
- package/dist/web/assets/stateDiagram-v2-6OUMAXLB-DkgnQPrP.js +0 -1
- package/dist/web/assets/swimlanesDiagram-G3AALYLV-D62G5R34.js +0 -1
- package/dist/web/assets/useComposerCompletion-DcHhaHlX.js +0 -1
- package/dist/web/assets/zap-4rbaTb6R.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{I as t}from"./chunk-2Q5K7J3B-D2B_BdaG.js";import{p as r}from"./chunk-JWPE2WC7-1--FpPFR.js";import{_ as e,p as o,o as n,s as a,g as s,a as i,b as c,z as d,l as h,d as $,c as m,y as l,A as g,q as p,k as y,B as f,D as x,E as u}from"./mermaid.core-LEKKQwXZ.js";import{p as b}from"./cynefin-VYW2F7L2-09uNSfvT.js";import"./index-c9Eb0rEZ.js";import"./RemoteLifeOSBlock-CZkQLmE5.js";import"./index-S4bzeLfy.js";import"./index-8TM1eFHE.js";import"./file-editor-CodeHighlight-aQ9kP3Wv.js";import"./App-gwVbOIB1.js";import"./square-K9kFBDil.js";import"./chevron-up-DfL2d5fV.js";import"./__vite-browser-external-2447137e-Dbwxx6PZ.js";import"./purify.es-BNLkGfTg.js";import"./marked.esm-BBjA1da9.js";var w={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},k=x.gitGraph,B=e(()=>f({...k,...d().gitGraph}),"getConfig"),E=new t(()=>{const t=B(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function C(){return u({length:7})}function L(t,r){const e=Object.create(null);return t.reduce((t,o)=>{const n=r(o);return e[n]||(e[n]=!0,t.push(o)),t},[])}e(C,"getID"),e(L,"uniqBy");var T=e(function(t){E.records.direction=t},"setDirection"),M=e(function(t){h.debug("options str",t),t=t?.trim(),t=t||"{}";try{E.records.options=JSON.parse(t)}catch(r){h.error("error while parsing gitGraph options",r.message)}},"setOptions"),v=e(function(){return E.records.options},"getOptions"),I=e(function(t){let r=t.msg,e=t.id;const o=t.type;let n=t.tags;h.info("commit",r,e,o,n),h.debug("Entering commit:",r,e,o,n);const a=B();e=y.sanitizeText(e,a),r=y.sanitizeText(r,a),n=n?.map(t=>y.sanitizeText(t,a));const s={id:e||E.records.seq+"-"+C(),message:r,seq:E.records.seq++,type:o??w.NORMAL,tags:n??[],parents:null==E.records.head?[]:[E.records.head.id],branch:E.records.currBranch};E.records.head=s,h.info("main branch",a.mainBranchName),E.records.commits.has(s.id)&&h.warn(`Commit ID ${s.id} already exists`),E.records.commits.set(s.id,s),E.records.branches.set(E.records.currBranch,s.id),h.debug("in pushCommit "+s.id)},"commit"),R=e(function(t){let r=t.name;const e=t.order;if(r=y.sanitizeText(r,B()),E.records.branches.has(r))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 ${r}")`);E.records.branches.set(r,null!=E.records.head?E.records.head.id:null),E.records.branchConfig.set(r,{name:r,order:e}),A(r),h.debug("in createBranch")},"branch"),P=e(t=>{let r=t.branch,e=t.id;const o=t.type,n=t.tags,a=B();r=y.sanitizeText(r,a),e&&(e=y.sanitizeText(e,a));const s=E.records.branches.get(E.records.currBranch),i=E.records.branches.get(r),c=s?E.records.commits.get(s):void 0,d=i?E.records.commits.get(i):void 0;if(c&&d&&c.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(E.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===c||!c){const t=new Error(`Incorrect usage of "merge". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!E.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===d||!d){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if(c===d){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&E.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom id");throw t.hash={text:`merge ${r} ${e} ${o} ${n?.join(" ")}`,token:`merge ${r} ${e} ${o} ${n?.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${o} ${n?.join(" ")}`]},t}const $=i||"",m={id:e||`${E.records.seq}-${C()}`,message:`merged branch ${r} into ${E.records.currBranch}`,seq:E.records.seq++,parents:null==E.records.head?[]:[E.records.head.id,$],branch:E.records.currBranch,type:w.MERGE,customType:o,customId:!!e,tags:n??[]};E.records.head=m,E.records.commits.set(m.id,m),E.records.branches.set(E.records.currBranch,m.id),h.debug(E.records.branches),h.debug("in mergeBranch")},"merge"),O=e(function(t){let r=t.id,e=t.targetId,o=t.tags,n=t.parent;h.debug("Entering cherryPick:",r,e,o);const a=B();if(r=y.sanitizeText(r,a),e=y.sanitizeText(e,a),o=o?.map(t=>y.sanitizeText(t,a)),n=y.sanitizeText(n,a),!r||!E.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const s=E.records.commits.get(r);if(void 0===s||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(s.parents)||!s.parents.includes(n)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const i=s.branch;if(s.type===w.MERGE&&!n)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!e||!E.records.commits.has(e)){if(i===E.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=E.records.branches.get(E.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=E.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const c={id:E.records.seq+"-"+C(),message:`cherry-picked ${s?.message} into ${E.records.currBranch}`,seq:E.records.seq++,parents:null==E.records.head?[]:[E.records.head.id,s.id],branch:E.records.currBranch,type:w.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${s.id}${s.type===w.MERGE?`|parent:${n}`:""}`]};E.records.head=c,E.records.commits.set(c.id,c),E.records.branches.set(E.records.currBranch,c.id),h.debug(E.records.branches),h.debug("in cherryPick")}},"cherryPick"),A=e(function(t){if(t=y.sanitizeText(t,B()),!E.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{E.records.currBranch=t;const r=E.records.branches.get(E.records.currBranch);E.records.head=void 0!==r&&r?E.records.commits.get(r)??null:null}},"checkout");function G(t,r,e){const o=t.indexOf(r);-1===o?t.push(e):t.splice(o,1,e)}function S(t){const r=t.reduce((t,r)=>t.seq>r.seq?t:r,t[0]);let e="";t.forEach(function(t){e+=t===r?"\t*":"\t|"});const o=[e,r.id,r.seq];for(const n in E.records.branches)E.records.branches.get(n)===r.id&&o.push(n);if(h.debug(o.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=E.records.commits.get(r.parents[0]);G(t,r,e),r.parents[1]&&t.push(E.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=E.records.commits.get(r.parents[0]);G(t,r,e)}}S(t=L(t,t=>t.id))}e(G,"upsert"),e(S,"prettyPrintCommitHistory");var W=e(function(){h.debug(E.records.commits),S([z()[0]])},"prettyPrint"),H=e(function(){E.reset(),p()},"clear"),j=e(function(){return[...E.records.branchConfig.values()].map((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),q=e(function(){return E.records.branches},"getBranches"),_=e(function(){return E.records.commits},"getCommits"),z=e(function(){const t=[...E.records.commits.values()];return t.forEach(function(t){h.debug(t.id)}),t.sort((t,r)=>t.seq-r.seq),t},"getCommitsArray"),D={commitType:w,getConfig:B,setDirection:T,setOptions:M,getOptions:v,commit:I,branch:R,merge:P,cherryPick:O,checkout:A,prettyPrint:W,clear:H,getBranchesAsObjArray:j,getBranches:q,getCommits:_,getCommitsArray:z,getCurrentBranch:e(function(){return E.records.currBranch},"getCurrentBranch"),getDirection:e(function(){return E.records.direction},"getDirection"),getHead:e(function(){return E.records.head},"getHead"),setAccTitle:c,getAccTitle:i,getAccDescription:s,setAccDescription:a,setDiagramTitle:n,getDiagramTitle:o},F=e((t,e)=>{r(t,e),t.dir&&e.setDirection(t.dir);for(const r of t.statements)N(r,e)},"populate"),N=e((t,r)=>{const o={Commit:e(t=>r.commit(K(t)),"Commit"),Branch:e(t=>r.branch(V(t)),"Branch"),Merge:e(t=>r.merge(Y(t)),"Merge"),Checkout:e(t=>r.checkout(U(t)),"Checkout"),CherryPicking:e(t=>r.cherryPick(J(t)),"CherryPicking")}[t.$type];o?o(t):h.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),K=e(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?w[t.type]:w.NORMAL,tags:t.tags??void 0}),"parseCommit"),V=e(t=>({name:t.name,order:t.order??0}),"parseBranch"),Y=e(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?w[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),U=e(t=>t.branch,"parseCheckout"),J=e(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),Q={parse:e(async t=>{const r=await b("gitGraph",t);h.debug(r),F(r,D)},"parse")},X=10,Z=40,tt=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),rt=new Set(["redux-color","redux-dark-color"]),et=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),ot=e((t,r,e=!1)=>e&&t>0?(t-1)%(r-1)+1:t%r,"calcColorIndex"),nt=new Map,at=new Map,st=new Map,it=[],ct=0,dt="LR",ht=e(()=>{nt.clear(),at.clear(),st.clear(),ct=0,it=[],dt="LR"},"clear"),$t=e(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),mt=e(t=>{let r,o,n;return"BT"===dt?(o=e((t,r)=>t<=r,"comparisonFunc"),n=1/0):(o=e((t,r)=>t>=r,"comparisonFunc"),n=0),t.forEach(t=>{const e="TB"===dt||"BT"==dt?at.get(t)?.y:at.get(t)?.x;void 0!==e&&o(e,n)&&(r=t,n=e)}),r},"findClosestParent"),lt=e(t=>{let r="",e=1/0;return t.forEach(t=>{const o=at.get(t).y;o<=e&&(r=t,e=o)}),r||void 0},"findClosestParentBT"),gt=e((t,r,e)=>{let o=e,n=e;const a=[];t.forEach(t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(o=yt(e),n=Math.max(o,n)):a.push(e),ft(e,o)}),o=n,a.forEach(t=>{xt(t,o,e)}),t.forEach(t=>{const e=r.get(t);if(e?.parents.length){const t=lt(e.parents);o=at.get(t).y-Z,o<=n&&(n=o);const r=nt.get(e.branch).pos,a=o-X;at.set(e.id,{x:r,y:a})}})},"setParallelBTPos"),pt=e(t=>{const r=mt(t.parents.filter(t=>null!==t));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const e=at.get(r)?.y;if(void 0===e)throw new Error(`Closest parent position not found for commit ${t.id}`);return e},"findClosestParentPos"),yt=e(t=>pt(t)+Z,"calculateCommitPosition"),ft=e((t,r)=>{const e=nt.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const o=e.pos,n=r+X;return at.set(t.id,{x:o,y:n}),{x:o,y:n}},"setCommitPosition"),xt=e((t,r,e)=>{const o=nt.get(t.branch);if(!o)throw new Error(`Branch not found for commit ${t.id}`);const n=r+e,a=o.pos;at.set(t.id,{x:a,y:n})},"setRootPosition"),ut=e((t,r,e,o,n,a)=>{const{theme:s}=m(),i=tt.has(s??""),c=rt.has(s??""),d=et.has(s??"");if(a===w.HIGHLIGHT)t.append("rect").attr("x",e.x-10+(i?3:0)).attr("y",e.y-10+(i?3:0)).attr("width",i?14:20).attr("height",i?14:20).attr("class",`commit ${r.id} commit-highlight${ot(n,8,c)} ${o}-outer`),t.append("rect").attr("x",e.x-6+(i?2:0)).attr("y",e.y-6+(i?2:0)).attr("width",i?8:12).attr("height",i?8:12).attr("class",`commit ${r.id} commit${ot(n,8,c)} ${o}-inner`);else if(a===w.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",i?7:10).attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",i?2.5:2.75).attr("fill",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",i?2.5:2.75).attr("fill",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const s=t.append("circle");if(s.attr("cx",e.x),s.attr("cy",e.y),s.attr("r",i?7:10),s.attr("class",`commit ${r.id} commit${ot(n,8,c)}`),a===w.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",i?5:6),a.attr("class",`commit ${o} ${r.id} commit${ot(n,8,c)}`)}if(a===w.REVERSE){const a=i?4:5;t.append("path").attr("d",`M ${e.x-a},${e.y-a}L${e.x+a},${e.y+a}M${e.x-a},${e.y+a}L${e.x+a},${e.y-a}`).attr("class",`commit ${o} ${r.id} commit${ot(n,8,c)}`)}}},"drawCommitBullet"),bt=e((t,r,e,o,n)=>{if(r.type!==w.CHERRY_PICK&&(r.customId&&r.type===w.MERGE||r.type!==w.MERGE)&&n.showCommitLabel){const a=t.append("g"),s=a.insert("rect").attr("class","commit-label-bkg"),i=a.append("text").attr("x",o).attr("y",e.y+25).attr("class","commit-label").text(r.id),c=i.node()?.getBBox();if(c&&(s.attr("x",e.posWithOffset-c.width/2-2).attr("y",e.y+13.5).attr("width",c.width+4).attr("height",c.height+4),"TB"===dt||"BT"===dt?(s.attr("x",e.x-(c.width+16+5)).attr("y",e.y-12),i.attr("x",e.x-(c.width+16)).attr("y",e.y+c.height-12)):i.attr("x",e.posWithOffset-c.width/2),n.rotateCommitLabel))if("TB"===dt||"BT"===dt)i.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),s.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(c.width+10)/25*9.5,r=10+c.width/25*8.5;a.attr("transform","translate("+t+", "+r+") rotate(-45, "+o+", "+e.y+")")}}},"drawCommitLabel"),wt=e((t,r,e,o)=>{if(r.tags.length>0){let n=0,a=0,s=0;const i=[];for(const o of r.tags.reverse()){const r=t.insert("polygon"),c=t.append("circle"),d=t.append("text").attr("y",e.y-16-n).attr("class","tag-label").text(o),h=d.node()?.getBBox();if(!h)throw new Error("Tag bbox not found");a=Math.max(a,h.width),s=Math.max(s,h.height),d.attr("x",e.posWithOffset-h.width/2),i.push({tag:d,hole:c,rect:r,yOffset:n}),n+=20}for(const{tag:t,hole:r,rect:c,yOffset:d}of i){const n=s/2,i=e.y-19.2-d;if(c.attr("class","tag-label-bkg").attr("points",`\n ${o-a/2-2},${i+2} \n ${o-a/2-2},${i-2}\n ${e.posWithOffset-a/2-4},${i-n-2}\n ${e.posWithOffset+a/2+4},${i-n-2}\n ${e.posWithOffset+a/2+4},${i+n+2}\n ${e.posWithOffset-a/2-4},${i+n+2}`),r.attr("cy",i).attr("cx",o-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===dt||"BT"===dt){const s=o+d;c.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${s+2}\n ${e.x},${s-2}\n ${e.x+X},${s-n-2}\n ${e.x+X+a+4},${s-n-2}\n ${e.x+X+a+4},${s+n+2}\n ${e.x+X},${s+n+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),r.attr("cx",e.x+2).attr("cy",s).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),t.attr("x",e.x+5).attr("y",s+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+o+")")}}}},"drawCommitTags"),kt=e(t=>{switch(t.customType??t.type){case w.NORMAL:return"commit-normal";case w.REVERSE:return"commit-reverse";case w.HIGHLIGHT:return"commit-highlight";case w.MERGE:return"commit-merge";case w.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Bt=e((t,r,e,o)=>{const n={x:0,y:0};if(!(t.parents.length>0))return"TB"===r?30:"BT"===r?(o.get(t.id)??n).y-Z:0;{const e=mt(t.parents);if(e){const a=o.get(e)??n;return"TB"===r?a.y+Z:"BT"===r?(o.get(t.id)??n).y-Z:a.x+Z}}return 0},"calculatePosition"),Et=e((t,r,e)=>{const o="BT"===dt&&e?r:r+X,n=nt.get(t.branch)?.pos,a="TB"===dt||"BT"===dt?nt.get(t.branch)?.pos:o;if(void 0===a||void 0===n)throw new Error(`Position were undefined for commit ${t.id}`);const s=tt.has(m().theme??"");return{x:a,y:"TB"===dt||"BT"===dt?o:n+(s?7:-2),posWithOffset:o}},"getCommitPosition"),Ct=e((t,r,o,n)=>{const a=t.append("g").attr("class","commit-bullets"),s=t.append("g").attr("class","commit-labels");let i="TB"===dt||"BT"===dt?30:0;const c=[...r.keys()],d=n.parallelCommits??!1,h=e((t,e)=>{const o=r.get(t)?.seq,n=r.get(e)?.seq;return void 0!==o&&void 0!==n?o-n:0},"sortKeys");let $=c.sort(h);"BT"===dt&&(d&>($,r,i),$=$.reverse()),$.forEach(t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);d&&(i=Bt(e,dt,i,at));const c=Et(e,i,d);if(o){const t=kt(e),r=e.customType??e.type,o=nt.get(e.branch)?.index??0;ut(a,e,c,t,o,r),bt(s,e,c,i,n),wt(s,e,c,i)}"TB"===dt||"BT"===dt?at.set(e.id,{x:c.x,y:c.posWithOffset}):at.set(e.id,{x:c.posWithOffset,y:c.y}),i="BT"===dt&&d?i+Z:i+Z+X,i>ct&&(ct=i)})},"drawCommits"),Lt=e((t,r,o,n,a)=>{const s=("TB"===dt||"BT"===dt?o.x<n.x:o.y<n.y)?r.branch:t.branch,i=e(t=>t.branch===s,"isOnBranchToGetCurve"),c=e(e=>e.seq>t.seq&&e.seq<r.seq,"isBetweenCommits");return[...a.values()].some(t=>c(t)&&i(t))},"shouldRerouteArrow"),Tt=e((t,r,e=0)=>{const o=t+Math.abs(t-r)/2;if(e>5)return o;if(it.every(t=>Math.abs(t-o)>=10))return it.push(o),o;const n=Math.abs(t-r);return Tt(t,r-n/5,e+1)},"findLane"),Mt=e((t,r,e,o)=>{const{theme:n}=m(),a=rt.has(n??""),s=at.get(r.id),i=at.get(e.id);if(void 0===s||void 0===i)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const c=Lt(r,e,s,i,o);let d,h="",$="",l=0,g=0,p=nt.get(e.branch)?.index;if(e.type===w.MERGE&&r.id!==e.parents[0]&&(p=nt.get(r.branch)?.index),c){h="A 10 10, 0, 0, 0,",$="A 10 10, 0, 0, 1,",l=10,g=10;const t=s.y<i.y?Tt(s.y,i.y):Tt(i.y,s.y),e=s.x<i.x?Tt(s.x,i.x):Tt(i.x,s.x);"TB"===dt?s.x<i.x?d=`M ${s.x} ${s.y} L ${e-l} ${s.y} ${$} ${e} ${s.y+g} L ${e} ${i.y-l} ${h} ${e+g} ${i.y} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${e+l} ${s.y} ${h} ${e} ${s.y+g} L ${e} ${i.y-l} ${$} ${e-g} ${i.y} L ${i.x} ${i.y}`):"BT"===dt?s.x<i.x?d=`M ${s.x} ${s.y} L ${e-l} ${s.y} ${h} ${e} ${s.y-g} L ${e} ${i.y+l} ${$} ${e+g} ${i.y} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${e+l} ${s.y} ${$} ${e} ${s.y-g} L ${e} ${i.y+l} ${h} ${e-g} ${i.y} L ${i.x} ${i.y}`):s.y<i.y?d=`M ${s.x} ${s.y} L ${s.x} ${t-l} ${h} ${s.x+g} ${t} L ${i.x-l} ${t} ${$} ${i.x} ${t+g} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${s.x} ${t+l} ${$} ${s.x+g} ${t} L ${i.x-l} ${t} ${h} ${i.x} ${t-g} L ${i.x} ${i.y}`)}else h="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,g=20,"TB"===dt?(s.x<i.x&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${h} ${s.x+g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${$} ${i.x} ${s.y+g} L ${i.x} ${i.y}`),s.x>i.x&&(h="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,g=20,d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${$} ${s.x-g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x+l} ${s.y} ${h} ${i.x} ${s.y+g} L ${i.x} ${i.y}`),s.x===i.x&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`)):"BT"===dt?(s.x<i.x&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${$} ${s.x+g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${h} ${i.x} ${s.y-g} L ${i.x} ${i.y}`),s.x>i.x&&(h="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,g=20,d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${h} ${s.x-g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x+l} ${s.y} ${$} ${i.x} ${s.y-g} L ${i.x} ${i.y}`),s.x===i.x&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`)):(s.y<i.y&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${$} ${i.x} ${s.y+g} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${h} ${s.x+g} ${i.y} L ${i.x} ${i.y}`),s.y>i.y&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${h} ${i.x} ${s.y-g} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${$} ${s.x+g} ${i.y} L ${i.x} ${i.y}`),s.y===i.y&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`));if(void 0===d)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+ot(p,8,a))},"drawArrow"),vt=e((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{const o=r.get(t);o.parents&&o.parents.length>0&&o.parents.forEach(t=>{Mt(e,r.get(t),o,r)})})},"drawArrows"),It=e((t,r,e,o)=>{const{look:n,theme:a,themeVariables:s}=m(),{dropShadow:i,THEME_COLOR_LIMIT:c}=s,d=tt.has(a??""),h=rt.has(a??""),$=t.append("g");r.forEach((t,r)=>{const a=ot(r,d?c:8,h),s=nt.get(t.name)?.pos;if(void 0===s)throw new Error(`Position not found for branch ${t.name}`);const m="TB"===dt||"BT"===dt?s:d?s+6+1:s-2,l=$.append("line");l.attr("x1",0),l.attr("y1",m),l.attr("x2",ct),l.attr("y2",m),l.attr("class","branch branch"+a),"TB"===dt?(l.attr("y1",30),l.attr("x1",s),l.attr("y2",ct),l.attr("x2",s)):"BT"===dt&&(l.attr("y1",ct),l.attr("x1",s),l.attr("y2",30),l.attr("x2",s)),it.push(m);const g=t.name,p=$t(g),y=$.insert("rect"),f=$.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);f.node().appendChild(p);const x=p.getBBox(),u=d?0:4,b=d?16:0,w=d?12:0;"neo"===n&&y.attr("data-look","neo"),y.attr("class","branchLabelBkg label"+a).attr("style","neo"===n?`filter:${d?`url(#${o}-drop-shadow)`:i}`:"").attr("rx",u).attr("ry",u).attr("x",-x.width-4-(!0===e.rotateCommitLabel?30:0)).attr("y",-x.height/2+10).attr("width",x.width+18+b).attr("height",x.height+4+w),f.attr("transform","translate("+(-x.width-14-(!0===e.rotateCommitLabel?30:0)+b/2)+", "+(m-x.height/2-2)+")"),"TB"===dt?(y.attr("x",s-x.width/2-10).attr("y",0),f.attr("transform","translate("+(s-x.width/2-5)+", 0)"),d&&(y.attr("transform",`translate(${-b/2-3}, ${-w-10})`),f.attr("transform","translate("+(s-x.width/2-5)+", "+(2*-w+7)+")"))):"BT"===dt?(y.attr("x",s-x.width/2-10).attr("y",ct),f.attr("transform","translate("+(s-x.width/2-5)+", "+ct+")"),d&&(y.attr("transform",`translate(${-b/2-3}, ${w+10})`),f.attr("transform","translate("+(s-x.width/2-5)+", "+(ct+2*w+4)+")"))):y.attr("transform","translate(-19, "+(m-12-w/2)+")")})},"drawBranches"),Rt=e(function(t,r,e,o,n){return nt.set(t,{pos:r,index:e}),r+(50+(n?40:0)+("TB"===dt||"BT"===dt?o.width/2:0))},"setBranchPosition"),Pt={draw:e(function(t,r,e,o){ht(),h.debug("in gitgraph renderer",t+"\n","id:",r,e);const n=o.db;if(!n.getConfig)return void h.error("getConfig method is not available on db");const a=n.getConfig(),s=a.rotateCommitLabel??!1;st=n.getCommits();const i=n.getBranchesAsObjArray();dt=n.getDirection();const c=$(`[id="${r}"]`),{look:d,theme:p,themeVariables:y}=m(),{useGradient:f,gradientStart:x,gradientStop:u,filterColor:b}=y;if(f){const t=c.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}"neo"===d&&tt.has(p??"")&&c.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",b);let w=0;i.forEach((t,r)=>{const e=$t(t.name),o=c.append("g"),n=o.insert("g").attr("class","branchLabel"),a=n.insert("g").attr("class","label branch-label");a.node()?.appendChild(e);const i=e.getBBox();w=Rt(t.name,w,r,i,s),a.remove(),n.remove(),o.remove()}),Ct(c,st,!1,a),a.showBranches&&It(c,i,a,r),vt(c,st),Ct(c,st,!0,a),l.insertTitle(c,"gitTitleText",a.titleTopMargin??0,n.getDiagramTitle()),g(void 0,c,a.diagramPadding,a.useMaxWidth)},"draw")},Ot=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),At=new Set(["redux-color","redux-dark-color"]),Gt=new Set(["neo","neo-dark"]),St=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Wt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),Ht=e(t=>{const{svgId:r}=t;let e="";if(t.useGradient&&r)for(let o=0;o<t.THEME_COLOR_LIMIT;o++)e+=`\n .label${o} { fill: ${t.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${t.strokeWidth};}\n `;return e},"genGitGraphGradient"),jt=e(t=>{const r=d(),{theme:e,themeVariables:o}=r,{borderColorArray:n}=o,a=Ot.has(e);if(Gt.has(e)){let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)if(0===e)r+=`\n .branch-label${e} { fill: ${t.nodeBorder};}\n .commit${e} { stroke: ${t.nodeBorder}; }\n .commit-highlight${e} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }\n .arrow${e} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n .commit-cherry-pick${e} { stroke: ${t.nodeBorder}; }\n ${Ht(t)}`;else{const o=e%8;r+=`\n .branch-label${e} { fill: ${t["gitBranchLabel"+o]}; }\n .commit${e} { stroke: ${t["git"+o]}; fill: ${t["git"+o]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+o]}; fill: ${t["gitInv"+o]}; }\n .arrow${e} { stroke: ${t["git"+o]}; }\n `}return r}if(At.has(e)){let r="";for(let o=0;o<t.THEME_COLOR_LIMIT;o++)if(0===o)r+=`\n .branch-label${o} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${o} { stroke: ${t.nodeBorder}; }\n .commit-highlight${o} { stroke: ${t.nodeBorder}; fill: ${t.mainBkg}; }\n .label${o} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .arrow${o} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n `;else{const s=o%n.length;r+=`\n .branch-label${o} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${o} { stroke: ${n[s]}; fill: ${n[s]}; }\n .commit-highlight${o} { stroke: ${n[s]}; fill: ${n[s]}; }\n .label${o} { fill: ${St.has(e)?t.mainBkg:n[s]}; stroke: ${n[s]}; stroke-width: ${t.strokeWidth}; }\n .arrow${o} { stroke: ${n[s]}; }\n `}return r}{let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)r+=`\n .branch-label${e} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${e} { stroke: ${t.nodeBorder}; }\n .commit-highlight${e} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }\n .label${e} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${a?`font-weight:${t.noteFontWeight}`:""}}\n .arrow${e} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n .commit-cherry-pick${e} { stroke: ${t.nodeBorder}; }\n `;return r}},"genColor"),qt=e(t=>`${Array.from({length:t.THEME_COLOR_LIMIT},(t,r)=>r).map(r=>{const e=r%8;return`\n .branch-label${r} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${r} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${r} { fill: ${t["git"+e]}; }\n .arrow${r} { stroke: ${t["git"+e]}; }\n `}).join("\n")}`,"normalTheme"),_t={parser:Q,db:D,renderer:Pt,styles:e(t=>{const r=d(),{theme:e}=r,o=Wt.has(e);return`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n \n ${o?jt(t):qt(t)}\n\n .branch {\n stroke-width: ${t.strokeWidth};\n stroke: ${t.commitLineColor??t.lineColor};\n stroke-dasharray: ${o?"4 2":"2"};\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${o?t.nodeBorder:t.commitLabelColor}; ${o?`font-weight:${t.noteFontWeight};`:""}}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${o?"transparent":t.commitLabelBackground}; opacity: ${o?"":.5}; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${o?t.mainBkg:t.tagLabelBackground}; stroke: ${o?t.nodeBorder:t.tagLabelBorder}; ${o?`filter:${t.dropShadow}`:""} }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n .commit-reverse {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n stroke-width: ${o?t.strokeWidth:3};\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n\n .arrow {\n /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */\n stroke-width: ${Ot.has(e)?t.strokeWidth:8};\n stroke-linecap: round;\n fill: none\n }\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`},"getStyles")};export{_t as diagram};
|
|
1
|
+
import{I as t}from"./chunk-2Q5K7J3B-Brbuto5C.js";import{p as r}from"./chunk-JWPE2WC7-CKdx8e0r.js";import{_ as e,p as o,o as n,s as a,g as s,a as i,b as c,z as d,l as h,d as $,c as m,y as l,A as g,q as p,k as y,B as f,D as x,E as u}from"./mermaid.core-CSuHyCbU.js";import{p as b}from"./cynefin-VYW2F7L2-D1LRWQeS.js";import"./index-kcB9N5v8.js";import"./RemoteLifeOSBlock-Bq3YQBy7.js";import"./index-S4bzeLfy.js";import"./index-8TM1eFHE.js";import"./file-editor-CodeHighlight-aQ9kP3Wv.js";import"./App-Bx92ZYqP.js";import"./square-Dl4fOYPP.js";import"./chevron-up-C3_IR2td.js";import"./__vite-browser-external-2447137e-BMiSckAV.js";import"./purify.es-BNLkGfTg.js";import"./marked.esm-BBjA1da9.js";var w={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},k=x.gitGraph,B=e(()=>f({...k,...d().gitGraph}),"getConfig"),E=new t(()=>{const t=B(),r=t.mainBranchName,e=t.mainBranchOrder;return{mainBranchName:r,commits:new Map,head:null,branchConfig:new Map([[r,{name:r,order:e}]]),branches:new Map([[r,null]]),currBranch:r,direction:"LR",seq:0,options:{}}});function C(){return u({length:7})}function L(t,r){const e=Object.create(null);return t.reduce((t,o)=>{const n=r(o);return e[n]||(e[n]=!0,t.push(o)),t},[])}e(C,"getID"),e(L,"uniqBy");var T=e(function(t){E.records.direction=t},"setDirection"),M=e(function(t){h.debug("options str",t),t=t?.trim(),t=t||"{}";try{E.records.options=JSON.parse(t)}catch(r){h.error("error while parsing gitGraph options",r.message)}},"setOptions"),v=e(function(){return E.records.options},"getOptions"),I=e(function(t){let r=t.msg,e=t.id;const o=t.type;let n=t.tags;h.info("commit",r,e,o,n),h.debug("Entering commit:",r,e,o,n);const a=B();e=y.sanitizeText(e,a),r=y.sanitizeText(r,a),n=n?.map(t=>y.sanitizeText(t,a));const s={id:e||E.records.seq+"-"+C(),message:r,seq:E.records.seq++,type:o??w.NORMAL,tags:n??[],parents:null==E.records.head?[]:[E.records.head.id],branch:E.records.currBranch};E.records.head=s,h.info("main branch",a.mainBranchName),E.records.commits.has(s.id)&&h.warn(`Commit ID ${s.id} already exists`),E.records.commits.set(s.id,s),E.records.branches.set(E.records.currBranch,s.id),h.debug("in pushCommit "+s.id)},"commit"),R=e(function(t){let r=t.name;const e=t.order;if(r=y.sanitizeText(r,B()),E.records.branches.has(r))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 ${r}")`);E.records.branches.set(r,null!=E.records.head?E.records.head.id:null),E.records.branchConfig.set(r,{name:r,order:e}),A(r),h.debug("in createBranch")},"branch"),P=e(t=>{let r=t.branch,e=t.id;const o=t.type,n=t.tags,a=B();r=y.sanitizeText(r,a),e&&(e=y.sanitizeText(e,a));const s=E.records.branches.get(E.records.currBranch),i=E.records.branches.get(r),c=s?E.records.commits.get(s):void 0,d=i?E.records.commits.get(i):void 0;if(c&&d&&c.branch===r)throw new Error(`Cannot merge branch '${r}' into itself.`);if(E.records.currBranch===r){const t=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(void 0===c||!c){const t=new Error(`Incorrect usage of "merge". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["commit"]},t}if(!E.records.branches.has(r)){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") does not exist");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:[`branch ${r}`]},t}if(void 0===d||!d){const t=new Error('Incorrect usage of "merge". Branch to be merged ('+r+") has no commits");throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:['"commit"']},t}if(c===d){const t=new Error('Incorrect usage of "merge". Both branches have same head');throw t.hash={text:`merge ${r}`,token:`merge ${r}`,expected:["branch abc"]},t}if(e&&E.records.commits.has(e)){const t=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom id");throw t.hash={text:`merge ${r} ${e} ${o} ${n?.join(" ")}`,token:`merge ${r} ${e} ${o} ${n?.join(" ")}`,expected:[`merge ${r} ${e}_UNIQUE ${o} ${n?.join(" ")}`]},t}const $=i||"",m={id:e||`${E.records.seq}-${C()}`,message:`merged branch ${r} into ${E.records.currBranch}`,seq:E.records.seq++,parents:null==E.records.head?[]:[E.records.head.id,$],branch:E.records.currBranch,type:w.MERGE,customType:o,customId:!!e,tags:n??[]};E.records.head=m,E.records.commits.set(m.id,m),E.records.branches.set(E.records.currBranch,m.id),h.debug(E.records.branches),h.debug("in mergeBranch")},"merge"),O=e(function(t){let r=t.id,e=t.targetId,o=t.tags,n=t.parent;h.debug("Entering cherryPick:",r,e,o);const a=B();if(r=y.sanitizeText(r,a),e=y.sanitizeText(e,a),o=o?.map(t=>y.sanitizeText(t,a)),n=y.sanitizeText(n,a),!r||!E.records.commits.has(r)){const t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const s=E.records.commits.get(r);if(void 0===s||!s)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(n&&(!Array.isArray(s.parents)||!s.parents.includes(n)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");const i=s.branch;if(s.type===w.MERGE&&!n)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!e||!E.records.commits.has(e)){if(i===E.records.currBranch){const t=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const t=E.records.branches.get(E.records.currBranch);if(void 0===t||!t){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const a=E.records.commits.get(t);if(void 0===a||!a){const t=new Error(`Incorrect usage of "cherry-pick". Current branch (${E.records.currBranch})has no commits`);throw t.hash={text:`cherryPick ${r} ${e}`,token:`cherryPick ${r} ${e}`,expected:["cherry-pick abc"]},t}const c={id:E.records.seq+"-"+C(),message:`cherry-picked ${s?.message} into ${E.records.currBranch}`,seq:E.records.seq++,parents:null==E.records.head?[]:[E.records.head.id,s.id],branch:E.records.currBranch,type:w.CHERRY_PICK,tags:o?o.filter(Boolean):[`cherry-pick:${s.id}${s.type===w.MERGE?`|parent:${n}`:""}`]};E.records.head=c,E.records.commits.set(c.id,c),E.records.branches.set(E.records.currBranch,c.id),h.debug(E.records.branches),h.debug("in cherryPick")}},"cherryPick"),A=e(function(t){if(t=y.sanitizeText(t,B()),!E.records.branches.has(t)){const r=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`);throw r.hash={text:`checkout ${t}`,token:`checkout ${t}`,expected:[`branch ${t}`]},r}{E.records.currBranch=t;const r=E.records.branches.get(E.records.currBranch);E.records.head=void 0!==r&&r?E.records.commits.get(r)??null:null}},"checkout");function G(t,r,e){const o=t.indexOf(r);-1===o?t.push(e):t.splice(o,1,e)}function S(t){const r=t.reduce((t,r)=>t.seq>r.seq?t:r,t[0]);let e="";t.forEach(function(t){e+=t===r?"\t*":"\t|"});const o=[e,r.id,r.seq];for(const n in E.records.branches)E.records.branches.get(n)===r.id&&o.push(n);if(h.debug(o.join(" ")),r.parents&&2==r.parents.length&&r.parents[0]&&r.parents[1]){const e=E.records.commits.get(r.parents[0]);G(t,r,e),r.parents[1]&&t.push(E.records.commits.get(r.parents[1]))}else{if(0==r.parents.length)return;if(r.parents[0]){const e=E.records.commits.get(r.parents[0]);G(t,r,e)}}S(t=L(t,t=>t.id))}e(G,"upsert"),e(S,"prettyPrintCommitHistory");var W=e(function(){h.debug(E.records.commits),S([z()[0]])},"prettyPrint"),j=e(function(){E.reset(),p()},"clear"),H=e(function(){return[...E.records.branchConfig.values()].map((t,r)=>null!==t.order&&void 0!==t.order?t:{...t,order:parseFloat(`0.${r}`)}).sort((t,r)=>(t.order??0)-(r.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),q=e(function(){return E.records.branches},"getBranches"),_=e(function(){return E.records.commits},"getCommits"),z=e(function(){const t=[...E.records.commits.values()];return t.forEach(function(t){h.debug(t.id)}),t.sort((t,r)=>t.seq-r.seq),t},"getCommitsArray"),D={commitType:w,getConfig:B,setDirection:T,setOptions:M,getOptions:v,commit:I,branch:R,merge:P,cherryPick:O,checkout:A,prettyPrint:W,clear:j,getBranchesAsObjArray:H,getBranches:q,getCommits:_,getCommitsArray:z,getCurrentBranch:e(function(){return E.records.currBranch},"getCurrentBranch"),getDirection:e(function(){return E.records.direction},"getDirection"),getHead:e(function(){return E.records.head},"getHead"),setAccTitle:c,getAccTitle:i,getAccDescription:s,setAccDescription:a,setDiagramTitle:n,getDiagramTitle:o},F=e((t,e)=>{r(t,e),t.dir&&e.setDirection(t.dir);for(const r of t.statements)N(r,e)},"populate"),N=e((t,r)=>{const o={Commit:e(t=>r.commit(K(t)),"Commit"),Branch:e(t=>r.branch(V(t)),"Branch"),Merge:e(t=>r.merge(Y(t)),"Merge"),Checkout:e(t=>r.checkout(J(t)),"Checkout"),CherryPicking:e(t=>r.cherryPick(U(t)),"CherryPicking")}[t.$type];o?o(t):h.error(`Unknown statement type: ${t.$type}`)},"parseStatement"),K=e(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?w[t.type]:w.NORMAL,tags:t.tags??void 0}),"parseCommit"),V=e(t=>({name:t.name,order:t.order??0}),"parseBranch"),Y=e(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?w[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),J=e(t=>t.branch,"parseCheckout"),U=e(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),Q={parse:e(async t=>{const r=await b("gitGraph",t);h.debug(r),F(r,D)},"parse")},X=10,Z=40,tt=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),rt=new Set(["redux-color","redux-dark-color"]),et=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),ot=e((t,r,e=!1)=>e&&t>0?(t-1)%(r-1)+1:t%r,"calcColorIndex"),nt=new Map,at=new Map,st=new Map,it=[],ct=0,dt="LR",ht=e(()=>{nt.clear(),at.clear(),st.clear(),ct=0,it=[],dt="LR"},"clear"),$t=e(t=>{const r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|<br\s*\/?>/gi):t).forEach(t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),mt=e(t=>{let r,o,n;return"BT"===dt?(o=e((t,r)=>t<=r,"comparisonFunc"),n=1/0):(o=e((t,r)=>t>=r,"comparisonFunc"),n=0),t.forEach(t=>{const e="TB"===dt||"BT"==dt?at.get(t)?.y:at.get(t)?.x;void 0!==e&&o(e,n)&&(r=t,n=e)}),r},"findClosestParent"),lt=e(t=>{let r="",e=1/0;return t.forEach(t=>{const o=at.get(t).y;o<=e&&(r=t,e=o)}),r||void 0},"findClosestParentBT"),gt=e((t,r,e)=>{let o=e,n=e;const a=[];t.forEach(t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);e.parents.length?(o=yt(e),n=Math.max(o,n)):a.push(e),ft(e,o)}),o=n,a.forEach(t=>{xt(t,o,e)}),t.forEach(t=>{const e=r.get(t);if(e?.parents.length){const t=lt(e.parents);o=at.get(t).y-Z,o<=n&&(n=o);const r=nt.get(e.branch).pos,a=o-X;at.set(e.id,{x:r,y:a})}})},"setParallelBTPos"),pt=e(t=>{const r=mt(t.parents.filter(t=>null!==t));if(!r)throw new Error(`Closest parent not found for commit ${t.id}`);const e=at.get(r)?.y;if(void 0===e)throw new Error(`Closest parent position not found for commit ${t.id}`);return e},"findClosestParentPos"),yt=e(t=>pt(t)+Z,"calculateCommitPosition"),ft=e((t,r)=>{const e=nt.get(t.branch);if(!e)throw new Error(`Branch not found for commit ${t.id}`);const o=e.pos,n=r+X;return at.set(t.id,{x:o,y:n}),{x:o,y:n}},"setCommitPosition"),xt=e((t,r,e)=>{const o=nt.get(t.branch);if(!o)throw new Error(`Branch not found for commit ${t.id}`);const n=r+e,a=o.pos;at.set(t.id,{x:a,y:n})},"setRootPosition"),ut=e((t,r,e,o,n,a)=>{const{theme:s}=m(),i=tt.has(s??""),c=rt.has(s??""),d=et.has(s??"");if(a===w.HIGHLIGHT)t.append("rect").attr("x",e.x-10+(i?3:0)).attr("y",e.y-10+(i?3:0)).attr("width",i?14:20).attr("height",i?14:20).attr("class",`commit ${r.id} commit-highlight${ot(n,8,c)} ${o}-outer`),t.append("rect").attr("x",e.x-6+(i?2:0)).attr("y",e.y-6+(i?2:0)).attr("width",i?8:12).attr("height",i?8:12).attr("class",`commit ${r.id} commit${ot(n,8,c)} ${o}-inner`);else if(a===w.CHERRY_PICK)t.append("circle").attr("cx",e.x).attr("cy",e.y).attr("r",i?7:10).attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x-3).attr("cy",e.y+2).attr("r",i?2.5:2.75).attr("fill",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("circle").attr("cx",e.x+3).attr("cy",e.y+2).attr("r",i?2.5:2.75).attr("fill",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x+3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`),t.append("line").attr("x1",e.x-3).attr("y1",e.y+1).attr("x2",e.x).attr("y2",e.y-5).attr("stroke",d?"#000000":"#fff").attr("class",`commit ${r.id} ${o}`);else{const s=t.append("circle");if(s.attr("cx",e.x),s.attr("cy",e.y),s.attr("r",i?7:10),s.attr("class",`commit ${r.id} commit${ot(n,8,c)}`),a===w.MERGE){const a=t.append("circle");a.attr("cx",e.x),a.attr("cy",e.y),a.attr("r",i?5:6),a.attr("class",`commit ${o} ${r.id} commit${ot(n,8,c)}`)}if(a===w.REVERSE){const a=i?4:5;t.append("path").attr("d",`M ${e.x-a},${e.y-a}L${e.x+a},${e.y+a}M${e.x-a},${e.y+a}L${e.x+a},${e.y-a}`).attr("class",`commit ${o} ${r.id} commit${ot(n,8,c)}`)}}},"drawCommitBullet"),bt=e((t,r,e,o,n)=>{if(r.type!==w.CHERRY_PICK&&(r.customId&&r.type===w.MERGE||r.type!==w.MERGE)&&n.showCommitLabel){const a=t.append("g"),s=a.insert("rect").attr("class","commit-label-bkg"),i=a.append("text").attr("x",o).attr("y",e.y+25).attr("class","commit-label").text(r.id),c=i.node()?.getBBox();if(c&&(s.attr("x",e.posWithOffset-c.width/2-2).attr("y",e.y+13.5).attr("width",c.width+4).attr("height",c.height+4),"TB"===dt||"BT"===dt?(s.attr("x",e.x-(c.width+16+5)).attr("y",e.y-12),i.attr("x",e.x-(c.width+16)).attr("y",e.y+c.height-12)):i.attr("x",e.posWithOffset-c.width/2),n.rotateCommitLabel))if("TB"===dt||"BT"===dt)i.attr("transform","rotate(-45, "+e.x+", "+e.y+")"),s.attr("transform","rotate(-45, "+e.x+", "+e.y+")");else{const t=-7.5-(c.width+10)/25*9.5,r=10+c.width/25*8.5;a.attr("transform","translate("+t+", "+r+") rotate(-45, "+o+", "+e.y+")")}}},"drawCommitLabel"),wt=e((t,r,e,o)=>{if(r.tags.length>0){let n=0,a=0,s=0;const i=[];for(const o of r.tags.reverse()){const r=t.insert("polygon"),c=t.append("circle"),d=t.append("text").attr("y",e.y-16-n).attr("class","tag-label").text(o),h=d.node()?.getBBox();if(!h)throw new Error("Tag bbox not found");a=Math.max(a,h.width),s=Math.max(s,h.height),d.attr("x",e.posWithOffset-h.width/2),i.push({tag:d,hole:c,rect:r,yOffset:n}),n+=20}for(const{tag:t,hole:r,rect:c,yOffset:d}of i){const n=s/2,i=e.y-19.2-d;if(c.attr("class","tag-label-bkg").attr("points",`\n ${o-a/2-2},${i+2} \n ${o-a/2-2},${i-2}\n ${e.posWithOffset-a/2-4},${i-n-2}\n ${e.posWithOffset+a/2+4},${i-n-2}\n ${e.posWithOffset+a/2+4},${i+n+2}\n ${e.posWithOffset-a/2-4},${i+n+2}`),r.attr("cy",i).attr("cx",o-a/2+2).attr("r",1.5).attr("class","tag-hole"),"TB"===dt||"BT"===dt){const s=o+d;c.attr("class","tag-label-bkg").attr("points",`\n ${e.x},${s+2}\n ${e.x},${s-2}\n ${e.x+X},${s-n-2}\n ${e.x+X+a+4},${s-n-2}\n ${e.x+X+a+4},${s+n+2}\n ${e.x+X},${s+n+2}`).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),r.attr("cx",e.x+2).attr("cy",s).attr("transform","translate(12,12) rotate(45, "+e.x+","+o+")"),t.attr("x",e.x+5).attr("y",s+3).attr("transform","translate(14,14) rotate(45, "+e.x+","+o+")")}}}},"drawCommitTags"),kt=e(t=>{switch(t.customType??t.type){case w.NORMAL:return"commit-normal";case w.REVERSE:return"commit-reverse";case w.HIGHLIGHT:return"commit-highlight";case w.MERGE:return"commit-merge";case w.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Bt=e((t,r,e,o)=>{const n={x:0,y:0};if(!(t.parents.length>0))return"TB"===r?30:"BT"===r?(o.get(t.id)??n).y-Z:0;{const e=mt(t.parents);if(e){const a=o.get(e)??n;return"TB"===r?a.y+Z:"BT"===r?(o.get(t.id)??n).y-Z:a.x+Z}}return 0},"calculatePosition"),Et=e((t,r,e)=>{const o="BT"===dt&&e?r:r+X,n=nt.get(t.branch)?.pos,a="TB"===dt||"BT"===dt?nt.get(t.branch)?.pos:o;if(void 0===a||void 0===n)throw new Error(`Position were undefined for commit ${t.id}`);const s=tt.has(m().theme??"");return{x:a,y:"TB"===dt||"BT"===dt?o:n+(s?7:-2),posWithOffset:o}},"getCommitPosition"),Ct=e((t,r,o,n)=>{const a=t.append("g").attr("class","commit-bullets"),s=t.append("g").attr("class","commit-labels");let i="TB"===dt||"BT"===dt?30:0;const c=[...r.keys()],d=n.parallelCommits??!1,h=e((t,e)=>{const o=r.get(t)?.seq,n=r.get(e)?.seq;return void 0!==o&&void 0!==n?o-n:0},"sortKeys");let $=c.sort(h);"BT"===dt&&(d&>($,r,i),$=$.reverse()),$.forEach(t=>{const e=r.get(t);if(!e)throw new Error(`Commit not found for key ${t}`);d&&(i=Bt(e,dt,i,at));const c=Et(e,i,d);if(o){const t=kt(e),r=e.customType??e.type,o=nt.get(e.branch)?.index??0;ut(a,e,c,t,o,r),bt(s,e,c,i,n),wt(s,e,c,i)}"TB"===dt||"BT"===dt?at.set(e.id,{x:c.x,y:c.posWithOffset}):at.set(e.id,{x:c.posWithOffset,y:c.y}),i="BT"===dt&&d?i+Z:i+Z+X,i>ct&&(ct=i)})},"drawCommits"),Lt=e((t,r,o,n,a)=>{const s=("TB"===dt||"BT"===dt?o.x<n.x:o.y<n.y)?r.branch:t.branch,i=e(t=>t.branch===s,"isOnBranchToGetCurve"),c=e(e=>e.seq>t.seq&&e.seq<r.seq,"isBetweenCommits");return[...a.values()].some(t=>c(t)&&i(t))},"shouldRerouteArrow"),Tt=e((t,r,e=0)=>{const o=t+Math.abs(t-r)/2;if(e>5)return o;if(it.every(t=>Math.abs(t-o)>=10))return it.push(o),o;const n=Math.abs(t-r);return Tt(t,r-n/5,e+1)},"findLane"),Mt=e((t,r,e,o)=>{const{theme:n}=m(),a=rt.has(n??""),s=at.get(r.id),i=at.get(e.id);if(void 0===s||void 0===i)throw new Error(`Commit positions not found for commits ${r.id} and ${e.id}`);const c=Lt(r,e,s,i,o);let d,h="",$="",l=0,g=0,p=nt.get(e.branch)?.index;if(e.type===w.MERGE&&r.id!==e.parents[0]&&(p=nt.get(r.branch)?.index),c){h="A 10 10, 0, 0, 0,",$="A 10 10, 0, 0, 1,",l=10,g=10;const t=s.y<i.y?Tt(s.y,i.y):Tt(i.y,s.y),e=s.x<i.x?Tt(s.x,i.x):Tt(i.x,s.x);"TB"===dt?s.x<i.x?d=`M ${s.x} ${s.y} L ${e-l} ${s.y} ${$} ${e} ${s.y+g} L ${e} ${i.y-l} ${h} ${e+g} ${i.y} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${e+l} ${s.y} ${h} ${e} ${s.y+g} L ${e} ${i.y-l} ${$} ${e-g} ${i.y} L ${i.x} ${i.y}`):"BT"===dt?s.x<i.x?d=`M ${s.x} ${s.y} L ${e-l} ${s.y} ${h} ${e} ${s.y-g} L ${e} ${i.y+l} ${$} ${e+g} ${i.y} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${e+l} ${s.y} ${$} ${e} ${s.y-g} L ${e} ${i.y+l} ${h} ${e-g} ${i.y} L ${i.x} ${i.y}`):s.y<i.y?d=`M ${s.x} ${s.y} L ${s.x} ${t-l} ${h} ${s.x+g} ${t} L ${i.x-l} ${t} ${$} ${i.x} ${t+g} L ${i.x} ${i.y}`:(p=nt.get(r.branch)?.index,d=`M ${s.x} ${s.y} L ${s.x} ${t+l} ${$} ${s.x+g} ${t} L ${i.x-l} ${t} ${h} ${i.x} ${t-g} L ${i.x} ${i.y}`)}else h="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,g=20,"TB"===dt?(s.x<i.x&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${h} ${s.x+g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${$} ${i.x} ${s.y+g} L ${i.x} ${i.y}`),s.x>i.x&&(h="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,g=20,d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${$} ${s.x-g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x+l} ${s.y} ${h} ${i.x} ${s.y+g} L ${i.x} ${i.y}`),s.x===i.x&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`)):"BT"===dt?(s.x<i.x&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${$} ${s.x+g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${h} ${i.x} ${s.y-g} L ${i.x} ${i.y}`),s.x>i.x&&(h="A 20 20, 0, 0, 0,",$="A 20 20, 0, 0, 1,",l=20,g=20,d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${h} ${s.x-g} ${i.y} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${i.x+l} ${s.y} ${$} ${i.x} ${s.y-g} L ${i.x} ${i.y}`),s.x===i.x&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`)):(s.y<i.y&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${$} ${i.x} ${s.y+g} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${s.x} ${i.y-l} ${h} ${s.x+g} ${i.y} L ${i.x} ${i.y}`),s.y>i.y&&(d=e.type===w.MERGE&&r.id!==e.parents[0]?`M ${s.x} ${s.y} L ${i.x-l} ${s.y} ${h} ${i.x} ${s.y-g} L ${i.x} ${i.y}`:`M ${s.x} ${s.y} L ${s.x} ${i.y+l} ${$} ${s.x+g} ${i.y} L ${i.x} ${i.y}`),s.y===i.y&&(d=`M ${s.x} ${s.y} L ${i.x} ${i.y}`));if(void 0===d)throw new Error("Line definition not found");t.append("path").attr("d",d).attr("class","arrow arrow"+ot(p,8,a))},"drawArrow"),vt=e((t,r)=>{const e=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{const o=r.get(t);o.parents&&o.parents.length>0&&o.parents.forEach(t=>{Mt(e,r.get(t),o,r)})})},"drawArrows"),It=e((t,r,e,o)=>{const{look:n,theme:a,themeVariables:s}=m(),{dropShadow:i,THEME_COLOR_LIMIT:c}=s,d=tt.has(a??""),h=rt.has(a??""),$=t.append("g");r.forEach((t,r)=>{const a=ot(r,d?c:8,h),s=nt.get(t.name)?.pos;if(void 0===s)throw new Error(`Position not found for branch ${t.name}`);const m="TB"===dt||"BT"===dt?s:d?s+6+1:s-2,l=$.append("line");l.attr("x1",0),l.attr("y1",m),l.attr("x2",ct),l.attr("y2",m),l.attr("class","branch branch"+a),"TB"===dt?(l.attr("y1",30),l.attr("x1",s),l.attr("y2",ct),l.attr("x2",s)):"BT"===dt&&(l.attr("y1",ct),l.attr("x1",s),l.attr("y2",30),l.attr("x2",s)),it.push(m);const g=t.name,p=$t(g),y=$.insert("rect"),f=$.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);f.node().appendChild(p);const x=p.getBBox(),u=d?0:4,b=d?16:0,w=d?12:0;"neo"===n&&y.attr("data-look","neo"),y.attr("class","branchLabelBkg label"+a).attr("style","neo"===n?`filter:${d?`url(#${o}-drop-shadow)`:i}`:"").attr("rx",u).attr("ry",u).attr("x",-x.width-4-(!0===e.rotateCommitLabel?30:0)).attr("y",-x.height/2+10).attr("width",x.width+18+b).attr("height",x.height+4+w),f.attr("transform","translate("+(-x.width-14-(!0===e.rotateCommitLabel?30:0)+b/2)+", "+(m-x.height/2-2)+")"),"TB"===dt?(y.attr("x",s-x.width/2-10).attr("y",0),f.attr("transform","translate("+(s-x.width/2-5)+", 0)"),d&&(y.attr("transform",`translate(${-b/2-3}, ${-w-10})`),f.attr("transform","translate("+(s-x.width/2-5)+", "+(2*-w+7)+")"))):"BT"===dt?(y.attr("x",s-x.width/2-10).attr("y",ct),f.attr("transform","translate("+(s-x.width/2-5)+", "+ct+")"),d&&(y.attr("transform",`translate(${-b/2-3}, ${w+10})`),f.attr("transform","translate("+(s-x.width/2-5)+", "+(ct+2*w+4)+")"))):y.attr("transform","translate(-19, "+(m-12-w/2)+")")})},"drawBranches"),Rt=e(function(t,r,e,o,n){return nt.set(t,{pos:r,index:e}),r+(50+(n?40:0)+("TB"===dt||"BT"===dt?o.width/2:0))},"setBranchPosition"),Pt={draw:e(function(t,r,e,o){ht(),h.debug("in gitgraph renderer",t+"\n","id:",r,e);const n=o.db;if(!n.getConfig)return void h.error("getConfig method is not available on db");const a=n.getConfig(),s=a.rotateCommitLabel??!1;st=n.getCommits();const i=n.getBranchesAsObjArray();dt=n.getDirection();const c=$(`[id="${r}"]`),{look:d,theme:p,themeVariables:y}=m(),{useGradient:f,gradientStart:x,gradientStop:u,filterColor:b}=y;if(f){const t=c.append("defs").append("linearGradient").attr("id",r+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("stop").attr("offset","0%").attr("stop-color",x).attr("stop-opacity",1),t.append("stop").attr("offset","100%").attr("stop-color",u).attr("stop-opacity",1)}"neo"===d&&tt.has(p??"")&&c.append("defs").append("filter").attr("id",r+"-drop-shadow").attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",b);let w=0;i.forEach((t,r)=>{const e=$t(t.name),o=c.append("g"),n=o.insert("g").attr("class","branchLabel"),a=n.insert("g").attr("class","label branch-label");a.node()?.appendChild(e);const i=e.getBBox();w=Rt(t.name,w,r,i,s),a.remove(),n.remove(),o.remove()}),Ct(c,st,!1,a),a.showBranches&&It(c,i,a,r),vt(c,st),Ct(c,st,!0,a),l.insertTitle(c,"gitTitleText",a.titleTopMargin??0,n.getDiagramTitle()),g(void 0,c,a.diagramPadding,a.useMaxWidth)},"draw")},Ot=new Set(["redux","redux-dark","redux-color","redux-dark-color"]),At=new Set(["redux-color","redux-dark-color"]),Gt=new Set(["neo","neo-dark"]),St=new Set(["dark","redux-dark","redux-dark-color","neo-dark"]),Wt=new Set(["redux","redux-dark","redux-color","redux-dark-color","neo","neo-dark"]),jt=e(t=>{const{svgId:r}=t;let e="";if(t.useGradient&&r)for(let o=0;o<t.THEME_COLOR_LIMIT;o++)e+=`\n .label${o} { fill: ${t.mainBkg}; stroke: url(${r}-gradient); stroke-width: ${t.strokeWidth};}\n `;return e},"genGitGraphGradient"),Ht=e(t=>{const r=d(),{theme:e,themeVariables:o}=r,{borderColorArray:n}=o,a=Ot.has(e);if(Gt.has(e)){let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)if(0===e)r+=`\n .branch-label${e} { fill: ${t.nodeBorder};}\n .commit${e} { stroke: ${t.nodeBorder}; }\n .commit-highlight${e} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }\n .arrow${e} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n .commit-cherry-pick${e} { stroke: ${t.nodeBorder}; }\n ${jt(t)}`;else{const o=e%8;r+=`\n .branch-label${e} { fill: ${t["gitBranchLabel"+o]}; }\n .commit${e} { stroke: ${t["git"+o]}; fill: ${t["git"+o]}; }\n .commit-highlight${e} { stroke: ${t["gitInv"+o]}; fill: ${t["gitInv"+o]}; }\n .arrow${e} { stroke: ${t["git"+o]}; }\n `}return r}if(At.has(e)){let r="";for(let o=0;o<t.THEME_COLOR_LIMIT;o++)if(0===o)r+=`\n .branch-label${o} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${o} { stroke: ${t.nodeBorder}; }\n .commit-highlight${o} { stroke: ${t.nodeBorder}; fill: ${t.mainBkg}; }\n .label${o} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .arrow${o} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n `;else{const s=o%n.length;r+=`\n .branch-label${o} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${o} { stroke: ${n[s]}; fill: ${n[s]}; }\n .commit-highlight${o} { stroke: ${n[s]}; fill: ${n[s]}; }\n .label${o} { fill: ${St.has(e)?t.mainBkg:n[s]}; stroke: ${n[s]}; stroke-width: ${t.strokeWidth}; }\n .arrow${o} { stroke: ${n[s]}; }\n `}return r}{let r="";for(let e=0;e<t.THEME_COLOR_LIMIT;e++)r+=`\n .branch-label${e} { fill: ${t.nodeBorder}; ${a?`font-weight:${t.noteFontWeight}`:""} }\n .commit${e} { stroke: ${t.nodeBorder}; }\n .commit-highlight${e} { stroke: ${t.nodeBorder}; fill: ${t.nodeBorder}; }\n .label${e} { fill: ${t.mainBkg}; stroke: ${t.nodeBorder}; stroke-width: ${t.strokeWidth}; ${a?`font-weight:${t.noteFontWeight}`:""}}\n .arrow${e} { stroke: ${t.nodeBorder}; }\n .commit-bullets { fill: ${t.nodeBorder}; }\n .commit-cherry-pick${e} { stroke: ${t.nodeBorder}; }\n `;return r}},"genColor"),qt=e(t=>`${Array.from({length:t.THEME_COLOR_LIMIT},(t,r)=>r).map(r=>{const e=r%8;return`\n .branch-label${r} { fill: ${t["gitBranchLabel"+e]}; }\n .commit${r} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }\n .commit-highlight${r} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }\n .label${r} { fill: ${t["git"+e]}; }\n .arrow${r} { stroke: ${t["git"+e]}; }\n `}).join("\n")}`,"normalTheme"),_t={parser:Q,db:D,renderer:Pt,styles:e(t=>{const r=d(),{theme:e}=r,o=Wt.has(e);return`\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial, sans-serif;\n font-family: var(--mermaid-font-family);\n }\n \n ${o?Ht(t):qt(t)}\n\n .branch {\n stroke-width: ${t.strokeWidth};\n stroke: ${t.commitLineColor??t.lineColor};\n stroke-dasharray: ${o?"4 2":"2"};\n }\n .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${o?t.nodeBorder:t.commitLabelColor}; ${o?`font-weight:${t.noteFontWeight};`:""}}\n .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${o?"transparent":t.commitLabelBackground}; opacity: ${o?"":.5}; }\n .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}\n .tag-label-bkg { fill: ${o?t.mainBkg:t.tagLabelBackground}; stroke: ${o?t.nodeBorder:t.tagLabelBorder}; ${o?`filter:${t.dropShadow}`:""} }\n .tag-hole { fill: ${t.textColor}; }\n\n .commit-merge {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n .commit-reverse {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n stroke-width: ${o?t.strokeWidth:3};\n }\n .commit-highlight-outer {\n }\n .commit-highlight-inner {\n stroke: ${o?t.mainBkg:t.primaryColor};\n fill: ${o?t.mainBkg:t.primaryColor};\n }\n\n .arrow {\n /* Intentional: neo themes keep the bold 8px arrow (like classic themes); only redux-geometry themes use the thinner options.strokeWidth. */\n stroke-width: ${Ot.has(e)?t.strokeWidth:8};\n stroke-linecap: round;\n fill: none\n }\n .gitTitleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ${t.textColor};\n }\n`},"getStyles")};export{_t as diagram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{R as e,M as s,B as t}from"./mermaid-O7DHMXV3-
|
|
1
|
+
import{R as e,M as s,B as t}from"./mermaid-O7DHMXV3-DUoHFycq.js";import{r as a,j as i}from"./index-kcB9N5v8.js";import"./index-8TM1eFHE.js";import"./index-S4bzeLfy.js";import"./collectMessageImages-DEnoDhBs.js";import"./App-Bx92ZYqP.js";import"./clsx-Dy3K9oBb.js";import"./index-1M7_HtDu.js";var r=({code:r,language:o,raw:m,className:l,startLine:g,...n})=>{let{shikiTheme:d}=a.useContext(e),p=s(),[j,c]=a.useState(m);return a.useEffect(()=>{if(!p)return void c(m);let e=p.highlight({code:r,language:o,themes:d},e=>{c(e)});e&&c(e)},[r,o,d,p,m]),i.jsx(t,{className:l,language:o,result:j,startLine:g,...n})};export{r as HighlightedCodeBlockBody};
|