import{a}from"./chunk-L5GCOVLC.mjs";import{a as c}from"./chunk-AQ6EADP3.mjs";var i={},d={info:a(async()=>{let{createInfoServices:e}=await import("./info-DKCQHKI2-DX6KST54.mjs"),r=e().Info.parser.LangiumParser;i.info=r},"info"),packet:a(async()=>{let{createPacketServices:e}=await import("./packet-7NZHBO7P-5WG45QPS.mjs"),r=e().Packet.parser.LangiumParser;i.packet=r},"packet"),pie:a(async()=>{let{createPieServices:e}=await import("./pie-RZYD4A2V-2OCZ2VTD.mjs"),r=e().Pie.parser.LangiumParser;i.pie=r},"pie"),treeView:a(async()=>{let{createTreeViewServices:e}=await import("./treeView-QDETBFTQ-EHYTSQNO.mjs"),r=e().TreeView.parser.LangiumParser;i.treeView=r},"treeView"),architecture:a(async()=>{let{createArchitectureServices:e}=await import("./architecture-TIHT7OUA-V6N4J3SY.mjs"),r=e().Architecture.parser.LangiumParser;i.architecture=r},"architecture"),gitGraph:a(async()=>{let{createGitGraphServices:e}=await import("./gitGraph-TEB2WS4Q-U5VWYIBC.mjs"),r=e().GitGraph.parser.LangiumParser;i.gitGraph=r},"gitGraph"),eventmodeling:a(async()=>{let{createEventModelingServices:e}=await import("./eventmodeling-45OFAUF4-AOUJWSLX.mjs"),r=e().EventModel.parser.LangiumParser;i.eventmodeling=r},"eventmodeling"),radar:a(async()=>{let{createRadarServices:e}=await import("./radar-I7S5WNFK-EPLSA35B.mjs"),r=e().Radar.parser.LangiumParser;i.radar=r},"radar"),railroad:a(async()=>{let{createRailroadServices:e}=await import("./railroad-3IZDKUUU-PWFQV6Y6.mjs"),r=e().Railroad.parser.LangiumParser;i.railroad=r},"railroad"),railroadEbnf:a(async()=>{let{createRailroadEbnfServices:e}=await import("./railroad-ebnf-EBAXGLYW-RBZ4ONAP.mjs"),r=e().RailroadEbnf.parser.LangiumParser;i.railroadEbnf=r},"railroadEbnf"),railroadAbnf:a(async()=>{let{createRailroadAbnfServices:e}=await import("./railroad-abnf-AHOZXSZD-JYYJX3BS.mjs"),r=e().RailroadAbnf.parser.LangiumParser;i.railroadAbnf=r},"railroadAbnf"),railroadPeg:a(async()=>{let{createRailroadPegServices:e}=await import("./railroad-peg-LSFZ7HO6-KHNPXGPG.mjs"),r=e().RailroadPeg.parser.LangiumParser;i.railroadPeg=r},"railroadPeg"),treemap:a(async()=>{let{createTreemapServices:e}=await import("./treemap-6X3UGDF4-CCWCF7EK.mjs"),r=e().Treemap.parser.LangiumParser;i.treemap=r},"treemap"),wardley:a(async()=>{let{createWardleyServices:e}=await import("./wardley-OPB4EBWU-6OWERDVT.mjs"),r=e().Wardley.parser.LangiumParser;i.wardley=r},"wardley"),cynefin:a(async()=>{let{createCynefinServices:e}=await import("./cynefin-VYW2F7L2-2VAHYKR6.mjs"),r=e().Cynefin.parser.LangiumParser;i.cynefin=r},"cynefin")};async function l(e,r){let n=d[e];if(!n)throw new Error(`Unknown diagram type: ${e}`);i[e]||await n();let t=i[e].parse(r);if(t.lexerErrors.length>0||t.parserErrors.length>0)throw new m(t);return t.value}c(l,"parse");a(l,"parse");var m=class extends Error{static{c(this,"MermaidParseError")}constructor(e){let r=e.lexerErrors.map(o=>{let t=o.line!==void 0&&!isNaN(o.line)?o.line:"?",s=o.column!==void 0&&!isNaN(o.column)?o.column:"?";return`Lexer error on line ${t}, column ${s}: ${o.message}`}).join(`
`),n=e.parserErrors.map(o=>{let t=o.token.startLine!==void 0&&!isNaN(o.token.startLine)?o.token.startLine:"?",s=o.token.startColumn!==void 0&&!isNaN(o.token.startColumn)?o.token.startColumn:"?";return`Parse error on line ${t}, column ${s}: ${o.message}`}).join(`
`);super(`Parsing failed: ${r} ${n}`),this.result=e}static{a(this,"MermaidParseError")}};export{l as a,m as b};
