import{f as t}from"./chunk-7ZGKZ6HH.js";import{j as i}from"./chunk-RMXJBC7V.js";var s={},m={info:t(()=>i(null,null,function*(){let{createInfoServices:e}=yield import("./chunk-4ZQ24APY.js"),r=e().Info.parser.LangiumParser;s.info=r}),"info"),packet:t(()=>i(null,null,function*(){let{createPacketServices:e}=yield import("./chunk-UMUHBNGZ.js"),r=e().Packet.parser.LangiumParser;s.packet=r}),"packet"),pie:t(()=>i(null,null,function*(){let{createPieServices:e}=yield import("./chunk-MP6JNF5U.js"),r=e().Pie.parser.LangiumParser;s.pie=r}),"pie"),treeView:t(()=>i(null,null,function*(){let{createTreeViewServices:e}=yield import("./chunk-GBI7W3TG.js"),r=e().TreeView.parser.LangiumParser;s.treeView=r}),"treeView"),architecture:t(()=>i(null,null,function*(){let{createArchitectureServices:e}=yield import("./chunk-2RGIIJSP.js"),r=e().Architecture.parser.LangiumParser;s.architecture=r}),"architecture"),gitGraph:t(()=>i(null,null,function*(){let{createGitGraphServices:e}=yield import("./chunk-OUY2PG7F.js"),r=e().GitGraph.parser.LangiumParser;s.gitGraph=r}),"gitGraph"),radar:t(()=>i(null,null,function*(){let{createRadarServices:e}=yield import("./chunk-GQUNXJBP.js"),r=e().Radar.parser.LangiumParser;s.radar=r}),"radar"),treemap:t(()=>i(null,null,function*(){let{createTreemapServices:e}=yield import("./chunk-7CNYU4WA.js"),r=e().Treemap.parser.LangiumParser;s.treemap=r}),"treemap"),wardley:t(()=>i(null,null,function*(){let{createWardleyServices:e}=yield import("./chunk-DGO6DRJY.js"),r=e().Wardley.parser.LangiumParser;s.wardley=r}),"wardley")};function d(e,r){return i(this,null,function*(){let c=m[e];if(!c)throw new Error(`Unknown diagram type: ${e}`);s[e]||(yield c());let o=s[e].parse(r);if(o.lexerErrors.length>0||o.parserErrors.length>0)throw new p(o);return o.value})}t(d,"parse");var p=class extends Error{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(`
`),c=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} ${c}`),this.result=e}static{t(this,"MermaidParseError")}};export{d as a};
