import{a as t}from"./chunk-4R4BOZG6.mjs";import{a as c}from"./chunk-AQ6EADP3.mjs";var i={},m={info:t(async()=>{let{createInfoServices:e}=await import("./info-J43DQDTF-KCYPFFUO.mjs"),r=e().Info.parser.LangiumParser;i.info=r},"info"),packet:t(async()=>{let{createPacketServices:e}=await import("./packet-YPE3B663-LP52Z2RK.mjs"),r=e().Packet.parser.LangiumParser;i.packet=r},"packet"),pie:t(async()=>{let{createPieServices:e}=await import("./pie-LRSECV5Y-TCRJHUBD.mjs"),r=e().Pie.parser.LangiumParser;i.pie=r},"pie"),treeView:t(async()=>{let{createTreeViewServices:e}=await import("./treeView-BLDUP644-QA4HXRO3.mjs"),r=e().TreeView.parser.LangiumParser;i.treeView=r},"treeView"),architecture:t(async()=>{let{createArchitectureServices:e}=await import("./architecture-7EHR7CIX-6QZW5X65.mjs"),r=e().Architecture.parser.LangiumParser;i.architecture=r},"architecture"),gitGraph:t(async()=>{let{createGitGraphServices:e}=await import("./gitGraph-WXDBUCRP-R675I2BI.mjs"),r=e().GitGraph.parser.LangiumParser;i.gitGraph=r},"gitGraph"),eventmodeling:t(async()=>{let{createEventModelingServices:e}=await import("./eventmodeling-FCH6USID-MREXMVOE.mjs"),r=e().EventModel.parser.LangiumParser;i.eventmodeling=r},"eventmodeling"),radar:t(async()=>{let{createRadarServices:e}=await import("./radar-GUYGQ44K-RDLRG3WG.mjs"),r=e().Radar.parser.LangiumParser;i.radar=r},"radar"),treemap:t(async()=>{let{createTreemapServices:e}=await import("./treemap-LRROVOQU-LLAWBHMP.mjs"),r=e().Treemap.parser.LangiumParser;i.treemap=r},"treemap"),wardley:t(async()=>{let{createWardleyServices:e}=await import("./wardley-L42UT6IY-5TKZOOLJ.mjs"),r=e().Wardley.parser.LangiumParser;i.wardley=r},"wardley")};async function d(e,r){let s=m[e];if(!s)throw new Error(`Unknown diagram type: ${e}`);i[e]||await s();let o=i[e].parse(r);if(o.lexerErrors.length>0||o.parserErrors.length>0)throw new l(o);return o.value}c(d,"parse");t(d,"parse");var l=class extends Error{static{c(this,"MermaidParseError")}constructor(e){let r=e.lexerErrors.map(a=>{let o=a.line!==void 0&&!isNaN(a.line)?a.line:"?",n=a.column!==void 0&&!isNaN(a.column)?a.column:"?";return`Lexer error on line ${o}, column ${n}: ${a.message}`}).join(`
`),s=e.parserErrors.map(a=>{let o=a.token.startLine!==void 0&&!isNaN(a.token.startLine)?a.token.startLine:"?",n=a.token.startColumn!==void 0&&!isNaN(a.token.startColumn)?a.token.startColumn:"?";return`Parse error on line ${o}, column ${n}: ${a.message}`}).join(`
`);super(`Parsing failed: ${r} ${s}`),this.result=e}static{t(this,"MermaidParseError")}};export{d as a};
