Files
simple-mail-cleaner/backend/node_modules/chevrotain/lib_esm/chevrotain.min.mjs
2026-01-23 01:33:35 +01:00

153 lines
207 KiB
JavaScript

var u=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports);var ta=u(On=>{"use strict";Object.defineProperty(On,"__esModule",{value:!0});On.VERSION=void 0;On.VERSION="10.5.0"});var Lt=u((gw,rs)=>{var xm=Object.prototype;function bm(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||xm;return e===r}rs.exports=bm});var ra=u((Tw,ns)=>{function Cm(e,t){return function(r){return e(t(r))}}ns.exports=Cm});var as=u((Ew,is)=>{var Lm=ra(),km=Lm(Object.keys,Object);is.exports=km});var na=u((Aw,os)=>{var qm=Lt(),Mm=as(),Fm=Object.prototype,wm=Fm.hasOwnProperty;function Dm(e){if(!qm(e))return Mm(e);var t=[];for(var r in Object(e))wm.call(e,r)&&r!="constructor"&&t.push(r);return t}os.exports=Dm});var ia=u((Ow,ss)=>{var Um=typeof global=="object"&&global&&global.Object===Object&&global;ss.exports=Um});var me=u((Rw,us)=>{var jm=ia(),Gm=typeof self=="object"&&self&&self.Object===Object&&self,Bm=jm||Gm||Function("return this")();us.exports=Bm});var yt=u((Iw,cs)=>{var Wm=me(),Km=Wm.Symbol;cs.exports=Km});var ps=u((Nw,ds)=>{var ls=yt(),fs=Object.prototype,Vm=fs.hasOwnProperty,Hm=fs.toString,Lr=ls?ls.toStringTag:void 0;function zm(e){var t=Vm.call(e,Lr),r=e[Lr];try{e[Lr]=void 0;var n=!0}catch{}var i=Hm.call(e);return n&&(t?e[Lr]=r:delete e[Lr]),i}ds.exports=zm});var vs=u((Sw,hs)=>{var Xm=Object.prototype,Ym=Xm.toString;function $m(e){return Ym.call(e)}hs.exports=$m});var it=u((Pw,ms)=>{var _s=yt(),Zm=ps(),Jm=vs(),Qm="[object Null]",eg="[object Undefined]",ys=_s?_s.toStringTag:void 0;function tg(e){return e==null?e===void 0?eg:Qm:ys&&ys in Object(e)?Zm(e):Jm(e)}ms.exports=tg});var ge=u((xw,gs)=>{function rg(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}gs.exports=rg});var kt=u((bw,Ts)=>{var ng=it(),ig=ge(),ag="[object AsyncFunction]",og="[object Function]",sg="[object GeneratorFunction]",ug="[object Proxy]";function cg(e){if(!ig(e))return!1;var t=ng(e);return t==og||t==sg||t==ag||t==ug}Ts.exports=cg});var As=u((Cw,Es)=>{var lg=me(),fg=lg["__core-js_shared__"];Es.exports=fg});var Is=u((Lw,Rs)=>{var aa=As(),Os=function(){var e=/[^.]+$/.exec(aa&&aa.keys&&aa.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""}();function dg(e){return!!Os&&Os in e}Rs.exports=dg});var oa=u((kw,Ns)=>{var pg=Function.prototype,hg=pg.toString;function vg(e){if(e!=null){try{return hg.call(e)}catch{}try{return e+""}catch{}}return""}Ns.exports=vg});var Ps=u((qw,Ss)=>{var _g=kt(),yg=Is(),mg=ge(),gg=oa(),Tg=/[\\^$.*+?()[\]{}|]/g,Eg=/^\[object .+?Constructor\]$/,Ag=Function.prototype,Og=Object.prototype,Rg=Ag.toString,Ig=Og.hasOwnProperty,Ng=RegExp("^"+Rg.call(Ig).replace(Tg,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Sg(e){if(!mg(e)||yg(e))return!1;var t=_g(e)?Ng:Eg;return t.test(gg(e))}Ss.exports=Sg});var bs=u((Mw,xs)=>{function Pg(e,t){return e?.[t]}xs.exports=Pg});var at=u((Fw,Cs)=>{var xg=Ps(),bg=bs();function Cg(e,t){var r=bg(e,t);return xg(r)?r:void 0}Cs.exports=Cg});var ks=u((ww,Ls)=>{var Lg=at(),kg=me(),qg=Lg(kg,"DataView");Ls.exports=qg});var Rn=u((Dw,qs)=>{var Mg=at(),Fg=me(),wg=Mg(Fg,"Map");qs.exports=wg});var Fs=u((Uw,Ms)=>{var Dg=at(),Ug=me(),jg=Dg(Ug,"Promise");Ms.exports=jg});var sa=u((jw,ws)=>{var Gg=at(),Bg=me(),Wg=Gg(Bg,"Set");ws.exports=Wg});var Us=u((Gw,Ds)=>{var Kg=at(),Vg=me(),Hg=Kg(Vg,"WeakMap");Ds.exports=Hg});var Mt=u((Bw,Hs)=>{var ua=ks(),ca=Rn(),la=Fs(),fa=sa(),da=Us(),Vs=it(),qt=oa(),js="[object Map]",zg="[object Object]",Gs="[object Promise]",Bs="[object Set]",Ws="[object WeakMap]",Ks="[object DataView]",Xg=qt(ua),Yg=qt(ca),$g=qt(la),Zg=qt(fa),Jg=qt(da),mt=Vs;(ua&&mt(new ua(new ArrayBuffer(1)))!=Ks||ca&&mt(new ca)!=js||la&&mt(la.resolve())!=Gs||fa&&mt(new fa)!=Bs||da&&mt(new da)!=Ws)&&(mt=function(e){var t=Vs(e),r=t==zg?e.constructor:void 0,n=r?qt(r):"";if(n)switch(n){case Xg:return Ks;case Yg:return js;case $g:return Gs;case Zg:return Bs;case Jg:return Ws}return t});Hs.exports=mt});var Te=u((Ww,zs)=>{function Qg(e){return e!=null&&typeof e=="object"}zs.exports=Qg});var Ys=u((Kw,Xs)=>{var eT=it(),tT=Te(),rT="[object Arguments]";function nT(e){return tT(e)&&eT(e)==rT}Xs.exports=nT});var kr=u((Vw,Js)=>{var $s=Ys(),iT=Te(),Zs=Object.prototype,aT=Zs.hasOwnProperty,oT=Zs.propertyIsEnumerable,sT=$s(function(){return arguments}())?$s:function(e){return iT(e)&&aT.call(e,"callee")&&!oT.call(e,"callee")};Js.exports=sT});var C=u((Hw,Qs)=>{var uT=Array.isArray;Qs.exports=uT});var In=u((zw,eu)=>{var cT=9007199254740991;function lT(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=cT}eu.exports=lT});var Ee=u((Xw,tu)=>{var fT=kt(),dT=In();function pT(e){return e!=null&&dT(e.length)&&!fT(e)}tu.exports=pT});var nu=u((Yw,ru)=>{function hT(){return!1}ru.exports=hT});var Mr=u((qr,Ft)=>{var vT=me(),_T=nu(),ou=typeof qr=="object"&&qr&&!qr.nodeType&&qr,iu=ou&&typeof Ft=="object"&&Ft&&!Ft.nodeType&&Ft,yT=iu&&iu.exports===ou,au=yT?vT.Buffer:void 0,mT=au?au.isBuffer:void 0,gT=mT||_T;Ft.exports=gT});var uu=u(($w,su)=>{var TT=it(),ET=In(),AT=Te(),OT="[object Arguments]",RT="[object Array]",IT="[object Boolean]",NT="[object Date]",ST="[object Error]",PT="[object Function]",xT="[object Map]",bT="[object Number]",CT="[object Object]",LT="[object RegExp]",kT="[object Set]",qT="[object String]",MT="[object WeakMap]",FT="[object ArrayBuffer]",wT="[object DataView]",DT="[object Float32Array]",UT="[object Float64Array]",jT="[object Int8Array]",GT="[object Int16Array]",BT="[object Int32Array]",WT="[object Uint8Array]",KT="[object Uint8ClampedArray]",VT="[object Uint16Array]",HT="[object Uint32Array]",F={};F[DT]=F[UT]=F[jT]=F[GT]=F[BT]=F[WT]=F[KT]=F[VT]=F[HT]=!0;F[OT]=F[RT]=F[FT]=F[IT]=F[wT]=F[NT]=F[ST]=F[PT]=F[xT]=F[bT]=F[CT]=F[LT]=F[kT]=F[qT]=F[MT]=!1;function zT(e){return AT(e)&&ET(e.length)&&!!F[TT(e)]}su.exports=zT});var wt=u((Zw,cu)=>{function XT(e){return function(t){return e(t)}}cu.exports=XT});var Dr=u((Fr,Dt)=>{var YT=ia(),lu=typeof Fr=="object"&&Fr&&!Fr.nodeType&&Fr,wr=lu&&typeof Dt=="object"&&Dt&&!Dt.nodeType&&Dt,$T=wr&&wr.exports===lu,pa=$T&&YT.process,ZT=function(){try{var e=wr&&wr.require&&wr.require("util").types;return e||pa&&pa.binding&&pa.binding("util")}catch{}}();Dt.exports=ZT});var Nn=u((Jw,pu)=>{var JT=uu(),QT=wt(),fu=Dr(),du=fu&&fu.isTypedArray,eE=du?QT(du):JT;pu.exports=eE});var pe=u((Qw,hu)=>{var tE=na(),rE=Mt(),nE=kr(),iE=C(),aE=Ee(),oE=Mr(),sE=Lt(),uE=Nn(),cE="[object Map]",lE="[object Set]",fE=Object.prototype,dE=fE.hasOwnProperty;function pE(e){if(e==null)return!0;if(aE(e)&&(iE(e)||typeof e=="string"||typeof e.splice=="function"||oE(e)||uE(e)||nE(e)))return!e.length;var t=rE(e);if(t==cE||t==lE)return!e.size;if(sE(e))return!tE(e).length;for(var r in e)if(dE.call(e,r))return!1;return!0}hu.exports=pE});var Ut=u((eD,vu)=>{function hE(e,t){for(var r=-1,n=e==null?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}vu.exports=hE});var yu=u((tD,_u)=>{function vE(){this.__data__=[],this.size=0}_u.exports=vE});var jt=u((rD,mu)=>{function _E(e,t){return e===t||e!==e&&t!==t}mu.exports=_E});var Ur=u((nD,gu)=>{var yE=jt();function mE(e,t){for(var r=e.length;r--;)if(yE(e[r][0],t))return r;return-1}gu.exports=mE});var Eu=u((iD,Tu)=>{var gE=Ur(),TE=Array.prototype,EE=TE.splice;function AE(e){var t=this.__data__,r=gE(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():EE.call(t,r,1),--this.size,!0}Tu.exports=AE});var Ou=u((aD,Au)=>{var OE=Ur();function RE(e){var t=this.__data__,r=OE(t,e);return r<0?void 0:t[r][1]}Au.exports=RE});var Iu=u((oD,Ru)=>{var IE=Ur();function NE(e){return IE(this.__data__,e)>-1}Ru.exports=NE});var Su=u((sD,Nu)=>{var SE=Ur();function PE(e,t){var r=this.__data__,n=SE(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}Nu.exports=PE});var jr=u((uD,Pu)=>{var xE=yu(),bE=Eu(),CE=Ou(),LE=Iu(),kE=Su();function Gt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Gt.prototype.clear=xE;Gt.prototype.delete=bE;Gt.prototype.get=CE;Gt.prototype.has=LE;Gt.prototype.set=kE;Pu.exports=Gt});var bu=u((cD,xu)=>{var qE=jr();function ME(){this.__data__=new qE,this.size=0}xu.exports=ME});var Lu=u((lD,Cu)=>{function FE(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}Cu.exports=FE});var qu=u((fD,ku)=>{function wE(e){return this.__data__.get(e)}ku.exports=wE});var Fu=u((dD,Mu)=>{function DE(e){return this.__data__.has(e)}Mu.exports=DE});var Gr=u((pD,wu)=>{var UE=at(),jE=UE(Object,"create");wu.exports=jE});var ju=u((hD,Uu)=>{var Du=Gr();function GE(){this.__data__=Du?Du(null):{},this.size=0}Uu.exports=GE});var Bu=u((vD,Gu)=>{function BE(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}Gu.exports=BE});var Ku=u((_D,Wu)=>{var WE=Gr(),KE="__lodash_hash_undefined__",VE=Object.prototype,HE=VE.hasOwnProperty;function zE(e){var t=this.__data__;if(WE){var r=t[e];return r===KE?void 0:r}return HE.call(t,e)?t[e]:void 0}Wu.exports=zE});var Hu=u((yD,Vu)=>{var XE=Gr(),YE=Object.prototype,$E=YE.hasOwnProperty;function ZE(e){var t=this.__data__;return XE?t[e]!==void 0:$E.call(t,e)}Vu.exports=ZE});var Xu=u((mD,zu)=>{var JE=Gr(),QE="__lodash_hash_undefined__";function eA(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=JE&&t===void 0?QE:t,this}zu.exports=eA});var $u=u((gD,Yu)=>{var tA=ju(),rA=Bu(),nA=Ku(),iA=Hu(),aA=Xu();function Bt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Bt.prototype.clear=tA;Bt.prototype.delete=rA;Bt.prototype.get=nA;Bt.prototype.has=iA;Bt.prototype.set=aA;Yu.exports=Bt});var Qu=u((TD,Ju)=>{var Zu=$u(),oA=jr(),sA=Rn();function uA(){this.size=0,this.__data__={hash:new Zu,map:new(sA||oA),string:new Zu}}Ju.exports=uA});var tc=u((ED,ec)=>{function cA(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}ec.exports=cA});var Br=u((AD,rc)=>{var lA=tc();function fA(e,t){var r=e.__data__;return lA(t)?r[typeof t=="string"?"string":"hash"]:r.map}rc.exports=fA});var ic=u((OD,nc)=>{var dA=Br();function pA(e){var t=dA(this,e).delete(e);return this.size-=t?1:0,t}nc.exports=pA});var oc=u((RD,ac)=>{var hA=Br();function vA(e){return hA(this,e).get(e)}ac.exports=vA});var uc=u((ID,sc)=>{var _A=Br();function yA(e){return _A(this,e).has(e)}sc.exports=yA});var lc=u((ND,cc)=>{var mA=Br();function gA(e,t){var r=mA(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}cc.exports=gA});var Sn=u((SD,fc)=>{var TA=Qu(),EA=ic(),AA=oc(),OA=uc(),RA=lc();function Wt(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}Wt.prototype.clear=TA;Wt.prototype.delete=EA;Wt.prototype.get=AA;Wt.prototype.has=OA;Wt.prototype.set=RA;fc.exports=Wt});var pc=u((PD,dc)=>{var IA=jr(),NA=Rn(),SA=Sn(),PA=200;function xA(e,t){var r=this.__data__;if(r instanceof IA){var n=r.__data__;if(!NA||n.length<PA-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new SA(n)}return r.set(e,t),this.size=r.size,this}dc.exports=xA});var Pn=u((xD,hc)=>{var bA=jr(),CA=bu(),LA=Lu(),kA=qu(),qA=Fu(),MA=pc();function Kt(e){var t=this.__data__=new bA(e);this.size=t.size}Kt.prototype.clear=CA;Kt.prototype.delete=LA;Kt.prototype.get=kA;Kt.prototype.has=qA;Kt.prototype.set=MA;hc.exports=Kt});var _c=u((bD,vc)=>{var FA="__lodash_hash_undefined__";function wA(e){return this.__data__.set(e,FA),this}vc.exports=wA});var mc=u((CD,yc)=>{function DA(e){return this.__data__.has(e)}yc.exports=DA});var bn=u((LD,gc)=>{var UA=Sn(),jA=_c(),GA=mc();function xn(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new UA;++t<r;)this.add(e[t])}xn.prototype.add=xn.prototype.push=jA;xn.prototype.has=GA;gc.exports=xn});var ha=u((kD,Tc)=>{function BA(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}Tc.exports=BA});var Cn=u((qD,Ec)=>{function WA(e,t){return e.has(t)}Ec.exports=WA});var va=u((MD,Ac)=>{var KA=bn(),VA=ha(),HA=Cn(),zA=1,XA=2;function YA(e,t,r,n,i,a){var o=r&zA,s=e.length,c=t.length;if(s!=c&&!(o&&c>s))return!1;var f=a.get(e),p=a.get(t);if(f&&p)return f==t&&p==e;var d=-1,h=!0,_=r&XA?new KA:void 0;for(a.set(e,t),a.set(t,e);++d<s;){var l=e[d],v=t[d];if(n)var y=o?n(v,l,d,t,e,a):n(l,v,d,e,t,a);if(y!==void 0){if(y)continue;h=!1;break}if(_){if(!VA(t,function(T,A){if(!HA(_,A)&&(l===T||i(l,T,r,n,a)))return _.push(A)})){h=!1;break}}else if(!(l===v||i(l,v,r,n,a))){h=!1;break}}return a.delete(e),a.delete(t),h}Ac.exports=YA});var _a=u((FD,Oc)=>{var $A=me(),ZA=$A.Uint8Array;Oc.exports=ZA});var Ic=u((wD,Rc)=>{function JA(e){var t=-1,r=Array(e.size);return e.forEach(function(n,i){r[++t]=[i,n]}),r}Rc.exports=JA});var Ln=u((DD,Nc)=>{function QA(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}Nc.exports=QA});var Cc=u((UD,bc)=>{var Sc=yt(),Pc=_a(),eO=jt(),tO=va(),rO=Ic(),nO=Ln(),iO=1,aO=2,oO="[object Boolean]",sO="[object Date]",uO="[object Error]",cO="[object Map]",lO="[object Number]",fO="[object RegExp]",dO="[object Set]",pO="[object String]",hO="[object Symbol]",vO="[object ArrayBuffer]",_O="[object DataView]",xc=Sc?Sc.prototype:void 0,ya=xc?xc.valueOf:void 0;function yO(e,t,r,n,i,a,o){switch(r){case _O:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case vO:return!(e.byteLength!=t.byteLength||!a(new Pc(e),new Pc(t)));case oO:case sO:case lO:return eO(+e,+t);case uO:return e.name==t.name&&e.message==t.message;case fO:case pO:return e==t+"";case cO:var s=rO;case dO:var c=n&iO;if(s||(s=nO),e.size!=t.size&&!c)return!1;var f=o.get(e);if(f)return f==t;n|=aO,o.set(e,t);var p=tO(s(e),s(t),n,i,a,o);return o.delete(e),p;case hO:if(ya)return ya.call(e)==ya.call(t)}return!1}bc.exports=yO});var kn=u((jD,Lc)=>{function mO(e,t){for(var r=-1,n=t.length,i=e.length;++r<n;)e[i+r]=t[r];return e}Lc.exports=mO});var ma=u((GD,kc)=>{var gO=kn(),TO=C();function EO(e,t,r){var n=t(e);return TO(e)?n:gO(n,r(e))}kc.exports=EO});var qn=u((BD,qc)=>{function AO(e,t){for(var r=-1,n=e==null?0:e.length,i=0,a=[];++r<n;){var o=e[r];t(o,r,e)&&(a[i++]=o)}return a}qc.exports=AO});var ga=u((WD,Mc)=>{function OO(){return[]}Mc.exports=OO});var Mn=u((KD,wc)=>{var RO=qn(),IO=ga(),NO=Object.prototype,SO=NO.propertyIsEnumerable,Fc=Object.getOwnPropertySymbols,PO=Fc?function(e){return e==null?[]:(e=Object(e),RO(Fc(e),function(t){return SO.call(e,t)}))}:IO;wc.exports=PO});var Uc=u((VD,Dc)=>{function xO(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}Dc.exports=xO});var Wr=u((HD,jc)=>{var bO=9007199254740991,CO=/^(?:0|[1-9]\d*)$/;function LO(e,t){var r=typeof e;return t=t??bO,!!t&&(r=="number"||r!="symbol"&&CO.test(e))&&e>-1&&e%1==0&&e<t}jc.exports=LO});var Ta=u((zD,Gc)=>{var kO=Uc(),qO=kr(),MO=C(),FO=Mr(),wO=Wr(),DO=Nn(),UO=Object.prototype,jO=UO.hasOwnProperty;function GO(e,t){var r=MO(e),n=!r&&qO(e),i=!r&&!n&&FO(e),a=!r&&!n&&!i&&DO(e),o=r||n||i||a,s=o?kO(e.length,String):[],c=s.length;for(var f in e)(t||jO.call(e,f))&&!(o&&(f=="length"||i&&(f=="offset"||f=="parent")||a&&(f=="buffer"||f=="byteLength"||f=="byteOffset")||wO(f,c)))&&s.push(f);return s}Gc.exports=GO});var ce=u((XD,Bc)=>{var BO=Ta(),WO=na(),KO=Ee();function VO(e){return KO(e)?BO(e):WO(e)}Bc.exports=VO});var Ea=u((YD,Wc)=>{var HO=ma(),zO=Mn(),XO=ce();function YO(e){return HO(e,XO,zO)}Wc.exports=YO});var Hc=u(($D,Vc)=>{var Kc=Ea(),$O=1,ZO=Object.prototype,JO=ZO.hasOwnProperty;function QO(e,t,r,n,i,a){var o=r&$O,s=Kc(e),c=s.length,f=Kc(t),p=f.length;if(c!=p&&!o)return!1;for(var d=c;d--;){var h=s[d];if(!(o?h in t:JO.call(t,h)))return!1}var _=a.get(e),l=a.get(t);if(_&&l)return _==t&&l==e;var v=!0;a.set(e,t),a.set(t,e);for(var y=o;++d<c;){h=s[d];var T=e[h],A=t[h];if(n)var g=o?n(A,T,h,t,e,a):n(T,A,h,e,t,a);if(!(g===void 0?T===A||i(T,A,r,n,a):g)){v=!1;break}y||(y=h=="constructor")}if(v&&!y){var R=e.constructor,V=t.constructor;R!=V&&"constructor"in e&&"constructor"in t&&!(typeof R=="function"&&R instanceof R&&typeof V=="function"&&V instanceof V)&&(v=!1)}return a.delete(e),a.delete(t),v}Vc.exports=QO});var el=u((ZD,Qc)=>{var Aa=Pn(),eR=va(),tR=Cc(),rR=Hc(),zc=Mt(),Xc=C(),Yc=Mr(),nR=Nn(),iR=1,$c="[object Arguments]",Zc="[object Array]",Fn="[object Object]",aR=Object.prototype,Jc=aR.hasOwnProperty;function oR(e,t,r,n,i,a){var o=Xc(e),s=Xc(t),c=o?Zc:zc(e),f=s?Zc:zc(t);c=c==$c?Fn:c,f=f==$c?Fn:f;var p=c==Fn,d=f==Fn,h=c==f;if(h&&Yc(e)){if(!Yc(t))return!1;o=!0,p=!1}if(h&&!p)return a||(a=new Aa),o||nR(e)?eR(e,t,r,n,i,a):tR(e,t,c,r,n,i,a);if(!(r&iR)){var _=p&&Jc.call(e,"__wrapped__"),l=d&&Jc.call(t,"__wrapped__");if(_||l){var v=_?e.value():e,y=l?t.value():t;return a||(a=new Aa),i(v,y,r,n,a)}}return h?(a||(a=new Aa),rR(e,t,r,n,i,a)):!1}Qc.exports=oR});var Oa=u((JD,nl)=>{var sR=el(),tl=Te();function rl(e,t,r,n,i){return e===t?!0:e==null||t==null||!tl(e)&&!tl(t)?e!==e&&t!==t:sR(e,t,r,n,rl,i)}nl.exports=rl});var al=u((QD,il)=>{var uR=Pn(),cR=Oa(),lR=1,fR=2;function dR(e,t,r,n){var i=r.length,a=i,o=!n;if(e==null)return!a;for(e=Object(e);i--;){var s=r[i];if(o&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++i<a;){s=r[i];var c=s[0],f=e[c],p=s[1];if(o&&s[2]){if(f===void 0&&!(c in e))return!1}else{var d=new uR;if(n)var h=n(f,p,c,e,t,d);if(!(h===void 0?cR(p,f,lR|fR,n,d):h))return!1}}return!0}il.exports=dR});var Ra=u((eU,ol)=>{var pR=ge();function hR(e){return e===e&&!pR(e)}ol.exports=hR});var ul=u((tU,sl)=>{var vR=Ra(),_R=ce();function yR(e){for(var t=_R(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,vR(i)]}return t}sl.exports=yR});var Ia=u((rU,cl)=>{function mR(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}cl.exports=mR});var fl=u((nU,ll)=>{var gR=al(),TR=ul(),ER=Ia();function AR(e){var t=TR(e);return t.length==1&&t[0][2]?ER(t[0][0],t[0][1]):function(r){return r===e||gR(r,e,t)}}ll.exports=AR});var Kr=u((iU,dl)=>{var OR=it(),RR=Te(),IR="[object Symbol]";function NR(e){return typeof e=="symbol"||RR(e)&&OR(e)==IR}dl.exports=NR});var wn=u((aU,pl)=>{var SR=C(),PR=Kr(),xR=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,bR=/^\w*$/;function CR(e,t){if(SR(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||PR(e)?!0:bR.test(e)||!xR.test(e)||t!=null&&e in Object(t)}pl.exports=CR});var _l=u((oU,vl)=>{var hl=Sn(),LR="Expected a function";function Na(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(LR);var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var o=e.apply(this,n);return r.cache=a.set(i,o)||a,o};return r.cache=new(Na.Cache||hl),r}Na.Cache=hl;vl.exports=Na});var ml=u((sU,yl)=>{var kR=_l(),qR=500;function MR(e){var t=kR(e,function(n){return r.size===qR&&r.clear(),n}),r=t.cache;return t}yl.exports=MR});var Tl=u((uU,gl)=>{var FR=ml(),wR=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,DR=/\\(\\)?/g,UR=FR(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(wR,function(r,n,i,a){t.push(i?a.replace(DR,"$1"):n||r)}),t});gl.exports=UR});var Nl=u((cU,Il)=>{var El=yt(),jR=Ut(),GR=C(),BR=Kr(),WR=1/0,Al=El?El.prototype:void 0,Ol=Al?Al.toString:void 0;function Rl(e){if(typeof e=="string")return e;if(GR(e))return jR(e,Rl)+"";if(BR(e))return Ol?Ol.call(e):"";var t=e+"";return t=="0"&&1/e==-WR?"-0":t}Il.exports=Rl});var Sa=u((lU,Sl)=>{var KR=Nl();function VR(e){return e==null?"":KR(e)}Sl.exports=VR});var Vr=u((fU,Pl)=>{var HR=C(),zR=wn(),XR=Tl(),YR=Sa();function $R(e,t){return HR(e)?e:zR(e,t)?[e]:XR(YR(e))}Pl.exports=$R});var Vt=u((dU,xl)=>{var ZR=Kr(),JR=1/0;function QR(e){if(typeof e=="string"||ZR(e))return e;var t=e+"";return t=="0"&&1/e==-JR?"-0":t}xl.exports=QR});var Dn=u((pU,bl)=>{var eI=Vr(),tI=Vt();function rI(e,t){t=eI(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[tI(t[r++])];return r&&r==n?e:void 0}bl.exports=rI});var Ll=u((hU,Cl)=>{var nI=Dn();function iI(e,t,r){var n=e==null?void 0:nI(e,t);return n===void 0?r:n}Cl.exports=iI});var ql=u((vU,kl)=>{function aI(e,t){return e!=null&&t in Object(e)}kl.exports=aI});var Pa=u((_U,Ml)=>{var oI=Vr(),sI=kr(),uI=C(),cI=Wr(),lI=In(),fI=Vt();function dI(e,t,r){t=oI(t,e);for(var n=-1,i=t.length,a=!1;++n<i;){var o=fI(t[n]);if(!(a=e!=null&&r(e,o)))break;e=e[o]}return a||++n!=i?a:(i=e==null?0:e.length,!!i&&lI(i)&&cI(o,i)&&(uI(e)||sI(e)))}Ml.exports=dI});var wl=u((yU,Fl)=>{var pI=ql(),hI=Pa();function vI(e,t){return e!=null&&hI(e,t,pI)}Fl.exports=vI});var Ul=u((mU,Dl)=>{var _I=Oa(),yI=Ll(),mI=wl(),gI=wn(),TI=Ra(),EI=Ia(),AI=Vt(),OI=1,RI=2;function II(e,t){return gI(e)&&TI(t)?EI(AI(e),t):function(r){var n=yI(r,e);return n===void 0&&n===t?mI(r,e):_I(t,n,OI|RI)}}Dl.exports=II});var Ht=u((gU,jl)=>{function NI(e){return e}jl.exports=NI});var Bl=u((TU,Gl)=>{function SI(e){return function(t){return t?.[e]}}Gl.exports=SI});var Kl=u((EU,Wl)=>{var PI=Dn();function xI(e){return function(t){return PI(t,e)}}Wl.exports=xI});var Hl=u((AU,Vl)=>{var bI=Bl(),CI=Kl(),LI=wn(),kI=Vt();function qI(e){return LI(e)?bI(kI(e)):CI(e)}Vl.exports=qI});var Ae=u((OU,zl)=>{var MI=fl(),FI=Ul(),wI=Ht(),DI=C(),UI=Hl();function jI(e){return typeof e=="function"?e:e==null?wI:typeof e=="object"?DI(e)?FI(e[0],e[1]):MI(e):UI(e)}zl.exports=jI});var Yl=u((RU,Xl)=>{function GI(e){return function(t,r,n){for(var i=-1,a=Object(t),o=n(t),s=o.length;s--;){var c=o[e?s:++i];if(r(a[c],c,a)===!1)break}return t}}Xl.exports=GI});var Zl=u((IU,$l)=>{var BI=Yl(),WI=BI();$l.exports=WI});var Ql=u((NU,Jl)=>{var KI=Zl(),VI=ce();function HI(e,t){return e&&KI(e,t,VI)}Jl.exports=HI});var tf=u((SU,ef)=>{var zI=Ee();function XI(e,t){return function(r,n){if(r==null)return r;if(!zI(r))return e(r,n);for(var i=r.length,a=t?i:-1,o=Object(r);(t?a--:++a<i)&&n(o[a],a,o)!==!1;);return r}}ef.exports=XI});var ot=u((PU,rf)=>{var YI=Ql(),$I=tf(),ZI=$I(YI);rf.exports=ZI});var af=u((xU,nf)=>{var JI=ot(),QI=Ee();function eN(e,t){var r=-1,n=QI(e)?Array(e.length):[];return JI(e,function(i,a,o){n[++r]=t(i,a,o)}),n}nf.exports=eN});var Q=u((bU,of)=>{var tN=Ut(),rN=Ae(),nN=af(),iN=C();function aN(e,t){var r=iN(e)?tN:nN;return r(e,rN(t,3))}of.exports=aN});var xa=u((CU,sf)=>{function oN(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}sf.exports=oN});var cf=u((LU,uf)=>{var sN=Ht();function uN(e){return typeof e=="function"?e:sN}uf.exports=uN});var z=u((kU,lf)=>{var cN=xa(),lN=ot(),fN=cf(),dN=C();function pN(e,t){var r=dN(e)?cN:lN;return r(e,fN(t))}lf.exports=pN});var df=u((qU,ff)=>{var hN=Ut();function vN(e,t){return hN(t,function(r){return e[r]})}ff.exports=vN});var Pe=u((MU,pf)=>{var _N=df(),yN=ce();function mN(e){return e==null?[]:_N(e,yN(e))}pf.exports=mN});var vf=u((FU,hf)=>{var gN=Object.prototype,TN=gN.hasOwnProperty;function EN(e,t){return e!=null&&TN.call(e,t)}hf.exports=EN});var le=u((wU,_f)=>{var AN=vf(),ON=Pa();function RN(e,t){return e!=null&&ON(e,t,AN)}_f.exports=RN});var ba=u((DU,yf)=>{var IN=at(),NN=function(){try{var e=IN(Object,"defineProperty");return e({},"",{}),e}catch{}}();yf.exports=NN});var Un=u((UU,gf)=>{var mf=ba();function SN(e,t,r){t=="__proto__"&&mf?mf(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}gf.exports=SN});var Hr=u((jU,Tf)=>{var PN=Un(),xN=jt(),bN=Object.prototype,CN=bN.hasOwnProperty;function LN(e,t,r){var n=e[t];(!(CN.call(e,t)&&xN(n,r))||r===void 0&&!(t in e))&&PN(e,t,r)}Tf.exports=LN});var zt=u((GU,Ef)=>{var kN=Hr(),qN=Un();function MN(e,t,r,n){var i=!r;r||(r={});for(var a=-1,o=t.length;++a<o;){var s=t[a],c=n?n(r[s],e[s],s,r,e):void 0;c===void 0&&(c=e[s]),i?qN(r,s,c):kN(r,s,c)}return r}Ef.exports=MN});var Of=u((BU,Af)=>{var FN=zt(),wN=ce();function DN(e,t){return e&&FN(t,wN(t),e)}Af.exports=DN});var If=u((WU,Rf)=>{function UN(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}Rf.exports=UN});var Sf=u((KU,Nf)=>{var jN=ge(),GN=Lt(),BN=If(),WN=Object.prototype,KN=WN.hasOwnProperty;function VN(e){if(!jN(e))return BN(e);var t=GN(e),r=[];for(var n in e)n=="constructor"&&(t||!KN.call(e,n))||r.push(n);return r}Nf.exports=VN});var zr=u((VU,Pf)=>{var HN=Ta(),zN=Sf(),XN=Ee();function YN(e){return XN(e)?HN(e,!0):zN(e)}Pf.exports=YN});var bf=u((HU,xf)=>{var $N=zt(),ZN=zr();function JN(e,t){return e&&$N(t,ZN(t),e)}xf.exports=JN});var Mf=u((Xr,Xt)=>{var QN=me(),qf=typeof Xr=="object"&&Xr&&!Xr.nodeType&&Xr,Cf=qf&&typeof Xt=="object"&&Xt&&!Xt.nodeType&&Xt,eS=Cf&&Cf.exports===qf,Lf=eS?QN.Buffer:void 0,kf=Lf?Lf.allocUnsafe:void 0;function tS(e,t){if(t)return e.slice();var r=e.length,n=kf?kf(r):new e.constructor(r);return e.copy(n),n}Xt.exports=tS});var wf=u((zU,Ff)=>{function rS(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}Ff.exports=rS});var Uf=u((XU,Df)=>{var nS=zt(),iS=Mn();function aS(e,t){return nS(e,iS(e),t)}Df.exports=aS});var Ca=u((YU,jf)=>{var oS=ra(),sS=oS(Object.getPrototypeOf,Object);jf.exports=sS});var La=u(($U,Gf)=>{var uS=kn(),cS=Ca(),lS=Mn(),fS=ga(),dS=Object.getOwnPropertySymbols,pS=dS?function(e){for(var t=[];e;)uS(t,lS(e)),e=cS(e);return t}:fS;Gf.exports=pS});var Wf=u((ZU,Bf)=>{var hS=zt(),vS=La();function _S(e,t){return hS(e,vS(e),t)}Bf.exports=_S});var ka=u((JU,Kf)=>{var yS=ma(),mS=La(),gS=zr();function TS(e){return yS(e,gS,mS)}Kf.exports=TS});var Hf=u((QU,Vf)=>{var ES=Object.prototype,AS=ES.hasOwnProperty;function OS(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&AS.call(e,"index")&&(r.index=e.index,r.input=e.input),r}Vf.exports=OS});var jn=u((ej,Xf)=>{var zf=_a();function RS(e){var t=new e.constructor(e.byteLength);return new zf(t).set(new zf(e)),t}Xf.exports=RS});var $f=u((tj,Yf)=>{var IS=jn();function NS(e,t){var r=t?IS(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}Yf.exports=NS});var Jf=u((rj,Zf)=>{var SS=/\w*$/;function PS(e){var t=new e.constructor(e.source,SS.exec(e));return t.lastIndex=e.lastIndex,t}Zf.exports=PS});var nd=u((nj,rd)=>{var Qf=yt(),ed=Qf?Qf.prototype:void 0,td=ed?ed.valueOf:void 0;function xS(e){return td?Object(td.call(e)):{}}rd.exports=xS});var ad=u((ij,id)=>{var bS=jn();function CS(e,t){var r=t?bS(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}id.exports=CS});var sd=u((aj,od)=>{var LS=jn(),kS=$f(),qS=Jf(),MS=nd(),FS=ad(),wS="[object Boolean]",DS="[object Date]",US="[object Map]",jS="[object Number]",GS="[object RegExp]",BS="[object Set]",WS="[object String]",KS="[object Symbol]",VS="[object ArrayBuffer]",HS="[object DataView]",zS="[object Float32Array]",XS="[object Float64Array]",YS="[object Int8Array]",$S="[object Int16Array]",ZS="[object Int32Array]",JS="[object Uint8Array]",QS="[object Uint8ClampedArray]",eP="[object Uint16Array]",tP="[object Uint32Array]";function rP(e,t,r){var n=e.constructor;switch(t){case VS:return LS(e);case wS:case DS:return new n(+e);case HS:return kS(e,r);case zS:case XS:case YS:case $S:case ZS:case JS:case QS:case eP:case tP:return FS(e,r);case US:return new n;case jS:case WS:return new n(e);case GS:return qS(e);case BS:return new n;case KS:return MS(e)}}od.exports=rP});var ld=u((oj,cd)=>{var nP=ge(),ud=Object.create,iP=function(){function e(){}return function(t){if(!nP(t))return{};if(ud)return ud(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();cd.exports=iP});var dd=u((sj,fd)=>{var aP=ld(),oP=Ca(),sP=Lt();function uP(e){return typeof e.constructor=="function"&&!sP(e)?aP(oP(e)):{}}fd.exports=uP});var hd=u((uj,pd)=>{var cP=Mt(),lP=Te(),fP="[object Map]";function dP(e){return lP(e)&&cP(e)==fP}pd.exports=dP});var md=u((cj,yd)=>{var pP=hd(),hP=wt(),vd=Dr(),_d=vd&&vd.isMap,vP=_d?hP(_d):pP;yd.exports=vP});var Td=u((lj,gd)=>{var _P=Mt(),yP=Te(),mP="[object Set]";function gP(e){return yP(e)&&_P(e)==mP}gd.exports=gP});var Rd=u((fj,Od)=>{var TP=Td(),EP=wt(),Ed=Dr(),Ad=Ed&&Ed.isSet,AP=Ad?EP(Ad):TP;Od.exports=AP});var xd=u((dj,Pd)=>{var OP=Pn(),RP=xa(),IP=Hr(),NP=Of(),SP=bf(),PP=Mf(),xP=wf(),bP=Uf(),CP=Wf(),LP=Ea(),kP=ka(),qP=Mt(),MP=Hf(),FP=sd(),wP=dd(),DP=C(),UP=Mr(),jP=md(),GP=ge(),BP=Rd(),WP=ce(),KP=zr(),VP=1,HP=2,zP=4,Id="[object Arguments]",XP="[object Array]",YP="[object Boolean]",$P="[object Date]",ZP="[object Error]",Nd="[object Function]",JP="[object GeneratorFunction]",QP="[object Map]",e0="[object Number]",Sd="[object Object]",t0="[object RegExp]",r0="[object Set]",n0="[object String]",i0="[object Symbol]",a0="[object WeakMap]",o0="[object ArrayBuffer]",s0="[object DataView]",u0="[object Float32Array]",c0="[object Float64Array]",l0="[object Int8Array]",f0="[object Int16Array]",d0="[object Int32Array]",p0="[object Uint8Array]",h0="[object Uint8ClampedArray]",v0="[object Uint16Array]",_0="[object Uint32Array]",M={};M[Id]=M[XP]=M[o0]=M[s0]=M[YP]=M[$P]=M[u0]=M[c0]=M[l0]=M[f0]=M[d0]=M[QP]=M[e0]=M[Sd]=M[t0]=M[r0]=M[n0]=M[i0]=M[p0]=M[h0]=M[v0]=M[_0]=!0;M[ZP]=M[Nd]=M[a0]=!1;function Gn(e,t,r,n,i,a){var o,s=t&VP,c=t&HP,f=t&zP;if(r&&(o=i?r(e,n,i,a):r(e)),o!==void 0)return o;if(!GP(e))return e;var p=DP(e);if(p){if(o=MP(e),!s)return xP(e,o)}else{var d=qP(e),h=d==Nd||d==JP;if(UP(e))return PP(e,s);if(d==Sd||d==Id||h&&!i){if(o=c||h?{}:wP(e),!s)return c?CP(e,SP(o,e)):bP(e,NP(o,e))}else{if(!M[d])return i?e:{};o=FP(e,d,s)}}a||(a=new OP);var _=a.get(e);if(_)return _;a.set(e,o),BP(e)?e.forEach(function(y){o.add(Gn(y,t,r,y,e,a))}):jP(e)&&e.forEach(function(y,T){o.set(T,Gn(y,t,r,T,e,a))});var l=f?c?kP:LP:c?KP:WP,v=p?void 0:l(e);return RP(v||e,function(y,T){v&&(T=y,y=e[T]),IP(o,T,Gn(y,t,r,T,e,a))}),o}Pd.exports=Gn});var Ke=u((pj,bd)=>{var y0=xd(),m0=4;function g0(e){return y0(e,m0)}bd.exports=g0});var Cd=u(Yt=>{"use strict";Object.defineProperty(Yt,"__esModule",{value:!0});Yt.PRINT_WARNING=Yt.PRINT_ERROR=void 0;function T0(e){console&&console.error&&console.error("Error: ".concat(e))}Yt.PRINT_ERROR=T0;function E0(e){console&&console.warn&&console.warn("Warning: ".concat(e))}Yt.PRINT_WARNING=E0});var Ld=u(Bn=>{"use strict";Object.defineProperty(Bn,"__esModule",{value:!0});Bn.timer=void 0;function A0(e){var t=new Date().getTime(),r=e(),n=new Date().getTime(),i=n-t;return{time:i,value:r}}Bn.timer=A0});var kd=u((exports,module)=>{"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.toFastProperties=void 0;function toFastProperties(toBecomeFast){function FakeConstructor(){}FakeConstructor.prototype=toBecomeFast;var fakeInstance=new FakeConstructor;function fakeAccess(){return typeof fakeInstance.bar}return fakeAccess(),fakeAccess(),toBecomeFast;eval(toBecomeFast)}exports.toFastProperties=toFastProperties});var $t=u(xe=>{"use strict";Object.defineProperty(xe,"__esModule",{value:!0});xe.toFastProperties=xe.timer=xe.PRINT_ERROR=xe.PRINT_WARNING=void 0;var qd=Cd();Object.defineProperty(xe,"PRINT_WARNING",{enumerable:!0,get:function(){return qd.PRINT_WARNING}});Object.defineProperty(xe,"PRINT_ERROR",{enumerable:!0,get:function(){return qd.PRINT_ERROR}});var O0=Ld();Object.defineProperty(xe,"timer",{enumerable:!0,get:function(){return O0.timer}});var R0=kd();Object.defineProperty(xe,"toFastProperties",{enumerable:!0,get:function(){return R0.toFastProperties}})});var Wn=u((yj,Md)=>{function I0(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++n<i;)a[n]=e[n+t];return a}Md.exports=I0});var wd=u((mj,Fd)=>{var N0=/\s/;function S0(e){for(var t=e.length;t--&&N0.test(e.charAt(t)););return t}Fd.exports=S0});var Ud=u((gj,Dd)=>{var P0=wd(),x0=/^\s+/;function b0(e){return e&&e.slice(0,P0(e)+1).replace(x0,"")}Dd.exports=b0});var Wd=u((Tj,Bd)=>{var C0=Ud(),jd=ge(),L0=Kr(),Gd=0/0,k0=/^[-+]0x[0-9a-f]+$/i,q0=/^0b[01]+$/i,M0=/^0o[0-7]+$/i,F0=parseInt;function w0(e){if(typeof e=="number")return e;if(L0(e))return Gd;if(jd(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=jd(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=C0(e);var r=q0.test(e);return r||M0.test(e)?F0(e.slice(2),r?2:8):k0.test(e)?Gd:+e}Bd.exports=w0});var Hd=u((Ej,Vd)=>{var D0=Wd(),Kd=1/0,U0=17976931348623157e292;function j0(e){if(!e)return e===0?e:0;if(e=D0(e),e===Kd||e===-Kd){var t=e<0?-1:1;return t*U0}return e===e?e:0}Vd.exports=j0});var Zt=u((Aj,zd)=>{var G0=Hd();function B0(e){var t=G0(e),r=t%1;return t===t?r?t-r:t:0}zd.exports=B0});var Kn=u((Oj,Xd)=>{var W0=Wn(),K0=Zt();function V0(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:K0(t),W0(e,t<0?0:t,n)):[]}Xd.exports=V0});var Yr=u((Rj,Yd)=>{var H0=it(),z0=C(),X0=Te(),Y0="[object String]";function $0(e){return typeof e=="string"||!z0(e)&&X0(e)&&H0(e)==Y0}Yd.exports=$0});var Zd=u((Ij,$d)=>{var Z0=it(),J0=Te(),Q0="[object RegExp]";function ex(e){return J0(e)&&Z0(e)==Q0}$d.exports=ex});var qa=u((Nj,ep)=>{var tx=Zd(),rx=wt(),Jd=Dr(),Qd=Jd&&Jd.isRegExp,nx=Qd?rx(Qd):tx;ep.exports=nx});var np=u((Sj,rp)=>{var ix=Hr(),ax=Vr(),ox=Wr(),tp=ge(),sx=Vt();function ux(e,t,r,n){if(!tp(e))return e;t=ax(t,e);for(var i=-1,a=t.length,o=a-1,s=e;s!=null&&++i<a;){var c=sx(t[i]),f=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(i!=o){var p=s[c];f=n?n(p,c,s):void 0,f===void 0&&(f=tp(p)?p:ox(t[i+1])?[]:{})}ix(s,c,f),s=s[c]}return e}rp.exports=ux});var ap=u((Pj,ip)=>{var cx=Dn(),lx=np(),fx=Vr();function dx(e,t,r){for(var n=-1,i=t.length,a={};++n<i;){var o=t[n],s=cx(e,o);r(s,o)&&lx(a,fx(o,e),s)}return a}ip.exports=dx});var Ma=u((xj,op)=>{var px=Ut(),hx=Ae(),vx=ap(),_x=ka();function yx(e,t){if(e==null)return{};var r=px(_x(e),function(n){return[n]});return t=hx(t),vx(e,r,function(n,i){return t(n,i[0])})}op.exports=yx});var up=u((bj,sp)=>{function mx(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}sp.exports=mx});var fp=u((Cj,lp)=>{var gx=up(),cp=Math.max;function Tx(e,t,r){return t=cp(t===void 0?e.length-1:t,0),function(){for(var n=arguments,i=-1,a=cp(n.length-t,0),o=Array(a);++i<a;)o[i]=n[t+i];i=-1;for(var s=Array(t+1);++i<t;)s[i]=n[i];return s[t]=r(o),gx(e,this,s)}}lp.exports=Tx});var pp=u((Lj,dp)=>{function Ex(e){return function(){return e}}dp.exports=Ex});var _p=u((kj,vp)=>{var Ax=pp(),hp=ba(),Ox=Ht(),Rx=hp?function(e,t){return hp(e,"toString",{configurable:!0,enumerable:!1,value:Ax(t),writable:!0})}:Ox;vp.exports=Rx});var mp=u((qj,yp)=>{var Ix=800,Nx=16,Sx=Date.now;function Px(e){var t=0,r=0;return function(){var n=Sx(),i=Nx-(n-r);if(r=n,i>0){if(++t>=Ix)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}yp.exports=Px});var Tp=u((Mj,gp)=>{var xx=_p(),bx=mp(),Cx=bx(xx);gp.exports=Cx});var Vn=u((Fj,Ep)=>{var Lx=Ht(),kx=fp(),qx=Tp();function Mx(e,t){return qx(kx(e,t,Lx),e+"")}Ep.exports=Mx});var $r=u((wj,Ap)=>{var Fx=jt(),wx=Ee(),Dx=Wr(),Ux=ge();function jx(e,t,r){if(!Ux(r))return!1;var n=typeof t;return(n=="number"?wx(r)&&Dx(t,r.length):n=="string"&&t in r)?Fx(r[t],e):!1}Ap.exports=jx});var Rp=u((Dj,Op)=>{var Gx=Vn(),Bx=$r();function Wx(e){return Gx(function(t,r){var n=-1,i=r.length,a=i>1?r[i-1]:void 0,o=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,o&&Bx(r[0],r[1],o)&&(a=i<3?void 0:a,i=1),t=Object(t);++n<i;){var s=r[n];s&&e(t,s,n,a)}return t})}Op.exports=Wx});var Zr=u((Uj,Ip)=>{var Kx=Hr(),Vx=zt(),Hx=Rp(),zx=Ee(),Xx=Lt(),Yx=ce(),$x=Object.prototype,Zx=$x.hasOwnProperty,Jx=Hx(function(e,t){if(Xx(t)||zx(t)){Vx(t,Yx(t),e);return}for(var r in t)Zx.call(t,r)&&Kx(e,r,t[r])});Ip.exports=Jx});var zn=u(x=>{"use strict";var Ve=x&&x.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Jt=x&&x.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(x,"__esModule",{value:!0});x.serializeProduction=x.serializeGrammar=x.Terminal=x.Alternation=x.RepetitionWithSeparator=x.Repetition=x.RepetitionMandatoryWithSeparator=x.RepetitionMandatory=x.Option=x.Alternative=x.Rule=x.NonTerminal=x.AbstractProduction=void 0;var Np=Jt(Q()),Qx=Jt(z()),Fa=Jt(Yr()),eb=Jt(qa()),be=Jt(Ma()),Ce=Jt(Zr());function tb(e){return rb(e)?e.LABEL:e.name}function rb(e){return(0,Fa.default)(e.LABEL)&&e.LABEL!==""}var Le=function(){function e(t){this._definition=t}return Object.defineProperty(e.prototype,"definition",{get:function(){return this._definition},set:function(t){this._definition=t},enumerable:!1,configurable:!0}),e.prototype.accept=function(t){t.visit(this),(0,Qx.default)(this.definition,function(r){r.accept(t)})},e}();x.AbstractProduction=Le;var Sp=function(e){Ve(t,e);function t(r){var n=e.call(this,[])||this;return n.idx=1,(0,Ce.default)(n,(0,be.default)(r,function(i){return i!==void 0})),n}return Object.defineProperty(t.prototype,"definition",{get:function(){return this.referencedRule!==void 0?this.referencedRule.definition:[]},set:function(r){},enumerable:!1,configurable:!0}),t.prototype.accept=function(r){r.visit(this)},t}(Le);x.NonTerminal=Sp;var Pp=function(e){Ve(t,e);function t(r){var n=e.call(this,r.definition)||this;return n.orgText="",(0,Ce.default)(n,(0,be.default)(r,function(i){return i!==void 0})),n}return t}(Le);x.Rule=Pp;var xp=function(e){Ve(t,e);function t(r){var n=e.call(this,r.definition)||this;return n.ignoreAmbiguities=!1,(0,Ce.default)(n,(0,be.default)(r,function(i){return i!==void 0})),n}return t}(Le);x.Alternative=xp;var bp=function(e){Ve(t,e);function t(r){var n=e.call(this,r.definition)||this;return n.idx=1,(0,Ce.default)(n,(0,be.default)(r,function(i){return i!==void 0})),n}return t}(Le);x.Option=bp;var Cp=function(e){Ve(t,e);function t(r){var n=e.call(this,r.definition)||this;return n.idx=1,(0,Ce.default)(n,(0,be.default)(r,function(i){return i!==void 0})),n}return t}(Le);x.RepetitionMandatory=Cp;var Lp=function(e){Ve(t,e);function t(r){var n=e.call(this,r.definition)||this;return n.idx=1,(0,Ce.default)(n,(0,be.default)(r,function(i){return i!==void 0})),n}return t}(Le);x.RepetitionMandatoryWithSeparator=Lp;var kp=function(e){Ve(t,e);function t(r){var n=e.call(this,r.definition)||this;return n.idx=1,(0,Ce.default)(n,(0,be.default)(r,function(i){return i!==void 0})),n}return t}(Le);x.Repetition=kp;var qp=function(e){Ve(t,e);function t(r){var n=e.call(this,r.definition)||this;return n.idx=1,(0,Ce.default)(n,(0,be.default)(r,function(i){return i!==void 0})),n}return t}(Le);x.RepetitionWithSeparator=qp;var Mp=function(e){Ve(t,e);function t(r){var n=e.call(this,r.definition)||this;return n.idx=1,n.ignoreAmbiguities=!1,n.hasPredicates=!1,(0,Ce.default)(n,(0,be.default)(r,function(i){return i!==void 0})),n}return Object.defineProperty(t.prototype,"definition",{get:function(){return this._definition},set:function(r){this._definition=r},enumerable:!1,configurable:!0}),t}(Le);x.Alternation=Mp;var Hn=function(){function e(t){this.idx=1,(0,Ce.default)(this,(0,be.default)(t,function(r){return r!==void 0}))}return e.prototype.accept=function(t){t.visit(this)},e}();x.Terminal=Hn;function nb(e){return(0,Np.default)(e,Jr)}x.serializeGrammar=nb;function Jr(e){function t(a){return(0,Np.default)(a,Jr)}if(e instanceof Sp){var r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return(0,Fa.default)(e.label)&&(r.label=e.label),r}else{if(e instanceof xp)return{type:"Alternative",definition:t(e.definition)};if(e instanceof bp)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Cp)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Lp)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Jr(new Hn({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof qp)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Jr(new Hn({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof kp)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Mp)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof Hn){var n={type:"Terminal",name:e.terminalType.name,label:tb(e.terminalType),idx:e.idx};(0,Fa.default)(e.label)&&(n.terminalLabel=e.label);var i=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(n.pattern=(0,eb.default)(i)?i.source:i),n}else{if(e instanceof Pp)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}x.serializeProduction=Jr});var Fp=u(Xn=>{"use strict";Object.defineProperty(Xn,"__esModule",{value:!0});Xn.GAstVisitor=void 0;var ke=zn(),ib=function(){function e(){}return e.prototype.visit=function(t){var r=t;switch(r.constructor){case ke.NonTerminal:return this.visitNonTerminal(r);case ke.Alternative:return this.visitAlternative(r);case ke.Option:return this.visitOption(r);case ke.RepetitionMandatory:return this.visitRepetitionMandatory(r);case ke.RepetitionMandatoryWithSeparator:return this.visitRepetitionMandatoryWithSeparator(r);case ke.RepetitionWithSeparator:return this.visitRepetitionWithSeparator(r);case ke.Repetition:return this.visitRepetition(r);case ke.Alternation:return this.visitAlternation(r);case ke.Terminal:return this.visitTerminal(r);case ke.Rule:return this.visitRule(r);default:throw Error("non exhaustive match")}},e.prototype.visitNonTerminal=function(t){},e.prototype.visitAlternative=function(t){},e.prototype.visitOption=function(t){},e.prototype.visitRepetition=function(t){},e.prototype.visitRepetitionMandatory=function(t){},e.prototype.visitRepetitionMandatoryWithSeparator=function(t){},e.prototype.visitRepetitionWithSeparator=function(t){},e.prototype.visitAlternation=function(t){},e.prototype.visitTerminal=function(t){},e.prototype.visitRule=function(t){},e}();Xn.GAstVisitor=ib});var Dp=u((Bj,wp)=>{var ab=ot();function ob(e,t){var r;return ab(e,function(n,i,a){return r=t(n,i,a),!r}),!!r}wp.exports=ob});var Yn=u((Wj,Up)=>{var sb=ha(),ub=Ae(),cb=Dp(),lb=C(),fb=$r();function db(e,t,r){var n=lb(e)?sb:cb;return r&&fb(e,t,r)&&(t=void 0),n(e,ub(t,3))}Up.exports=db});var Gp=u((Kj,jp)=>{function pb(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}jp.exports=pb});var Wp=u((Vj,Bp)=>{var hb=ot();function vb(e,t){var r=!0;return hb(e,function(n,i,a){return r=!!t(n,i,a),r}),r}Bp.exports=vb});var Qr=u((Hj,Kp)=>{var _b=Gp(),yb=Wp(),mb=Ae(),gb=C(),Tb=$r();function Eb(e,t,r){var n=gb(e)?_b:yb;return r&&Tb(e,t,r)&&(t=void 0),n(e,mb(t,3))}Kp.exports=Eb});var wa=u((zj,Vp)=>{function Ab(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a<i;)if(t(e[a],a,e))return a;return-1}Vp.exports=Ab});var zp=u((Xj,Hp)=>{function Ob(e){return e!==e}Hp.exports=Ob});var Yp=u((Yj,Xp)=>{function Rb(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}Xp.exports=Rb});var $n=u(($j,$p)=>{var Ib=wa(),Nb=zp(),Sb=Yp();function Pb(e,t,r){return t===t?Sb(e,t,r):Ib(e,Nb,r)}$p.exports=Pb});var He=u((Zj,Zp)=>{var xb=$n(),bb=Ee(),Cb=Yr(),Lb=Zt(),kb=Pe(),qb=Math.max;function Mb(e,t,r,n){e=bb(e)?e:kb(e),r=r&&!n?Lb(r):0;var i=e.length;return r<0&&(r=qb(i+r,0)),Cb(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&xb(e,t,r)>-1}Zp.exports=Mb});var Jp=u(he=>{"use strict";var Ua=he&&he.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(he,"__esModule",{value:!0});he.getProductionDslName=he.isBranchingProd=he.isOptionalProd=he.isSequenceProd=void 0;var Fb=Ua(Yn()),wb=Ua(Qr()),Db=Ua(He()),w=zn();function Ub(e){return e instanceof w.Alternative||e instanceof w.Option||e instanceof w.Repetition||e instanceof w.RepetitionMandatory||e instanceof w.RepetitionMandatoryWithSeparator||e instanceof w.RepetitionWithSeparator||e instanceof w.Terminal||e instanceof w.Rule}he.isSequenceProd=Ub;function Da(e,t){t===void 0&&(t=[]);var r=e instanceof w.Option||e instanceof w.Repetition||e instanceof w.RepetitionWithSeparator;return r?!0:e instanceof w.Alternation?(0,Fb.default)(e.definition,function(n){return Da(n,t)}):e instanceof w.NonTerminal&&(0,Db.default)(t,e)?!1:e instanceof w.AbstractProduction?(e instanceof w.NonTerminal&&t.push(e),(0,wb.default)(e.definition,function(n){return Da(n,t)})):!1}he.isOptionalProd=Da;function jb(e){return e instanceof w.Alternation}he.isBranchingProd=jb;function Gb(e){if(e instanceof w.NonTerminal)return"SUBRULE";if(e instanceof w.Option)return"OPTION";if(e instanceof w.Alternation)return"OR";if(e instanceof w.RepetitionMandatory)return"AT_LEAST_ONE";if(e instanceof w.RepetitionMandatoryWithSeparator)return"AT_LEAST_ONE_SEP";if(e instanceof w.RepetitionWithSeparator)return"MANY_SEP";if(e instanceof w.Repetition)return"MANY";if(e instanceof w.Terminal)return"CONSUME";throw Error("non exhaustive match")}he.getProductionDslName=Gb});var G=u(N=>{"use strict";Object.defineProperty(N,"__esModule",{value:!0});N.isSequenceProd=N.isBranchingProd=N.isOptionalProd=N.getProductionDslName=N.GAstVisitor=N.serializeProduction=N.serializeGrammar=N.Alternative=N.Alternation=N.RepetitionWithSeparator=N.RepetitionMandatoryWithSeparator=N.RepetitionMandatory=N.Repetition=N.Option=N.NonTerminal=N.Terminal=N.Rule=void 0;var ve=zn();Object.defineProperty(N,"Rule",{enumerable:!0,get:function(){return ve.Rule}});Object.defineProperty(N,"Terminal",{enumerable:!0,get:function(){return ve.Terminal}});Object.defineProperty(N,"NonTerminal",{enumerable:!0,get:function(){return ve.NonTerminal}});Object.defineProperty(N,"Option",{enumerable:!0,get:function(){return ve.Option}});Object.defineProperty(N,"Repetition",{enumerable:!0,get:function(){return ve.Repetition}});Object.defineProperty(N,"RepetitionMandatory",{enumerable:!0,get:function(){return ve.RepetitionMandatory}});Object.defineProperty(N,"RepetitionMandatoryWithSeparator",{enumerable:!0,get:function(){return ve.RepetitionMandatoryWithSeparator}});Object.defineProperty(N,"RepetitionWithSeparator",{enumerable:!0,get:function(){return ve.RepetitionWithSeparator}});Object.defineProperty(N,"Alternation",{enumerable:!0,get:function(){return ve.Alternation}});Object.defineProperty(N,"Alternative",{enumerable:!0,get:function(){return ve.Alternative}});Object.defineProperty(N,"serializeGrammar",{enumerable:!0,get:function(){return ve.serializeGrammar}});Object.defineProperty(N,"serializeProduction",{enumerable:!0,get:function(){return ve.serializeProduction}});var Bb=Fp();Object.defineProperty(N,"GAstVisitor",{enumerable:!0,get:function(){return Bb.GAstVisitor}});var Zn=Jp();Object.defineProperty(N,"getProductionDslName",{enumerable:!0,get:function(){return Zn.getProductionDslName}});Object.defineProperty(N,"isOptionalProd",{enumerable:!0,get:function(){return Zn.isOptionalProd}});Object.defineProperty(N,"isBranchingProd",{enumerable:!0,get:function(){return Zn.isBranchingProd}});Object.defineProperty(N,"isSequenceProd",{enumerable:!0,get:function(){return Zn.isSequenceProd}})});var Jn=u(Qt=>{"use strict";var th=Qt&&Qt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Qt,"__esModule",{value:!0});Qt.RestWalker=void 0;var Wb=th(Kn()),Qp=th(z()),ne=G(),Kb=function(){function e(){}return e.prototype.walk=function(t,r){var n=this;r===void 0&&(r=[]),(0,Qp.default)(t.definition,function(i,a){var o=(0,Wb.default)(t.definition,a+1);if(i instanceof ne.NonTerminal)n.walkProdRef(i,o,r);else if(i instanceof ne.Terminal)n.walkTerminal(i,o,r);else if(i instanceof ne.Alternative)n.walkFlat(i,o,r);else if(i instanceof ne.Option)n.walkOption(i,o,r);else if(i instanceof ne.RepetitionMandatory)n.walkAtLeastOne(i,o,r);else if(i instanceof ne.RepetitionMandatoryWithSeparator)n.walkAtLeastOneSep(i,o,r);else if(i instanceof ne.RepetitionWithSeparator)n.walkManySep(i,o,r);else if(i instanceof ne.Repetition)n.walkMany(i,o,r);else if(i instanceof ne.Alternation)n.walkOr(i,o,r);else throw Error("non exhaustive match")})},e.prototype.walkTerminal=function(t,r,n){},e.prototype.walkProdRef=function(t,r,n){},e.prototype.walkFlat=function(t,r,n){var i=r.concat(n);this.walk(t,i)},e.prototype.walkOption=function(t,r,n){var i=r.concat(n);this.walk(t,i)},e.prototype.walkAtLeastOne=function(t,r,n){var i=[new ne.Option({definition:t.definition})].concat(r,n);this.walk(t,i)},e.prototype.walkAtLeastOneSep=function(t,r,n){var i=eh(t,r,n);this.walk(t,i)},e.prototype.walkMany=function(t,r,n){var i=[new ne.Option({definition:t.definition})].concat(r,n);this.walk(t,i)},e.prototype.walkManySep=function(t,r,n){var i=eh(t,r,n);this.walk(t,i)},e.prototype.walkOr=function(t,r,n){var i=this,a=r.concat(n);(0,Qp.default)(t.definition,function(o){var s=new ne.Alternative({definition:[o]});i.walk(s,a)})},e}();Qt.RestWalker=Kb;function eh(e,t,r){var n=[new ne.Option({definition:[new ne.Terminal({terminalType:e.separator})].concat(e.definition)})],i=n.concat(t,r);return i}});var ah=u((tG,ih)=>{var rh=yt(),Vb=kr(),Hb=C(),nh=rh?rh.isConcatSpreadable:void 0;function zb(e){return Hb(e)||Vb(e)||!!(nh&&e&&e[nh])}ih.exports=zb});var Qn=u((rG,sh)=>{var Xb=kn(),Yb=ah();function oh(e,t,r,n,i){var a=-1,o=e.length;for(r||(r=Yb),i||(i=[]);++a<o;){var s=e[a];t>0&&r(s)?t>1?oh(s,t-1,r,n,i):Xb(i,s):n||(i[i.length]=s)}return i}sh.exports=oh});var qe=u((nG,uh)=>{var $b=Qn();function Zb(e){var t=e==null?0:e.length;return t?$b(e,1):[]}uh.exports=Zb});var ja=u((iG,ch)=>{var Jb=$n();function Qb(e,t){var r=e==null?0:e.length;return!!r&&Jb(e,t,0)>-1}ch.exports=Qb});var Ga=u((aG,lh)=>{function eC(e,t,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(t,e[n]))return!0;return!1}lh.exports=eC});var ei=u((oG,fh)=>{function tC(){}fh.exports=tC});var ph=u((sG,dh)=>{var Ba=sa(),rC=ei(),nC=Ln(),iC=1/0,aC=Ba&&1/nC(new Ba([,-0]))[1]==iC?function(e){return new Ba(e)}:rC;dh.exports=aC});var vh=u((uG,hh)=>{var oC=bn(),sC=ja(),uC=Ga(),cC=Cn(),lC=ph(),fC=Ln(),dC=200;function pC(e,t,r){var n=-1,i=sC,a=e.length,o=!0,s=[],c=s;if(r)o=!1,i=uC;else if(a>=dC){var f=t?null:lC(e);if(f)return fC(f);o=!1,i=cC,c=new oC}else c=t?[]:s;e:for(;++n<a;){var p=e[n],d=t?t(p):p;if(p=r||p!==0?p:0,o&&d===d){for(var h=c.length;h--;)if(c[h]===d)continue e;t&&c.push(d),s.push(p)}else i(c,d,r)||(c!==s&&c.push(d),s.push(p))}return s}hh.exports=pC});var ti=u((cG,_h)=>{var hC=vh();function vC(e){return e&&e.length?hC(e):[]}_h.exports=vC});var Va=u(_e=>{"use strict";var Ka=_e&&_e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_e,"__esModule",{value:!0});_e.firstForTerminal=_e.firstForBranching=_e.firstForSequence=_e.first=void 0;var _C=Ka(qe()),mh=Ka(ti()),yC=Ka(Q()),yh=G(),Wa=G();function ri(e){if(e instanceof yh.NonTerminal)return ri(e.referencedRule);if(e instanceof yh.Terminal)return Eh(e);if((0,Wa.isSequenceProd)(e))return gh(e);if((0,Wa.isBranchingProd)(e))return Th(e);throw Error("non exhaustive match")}_e.first=ri;function gh(e){for(var t=[],r=e.definition,n=0,i=r.length>n,a,o=!0;i&&o;)a=r[n],o=(0,Wa.isOptionalProd)(a),t=t.concat(ri(a)),n=n+1,i=r.length>n;return(0,mh.default)(t)}_e.firstForSequence=gh;function Th(e){var t=(0,yC.default)(e.definition,function(r){return ri(r)});return(0,mh.default)((0,_C.default)(t))}_e.firstForBranching=Th;function Eh(e){return[e.terminalType]}_e.firstForTerminal=Eh});var Ha=u(ni=>{"use strict";Object.defineProperty(ni,"__esModule",{value:!0});ni.IN=void 0;ni.IN="_~IN~_"});var Nh=u(ie=>{"use strict";var mC=ie&&ie.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Ah=ie&&ie.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ie,"__esModule",{value:!0});ie.buildInProdFollowPrefix=ie.buildBetweenProdsFollowPrefix=ie.computeAllProdsFollows=ie.ResyncFollowsWalker=void 0;var gC=Jn(),TC=Va(),EC=Ah(z()),AC=Ah(Zr()),Oh=Ha(),OC=G(),Rh=function(e){mC(t,e);function t(r){var n=e.call(this)||this;return n.topProd=r,n.follows={},n}return t.prototype.startWalking=function(){return this.walk(this.topProd),this.follows},t.prototype.walkTerminal=function(r,n,i){},t.prototype.walkProdRef=function(r,n,i){var a=Ih(r.referencedRule,r.idx)+this.topProd.name,o=n.concat(i),s=new OC.Alternative({definition:o}),c=(0,TC.first)(s);this.follows[a]=c},t}(gC.RestWalker);ie.ResyncFollowsWalker=Rh;function RC(e){var t={};return(0,EC.default)(e,function(r){var n=new Rh(r).startWalking();(0,AC.default)(t,n)}),t}ie.computeAllProdsFollows=RC;function Ih(e,t){return e.name+t+Oh.IN}ie.buildBetweenProdsFollowPrefix=Ih;function IC(e){var t=e.terminalType.name;return t+e.idx+Oh.IN}ie.buildInProdFollowPrefix=IC});var gt=u((pG,Sh)=>{function NC(e){return e===void 0}Sh.exports=NC});var ai=u((Ph,ii)=>{(function(e,t){typeof define=="function"&&define.amd?define([],t):typeof ii=="object"&&ii.exports?ii.exports=t():e.regexpToAst=t()})(typeof self<"u"?self:Ph,function(){function e(){}e.prototype.saveState=function(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}},e.prototype.restoreState=function(l){this.idx=l.idx,this.input=l.input,this.groupIdx=l.groupIdx},e.prototype.pattern=function(l){this.idx=0,this.input=l,this.groupIdx=0,this.consumeChar("/");var v=this.disjunction();this.consumeChar("/");for(var y={type:"Flags",loc:{begin:this.idx,end:l.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};this.isRegExpFlag();)switch(this.popChar()){case"g":o(y,"global");break;case"i":o(y,"ignoreCase");break;case"m":o(y,"multiLine");break;case"u":o(y,"unicode");break;case"y":o(y,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:y,value:v,loc:this.loc(0)}},e.prototype.disjunction=function(){var l=[],v=this.idx;for(l.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),l.push(this.alternative());return{type:"Disjunction",value:l,loc:this.loc(v)}},e.prototype.alternative=function(){for(var l=[],v=this.idx;this.isTerm();)l.push(this.term());return{type:"Alternative",value:l,loc:this.loc(v)}},e.prototype.term=function(){return this.isAssertion()?this.assertion():this.atom()},e.prototype.assertion=function(){var l=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(l)};case"$":return{type:"EndAnchor",loc:this.loc(l)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(l)};case"B":return{type:"NonWordBoundary",loc:this.loc(l)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");var v;switch(this.popChar()){case"=":v="Lookahead";break;case"!":v="NegativeLookahead";break}s(v);var y=this.disjunction();return this.consumeChar(")"),{type:v,value:y,loc:this.loc(l)}}c()},e.prototype.quantifier=function(l){var v,y=this.idx;switch(this.popChar()){case"*":v={atLeast:0,atMost:1/0};break;case"+":v={atLeast:1,atMost:1/0};break;case"?":v={atLeast:0,atMost:1};break;case"{":var T=this.integerIncludingZero();switch(this.popChar()){case"}":v={atLeast:T,atMost:T};break;case",":var A;this.isDigit()?(A=this.integerIncludingZero(),v={atLeast:T,atMost:A}):v={atLeast:T,atMost:1/0},this.consumeChar("}");break}if(l===!0&&v===void 0)return;s(v);break}if(!(l===!0&&v===void 0))return s(v),this.peekChar(0)==="?"?(this.consumeChar("?"),v.greedy=!1):v.greedy=!0,v.type="Quantifier",v.loc=this.loc(y),v},e.prototype.atom=function(){var l,v=this.idx;switch(this.peekChar()){case".":l=this.dotAll();break;case"\\":l=this.atomEscape();break;case"[":l=this.characterClass();break;case"(":l=this.group();break}return l===void 0&&this.isPatternCharacter()&&(l=this.patternCharacter()),s(l),l.loc=this.loc(v),this.isQuantifier()&&(l.quantifier=this.quantifier()),l},e.prototype.dotAll=function(){return this.consumeChar("."),{type:"Set",complement:!0,value:[i(`
`),i("\r"),i("\u2028"),i("\u2029")]}},e.prototype.atomEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.decimalEscapeAtom=function(){var l=this.positiveInteger();return{type:"GroupBackReference",value:l}},e.prototype.characterClassEscape=function(){var l,v=!1;switch(this.popChar()){case"d":l=p;break;case"D":l=p,v=!0;break;case"s":l=h;break;case"S":l=h,v=!0;break;case"w":l=d;break;case"W":l=d,v=!0;break}return s(l),{type:"Set",value:l,complement:v}},e.prototype.controlEscapeAtom=function(){var l;switch(this.popChar()){case"f":l=i("\f");break;case"n":l=i(`
`);break;case"r":l=i("\r");break;case"t":l=i(" ");break;case"v":l=i("\v");break}return s(l),{type:"Character",value:l}},e.prototype.controlLetterEscapeAtom=function(){this.consumeChar("c");var l=this.popChar();if(/[a-zA-Z]/.test(l)===!1)throw Error("Invalid ");var v=l.toUpperCase().charCodeAt(0)-64;return{type:"Character",value:v}},e.prototype.nulCharacterAtom=function(){return this.consumeChar("0"),{type:"Character",value:i("\0")}},e.prototype.hexEscapeSequenceAtom=function(){return this.consumeChar("x"),this.parseHexDigits(2)},e.prototype.regExpUnicodeEscapeSequenceAtom=function(){return this.consumeChar("u"),this.parseHexDigits(4)},e.prototype.identityEscapeAtom=function(){var l=this.popChar();return{type:"Character",value:i(l)}},e.prototype.classPatternCharacterAtom=function(){switch(this.peekChar()){case`
`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:var l=this.popChar();return{type:"Character",value:i(l)}}},e.prototype.characterClass=function(){var l=[],v=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),v=!0);this.isClassAtom();){var y=this.classAtom(),T=y.type==="Character";if(T&&this.isRangeDash()){this.consumeChar("-");var A=this.classAtom(),g=A.type==="Character";if(g){if(A.value<y.value)throw Error("Range out of order in character class");l.push({from:y.value,to:A.value})}else a(y.value,l),l.push(i("-")),a(A.value,l)}else a(y.value,l)}return this.consumeChar("]"),{type:"Set",complement:v,value:l}},e.prototype.classAtom=function(){switch(this.peekChar()){case"]":case`
`:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}},e.prototype.classEscape=function(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:i("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}},e.prototype.group=function(){var l=!0;switch(this.consumeChar("("),this.peekChar(0)){case"?":this.consumeChar("?"),this.consumeChar(":"),l=!1;break;default:this.groupIdx++;break}var v=this.disjunction();this.consumeChar(")");var y={type:"Group",capturing:l,value:v};return l&&(y.idx=this.groupIdx),y},e.prototype.positiveInteger=function(){var l=this.popChar();if(n.test(l)===!1)throw Error("Expecting a positive integer");for(;r.test(this.peekChar(0));)l+=this.popChar();return parseInt(l,10)},e.prototype.integerIncludingZero=function(){var l=this.popChar();if(r.test(l)===!1)throw Error("Expecting an integer");for(;r.test(this.peekChar(0));)l+=this.popChar();return parseInt(l,10)},e.prototype.patternCharacter=function(){var l=this.popChar();switch(l){case`
`:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:i(l)}}},e.prototype.isRegExpFlag=function(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}},e.prototype.isRangeDash=function(){return this.peekChar()==="-"&&this.isClassAtom(1)},e.prototype.isDigit=function(){return r.test(this.peekChar(0))},e.prototype.isClassAtom=function(l){switch(l===void 0&&(l=0),this.peekChar(l)){case"]":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.isTerm=function(){return this.isAtom()||this.isAssertion()},e.prototype.isAtom=function(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}},e.prototype.isAssertion=function(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return!1}},e.prototype.isQuantifier=function(){var l=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(l)}},e.prototype.isPatternCharacter=function(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
`:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}},e.prototype.parseHexDigits=function(l){for(var v="",y=0;y<l;y++){var T=this.popChar();if(t.test(T)===!1)throw Error("Expecting a HexDecimal digits");v+=T}var A=parseInt(v,16);return{type:"Character",value:A}},e.prototype.peekChar=function(l){return l===void 0&&(l=0),this.input[this.idx+l]},e.prototype.popChar=function(){var l=this.peekChar(0);return this.consumeChar(),l},e.prototype.consumeChar=function(l){if(l!==void 0&&this.input[this.idx]!==l)throw Error("Expected: '"+l+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++},e.prototype.loc=function(l){return{begin:l,end:this.idx}};var t=/[0-9a-fA-F]/,r=/[0-9]/,n=/[1-9]/;function i(l){return l.charCodeAt(0)}function a(l,v){l.length!==void 0?l.forEach(function(y){v.push(y)}):v.push(l)}function o(l,v){if(l[v]===!0)throw"duplicate flag "+v;l[v]=!0}function s(l){if(l===void 0)throw Error("Internal Error - Should never get here!")}function c(){throw Error("Internal Error - Should never get here!")}var f,p=[];for(f=i("0");f<=i("9");f++)p.push(f);var d=[i("_")].concat(p);for(f=i("a");f<=i("z");f++)d.push(f);for(f=i("A");f<=i("Z");f++)d.push(f);var h=[i(" "),i("\f"),i(`
`),i("\r"),i(" "),i("\v"),i(" "),i("\xA0"),i("\u1680"),i("\u2000"),i("\u2001"),i("\u2002"),i("\u2003"),i("\u2004"),i("\u2005"),i("\u2006"),i("\u2007"),i("\u2008"),i("\u2009"),i("\u200A"),i("\u2028"),i("\u2029"),i("\u202F"),i("\u205F"),i("\u3000"),i("\uFEFF")];function _(){}return _.prototype.visitChildren=function(l){for(var v in l){var y=l[v];l.hasOwnProperty(v)&&(y.type!==void 0?this.visit(y):Array.isArray(y)&&y.forEach(function(T){this.visit(T)},this))}},_.prototype.visit=function(l){switch(l.type){case"Pattern":this.visitPattern(l);break;case"Flags":this.visitFlags(l);break;case"Disjunction":this.visitDisjunction(l);break;case"Alternative":this.visitAlternative(l);break;case"StartAnchor":this.visitStartAnchor(l);break;case"EndAnchor":this.visitEndAnchor(l);break;case"WordBoundary":this.visitWordBoundary(l);break;case"NonWordBoundary":this.visitNonWordBoundary(l);break;case"Lookahead":this.visitLookahead(l);break;case"NegativeLookahead":this.visitNegativeLookahead(l);break;case"Character":this.visitCharacter(l);break;case"Set":this.visitSet(l);break;case"Group":this.visitGroup(l);break;case"GroupBackReference":this.visitGroupBackReference(l);break;case"Quantifier":this.visitQuantifier(l);break}this.visitChildren(l)},_.prototype.visitPattern=function(l){},_.prototype.visitFlags=function(l){},_.prototype.visitDisjunction=function(l){},_.prototype.visitAlternative=function(l){},_.prototype.visitStartAnchor=function(l){},_.prototype.visitEndAnchor=function(l){},_.prototype.visitWordBoundary=function(l){},_.prototype.visitNonWordBoundary=function(l){},_.prototype.visitLookahead=function(l){},_.prototype.visitNegativeLookahead=function(l){},_.prototype.visitCharacter=function(l){},_.prototype.visitSet=function(l){},_.prototype.visitGroup=function(l){},_.prototype.visitGroupBackReference=function(l){},_.prototype.visitQuantifier=function(l){},{RegExpParser:e,BaseRegExpVisitor:_,VERSION:"0.5.0"}})});var bh=u((hG,xh)=>{function SC(e){return e&&e.length?e[0]:void 0}xh.exports=SC});var er=u((vG,Ch)=>{Ch.exports=bh()});var en=u((_G,Lh)=>{function PC(e){for(var t=-1,r=e==null?0:e.length,n=0,i=[];++t<r;){var a=e[t];a&&(i[n++]=a)}return i}Lh.exports=PC});var za=u((yG,kh)=>{var xC=ot();function bC(e,t){var r=[];return xC(e,function(n,i,a){t(n,i,a)&&r.push(n)}),r}kh.exports=bC});var Mh=u((mG,qh)=>{var CC="Expected a function";function LC(e){if(typeof e!="function")throw new TypeError(CC);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}qh.exports=LC});var oi=u((gG,Fh)=>{var kC=qn(),qC=za(),MC=Ae(),FC=C(),wC=Mh();function DC(e,t){var r=FC(e)?kC:qC;return r(e,wC(MC(t,3)))}Fh.exports=DC});var Dh=u((TG,wh)=>{var UC=bn(),jC=ja(),GC=Ga(),BC=Ut(),WC=wt(),KC=Cn(),VC=200;function HC(e,t,r,n){var i=-1,a=jC,o=!0,s=e.length,c=[],f=t.length;if(!s)return c;r&&(t=BC(t,WC(r))),n?(a=GC,o=!1):t.length>=VC&&(a=KC,o=!1,t=new UC(t));e:for(;++i<s;){var p=e[i],d=r==null?p:r(p);if(p=n||p!==0?p:0,o&&d===d){for(var h=f;h--;)if(t[h]===d)continue e;c.push(p)}else a(t,d,n)||c.push(p)}return c}wh.exports=HC});var jh=u((EG,Uh)=>{var zC=Ee(),XC=Te();function YC(e){return XC(e)&&zC(e)}Uh.exports=YC});var si=u((AG,Bh)=>{var $C=Dh(),ZC=Qn(),JC=Vn(),Gh=jh(),QC=JC(function(e,t){return Gh(e)?$C(e,ZC(t,1,Gh,!0)):[]});Bh.exports=QC});var Kh=u((OG,Wh)=>{var eL=$n(),tL=Zt(),rL=Math.max;function nL(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:tL(r);return i<0&&(i=rL(n+i,0)),eL(e,t,i)}Wh.exports=nL});var Hh=u((RG,Vh)=>{var iL=Ae(),aL=Ee(),oL=ce();function sL(e){return function(t,r,n){var i=Object(t);if(!aL(t)){var a=iL(r,3);t=oL(t),r=function(s){return a(i[s],s,i)}}var o=e(t,r,n);return o>-1?i[a?t[o]:o]:void 0}}Vh.exports=sL});var Xh=u((IG,zh)=>{var uL=wa(),cL=Ae(),lL=Zt(),fL=Math.max;function dL(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var i=r==null?0:lL(r);return i<0&&(i=fL(n+i,0)),uL(e,cL(t,3),i)}zh.exports=dL});var ui=u((NG,Yh)=>{var pL=Hh(),hL=Xh(),vL=pL(hL);Yh.exports=vL});var ci=u((SG,$h)=>{var _L=qn(),yL=za(),mL=Ae(),gL=C();function TL(e,t){var r=gL(e)?_L:yL;return r(e,mL(t,3))}$h.exports=TL});var Xa=u((PG,Jh)=>{var EL=Vn(),AL=jt(),OL=$r(),RL=zr(),Zh=Object.prototype,IL=Zh.hasOwnProperty,NL=EL(function(e,t){e=Object(e);var r=-1,n=t.length,i=n>2?t[2]:void 0;for(i&&OL(t[0],t[1],i)&&(n=1);++r<n;)for(var a=t[r],o=RL(a),s=-1,c=o.length;++s<c;){var f=o[s],p=e[f];(p===void 0||AL(p,Zh[f])&&!IL.call(e,f))&&(e[f]=a[f])}return e});Jh.exports=NL});var ev=u((xG,Qh)=>{function SL(e,t,r,n){var i=-1,a=e==null?0:e.length;for(n&&a&&(r=e[++i]);++i<a;)r=t(r,e[i],i,e);return r}Qh.exports=SL});var rv=u((bG,tv)=>{function PL(e,t,r,n,i){return i(e,function(a,o,s){r=n?(n=!1,a):t(r,a,o,s)}),r}tv.exports=PL});var st=u((CG,nv)=>{var xL=ev(),bL=ot(),CL=Ae(),LL=rv(),kL=C();function qL(e,t,r){var n=kL(e)?xL:LL,i=arguments.length<3;return n(e,CL(t,4),r,i,bL)}nv.exports=qL});var fi=u(tr=>{"use strict";Object.defineProperty(tr,"__esModule",{value:!0});tr.clearRegExpParserCache=tr.getRegExpAst=void 0;var ML=ai(),li={},FL=new ML.RegExpParser;function wL(e){var t=e.toString();if(li.hasOwnProperty(t))return li[t];var r=FL.pattern(t);return li[t]=r,r}tr.getRegExpAst=wL;function DL(){li={}}tr.clearRegExpParserCache=DL});var cv=u($=>{"use strict";var UL=$&&$.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),rr=$&&$.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty($,"__esModule",{value:!0});$.canMatchCharCode=$.firstCharOptimizedIndices=$.getOptimizedStartCodesIndices=$.failedOptimizationPrefixMsg=void 0;var ov=ai(),jL=rr(C()),GL=rr(Qr()),BL=rr(z()),Ya=rr(ui()),WL=rr(Pe()),Za=rr(He()),iv=$t(),sv=fi(),ze=Ja(),uv="Complement Sets are not supported for first char optimization";$.failedOptimizationPrefixMsg=`Unable to use "first char" lexer optimizations:
`;function KL(e,t){t===void 0&&(t=!1);try{var r=(0,sv.getRegExpAst)(e),n=pi(r.value,{},r.flags.ignoreCase);return n}catch(a){if(a.message===uv)t&&(0,iv.PRINT_WARNING)("".concat($.failedOptimizationPrefixMsg)+" Unable to optimize: < ".concat(e.toString(),` >
`)+` Complement Sets cannot be automatically optimized.
This will disable the lexer's first char optimizations.
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{var i="";t&&(i=`
This will disable the lexer's first char optimizations.
See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),(0,iv.PRINT_ERROR)("".concat($.failedOptimizationPrefixMsg,`
`)+" Failed parsing: < ".concat(e.toString(),` >
`)+" Using the regexp-to-ast library version: ".concat(ov.VERSION,`
`)+" Please open an issue at: https://github.com/bd82/regexp-to-ast/issues"+i)}}return[]}$.getOptimizedStartCodesIndices=KL;function pi(e,t,r){switch(e.type){case"Disjunction":for(var n=0;n<e.value.length;n++)pi(e.value[n],t,r);break;case"Alternative":for(var i=e.value,n=0;n<i.length;n++){var a=i[n];switch(a.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}var o=a;switch(o.type){case"Character":di(o.value,t,r);break;case"Set":if(o.complement===!0)throw Error(uv);(0,BL.default)(o.value,function(f){if(typeof f=="number")di(f,t,r);else{var p=f;if(r===!0)for(var d=p.from;d<=p.to;d++)di(d,t,r);else{for(var d=p.from;d<=p.to&&d<ze.minOptimizationVal;d++)di(d,t,r);if(p.to>=ze.minOptimizationVal)for(var h=p.from>=ze.minOptimizationVal?p.from:ze.minOptimizationVal,_=p.to,l=(0,ze.charCodeToOptimizedIndex)(h),v=(0,ze.charCodeToOptimizedIndex)(_),y=l;y<=v;y++)t[y]=y}}});break;case"Group":pi(o.value,t,r);break;default:throw Error("Non Exhaustive Match")}var s=o.quantifier!==void 0&&o.quantifier.atLeast===0;if(o.type==="Group"&&$a(o)===!1||o.type!=="Group"&&s===!1)break}break;default:throw Error("non exhaustive match!")}return(0,WL.default)(t)}$.firstCharOptimizedIndices=pi;function di(e,t,r){var n=(0,ze.charCodeToOptimizedIndex)(e);t[n]=n,r===!0&&VL(e,t)}function VL(e,t){var r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){var i=(0,ze.charCodeToOptimizedIndex)(n.charCodeAt(0));t[i]=i}else{var a=r.toLowerCase();if(a!==r){var i=(0,ze.charCodeToOptimizedIndex)(a.charCodeAt(0));t[i]=i}}}function av(e,t){return(0,Ya.default)(e.value,function(r){if(typeof r=="number")return(0,Za.default)(t,r);var n=r;return(0,Ya.default)(t,function(i){return n.from<=i&&i<=n.to})!==void 0})}function $a(e){var t=e.quantifier;return t&&t.atLeast===0?!0:e.value?(0,jL.default)(e.value)?(0,GL.default)(e.value,$a):$a(e.value):!1}var HL=function(e){UL(t,e);function t(r){var n=e.call(this)||this;return n.targetCharCodes=r,n.found=!1,n}return t.prototype.visitChildren=function(r){if(this.found!==!0){switch(r.type){case"Lookahead":this.visitLookahead(r);return;case"NegativeLookahead":this.visitNegativeLookahead(r);return}e.prototype.visitChildren.call(this,r)}},t.prototype.visitCharacter=function(r){(0,Za.default)(this.targetCharCodes,r.value)&&(this.found=!0)},t.prototype.visitSet=function(r){r.complement?av(r,this.targetCharCodes)===void 0&&(this.found=!0):av(r,this.targetCharCodes)!==void 0&&(this.found=!0)},t}(ov.BaseRegExpVisitor);function zL(e,t){if(t instanceof RegExp){var r=(0,sv.getRegExpAst)(t),n=new HL(e);return n.visit(r),n.found}else return(0,Ya.default)(t,function(i){return(0,Za.default)(e,i.charCodeAt(0))})!==void 0}$.canMatchCharCode=zL});var Ja=u(E=>{"use strict";var dv=E&&E.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),j=E&&E.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(E,"__esModule",{value:!0});E.charCodeToOptimizedIndex=E.minOptimizationVal=E.buildLineBreakIssueMessage=E.LineTerminatorOptimizedTester=E.isShortPattern=E.isCustomPattern=E.cloneEmptyGroups=E.performWarningRuntimeChecks=E.performRuntimeChecks=E.addStickyFlag=E.addStartOfInput=E.findUnreachablePatterns=E.findModesThatDoNotExist=E.findInvalidGroupType=E.findDuplicatePatterns=E.findUnsupportedFlags=E.findStartOfInputAnchor=E.findEmptyMatchRegExps=E.findEndOfInputAnchor=E.findInvalidPatterns=E.findMissingPatterns=E.validatePatterns=E.analyzeTokenTypes=E.enableSticky=E.disableSticky=E.SUPPORT_STICKY=E.MODES=E.DEFAULT_MODE=void 0;var pv=ai(),k=tn(),XL=j(er()),hv=j(pe()),vv=j(en()),vi=j(C()),YL=j(Pe()),$L=j(qe()),_v=j(oi()),yv=j(si()),lv=j(Kh()),D=j(Q()),Xe=j(z()),Ye=j(Yr()),yi=j(kt()),eo=j(gt()),ZL=j(ui()),Z=j(le()),JL=j(ce()),ut=j(qa()),Me=j(ci()),QL=j(Xa()),_i=j(st()),mi=j(He()),fv=$t(),nr=cv(),mv=fi(),Tt="PATTERN";E.DEFAULT_MODE="defaultMode";E.MODES="modes";E.SUPPORT_STICKY=typeof new RegExp("(?:)").sticky=="boolean";function ek(){E.SUPPORT_STICKY=!1}E.disableSticky=ek;function tk(){E.SUPPORT_STICKY=!0}E.enableSticky=tk;function rk(e,t){t=(0,QL.default)(t,{useSticky:E.SUPPORT_STICKY,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
`],tracer:function(A,g){return g()}});var r=t.tracer;r("initCharCodeToOptimizedIndexMap",function(){dk()});var n;r("Reject Lexer.NA",function(){n=(0,_v.default)(e,function(A){return A[Tt]===k.Lexer.NA})});var i=!1,a;r("Transform Patterns",function(){i=!1,a=(0,D.default)(n,function(A){var g=A[Tt];if((0,ut.default)(g)){var R=g.source;return R.length===1&&R!=="^"&&R!=="$"&&R!=="."&&!g.ignoreCase?R:R.length===2&&R[0]==="\\"&&!(0,mi.default)(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],R[1])?R[1]:t.useSticky?ro(g):to(g)}else{if((0,yi.default)(g))return i=!0,{exec:g};if(typeof g=="object")return i=!0,g;if(typeof g=="string"){if(g.length===1)return g;var V=g.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),L=new RegExp(V);return t.useSticky?ro(L):to(L)}else throw Error("non exhaustive match")}})});var o,s,c,f,p;r("misc mapping",function(){o=(0,D.default)(n,function(A){return A.tokenTypeIdx}),s=(0,D.default)(n,function(A){var g=A.GROUP;if(g!==k.Lexer.SKIPPED){if((0,Ye.default)(g))return g;if((0,eo.default)(g))return!1;throw Error("non exhaustive match")}}),c=(0,D.default)(n,function(A){var g=A.LONGER_ALT;if(g){var R=(0,vi.default)(g)?(0,D.default)(g,function(V){return(0,lv.default)(n,V)}):[(0,lv.default)(n,g)];return R}}),f=(0,D.default)(n,function(A){return A.PUSH_MODE}),p=(0,D.default)(n,function(A){return(0,Z.default)(A,"POP_MODE")})});var d;r("Line Terminator Handling",function(){var A=Lv(t.lineTerminatorCharacters);d=(0,D.default)(n,function(g){return!1}),t.positionTracking!=="onlyOffset"&&(d=(0,D.default)(n,function(g){return(0,Z.default)(g,"LINE_BREAKS")?!!g.LINE_BREAKS:bv(g,A)===!1&&(0,nr.canMatchCharCode)(A,g.PATTERN)}))});var h,_,l,v;r("Misc Mapping #2",function(){h=(0,D.default)(n,io),_=(0,D.default)(a,xv),l=(0,_i.default)(n,function(A,g){var R=g.GROUP;return(0,Ye.default)(R)&&R!==k.Lexer.SKIPPED&&(A[R]=[]),A},{}),v=(0,D.default)(a,function(A,g){return{pattern:a[g],longerAlt:c[g],canLineTerminator:d[g],isCustom:h[g],short:_[g],group:s[g],push:f[g],pop:p[g],tokenTypeIdx:o[g],tokenType:n[g]}})});var y=!0,T=[];return t.safeMode||r("First Char Optimization",function(){T=(0,_i.default)(n,function(A,g,R){if(typeof g.PATTERN=="string"){var V=g.PATTERN.charCodeAt(0),L=no(V);Qa(A,L,v[R])}else if((0,vi.default)(g.START_CHARS_HINT)){var re;(0,Xe.default)(g.START_CHARS_HINT,function(Y){var oe=typeof Y=="string"?Y.charCodeAt(0):Y,se=no(oe);re!==se&&(re=se,Qa(A,se,v[R]))})}else if((0,ut.default)(g.PATTERN))if(g.PATTERN.unicode)y=!1,t.ensureOptimizations&&(0,fv.PRINT_ERROR)("".concat(nr.failedOptimizationPrefixMsg)+" Unable to analyze < ".concat(g.PATTERN.toString(),` > pattern.
`)+` The regexp unicode flag is not currently supported by the regexp-to-ast library.
This will disable the lexer's first char optimizations.
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{var Ne=(0,nr.getOptimizedStartCodesIndices)(g.PATTERN,t.ensureOptimizations);(0,hv.default)(Ne)&&(y=!1),(0,Xe.default)(Ne,function(Y){Qa(A,Y,v[R])})}else t.ensureOptimizations&&(0,fv.PRINT_ERROR)("".concat(nr.failedOptimizationPrefixMsg)+" TokenType: <".concat(g.name,`> is using a custom token pattern without providing <start_chars_hint> parameter.
`)+` This will disable the lexer's first char optimizations.
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),y=!1;return A},[])}),{emptyGroups:l,patternIdxToConfig:v,charCodeToPatternIdxToConfig:T,hasCustom:i,canBeOptimized:y}}E.analyzeTokenTypes=rk;function nk(e,t){var r=[],n=gv(e);r=r.concat(n.errors);var i=Tv(n.valid),a=i.valid;return r=r.concat(i.errors),r=r.concat(ik(a)),r=r.concat(Nv(a)),r=r.concat(Sv(a,t)),r=r.concat(Pv(a)),r}E.validatePatterns=nk;function ik(e){var t=[],r=(0,Me.default)(e,function(n){return(0,ut.default)(n[Tt])});return t=t.concat(Ev(r)),t=t.concat(Ov(r)),t=t.concat(Rv(r)),t=t.concat(Iv(r)),t=t.concat(Av(r)),t}function gv(e){var t=(0,Me.default)(e,function(i){return!(0,Z.default)(i,Tt)}),r=(0,D.default)(t,function(i){return{message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:k.LexerDefinitionErrorType.MISSING_PATTERN,tokenTypes:[i]}}),n=(0,yv.default)(e,t);return{errors:r,valid:n}}E.findMissingPatterns=gv;function Tv(e){var t=(0,Me.default)(e,function(i){var a=i[Tt];return!(0,ut.default)(a)&&!(0,yi.default)(a)&&!(0,Z.default)(a,"exec")&&!(0,Ye.default)(a)}),r=(0,D.default)(t,function(i){return{message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:k.LexerDefinitionErrorType.INVALID_PATTERN,tokenTypes:[i]}}),n=(0,yv.default)(e,t);return{errors:r,valid:n}}E.findInvalidPatterns=Tv;var ak=/[^\\][$]/;function Ev(e){var t=function(i){dv(a,i);function a(){var o=i!==null&&i.apply(this,arguments)||this;return o.found=!1,o}return a.prototype.visitEndAnchor=function(o){this.found=!0},a}(pv.BaseRegExpVisitor),r=(0,Me.default)(e,function(i){var a=i.PATTERN;try{var o=(0,mv.getRegExpAst)(a),s=new t;return s.visit(o),s.found}catch(c){return ak.test(a.source)}}),n=(0,D.default)(r,function(i){return{message:`Unexpected RegExp Anchor Error:
Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:k.LexerDefinitionErrorType.EOI_ANCHOR_FOUND,tokenTypes:[i]}});return n}E.findEndOfInputAnchor=Ev;function Av(e){var t=(0,Me.default)(e,function(n){var i=n.PATTERN;return i.test("")}),r=(0,D.default)(t,function(n){return{message:"Token Type: ->"+n.name+"<- static 'PATTERN' must not match an empty string",type:k.LexerDefinitionErrorType.EMPTY_MATCH_PATTERN,tokenTypes:[n]}});return r}E.findEmptyMatchRegExps=Av;var ok=/[^\\[][\^]|^\^/;function Ov(e){var t=function(i){dv(a,i);function a(){var o=i!==null&&i.apply(this,arguments)||this;return o.found=!1,o}return a.prototype.visitStartAnchor=function(o){this.found=!0},a}(pv.BaseRegExpVisitor),r=(0,Me.default)(e,function(i){var a=i.PATTERN;try{var o=(0,mv.getRegExpAst)(a),s=new t;return s.visit(o),s.found}catch(c){return ok.test(a.source)}}),n=(0,D.default)(r,function(i){return{message:`Unexpected RegExp Anchor Error:
Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:k.LexerDefinitionErrorType.SOI_ANCHOR_FOUND,tokenTypes:[i]}});return n}E.findStartOfInputAnchor=Ov;function Rv(e){var t=(0,Me.default)(e,function(n){var i=n[Tt];return i instanceof RegExp&&(i.multiline||i.global)}),r=(0,D.default)(t,function(n){return{message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:k.LexerDefinitionErrorType.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}});return r}E.findUnsupportedFlags=Rv;function Iv(e){var t=[],r=(0,D.default)(e,function(a){return(0,_i.default)(e,function(o,s){return a.PATTERN.source===s.PATTERN.source&&!(0,mi.default)(t,s)&&s.PATTERN!==k.Lexer.NA&&(t.push(s),o.push(s)),o},[])});r=(0,vv.default)(r);var n=(0,Me.default)(r,function(a){return a.length>1}),i=(0,D.default)(n,function(a){var o=(0,D.default)(a,function(c){return c.name}),s=(0,XL.default)(a).PATTERN;return{message:"The same RegExp pattern ->".concat(s,"<-")+"has been used in all of the following Token Types: ".concat(o.join(", ")," <-"),type:k.LexerDefinitionErrorType.DUPLICATE_PATTERNS_FOUND,tokenTypes:a}});return i}E.findDuplicatePatterns=Iv;function Nv(e){var t=(0,Me.default)(e,function(n){if(!(0,Z.default)(n,"GROUP"))return!1;var i=n.GROUP;return i!==k.Lexer.SKIPPED&&i!==k.Lexer.NA&&!(0,Ye.default)(i)}),r=(0,D.default)(t,function(n){return{message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:k.LexerDefinitionErrorType.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}});return r}E.findInvalidGroupType=Nv;function Sv(e,t){var r=(0,Me.default)(e,function(i){return i.PUSH_MODE!==void 0&&!(0,mi.default)(t,i.PUSH_MODE)}),n=(0,D.default)(r,function(i){var a="Token Type: ->".concat(i.name,"<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->").concat(i.PUSH_MODE,"<-")+"which does not exist";return{message:a,type:k.LexerDefinitionErrorType.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}});return n}E.findModesThatDoNotExist=Sv;function Pv(e){var t=[],r=(0,_i.default)(e,function(n,i,a){var o=i.PATTERN;return o===k.Lexer.NA||((0,Ye.default)(o)?n.push({str:o,idx:a,tokenType:i}):(0,ut.default)(o)&&uk(o)&&n.push({str:o.source,idx:a,tokenType:i})),n},[]);return(0,Xe.default)(e,function(n,i){(0,Xe.default)(r,function(a){var o=a.str,s=a.idx,c=a.tokenType;if(i<s&&sk(o,n.PATTERN)){var f="Token: ->".concat(c.name,`<- can never be matched.
`)+"Because it appears AFTER the Token Type ->".concat(n.name,"<-")+`in the lexer's definition.
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:f,type:k.LexerDefinitionErrorType.UNREACHABLE_PATTERN,tokenTypes:[n,c]})}})}),t}E.findUnreachablePatterns=Pv;function sk(e,t){if((0,ut.default)(t)){var r=t.exec(e);return r!==null&&r.index===0}else{if((0,yi.default)(t))return t(e,0,[],{});if((0,Z.default)(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}function uk(e){var t=[".","\\","[","]","|","^","$","(",")","?","*","+","{"];return(0,ZL.default)(t,function(r){return e.source.indexOf(r)!==-1})===void 0}function to(e){var t=e.ignoreCase?"i":"";return new RegExp("^(?:".concat(e.source,")"),t)}E.addStartOfInput=to;function ro(e){var t=e.ignoreCase?"iy":"y";return new RegExp("".concat(e.source),t)}E.addStickyFlag=ro;function ck(e,t,r){var n=[];return(0,Z.default)(e,E.DEFAULT_MODE)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+E.DEFAULT_MODE+`> property in its definition
`,type:k.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),(0,Z.default)(e,E.MODES)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+E.MODES+`> property in its definition
`,type:k.LexerDefinitionErrorType.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),(0,Z.default)(e,E.MODES)&&(0,Z.default)(e,E.DEFAULT_MODE)&&!(0,Z.default)(e.modes,e.defaultMode)&&n.push({message:"A MultiMode Lexer cannot be initialized with a ".concat(E.DEFAULT_MODE,": <").concat(e.defaultMode,">")+`which does not exist
`,type:k.LexerDefinitionErrorType.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),(0,Z.default)(e,E.MODES)&&(0,Xe.default)(e.modes,function(i,a){(0,Xe.default)(i,function(o,s){if((0,eo.default)(o))n.push({message:"A Lexer cannot be initialized using an undefined Token Type. Mode:"+"<".concat(a,"> at index: <").concat(s,`>
`),type:k.LexerDefinitionErrorType.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if((0,Z.default)(o,"LONGER_ALT")){var c=(0,vi.default)(o.LONGER_ALT)?o.LONGER_ALT:[o.LONGER_ALT];(0,Xe.default)(c,function(f){!(0,eo.default)(f)&&!(0,mi.default)(i,f)&&n.push({message:"A MultiMode Lexer cannot be initialized with a longer_alt <".concat(f.name,"> on token <").concat(o.name,"> outside of mode <").concat(a,`>
`),type:k.LexerDefinitionErrorType.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}E.performRuntimeChecks=ck;function lk(e,t,r){var n=[],i=!1,a=(0,vv.default)((0,$L.default)((0,YL.default)(e.modes))),o=(0,_v.default)(a,function(c){return c[Tt]===k.Lexer.NA}),s=Lv(r);return t&&(0,Xe.default)(o,function(c){var f=bv(c,s);if(f!==!1){var p=Cv(c,f),d={message:p,type:f.issue,tokenType:c};n.push(d)}else(0,Z.default)(c,"LINE_BREAKS")?c.LINE_BREAKS===!0&&(i=!0):(0,nr.canMatchCharCode)(s,c.PATTERN)&&(i=!0)}),t&&!i&&n.push({message:`Warning: No LINE_BREAKS Found.
This Lexer has been defined to track line and column information,
But none of the Token Types can be identified as matching a line terminator.
See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
for details.`,type:k.LexerDefinitionErrorType.NO_LINE_BREAKS_FLAGS}),n}E.performWarningRuntimeChecks=lk;function fk(e){var t={},r=(0,JL.default)(e);return(0,Xe.default)(r,function(n){var i=e[n];if((0,vi.default)(i))t[n]=[];else throw Error("non exhaustive match")}),t}E.cloneEmptyGroups=fk;function io(e){var t=e.PATTERN;if((0,ut.default)(t))return!1;if((0,yi.default)(t))return!0;if((0,Z.default)(t,"exec"))return!0;if((0,Ye.default)(t))return!1;throw Error("non exhaustive match")}E.isCustomPattern=io;function xv(e){return(0,Ye.default)(e)&&e.length===1?e.charCodeAt(0):!1}E.isShortPattern=xv;E.LineTerminatorOptimizedTester={test:function(e){for(var t=e.length,r=this.lastIndex;r<t;r++){var n=e.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return e.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function bv(e,t){if((0,Z.default)(e,"LINE_BREAKS"))return!1;if((0,ut.default)(e.PATTERN)){try{(0,nr.canMatchCharCode)(t,e.PATTERN)}catch(r){return{issue:k.LexerDefinitionErrorType.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if((0,Ye.default)(e.PATTERN))return!1;if(io(e))return{issue:k.LexerDefinitionErrorType.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function Cv(e,t){if(t.issue===k.LexerDefinitionErrorType.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
`+" The problem is in the <".concat(e.name,`> Token Type
`)+" Root cause: ".concat(t.errMsg,`.
`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR";if(t.issue===k.LexerDefinitionErrorType.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
`+" The problem is in the <".concat(e.name,`> Token Type
`)+" For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK";throw Error("non exhaustive match")}E.buildLineBreakIssueMessage=Cv;function Lv(e){var t=(0,D.default)(e,function(r){return(0,Ye.default)(r)?r.charCodeAt(0):r});return t}function Qa(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}E.minOptimizationVal=256;var hi=[];function no(e){return e<E.minOptimizationVal?e:hi[e]}E.charCodeToOptimizedIndex=no;function dk(){if((0,hv.default)(hi)){hi=new Array(65536);for(var e=0;e<65536;e++)hi[e]=e>255?255+~~(e/255):e}}});var gi=u((MG,kv)=>{function pk(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}kv.exports=pk});var At=u(O=>{"use strict";var Fe=O&&O.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(O,"__esModule",{value:!0});O.isTokenType=O.hasExtendingTokensTypesMapProperty=O.hasExtendingTokensTypesProperty=O.hasCategoriesProperty=O.hasShortKeyProperty=O.singleAssignCategoriesToksMap=O.assignCategoriesMapProp=O.assignCategoriesTokensProp=O.assignTokenDefaultProps=O.expandCategories=O.augmentTokenTypes=O.tokenIdxToClass=O.tokenShortNameIdx=O.tokenStructuredMatcherNoCategories=O.tokenStructuredMatcher=void 0;var hk=Fe(pe()),vk=Fe(en()),_k=Fe(C()),yk=Fe(qe()),mk=Fe(si()),gk=Fe(Q()),Et=Fe(z()),rn=Fe(le()),Tk=Fe(He()),Ek=Fe(Ke());function Ak(e,t){var r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}O.tokenStructuredMatcher=Ak;function Ok(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}O.tokenStructuredMatcherNoCategories=Ok;O.tokenShortNameIdx=1;O.tokenIdxToClass={};function Rk(e){var t=qv(e);Mv(t),wv(t),Fv(t),(0,Et.default)(t,function(r){r.isParent=r.categoryMatches.length>0})}O.augmentTokenTypes=Rk;function qv(e){for(var t=(0,Ek.default)(e),r=e,n=!0;n;){r=(0,vk.default)((0,yk.default)((0,gk.default)(r,function(a){return a.CATEGORIES})));var i=(0,mk.default)(r,t);t=t.concat(i),(0,hk.default)(i)?n=!1:r=i}return t}O.expandCategories=qv;function Mv(e){(0,Et.default)(e,function(t){Dv(t)||(O.tokenIdxToClass[O.tokenShortNameIdx]=t,t.tokenTypeIdx=O.tokenShortNameIdx++),ao(t)&&!(0,_k.default)(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),ao(t)||(t.CATEGORIES=[]),Uv(t)||(t.categoryMatches=[]),jv(t)||(t.categoryMatchesMap={})})}O.assignTokenDefaultProps=Mv;function Fv(e){(0,Et.default)(e,function(t){t.categoryMatches=[],(0,Et.default)(t.categoryMatchesMap,function(r,n){t.categoryMatches.push(O.tokenIdxToClass[n].tokenTypeIdx)})})}O.assignCategoriesTokensProp=Fv;function wv(e){(0,Et.default)(e,function(t){oo([],t)})}O.assignCategoriesMapProp=wv;function oo(e,t){(0,Et.default)(e,function(r){t.categoryMatchesMap[r.tokenTypeIdx]=!0}),(0,Et.default)(t.CATEGORIES,function(r){var n=e.concat(t);(0,Tk.default)(n,r)||oo(n,r)})}O.singleAssignCategoriesToksMap=oo;function Dv(e){return(0,rn.default)(e,"tokenTypeIdx")}O.hasShortKeyProperty=Dv;function ao(e){return(0,rn.default)(e,"CATEGORIES")}O.hasCategoriesProperty=ao;function Uv(e){return(0,rn.default)(e,"categoryMatches")}O.hasExtendingTokensTypesProperty=Uv;function jv(e){return(0,rn.default)(e,"categoryMatchesMap")}O.hasExtendingTokensTypesMapProperty=jv;function Ik(e){return(0,rn.default)(e,"tokenTypeIdx")}O.isTokenType=Ik});var so=u(Ti=>{"use strict";Object.defineProperty(Ti,"__esModule",{value:!0});Ti.defaultLexerErrorProvider=void 0;Ti.defaultLexerErrorProvider={buildUnableToPopLexerModeMessage:function(e){return"Unable to pop Lexer Mode after encountering Token ->".concat(e.image,"<- The Mode Stack is empty")},buildUnexpectedCharactersMessage:function(e,t,r,n,i){return"unexpected character: ->".concat(e.charAt(t),"<- at offset: ").concat(t,",")+" skipped ".concat(r," characters.")}}});var tn=u(Ze=>{"use strict";var fe=Ze&&Ze.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ze,"__esModule",{value:!0});Ze.Lexer=Ze.LexerDefinitionErrorType=void 0;var $e=Ja(),uo=fe(ei()),Ei=fe(pe()),Nk=fe(C()),Sk=fe(gi()),Pk=fe(oi()),Gv=fe(Q()),co=fe(z()),xk=fe(ce()),bk=fe(gt()),Bv=fe(Ht()),Wv=fe(Zr()),Ck=fe(st()),Kv=fe(Ke()),lo=$t(),Lk=At(),kk=so(),qk=fi(),Mk;(function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Mk=Ze.LexerDefinitionErrorType||(Ze.LexerDefinitionErrorType={}));var nn={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:kk.defaultLexerErrorProvider,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(nn);var Fk=function(){function e(t,r){r===void 0&&(r=nn);var n=this;if(this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=function(a,o){if(n.traceInitPerf===!0){n.traceInitIndent++;var s=new Array(n.traceInitIndent+1).join(" ");n.traceInitIndent<n.traceInitMaxIdent&&console.log("".concat(s,"--> <").concat(a,">"));var c=(0,lo.timer)(o),f=c.time,p=c.value,d=f>10?console.warn:console.log;return n.traceInitIndent<n.traceInitMaxIdent&&d("".concat(s,"<-- <").concat(a,"> time: ").concat(f,"ms")),n.traceInitIndent--,p}else return o()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
a boolean 2nd argument is no longer supported`);this.config=(0,Wv.default)({},nn,r);var i=this.config.traceInitPerf;i===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof i=="number"&&(this.traceInitMaxIdent=i,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",function(){var a,o=!0;n.TRACE_INIT("Lexer Config handling",function(){if(n.config.lineTerminatorsPattern===nn.lineTerminatorsPattern)n.config.lineTerminatorsPattern=$e.LineTerminatorOptimizedTester;else if(n.config.lineTerminatorCharacters===nn.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');n.trackStartLines=/full|onlyStart/i.test(n.config.positionTracking),n.trackEndLines=/full/i.test(n.config.positionTracking),(0,Nk.default)(t)?a={modes:{defaultMode:(0,Kv.default)(t)},defaultMode:$e.DEFAULT_MODE}:(o=!1,a=(0,Kv.default)(t))}),n.config.skipValidations===!1&&(n.TRACE_INIT("performRuntimeChecks",function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat((0,$e.performRuntimeChecks)(a,n.trackStartLines,n.config.lineTerminatorCharacters))}),n.TRACE_INIT("performWarningRuntimeChecks",function(){n.lexerDefinitionWarning=n.lexerDefinitionWarning.concat((0,$e.performWarningRuntimeChecks)(a,n.trackStartLines,n.config.lineTerminatorCharacters))})),a.modes=a.modes?a.modes:{},(0,co.default)(a.modes,function(p,d){a.modes[d]=(0,Pk.default)(p,function(h){return(0,bk.default)(h)})});var s=(0,xk.default)(a.modes);if((0,co.default)(a.modes,function(p,d){n.TRACE_INIT("Mode: <".concat(d,"> processing"),function(){if(n.modes.push(d),n.config.skipValidations===!1&&n.TRACE_INIT("validatePatterns",function(){n.lexerDefinitionErrors=n.lexerDefinitionErrors.concat((0,$e.validatePatterns)(p,s))}),(0,Ei.default)(n.lexerDefinitionErrors)){(0,Lk.augmentTokenTypes)(p);var h;n.TRACE_INIT("analyzeTokenTypes",function(){h=(0,$e.analyzeTokenTypes)(p,{lineTerminatorCharacters:n.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:n.TRACE_INIT})}),n.patternIdxToConfig[d]=h.patternIdxToConfig,n.charCodeToPatternIdxToConfig[d]=h.charCodeToPatternIdxToConfig,n.emptyGroups=(0,Wv.default)({},n.emptyGroups,h.emptyGroups),n.hasCustom=h.hasCustom||n.hasCustom,n.canModeBeOptimized[d]=h.canBeOptimized}})}),n.defaultMode=a.defaultMode,!(0,Ei.default)(n.lexerDefinitionErrors)&&!n.config.deferDefinitionErrorsHandling){var c=(0,Gv.default)(n.lexerDefinitionErrors,function(p){return p.message}),f=c.join(`-----------------------
`);throw new Error(`Errors detected in definition of Lexer:
`+f)}(0,co.default)(n.lexerDefinitionWarning,function(p){(0,lo.PRINT_WARNING)(p.message)}),n.TRACE_INIT("Choosing sub-methods implementations",function(){if($e.SUPPORT_STICKY?(n.chopInput=Bv.default,n.match=n.matchWithTest):(n.updateLastIndex=uo.default,n.match=n.matchWithExec),o&&(n.handleModes=uo.default),n.trackStartLines===!1&&(n.computeNewColumn=Bv.default),n.trackEndLines===!1&&(n.updateTokenEndLineColumnLocation=uo.default),/full/i.test(n.config.positionTracking))n.createTokenInstance=n.createFullToken;else if(/onlyStart/i.test(n.config.positionTracking))n.createTokenInstance=n.createStartOnlyToken;else if(/onlyOffset/i.test(n.config.positionTracking))n.createTokenInstance=n.createOffsetOnlyToken;else throw Error('Invalid <positionTracking> config option: "'.concat(n.config.positionTracking,'"'));n.hasCustom?(n.addToken=n.addTokenUsingPush,n.handlePayload=n.handlePayloadWithCustom):(n.addToken=n.addTokenUsingMemberAccess,n.handlePayload=n.handlePayloadNoCustom)}),n.TRACE_INIT("Failed Optimization Warnings",function(){var p=(0,Ck.default)(n.canModeBeOptimized,function(d,h,_){return h===!1&&d.push(_),d},[]);if(r.ensureOptimizations&&!(0,Ei.default)(p))throw Error("Lexer Modes: < ".concat(p.join(", "),` > cannot be optimized.
`)+` Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
Or inspect the console log for details on how to resolve these issues.`)}),n.TRACE_INIT("clearRegExpParserCache",function(){(0,qk.clearRegExpParserCache)()}),n.TRACE_INIT("toFastProperties",function(){(0,lo.toFastProperties)(n)})})}return e.prototype.tokenize=function(t,r){if(r===void 0&&(r=this.defaultMode),!(0,Ei.default)(this.lexerDefinitionErrors)){var n=(0,Gv.default)(this.lexerDefinitionErrors,function(a){return a.message}),i=n.join(`-----------------------
`);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
`+i)}return this.tokenizeInternal(t,r)},e.prototype.tokenizeInternal=function(t,r){var n=this,i,a,o,s,c,f,p,d,h,_,l,v,y,T,A,g,R=t,V=R.length,L=0,re=0,Ne=this.hasCustom?0:Math.floor(t.length/10),Y=new Array(Ne),oe=[],se=this.trackStartLines?1:void 0,Se=this.trackStartLines?1:void 0,We=(0,$e.cloneEmptyGroups)(this.emptyGroups),Xi=this.trackStartLines,Nr=this.config.lineTerminatorsPattern,Tn=0,rt=[],Sr=[],En=[],zo=[];Object.freeze(zo);var Pr;function Xo(){return rt}function Yo(ue){var Cr=(0,$e.charCodeToOptimizedIndex)(ue),Ct=Sr[Cr];return Ct===void 0?zo:Ct}var Im=function(ue){if(En.length===1&&ue.tokenType.PUSH_MODE===void 0){var Cr=n.config.errorMessageProvider.buildUnableToPopLexerModeMessage(ue);oe.push({offset:ue.startOffset,line:ue.startLine,column:ue.startColumn,length:ue.image.length,message:Cr})}else{En.pop();var Ct=(0,Sk.default)(En);rt=n.patternIdxToConfig[Ct],Sr=n.charCodeToPatternIdxToConfig[Ct],Tn=rt.length;var Pm=n.canModeBeOptimized[Ct]&&n.config.safeMode===!1;Sr&&Pm?Pr=Yo:Pr=Xo}};function $o(ue){En.push(ue),Sr=this.charCodeToPatternIdxToConfig[ue],rt=this.patternIdxToConfig[ue],Tn=rt.length,Tn=rt.length;var Cr=this.canModeBeOptimized[ue]&&this.config.safeMode===!1;Sr&&Cr?Pr=Yo:Pr=Xo}$o.call(this,r);for(var ye,Zo=this.config.recoveryEnabled;L<V;){f=null;var Jo=R.charCodeAt(L),Qo=Pr(Jo),Nm=Qo.length;for(i=0;i<Nm;i++){ye=Qo[i];var nt=ye.pattern;p=null;var xr=ye.short;if(xr!==!1?Jo===xr&&(f=nt):ye.isCustom===!0?(g=nt.exec(R,L,Y,We),g!==null?(f=g[0],g.payload!==void 0&&(p=g.payload)):f=null):(this.updateLastIndex(nt,L),f=this.match(nt,t,L)),f!==null){if(c=ye.longerAlt,c!==void 0){var Sm=c.length;for(o=0;o<Sm;o++){var Yi=rt[c[o]],$i=Yi.pattern;if(d=null,Yi.isCustom===!0?(g=$i.exec(R,L,Y,We),g!==null?(s=g[0],g.payload!==void 0&&(d=g.payload)):s=null):(this.updateLastIndex($i,L),s=this.match($i,t,L)),s&&s.length>f.length){f=s,p=d,ye=Yi;break}}}break}}if(f!==null){if(h=f.length,_=ye.group,_!==void 0&&(l=ye.tokenTypeIdx,v=this.createTokenInstance(f,L,l,ye.tokenType,se,Se,h),this.handlePayload(v,p),_===!1?re=this.addToken(Y,re,v):We[_].push(v)),t=this.chopInput(t,h),L=L+h,Se=this.computeNewColumn(Se,h),Xi===!0&&ye.canLineTerminator===!0){var An=0,Zi=void 0,Ji=void 0;Nr.lastIndex=0;do Zi=Nr.test(f),Zi===!0&&(Ji=Nr.lastIndex-1,An++);while(Zi===!0);An!==0&&(se=se+An,Se=h-Ji,this.updateTokenEndLineColumnLocation(v,_,Ji,An,se,Se,h))}this.handleModes(ye,Im,$o,v)}else{for(var Qi=L,es=se,ts=Se,br=Zo===!1;br===!1&&L<V;)for(t=this.chopInput(t,1),L++,a=0;a<Tn;a++){var ea=rt[a],nt=ea.pattern,xr=ea.short;if(xr!==!1?R.charCodeAt(L)===xr&&(br=!0):ea.isCustom===!0?br=nt.exec(R,L,Y,We)!==null:(this.updateLastIndex(nt,L),br=nt.exec(t)!==null),br===!0)break}if(y=L-Qi,A=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(R,Qi,y,es,ts),oe.push({offset:Qi,line:es,column:ts,length:y,message:A}),Zo===!1)break}}return this.hasCustom||(Y.length=re),{tokens:Y,groups:We,errors:oe}},e.prototype.handleModes=function(t,r,n,i){if(t.pop===!0){var a=t.push;r(i),a!==void 0&&n.call(this,a)}else t.push!==void 0&&n.call(this,t.push)},e.prototype.chopInput=function(t,r){return t.substring(r)},e.prototype.updateLastIndex=function(t,r){t.lastIndex=r},e.prototype.updateTokenEndLineColumnLocation=function(t,r,n,i,a,o,s){var c,f;r!==void 0&&(c=n===s-1,f=c?-1:0,i===1&&c===!0||(t.endLine=a+f,t.endColumn=o-1+-f))},e.prototype.computeNewColumn=function(t,r){return t+r},e.prototype.createOffsetOnlyToken=function(t,r,n,i){return{image:t,startOffset:r,tokenTypeIdx:n,tokenType:i}},e.prototype.createStartOnlyToken=function(t,r,n,i,a,o){return{image:t,startOffset:r,startLine:a,startColumn:o,tokenTypeIdx:n,tokenType:i}},e.prototype.createFullToken=function(t,r,n,i,a,o,s){return{image:t,startOffset:r,endOffset:r+s-1,startLine:a,endLine:a,startColumn:o,endColumn:o+s-1,tokenTypeIdx:n,tokenType:i}},e.prototype.addTokenUsingPush=function(t,r,n){return t.push(n),r},e.prototype.addTokenUsingMemberAccess=function(t,r,n){return t[r]=n,r++,r},e.prototype.handlePayloadNoCustom=function(t,r){},e.prototype.handlePayloadWithCustom=function(t,r){r!==null&&(t.payload=r)},e.prototype.matchWithTest=function(t,r,n){var i=t.test(r);return i===!0?r.substring(n,t.lastIndex):null},e.prototype.matchWithExec=function(t,r){var n=t.exec(r);return n!==null?n[0]:null},e.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.",e.NA=/NOT_APPLICABLE/,e}();Ze.Lexer=Fk});var Ot=u(K=>{"use strict";var fo=K&&K.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(K,"__esModule",{value:!0});K.tokenMatcher=K.createTokenInstance=K.EOF=K.createToken=K.hasTokenLabel=K.tokenName=K.tokenLabel=void 0;var wk=fo(Yr()),Je=fo(le()),Dk=fo(gt()),Uk=tn(),po=At();function jk(e){return Qv(e)?e.LABEL:e.name}K.tokenLabel=jk;function Gk(e){return e.name}K.tokenName=Gk;function Qv(e){return(0,wk.default)(e.LABEL)&&e.LABEL!==""}K.hasTokenLabel=Qv;var Bk="parent",Vv="categories",Hv="label",zv="group",Xv="push_mode",Yv="pop_mode",$v="longer_alt",Zv="line_breaks",Jv="start_chars_hint";function e_(e){return Wk(e)}K.createToken=e_;function Wk(e){var t=e.pattern,r={};if(r.name=e.name,(0,Dk.default)(t)||(r.PATTERN=t),(0,Je.default)(e,Bk))throw`The parent property is no longer supported.
See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return(0,Je.default)(e,Vv)&&(r.CATEGORIES=e[Vv]),(0,po.augmentTokenTypes)([r]),(0,Je.default)(e,Hv)&&(r.LABEL=e[Hv]),(0,Je.default)(e,zv)&&(r.GROUP=e[zv]),(0,Je.default)(e,Yv)&&(r.POP_MODE=e[Yv]),(0,Je.default)(e,Xv)&&(r.PUSH_MODE=e[Xv]),(0,Je.default)(e,$v)&&(r.LONGER_ALT=e[$v]),(0,Je.default)(e,Zv)&&(r.LINE_BREAKS=e[Zv]),(0,Je.default)(e,Jv)&&(r.START_CHARS_HINT=e[Jv]),r}K.EOF=e_({name:"EOF",pattern:Uk.Lexer.NA});(0,po.augmentTokenTypes)([K.EOF]);function Kk(e,t,r,n,i,a,o,s){return{image:t,startOffset:r,endOffset:n,startLine:i,endLine:a,startColumn:o,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}K.createTokenInstance=Kk;function Vk(e,t){return(0,po.tokenStructuredMatcher)(e,t)}K.tokenMatcher=Vk});var ar=u(Oe=>{"use strict";var _o=Oe&&Oe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Oe,"__esModule",{value:!0});Oe.defaultGrammarValidatorErrorProvider=Oe.defaultGrammarResolverErrorProvider=Oe.defaultParserErrorProvider=void 0;var ir=Ot(),vo=_o(er()),ct=_o(Q()),Hk=_o(st()),ho=G(),t_=G();Oe.defaultParserErrorProvider={buildMismatchTokenMessage:function(e){var t=e.expected,r=e.actual,n=e.previous,i=e.ruleName,a=(0,ir.hasTokenLabel)(t),o=a?"--> ".concat((0,ir.tokenLabel)(t)," <--"):"token of type --> ".concat(t.name," <--"),s="Expecting ".concat(o," but found --> '").concat(r.image,"' <--");return s},buildNotAllInputParsedMessage:function(e){var t=e.firstRedundant,r=e.ruleName;return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage:function(e){var t=e.expectedPathsPerAlt,r=e.actual,n=e.previous,i=e.customUserDescription,a=e.ruleName,o="Expecting: ",s=(0,vo.default)(r).image,c=`
but found: '`+s+"'";if(i)return o+i+c;var f=(0,Hk.default)(t,function(_,l){return _.concat(l)},[]),p=(0,ct.default)(f,function(_){return"[".concat((0,ct.default)(_,function(l){return(0,ir.tokenLabel)(l)}).join(", "),"]")}),d=(0,ct.default)(p,function(_,l){return" ".concat(l+1,". ").concat(_)}),h=`one of these possible Token sequences:
`.concat(d.join(`
`));return o+h+c},buildEarlyExitMessage:function(e){var t=e.expectedIterationPaths,r=e.actual,n=e.customUserDescription,i=e.ruleName,a="Expecting: ",o=(0,vo.default)(r).image,s=`
but found: '`+o+"'";if(n)return a+n+s;var c=(0,ct.default)(t,function(p){return"[".concat((0,ct.default)(p,function(d){return(0,ir.tokenLabel)(d)}).join(","),"]")}),f=`expecting at least one iteration which starts with one of these possible Token sequences::
`+"<".concat(c.join(" ,"),">");return a+f+s}};Object.freeze(Oe.defaultParserErrorProvider);Oe.defaultGrammarResolverErrorProvider={buildRuleNotFoundError:function(e,t){var r="Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
inside top level rule: ->`+e.name+"<-";return r}};Oe.defaultGrammarValidatorErrorProvider={buildDuplicateFoundError:function(e,t){function r(p){return p instanceof ho.Terminal?p.terminalType.name:p instanceof ho.NonTerminal?p.nonTerminalName:""}var n=e.name,i=(0,vo.default)(t),a=i.idx,o=(0,t_.getProductionDslName)(i),s=r(i),c=a>0,f="->".concat(o).concat(c?a:"","<- ").concat(s?"with argument: ->".concat(s,"<-"):"",`
appears more than once (`).concat(t.length," times) in the top level rule: ->").concat(n,`<-.
For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
`);return f=f.replace(/[ \t]+/g," "),f=f.replace(/\s\s+/g,`
`),f},buildNamespaceConflictError:function(e){var t=`Namespace conflict found in grammar.
`+"The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <".concat(e.name,`>.
`)+`To resolve this make sure each Terminal and Non-Terminal names are unique
This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
and Non-Terminal names start with a lower case letter.`;return t},buildAlternationPrefixAmbiguityError:function(e){var t=(0,ct.default)(e.prefixPath,function(i){return(0,ir.tokenLabel)(i)}).join(", "),r=e.alternation.idx===0?"":e.alternation.idx,n="Ambiguous alternatives: <".concat(e.ambiguityIndices.join(" ,"),`> due to common lookahead prefix
`)+"in <OR".concat(r,"> inside <").concat(e.topLevelRule.name,`> Rule,
`)+"<".concat(t,`> may appears as a prefix path in all these alternatives.
`)+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
For Further details.`;return n},buildAlternationAmbiguityError:function(e){var t=(0,ct.default)(e.prefixPath,function(i){return(0,ir.tokenLabel)(i)}).join(", "),r=e.alternation.idx===0?"":e.alternation.idx,n="Ambiguous Alternatives Detected: <".concat(e.ambiguityIndices.join(" ,"),"> in <OR").concat(r,">")+" inside <".concat(e.topLevelRule.name,`> Rule,
`)+"<".concat(t,`> may appears as a prefix path in all these alternatives.
`);return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
For Further details.`,n},buildEmptyRepetitionError:function(e){var t=(0,t_.getProductionDslName)(e.repetition);e.repetition.idx!==0&&(t+=e.repetition.idx);var r="The repetition <".concat(t,"> within Rule <").concat(e.topLevelRule.name,`> can never consume any tokens.
`)+"This could lead to an infinite loop.";return r},buildTokenNameError:function(e){return"deprecated"},buildEmptyAlternationError:function(e){var t="Ambiguous empty alternative: <".concat(e.emptyChoiceIdx+1,">")+" in <OR".concat(e.alternation.idx,"> inside <").concat(e.topLevelRule.name,`> Rule.
`)+"Only the last alternative may be an empty alternative.";return t},buildTooManyAlternativesError:function(e){var t=`An Alternation cannot have more than 256 alternatives:
`+"<OR".concat(e.alternation.idx,"> inside <").concat(e.topLevelRule.name,`> Rule.
has `).concat(e.alternation.definition.length+1," alternatives.");return t},buildLeftRecursionError:function(e){var t=e.topLevelRule.name,r=(0,ct.default)(e.leftRecursionPath,function(a){return a.name}),n="".concat(t," --> ").concat(r.concat([t]).join(" --> ")),i=`Left Recursion found in grammar.
`+"rule: <".concat(t,`> can be invoked from itself (directly or indirectly)
`)+`without consuming any Tokens. The grammar path that causes this is:
`.concat(n,`
`)+` To fix this refactor your grammar to remove the left recursion.
see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`;return i},buildInvalidRuleNameError:function(e){return"deprecated"},buildDuplicateRuleNameError:function(e){var t;e.topLevelRule instanceof ho.Rule?t=e.topLevelRule.name:t=e.topLevelRule;var r="Duplicate definition, rule: ->".concat(t,"<- is already defined in the grammar: ->").concat(e.grammarName,"<-");return r}}});var i_=u(we=>{"use strict";var zk=we&&we.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),r_=we&&we.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(we,"__esModule",{value:!0});we.GastRefResolverVisitor=we.resolveGrammar=void 0;var Xk=ae(),Yk=r_(z()),$k=r_(Pe()),Zk=G();function Jk(e,t){var r=new n_(e,t);return r.resolveRefs(),r.errors}we.resolveGrammar=Jk;var n_=function(e){zk(t,e);function t(r,n){var i=e.call(this)||this;return i.nameToTopRule=r,i.errMsgProvider=n,i.errors=[],i}return t.prototype.resolveRefs=function(){var r=this;(0,Yk.default)((0,$k.default)(this.nameToTopRule),function(n){r.currTopLevel=n,n.accept(r)})},t.prototype.visitNonTerminal=function(r){var n=this.nameToTopRule[r.nonTerminalName];if(n)r.referencedRule=n;else{var i=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,r);this.errors.push({message:i,type:Xk.ParserDefinitionErrorType.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:r.nonTerminalName})}},t}(Zk.GAstVisitor);we.GastRefResolverVisitor=n_});var o_=u((BG,a_)=>{function Qk(e,t,r,n){for(var i=-1,a=e==null?0:e.length;++i<a;){var o=e[i];t(n,o,r(o),e)}return n}a_.exports=Qk});var u_=u((WG,s_)=>{var eq=ot();function tq(e,t,r,n){return eq(e,function(i,a,o){t(n,i,r(i),o)}),n}s_.exports=tq});var l_=u((KG,c_)=>{var rq=o_(),nq=u_(),iq=Ae(),aq=C();function oq(e,t){return function(r,n){var i=aq(r)?rq:nq,a=t?t():{};return i(r,e,iq(n,2),a)}}c_.exports=oq});var yo=u((VG,f_)=>{var sq=Un(),uq=l_(),cq=Object.prototype,lq=cq.hasOwnProperty,fq=uq(function(e,t,r){lq.call(e,r)?e[r].push(t):sq(e,r,[t])});f_.exports=fq});var mo=u((HG,d_)=>{var dq=Qn(),pq=Q();function hq(e,t){return dq(pq(e,t),1)}d_.exports=hq});var Ai=u((zG,p_)=>{var vq=Wn(),_q=Zt();function yq(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:_q(t),t=n-t,vq(e,0,t<0?0:t)):[]}p_.exports=yq});var on=u(U=>{"use strict";var It=U&&U.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Nt=U&&U.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(U,"__esModule",{value:!0});U.nextPossibleTokensAfter=U.possiblePathsFrom=U.NextTerminalAfterAtLeastOneSepWalker=U.NextTerminalAfterAtLeastOneWalker=U.NextTerminalAfterManySepWalker=U.NextTerminalAfterManyWalker=U.AbstractNextTerminalAfterProductionWalker=U.NextAfterTokenWalker=U.AbstractNextPossibleTokensWalker=void 0;var v_=Jn(),Ri=Nt(er()),Oi=Nt(pe()),h_=Nt(Ai()),ee=Nt(Kn()),mq=Nt(gi()),gq=Nt(z()),Rt=Nt(Ke()),Tq=Va(),I=G(),__=function(e){It(t,e);function t(r,n){var i=e.call(this)||this;return i.topProd=r,i.path=n,i.possibleTokTypes=[],i.nextProductionName="",i.nextProductionOccurrence=0,i.found=!1,i.isAtEndOfPath=!1,i}return t.prototype.startWalking=function(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=(0,Rt.default)(this.path.ruleStack).reverse(),this.occurrenceStack=(0,Rt.default)(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes},t.prototype.walk=function(r,n){n===void 0&&(n=[]),this.found||e.prototype.walk.call(this,r,n)},t.prototype.walkProdRef=function(r,n,i){if(r.referencedRule.name===this.nextProductionName&&r.idx===this.nextProductionOccurrence){var a=n.concat(i);this.updateExpectedNext(),this.walk(r.referencedRule,a)}},t.prototype.updateExpectedNext=function(){(0,Oi.default)(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())},t}(v_.RestWalker);U.AbstractNextPossibleTokensWalker=__;var Eq=function(e){It(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.path=n,i.nextTerminalName="",i.nextTerminalOccurrence=0,i.nextTerminalName=i.path.lastTok.name,i.nextTerminalOccurrence=i.path.lastTokOccurrence,i}return t.prototype.walkTerminal=function(r,n,i){if(this.isAtEndOfPath&&r.terminalType.name===this.nextTerminalName&&r.idx===this.nextTerminalOccurrence&&!this.found){var a=n.concat(i),o=new I.Alternative({definition:a});this.possibleTokTypes=(0,Tq.first)(o),this.found=!0}},t}(__);U.NextAfterTokenWalker=Eq;var an=function(e){It(t,e);function t(r,n){var i=e.call(this)||this;return i.topRule=r,i.occurrence=n,i.result={token:void 0,occurrence:void 0,isEndOfRule:void 0},i}return t.prototype.startWalking=function(){return this.walk(this.topRule),this.result},t}(v_.RestWalker);U.AbstractNextTerminalAfterProductionWalker=an;var Aq=function(e){It(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.walkMany=function(r,n,i){if(r.idx===this.occurrence){var a=(0,Ri.default)(n.concat(i));this.result.isEndOfRule=a===void 0,a instanceof I.Terminal&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else e.prototype.walkMany.call(this,r,n,i)},t}(an);U.NextTerminalAfterManyWalker=Aq;var Oq=function(e){It(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.walkManySep=function(r,n,i){if(r.idx===this.occurrence){var a=(0,Ri.default)(n.concat(i));this.result.isEndOfRule=a===void 0,a instanceof I.Terminal&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else e.prototype.walkManySep.call(this,r,n,i)},t}(an);U.NextTerminalAfterManySepWalker=Oq;var Rq=function(e){It(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.walkAtLeastOne=function(r,n,i){if(r.idx===this.occurrence){var a=(0,Ri.default)(n.concat(i));this.result.isEndOfRule=a===void 0,a instanceof I.Terminal&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else e.prototype.walkAtLeastOne.call(this,r,n,i)},t}(an);U.NextTerminalAfterAtLeastOneWalker=Rq;var Iq=function(e){It(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.walkAtLeastOneSep=function(r,n,i){if(r.idx===this.occurrence){var a=(0,Ri.default)(n.concat(i));this.result.isEndOfRule=a===void 0,a instanceof I.Terminal&&(this.result.token=a.terminalType,this.result.occurrence=a.idx)}else e.prototype.walkAtLeastOneSep.call(this,r,n,i)},t}(an);U.NextTerminalAfterAtLeastOneSepWalker=Iq;function y_(e,t,r){r===void 0&&(r=[]),r=(0,Rt.default)(r);var n=[],i=0;function a(f){return f.concat((0,ee.default)(e,i+1))}function o(f){var p=y_(a(f),t,r);return n.concat(p)}for(;r.length<t&&i<e.length;){var s=e[i];if(s instanceof I.Alternative)return o(s.definition);if(s instanceof I.NonTerminal)return o(s.definition);if(s instanceof I.Option)n=o(s.definition);else if(s instanceof I.RepetitionMandatory){var c=s.definition.concat([new I.Repetition({definition:s.definition})]);return o(c)}else if(s instanceof I.RepetitionMandatoryWithSeparator){var c=[new I.Alternative({definition:s.definition}),new I.Repetition({definition:[new I.Terminal({terminalType:s.separator})].concat(s.definition)})];return o(c)}else if(s instanceof I.RepetitionWithSeparator){var c=s.definition.concat([new I.Repetition({definition:[new I.Terminal({terminalType:s.separator})].concat(s.definition)})]);n=o(c)}else if(s instanceof I.Repetition){var c=s.definition.concat([new I.Repetition({definition:s.definition})]);n=o(c)}else{if(s instanceof I.Alternation)return(0,gq.default)(s.definition,function(f){(0,Oi.default)(f.definition)===!1&&(n=o(f.definition))}),n;if(s instanceof I.Terminal)r.push(s.terminalType);else throw Error("non exhaustive match")}i++}return n.push({partialPath:r,suffixDef:(0,ee.default)(e,i)}),n}U.possiblePathsFrom=y_;function Nq(e,t,r,n){var i="EXIT_NONE_TERMINAL",a=[i],o="EXIT_ALTERNATIVE",s=!1,c=t.length,f=c-n-1,p=[],d=[];for(d.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!(0,Oi.default)(d);){var h=d.pop();if(h===o){s&&(0,mq.default)(d).idx<=f&&d.pop();continue}var _=h.def,l=h.idx,v=h.ruleStack,y=h.occurrenceStack;if(!(0,Oi.default)(_)){var T=_[0];if(T===i){var A={idx:l,def:(0,ee.default)(_),ruleStack:(0,h_.default)(v),occurrenceStack:(0,h_.default)(y)};d.push(A)}else if(T instanceof I.Terminal)if(l<c-1){var g=l+1,R=t[g];if(r(R,T.terminalType)){var A={idx:g,def:(0,ee.default)(_),ruleStack:v,occurrenceStack:y};d.push(A)}}else if(l===c-1)p.push({nextTokenType:T.terminalType,nextTokenOccurrence:T.idx,ruleStack:v,occurrenceStack:y}),s=!0;else throw Error("non exhaustive match");else if(T instanceof I.NonTerminal){var V=(0,Rt.default)(v);V.push(T.nonTerminalName);var L=(0,Rt.default)(y);L.push(T.idx);var A={idx:l,def:T.definition.concat(a,(0,ee.default)(_)),ruleStack:V,occurrenceStack:L};d.push(A)}else if(T instanceof I.Option){var re={idx:l,def:(0,ee.default)(_),ruleStack:v,occurrenceStack:y};d.push(re),d.push(o);var Ne={idx:l,def:T.definition.concat((0,ee.default)(_)),ruleStack:v,occurrenceStack:y};d.push(Ne)}else if(T instanceof I.RepetitionMandatory){var Y=new I.Repetition({definition:T.definition,idx:T.idx}),oe=T.definition.concat([Y],(0,ee.default)(_)),A={idx:l,def:oe,ruleStack:v,occurrenceStack:y};d.push(A)}else if(T instanceof I.RepetitionMandatoryWithSeparator){var se=new I.Terminal({terminalType:T.separator}),Y=new I.Repetition({definition:[se].concat(T.definition),idx:T.idx}),oe=T.definition.concat([Y],(0,ee.default)(_)),A={idx:l,def:oe,ruleStack:v,occurrenceStack:y};d.push(A)}else if(T instanceof I.RepetitionWithSeparator){var re={idx:l,def:(0,ee.default)(_),ruleStack:v,occurrenceStack:y};d.push(re),d.push(o);var se=new I.Terminal({terminalType:T.separator}),Se=new I.Repetition({definition:[se].concat(T.definition),idx:T.idx}),oe=T.definition.concat([Se],(0,ee.default)(_)),Ne={idx:l,def:oe,ruleStack:v,occurrenceStack:y};d.push(Ne)}else if(T instanceof I.Repetition){var re={idx:l,def:(0,ee.default)(_),ruleStack:v,occurrenceStack:y};d.push(re),d.push(o);var Se=new I.Repetition({definition:T.definition,idx:T.idx}),oe=T.definition.concat([Se],(0,ee.default)(_)),Ne={idx:l,def:oe,ruleStack:v,occurrenceStack:y};d.push(Ne)}else if(T instanceof I.Alternation)for(var We=T.definition.length-1;We>=0;We--){var Xi=T.definition[We],Nr={idx:l,def:Xi.definition.concat((0,ee.default)(_)),ruleStack:v,occurrenceStack:y};d.push(Nr),d.push(o)}else if(T instanceof I.Alternative)d.push({idx:l,def:T.definition.concat((0,ee.default)(_)),ruleStack:v,occurrenceStack:y});else if(T instanceof I.Rule)d.push(Sq(T,l,v,y));else throw Error("non exhaustive match")}}return p}U.nextPossibleTokensAfter=Nq;function Sq(e,t,r,n){var i=(0,Rt.default)(r);i.push(e.name);var a=(0,Rt.default)(n);return a.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:a}}});var or=u(P=>{"use strict";var E_=P&&P.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),xt=P&&P.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(P,"__esModule",{value:!0});P.areTokenCategoriesNotUsed=P.isStrictPrefixOfPath=P.containsPath=P.getLookaheadPathsForOptionalProd=P.getLookaheadPathsForOr=P.lookAheadSequenceFromAlternatives=P.buildSingleAlternativeLookaheadFunction=P.buildAlternativesLookAheadFunc=P.buildLookaheadFuncForOptionalProd=P.buildLookaheadFuncForOr=P.getLookaheadPaths=P.getProdType=P.PROD_TYPE=void 0;var To=xt(pe()),A_=xt(qe()),Pt=xt(Qr()),Ii=xt(Q()),St=xt(z()),m_=xt(le()),O_=xt(st()),g_=on(),Pq=Jn(),Ni=At(),lt=G(),xq=G(),B;(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(B=P.PROD_TYPE||(P.PROD_TYPE={}));function R_(e){if(e instanceof lt.Option||e==="Option")return B.OPTION;if(e instanceof lt.Repetition||e==="Repetition")return B.REPETITION;if(e instanceof lt.RepetitionMandatory||e==="RepetitionMandatory")return B.REPETITION_MANDATORY;if(e instanceof lt.RepetitionMandatoryWithSeparator||e==="RepetitionMandatoryWithSeparator")return B.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof lt.RepetitionWithSeparator||e==="RepetitionWithSeparator")return B.REPETITION_WITH_SEPARATOR;if(e instanceof lt.Alternation||e==="Alternation")return B.ALTERNATION;throw Error("non exhaustive match")}P.getProdType=R_;function bq(e){var t=e.occurrence,r=e.rule,n=e.prodType,i=e.maxLookahead,a=R_(n);return a===B.ALTERNATION?Ao(t,r,i):Oo(t,r,a,i)}P.getLookaheadPaths=bq;function Cq(e,t,r,n,i,a){var o=Ao(e,t,r),s=Ro(o)?Ni.tokenStructuredMatcherNoCategories:Ni.tokenStructuredMatcher;return a(o,n,s,i)}P.buildLookaheadFuncForOr=Cq;function Lq(e,t,r,n,i,a){var o=Oo(e,t,i,r),s=Ro(o)?Ni.tokenStructuredMatcherNoCategories:Ni.tokenStructuredMatcher;return a(o[0],s,n)}P.buildLookaheadFuncForOptionalProd=Lq;function kq(e,t,r,n){var i=e.length,a=(0,Pt.default)(e,function(c){return(0,Pt.default)(c,function(f){return f.length===1})});if(t)return function(c){for(var f=(0,Ii.default)(c,function(g){return g.GATE}),p=0;p<i;p++){var d=e[p],h=d.length,_=f[p];if(_!==void 0&&_.call(this)===!1)continue;e:for(var l=0;l<h;l++){for(var v=d[l],y=v.length,T=0;T<y;T++){var A=this.LA(T+1);if(r(A,v[T])===!1)continue e}return p}}};if(a&&!n){var o=(0,Ii.default)(e,function(c){return(0,A_.default)(c)}),s=(0,O_.default)(o,function(c,f,p){return(0,St.default)(f,function(d){(0,m_.default)(c,d.tokenTypeIdx)||(c[d.tokenTypeIdx]=p),(0,St.default)(d.categoryMatches,function(h){(0,m_.default)(c,h)||(c[h]=p)})}),c},{});return function(){var c=this.LA(1);return s[c.tokenTypeIdx]}}else return function(){for(var c=0;c<i;c++){var f=e[c],p=f.length;e:for(var d=0;d<p;d++){for(var h=f[d],_=h.length,l=0;l<_;l++){var v=this.LA(l+1);if(r(v,h[l])===!1)continue e}return c}}}}P.buildAlternativesLookAheadFunc=kq;function qq(e,t,r){var n=(0,Pt.default)(e,function(f){return f.length===1}),i=e.length;if(n&&!r){var a=(0,A_.default)(e);if(a.length===1&&(0,To.default)(a[0].categoryMatches)){var o=a[0],s=o.tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}else{var c=(0,O_.default)(a,function(f,p,d){return f[p.tokenTypeIdx]=!0,(0,St.default)(p.categoryMatches,function(h){f[h]=!0}),f},[]);return function(){var f=this.LA(1);return c[f.tokenTypeIdx]===!0}}}else return function(){e:for(var f=0;f<i;f++){for(var p=e[f],d=p.length,h=0;h<d;h++){var _=this.LA(h+1);if(t(_,p[h])===!1)continue e}return!0}return!1}}P.buildSingleAlternativeLookaheadFunction=qq;var Mq=function(e){E_(t,e);function t(r,n,i){var a=e.call(this)||this;return a.topProd=r,a.targetOccurrence=n,a.targetProdType=i,a}return t.prototype.startWalking=function(){return this.walk(this.topProd),this.restDef},t.prototype.checkIsTarget=function(r,n,i,a){return r.idx===this.targetOccurrence&&this.targetProdType===n?(this.restDef=i.concat(a),!0):!1},t.prototype.walkOption=function(r,n,i){this.checkIsTarget(r,B.OPTION,n,i)||e.prototype.walkOption.call(this,r,n,i)},t.prototype.walkAtLeastOne=function(r,n,i){this.checkIsTarget(r,B.REPETITION_MANDATORY,n,i)||e.prototype.walkOption.call(this,r,n,i)},t.prototype.walkAtLeastOneSep=function(r,n,i){this.checkIsTarget(r,B.REPETITION_MANDATORY_WITH_SEPARATOR,n,i)||e.prototype.walkOption.call(this,r,n,i)},t.prototype.walkMany=function(r,n,i){this.checkIsTarget(r,B.REPETITION,n,i)||e.prototype.walkOption.call(this,r,n,i)},t.prototype.walkManySep=function(r,n,i){this.checkIsTarget(r,B.REPETITION_WITH_SEPARATOR,n,i)||e.prototype.walkOption.call(this,r,n,i)},t}(Pq.RestWalker),I_=function(e){E_(t,e);function t(r,n,i){var a=e.call(this)||this;return a.targetOccurrence=r,a.targetProdType=n,a.targetRef=i,a.result=[],a}return t.prototype.checkIsTarget=function(r,n){r.idx===this.targetOccurrence&&this.targetProdType===n&&(this.targetRef===void 0||r===this.targetRef)&&(this.result=r.definition)},t.prototype.visitOption=function(r){this.checkIsTarget(r,B.OPTION)},t.prototype.visitRepetition=function(r){this.checkIsTarget(r,B.REPETITION)},t.prototype.visitRepetitionMandatory=function(r){this.checkIsTarget(r,B.REPETITION_MANDATORY)},t.prototype.visitRepetitionMandatoryWithSeparator=function(r){this.checkIsTarget(r,B.REPETITION_MANDATORY_WITH_SEPARATOR)},t.prototype.visitRepetitionWithSeparator=function(r){this.checkIsTarget(r,B.REPETITION_WITH_SEPARATOR)},t.prototype.visitAlternation=function(r){this.checkIsTarget(r,B.ALTERNATION)},t}(xq.GAstVisitor);function T_(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=[];return t}function go(e){for(var t=[""],r=0;r<e.length;r++){for(var n=e[r],i=[],a=0;a<t.length;a++){var o=t[a];i.push(o+"_"+n.tokenTypeIdx);for(var s=0;s<n.categoryMatches.length;s++){var c="_"+n.categoryMatches[s];i.push(o+c)}}t=i}return t}function Fq(e,t,r){for(var n=0;n<e.length;n++)if(n!==r)for(var i=e[n],a=0;a<t.length;a++){var o=t[a];if(i[o]===!0)return!1}return!0}function Eo(e,t){for(var r=(0,Ii.default)(e,function(p){return(0,g_.possiblePathsFrom)([p],1)}),n=T_(r.length),i=(0,Ii.default)(r,function(p){var d={};return(0,St.default)(p,function(h){var _=go(h.partialPath);(0,St.default)(_,function(l){d[l]=!0})}),d}),a=r,o=1;o<=t;o++){var s=a;a=T_(s.length);for(var c=function(p){for(var d=s[p],h=0;h<d.length;h++){var _=d[h].partialPath,l=d[h].suffixDef,v=go(_),y=Fq(i,v,p);if(y||(0,To.default)(l)||_.length===t){var T=n[p];if(N_(T,_)===!1){T.push(_);for(var A=0;A<v.length;A++){var g=v[A];i[p][g]=!0}}}else{var R=(0,g_.possiblePathsFrom)(l,o+1,_);a[p]=a[p].concat(R),(0,St.default)(R,function(V){var L=go(V.partialPath);(0,St.default)(L,function(re){i[p][re]=!0})})}}},f=0;f<s.length;f++)c(f)}return n}P.lookAheadSequenceFromAlternatives=Eo;function Ao(e,t,r,n){var i=new I_(e,B.ALTERNATION,n);return t.accept(i),Eo(i.result,r)}P.getLookaheadPathsForOr=Ao;function Oo(e,t,r,n){var i=new I_(e,r);t.accept(i);var a=i.result,o=new Mq(t,e,r),s=o.startWalking(),c=new lt.Alternative({definition:a}),f=new lt.Alternative({definition:s});return Eo([c,f],n)}P.getLookaheadPathsForOptionalProd=Oo;function N_(e,t){e:for(var r=0;r<e.length;r++){var n=e[r];if(n.length===t.length){for(var i=0;i<n.length;i++){var a=t[i],o=n[i],s=a===o||o.categoryMatchesMap[a.tokenTypeIdx]!==void 0;if(s===!1)continue e}return!0}}return!1}P.containsPath=N_;function wq(e,t){return e.length<t.length&&(0,Pt.default)(e,function(r,n){var i=t[n];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}P.isStrictPrefixOfPath=wq;function Ro(e){return(0,Pt.default)(e,function(t){return(0,Pt.default)(t,function(r){return(0,Pt.default)(r,function(n){return(0,To.default)(n.categoryMatches)})})})}P.areTokenCategoriesNotUsed=Ro});var cn=u(S=>{"use strict";var No=S&&S.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Io=S&&S.__assign||function(){return Io=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Io.apply(this,arguments)},H=S&&S.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(S,"__esModule",{value:!0});S.checkPrefixAlternativesAmbiguities=S.validateSomeNonEmptyLookaheadPath=S.validateTooManyAlts=S.RepetitionCollector=S.validateAmbiguousAlternationAlternatives=S.validateEmptyOrAlternative=S.getFirstNoneTerminal=S.validateNoLeftRecursion=S.validateRuleIsOverridden=S.validateRuleDoesNotAlreadyExist=S.OccurrenceValidationCollector=S.identifyProductionForDuplicates=S.validateGrammar=S.validateLookahead=void 0;var S_=H(er()),Si=H(pe()),Dq=H(Kn()),P_=H(qe()),Uq=H(ci()),jq=H(oi()),Gq=H(si()),ft=H(Q()),un=H(z()),Bq=H(yo()),So=H(st()),Wq=H(Ma()),Kq=H(Pe()),Po=H(He()),Qe=H(mo()),Vq=H(Ke()),Ie=ae(),xo=G(),sr=or(),Hq=on(),Re=G(),bo=G(),zq=H(Ai()),Xq=H(en()),Yq=At();function $q(e){var t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return(0,ft.default)(t,function(r){return Io({type:Ie.ParserDefinitionErrorType.CUSTOM_LOOKAHEAD_VALIDATION},r)})}S.validateLookahead=$q;function Zq(e,t,r,n){var i=(0,Qe.default)(e,function(c){return Jq(c,r)}),a=iM(e,t,r),o=(0,Qe.default)(e,function(c){return M_(c,r)}),s=(0,Qe.default)(e,function(c){return L_(c,e,n,r)});return i.concat(a,o,s)}S.validateGrammar=Zq;function Jq(e,t){var r=new C_;e.accept(r);var n=r.allProductions,i=(0,Bq.default)(n,x_),a=(0,Wq.default)(i,function(s){return s.length>1}),o=(0,ft.default)((0,Kq.default)(a),function(s){var c=(0,S_.default)(s),f=t.buildDuplicateFoundError(e,s),p=(0,xo.getProductionDslName)(c),d={message:f,type:Ie.ParserDefinitionErrorType.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:p,occurrence:c.idx},h=b_(c);return h&&(d.parameter=h),d});return o}function x_(e){return"".concat((0,xo.getProductionDslName)(e),"_#_").concat(e.idx,"_#_").concat(b_(e))}S.identifyProductionForDuplicates=x_;function b_(e){return e instanceof Re.Terminal?e.terminalType.name:e instanceof Re.NonTerminal?e.nonTerminalName:""}var C_=function(e){No(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.allProductions=[],r}return t.prototype.visitNonTerminal=function(r){this.allProductions.push(r)},t.prototype.visitOption=function(r){this.allProductions.push(r)},t.prototype.visitRepetitionWithSeparator=function(r){this.allProductions.push(r)},t.prototype.visitRepetitionMandatory=function(r){this.allProductions.push(r)},t.prototype.visitRepetitionMandatoryWithSeparator=function(r){this.allProductions.push(r)},t.prototype.visitRepetition=function(r){this.allProductions.push(r)},t.prototype.visitAlternation=function(r){this.allProductions.push(r)},t.prototype.visitTerminal=function(r){this.allProductions.push(r)},t}(bo.GAstVisitor);S.OccurrenceValidationCollector=C_;function L_(e,t,r,n){var i=[],a=(0,So.default)(t,function(s,c){return c.name===e.name?s+1:s},0);if(a>1){var o=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:o,type:Ie.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}S.validateRuleDoesNotAlreadyExist=L_;function Qq(e,t,r){var n=[],i;return(0,Po.default)(t,e)||(i="Invalid rule override, rule: ->".concat(e,"<- cannot be overridden in the grammar: ->").concat(r,"<-")+"as it is not defined in any of the super grammars ",n.push({message:i,type:Ie.ParserDefinitionErrorType.INVALID_RULE_OVERRIDE,ruleName:e})),n}S.validateRuleIsOverridden=Qq;function k_(e,t,r,n){n===void 0&&(n=[]);var i=[],a=sn(t.definition);if((0,Si.default)(a))return[];var o=e.name,s=(0,Po.default)(a,e);s&&i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:Ie.ParserDefinitionErrorType.LEFT_RECURSION,ruleName:o});var c=(0,Gq.default)(a,n.concat([e])),f=(0,Qe.default)(c,function(p){var d=(0,Vq.default)(n);return d.push(p),k_(e,p,r,d)});return i.concat(f)}S.validateNoLeftRecursion=k_;function sn(e){var t=[];if((0,Si.default)(e))return t;var r=(0,S_.default)(e);if(r instanceof Re.NonTerminal)t.push(r.referencedRule);else if(r instanceof Re.Alternative||r instanceof Re.Option||r instanceof Re.RepetitionMandatory||r instanceof Re.RepetitionMandatoryWithSeparator||r instanceof Re.RepetitionWithSeparator||r instanceof Re.Repetition)t=t.concat(sn(r.definition));else if(r instanceof Re.Alternation)t=(0,P_.default)((0,ft.default)(r.definition,function(o){return sn(o.definition)}));else if(!(r instanceof Re.Terminal))throw Error("non exhaustive match");var n=(0,xo.isOptionalProd)(r),i=e.length>1;if(n&&i){var a=(0,Dq.default)(e);return t.concat(sn(a))}else return t}S.getFirstNoneTerminal=sn;var Co=function(e){No(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.alternations=[],r}return t.prototype.visitAlternation=function(r){this.alternations.push(r)},t}(bo.GAstVisitor);function eM(e,t){var r=new Co;e.accept(r);var n=r.alternations,i=(0,Qe.default)(n,function(a){var o=(0,zq.default)(a.definition);return(0,Qe.default)(o,function(s,c){var f=(0,Hq.nextPossibleTokensAfter)([s],[],Yq.tokenStructuredMatcher,1);return(0,Si.default)(f)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:a,emptyChoiceIdx:c}),type:Ie.ParserDefinitionErrorType.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:a.idx,alternative:c+1}]:[]})});return i}S.validateEmptyOrAlternative=eM;function tM(e,t,r){var n=new Co;e.accept(n);var i=n.alternations;i=(0,jq.default)(i,function(o){return o.ignoreAmbiguities===!0});var a=(0,Qe.default)(i,function(o){var s=o.idx,c=o.maxLookahead||t,f=(0,sr.getLookaheadPathsForOr)(s,e,c,o),p=nM(f,o,e,r),d=F_(f,o,e,r);return p.concat(d)});return a}S.validateAmbiguousAlternationAlternatives=tM;var q_=function(e){No(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.allProductions=[],r}return t.prototype.visitRepetitionWithSeparator=function(r){this.allProductions.push(r)},t.prototype.visitRepetitionMandatory=function(r){this.allProductions.push(r)},t.prototype.visitRepetitionMandatoryWithSeparator=function(r){this.allProductions.push(r)},t.prototype.visitRepetition=function(r){this.allProductions.push(r)},t}(bo.GAstVisitor);S.RepetitionCollector=q_;function M_(e,t){var r=new Co;e.accept(r);var n=r.alternations,i=(0,Qe.default)(n,function(a){return a.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:a}),type:Ie.ParserDefinitionErrorType.TOO_MANY_ALTS,ruleName:e.name,occurrence:a.idx}]:[]});return i}S.validateTooManyAlts=M_;function rM(e,t,r){var n=[];return(0,un.default)(e,function(i){var a=new q_;i.accept(a);var o=a.allProductions;(0,un.default)(o,function(s){var c=(0,sr.getProdType)(s),f=s.maxLookahead||t,p=s.idx,d=(0,sr.getLookaheadPathsForOptionalProd)(p,i,c,f),h=d[0];if((0,Si.default)((0,P_.default)(h))){var _=r.buildEmptyRepetitionError({topLevelRule:i,repetition:s});n.push({message:_,type:Ie.ParserDefinitionErrorType.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),n}S.validateSomeNonEmptyLookaheadPath=rM;function nM(e,t,r,n){var i=[],a=(0,So.default)(e,function(s,c,f){return t.definition[f].ignoreAmbiguities===!0||(0,un.default)(c,function(p){var d=[f];(0,un.default)(e,function(h,_){f!==_&&(0,sr.containsPath)(h,p)&&t.definition[_].ignoreAmbiguities!==!0&&d.push(_)}),d.length>1&&!(0,sr.containsPath)(i,p)&&(i.push(p),s.push({alts:d,path:p}))}),s},[]),o=(0,ft.default)(a,function(s){var c=(0,ft.default)(s.alts,function(p){return p+1}),f=n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:c,prefixPath:s.path});return{message:f,type:Ie.ParserDefinitionErrorType.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:s.alts}});return o}function F_(e,t,r,n){var i=(0,So.default)(e,function(o,s,c){var f=(0,ft.default)(s,function(p){return{idx:c,path:p}});return o.concat(f)},[]),a=(0,Xq.default)((0,Qe.default)(i,function(o){var s=t.definition[o.idx];if(s.ignoreAmbiguities===!0)return[];var c=o.idx,f=o.path,p=(0,Uq.default)(i,function(h){return t.definition[h.idx].ignoreAmbiguities!==!0&&h.idx<c&&(0,sr.isStrictPrefixOfPath)(h.path,f)}),d=(0,ft.default)(p,function(h){var _=[h.idx+1,c+1],l=t.idx===0?"":t.idx,v=n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:_,prefixPath:h.path});return{message:v,type:Ie.ParserDefinitionErrorType.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:l,alternatives:_}});return d}));return a}S.checkPrefixAlternativesAmbiguities=F_;function iM(e,t,r){var n=[],i=(0,ft.default)(t,function(a){return a.name});return(0,un.default)(e,function(a){var o=a.name;if((0,Po.default)(i,o)){var s=r.buildNamespaceConflictError(a);n.push({message:s,type:Ie.ParserDefinitionErrorType.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:o})}}),n}});var j_=u(dt=>{"use strict";var w_=dt&&dt.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dt,"__esModule",{value:!0});dt.validateGrammar=dt.resolveGrammar=void 0;var aM=w_(z()),D_=w_(Xa()),oM=i_(),sM=cn(),U_=ar();function uM(e){var t=(0,D_.default)(e,{errMsgProvider:U_.defaultGrammarResolverErrorProvider}),r={};return(0,aM.default)(e.rules,function(n){r[n.name]=n}),(0,oM.resolveGrammar)(r,t.errMsgProvider)}dt.resolveGrammar=uM;function cM(e){return e=(0,D_.default)(e,{errMsgProvider:U_.defaultGrammarValidatorErrorProvider}),(0,sM.validateGrammar)(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}dt.validateGrammar=cM});var ur=u(J=>{"use strict";var ln=J&&J.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),lM=J&&J.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(J,"__esModule",{value:!0});J.EarlyExitException=J.NotAllInputParsedException=J.NoViableAltException=J.MismatchedTokenException=J.isRecognitionException=void 0;var fM=lM(He()),G_="MismatchedTokenException",B_="NoViableAltException",W_="EarlyExitException",K_="NotAllInputParsedException",V_=[G_,B_,W_,K_];Object.freeze(V_);function dM(e){return(0,fM.default)(V_,e.name)}J.isRecognitionException=dM;var Pi=function(e){ln(t,e);function t(r,n){var i=this.constructor,a=e.call(this,r)||this;return a.token=n,a.resyncedTokens=[],Object.setPrototypeOf(a,i.prototype),Error.captureStackTrace&&Error.captureStackTrace(a,a.constructor),a}return t}(Error),pM=function(e){ln(t,e);function t(r,n,i){var a=e.call(this,r,n)||this;return a.previousToken=i,a.name=G_,a}return t}(Pi);J.MismatchedTokenException=pM;var hM=function(e){ln(t,e);function t(r,n,i){var a=e.call(this,r,n)||this;return a.previousToken=i,a.name=B_,a}return t}(Pi);J.NoViableAltException=hM;var vM=function(e){ln(t,e);function t(r,n){var i=e.call(this,r,n)||this;return i.name=K_,i}return t}(Pi);J.NotAllInputParsedException=vM;var _M=function(e){ln(t,e);function t(r,n,i){var a=e.call(this,r,n)||this;return a.previousToken=i,a.name=W_,a}return t}(Pi);J.EarlyExitException=_M});var ko=u(W=>{"use strict";var yM=W&&W.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),pt=W&&W.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(W,"__esModule",{value:!0});W.attemptInRepetitionRecovery=W.Recoverable=W.InRuleRecoveryException=W.IN_RULE_RECOVERY_EXCEPTION=W.EOF_FOLLOW_KEY=void 0;var fn=Ot(),mM=pt(pe()),H_=pt(Ai()),gM=pt(qe()),Lo=pt(Q()),z_=pt(ui()),TM=pt(le()),EM=pt(He()),AM=pt(Ke()),OM=ur(),RM=Ha(),IM=ae();W.EOF_FOLLOW_KEY={};W.IN_RULE_RECOVERY_EXCEPTION="InRuleRecoveryException";var X_=function(e){yM(t,e);function t(r){var n=e.call(this,r)||this;return n.name=W.IN_RULE_RECOVERY_EXCEPTION,n}return t}(Error);W.InRuleRecoveryException=X_;var NM=function(){function e(){}return e.prototype.initRecoverable=function(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(0,TM.default)(t,"recoveryEnabled")?t.recoveryEnabled:IM.DEFAULT_PARSER_CONFIG.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Y_)},e.prototype.getTokenToInsert=function(t){var r=(0,fn.createTokenInstance)(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r},e.prototype.canTokenTypeBeInsertedInRecovery=function(t){return!0},e.prototype.canTokenTypeBeDeletedInRecovery=function(t){return!0},e.prototype.tryInRepetitionRecovery=function(t,r,n,i){for(var a=this,o=this.findReSyncTokenType(),s=this.exportLexerState(),c=[],f=!1,p=this.LA(1),d=this.LA(1),h=function(){var _=a.LA(0),l=a.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:p,previous:_,ruleName:a.getCurrRuleFullName()}),v=new OM.MismatchedTokenException(l,p,a.LA(0));v.resyncedTokens=(0,H_.default)(c),a.SAVE_ERROR(v)};!f;)if(this.tokenMatcher(d,i)){h();return}else if(n.call(this)){h(),t.apply(this,r);return}else this.tokenMatcher(d,o)?f=!0:(d=this.SKIP_TOKEN(),this.addToResyncTokens(d,c));this.importLexerState(s)},e.prototype.shouldInRepetitionRecoveryBeTried=function(t,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,r)))},e.prototype.getFollowsForInRuleRecovery=function(t,r){var n=this.getCurrentGrammarPath(t,r),i=this.getNextPossibleTokenTypes(n);return i},e.prototype.tryInRuleRecovery=function(t,r){if(this.canRecoverWithSingleTokenInsertion(t,r)){var n=this.getTokenToInsert(t);return n}if(this.canRecoverWithSingleTokenDeletion(t)){var i=this.SKIP_TOKEN();return this.consumeToken(),i}throw new X_("sad sad panda")},e.prototype.canPerformInRuleRecovery=function(t,r){return this.canRecoverWithSingleTokenInsertion(t,r)||this.canRecoverWithSingleTokenDeletion(t)},e.prototype.canRecoverWithSingleTokenInsertion=function(t,r){var n=this;if(!this.canTokenTypeBeInsertedInRecovery(t)||(0,mM.default)(r))return!1;var i=this.LA(1),a=(0,z_.default)(r,function(o){return n.tokenMatcher(i,o)})!==void 0;return a},e.prototype.canRecoverWithSingleTokenDeletion=function(t){if(!this.canTokenTypeBeDeletedInRecovery(t))return!1;var r=this.tokenMatcher(this.LA(2),t);return r},e.prototype.isInCurrentRuleReSyncSet=function(t){var r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return(0,EM.default)(n,t)},e.prototype.findReSyncTokenType=function(){for(var t=this.flattenFollowSet(),r=this.LA(1),n=2;;){var i=(0,z_.default)(t,function(a){var o=(0,fn.tokenMatcher)(r,a);return o});if(i!==void 0)return i;r=this.LA(n),n++}},e.prototype.getCurrFollowKey=function(){if(this.RULE_STACK.length===1)return W.EOF_FOLLOW_KEY;var t=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}},e.prototype.buildFullFollowKeyStack=function(){var t=this,r=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return(0,Lo.default)(r,function(i,a){return a===0?W.EOF_FOLLOW_KEY:{ruleName:t.shortRuleNameToFullName(i),idxInCallingRule:n[a],inRule:t.shortRuleNameToFullName(r[a-1])}})},e.prototype.flattenFollowSet=function(){var t=this,r=(0,Lo.default)(this.buildFullFollowKeyStack(),function(n){return t.getFollowSetFromFollowKey(n)});return(0,gM.default)(r)},e.prototype.getFollowSetFromFollowKey=function(t){if(t===W.EOF_FOLLOW_KEY)return[fn.EOF];var r=t.ruleName+t.idxInCallingRule+RM.IN+t.inRule;return this.resyncFollows[r]},e.prototype.addToResyncTokens=function(t,r){return this.tokenMatcher(t,fn.EOF)||r.push(t),r},e.prototype.reSyncTo=function(t){for(var r=[],n=this.LA(1);this.tokenMatcher(n,t)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return(0,H_.default)(r)},e.prototype.attemptInRepetitionRecovery=function(t,r,n,i,a,o,s){},e.prototype.getCurrentGrammarPath=function(t,r){var n=this.getHumanReadableRuleStack(),i=(0,AM.default)(this.RULE_OCCURRENCE_STACK),a={ruleStack:n,occurrenceStack:i,lastTok:t,lastTokOccurrence:r};return a},e.prototype.getHumanReadableRuleStack=function(){var t=this;return(0,Lo.default)(this.RULE_STACK,function(r){return t.shortRuleNameToFullName(r)})},e}();W.Recoverable=NM;function Y_(e,t,r,n,i,a,o){var s=this.getKeyForAutomaticLookahead(n,i),c=this.firstAfterRepMap[s];if(c===void 0){var f=this.getCurrRuleFullName(),p=this.getGAstProductions()[f],d=new a(p,i);c=d.startWalking(),this.firstAfterRepMap[s]=c}var h=c.token,_=c.occurrence,l=c.isEndOfRule;this.RULE_STACK.length===1&&l&&h===void 0&&(h=fn.EOF,_=1),!(h===void 0||_===void 0)&&this.shouldInRepetitionRecoveryBeTried(h,_,o)&&this.tryInRepetitionRecovery(e,t,r,h)}W.attemptInRepetitionRecovery=Y_});var xi=u(b=>{"use strict";Object.defineProperty(b,"__esModule",{value:!0});b.getKeyForAutomaticLookahead=b.AT_LEAST_ONE_SEP_IDX=b.MANY_SEP_IDX=b.AT_LEAST_ONE_IDX=b.MANY_IDX=b.OPTION_IDX=b.OR_IDX=b.BITS_FOR_ALT_IDX=b.BITS_FOR_RULE_IDX=b.BITS_FOR_OCCURRENCE_IDX=b.BITS_FOR_METHOD_TYPE=void 0;b.BITS_FOR_METHOD_TYPE=4;b.BITS_FOR_OCCURRENCE_IDX=8;b.BITS_FOR_RULE_IDX=12;b.BITS_FOR_ALT_IDX=8;b.OR_IDX=1<<b.BITS_FOR_OCCURRENCE_IDX;b.OPTION_IDX=2<<b.BITS_FOR_OCCURRENCE_IDX;b.MANY_IDX=3<<b.BITS_FOR_OCCURRENCE_IDX;b.AT_LEAST_ONE_IDX=4<<b.BITS_FOR_OCCURRENCE_IDX;b.MANY_SEP_IDX=5<<b.BITS_FOR_OCCURRENCE_IDX;b.AT_LEAST_ONE_SEP_IDX=6<<b.BITS_FOR_OCCURRENCE_IDX;function SM(e,t,r){return r|t|e}b.getKeyForAutomaticLookahead=SM;var eB=32-b.BITS_FOR_ALT_IDX});var Mo=u(ht=>{"use strict";var bi=ht&&ht.__spreadArray||function(e,t,r){if(r||arguments.length===2)for(var n=0,i=t.length,a;n<i;n++)(a||!(n in t))&&(a||(a=Array.prototype.slice.call(t,0,n)),a[n]=t[n]);return e.concat(a||Array.prototype.slice.call(t))},$_=ht&&ht.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ht,"__esModule",{value:!0});ht.LLkLookaheadStrategy=void 0;var qo=$_(mo()),PM=$_(pe()),Ci=ar(),xM=ae(),Li=cn(),dn=or(),bM=function(){function e(t){var r;this.maxLookahead=(r=t==null?void 0:t.maxLookahead)!==null&&r!==void 0?r:xM.DEFAULT_PARSER_CONFIG.maxLookahead}return e.prototype.validate=function(t){var r=this.validateNoLeftRecursion(t.rules);if((0,PM.default)(r)){var n=this.validateEmptyOrAlternatives(t.rules),i=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),a=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead),o=bi(bi(bi(bi([],r,!0),n,!0),i,!0),a,!0);return o}return r},e.prototype.validateNoLeftRecursion=function(t){return(0,qo.default)(t,function(r){return(0,Li.validateNoLeftRecursion)(r,r,Ci.defaultGrammarValidatorErrorProvider)})},e.prototype.validateEmptyOrAlternatives=function(t){return(0,qo.default)(t,function(r){return(0,Li.validateEmptyOrAlternative)(r,Ci.defaultGrammarValidatorErrorProvider)})},e.prototype.validateAmbiguousAlternationAlternatives=function(t,r){return(0,qo.default)(t,function(n){return(0,Li.validateAmbiguousAlternationAlternatives)(n,r,Ci.defaultGrammarValidatorErrorProvider)})},e.prototype.validateSomeNonEmptyLookaheadPath=function(t,r){return(0,Li.validateSomeNonEmptyLookaheadPath)(t,r,Ci.defaultGrammarValidatorErrorProvider)},e.prototype.buildLookaheadForAlternation=function(t){return(0,dn.buildLookaheadFuncForOr)(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,dn.buildAlternativesLookAheadFunc)},e.prototype.buildLookaheadForOptional=function(t){return(0,dn.buildLookaheadFuncForOptionalProd)(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,(0,dn.getProdType)(t.prodType),dn.buildSingleAlternativeLookaheadFunction)},e}();ht.LLkLookaheadStrategy=bM});var ey=u(De=>{"use strict";var CM=De&&De.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),J_=De&&De.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(De,"__esModule",{value:!0});De.collectMethods=De.LooksAhead=void 0;var bt=J_(z()),Fo=J_(le()),Z_=ae(),et=xi(),LM=G(),cr=G(),kM=Mo(),qM=function(){function e(){}return e.prototype.initLooksAhead=function(t){this.dynamicTokensEnabled=(0,Fo.default)(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:Z_.DEFAULT_PARSER_CONFIG.dynamicTokensEnabled,this.maxLookahead=(0,Fo.default)(t,"maxLookahead")?t.maxLookahead:Z_.DEFAULT_PARSER_CONFIG.maxLookahead,this.lookaheadStrategy=(0,Fo.default)(t,"lookaheadStrategy")?t.lookaheadStrategy:new kM.LLkLookaheadStrategy({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map},e.prototype.preComputeLookaheadFunctions=function(t){var r=this;(0,bt.default)(t,function(n){r.TRACE_INIT("".concat(n.name," Rule Lookahead"),function(){var i=Q_(n),a=i.alternation,o=i.repetition,s=i.option,c=i.repetitionMandatory,f=i.repetitionMandatoryWithSeparator,p=i.repetitionWithSeparator;(0,bt.default)(a,function(d){var h=d.idx===0?"":d.idx;r.TRACE_INIT("".concat((0,cr.getProductionDslName)(d)).concat(h),function(){var _=r.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:d.idx,rule:n,maxLookahead:d.maxLookahead||r.maxLookahead,hasPredicates:d.hasPredicates,dynamicTokensEnabled:r.dynamicTokensEnabled}),l=(0,et.getKeyForAutomaticLookahead)(r.fullRuleNameToShort[n.name],et.OR_IDX,d.idx);r.setLaFuncCache(l,_)})}),(0,bt.default)(o,function(d){r.computeLookaheadFunc(n,d.idx,et.MANY_IDX,"Repetition",d.maxLookahead,(0,cr.getProductionDslName)(d))}),(0,bt.default)(s,function(d){r.computeLookaheadFunc(n,d.idx,et.OPTION_IDX,"Option",d.maxLookahead,(0,cr.getProductionDslName)(d))}),(0,bt.default)(c,function(d){r.computeLookaheadFunc(n,d.idx,et.AT_LEAST_ONE_IDX,"RepetitionMandatory",d.maxLookahead,(0,cr.getProductionDslName)(d))}),(0,bt.default)(f,function(d){r.computeLookaheadFunc(n,d.idx,et.AT_LEAST_ONE_SEP_IDX,"RepetitionMandatoryWithSeparator",d.maxLookahead,(0,cr.getProductionDslName)(d))}),(0,bt.default)(p,function(d){r.computeLookaheadFunc(n,d.idx,et.MANY_SEP_IDX,"RepetitionWithSeparator",d.maxLookahead,(0,cr.getProductionDslName)(d))})})})},e.prototype.computeLookaheadFunc=function(t,r,n,i,a,o){var s=this;this.TRACE_INIT("".concat(o).concat(r===0?"":r),function(){var c=s.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:t,maxLookahead:a||s.maxLookahead,dynamicTokensEnabled:s.dynamicTokensEnabled,prodType:i}),f=(0,et.getKeyForAutomaticLookahead)(s.fullRuleNameToShort[t.name],n,r);s.setLaFuncCache(f,c)})},e.prototype.getKeyForAutomaticLookahead=function(t,r){var n=this.getLastExplicitRuleShortName();return(0,et.getKeyForAutomaticLookahead)(n,t,r)},e.prototype.getLaFuncFromCache=function(t){return this.lookAheadFuncsCache.get(t)},e.prototype.setLaFuncCache=function(t,r){this.lookAheadFuncsCache.set(t,r)},e}();De.LooksAhead=qM;var MM=function(e){CM(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]},r}return t.prototype.reset=function(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}},t.prototype.visitOption=function(r){this.dslMethods.option.push(r)},t.prototype.visitRepetitionWithSeparator=function(r){this.dslMethods.repetitionWithSeparator.push(r)},t.prototype.visitRepetitionMandatory=function(r){this.dslMethods.repetitionMandatory.push(r)},t.prototype.visitRepetitionMandatoryWithSeparator=function(r){this.dslMethods.repetitionMandatoryWithSeparator.push(r)},t.prototype.visitRepetition=function(r){this.dslMethods.repetition.push(r)},t.prototype.visitAlternation=function(r){this.dslMethods.alternation.push(r)},t}(LM.GAstVisitor),ki=new MM;function Q_(e){ki.reset(),e.accept(ki);var t=ki.dslMethods;return ki.reset(),t}De.collectMethods=Q_});var ty=u(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.addNoneTerminalToCst=Ue.addTerminalToCst=Ue.setNodeLocationFull=Ue.setNodeLocationOnlyOffset=void 0;function FM(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}Ue.setNodeLocationOnlyOffset=FM;function wM(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}Ue.setNodeLocationFull=wM;function DM(e,t,r){e.children[r]===void 0?e.children[r]=[t]:e.children[r].push(t)}Ue.addTerminalToCst=DM;function UM(e,t,r){e.children[t]===void 0?e.children[t]=[r]:e.children[t].push(r)}Ue.addNoneTerminalToCst=UM});var ry=u(qi=>{"use strict";Object.defineProperty(qi,"__esModule",{value:!0});qi.defineNameProp=void 0;var jM="name";function GM(e,t){Object.defineProperty(e,jM,{enumerable:!1,configurable:!0,writable:!1,value:t})}qi.defineNameProp=GM});var cy=u(X=>{"use strict";var tt=X&&X.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(X,"__esModule",{value:!0});X.validateMissingCstMethods=X.validateVisitor=X.CstVisitorDefinitionError=X.createBaseVisitorConstructorWithDefaults=X.createBaseSemanticVisitorConstructor=X.defaultVisit=void 0;var BM=tt(pe()),WM=tt(en()),KM=tt(C()),ny=tt(Q()),VM=tt(z()),HM=tt(ci()),zM=tt(ce()),XM=tt(kt()),YM=tt(gt()),iy=ry();function ay(e,t){for(var r=(0,zM.default)(e),n=r.length,i=0;i<n;i++)for(var a=r[i],o=e[a],s=o.length,c=0;c<s;c++){var f=o[c];f.tokenTypeIdx===void 0&&this[f.name](f.children,t)}}X.defaultVisit=ay;function $M(e,t){var r=function(){};(0,iy.defineNameProp)(r,e+"BaseSemantics");var n={visit:function(i,a){if((0,KM.default)(i)&&(i=i[0]),!(0,YM.default)(i))return this[i.name](i.children,a)},validateVisitor:function(){var i=sy(this,t);if(!(0,BM.default)(i)){var a=(0,ny.default)(i,function(o){return o.msg});throw Error("Errors Detected in CST Visitor <".concat(this.constructor.name,`>:
`)+"".concat(a.join(`
`).replace(/\n/g,`
`)))}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}X.createBaseSemanticVisitorConstructor=$M;function ZM(e,t,r){var n=function(){};(0,iy.defineNameProp)(n,e+"BaseSemanticsWithDefaults");var i=Object.create(r.prototype);return(0,VM.default)(t,function(a){i[a]=ay}),n.prototype=i,n.prototype.constructor=n,n}X.createBaseVisitorConstructorWithDefaults=ZM;var oy;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(oy=X.CstVisitorDefinitionError||(X.CstVisitorDefinitionError={}));function sy(e,t){var r=uy(e,t);return r}X.validateVisitor=sy;function uy(e,t){var r=(0,HM.default)(t,function(i){return(0,XM.default)(e[i])===!1}),n=(0,ny.default)(r,function(i){return{msg:"Missing visitor method: <".concat(i,"> on ").concat(e.constructor.name," CST Visitor."),type:oy.MISSING_METHOD,methodName:i}});return(0,WM.default)(n)}X.validateMissingCstMethods=uy});var py=u(fr=>{"use strict";var Mi=fr&&fr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(fr,"__esModule",{value:!0});fr.TreeBuilder=void 0;var lr=ty(),te=Mi(ei()),JM=Mi(le()),ly=Mi(ce()),fy=Mi(gt()),dy=cy(),QM=ae(),e1=function(){function e(){}return e.prototype.initTreeBuilder=function(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=(0,JM.default)(t,"nodeLocationTracking")?t.nodeLocationTracking:QM.DEFAULT_PARSER_CONFIG.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=te.default,this.cstFinallyStateUpdate=te.default,this.cstPostTerminal=te.default,this.cstPostNonTerminal=te.default,this.cstPostRule=te.default;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=lr.setNodeLocationFull,this.setNodeLocationFromNode=lr.setNodeLocationFull,this.cstPostRule=te.default,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=te.default,this.setNodeLocationFromNode=te.default,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=lr.setNodeLocationOnlyOffset,this.setNodeLocationFromNode=lr.setNodeLocationOnlyOffset,this.cstPostRule=te.default,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=te.default,this.setNodeLocationFromNode=te.default,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=te.default,this.setNodeLocationFromNode=te.default,this.cstPostRule=te.default,this.setInitialNodeLocation=te.default;else throw Error('Invalid <nodeLocationTracking> config option: "'.concat(t.nodeLocationTracking,'"'))},e.prototype.setInitialNodeLocationOnlyOffsetRecovery=function(t){t.location={startOffset:NaN,endOffset:NaN}},e.prototype.setInitialNodeLocationOnlyOffsetRegular=function(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}},e.prototype.setInitialNodeLocationFullRecovery=function(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.setInitialNodeLocationFullRegular=function(t){var r=this.LA(1);t.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}},e.prototype.cstInvocationStateUpdate=function(t){var r={name:t,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)},e.prototype.cstFinallyStateUpdate=function(){this.CST_STACK.pop()},e.prototype.cstPostRuleFull=function(t){var r=this.LA(0),n=t.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)},e.prototype.cstPostRuleOnlyOffset=function(t){var r=this.LA(0),n=t.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN},e.prototype.cstPostTerminal=function(t,r){var n=this.CST_STACK[this.CST_STACK.length-1];(0,lr.addTerminalToCst)(n,r,t),this.setNodeLocationFromToken(n.location,r)},e.prototype.cstPostNonTerminal=function(t,r){var n=this.CST_STACK[this.CST_STACK.length-1];(0,lr.addNoneTerminalToCst)(n,r,t),this.setNodeLocationFromNode(n.location,t.location)},e.prototype.getBaseCstVisitorConstructor=function(){if((0,fy.default)(this.baseCstVisitorConstructor)){var t=(0,dy.createBaseSemanticVisitorConstructor)(this.className,(0,ly.default)(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor},e.prototype.getBaseCstVisitorConstructorWithDefaults=function(){if((0,fy.default)(this.baseCstVisitorWithDefaultsConstructor)){var t=(0,dy.createBaseVisitorConstructorWithDefaults)(this.className,(0,ly.default)(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor},e.prototype.getLastExplicitRuleShortName=function(){var t=this.RULE_STACK;return t[t.length-1]},e.prototype.getPreviousExplicitRuleShortName=function(){var t=this.RULE_STACK;return t[t.length-2]},e.prototype.getLastExplicitRuleOccurrenceIndex=function(){var t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]},e}();fr.TreeBuilder=e1});var vy=u(Fi=>{"use strict";Object.defineProperty(Fi,"__esModule",{value:!0});Fi.LexerAdapter=void 0;var hy=ae(),t1=function(){function e(){}return e.prototype.initLexerAdapter=function(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1},Object.defineProperty(e.prototype,"input",{get:function(){return this.tokVector},set:function(t){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length},enumerable:!1,configurable:!0}),e.prototype.SKIP_TOKEN=function(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):hy.END_OF_FILE},e.prototype.LA=function(t){var r=this.currIdx+t;return r<0||this.tokVectorLength<=r?hy.END_OF_FILE:this.tokVector[r]},e.prototype.consumeToken=function(){this.currIdx++},e.prototype.exportLexerState=function(){return this.currIdx},e.prototype.importLexerState=function(t){this.currIdx=t},e.prototype.resetLexerState=function(){this.currIdx=-1},e.prototype.moveToTerminatedState=function(){this.currIdx=this.tokVector.length-1},e.prototype.getLexerPosition=function(){return this.exportLexerState()},e}();Fi.LexerAdapter=t1});var yy=u(dr=>{"use strict";var _y=dr&&dr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(dr,"__esModule",{value:!0});dr.RecognizerApi=void 0;var r1=_y(Pe()),n1=_y(He()),i1=ur(),wo=ae(),a1=ar(),o1=cn(),s1=G(),u1=function(){function e(){}return e.prototype.ACTION=function(t){return t.call(this)},e.prototype.consume=function(t,r,n){return this.consumeInternal(r,t,n)},e.prototype.subrule=function(t,r,n){return this.subruleInternal(r,t,n)},e.prototype.option=function(t,r){return this.optionInternal(r,t)},e.prototype.or=function(t,r){return this.orInternal(r,t)},e.prototype.many=function(t,r){return this.manyInternal(t,r)},e.prototype.atLeastOne=function(t,r){return this.atLeastOneInternal(t,r)},e.prototype.CONSUME=function(t,r){return this.consumeInternal(t,0,r)},e.prototype.CONSUME1=function(t,r){return this.consumeInternal(t,1,r)},e.prototype.CONSUME2=function(t,r){return this.consumeInternal(t,2,r)},e.prototype.CONSUME3=function(t,r){return this.consumeInternal(t,3,r)},e.prototype.CONSUME4=function(t,r){return this.consumeInternal(t,4,r)},e.prototype.CONSUME5=function(t,r){return this.consumeInternal(t,5,r)},e.prototype.CONSUME6=function(t,r){return this.consumeInternal(t,6,r)},e.prototype.CONSUME7=function(t,r){return this.consumeInternal(t,7,r)},e.prototype.CONSUME8=function(t,r){return this.consumeInternal(t,8,r)},e.prototype.CONSUME9=function(t,r){return this.consumeInternal(t,9,r)},e.prototype.SUBRULE=function(t,r){return this.subruleInternal(t,0,r)},e.prototype.SUBRULE1=function(t,r){return this.subruleInternal(t,1,r)},e.prototype.SUBRULE2=function(t,r){return this.subruleInternal(t,2,r)},e.prototype.SUBRULE3=function(t,r){return this.subruleInternal(t,3,r)},e.prototype.SUBRULE4=function(t,r){return this.subruleInternal(t,4,r)},e.prototype.SUBRULE5=function(t,r){return this.subruleInternal(t,5,r)},e.prototype.SUBRULE6=function(t,r){return this.subruleInternal(t,6,r)},e.prototype.SUBRULE7=function(t,r){return this.subruleInternal(t,7,r)},e.prototype.SUBRULE8=function(t,r){return this.subruleInternal(t,8,r)},e.prototype.SUBRULE9=function(t,r){return this.subruleInternal(t,9,r)},e.prototype.OPTION=function(t){return this.optionInternal(t,0)},e.prototype.OPTION1=function(t){return this.optionInternal(t,1)},e.prototype.OPTION2=function(t){return this.optionInternal(t,2)},e.prototype.OPTION3=function(t){return this.optionInternal(t,3)},e.prototype.OPTION4=function(t){return this.optionInternal(t,4)},e.prototype.OPTION5=function(t){return this.optionInternal(t,5)},e.prototype.OPTION6=function(t){return this.optionInternal(t,6)},e.prototype.OPTION7=function(t){return this.optionInternal(t,7)},e.prototype.OPTION8=function(t){return this.optionInternal(t,8)},e.prototype.OPTION9=function(t){return this.optionInternal(t,9)},e.prototype.OR=function(t){return this.orInternal(t,0)},e.prototype.OR1=function(t){return this.orInternal(t,1)},e.prototype.OR2=function(t){return this.orInternal(t,2)},e.prototype.OR3=function(t){return this.orInternal(t,3)},e.prototype.OR4=function(t){return this.orInternal(t,4)},e.prototype.OR5=function(t){return this.orInternal(t,5)},e.prototype.OR6=function(t){return this.orInternal(t,6)},e.prototype.OR7=function(t){return this.orInternal(t,7)},e.prototype.OR8=function(t){return this.orInternal(t,8)},e.prototype.OR9=function(t){return this.orInternal(t,9)},e.prototype.MANY=function(t){this.manyInternal(0,t)},e.prototype.MANY1=function(t){this.manyInternal(1,t)},e.prototype.MANY2=function(t){this.manyInternal(2,t)},e.prototype.MANY3=function(t){this.manyInternal(3,t)},e.prototype.MANY4=function(t){this.manyInternal(4,t)},e.prototype.MANY5=function(t){this.manyInternal(5,t)},e.prototype.MANY6=function(t){this.manyInternal(6,t)},e.prototype.MANY7=function(t){this.manyInternal(7,t)},e.prototype.MANY8=function(t){this.manyInternal(8,t)},e.prototype.MANY9=function(t){this.manyInternal(9,t)},e.prototype.MANY_SEP=function(t){this.manySepFirstInternal(0,t)},e.prototype.MANY_SEP1=function(t){this.manySepFirstInternal(1,t)},e.prototype.MANY_SEP2=function(t){this.manySepFirstInternal(2,t)},e.prototype.MANY_SEP3=function(t){this.manySepFirstInternal(3,t)},e.prototype.MANY_SEP4=function(t){this.manySepFirstInternal(4,t)},e.prototype.MANY_SEP5=function(t){this.manySepFirstInternal(5,t)},e.prototype.MANY_SEP6=function(t){this.manySepFirstInternal(6,t)},e.prototype.MANY_SEP7=function(t){this.manySepFirstInternal(7,t)},e.prototype.MANY_SEP8=function(t){this.manySepFirstInternal(8,t)},e.prototype.MANY_SEP9=function(t){this.manySepFirstInternal(9,t)},e.prototype.AT_LEAST_ONE=function(t){this.atLeastOneInternal(0,t)},e.prototype.AT_LEAST_ONE1=function(t){return this.atLeastOneInternal(1,t)},e.prototype.AT_LEAST_ONE2=function(t){this.atLeastOneInternal(2,t)},e.prototype.AT_LEAST_ONE3=function(t){this.atLeastOneInternal(3,t)},e.prototype.AT_LEAST_ONE4=function(t){this.atLeastOneInternal(4,t)},e.prototype.AT_LEAST_ONE5=function(t){this.atLeastOneInternal(5,t)},e.prototype.AT_LEAST_ONE6=function(t){this.atLeastOneInternal(6,t)},e.prototype.AT_LEAST_ONE7=function(t){this.atLeastOneInternal(7,t)},e.prototype.AT_LEAST_ONE8=function(t){this.atLeastOneInternal(8,t)},e.prototype.AT_LEAST_ONE9=function(t){this.atLeastOneInternal(9,t)},e.prototype.AT_LEAST_ONE_SEP=function(t){this.atLeastOneSepFirstInternal(0,t)},e.prototype.AT_LEAST_ONE_SEP1=function(t){this.atLeastOneSepFirstInternal(1,t)},e.prototype.AT_LEAST_ONE_SEP2=function(t){this.atLeastOneSepFirstInternal(2,t)},e.prototype.AT_LEAST_ONE_SEP3=function(t){this.atLeastOneSepFirstInternal(3,t)},e.prototype.AT_LEAST_ONE_SEP4=function(t){this.atLeastOneSepFirstInternal(4,t)},e.prototype.AT_LEAST_ONE_SEP5=function(t){this.atLeastOneSepFirstInternal(5,t)},e.prototype.AT_LEAST_ONE_SEP6=function(t){this.atLeastOneSepFirstInternal(6,t)},e.prototype.AT_LEAST_ONE_SEP7=function(t){this.atLeastOneSepFirstInternal(7,t)},e.prototype.AT_LEAST_ONE_SEP8=function(t){this.atLeastOneSepFirstInternal(8,t)},e.prototype.AT_LEAST_ONE_SEP9=function(t){this.atLeastOneSepFirstInternal(9,t)},e.prototype.RULE=function(t,r,n){if(n===void 0&&(n=wo.DEFAULT_RULE_CONFIG),(0,n1.default)(this.definedRulesNames,t)){var i=a1.defaultGrammarValidatorErrorProvider.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),a={message:i,type:wo.ParserDefinitionErrorType.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(a)}this.definedRulesNames.push(t);var o=this.defineRule(t,r,n);return this[t]=o,o},e.prototype.OVERRIDE_RULE=function(t,r,n){n===void 0&&(n=wo.DEFAULT_RULE_CONFIG);var i=(0,o1.validateRuleIsOverridden)(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);var a=this.defineRule(t,r,n);return this[t]=a,a},e.prototype.BACKTRACK=function(t,r){return function(){this.isBackTrackingStack.push(1);var n=this.saveRecogState();try{return t.apply(this,r),!0}catch(i){if((0,i1.isRecognitionException)(i))return!1;throw i}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}},e.prototype.getGAstProductions=function(){return this.gastProductionsCache},e.prototype.getSerializedGastProductions=function(){return(0,s1.serializeGrammar)((0,r1.default)(this.gastProductionsCache))},e}();dr.RecognizerApi=u1});var Iy=u(hr=>{"use strict";var je=hr&&hr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(hr,"__esModule",{value:!0});hr.RecognizerEngine=void 0;var my=je(pe()),Do=je(C()),Uo=je(qe()),gy=je(Qr()),c1=je(ti()),l1=je(ge()),pn=je(le()),hn=je(Pe()),Ty=je(st()),Ey=je(Ke()),de=xi(),wi=ur(),Ay=or(),pr=on(),Oy=ae(),f1=ko(),Ry=Ot(),vn=At(),d1=function(){function e(){}return e.prototype.initRecognizerEngine=function(t,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=vn.tokenStructuredMatcherNoCategories,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},(0,pn.default)(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
For Further details.`);if((0,Do.default)(t)){if((0,my.default)(t))throw Error(`A Token Vocabulary cannot be empty.
Note that the first argument for the parser constructor
is no longer a Token vector (since v4.0).`);if(typeof t[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
For Further details.`)}if((0,Do.default)(t))this.tokensMap=(0,Ty.default)(t,function(s,c){return s[c.name]=c,s},{});else if((0,pn.default)(t,"modes")&&(0,gy.default)((0,Uo.default)((0,hn.default)(t.modes)),vn.isTokenType)){var n=(0,Uo.default)((0,hn.default)(t.modes)),i=(0,c1.default)(n);this.tokensMap=(0,Ty.default)(i,function(s,c){return s[c.name]=c,s},{})}else if((0,l1.default)(t))this.tokensMap=(0,Ey.default)(t);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Ry.EOF;var a=(0,pn.default)(t,"modes")?(0,Uo.default)((0,hn.default)(t.modes)):(0,hn.default)(t),o=(0,gy.default)(a,function(s){return(0,my.default)(s.categoryMatches)});this.tokenMatcher=o?vn.tokenStructuredMatcherNoCategories:vn.tokenStructuredMatcher,(0,vn.augmentTokenTypes)((0,hn.default)(this.tokensMap))},e.prototype.defineRule=function(t,r,n){if(this.selfAnalysisDone)throw Error("Grammar rule <".concat(t,`> may not be defined after the 'performSelfAnalysis' method has been called'
`)+"Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.");var i=(0,pn.default)(n,"resyncEnabled")?n.resyncEnabled:Oy.DEFAULT_RULE_CONFIG.resyncEnabled,a=(0,pn.default)(n,"recoveryValueFunc")?n.recoveryValueFunc:Oy.DEFAULT_RULE_CONFIG.recoveryValueFunc,o=this.ruleShortNameIdx<<de.BITS_FOR_METHOD_TYPE+de.BITS_FOR_OCCURRENCE_IDX;this.ruleShortNameIdx++,this.shortRuleNameToFull[o]=t,this.fullRuleNameToShort[t]=o;var s;this.outputCst===!0?s=function(){for(var p=[],d=0;d<arguments.length;d++)p[d]=arguments[d];try{this.ruleInvocationStateUpdate(o,t,this.subruleIdx),r.apply(this,p);var h=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(h),h}catch(_){return this.invokeRuleCatch(_,i,a)}finally{this.ruleFinallyStateUpdate()}}:s=function(){for(var p=[],d=0;d<arguments.length;d++)p[d]=arguments[d];try{return this.ruleInvocationStateUpdate(o,t,this.subruleIdx),r.apply(this,p)}catch(h){return this.invokeRuleCatch(h,i,a)}finally{this.ruleFinallyStateUpdate()}};var c=Object.assign(s,{ruleName:t,originalGrammarAction:r});return c},e.prototype.invokeRuleCatch=function(t,r,n){var i=this.RULE_STACK.length===1,a=r&&!this.isBackTracking()&&this.recoveryEnabled;if((0,wi.isRecognitionException)(t)){var o=t;if(a){var s=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(s))if(o.resyncedTokens=this.reSyncTo(s),this.outputCst){var c=this.CST_STACK[this.CST_STACK.length-1];return c.recoveredNode=!0,c}else return n(t);else{if(this.outputCst){var c=this.CST_STACK[this.CST_STACK.length-1];c.recoveredNode=!0,o.partialCstResult=c}throw o}}else{if(i)return this.moveToTerminatedState(),n(t);throw o}}else throw t},e.prototype.optionInternal=function(t,r){var n=this.getKeyForAutomaticLookahead(de.OPTION_IDX,r);return this.optionInternalLogic(t,r,n)},e.prototype.optionInternalLogic=function(t,r,n){var i=this,a=this.getLaFuncFromCache(n),o;if(typeof t!="function"){o=t.DEF;var s=t.GATE;if(s!==void 0){var c=a;a=function(){return s.call(i)&&c.call(i)}}}else o=t;if(a.call(this)===!0)return o.call(this)},e.prototype.atLeastOneInternal=function(t,r){var n=this.getKeyForAutomaticLookahead(de.AT_LEAST_ONE_IDX,t);return this.atLeastOneInternalLogic(t,r,n)},e.prototype.atLeastOneInternalLogic=function(t,r,n){var i=this,a=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;var s=r.GATE;if(s!==void 0){var c=a;a=function(){return s.call(i)&&c.call(i)}}}else o=r;if(a.call(this)===!0)for(var f=this.doSingleRepetition(o);a.call(this)===!0&&f===!0;)f=this.doSingleRepetition(o);else throw this.raiseEarlyExitException(t,Ay.PROD_TYPE.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],a,de.AT_LEAST_ONE_IDX,t,pr.NextTerminalAfterAtLeastOneWalker)},e.prototype.atLeastOneSepFirstInternal=function(t,r){var n=this.getKeyForAutomaticLookahead(de.AT_LEAST_ONE_SEP_IDX,t);this.atLeastOneSepFirstInternalLogic(t,r,n)},e.prototype.atLeastOneSepFirstInternalLogic=function(t,r,n){var i=this,a=r.DEF,o=r.SEP,s=this.getLaFuncFromCache(n);if(s.call(this)===!0){a.call(this);for(var c=function(){return i.tokenMatcher(i.LA(1),o)};this.tokenMatcher(this.LA(1),o)===!0;)this.CONSUME(o),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,c,a,pr.NextTerminalAfterAtLeastOneSepWalker],c,de.AT_LEAST_ONE_SEP_IDX,t,pr.NextTerminalAfterAtLeastOneSepWalker)}else throw this.raiseEarlyExitException(t,Ay.PROD_TYPE.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)},e.prototype.manyInternal=function(t,r){var n=this.getKeyForAutomaticLookahead(de.MANY_IDX,t);return this.manyInternalLogic(t,r,n)},e.prototype.manyInternalLogic=function(t,r,n){var i=this,a=this.getLaFuncFromCache(n),o;if(typeof r!="function"){o=r.DEF;var s=r.GATE;if(s!==void 0){var c=a;a=function(){return s.call(i)&&c.call(i)}}}else o=r;for(var f=!0;a.call(this)===!0&&f===!0;)f=this.doSingleRepetition(o);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],a,de.MANY_IDX,t,pr.NextTerminalAfterManyWalker,f)},e.prototype.manySepFirstInternal=function(t,r){var n=this.getKeyForAutomaticLookahead(de.MANY_SEP_IDX,t);this.manySepFirstInternalLogic(t,r,n)},e.prototype.manySepFirstInternalLogic=function(t,r,n){var i=this,a=r.DEF,o=r.SEP,s=this.getLaFuncFromCache(n);if(s.call(this)===!0){a.call(this);for(var c=function(){return i.tokenMatcher(i.LA(1),o)};this.tokenMatcher(this.LA(1),o)===!0;)this.CONSUME(o),a.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,o,c,a,pr.NextTerminalAfterManySepWalker],c,de.MANY_SEP_IDX,t,pr.NextTerminalAfterManySepWalker)}},e.prototype.repetitionSepSecondInternal=function(t,r,n,i,a){for(;n();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,r,n,i,a],n,de.AT_LEAST_ONE_SEP_IDX,t,a)},e.prototype.doSingleRepetition=function(t){var r=this.getLexerPosition();t.call(this);var n=this.getLexerPosition();return n>r},e.prototype.orInternal=function(t,r){var n=this.getKeyForAutomaticLookahead(de.OR_IDX,r),i=(0,Do.default)(t)?t:t.DEF,a=this.getLaFuncFromCache(n),o=a.call(this,i);if(o!==void 0){var s=i[o];return s.ALT.call(this)}this.raiseNoAltException(r,t.ERR_MSG)},e.prototype.ruleFinallyStateUpdate=function(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){var t=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new wi.NotAllInputParsedException(r,t))}},e.prototype.subruleInternal=function(t,r,n){var i;try{var a=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,i=t.apply(this,a),this.cstPostNonTerminal(i,n!==void 0&&n.LABEL!==void 0?n.LABEL:t.ruleName),i}catch(o){throw this.subruleInternalError(o,n,t.ruleName)}},e.prototype.subruleInternalError=function(t,r,n){throw(0,wi.isRecognitionException)(t)&&t.partialCstResult!==void 0&&(this.cstPostNonTerminal(t.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete t.partialCstResult),t},e.prototype.consumeInternal=function(t,r,n){var i;try{var a=this.LA(1);this.tokenMatcher(a,t)===!0?(this.consumeToken(),i=a):this.consumeInternalError(t,a,n)}catch(o){i=this.consumeInternalRecovery(t,r,o)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:t.name,i),i},e.prototype.consumeInternalError=function(t,r,n){var i,a=this.LA(0);throw n!==void 0&&n.ERR_MSG?i=n.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:r,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new wi.MismatchedTokenException(i,r,a))},e.prototype.consumeInternalRecovery=function(t,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){var i=this.getFollowsForInRuleRecovery(t,r);try{return this.tryInRuleRecovery(t,i)}catch(a){throw a.name===f1.IN_RULE_RECOVERY_EXCEPTION?n:a}}else throw n},e.prototype.saveRecogState=function(){var t=this.errors,r=(0,Ey.default)(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}},e.prototype.reloadRecogState=function(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK},e.prototype.ruleInvocationStateUpdate=function(t,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(r)},e.prototype.isBackTracking=function(){return this.isBackTrackingStack.length!==0},e.prototype.getCurrRuleFullName=function(){var t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]},e.prototype.shortRuleNameToFullName=function(t){return this.shortRuleNameToFull[t]},e.prototype.isAtEndOfInput=function(){return this.tokenMatcher(this.LA(1),Ry.EOF)},e.prototype.reset=function(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]},e}();hr.RecognizerEngine=d1});var xy=u(vr=>{"use strict";var Py=vr&&vr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(vr,"__esModule",{value:!0});vr.ErrorHandler=void 0;var jo=ur(),p1=Py(le()),Ny=Py(Ke()),Sy=or(),h1=ae(),v1=function(){function e(){}return e.prototype.initErrorHandler=function(t){this._errors=[],this.errorMessageProvider=(0,p1.default)(t,"errorMessageProvider")?t.errorMessageProvider:h1.DEFAULT_PARSER_CONFIG.errorMessageProvider},e.prototype.SAVE_ERROR=function(t){if((0,jo.isRecognitionException)(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:(0,Ny.default)(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")},Object.defineProperty(e.prototype,"errors",{get:function(){return(0,Ny.default)(this._errors)},set:function(t){this._errors=t},enumerable:!1,configurable:!0}),e.prototype.raiseEarlyExitException=function(t,r,n){for(var i=this.getCurrRuleFullName(),a=this.getGAstProductions()[i],o=(0,Sy.getLookaheadPathsForOptionalProd)(t,a,r,this.maxLookahead),s=o[0],c=[],f=1;f<=this.maxLookahead;f++)c.push(this.LA(f));var p=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:s,actual:c,previous:this.LA(0),customUserDescription:n,ruleName:i});throw this.SAVE_ERROR(new jo.EarlyExitException(p,this.LA(1),this.LA(0)))},e.prototype.raiseNoAltException=function(t,r){for(var n=this.getCurrRuleFullName(),i=this.getGAstProductions()[n],a=(0,Sy.getLookaheadPathsForOr)(t,i,this.maxLookahead),o=[],s=1;s<=this.maxLookahead;s++)o.push(this.LA(s));var c=this.LA(0),f=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:o,previous:c,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new jo.NoViableAltException(f,this.LA(1),c))},e}();vr.ErrorHandler=v1});var Ly=u(_r=>{"use strict";var Cy=_r&&_r.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_r,"__esModule",{value:!0});_r.ContentAssist=void 0;var by=on(),_1=Cy(er()),y1=Cy(gt()),m1=function(){function e(){}return e.prototype.initContentAssist=function(){},e.prototype.computeContentAssist=function(t,r){var n=this.gastProductionsCache[t];if((0,y1.default)(n))throw Error("Rule ->".concat(t,"<- does not exist in this grammar."));return(0,by.nextPossibleTokensAfter)([n],r,this.tokenMatcher,this.maxLookahead)},e.prototype.getNextPossibleTokenTypes=function(t){var r=(0,_1.default)(t.ruleStack),n=this.getGAstProductions(),i=n[r],a=new by.NextAfterTokenWalker(i,t).startWalking();return a},e}();_r.ContentAssist=m1});var Gy=u(yr=>{"use strict";var mr=yr&&yr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(yr,"__esModule",{value:!0});yr.GastRecorder=void 0;var Di=mr(gi()),g1=mr(C()),T1=mr(Yn()),E1=mr(z()),Fy=mr(kt()),yn=mr(le()),Ge=G(),A1=tn(),wy=At(),Dy=Ot(),O1=ae(),R1=xi(),ji={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(ji);var ky=!0,qy=Math.pow(2,R1.BITS_FOR_OCCURRENCE_IDX)-1,Uy=(0,Dy.createToken)({name:"RECORDING_PHASE_TOKEN",pattern:A1.Lexer.NA});(0,wy.augmentTokenTypes)([Uy]);var jy=(0,Dy.createTokenInstance)(Uy,`This IToken indicates the Parser is in Recording Phase
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(jy);var I1={name:`This CSTNode indicates the Parser is in Recording Phase
See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},N1=function(){function e(){}return e.prototype.initGastRecorder=function(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1},e.prototype.enableRecording=function(){var t=this;this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",function(){for(var r=function(i){var a=i>0?i:"";t["CONSUME".concat(a)]=function(o,s){return this.consumeInternalRecord(o,i,s)},t["SUBRULE".concat(a)]=function(o,s){return this.subruleInternalRecord(o,i,s)},t["OPTION".concat(a)]=function(o){return this.optionInternalRecord(o,i)},t["OR".concat(a)]=function(o){return this.orInternalRecord(o,i)},t["MANY".concat(a)]=function(o){this.manyInternalRecord(i,o)},t["MANY_SEP".concat(a)]=function(o){this.manySepFirstInternalRecord(i,o)},t["AT_LEAST_ONE".concat(a)]=function(o){this.atLeastOneInternalRecord(i,o)},t["AT_LEAST_ONE_SEP".concat(a)]=function(o){this.atLeastOneSepFirstInternalRecord(i,o)}},n=0;n<10;n++)r(n);t.consume=function(i,a,o){return this.consumeInternalRecord(a,i,o)},t.subrule=function(i,a,o){return this.subruleInternalRecord(a,i,o)},t.option=function(i,a){return this.optionInternalRecord(a,i)},t.or=function(i,a){return this.orInternalRecord(a,i)},t.many=function(i,a){this.manyInternalRecord(i,a)},t.atLeastOne=function(i,a){this.atLeastOneInternalRecord(i,a)},t.ACTION=t.ACTION_RECORD,t.BACKTRACK=t.BACKTRACK_RECORD,t.LA=t.LA_RECORD})},e.prototype.disableRecording=function(){var t=this;this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",function(){for(var r=t,n=0;n<10;n++){var i=n>0?n:"";delete r["CONSUME".concat(i)],delete r["SUBRULE".concat(i)],delete r["OPTION".concat(i)],delete r["OR".concat(i)],delete r["MANY".concat(i)],delete r["MANY_SEP".concat(i)],delete r["AT_LEAST_ONE".concat(i)],delete r["AT_LEAST_ONE_SEP".concat(i)]}delete r.consume,delete r.subrule,delete r.option,delete r.or,delete r.many,delete r.atLeastOne,delete r.ACTION,delete r.BACKTRACK,delete r.LA})},e.prototype.ACTION_RECORD=function(t){},e.prototype.BACKTRACK_RECORD=function(t,r){return function(){return!0}},e.prototype.LA_RECORD=function(t){return O1.END_OF_FILE},e.prototype.topLevelRuleRecord=function(t,r){try{var n=new Ge.Rule({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(i){if(i.KNOWN_RECORDER_ERROR!==!0)try{i.message=i.message+`
This error was thrown during the "grammar recording phase" For more info see:
https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch(a){throw i}throw i}},e.prototype.optionInternalRecord=function(t,r){return _n.call(this,Ge.Option,t,r)},e.prototype.atLeastOneInternalRecord=function(t,r){_n.call(this,Ge.RepetitionMandatory,r,t)},e.prototype.atLeastOneSepFirstInternalRecord=function(t,r){_n.call(this,Ge.RepetitionMandatoryWithSeparator,r,t,ky)},e.prototype.manyInternalRecord=function(t,r){_n.call(this,Ge.Repetition,r,t)},e.prototype.manySepFirstInternalRecord=function(t,r){_n.call(this,Ge.RepetitionWithSeparator,r,t,ky)},e.prototype.orInternalRecord=function(t,r){return S1.call(this,t,r)},e.prototype.subruleInternalRecord=function(t,r,n){if(Ui(r),!t||(0,yn.default)(t,"ruleName")===!1){var i=new Error("<SUBRULE".concat(My(r),"> argument is invalid")+" expecting a Parser method reference but got: <".concat(JSON.stringify(t),">")+`
inside top level rule: <`.concat(this.recordingProdStack[0].name,">"));throw i.KNOWN_RECORDER_ERROR=!0,i}var a=(0,Di.default)(this.recordingProdStack),o=t.ruleName,s=new Ge.NonTerminal({idx:r,nonTerminalName:o,label:n==null?void 0:n.LABEL,referencedRule:void 0});return a.definition.push(s),this.outputCst?I1:ji},e.prototype.consumeInternalRecord=function(t,r,n){if(Ui(r),!(0,wy.hasShortKeyProperty)(t)){var i=new Error("<CONSUME".concat(My(r),"> argument is invalid")+" expecting a TokenType reference but got: <".concat(JSON.stringify(t),">")+`
inside top level rule: <`.concat(this.recordingProdStack[0].name,">"));throw i.KNOWN_RECORDER_ERROR=!0,i}var a=(0,Di.default)(this.recordingProdStack),o=new Ge.Terminal({idx:r,terminalType:t,label:n==null?void 0:n.LABEL});return a.definition.push(o),jy},e}();yr.GastRecorder=N1;function _n(e,t,r,n){n===void 0&&(n=!1),Ui(r);var i=(0,Di.default)(this.recordingProdStack),a=(0,Fy.default)(t)?t:t.DEF,o=new e({definition:[],idx:r});return n&&(o.separator=t.SEP),(0,yn.default)(t,"MAX_LOOKAHEAD")&&(o.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(o),a.call(this),i.definition.push(o),this.recordingProdStack.pop(),ji}function S1(e,t){var r=this;Ui(t);var n=(0,Di.default)(this.recordingProdStack),i=(0,g1.default)(e)===!1,a=i===!1?e:e.DEF,o=new Ge.Alternation({definition:[],idx:t,ignoreAmbiguities:i&&e.IGNORE_AMBIGUITIES===!0});(0,yn.default)(e,"MAX_LOOKAHEAD")&&(o.maxLookahead=e.MAX_LOOKAHEAD);var s=(0,T1.default)(a,function(c){return(0,Fy.default)(c.GATE)});return o.hasPredicates=s,n.definition.push(o),(0,E1.default)(a,function(c){var f=new Ge.Alternative({definition:[]});o.definition.push(f),(0,yn.default)(c,"IGNORE_AMBIGUITIES")?f.ignoreAmbiguities=c.IGNORE_AMBIGUITIES:(0,yn.default)(c,"GATE")&&(f.ignoreAmbiguities=!0),r.recordingProdStack.push(f),c.ALT.call(r),r.recordingProdStack.pop()}),ji}function My(e){return e===0?"":"".concat(e)}function Ui(e){if(e<0||e>qy){var t=new Error("Invalid DSL Method idx value: <".concat(e,`>
`)+"Idx value must be a none negative value smaller than ".concat(qy+1));throw t.KNOWN_RECORDER_ERROR=!0,t}}});var By=u(gr=>{"use strict";var P1=gr&&gr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(gr,"__esModule",{value:!0});gr.PerformanceTracer=void 0;var x1=P1(le()),b1=$t(),C1=ae(),L1=function(){function e(){}return e.prototype.initPerformanceTracer=function(t){if((0,x1.default)(t,"traceInitPerf")){var r=t.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=C1.DEFAULT_PARSER_CONFIG.traceInitPerf;this.traceInitIndent=-1},e.prototype.TRACE_INIT=function(t,r){if(this.traceInitPerf===!0){this.traceInitIndent++;var n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log("".concat(n,"--> <").concat(t,">"));var i=(0,b1.timer)(r),a=i.time,o=i.value,s=a>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s("".concat(n,"<-- <").concat(t,"> time: ").concat(a,"ms")),this.traceInitIndent--,o}else return r()},e}();gr.PerformanceTracer=L1});var Wy=u(Gi=>{"use strict";Object.defineProperty(Gi,"__esModule",{value:!0});Gi.applyMixins=void 0;function k1(e,t){t.forEach(function(r){var n=r.prototype;Object.getOwnPropertyNames(n).forEach(function(i){if(i!=="constructor"){var a=Object.getOwnPropertyDescriptor(n,i);a&&(a.get||a.set)?Object.defineProperty(e.prototype,i,a):e.prototype[i]=r.prototype[i]}})})}Gi.applyMixins=k1});var ae=u(q=>{"use strict";var zy=q&&q.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Tr=q&&q.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(q,"__esModule",{value:!0});q.EmbeddedActionsParser=q.CstParser=q.Parser=q.EMPTY_ALT=q.ParserDefinitionErrorType=q.DEFAULT_RULE_CONFIG=q.DEFAULT_PARSER_CONFIG=q.END_OF_FILE=void 0;var Go=Tr(pe()),q1=Tr(Q()),M1=Tr(z()),vt=Tr(Pe()),Ky=Tr(le()),Xy=Tr(Ke()),F1=$t(),w1=Nh(),Vy=Ot(),Yy=ar(),Hy=j_(),D1=ko(),U1=ey(),j1=py(),G1=vy(),B1=yy(),W1=Iy(),K1=xy(),V1=Ly(),H1=Gy(),z1=By(),X1=Wy(),Y1=cn();q.END_OF_FILE=(0,Vy.createTokenInstance)(Vy.EOF,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(q.END_OF_FILE);q.DEFAULT_PARSER_CONFIG=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Yy.defaultParserErrorProvider,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1});q.DEFAULT_RULE_CONFIG=Object.freeze({recoveryValueFunc:function(){},resyncEnabled:!0});var $1;(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})($1=q.ParserDefinitionErrorType||(q.ParserDefinitionErrorType={}));function Z1(e){return e===void 0&&(e=void 0),function(){return e}}q.EMPTY_ALT=Z1;var Bi=function(){function e(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;var n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(t,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),(0,Ky.default)(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
For further details.`);this.skipValidations=(0,Ky.default)(r,"skipValidations")?r.skipValidations:q.DEFAULT_PARSER_CONFIG.skipValidations}return e.performSelfAnalysis=function(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")},e.prototype.performSelfAnalysis=function(){var t=this;this.TRACE_INIT("performSelfAnalysis",function(){var r;t.selfAnalysisDone=!0;var n=t.className;t.TRACE_INIT("toFastProps",function(){(0,F1.toFastProperties)(t)}),t.TRACE_INIT("Grammar Recording",function(){try{t.enableRecording(),(0,M1.default)(t.definedRulesNames,function(a){var o=t[a],s=o.originalGrammarAction,c;t.TRACE_INIT("".concat(a," Rule"),function(){c=t.topLevelRuleRecord(a,s)}),t.gastProductionsCache[a]=c})}finally{t.disableRecording()}});var i=[];if(t.TRACE_INIT("Grammar Resolving",function(){i=(0,Hy.resolveGrammar)({rules:(0,vt.default)(t.gastProductionsCache)}),t.definitionErrors=t.definitionErrors.concat(i)}),t.TRACE_INIT("Grammar Validations",function(){if((0,Go.default)(i)&&t.skipValidations===!1){var a=(0,Hy.validateGrammar)({rules:(0,vt.default)(t.gastProductionsCache),tokenTypes:(0,vt.default)(t.tokensMap),errMsgProvider:Yy.defaultGrammarValidatorErrorProvider,grammarName:n}),o=(0,Y1.validateLookahead)({lookaheadStrategy:t.lookaheadStrategy,rules:(0,vt.default)(t.gastProductionsCache),tokenTypes:(0,vt.default)(t.tokensMap),grammarName:n});t.definitionErrors=t.definitionErrors.concat(a,o)}}),(0,Go.default)(t.definitionErrors)&&(t.recoveryEnabled&&t.TRACE_INIT("computeAllProdsFollows",function(){var a=(0,w1.computeAllProdsFollows)((0,vt.default)(t.gastProductionsCache));t.resyncFollows=a}),t.TRACE_INIT("ComputeLookaheadFunctions",function(){var a,o;(o=(a=t.lookaheadStrategy).initialize)===null||o===void 0||o.call(a,{rules:(0,vt.default)(t.gastProductionsCache)}),t.preComputeLookaheadFunctions((0,vt.default)(t.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!(0,Go.default)(t.definitionErrors))throw r=(0,q1.default)(t.definitionErrors,function(a){return a.message}),new Error(`Parser Definition Errors detected:
`.concat(r.join(`
-------------------------------
`)))})},e.DEFER_DEFINITION_ERRORS_HANDLING=!1,e}();q.Parser=Bi;(0,X1.applyMixins)(Bi,[D1.Recoverable,U1.LooksAhead,j1.TreeBuilder,G1.LexerAdapter,W1.RecognizerEngine,B1.RecognizerApi,K1.ErrorHandler,V1.ContentAssist,H1.GastRecorder,z1.PerformanceTracer]);var J1=function(e){zy(t,e);function t(r,n){n===void 0&&(n=q.DEFAULT_PARSER_CONFIG);var i=(0,Xy.default)(n);return i.outputCst=!0,e.call(this,r,i)||this}return t}(Bi);q.CstParser=J1;var Q1=function(e){zy(t,e);function t(r,n){n===void 0&&(n=q.DEFAULT_PARSER_CONFIG);var i=(0,Xy.default)(n);return i.outputCst=!1,e.call(this,r,i)||this}return t}(Bi);q.EmbeddedActionsParser=Q1});var Zy=u(_t=>{"use strict";var eF=_t&&_t.__extends||function(){var e=function(t,r){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,i){n.__proto__=i}||function(n,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])},e(t,r)};return function(t,r){if(typeof r!="function"&&r!==null)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");e(t,r);function n(){this.constructor=t}t.prototype=r===null?Object.create(r):(n.prototype=r.prototype,new n)}}(),Er=_t&&_t.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(_t,"__esModule",{value:!0});_t.buildModel=void 0;var $y=G(),mn=Er(Q()),tF=Er(qe()),rF=Er(Pe()),nF=Er(Yn()),iF=Er(yo()),aF=Er(Zr());function oF(e){var t=new sF,r=(0,rF.default)(e);return(0,mn.default)(r,function(n){return t.visitRule(n)})}_t.buildModel=oF;var sF=function(e){eF(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t.prototype.visitRule=function(r){var n=this.visitEach(r.definition),i=(0,iF.default)(n,function(o){return o.propertyName}),a=(0,mn.default)(i,function(o,s){var c=!(0,nF.default)(o,function(p){return!p.canBeNull}),f=o[0].type;return o.length>1&&(f=(0,mn.default)(o,function(p){return p.type})),{name:s,type:f,optional:c}});return{name:r.name,properties:a}},t.prototype.visitAlternative=function(r){return this.visitEachAndOverrideWith(r.definition,{canBeNull:!0})},t.prototype.visitOption=function(r){return this.visitEachAndOverrideWith(r.definition,{canBeNull:!0})},t.prototype.visitRepetition=function(r){return this.visitEachAndOverrideWith(r.definition,{canBeNull:!0})},t.prototype.visitRepetitionMandatory=function(r){return this.visitEach(r.definition)},t.prototype.visitRepetitionMandatoryWithSeparator=function(r){return this.visitEach(r.definition).concat({propertyName:r.separator.name,canBeNull:!0,type:Wi(r.separator)})},t.prototype.visitRepetitionWithSeparator=function(r){return this.visitEachAndOverrideWith(r.definition,{canBeNull:!0}).concat({propertyName:r.separator.name,canBeNull:!0,type:Wi(r.separator)})},t.prototype.visitAlternation=function(r){return this.visitEachAndOverrideWith(r.definition,{canBeNull:!0})},t.prototype.visitTerminal=function(r){return[{propertyName:r.label||r.terminalType.name,canBeNull:!1,type:Wi(r)}]},t.prototype.visitNonTerminal=function(r){return[{propertyName:r.label||r.nonTerminalName,canBeNull:!1,type:Wi(r)}]},t.prototype.visitEachAndOverrideWith=function(r,n){return(0,mn.default)(this.visitEach(r),function(i){return(0,aF.default)({},i,n)})},t.prototype.visitEach=function(r){var n=this;return(0,tF.default)((0,mn.default)(r,function(i){return n.visit(i)}))},t}($y.GAstVisitor);function Wi(e){return e instanceof $y.NonTerminal?{kind:"rule",name:e.referencedRule.name}:{kind:"token"}}});var Qy=u((mB,Jy)=>{var uF=Wn();function cF(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:uF(e,t,r)}Jy.exports=cF});var Bo=u((gB,em)=>{var lF="\\ud800-\\udfff",fF="\\u0300-\\u036f",dF="\\ufe20-\\ufe2f",pF="\\u20d0-\\u20ff",hF=fF+dF+pF,vF="\\ufe0e\\ufe0f",_F="\\u200d",yF=RegExp("["+_F+lF+hF+vF+"]");function mF(e){return yF.test(e)}em.exports=mF});var rm=u((TB,tm)=>{function gF(e){return e.split("")}tm.exports=gF});var lm=u((EB,cm)=>{var nm="\\ud800-\\udfff",TF="\\u0300-\\u036f",EF="\\ufe20-\\ufe2f",AF="\\u20d0-\\u20ff",OF=TF+EF+AF,RF="\\ufe0e\\ufe0f",IF="["+nm+"]",Wo="["+OF+"]",Ko="\\ud83c[\\udffb-\\udfff]",NF="(?:"+Wo+"|"+Ko+")",im="[^"+nm+"]",am="(?:\\ud83c[\\udde6-\\uddff]){2}",om="[\\ud800-\\udbff][\\udc00-\\udfff]",SF="\\u200d",sm=NF+"?",um="["+RF+"]?",PF="(?:"+SF+"(?:"+[im,am,om].join("|")+")"+um+sm+")*",xF=um+sm+PF,bF="(?:"+[im+Wo+"?",Wo,am,om,IF].join("|")+")",CF=RegExp(Ko+"(?="+Ko+")|"+bF+xF,"g");function LF(e){return e.match(CF)||[]}cm.exports=LF});var dm=u((AB,fm)=>{var kF=rm(),qF=Bo(),MF=lm();function FF(e){return qF(e)?MF(e):kF(e)}fm.exports=FF});var hm=u((OB,pm)=>{var wF=Qy(),DF=Bo(),UF=dm(),jF=Sa();function GF(e){return function(t){t=jF(t);var r=DF(t)?UF(t):void 0,n=r?r[0]:t.charAt(0),i=r?wF(r,1).join(""):t.slice(1);return n[e]()+i}}pm.exports=GF});var _m=u((RB,vm)=>{var BF=hm(),WF=BF("toUpperCase");vm.exports=WF});var Tm=u(Ar=>{"use strict";var Or=Ar&&Ar.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ar,"__esModule",{value:!0});Ar.genDts=void 0;var KF=Or(qe()),VF=Or(C()),Ki=Or(Q()),HF=Or(st()),zF=Or(ti()),mm=Or(_m());function XF(e,t){var r=[];return r=r.concat('import type { CstNode, ICstVisitor, IToken } from "chevrotain";'),r=r.concat((0,KF.default)((0,Ki.default)(e,function(n){return YF(n)}))),t.includeVisitorInterface&&(r=r.concat(QF(t.visitorInterfaceName,e))),r.join(`
`)+`
`}Ar.genDts=XF;function YF(e){var t=$F(e),r=ZF(e);return[t,r]}function $F(e){var t=gm(e.name),r=Vo(e.name);return"export interface ".concat(t,` extends CstNode {
name: "`).concat(e.name,`";
children: `).concat(r,`;
}`)}function ZF(e){var t=Vo(e.name);return"export type ".concat(t,` = {
`).concat((0,Ki.default)(e.properties,function(r){return JF(r)}).join(`
`),`
};`)}function JF(e){var t=tw(e.type);return"".concat(e.name).concat(e.optional?"?":"",": ").concat(t,"[];")}function QF(e,t){return"export interface ".concat(e,`<IN, OUT> extends ICstVisitor<IN, OUT> {
`).concat((0,Ki.default)(t,function(r){return ew(r)}).join(`
`),`
}`)}function ew(e){var t=Vo(e.name);return"".concat(e.name,"(children: ").concat(t,", param?: IN): OUT;")}function tw(e){if((0,VF.default)(e)){var t=(0,zF.default)((0,Ki.default)(e,function(n){return ym(n)})),r=(0,HF.default)(t,function(n,i){return n+" | "+i});return"("+r+")"}else return ym(e)}function ym(e){return e.kind==="token"?"IToken":gm(e.name)}function gm(e){return(0,mm.default)(e)+"CstNode"}function Vo(e){return(0,mm.default)(e)+"CstChildren"}});var Em=u(Rr=>{"use strict";var Vi=Rr&&Rr.__assign||function(){return Vi=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++){t=arguments[r];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},Vi.apply(this,arguments)};Object.defineProperty(Rr,"__esModule",{value:!0});Rr.generateCstDts=void 0;var rw=Zy(),nw=Tm(),iw={includeVisitorInterface:!0,visitorInterfaceName:"ICstNodeVisitor"};function aw(e,t){var r=Vi(Vi({},iw),t),n=(0,rw.buildModel)(e);return(0,nw.genDts)(n,r)}Rr.generateCstDts=aw});var Om=u(Hi=>{"use strict";Object.defineProperty(Hi,"__esModule",{value:!0});Hi.createSyntaxDiagramsCode=void 0;var Am=ta();function ow(e,t){var r=t===void 0?{}:t,n=r.resourceBase,i=n===void 0?"https://unpkg.com/chevrotain@".concat(Am.VERSION,"/diagrams/"):n,a=r.css,o=a===void 0?"https://unpkg.com/chevrotain@".concat(Am.VERSION,"/diagrams/diagrams.css"):a,s=`
<!-- This is a generated file -->
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
background-color: hsl(30, 20%, 95%)
}
</style>
`,c=`
<link rel='stylesheet' href='`.concat(o,`'>
`),f=`
<script src='`.concat(i,`vendor/railroad-diagrams.js'><\/script>
<script src='`).concat(i,`src/diagrams_builder.js'><\/script>
<script src='`).concat(i,`src/diagrams_behavior.js'><\/script>
<script src='`).concat(i,`src/main.js'><\/script>
`),p=`
<div id="diagrams" align="center"></div>
`,d=`
<script>
window.serializedGrammar = `.concat(JSON.stringify(e,null," "),`;
<\/script>
`),h=`
<script>
var diagramsDiv = document.getElementById("diagrams");
main.drawDiagramsFromSerializedGrammar(serializedGrammar, diagramsDiv);
<\/script>
`;return s+c+f+p+d+h}Hi.createSyntaxDiagramsCode=ow});var _w=u(m=>{Object.defineProperty(m,"__esModule",{value:!0});m.Parser=m.createSyntaxDiagramsCode=m.clearCache=m.generateCstDts=m.GAstVisitor=m.serializeProduction=m.serializeGrammar=m.Terminal=m.Rule=m.RepetitionWithSeparator=m.RepetitionMandatoryWithSeparator=m.RepetitionMandatory=m.Repetition=m.Option=m.NonTerminal=m.Alternative=m.Alternation=m.defaultLexerErrorProvider=m.NoViableAltException=m.NotAllInputParsedException=m.MismatchedTokenException=m.isRecognitionException=m.EarlyExitException=m.defaultParserErrorProvider=m.LLkLookaheadStrategy=m.getLookaheadPaths=m.tokenName=m.tokenMatcher=m.tokenLabel=m.EOF=m.createTokenInstance=m.createToken=m.LexerDefinitionErrorType=m.Lexer=m.EMPTY_ALT=m.ParserDefinitionErrorType=m.EmbeddedActionsParser=m.CstParser=m.VERSION=void 0;var sw=ta();Object.defineProperty(m,"VERSION",{enumerable:!0,get:function(){return sw.VERSION}});var zi=ae();Object.defineProperty(m,"CstParser",{enumerable:!0,get:function(){return zi.CstParser}});Object.defineProperty(m,"EmbeddedActionsParser",{enumerable:!0,get:function(){return zi.EmbeddedActionsParser}});Object.defineProperty(m,"ParserDefinitionErrorType",{enumerable:!0,get:function(){return zi.ParserDefinitionErrorType}});Object.defineProperty(m,"EMPTY_ALT",{enumerable:!0,get:function(){return zi.EMPTY_ALT}});var Rm=tn();Object.defineProperty(m,"Lexer",{enumerable:!0,get:function(){return Rm.Lexer}});Object.defineProperty(m,"LexerDefinitionErrorType",{enumerable:!0,get:function(){return Rm.LexerDefinitionErrorType}});var Ir=Ot();Object.defineProperty(m,"createToken",{enumerable:!0,get:function(){return Ir.createToken}});Object.defineProperty(m,"createTokenInstance",{enumerable:!0,get:function(){return Ir.createTokenInstance}});Object.defineProperty(m,"EOF",{enumerable:!0,get:function(){return Ir.EOF}});Object.defineProperty(m,"tokenLabel",{enumerable:!0,get:function(){return Ir.tokenLabel}});Object.defineProperty(m,"tokenMatcher",{enumerable:!0,get:function(){return Ir.tokenMatcher}});Object.defineProperty(m,"tokenName",{enumerable:!0,get:function(){return Ir.tokenName}});var uw=or();Object.defineProperty(m,"getLookaheadPaths",{enumerable:!0,get:function(){return uw.getLookaheadPaths}});var cw=Mo();Object.defineProperty(m,"LLkLookaheadStrategy",{enumerable:!0,get:function(){return cw.LLkLookaheadStrategy}});var lw=ar();Object.defineProperty(m,"defaultParserErrorProvider",{enumerable:!0,get:function(){return lw.defaultParserErrorProvider}});var gn=ur();Object.defineProperty(m,"EarlyExitException",{enumerable:!0,get:function(){return gn.EarlyExitException}});Object.defineProperty(m,"isRecognitionException",{enumerable:!0,get:function(){return gn.isRecognitionException}});Object.defineProperty(m,"MismatchedTokenException",{enumerable:!0,get:function(){return gn.MismatchedTokenException}});Object.defineProperty(m,"NotAllInputParsedException",{enumerable:!0,get:function(){return gn.NotAllInputParsedException}});Object.defineProperty(m,"NoViableAltException",{enumerable:!0,get:function(){return gn.NoViableAltException}});var fw=so();Object.defineProperty(m,"defaultLexerErrorProvider",{enumerable:!0,get:function(){return fw.defaultLexerErrorProvider}});var Be=G();Object.defineProperty(m,"Alternation",{enumerable:!0,get:function(){return Be.Alternation}});Object.defineProperty(m,"Alternative",{enumerable:!0,get:function(){return Be.Alternative}});Object.defineProperty(m,"NonTerminal",{enumerable:!0,get:function(){return Be.NonTerminal}});Object.defineProperty(m,"Option",{enumerable:!0,get:function(){return Be.Option}});Object.defineProperty(m,"Repetition",{enumerable:!0,get:function(){return Be.Repetition}});Object.defineProperty(m,"RepetitionMandatory",{enumerable:!0,get:function(){return Be.RepetitionMandatory}});Object.defineProperty(m,"RepetitionMandatoryWithSeparator",{enumerable:!0,get:function(){return Be.RepetitionMandatoryWithSeparator}});Object.defineProperty(m,"RepetitionWithSeparator",{enumerable:!0,get:function(){return Be.RepetitionWithSeparator}});Object.defineProperty(m,"Rule",{enumerable:!0,get:function(){return Be.Rule}});Object.defineProperty(m,"Terminal",{enumerable:!0,get:function(){return Be.Terminal}});var Ho=G();Object.defineProperty(m,"serializeGrammar",{enumerable:!0,get:function(){return Ho.serializeGrammar}});Object.defineProperty(m,"serializeProduction",{enumerable:!0,get:function(){return Ho.serializeProduction}});Object.defineProperty(m,"GAstVisitor",{enumerable:!0,get:function(){return Ho.GAstVisitor}});var dw=Em();Object.defineProperty(m,"generateCstDts",{enumerable:!0,get:function(){return dw.generateCstDts}});function pw(){console.warn(`The clearCache function was 'soft' removed from the Chevrotain API.
It performs no action other than printing this message.
Please avoid using it as it will be completely removed in the future`)}m.clearCache=pw;var hw=Om();Object.defineProperty(m,"createSyntaxDiagramsCode",{enumerable:!0,get:function(){return hw.createSyntaxDiagramsCode}});var vw=function(){function e(){throw new Error(`The Parser class has been deprecated, use CstParser or EmbeddedActionsParser instead.
See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_7-0-0`)}return e}();m.Parser=vw});export default _w();
//# sourceMappingURL=chevrotain.min.mjs.map