import{Va as f,a,b as c,c as u,d as l,db as S,e as m,f as b,jb as p,lb as v}from"./chunk-RKHDN2Z7.mjs";var d=class extends v{static{a(this,"RailroadEbnfTokenBuilder")}constructor(){super(["railroad-ebnf-beta"])}};var C=a(i=>{let e=i.slice(1,-1),r="";for(let t=0;t<e.length;t++){let n=e[t];if(n==="\\"&&t+1<e.length){t++;let o=e[t];switch(o){case"n":r+=`
`;break;case"r":r+="\r";break;case"t":r+="	";break;default:r+=o}continue}r+=n}return r},"decodeEscapedString"),s=class extends p{static{a(this,"RailroadEbnfValueConverter")}runConverter(e,r,t){let n=super.runConverter(e,r,t);if(e.name==="TITLE"&&typeof n=="string"){let o=n.trim();if(o.startsWith('"')&&o.endsWith('"')||o.startsWith("'")&&o.endsWith("'"))return C(o)}return n}runCustomConverter(e,r,t){if(e.name==="EBNF_STRING")return C(r);if(e.name==="EBNF_SPECIAL_SEQUENCE")return r.slice(1,-1).trim()}};var E={parser:{TokenBuilder:a(()=>new d,"TokenBuilder"),ValueConverter:a(()=>new s,"ValueConverter")}};function N(i=m){let e=l(u(i),f),r=l(c({shared:e}),S,E);return e.ServiceRegistry.register(r),{shared:e,RailroadEbnf:r}}a(N,"createRailroadEbnfServices");export{E as a,N as b};
