import{a as o,b as c,c as l,d as s,e as u,g as v,r as m,w as h,y as R}from"./chunk-L5GCOVLC.mjs";import{a as i}from"./chunk-AQ6EADP3.mjs";var p=class extends R{static{i(this,"RailroadTokenBuilder")}static{o(this,"RailroadTokenBuilder")}constructor(){super(["railroad-beta"])}},f=o(a=>{let e=a.slice(1,-1),r="";for(let t=0;t<e.length;t++){let n=e[t];if(n==="\\"&&t+1<e.length){t++;let d=e[t];switch(d){case"n":r+=`
`;break;case"r":r+="\r";break;case"t":r+="	";break;default:r+=d}continue}r+=n}return r},"decodeEscapedString"),C=class extends h{static{i(this,"RailroadValueConverter")}static{o(this,"RailroadValueConverter")}runConverter(a,e,r){let t=super.runConverter(a,e,r);if(a.name==="TITLE"&&typeof t=="string"){let n=t.trim();if(n.startsWith('"')&&n.endsWith('"')||n.startsWith("'")&&n.endsWith("'"))return f(n)}return t}runCustomConverter(a,e,r){if(a.name==="RR_STRING")return f(e)}},S={parser:{TokenBuilder:o(()=>new p,"TokenBuilder"),ValueConverter:o(()=>new C,"ValueConverter")}};function k(a=u){let e=s(l(a),v),r=s(c({shared:e}),m,S);return e.ServiceRegistry.register(r),{shared:e,Railroad:r}}i(k,"createRailroadServices");o(k,"createRailroadServices");export{S as a,k as b};
