@yorkie-js/schema 0.6.40 → 0.6.41-rc2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/yorkie-js-schema.es.js +3869 -4427
- package/dist/yorkie-js-schema.js +52 -546
- package/package.json +9 -9
package/dist/yorkie-js-schema.js
CHANGED
|
@@ -1,557 +1,90 @@
|
|
|
1
|
-
(function(ze,qe){typeof exports=="object"&&typeof module<"u"?qe(exports):typeof define=="function"&&define.amd?define(["exports"],qe):(ze=typeof globalThis<"u"?globalThis:ze||self,qe(ze["yorkie-js-schema"]={}))})(this,function(ze){"use strict";var Gd=Object.defineProperty;var Xd=(ze,qe,We)=>qe in ze?Gd(ze,qe,{enumerable:!0,configurable:!0,writable:!0,value:We}):ze[qe]=We;var Y=(ze,qe,We)=>Xd(ze,typeof qe!="symbol"?qe+"":qe,We);var qe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},We={},Ji={},Ru;function mp(){if(Ru)return Ji;Ru=1;/*!
|
|
2
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
3
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
4
|
-
*/return Object.defineProperty(Ji,"__esModule",{value:!0}),Ji}var Zi={},Pu;function gp(){if(Pu)return Zi;Pu=1;/*!
|
|
5
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
6
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
7
|
-
*/return Object.defineProperty(Zi,"__esModule",{value:!0}),Zi}var Tr={};function vp(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Du={exports:{}},Ie=Du.exports={},tt,rt;function eo(){throw new Error("setTimeout has not been defined")}function to(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?tt=setTimeout:tt=eo}catch{tt=eo}try{typeof clearTimeout=="function"?rt=clearTimeout:rt=to}catch{rt=to}})();function Iu(u){if(tt===setTimeout)return setTimeout(u,0);if((tt===eo||!tt)&&setTimeout)return tt=setTimeout,setTimeout(u,0);try{return tt(u,0)}catch{try{return tt.call(null,u,0)}catch{return tt.call(this,u,0)}}}function Ap(u){if(rt===clearTimeout)return clearTimeout(u);if((rt===to||!rt)&&clearTimeout)return rt=clearTimeout,clearTimeout(u);try{return rt(u)}catch{try{return rt.call(null,u)}catch{return rt.call(this,u)}}}var it=[],In=!1,Er,Ci=-1;function Tp(){!In||!Er||(In=!1,Er.length?it=Er.concat(it):Ci=-1,it.length&&wu())}function wu(){if(!In){var u=Iu(Tp);In=!0;for(var i=it.length;i;){for(Er=it,it=[];++Ci<i;)Er&&Er[Ci].run();Ci=-1,i=it.length}Er=null,In=!1,Ap(u)}}Ie.nextTick=function(u){var i=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)i[c-1]=arguments[c];it.push(new Lu(u,i)),it.length===1&&!In&&Iu(wu)};function Lu(u,i){this.fun=u,this.array=i}Lu.prototype.run=function(){this.fun.apply(null,this.array)},Ie.title="browser",Ie.browser=!0,Ie.env={},Ie.argv=[],Ie.version="",Ie.versions={};function ot(){}Ie.on=ot,Ie.addListener=ot,Ie.once=ot,Ie.off=ot,Ie.removeListener=ot,Ie.removeAllListeners=ot,Ie.emit=ot,Ie.prependListener=ot,Ie.prependOnceListener=ot,Ie.listeners=function(u){return[]},Ie.binding=function(u){throw new Error("process.binding is not supported")},Ie.cwd=function(){return"/"},Ie.chdir=function(u){throw new Error("process.chdir is not supported")},Ie.umask=function(){return 0};var Ep=Du.exports;const Re=vp(Ep);var ro={exports:{}},no={},io={},oo={},so,Fu;function uo(){return Fu||(Fu=1,so=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var i={},c=Symbol("test"),h=Object(c);if(typeof c=="string"||Object.prototype.toString.call(c)!=="[object Symbol]"||Object.prototype.toString.call(h)!=="[object Symbol]")return!1;var p=42;i[c]=p;for(var a in i)return!1;if(typeof Object.keys=="function"&&Object.keys(i).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(i).length!==0)return!1;var r=Object.getOwnPropertySymbols(i);if(r.length!==1||r[0]!==c||!Object.prototype.propertyIsEnumerable.call(i,c))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var n=Object.getOwnPropertyDescriptor(i,c);if(n.value!==p||n.enumerable!==!0)return!1}return!0}),so}var ao,Bu;function Oi(){if(Bu)return ao;Bu=1;var u=uo();return ao=function(){return u()&&!!Symbol.toStringTag},ao}var lo,ju;function co(){return ju||(ju=1,lo=Object),lo}var fo,Mu;function Sp(){return Mu||(Mu=1,fo=Error),fo}var ho,qu;function Np(){return qu||(qu=1,ho=EvalError),ho}var po,ku;function bp(){return ku||(ku=1,po=RangeError),po}var xo,Uu;function Cp(){return Uu||(Uu=1,xo=ReferenceError),xo}var yo,zu;function Hu(){return zu||(zu=1,yo=SyntaxError),yo}var _o,$u;function kn(){return $u||($u=1,_o=TypeError),_o}var mo,Vu;function Op(){return Vu||(Vu=1,mo=URIError),mo}var go,Wu;function Rp(){return Wu||(Wu=1,go=Math.abs),go}var vo,Gu;function Pp(){return Gu||(Gu=1,vo=Math.floor),vo}var Ao,Xu;function Dp(){return Xu||(Xu=1,Ao=Math.max),Ao}var To,Ku;function Ip(){return Ku||(Ku=1,To=Math.min),To}var Eo,Yu;function wp(){return Yu||(Yu=1,Eo=Math.pow),Eo}var So,Qu;function Lp(){return Qu||(Qu=1,So=Math.round),So}var No,Ju;function Fp(){return Ju||(Ju=1,No=Number.isNaN||function(i){return i!==i}),No}var bo,Zu;function Bp(){if(Zu)return bo;Zu=1;var u=Fp();return bo=function(c){return u(c)||c===0?c:c<0?-1:1},bo}var Co,ea;function jp(){return ea||(ea=1,Co=Object.getOwnPropertyDescriptor),Co}var Oo,ta;function wn(){if(ta)return Oo;ta=1;var u=jp();if(u)try{u([],"length")}catch{u=null}return Oo=u,Oo}var Ro,ra;function Ri(){if(ra)return Ro;ra=1;var u=Object.defineProperty||!1;if(u)try{u({},"a",{value:1})}catch{u=!1}return Ro=u,Ro}var Po,na;function Mp(){if(na)return Po;na=1;var u=typeof Symbol<"u"&&Symbol,i=uo();return Po=function(){return typeof u!="function"||typeof Symbol!="function"||typeof u("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:i()},Po}var Do,ia;function oa(){return ia||(ia=1,Do=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Do}var Io,sa;function ua(){if(sa)return Io;sa=1;var u=co();return Io=u.getPrototypeOf||null,Io}var wo,aa;function qp(){if(aa)return wo;aa=1;var u="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,c=Math.max,h="[object Function]",p=function(t,s){for(var e=[],o=0;o<t.length;o+=1)e[o]=t[o];for(var l=0;l<s.length;l+=1)e[l+t.length]=s[l];return e},a=function(t,s){for(var e=[],o=s,l=0;o<t.length;o+=1,l+=1)e[l]=t[o];return e},r=function(n,t){for(var s="",e=0;e<n.length;e+=1)s+=n[e],e+1<n.length&&(s+=t);return s};return wo=function(t){var s=this;if(typeof s!="function"||i.apply(s)!==h)throw new TypeError(u+s);for(var e=a(arguments,1),o,l=function(){if(this instanceof o){var m=s.apply(this,p(e,arguments));return Object(m)===m?m:this}return s.apply(t,p(e,arguments))},f=c(0,s.length-e.length),d=[],g=0;g<f;g++)d[g]="$"+g;if(o=Function("binder","return function ("+r(d,",")+"){ return binder.apply(this,arguments); }")(l),s.prototype){var x=function(){};x.prototype=s.prototype,o.prototype=new x,x.prototype=null}return o},wo}var Lo,la;function Un(){if(la)return Lo;la=1;var u=qp();return Lo=Function.prototype.bind||u,Lo}var Fo,ca;function Bo(){return ca||(ca=1,Fo=Function.prototype.call),Fo}var jo,fa;function Mo(){return fa||(fa=1,jo=Function.prototype.apply),jo}var qo,ha;function kp(){return ha||(ha=1,qo=typeof Reflect<"u"&&Reflect&&Reflect.apply),qo}var ko,pa;function da(){if(pa)return ko;pa=1;var u=Un(),i=Mo(),c=Bo(),h=kp();return ko=h||u.call(c,i),ko}var Uo,xa;function zo(){if(xa)return Uo;xa=1;var u=Un(),i=kn(),c=Bo(),h=da();return Uo=function(a){if(a.length<1||typeof a[0]!="function")throw new i("a function is required");return h(u,c,a)},Uo}var Ho,ya;function Up(){if(ya)return Ho;ya=1;var u=zo(),i=wn(),c;try{c=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var h=!!c&&i&&i(Object.prototype,"__proto__"),p=Object,a=p.getPrototypeOf;return Ho=h&&typeof h.get=="function"?u([h.get]):typeof a=="function"?function(n){return a(n==null?n:p(n))}:!1,Ho}var $o,_a;function Vo(){if(_a)return $o;_a=1;var u=oa(),i=ua(),c=Up();return $o=u?function(p){return u(p)}:i?function(p){if(!p||typeof p!="object"&&typeof p!="function")throw new TypeError("getProto: not an object");return i(p)}:c?function(p){return c(p)}:null,$o}var Wo,ma;function ga(){if(ma)return Wo;ma=1;var u=Function.prototype.call,i=Object.prototype.hasOwnProperty,c=Un();return Wo=c.call(u,i),Wo}var Go,va;function Xo(){if(va)return Go;va=1;var u,i=co(),c=Sp(),h=Np(),p=bp(),a=Cp(),r=Hu(),n=kn(),t=Op(),s=Rp(),e=Pp(),o=Dp(),l=Ip(),f=wp(),d=Lp(),g=Bp(),x=Function,m=function(I){try{return x('"use strict"; return ('+I+").constructor;")()}catch{}},y=wn(),_=Ri(),v=function(){throw new n},N=y?function(){try{return arguments.callee,v}catch{try{return y(arguments,"callee").get}catch{return v}}}():v,T=Mp()(),b=Vo(),O=ua(),D=oa(),k=Mo(),z=Bo(),U={},re=typeof Uint8Array>"u"||!b?u:b(Uint8Array),oe={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?u:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?u:ArrayBuffer,"%ArrayIteratorPrototype%":T&&b?b([][Symbol.iterator]()):u,"%AsyncFromSyncIteratorPrototype%":u,"%AsyncFunction%":U,"%AsyncGenerator%":U,"%AsyncGeneratorFunction%":U,"%AsyncIteratorPrototype%":U,"%Atomics%":typeof Atomics>"u"?u:Atomics,"%BigInt%":typeof BigInt>"u"?u:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?u:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?u:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?u:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":c,"%eval%":eval,"%EvalError%":h,"%Float16Array%":typeof Float16Array>"u"?u:Float16Array,"%Float32Array%":typeof Float32Array>"u"?u:Float32Array,"%Float64Array%":typeof Float64Array>"u"?u:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?u:FinalizationRegistry,"%Function%":x,"%GeneratorFunction%":U,"%Int8Array%":typeof Int8Array>"u"?u:Int8Array,"%Int16Array%":typeof Int16Array>"u"?u:Int16Array,"%Int32Array%":typeof Int32Array>"u"?u:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&b?b(b([][Symbol.iterator]())):u,"%JSON%":typeof JSON=="object"?JSON:u,"%Map%":typeof Map>"u"?u:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!b?u:b(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":y,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?u:Promise,"%Proxy%":typeof Proxy>"u"?u:Proxy,"%RangeError%":p,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?u:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?u:Set,"%SetIteratorPrototype%":typeof Set>"u"||!T||!b?u:b(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?u:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&b?b(""[Symbol.iterator]()):u,"%Symbol%":T?Symbol:u,"%SyntaxError%":r,"%ThrowTypeError%":N,"%TypedArray%":re,"%TypeError%":n,"%Uint8Array%":typeof Uint8Array>"u"?u:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?u:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?u:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?u:Uint32Array,"%URIError%":t,"%WeakMap%":typeof WeakMap>"u"?u:WeakMap,"%WeakRef%":typeof WeakRef>"u"?u:WeakRef,"%WeakSet%":typeof WeakSet>"u"?u:WeakSet,"%Function.prototype.call%":z,"%Function.prototype.apply%":k,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":O,"%Math.abs%":s,"%Math.floor%":e,"%Math.max%":o,"%Math.min%":l,"%Math.pow%":f,"%Math.round%":d,"%Math.sign%":g,"%Reflect.getPrototypeOf%":D};if(b)try{null.error}catch(I){var se=b(b(I));oe["%Error.prototype%"]=se}var de=function I(M){var V;if(M==="%AsyncFunction%")V=m("async function () {}");else if(M==="%GeneratorFunction%")V=m("function* () {}");else if(M==="%AsyncGeneratorFunction%")V=m("async function* () {}");else if(M==="%AsyncGenerator%"){var W=I("%AsyncGeneratorFunction%");W&&(V=W.prototype)}else if(M==="%AsyncIteratorPrototype%"){var w=I("%AsyncGenerator%");w&&b&&(V=b(w.prototype))}return oe[M]=V,V},be={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},fe=Un(),Z=ga(),te=fe.call(z,Array.prototype.concat),J=fe.call(k,Array.prototype.splice),B=fe.call(z,String.prototype.replace),E=fe.call(z,String.prototype.slice),A=fe.call(z,RegExp.prototype.exec),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,P=function(M){var V=E(M,0,1),W=E(M,-1);if(V==="%"&&W!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(W==="%"&&V!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var w=[];return B(M,S,function(L,H,G,ee){w[w.length]=G?B(ee,C,"$1"):H||L}),w},R=function(M,V){var W=M,w;if(Z(be,W)&&(w=be[W],W="%"+w[0]+"%"),Z(oe,W)){var L=oe[W];if(L===U&&(L=de(W)),typeof L>"u"&&!V)throw new n("intrinsic "+M+" exists, but is not available. Please file an issue!");return{alias:w,name:W,value:L}}throw new r("intrinsic "+M+" does not exist!")};return Go=function(M,V){if(typeof M!="string"||M.length===0)throw new n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof V!="boolean")throw new n('"allowMissing" argument must be a boolean');if(A(/^%?[^%]*%?$/,M)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var W=P(M),w=W.length>0?W[0]:"",L=R("%"+w+"%",V),H=L.name,G=L.value,ee=!1,ne=L.alias;ne&&(w=ne[0],J(W,te([0,1],ne)));for(var q=1,X=!0;q<W.length;q+=1){var ue=W[q],ve=E(ue,0,1),Te=E(ue,-1);if((ve==='"'||ve==="'"||ve==="`"||Te==='"'||Te==="'"||Te==="`")&&ve!==Te)throw new r("property names with quotes must have matching quotes");if((ue==="constructor"||!X)&&(ee=!0),w+="."+ue,H="%"+w+"%",Z(oe,H))G=oe[H];else if(G!=null){if(!(ue in G)){if(!V)throw new n("base intrinsic for "+M+" exists, but the property is not available.");return}if(y&&q+1>=W.length){var j=y(G,ue);X=!!j,X&&"get"in j&&!("originalValue"in j.get)?G=j.get:G=G[ue]}else X=Z(G,ue),G=G[ue];X&&!ee&&(oe[H]=G)}}return G},Go}var Ko,Aa;function Ln(){if(Aa)return Ko;Aa=1;var u=Xo(),i=zo(),c=i([u("%String.prototype.indexOf%")]);return Ko=function(p,a){var r=u(p,!!a);return typeof r=="function"&&c(p,".prototype.")>-1?i([r]):r},Ko}var Yo,Ta;function zp(){if(Ta)return Yo;Ta=1;var u=Oi()(),i=Ln(),c=i("Object.prototype.toString"),h=function(n){return u&&n&&typeof n=="object"&&Symbol.toStringTag in n?!1:c(n)==="[object Arguments]"},p=function(n){return h(n)?!0:n!==null&&typeof n=="object"&&"length"in n&&typeof n.length=="number"&&n.length>=0&&c(n)!=="[object Array]"&&"callee"in n&&c(n.callee)==="[object Function]"},a=function(){return h(arguments)}();return h.isLegacyArguments=p,Yo=a?h:p,Yo}var Qo,Ea;function Hp(){if(Ea)return Qo;Ea=1;var u=Ln(),i=Oi()(),c=ga(),h=wn(),p;if(i){var a=u("RegExp.prototype.exec"),r={},n=function(){throw r},t={toString:n,valueOf:n};typeof Symbol.toPrimitive=="symbol"&&(t[Symbol.toPrimitive]=n),p=function(l){if(!l||typeof l!="object")return!1;var f=h(l,"lastIndex"),d=f&&c(f,"value");if(!d)return!1;try{a(l,t)}catch(g){return g===r}}}else{var s=u("Object.prototype.toString"),e="[object RegExp]";p=function(l){return!l||typeof l!="object"&&typeof l!="function"?!1:s(l)===e}}return Qo=p,Qo}var Jo,Sa;function $p(){if(Sa)return Jo;Sa=1;var u=Ln(),i=Hp(),c=u("RegExp.prototype.exec"),h=kn();return Jo=function(a){if(!i(a))throw new h("`regex` must be a RegExp");return function(n){return c(a,n)!==null}},Jo}var Zo,Na;function Vp(){if(Na)return Zo;Na=1;var u=Ln(),i=$p(),c=i(/^\s*(?:function)?\*/),h=Oi()(),p=Vo(),a=u("Object.prototype.toString"),r=u("Function.prototype.toString"),n=function(){if(!h)return!1;try{return Function("return function*() {}")()}catch{}},t;return Zo=function(e){if(typeof e!="function")return!1;if(c(r(e)))return!0;if(!h){var o=a(e);return o==="[object GeneratorFunction]"}if(!p)return!1;if(typeof t>"u"){var l=n();t=l?p(l):!1}return p(e)===t},Zo}var es,ba;function Wp(){if(ba)return es;ba=1;var u=Function.prototype.toString,i=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,c,h;if(typeof i=="function"&&typeof Object.defineProperty=="function")try{c=Object.defineProperty({},"length",{get:function(){throw h}}),h={},i(function(){throw 42},null,c)}catch(y){y!==h&&(i=null)}else i=null;var p=/^\s*class\b/,a=function(_){try{var v=u.call(_);return p.test(v)}catch{return!1}},r=function(_){try{return a(_)?!1:(u.call(_),!0)}catch{return!1}},n=Object.prototype.toString,t="[object Object]",s="[object Function]",e="[object GeneratorFunction]",o="[object HTMLAllCollection]",l="[object HTML document.all class]",f="[object HTMLCollection]",d=typeof Symbol=="function"&&!!Symbol.toStringTag,g=!(0 in[,]),x=function(){return!1};if(typeof document=="object"){var m=document.all;n.call(m)===n.call(document.all)&&(x=function(_){if((g||!_)&&(typeof _>"u"||typeof _=="object"))try{var v=n.call(_);return(v===o||v===l||v===f||v===t)&&_("")==null}catch{}return!1})}return es=i?function(_){if(x(_))return!0;if(!_||typeof _!="function"&&typeof _!="object")return!1;try{i(_,null,c)}catch(v){if(v!==h)return!1}return!a(_)&&r(_)}:function(_){if(x(_))return!0;if(!_||typeof _!="function"&&typeof _!="object")return!1;if(d)return r(_);if(a(_))return!1;var v=n.call(_);return v!==s&&v!==e&&!/^\[object HTML/.test(v)?!1:r(_)},es}var ts,Ca;function Gp(){if(Ca)return ts;Ca=1;var u=Wp(),i=Object.prototype.toString,c=Object.prototype.hasOwnProperty,h=function(t,s,e){for(var o=0,l=t.length;o<l;o++)c.call(t,o)&&(e==null?s(t[o],o,t):s.call(e,t[o],o,t))},p=function(t,s,e){for(var o=0,l=t.length;o<l;o++)e==null?s(t.charAt(o),o,t):s.call(e,t.charAt(o),o,t)},a=function(t,s,e){for(var o in t)c.call(t,o)&&(e==null?s(t[o],o,t):s.call(e,t[o],o,t))};function r(n){return i.call(n)==="[object Array]"}return ts=function(t,s,e){if(!u(s))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=e),r(t)?h(t,s,o):typeof t=="string"?p(t,s,o):a(t,s,o)},ts}var rs,Oa;function Xp(){return Oa||(Oa=1,rs=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),rs}var ns,Ra;function Kp(){if(Ra)return ns;Ra=1;var u=Xp(),i=typeof globalThis>"u"?qe:globalThis;return ns=function(){for(var h=[],p=0;p<u.length;p++)typeof i[u[p]]=="function"&&(h[h.length]=u[p]);return h},ns}var is={exports:{}},os,Pa;function Da(){if(Pa)return os;Pa=1;var u=Ri(),i=Hu(),c=kn(),h=wn();return os=function(a,r,n){if(!a||typeof a!="object"&&typeof a!="function")throw new c("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new c("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new c("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new c("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new c("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new c("`loose`, if provided, must be a boolean");var t=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,e=arguments.length>5?arguments[5]:null,o=arguments.length>6?arguments[6]:!1,l=!!h&&h(a,r);if(u)u(a,r,{configurable:e===null&&l?l.configurable:!e,enumerable:t===null&&l?l.enumerable:!t,value:n,writable:s===null&&l?l.writable:!s});else if(o||!t&&!s&&!e)a[r]=n;else throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},os}var ss,Ia;function wa(){if(Ia)return ss;Ia=1;var u=Ri(),i=function(){return!!u};return i.hasArrayLengthDefineBug=function(){if(!u)return null;try{return u([],"length",{value:1}).length!==1}catch{return!0}},ss=i,ss}var us,La;function Yp(){if(La)return us;La=1;var u=Xo(),i=Da(),c=wa()(),h=wn(),p=kn(),a=u("%Math.floor%");return us=function(n,t){if(typeof n!="function")throw new p("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||a(t)!==t)throw new p("`length` must be a positive 32-bit integer");var s=arguments.length>2&&!!arguments[2],e=!0,o=!0;if("length"in n&&h){var l=h(n,"length");l&&!l.configurable&&(e=!1),l&&!l.writable&&(o=!1)}return(e||o||!s)&&(c?i(n,"length",t,!0,!0):i(n,"length",t)),n},us}var as,Fa;function Qp(){if(Fa)return as;Fa=1;var u=Un(),i=Mo(),c=da();return as=function(){return c(u,i,arguments)},as}var Ba;function Pi(){return Ba||(Ba=1,function(u){var i=Yp(),c=Ri(),h=zo(),p=Qp();u.exports=function(r){var n=h(arguments),t=r.length-(arguments.length-1);return i(n,1+(t>0?t:0),!0)},c?c(u.exports,"apply",{value:p}):u.exports.apply=p}(is)),is.exports}var ls,ja;function Ma(){if(ja)return ls;ja=1;var u=Gp(),i=Kp(),c=Pi(),h=Ln(),p=wn(),a=Vo(),r=h("Object.prototype.toString"),n=Oi()(),t=typeof globalThis>"u"?qe:globalThis,s=i(),e=h("String.prototype.slice"),o=h("Array.prototype.indexOf",!0)||function(x,m){for(var y=0;y<x.length;y+=1)if(x[y]===m)return y;return-1},l={__proto__:null};n&&p&&a?u(s,function(g){var x=new t[g];if(Symbol.toStringTag in x&&a){var m=a(x),y=p(m,Symbol.toStringTag);if(!y&&m){var _=a(m);y=p(_,Symbol.toStringTag)}l["$"+g]=c(y.get)}}):u(s,function(g){var x=new t[g],m=x.slice||x.set;m&&(l["$"+g]=c(m))});var f=function(x){var m=!1;return u(l,function(y,_){if(!m)try{"$"+y(x)===_&&(m=e(_,1))}catch{}}),m},d=function(x){var m=!1;return u(l,function(y,_){if(!m)try{y(x),m=e(_,1)}catch{}}),m};return ls=function(x){if(!x||typeof x!="object")return!1;if(!n){var m=e(r(x),8,-1);return o(s,m)>-1?m:m!=="Object"?!1:d(x)}return p?f(x):null},ls}var cs,qa;function Jp(){if(qa)return cs;qa=1;var u=Ma();return cs=function(c){return!!u(c)},cs}var ka;function Zp(){return ka||(ka=1,function(u){var i=zp(),c=Vp(),h=Ma(),p=Jp();function a(q){return q.call.bind(q)}var r=typeof BigInt<"u",n=typeof Symbol<"u",t=a(Object.prototype.toString),s=a(Number.prototype.valueOf),e=a(String.prototype.valueOf),o=a(Boolean.prototype.valueOf);if(r)var l=a(BigInt.prototype.valueOf);if(n)var f=a(Symbol.prototype.valueOf);function d(q,X){if(typeof q!="object")return!1;try{return X(q),!0}catch{return!1}}u.isArgumentsObject=i,u.isGeneratorFunction=c,u.isTypedArray=p;function g(q){return typeof Promise<"u"&&q instanceof Promise||q!==null&&typeof q=="object"&&typeof q.then=="function"&&typeof q.catch=="function"}u.isPromise=g;function x(q){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(q):p(q)||E(q)}u.isArrayBufferView=x;function m(q){return h(q)==="Uint8Array"}u.isUint8Array=m;function y(q){return h(q)==="Uint8ClampedArray"}u.isUint8ClampedArray=y;function _(q){return h(q)==="Uint16Array"}u.isUint16Array=_;function v(q){return h(q)==="Uint32Array"}u.isUint32Array=v;function N(q){return h(q)==="Int8Array"}u.isInt8Array=N;function T(q){return h(q)==="Int16Array"}u.isInt16Array=T;function b(q){return h(q)==="Int32Array"}u.isInt32Array=b;function O(q){return h(q)==="Float32Array"}u.isFloat32Array=O;function D(q){return h(q)==="Float64Array"}u.isFloat64Array=D;function k(q){return h(q)==="BigInt64Array"}u.isBigInt64Array=k;function z(q){return h(q)==="BigUint64Array"}u.isBigUint64Array=z;function U(q){return t(q)==="[object Map]"}U.working=typeof Map<"u"&&U(new Map);function re(q){return typeof Map>"u"?!1:U.working?U(q):q instanceof Map}u.isMap=re;function oe(q){return t(q)==="[object Set]"}oe.working=typeof Set<"u"&&oe(new Set);function se(q){return typeof Set>"u"?!1:oe.working?oe(q):q instanceof Set}u.isSet=se;function de(q){return t(q)==="[object WeakMap]"}de.working=typeof WeakMap<"u"&&de(new WeakMap);function be(q){return typeof WeakMap>"u"?!1:de.working?de(q):q instanceof WeakMap}u.isWeakMap=be;function fe(q){return t(q)==="[object WeakSet]"}fe.working=typeof WeakSet<"u"&&fe(new WeakSet);function Z(q){return fe(q)}u.isWeakSet=Z;function te(q){return t(q)==="[object ArrayBuffer]"}te.working=typeof ArrayBuffer<"u"&&te(new ArrayBuffer);function J(q){return typeof ArrayBuffer>"u"?!1:te.working?te(q):q instanceof ArrayBuffer}u.isArrayBuffer=J;function B(q){return t(q)==="[object DataView]"}B.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&B(new DataView(new ArrayBuffer(1),0,1));function E(q){return typeof DataView>"u"?!1:B.working?B(q):q instanceof DataView}u.isDataView=E;var A=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function S(q){return t(q)==="[object SharedArrayBuffer]"}function C(q){return typeof A>"u"?!1:(typeof S.working>"u"&&(S.working=S(new A)),S.working?S(q):q instanceof A)}u.isSharedArrayBuffer=C;function P(q){return t(q)==="[object AsyncFunction]"}u.isAsyncFunction=P;function R(q){return t(q)==="[object Map Iterator]"}u.isMapIterator=R;function I(q){return t(q)==="[object Set Iterator]"}u.isSetIterator=I;function M(q){return t(q)==="[object Generator]"}u.isGeneratorObject=M;function V(q){return t(q)==="[object WebAssembly.Module]"}u.isWebAssemblyCompiledModule=V;function W(q){return d(q,s)}u.isNumberObject=W;function w(q){return d(q,e)}u.isStringObject=w;function L(q){return d(q,o)}u.isBooleanObject=L;function H(q){return r&&d(q,l)}u.isBigIntObject=H;function G(q){return n&&d(q,f)}u.isSymbolObject=G;function ee(q){return W(q)||w(q)||L(q)||H(q)||G(q)}u.isBoxedPrimitive=ee;function ne(q){return typeof Uint8Array<"u"&&(J(q)||C(q))}u.isAnyArrayBuffer=ne,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(q){Object.defineProperty(u,q,{enumerable:!1,value:function(){throw new Error(q+" is not supported in userland")}})})}(oo)),oo}var fs,Ua;function e0(){return Ua||(Ua=1,fs=function(i){return i&&typeof i=="object"&&typeof i.copy=="function"&&typeof i.fill=="function"&&typeof i.readUInt8=="function"}),fs}var Di={exports:{}},za;function t0(){return za||(za=1,typeof Object.create=="function"?Di.exports=function(i,c){c&&(i.super_=c,i.prototype=Object.create(c.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}))}:Di.exports=function(i,c){if(c){i.super_=c;var h=function(){};h.prototype=c.prototype,i.prototype=new h,i.prototype.constructor=i}}),Di.exports}var Ha;function Fn(){return Ha||(Ha=1,function(u){var i=Object.getOwnPropertyDescriptors||function(E){for(var A=Object.keys(E),S={},C=0;C<A.length;C++)S[A[C]]=Object.getOwnPropertyDescriptor(E,A[C]);return S},c=/%[sdj%]/g;u.format=function(B){if(!N(B)){for(var E=[],A=0;A<arguments.length;A++)E.push(r(arguments[A]));return E.join(" ")}for(var A=1,S=arguments,C=S.length,P=String(B).replace(c,function(I){if(I==="%%")return"%";if(A>=C)return I;switch(I){case"%s":return String(S[A++]);case"%d":return Number(S[A++]);case"%j":try{return JSON.stringify(S[A++])}catch{return"[Circular]"}default:return I}}),R=S[A];A<C;R=S[++A])y(R)||!D(R)?P+=" "+R:P+=" "+r(R);return P},u.deprecate=function(B,E){if(typeof Re<"u"&&Re.noDeprecation===!0)return B;if(typeof Re>"u")return function(){return u.deprecate(B,E).apply(this,arguments)};var A=!1;function S(){if(!A){if(Re.throwDeprecation)throw new Error(E);Re.traceDeprecation?console.trace(E):console.error(E),A=!0}return B.apply(this,arguments)}return S};var h={},p=/^$/;if(Re.env.NODE_DEBUG){var a=Re.env.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),p=new RegExp("^"+a+"$","i")}u.debuglog=function(B){if(B=B.toUpperCase(),!h[B])if(p.test(B)){var E=Re.pid;h[B]=function(){var A=u.format.apply(u,arguments);console.error("%s %d: %s",B,E,A)}}else h[B]=function(){};return h[B]};function r(B,E){var A={seen:[],stylize:t};return arguments.length>=3&&(A.depth=arguments[2]),arguments.length>=4&&(A.colors=arguments[3]),m(E)?A.showHidden=E:E&&u._extend(A,E),b(A.showHidden)&&(A.showHidden=!1),b(A.depth)&&(A.depth=2),b(A.colors)&&(A.colors=!1),b(A.customInspect)&&(A.customInspect=!0),A.colors&&(A.stylize=n),e(A,B,A.depth)}u.inspect=r,r.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},r.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function n(B,E){var A=r.styles[E];return A?"\x1B["+r.colors[A][0]+"m"+B+"\x1B["+r.colors[A][1]+"m":B}function t(B,E){return B}function s(B){var E={};return B.forEach(function(A,S){E[A]=!0}),E}function e(B,E,A){if(B.customInspect&&E&&U(E.inspect)&&E.inspect!==u.inspect&&!(E.constructor&&E.constructor.prototype===E)){var S=E.inspect(A,B);return N(S)||(S=e(B,S,A)),S}var C=o(B,E);if(C)return C;var P=Object.keys(E),R=s(P);if(B.showHidden&&(P=Object.getOwnPropertyNames(E)),z(E)&&(P.indexOf("message")>=0||P.indexOf("description")>=0))return l(E);if(P.length===0){if(U(E)){var I=E.name?": "+E.name:"";return B.stylize("[Function"+I+"]","special")}if(O(E))return B.stylize(RegExp.prototype.toString.call(E),"regexp");if(k(E))return B.stylize(Date.prototype.toString.call(E),"date");if(z(E))return l(E)}var M="",V=!1,W=["{","}"];if(x(E)&&(V=!0,W=["[","]"]),U(E)){var w=E.name?": "+E.name:"";M=" [Function"+w+"]"}if(O(E)&&(M=" "+RegExp.prototype.toString.call(E)),k(E)&&(M=" "+Date.prototype.toUTCString.call(E)),z(E)&&(M=" "+l(E)),P.length===0&&(!V||E.length==0))return W[0]+M+W[1];if(A<0)return O(E)?B.stylize(RegExp.prototype.toString.call(E),"regexp"):B.stylize("[Object]","special");B.seen.push(E);var L;return V?L=f(B,E,A,R,P):L=P.map(function(H){return d(B,E,A,R,H,V)}),B.seen.pop(),g(L,M,W)}function o(B,E){if(b(E))return B.stylize("undefined","undefined");if(N(E)){var A="'"+JSON.stringify(E).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return B.stylize(A,"string")}if(v(E))return B.stylize(""+E,"number");if(m(E))return B.stylize(""+E,"boolean");if(y(E))return B.stylize("null","null")}function l(B){return"["+Error.prototype.toString.call(B)+"]"}function f(B,E,A,S,C){for(var P=[],R=0,I=E.length;R<I;++R)fe(E,String(R))?P.push(d(B,E,A,S,String(R),!0)):P.push("");return C.forEach(function(M){M.match(/^\d+$/)||P.push(d(B,E,A,S,M,!0))}),P}function d(B,E,A,S,C,P){var R,I,M;if(M=Object.getOwnPropertyDescriptor(E,C)||{value:E[C]},M.get?M.set?I=B.stylize("[Getter/Setter]","special"):I=B.stylize("[Getter]","special"):M.set&&(I=B.stylize("[Setter]","special")),fe(S,C)||(R="["+C+"]"),I||(B.seen.indexOf(M.value)<0?(y(A)?I=e(B,M.value,null):I=e(B,M.value,A-1),I.indexOf(`
|
|
1
|
+
(function(_r,Rn){typeof exports=="object"&&typeof module<"u"?Rn(exports):typeof define=="function"&&define.amd?define(["exports"],Rn):(_r=typeof globalThis<"u"?globalThis:_r||self,Rn(_r["yorkie-js-schema"]={}))})(this,(function(_r){"use strict";var Rn=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},mr={},Ki={},Cu;function _p(){if(Cu)return Ki;Cu=1;return Object.defineProperty(Ki,"__esModule",{value:!0}),Ki}var Qi={},Ou;function mp(){if(Ou)return Qi;Ou=1;return Object.defineProperty(Qi,"__esModule",{value:!0}),Qi}var gr={};function gp(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Ru={exports:{}},Re=Ru.exports={},Qe,Je;function Ji(){throw new Error("setTimeout has not been defined")}function Zi(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Qe=setTimeout:Qe=Ji}catch{Qe=Ji}try{typeof clearTimeout=="function"?Je=clearTimeout:Je=Zi}catch{Je=Zi}})();function Pu(u){if(Qe===setTimeout)return setTimeout(u,0);if((Qe===Ji||!Qe)&&setTimeout)return Qe=setTimeout,setTimeout(u,0);try{return Qe(u,0)}catch{try{return Qe.call(null,u,0)}catch{return Qe.call(this,u,0)}}}function vp(u){if(Je===clearTimeout)return clearTimeout(u);if((Je===Zi||!Je)&&clearTimeout)return Je=clearTimeout,clearTimeout(u);try{return Je(u)}catch{try{return Je.call(null,u)}catch{return Je.call(this,u)}}}var Ye=[],Pn=!1,vr,Ni=-1;function Ap(){!Pn||!vr||(Pn=!1,vr.length?Ye=vr.concat(Ye):Ni=-1,Ye.length&&Du())}function Du(){if(!Pn){var u=Pu(Ap);Pn=!0;for(var i=Ye.length;i;){for(vr=Ye,Ye=[];++Ni<i;)vr&&vr[Ni].run();Ni=-1,i=Ye.length}vr=null,Pn=!1,vp(u)}}Re.nextTick=function(u){var i=new Array(arguments.length-1);if(arguments.length>1)for(var c=1;c<arguments.length;c++)i[c-1]=arguments[c];Ye.push(new Iu(u,i)),Ye.length===1&&!Pn&&Pu(Du)};function Iu(u,i){this.fun=u,this.array=i}Iu.prototype.run=function(){this.fun.apply(null,this.array)},Re.title="browser",Re.browser=!0,Re.env={},Re.argv=[],Re.version="",Re.versions={};function et(){}Re.on=et,Re.addListener=et,Re.once=et,Re.off=et,Re.removeListener=et,Re.removeAllListeners=et,Re.emit=et,Re.prependListener=et,Re.prependOnceListener=et,Re.listeners=function(u){return[]},Re.binding=function(u){throw new Error("process.binding is not supported")},Re.cwd=function(){return"/"},Re.chdir=function(u){throw new Error("process.chdir is not supported")},Re.umask=function(){return 0};var Tp=Ru.exports;const be=gp(Tp);var Yi={exports:{}},eo={},to={},ro={},no,wu;function io(){return wu||(wu=1,no=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var i={},c=Symbol("test"),h=Object(c);if(typeof c=="string"||Object.prototype.toString.call(c)!=="[object Symbol]"||Object.prototype.toString.call(h)!=="[object Symbol]")return!1;var p=42;i[c]=p;for(var a in i)return!1;if(typeof Object.keys=="function"&&Object.keys(i).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(i).length!==0)return!1;var r=Object.getOwnPropertySymbols(i);if(r.length!==1||r[0]!==c||!Object.prototype.propertyIsEnumerable.call(i,c))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var n=Object.getOwnPropertyDescriptor(i,c);if(n.value!==p||n.enumerable!==!0)return!1}return!0}),no}var oo,Lu;function bi(){if(Lu)return oo;Lu=1;var u=io();return oo=function(){return u()&&!!Symbol.toStringTag},oo}var so,Fu;function uo(){return Fu||(Fu=1,so=Object),so}var ao,Bu;function Ep(){return Bu||(Bu=1,ao=Error),ao}var lo,ju;function Sp(){return ju||(ju=1,lo=EvalError),lo}var co,Mu;function Np(){return Mu||(Mu=1,co=RangeError),co}var fo,qu;function bp(){return qu||(qu=1,fo=ReferenceError),fo}var ho,ku;function Uu(){return ku||(ku=1,ho=SyntaxError),ho}var po,zu;function Mn(){return zu||(zu=1,po=TypeError),po}var xo,Hu;function Cp(){return Hu||(Hu=1,xo=URIError),xo}var yo,Vu;function Op(){return Vu||(Vu=1,yo=Math.abs),yo}var _o,Wu;function Rp(){return Wu||(Wu=1,_o=Math.floor),_o}var mo,Gu;function Pp(){return Gu||(Gu=1,mo=Math.max),mo}var go,Xu;function Dp(){return Xu||(Xu=1,go=Math.min),go}var vo,$u;function Ip(){return $u||($u=1,vo=Math.pow),vo}var Ao,Ku;function wp(){return Ku||(Ku=1,Ao=Math.round),Ao}var To,Qu;function Lp(){return Qu||(Qu=1,To=Number.isNaN||function(i){return i!==i}),To}var Eo,Ju;function Fp(){if(Ju)return Eo;Ju=1;var u=Lp();return Eo=function(c){return u(c)||c===0?c:c<0?-1:1},Eo}var So,Zu;function Bp(){return Zu||(Zu=1,So=Object.getOwnPropertyDescriptor),So}var No,Yu;function Dn(){if(Yu)return No;Yu=1;var u=Bp();if(u)try{u([],"length")}catch{u=null}return No=u,No}var bo,ea;function Ci(){if(ea)return bo;ea=1;var u=Object.defineProperty||!1;if(u)try{u({},"a",{value:1})}catch{u=!1}return bo=u,bo}var Co,ta;function jp(){if(ta)return Co;ta=1;var u=typeof Symbol<"u"&&Symbol,i=io();return Co=function(){return typeof u!="function"||typeof Symbol!="function"||typeof u("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:i()},Co}var Oo,ra;function na(){return ra||(ra=1,Oo=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Oo}var Ro,ia;function oa(){if(ia)return Ro;ia=1;var u=uo();return Ro=u.getPrototypeOf||null,Ro}var Po,sa;function Mp(){if(sa)return Po;sa=1;var u="Function.prototype.bind called on incompatible ",i=Object.prototype.toString,c=Math.max,h="[object Function]",p=function(t,s){for(var e=[],o=0;o<t.length;o+=1)e[o]=t[o];for(var l=0;l<s.length;l+=1)e[l+t.length]=s[l];return e},a=function(t,s){for(var e=[],o=s,l=0;o<t.length;o+=1,l+=1)e[l]=t[o];return e},r=function(n,t){for(var s="",e=0;e<n.length;e+=1)s+=n[e],e+1<n.length&&(s+=t);return s};return Po=function(t){var s=this;if(typeof s!="function"||i.apply(s)!==h)throw new TypeError(u+s);for(var e=a(arguments,1),o,l=function(){if(this instanceof o){var m=s.apply(this,p(e,arguments));return Object(m)===m?m:this}return s.apply(t,p(e,arguments))},f=c(0,s.length-e.length),d=[],g=0;g<f;g++)d[g]="$"+g;if(o=Function("binder","return function ("+r(d,",")+"){ return binder.apply(this,arguments); }")(l),s.prototype){var x=function(){};x.prototype=s.prototype,o.prototype=new x,x.prototype=null}return o},Po}var Do,ua;function qn(){if(ua)return Do;ua=1;var u=Mp();return Do=Function.prototype.bind||u,Do}var Io,aa;function wo(){return aa||(aa=1,Io=Function.prototype.call),Io}var Lo,la;function Fo(){return la||(la=1,Lo=Function.prototype.apply),Lo}var Bo,ca;function qp(){return ca||(ca=1,Bo=typeof Reflect<"u"&&Reflect&&Reflect.apply),Bo}var jo,fa;function ha(){if(fa)return jo;fa=1;var u=qn(),i=Fo(),c=wo(),h=qp();return jo=h||u.call(c,i),jo}var Mo,pa;function qo(){if(pa)return Mo;pa=1;var u=qn(),i=Mn(),c=wo(),h=ha();return Mo=function(a){if(a.length<1||typeof a[0]!="function")throw new i("a function is required");return h(u,c,a)},Mo}var ko,da;function kp(){if(da)return ko;da=1;var u=qo(),i=Dn(),c;try{c=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var h=!!c&&i&&i(Object.prototype,"__proto__"),p=Object,a=p.getPrototypeOf;return ko=h&&typeof h.get=="function"?u([h.get]):typeof a=="function"?function(n){return a(n==null?n:p(n))}:!1,ko}var Uo,xa;function zo(){if(xa)return Uo;xa=1;var u=na(),i=oa(),c=kp();return Uo=u?function(p){return u(p)}:i?function(p){if(!p||typeof p!="object"&&typeof p!="function")throw new TypeError("getProto: not an object");return i(p)}:c?function(p){return c(p)}:null,Uo}var Ho,ya;function _a(){if(ya)return Ho;ya=1;var u=Function.prototype.call,i=Object.prototype.hasOwnProperty,c=qn();return Ho=c.call(u,i),Ho}var Vo,ma;function Wo(){if(ma)return Vo;ma=1;var u,i=uo(),c=Ep(),h=Sp(),p=Np(),a=bp(),r=Uu(),n=Mn(),t=Cp(),s=Op(),e=Rp(),o=Pp(),l=Dp(),f=Ip(),d=wp(),g=Fp(),x=Function,m=function(I){try{return x('"use strict"; return ('+I+").constructor;")()}catch{}},y=Dn(),_=Ci(),v=function(){throw new n},N=y?(function(){try{return arguments.callee,v}catch{try{return y(arguments,"callee").get}catch{return v}}})():v,T=jp()(),b=zo(),O=oa(),D=na(),k=Fo(),z=wo(),U={},te=typeof Uint8Array>"u"||!b?u:b(Uint8Array),ie={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?u:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?u:ArrayBuffer,"%ArrayIteratorPrototype%":T&&b?b([][Symbol.iterator]()):u,"%AsyncFromSyncIteratorPrototype%":u,"%AsyncFunction%":U,"%AsyncGenerator%":U,"%AsyncGeneratorFunction%":U,"%AsyncIteratorPrototype%":U,"%Atomics%":typeof Atomics>"u"?u:Atomics,"%BigInt%":typeof BigInt>"u"?u:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?u:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?u:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?u:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":c,"%eval%":eval,"%EvalError%":h,"%Float16Array%":typeof Float16Array>"u"?u:Float16Array,"%Float32Array%":typeof Float32Array>"u"?u:Float32Array,"%Float64Array%":typeof Float64Array>"u"?u:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?u:FinalizationRegistry,"%Function%":x,"%GeneratorFunction%":U,"%Int8Array%":typeof Int8Array>"u"?u:Int8Array,"%Int16Array%":typeof Int16Array>"u"?u:Int16Array,"%Int32Array%":typeof Int32Array>"u"?u:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":T&&b?b(b([][Symbol.iterator]())):u,"%JSON%":typeof JSON=="object"?JSON:u,"%Map%":typeof Map>"u"?u:Map,"%MapIteratorPrototype%":typeof Map>"u"||!T||!b?u:b(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":i,"%Object.getOwnPropertyDescriptor%":y,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?u:Promise,"%Proxy%":typeof Proxy>"u"?u:Proxy,"%RangeError%":p,"%ReferenceError%":a,"%Reflect%":typeof Reflect>"u"?u:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?u:Set,"%SetIteratorPrototype%":typeof Set>"u"||!T||!b?u:b(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?u:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":T&&b?b(""[Symbol.iterator]()):u,"%Symbol%":T?Symbol:u,"%SyntaxError%":r,"%ThrowTypeError%":N,"%TypedArray%":te,"%TypeError%":n,"%Uint8Array%":typeof Uint8Array>"u"?u:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?u:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?u:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?u:Uint32Array,"%URIError%":t,"%WeakMap%":typeof WeakMap>"u"?u:WeakMap,"%WeakRef%":typeof WeakRef>"u"?u:WeakRef,"%WeakSet%":typeof WeakSet>"u"?u:WeakSet,"%Function.prototype.call%":z,"%Function.prototype.apply%":k,"%Object.defineProperty%":_,"%Object.getPrototypeOf%":O,"%Math.abs%":s,"%Math.floor%":e,"%Math.max%":o,"%Math.min%":l,"%Math.pow%":f,"%Math.round%":d,"%Math.sign%":g,"%Reflect.getPrototypeOf%":D};if(b)try{null.error}catch(I){var oe=b(b(I));ie["%Error.prototype%"]=oe}var he=function I(M){var W;if(M==="%AsyncFunction%")W=m("async function () {}");else if(M==="%GeneratorFunction%")W=m("function* () {}");else if(M==="%AsyncGeneratorFunction%")W=m("async function* () {}");else if(M==="%AsyncGenerator%"){var G=I("%AsyncGeneratorFunction%");G&&(W=G.prototype)}else if(M==="%AsyncIteratorPrototype%"){var w=I("%AsyncGenerator%");w&&b&&(W=b(w.prototype))}return ie[M]=W,W},Ee={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},le=qn(),Z=_a(),ee=le.call(z,Array.prototype.concat),J=le.call(k,Array.prototype.splice),F=le.call(z,String.prototype.replace),E=le.call(z,String.prototype.slice),A=le.call(z,RegExp.prototype.exec),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,C=/\\(\\)?/g,P=function(M){var W=E(M,0,1),G=E(M,-1);if(W==="%"&&G!=="%")throw new r("invalid intrinsic syntax, expected closing `%`");if(G==="%"&&W!=="%")throw new r("invalid intrinsic syntax, expected opening `%`");var w=[];return F(M,S,function(L,H,X,Y){w[w.length]=X?F(Y,C,"$1"):H||L}),w},R=function(M,W){var G=M,w;if(Z(Ee,G)&&(w=Ee[G],G="%"+w[0]+"%"),Z(ie,G)){var L=ie[G];if(L===U&&(L=he(G)),typeof L>"u"&&!W)throw new n("intrinsic "+M+" exists, but is not available. Please file an issue!");return{alias:w,name:G,value:L}}throw new r("intrinsic "+M+" does not exist!")};return Vo=function(M,W){if(typeof M!="string"||M.length===0)throw new n("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof W!="boolean")throw new n('"allowMissing" argument must be a boolean');if(A(/^%?[^%]*%?$/,M)===null)throw new r("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var G=P(M),w=G.length>0?G[0]:"",L=R("%"+w+"%",W),H=L.name,X=L.value,Y=!1,re=L.alias;re&&(w=re[0],J(G,ee([0,1],re)));for(var q=1,$=!0;q<G.length;q+=1){var se=G[q],me=E(se,0,1),ge=E(se,-1);if((me==='"'||me==="'"||me==="`"||ge==='"'||ge==="'"||ge==="`")&&me!==ge)throw new r("property names with quotes must have matching quotes");if((se==="constructor"||!$)&&(Y=!0),w+="."+se,H="%"+w+"%",Z(ie,H))X=ie[H];else if(X!=null){if(!(se in X)){if(!W)throw new n("base intrinsic for "+M+" exists, but the property is not available.");return}if(y&&q+1>=G.length){var B=y(X,se);$=!!B,$&&"get"in B&&!("originalValue"in B.get)?X=B.get:X=X[se]}else $=Z(X,se),X=X[se];$&&!Y&&(ie[H]=X)}}return X},Vo}var Go,ga;function In(){if(ga)return Go;ga=1;var u=Wo(),i=qo(),c=i([u("%String.prototype.indexOf%")]);return Go=function(p,a){var r=u(p,!!a);return typeof r=="function"&&c(p,".prototype.")>-1?i([r]):r},Go}var Xo,va;function Up(){if(va)return Xo;va=1;var u=bi()(),i=In(),c=i("Object.prototype.toString"),h=function(n){return u&&n&&typeof n=="object"&&Symbol.toStringTag in n?!1:c(n)==="[object Arguments]"},p=function(n){return h(n)?!0:n!==null&&typeof n=="object"&&"length"in n&&typeof n.length=="number"&&n.length>=0&&c(n)!=="[object Array]"&&"callee"in n&&c(n.callee)==="[object Function]"},a=(function(){return h(arguments)})();return h.isLegacyArguments=p,Xo=a?h:p,Xo}var $o,Aa;function zp(){if(Aa)return $o;Aa=1;var u=In(),i=bi()(),c=_a(),h=Dn(),p;if(i){var a=u("RegExp.prototype.exec"),r={},n=function(){throw r},t={toString:n,valueOf:n};typeof Symbol.toPrimitive=="symbol"&&(t[Symbol.toPrimitive]=n),p=function(l){if(!l||typeof l!="object")return!1;var f=h(l,"lastIndex"),d=f&&c(f,"value");if(!d)return!1;try{a(l,t)}catch(g){return g===r}}}else{var s=u("Object.prototype.toString"),e="[object RegExp]";p=function(l){return!l||typeof l!="object"&&typeof l!="function"?!1:s(l)===e}}return $o=p,$o}var Ko,Ta;function Hp(){if(Ta)return Ko;Ta=1;var u=In(),i=zp(),c=u("RegExp.prototype.exec"),h=Mn();return Ko=function(a){if(!i(a))throw new h("`regex` must be a RegExp");return function(n){return c(a,n)!==null}},Ko}var Qo,Ea;function Vp(){if(Ea)return Qo;Ea=1;const u=(function*(){}).constructor;return Qo=()=>u,Qo}var Jo,Sa;function Wp(){if(Sa)return Jo;Sa=1;var u=In(),i=Hp(),c=i(/^\s*(?:function)?\*/),h=bi()(),p=zo(),a=u("Object.prototype.toString"),r=u("Function.prototype.toString"),n=Vp();return Jo=function(s){if(typeof s!="function")return!1;if(c(r(s)))return!0;if(!h){var e=a(s);return e==="[object GeneratorFunction]"}if(!p)return!1;var o=n();return o&&p(s)===o.prototype},Jo}var Zo,Na;function Gp(){if(Na)return Zo;Na=1;var u=Function.prototype.toString,i=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,c,h;if(typeof i=="function"&&typeof Object.defineProperty=="function")try{c=Object.defineProperty({},"length",{get:function(){throw h}}),h={},i(function(){throw 42},null,c)}catch(y){y!==h&&(i=null)}else i=null;var p=/^\s*class\b/,a=function(_){try{var v=u.call(_);return p.test(v)}catch{return!1}},r=function(_){try{return a(_)?!1:(u.call(_),!0)}catch{return!1}},n=Object.prototype.toString,t="[object Object]",s="[object Function]",e="[object GeneratorFunction]",o="[object HTMLAllCollection]",l="[object HTML document.all class]",f="[object HTMLCollection]",d=typeof Symbol=="function"&&!!Symbol.toStringTag,g=!(0 in[,]),x=function(){return!1};if(typeof document=="object"){var m=document.all;n.call(m)===n.call(document.all)&&(x=function(_){if((g||!_)&&(typeof _>"u"||typeof _=="object"))try{var v=n.call(_);return(v===o||v===l||v===f||v===t)&&_("")==null}catch{}return!1})}return Zo=i?function(_){if(x(_))return!0;if(!_||typeof _!="function"&&typeof _!="object")return!1;try{i(_,null,c)}catch(v){if(v!==h)return!1}return!a(_)&&r(_)}:function(_){if(x(_))return!0;if(!_||typeof _!="function"&&typeof _!="object")return!1;if(d)return r(_);if(a(_))return!1;var v=n.call(_);return v!==s&&v!==e&&!/^\[object HTML/.test(v)?!1:r(_)},Zo}var Yo,ba;function Xp(){if(ba)return Yo;ba=1;var u=Gp(),i=Object.prototype.toString,c=Object.prototype.hasOwnProperty,h=function(t,s,e){for(var o=0,l=t.length;o<l;o++)c.call(t,o)&&(e==null?s(t[o],o,t):s.call(e,t[o],o,t))},p=function(t,s,e){for(var o=0,l=t.length;o<l;o++)e==null?s(t.charAt(o),o,t):s.call(e,t.charAt(o),o,t)},a=function(t,s,e){for(var o in t)c.call(t,o)&&(e==null?s(t[o],o,t):s.call(e,t[o],o,t))};function r(n){return i.call(n)==="[object Array]"}return Yo=function(t,s,e){if(!u(s))throw new TypeError("iterator must be a function");var o;arguments.length>=3&&(o=e),r(t)?h(t,s,o):typeof t=="string"?p(t,s,o):a(t,s,o)},Yo}var es,Ca;function $p(){return Ca||(Ca=1,es=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),es}var ts,Oa;function Kp(){if(Oa)return ts;Oa=1;var u=$p(),i=typeof globalThis>"u"?Rn:globalThis;return ts=function(){for(var h=[],p=0;p<u.length;p++)typeof i[u[p]]=="function"&&(h[h.length]=u[p]);return h},ts}var rs={exports:{}},ns,Ra;function Pa(){if(Ra)return ns;Ra=1;var u=Ci(),i=Uu(),c=Mn(),h=Dn();return ns=function(a,r,n){if(!a||typeof a!="object"&&typeof a!="function")throw new c("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new c("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new c("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new c("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new c("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new c("`loose`, if provided, must be a boolean");var t=arguments.length>3?arguments[3]:null,s=arguments.length>4?arguments[4]:null,e=arguments.length>5?arguments[5]:null,o=arguments.length>6?arguments[6]:!1,l=!!h&&h(a,r);if(u)u(a,r,{configurable:e===null&&l?l.configurable:!e,enumerable:t===null&&l?l.enumerable:!t,value:n,writable:s===null&&l?l.writable:!s});else if(o||!t&&!s&&!e)a[r]=n;else throw new i("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},ns}var is,Da;function Ia(){if(Da)return is;Da=1;var u=Ci(),i=function(){return!!u};return i.hasArrayLengthDefineBug=function(){if(!u)return null;try{return u([],"length",{value:1}).length!==1}catch{return!0}},is=i,is}var os,wa;function Qp(){if(wa)return os;wa=1;var u=Wo(),i=Pa(),c=Ia()(),h=Dn(),p=Mn(),a=u("%Math.floor%");return os=function(n,t){if(typeof n!="function")throw new p("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||a(t)!==t)throw new p("`length` must be a positive 32-bit integer");var s=arguments.length>2&&!!arguments[2],e=!0,o=!0;if("length"in n&&h){var l=h(n,"length");l&&!l.configurable&&(e=!1),l&&!l.writable&&(o=!1)}return(e||o||!s)&&(c?i(n,"length",t,!0,!0):i(n,"length",t)),n},os}var ss,La;function Jp(){if(La)return ss;La=1;var u=qn(),i=Fo(),c=ha();return ss=function(){return c(u,i,arguments)},ss}var Fa;function Oi(){return Fa||(Fa=1,(function(u){var i=Qp(),c=Ci(),h=qo(),p=Jp();u.exports=function(r){var n=h(arguments),t=r.length-(arguments.length-1);return i(n,1+(t>0?t:0),!0)},c?c(u.exports,"apply",{value:p}):u.exports.apply=p})(rs)),rs.exports}var us,Ba;function ja(){if(Ba)return us;Ba=1;var u=Xp(),i=Kp(),c=Oi(),h=In(),p=Dn(),a=zo(),r=h("Object.prototype.toString"),n=bi()(),t=typeof globalThis>"u"?Rn:globalThis,s=i(),e=h("String.prototype.slice"),o=h("Array.prototype.indexOf",!0)||function(x,m){for(var y=0;y<x.length;y+=1)if(x[y]===m)return y;return-1},l={__proto__:null};n&&p&&a?u(s,function(g){var x=new t[g];if(Symbol.toStringTag in x&&a){var m=a(x),y=p(m,Symbol.toStringTag);if(!y&&m){var _=a(m);y=p(_,Symbol.toStringTag)}l["$"+g]=c(y.get)}}):u(s,function(g){var x=new t[g],m=x.slice||x.set;m&&(l["$"+g]=c(m))});var f=function(x){var m=!1;return u(l,function(y,_){if(!m)try{"$"+y(x)===_&&(m=e(_,1))}catch{}}),m},d=function(x){var m=!1;return u(l,function(y,_){if(!m)try{y(x),m=e(_,1)}catch{}}),m};return us=function(x){if(!x||typeof x!="object")return!1;if(!n){var m=e(r(x),8,-1);return o(s,m)>-1?m:m!=="Object"?!1:d(x)}return p?f(x):null},us}var as,Ma;function Zp(){if(Ma)return as;Ma=1;var u=ja();return as=function(c){return!!u(c)},as}var qa;function Yp(){return qa||(qa=1,(function(u){var i=Up(),c=Wp(),h=ja(),p=Zp();function a(q){return q.call.bind(q)}var r=typeof BigInt<"u",n=typeof Symbol<"u",t=a(Object.prototype.toString),s=a(Number.prototype.valueOf),e=a(String.prototype.valueOf),o=a(Boolean.prototype.valueOf);if(r)var l=a(BigInt.prototype.valueOf);if(n)var f=a(Symbol.prototype.valueOf);function d(q,$){if(typeof q!="object")return!1;try{return $(q),!0}catch{return!1}}u.isArgumentsObject=i,u.isGeneratorFunction=c,u.isTypedArray=p;function g(q){return typeof Promise<"u"&&q instanceof Promise||q!==null&&typeof q=="object"&&typeof q.then=="function"&&typeof q.catch=="function"}u.isPromise=g;function x(q){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(q):p(q)||E(q)}u.isArrayBufferView=x;function m(q){return h(q)==="Uint8Array"}u.isUint8Array=m;function y(q){return h(q)==="Uint8ClampedArray"}u.isUint8ClampedArray=y;function _(q){return h(q)==="Uint16Array"}u.isUint16Array=_;function v(q){return h(q)==="Uint32Array"}u.isUint32Array=v;function N(q){return h(q)==="Int8Array"}u.isInt8Array=N;function T(q){return h(q)==="Int16Array"}u.isInt16Array=T;function b(q){return h(q)==="Int32Array"}u.isInt32Array=b;function O(q){return h(q)==="Float32Array"}u.isFloat32Array=O;function D(q){return h(q)==="Float64Array"}u.isFloat64Array=D;function k(q){return h(q)==="BigInt64Array"}u.isBigInt64Array=k;function z(q){return h(q)==="BigUint64Array"}u.isBigUint64Array=z;function U(q){return t(q)==="[object Map]"}U.working=typeof Map<"u"&&U(new Map);function te(q){return typeof Map>"u"?!1:U.working?U(q):q instanceof Map}u.isMap=te;function ie(q){return t(q)==="[object Set]"}ie.working=typeof Set<"u"&&ie(new Set);function oe(q){return typeof Set>"u"?!1:ie.working?ie(q):q instanceof Set}u.isSet=oe;function he(q){return t(q)==="[object WeakMap]"}he.working=typeof WeakMap<"u"&&he(new WeakMap);function Ee(q){return typeof WeakMap>"u"?!1:he.working?he(q):q instanceof WeakMap}u.isWeakMap=Ee;function le(q){return t(q)==="[object WeakSet]"}le.working=typeof WeakSet<"u"&&le(new WeakSet);function Z(q){return le(q)}u.isWeakSet=Z;function ee(q){return t(q)==="[object ArrayBuffer]"}ee.working=typeof ArrayBuffer<"u"&&ee(new ArrayBuffer);function J(q){return typeof ArrayBuffer>"u"?!1:ee.working?ee(q):q instanceof ArrayBuffer}u.isArrayBuffer=J;function F(q){return t(q)==="[object DataView]"}F.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&F(new DataView(new ArrayBuffer(1),0,1));function E(q){return typeof DataView>"u"?!1:F.working?F(q):q instanceof DataView}u.isDataView=E;var A=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function S(q){return t(q)==="[object SharedArrayBuffer]"}function C(q){return typeof A>"u"?!1:(typeof S.working>"u"&&(S.working=S(new A)),S.working?S(q):q instanceof A)}u.isSharedArrayBuffer=C;function P(q){return t(q)==="[object AsyncFunction]"}u.isAsyncFunction=P;function R(q){return t(q)==="[object Map Iterator]"}u.isMapIterator=R;function I(q){return t(q)==="[object Set Iterator]"}u.isSetIterator=I;function M(q){return t(q)==="[object Generator]"}u.isGeneratorObject=M;function W(q){return t(q)==="[object WebAssembly.Module]"}u.isWebAssemblyCompiledModule=W;function G(q){return d(q,s)}u.isNumberObject=G;function w(q){return d(q,e)}u.isStringObject=w;function L(q){return d(q,o)}u.isBooleanObject=L;function H(q){return r&&d(q,l)}u.isBigIntObject=H;function X(q){return n&&d(q,f)}u.isSymbolObject=X;function Y(q){return G(q)||w(q)||L(q)||H(q)||X(q)}u.isBoxedPrimitive=Y;function re(q){return typeof Uint8Array<"u"&&(J(q)||C(q))}u.isAnyArrayBuffer=re,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(q){Object.defineProperty(u,q,{enumerable:!1,value:function(){throw new Error(q+" is not supported in userland")}})})})(ro)),ro}var ls,ka;function e0(){return ka||(ka=1,ls=function(i){return i&&typeof i=="object"&&typeof i.copy=="function"&&typeof i.fill=="function"&&typeof i.readUInt8=="function"}),ls}var Ri={exports:{}},Ua;function t0(){return Ua||(Ua=1,typeof Object.create=="function"?Ri.exports=function(i,c){c&&(i.super_=c,i.prototype=Object.create(c.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}))}:Ri.exports=function(i,c){if(c){i.super_=c;var h=function(){};h.prototype=c.prototype,i.prototype=new h,i.prototype.constructor=i}}),Ri.exports}var za;function wn(){return za||(za=1,(function(u){var i=Object.getOwnPropertyDescriptors||function(E){for(var A=Object.keys(E),S={},C=0;C<A.length;C++)S[A[C]]=Object.getOwnPropertyDescriptor(E,A[C]);return S},c=/%[sdj%]/g;u.format=function(F){if(!N(F)){for(var E=[],A=0;A<arguments.length;A++)E.push(r(arguments[A]));return E.join(" ")}for(var A=1,S=arguments,C=S.length,P=String(F).replace(c,function(I){if(I==="%%")return"%";if(A>=C)return I;switch(I){case"%s":return String(S[A++]);case"%d":return Number(S[A++]);case"%j":try{return JSON.stringify(S[A++])}catch{return"[Circular]"}default:return I}}),R=S[A];A<C;R=S[++A])y(R)||!D(R)?P+=" "+R:P+=" "+r(R);return P},u.deprecate=function(F,E){if(typeof be<"u"&&be.noDeprecation===!0)return F;if(typeof be>"u")return function(){return u.deprecate(F,E).apply(this,arguments)};var A=!1;function S(){if(!A){if(be.throwDeprecation)throw new Error(E);be.traceDeprecation?console.trace(E):console.error(E),A=!0}return F.apply(this,arguments)}return S};var h={},p=/^$/;if(be.env.NODE_DEBUG){var a=be.env.NODE_DEBUG;a=a.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),p=new RegExp("^"+a+"$","i")}u.debuglog=function(F){if(F=F.toUpperCase(),!h[F])if(p.test(F)){var E=be.pid;h[F]=function(){var A=u.format.apply(u,arguments);console.error("%s %d: %s",F,E,A)}}else h[F]=function(){};return h[F]};function r(F,E){var A={seen:[],stylize:t};return arguments.length>=3&&(A.depth=arguments[2]),arguments.length>=4&&(A.colors=arguments[3]),m(E)?A.showHidden=E:E&&u._extend(A,E),b(A.showHidden)&&(A.showHidden=!1),b(A.depth)&&(A.depth=2),b(A.colors)&&(A.colors=!1),b(A.customInspect)&&(A.customInspect=!0),A.colors&&(A.stylize=n),e(A,F,A.depth)}u.inspect=r,r.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},r.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function n(F,E){var A=r.styles[E];return A?"\x1B["+r.colors[A][0]+"m"+F+"\x1B["+r.colors[A][1]+"m":F}function t(F,E){return F}function s(F){var E={};return F.forEach(function(A,S){E[A]=!0}),E}function e(F,E,A){if(F.customInspect&&E&&U(E.inspect)&&E.inspect!==u.inspect&&!(E.constructor&&E.constructor.prototype===E)){var S=E.inspect(A,F);return N(S)||(S=e(F,S,A)),S}var C=o(F,E);if(C)return C;var P=Object.keys(E),R=s(P);if(F.showHidden&&(P=Object.getOwnPropertyNames(E)),z(E)&&(P.indexOf("message")>=0||P.indexOf("description")>=0))return l(E);if(P.length===0){if(U(E)){var I=E.name?": "+E.name:"";return F.stylize("[Function"+I+"]","special")}if(O(E))return F.stylize(RegExp.prototype.toString.call(E),"regexp");if(k(E))return F.stylize(Date.prototype.toString.call(E),"date");if(z(E))return l(E)}var M="",W=!1,G=["{","}"];if(x(E)&&(W=!0,G=["[","]"]),U(E)){var w=E.name?": "+E.name:"";M=" [Function"+w+"]"}if(O(E)&&(M=" "+RegExp.prototype.toString.call(E)),k(E)&&(M=" "+Date.prototype.toUTCString.call(E)),z(E)&&(M=" "+l(E)),P.length===0&&(!W||E.length==0))return G[0]+M+G[1];if(A<0)return O(E)?F.stylize(RegExp.prototype.toString.call(E),"regexp"):F.stylize("[Object]","special");F.seen.push(E);var L;return W?L=f(F,E,A,R,P):L=P.map(function(H){return d(F,E,A,R,H,W)}),F.seen.pop(),g(L,M,G)}function o(F,E){if(b(E))return F.stylize("undefined","undefined");if(N(E)){var A="'"+JSON.stringify(E).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return F.stylize(A,"string")}if(v(E))return F.stylize(""+E,"number");if(m(E))return F.stylize(""+E,"boolean");if(y(E))return F.stylize("null","null")}function l(F){return"["+Error.prototype.toString.call(F)+"]"}function f(F,E,A,S,C){for(var P=[],R=0,I=E.length;R<I;++R)le(E,String(R))?P.push(d(F,E,A,S,String(R),!0)):P.push("");return C.forEach(function(M){M.match(/^\d+$/)||P.push(d(F,E,A,S,M,!0))}),P}function d(F,E,A,S,C,P){var R,I,M;if(M=Object.getOwnPropertyDescriptor(E,C)||{value:E[C]},M.get?M.set?I=F.stylize("[Getter/Setter]","special"):I=F.stylize("[Getter]","special"):M.set&&(I=F.stylize("[Setter]","special")),le(S,C)||(R="["+C+"]"),I||(F.seen.indexOf(M.value)<0?(y(A)?I=e(F,M.value,null):I=e(F,M.value,A-1),I.indexOf(`
|
|
8
2
|
`)>-1&&(P?I=I.split(`
|
|
9
|
-
`).map(function(
|
|
3
|
+
`).map(function(W){return" "+W}).join(`
|
|
10
4
|
`).slice(2):I=`
|
|
11
5
|
`+I.split(`
|
|
12
|
-
`).map(function(
|
|
13
|
-
`))):I=
|
|
6
|
+
`).map(function(W){return" "+W}).join(`
|
|
7
|
+
`))):I=F.stylize("[Circular]","special")),b(R)){if(P&&C.match(/^\d+$/))return I;R=JSON.stringify(""+C),R.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(R=R.slice(1,-1),R=F.stylize(R,"name")):(R=R.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),R=F.stylize(R,"string"))}return R+": "+I}function g(F,E,A){var S=F.reduce(function(C,P){return P.indexOf(`
|
|
14
8
|
`)>=0,C+P.replace(/\u001b\[\d\d?m/g,"").length+1},0);return S>60?A[0]+(E===""?"":E+`
|
|
15
|
-
`)+" "+
|
|
16
|
-
`)+" "+A[1]:A[0]+E+" "+B.join(", ")+" "+A[1]}u.types=Zp();function x(B){return Array.isArray(B)}u.isArray=x;function m(B){return typeof B=="boolean"}u.isBoolean=m;function y(B){return B===null}u.isNull=y;function _(B){return B==null}u.isNullOrUndefined=_;function v(B){return typeof B=="number"}u.isNumber=v;function N(B){return typeof B=="string"}u.isString=N;function T(B){return typeof B=="symbol"}u.isSymbol=T;function b(B){return B===void 0}u.isUndefined=b;function O(B){return D(B)&&oe(B)==="[object RegExp]"}u.isRegExp=O,u.types.isRegExp=O;function D(B){return typeof B=="object"&&B!==null}u.isObject=D;function k(B){return D(B)&&oe(B)==="[object Date]"}u.isDate=k,u.types.isDate=k;function z(B){return D(B)&&(oe(B)==="[object Error]"||B instanceof Error)}u.isError=z,u.types.isNativeError=z;function U(B){return typeof B=="function"}u.isFunction=U;function re(B){return B===null||typeof B=="boolean"||typeof B=="number"||typeof B=="string"||typeof B=="symbol"||typeof B>"u"}u.isPrimitive=re,u.isBuffer=e0();function oe(B){return Object.prototype.toString.call(B)}function se(B){return B<10?"0"+B.toString(10):B.toString(10)}var de=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function be(){var B=new Date,E=[se(B.getHours()),se(B.getMinutes()),se(B.getSeconds())].join(":");return[B.getDate(),de[B.getMonth()],E].join(" ")}u.log=function(){console.log("%s - %s",be(),u.format.apply(u,arguments))},u.inherits=t0(),u._extend=function(B,E){if(!E||!D(E))return B;for(var A=Object.keys(E),S=A.length;S--;)B[A[S]]=E[A[S]];return B};function fe(B,E){return Object.prototype.hasOwnProperty.call(B,E)}var Z=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;u.promisify=function(E){if(typeof E!="function")throw new TypeError('The "original" argument must be of type Function');if(Z&&E[Z]){var A=E[Z];if(typeof A!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(A,Z,{value:A,enumerable:!1,writable:!1,configurable:!0}),A}function A(){for(var S,C,P=new Promise(function(M,V){S=M,C=V}),R=[],I=0;I<arguments.length;I++)R.push(arguments[I]);R.push(function(M,V){M?C(M):S(V)});try{E.apply(this,R)}catch(M){C(M)}return P}return Object.setPrototypeOf(A,Object.getPrototypeOf(E)),Z&&Object.defineProperty(A,Z,{value:A,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(A,i(E))},u.promisify.custom=Z;function te(B,E){if(!B){var A=new Error("Promise was rejected with a falsy value");A.reason=B,B=A}return E(B)}function J(B){if(typeof B!="function")throw new TypeError('The "original" argument must be of type Function');function E(){for(var A=[],S=0;S<arguments.length;S++)A.push(arguments[S]);var C=A.pop();if(typeof C!="function")throw new TypeError("The last argument must be of type Function");var P=this,R=function(){return C.apply(P,arguments)};B.apply(this,A).then(function(I){Re.nextTick(R.bind(null,null,I))},function(I){Re.nextTick(te.bind(null,I,R))})}return Object.setPrototypeOf(E,Object.getPrototypeOf(B)),Object.defineProperties(E,i(B)),E}u.callbackify=J}(io)),io}var $a;function Va(){if($a)return no;$a=1;function u(y){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},u(y)}function i(y,_,v){return Object.defineProperty(y,"prototype",{writable:!1}),y}function c(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function h(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),Object.defineProperty(y,"prototype",{writable:!1}),_&&p(y,_)}function p(y,_){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,T){return N.__proto__=T,N},p(y,_)}function a(y){var _=t();return function(){var N=s(y),T;if(_){var b=s(this).constructor;T=Reflect.construct(N,arguments,b)}else T=N.apply(this,arguments);return r(this,T)}}function r(y,_){if(_&&(u(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(y)}function n(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function s(y){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},s(y)}var e={},o,l;function f(y,_,v){v||(v=Error);function N(b,O,D){return typeof _=="string"?_:_(b,O,D)}var T=function(b){h(D,b);var O=a(D);function D(k,z,U){var re;return c(this,D),re=O.call(this,N(k,z,U)),re.code=y,re}return i(D)}(v);e[y]=T}function d(y,_){if(Array.isArray(y)){var v=y.length;return y=y.map(function(N){return String(N)}),v>2?"one of ".concat(_," ").concat(y.slice(0,v-1).join(", "),", or ")+y[v-1]:v===2?"one of ".concat(_," ").concat(y[0]," or ").concat(y[1]):"of ".concat(_," ").concat(y[0])}else return"of ".concat(_," ").concat(String(y))}function g(y,_,v){return y.substr(0,_.length)===_}function x(y,_,v){return(v===void 0||v>y.length)&&(v=y.length),y.substring(v-_.length,v)===_}function m(y,_,v){return typeof v!="number"&&(v=0),v+_.length>y.length?!1:y.indexOf(_,v)!==-1}return f("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),f("ERR_INVALID_ARG_TYPE",function(y,_,v){o===void 0&&(o=Me()),o(typeof y=="string","'name' must be a string");var N;typeof _=="string"&&g(_,"not ")?(N="must not be",_=_.replace(/^not /,"")):N="must be";var T;if(x(y," argument"))T="The ".concat(y," ").concat(N," ").concat(d(_,"type"));else{var b=m(y,".")?"property":"argument";T='The "'.concat(y,'" ').concat(b," ").concat(N," ").concat(d(_,"type"))}return T+=". Received type ".concat(u(v)),T},TypeError),f("ERR_INVALID_ARG_VALUE",function(y,_){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";l===void 0&&(l=Fn());var N=l.inspect(_);return N.length>128&&(N="".concat(N.slice(0,128),"...")),"The argument '".concat(y,"' ").concat(v,". Received ").concat(N)},TypeError),f("ERR_INVALID_RETURN_VALUE",function(y,_,v){var N;return v&&v.constructor&&v.constructor.name?N="instance of ".concat(v.constructor.name):N="type ".concat(u(v)),"Expected ".concat(y,' to be returned from the "').concat(_,'"')+" function but got ".concat(N,".")},TypeError),f("ERR_MISSING_ARGS",function(){for(var y=arguments.length,_=new Array(y),v=0;v<y;v++)_[v]=arguments[v];o===void 0&&(o=Me()),o(_.length>0,"At least one arg needs to be specified");var N="The ",T=_.length;switch(_=_.map(function(b){return'"'.concat(b,'"')}),T){case 1:N+="".concat(_[0]," argument");break;case 2:N+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:N+=_.slice(0,T-1).join(", "),N+=", and ".concat(_[T-1]," arguments");break}return"".concat(N," must be specified")},TypeError),no.codes=e,no}var hs,Wa;function r0(){if(Wa)return hs;Wa=1;function u(Z,te){var J=Object.keys(Z);if(Object.getOwnPropertySymbols){var B=Object.getOwnPropertySymbols(Z);te&&(B=B.filter(function(E){return Object.getOwnPropertyDescriptor(Z,E).enumerable})),J.push.apply(J,B)}return J}function i(Z){for(var te=1;te<arguments.length;te++){var J=arguments[te]!=null?arguments[te]:{};te%2?u(Object(J),!0).forEach(function(B){c(Z,B,J[B])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(J)):u(Object(J)).forEach(function(B){Object.defineProperty(Z,B,Object.getOwnPropertyDescriptor(J,B))})}return Z}function c(Z,te,J){return te=r(te),te in Z?Object.defineProperty(Z,te,{value:J,enumerable:!0,configurable:!0,writable:!0}):Z[te]=J,Z}function h(Z,te){if(!(Z instanceof te))throw new TypeError("Cannot call a class as a function")}function p(Z,te){for(var J=0;J<te.length;J++){var B=te[J];B.enumerable=B.enumerable||!1,B.configurable=!0,"value"in B&&(B.writable=!0),Object.defineProperty(Z,r(B.key),B)}}function a(Z,te,J){return te&&p(Z.prototype,te),Object.defineProperty(Z,"prototype",{writable:!1}),Z}function r(Z){var te=n(Z,"string");return y(te)==="symbol"?te:String(te)}function n(Z,te){if(y(Z)!=="object"||Z===null)return Z;var J=Z[Symbol.toPrimitive];if(J!==void 0){var B=J.call(Z,te);if(y(B)!=="object")return B;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Z)}function t(Z,te){if(typeof te!="function"&&te!==null)throw new TypeError("Super expression must either be null or a function");Z.prototype=Object.create(te&&te.prototype,{constructor:{value:Z,writable:!0,configurable:!0}}),Object.defineProperty(Z,"prototype",{writable:!1}),te&&x(Z,te)}function s(Z){var te=d();return function(){var B=m(Z),E;if(te){var A=m(this).constructor;E=Reflect.construct(B,arguments,A)}else E=B.apply(this,arguments);return e(this,E)}}function e(Z,te){if(te&&(y(te)==="object"||typeof te=="function"))return te;if(te!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o(Z)}function o(Z){if(Z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Z}function l(Z){var te=typeof Map=="function"?new Map:void 0;return l=function(B){if(B===null||!g(B))return B;if(typeof B!="function")throw new TypeError("Super expression must either be null or a function");if(typeof te<"u"){if(te.has(B))return te.get(B);te.set(B,E)}function E(){return f(B,arguments,m(this).constructor)}return E.prototype=Object.create(B.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),x(E,B)},l(Z)}function f(Z,te,J){return d()?f=Reflect.construct.bind():f=function(E,A,S){var C=[null];C.push.apply(C,A);var P=Function.bind.apply(E,C),R=new P;return S&&x(R,S.prototype),R},f.apply(null,arguments)}function d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function g(Z){return Function.toString.call(Z).indexOf("[native code]")!==-1}function x(Z,te){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(B,E){return B.__proto__=E,B},x(Z,te)}function m(Z){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(J){return J.__proto__||Object.getPrototypeOf(J)},m(Z)}function y(Z){"@babel/helpers - typeof";return y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(te){return typeof te}:function(te){return te&&typeof Symbol=="function"&&te.constructor===Symbol&&te!==Symbol.prototype?"symbol":typeof te},y(Z)}var _=Fn(),v=_.inspect,N=Va(),T=N.codes.ERR_INVALID_ARG_TYPE;function b(Z,te,J){return(J===void 0||J>Z.length)&&(J=Z.length),Z.substring(J-te.length,J)===te}function O(Z,te){if(te=Math.floor(te),Z.length==0||te==0)return"";var J=Z.length*te;for(te=Math.floor(Math.log(te)/Math.log(2));te;)Z+=Z,te--;return Z+=Z.substring(0,J-Z.length),Z}var D="",k="",z="",U="",re={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},oe=10;function se(Z){var te=Object.keys(Z),J=Object.create(Object.getPrototypeOf(Z));return te.forEach(function(B){J[B]=Z[B]}),Object.defineProperty(J,"message",{value:Z.message}),J}function de(Z){return v(Z,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function be(Z,te,J){var B="",E="",A=0,S="",C=!1,P=de(Z),R=P.split(`
|
|
17
|
-
`),I=
|
|
18
|
-
`),M=0,
|
|
9
|
+
`)+" "+F.join(`,
|
|
10
|
+
`)+" "+A[1]:A[0]+E+" "+F.join(", ")+" "+A[1]}u.types=Yp();function x(F){return Array.isArray(F)}u.isArray=x;function m(F){return typeof F=="boolean"}u.isBoolean=m;function y(F){return F===null}u.isNull=y;function _(F){return F==null}u.isNullOrUndefined=_;function v(F){return typeof F=="number"}u.isNumber=v;function N(F){return typeof F=="string"}u.isString=N;function T(F){return typeof F=="symbol"}u.isSymbol=T;function b(F){return F===void 0}u.isUndefined=b;function O(F){return D(F)&&ie(F)==="[object RegExp]"}u.isRegExp=O,u.types.isRegExp=O;function D(F){return typeof F=="object"&&F!==null}u.isObject=D;function k(F){return D(F)&&ie(F)==="[object Date]"}u.isDate=k,u.types.isDate=k;function z(F){return D(F)&&(ie(F)==="[object Error]"||F instanceof Error)}u.isError=z,u.types.isNativeError=z;function U(F){return typeof F=="function"}u.isFunction=U;function te(F){return F===null||typeof F=="boolean"||typeof F=="number"||typeof F=="string"||typeof F=="symbol"||typeof F>"u"}u.isPrimitive=te,u.isBuffer=e0();function ie(F){return Object.prototype.toString.call(F)}function oe(F){return F<10?"0"+F.toString(10):F.toString(10)}var he=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Ee(){var F=new Date,E=[oe(F.getHours()),oe(F.getMinutes()),oe(F.getSeconds())].join(":");return[F.getDate(),he[F.getMonth()],E].join(" ")}u.log=function(){console.log("%s - %s",Ee(),u.format.apply(u,arguments))},u.inherits=t0(),u._extend=function(F,E){if(!E||!D(E))return F;for(var A=Object.keys(E),S=A.length;S--;)F[A[S]]=E[A[S]];return F};function le(F,E){return Object.prototype.hasOwnProperty.call(F,E)}var Z=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;u.promisify=function(E){if(typeof E!="function")throw new TypeError('The "original" argument must be of type Function');if(Z&&E[Z]){var A=E[Z];if(typeof A!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(A,Z,{value:A,enumerable:!1,writable:!1,configurable:!0}),A}function A(){for(var S,C,P=new Promise(function(M,W){S=M,C=W}),R=[],I=0;I<arguments.length;I++)R.push(arguments[I]);R.push(function(M,W){M?C(M):S(W)});try{E.apply(this,R)}catch(M){C(M)}return P}return Object.setPrototypeOf(A,Object.getPrototypeOf(E)),Z&&Object.defineProperty(A,Z,{value:A,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(A,i(E))},u.promisify.custom=Z;function ee(F,E){if(!F){var A=new Error("Promise was rejected with a falsy value");A.reason=F,F=A}return E(F)}function J(F){if(typeof F!="function")throw new TypeError('The "original" argument must be of type Function');function E(){for(var A=[],S=0;S<arguments.length;S++)A.push(arguments[S]);var C=A.pop();if(typeof C!="function")throw new TypeError("The last argument must be of type Function");var P=this,R=function(){return C.apply(P,arguments)};F.apply(this,A).then(function(I){be.nextTick(R.bind(null,null,I))},function(I){be.nextTick(ee.bind(null,I,R))})}return Object.setPrototypeOf(E,Object.getPrototypeOf(F)),Object.defineProperties(E,i(F)),E}u.callbackify=J})(to)),to}var Ha;function Va(){if(Ha)return eo;Ha=1;function u(y){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(_){return typeof _}:function(_){return _&&typeof Symbol=="function"&&_.constructor===Symbol&&_!==Symbol.prototype?"symbol":typeof _},u(y)}function i(y,_,v){return Object.defineProperty(y,"prototype",{writable:!1}),y}function c(y,_){if(!(y instanceof _))throw new TypeError("Cannot call a class as a function")}function h(y,_){if(typeof _!="function"&&_!==null)throw new TypeError("Super expression must either be null or a function");y.prototype=Object.create(_&&_.prototype,{constructor:{value:y,writable:!0,configurable:!0}}),Object.defineProperty(y,"prototype",{writable:!1}),_&&p(y,_)}function p(y,_){return p=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(N,T){return N.__proto__=T,N},p(y,_)}function a(y){var _=t();return function(){var N=s(y),T;if(_){var b=s(this).constructor;T=Reflect.construct(N,arguments,b)}else T=N.apply(this,arguments);return r(this,T)}}function r(y,_){if(_&&(u(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(y)}function n(y){if(y===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return y}function t(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function s(y){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(v){return v.__proto__||Object.getPrototypeOf(v)},s(y)}var e={},o,l;function f(y,_,v){v||(v=Error);function N(b,O,D){return typeof _=="string"?_:_(b,O,D)}var T=(function(b){h(D,b);var O=a(D);function D(k,z,U){var te;return c(this,D),te=O.call(this,N(k,z,U)),te.code=y,te}return i(D)})(v);e[y]=T}function d(y,_){if(Array.isArray(y)){var v=y.length;return y=y.map(function(N){return String(N)}),v>2?"one of ".concat(_," ").concat(y.slice(0,v-1).join(", "),", or ")+y[v-1]:v===2?"one of ".concat(_," ").concat(y[0]," or ").concat(y[1]):"of ".concat(_," ").concat(y[0])}else return"of ".concat(_," ").concat(String(y))}function g(y,_,v){return y.substr(0,_.length)===_}function x(y,_,v){return(v===void 0||v>y.length)&&(v=y.length),y.substring(v-_.length,v)===_}function m(y,_,v){return typeof v!="number"&&(v=0),v+_.length>y.length?!1:y.indexOf(_,v)!==-1}return f("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),f("ERR_INVALID_ARG_TYPE",function(y,_,v){o===void 0&&(o=Fe()),o(typeof y=="string","'name' must be a string");var N;typeof _=="string"&&g(_,"not ")?(N="must not be",_=_.replace(/^not /,"")):N="must be";var T;if(x(y," argument"))T="The ".concat(y," ").concat(N," ").concat(d(_,"type"));else{var b=m(y,".")?"property":"argument";T='The "'.concat(y,'" ').concat(b," ").concat(N," ").concat(d(_,"type"))}return T+=". Received type ".concat(u(v)),T},TypeError),f("ERR_INVALID_ARG_VALUE",function(y,_){var v=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";l===void 0&&(l=wn());var N=l.inspect(_);return N.length>128&&(N="".concat(N.slice(0,128),"...")),"The argument '".concat(y,"' ").concat(v,". Received ").concat(N)},TypeError),f("ERR_INVALID_RETURN_VALUE",function(y,_,v){var N;return v&&v.constructor&&v.constructor.name?N="instance of ".concat(v.constructor.name):N="type ".concat(u(v)),"Expected ".concat(y,' to be returned from the "').concat(_,'"')+" function but got ".concat(N,".")},TypeError),f("ERR_MISSING_ARGS",function(){for(var y=arguments.length,_=new Array(y),v=0;v<y;v++)_[v]=arguments[v];o===void 0&&(o=Fe()),o(_.length>0,"At least one arg needs to be specified");var N="The ",T=_.length;switch(_=_.map(function(b){return'"'.concat(b,'"')}),T){case 1:N+="".concat(_[0]," argument");break;case 2:N+="".concat(_[0]," and ").concat(_[1]," arguments");break;default:N+=_.slice(0,T-1).join(", "),N+=", and ".concat(_[T-1]," arguments");break}return"".concat(N," must be specified")},TypeError),eo.codes=e,eo}var cs,Wa;function r0(){if(Wa)return cs;Wa=1;function u(Z,ee){var J=Object.keys(Z);if(Object.getOwnPropertySymbols){var F=Object.getOwnPropertySymbols(Z);ee&&(F=F.filter(function(E){return Object.getOwnPropertyDescriptor(Z,E).enumerable})),J.push.apply(J,F)}return J}function i(Z){for(var ee=1;ee<arguments.length;ee++){var J=arguments[ee]!=null?arguments[ee]:{};ee%2?u(Object(J),!0).forEach(function(F){c(Z,F,J[F])}):Object.getOwnPropertyDescriptors?Object.defineProperties(Z,Object.getOwnPropertyDescriptors(J)):u(Object(J)).forEach(function(F){Object.defineProperty(Z,F,Object.getOwnPropertyDescriptor(J,F))})}return Z}function c(Z,ee,J){return ee=r(ee),ee in Z?Object.defineProperty(Z,ee,{value:J,enumerable:!0,configurable:!0,writable:!0}):Z[ee]=J,Z}function h(Z,ee){if(!(Z instanceof ee))throw new TypeError("Cannot call a class as a function")}function p(Z,ee){for(var J=0;J<ee.length;J++){var F=ee[J];F.enumerable=F.enumerable||!1,F.configurable=!0,"value"in F&&(F.writable=!0),Object.defineProperty(Z,r(F.key),F)}}function a(Z,ee,J){return ee&&p(Z.prototype,ee),Object.defineProperty(Z,"prototype",{writable:!1}),Z}function r(Z){var ee=n(Z,"string");return y(ee)==="symbol"?ee:String(ee)}function n(Z,ee){if(y(Z)!=="object"||Z===null)return Z;var J=Z[Symbol.toPrimitive];if(J!==void 0){var F=J.call(Z,ee);if(y(F)!=="object")return F;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(Z)}function t(Z,ee){if(typeof ee!="function"&&ee!==null)throw new TypeError("Super expression must either be null or a function");Z.prototype=Object.create(ee&&ee.prototype,{constructor:{value:Z,writable:!0,configurable:!0}}),Object.defineProperty(Z,"prototype",{writable:!1}),ee&&x(Z,ee)}function s(Z){var ee=d();return function(){var F=m(Z),E;if(ee){var A=m(this).constructor;E=Reflect.construct(F,arguments,A)}else E=F.apply(this,arguments);return e(this,E)}}function e(Z,ee){if(ee&&(y(ee)==="object"||typeof ee=="function"))return ee;if(ee!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return o(Z)}function o(Z){if(Z===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Z}function l(Z){var ee=typeof Map=="function"?new Map:void 0;return l=function(F){if(F===null||!g(F))return F;if(typeof F!="function")throw new TypeError("Super expression must either be null or a function");if(typeof ee<"u"){if(ee.has(F))return ee.get(F);ee.set(F,E)}function E(){return f(F,arguments,m(this).constructor)}return E.prototype=Object.create(F.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),x(E,F)},l(Z)}function f(Z,ee,J){return d()?f=Reflect.construct.bind():f=function(E,A,S){var C=[null];C.push.apply(C,A);var P=Function.bind.apply(E,C),R=new P;return S&&x(R,S.prototype),R},f.apply(null,arguments)}function d(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function g(Z){return Function.toString.call(Z).indexOf("[native code]")!==-1}function x(Z,ee){return x=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(F,E){return F.__proto__=E,F},x(Z,ee)}function m(Z){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(J){return J.__proto__||Object.getPrototypeOf(J)},m(Z)}function y(Z){"@babel/helpers - typeof";return y=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(ee){return typeof ee}:function(ee){return ee&&typeof Symbol=="function"&&ee.constructor===Symbol&&ee!==Symbol.prototype?"symbol":typeof ee},y(Z)}var _=wn(),v=_.inspect,N=Va(),T=N.codes.ERR_INVALID_ARG_TYPE;function b(Z,ee,J){return(J===void 0||J>Z.length)&&(J=Z.length),Z.substring(J-ee.length,J)===ee}function O(Z,ee){if(ee=Math.floor(ee),Z.length==0||ee==0)return"";var J=Z.length*ee;for(ee=Math.floor(Math.log(ee)/Math.log(2));ee;)Z+=Z,ee--;return Z+=Z.substring(0,J-Z.length),Z}var D="",k="",z="",U="",te={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"},ie=10;function oe(Z){var ee=Object.keys(Z),J=Object.create(Object.getPrototypeOf(Z));return ee.forEach(function(F){J[F]=Z[F]}),Object.defineProperty(J,"message",{value:Z.message}),J}function he(Z){return v(Z,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function Ee(Z,ee,J){var F="",E="",A=0,S="",C=!1,P=he(Z),R=P.split(`
|
|
11
|
+
`),I=he(ee).split(`
|
|
12
|
+
`),M=0,W="";if(J==="strictEqual"&&y(Z)==="object"&&y(ee)==="object"&&Z!==null&&ee!==null&&(J="strictEqualObject"),R.length===1&&I.length===1&&R[0]!==I[0]){var G=R[0].length+I[0].length;if(G<=ie){if((y(Z)!=="object"||Z===null)&&(y(ee)!=="object"||ee===null)&&(Z!==0||ee!==0))return"".concat(te[J],`
|
|
19
13
|
|
|
20
14
|
`)+"".concat(R[0]," !== ").concat(I[0],`
|
|
21
|
-
`)}else if(J!=="strictEqualObject"){var w=
|
|
15
|
+
`)}else if(J!=="strictEqualObject"){var w=be.stderr&&be.stderr.isTTY?be.stderr.columns:80;if(G<w){for(;R[0][M]===I[0][M];)M++;M>2&&(W=`
|
|
22
16
|
`.concat(O(" ",M),"^"),M=0)}}}for(var L=R[R.length-1],H=I[I.length-1];L===H&&(M++<2?S=`
|
|
23
|
-
`.concat(L).concat(S):
|
|
24
|
-
`);if(
|
|
17
|
+
`.concat(L).concat(S):F=L,R.pop(),I.pop(),!(R.length===0||I.length===0));)L=R[R.length-1],H=I[I.length-1];var X=Math.max(R.length,I.length);if(X===0){var Y=P.split(`
|
|
18
|
+
`);if(Y.length>30)for(Y[26]="".concat(D,"...").concat(U);Y.length>27;)Y.pop();return"".concat(te.notIdentical,`
|
|
25
19
|
|
|
26
|
-
`).concat(
|
|
20
|
+
`).concat(Y.join(`
|
|
27
21
|
`),`
|
|
28
22
|
`)}M>3&&(S=`
|
|
29
|
-
`.concat(D,"...").concat(U).concat(S),C=!0),
|
|
30
|
-
`.concat(
|
|
31
|
-
`.concat(k,"+ actual").concat(U," ").concat(z,"- expected").concat(U)
|
|
32
|
-
`.concat(D,"...").concat(U),C=!0):
|
|
33
|
-
`.concat(I[M-2]),
|
|
34
|
-
`.concat(I[M-1]),
|
|
35
|
-
`.concat(z,"-").concat(U," ").concat(I[M]),
|
|
36
|
-
`.concat(D,"...").concat(U),C=!0):
|
|
37
|
-
`.concat(R[M-2]),
|
|
38
|
-
`.concat(R[M-1]),
|
|
39
|
-
`.concat(k,"+").concat(U," ").concat(R[M]),
|
|
40
|
-
`.concat(D,"...").concat(U),C=!0):
|
|
41
|
-
`.concat(R[M-2]),
|
|
42
|
-
`.concat(R[M-1]),
|
|
43
|
-
`.concat(k,"+").concat(U," ").concat(
|
|
44
|
-
`.concat(z,"-").concat(U," ").concat(
|
|
45
|
-
`.concat(
|
|
23
|
+
`.concat(D,"...").concat(U).concat(S),C=!0),F!==""&&(S=`
|
|
24
|
+
`.concat(F).concat(S),F="");var re=0,q=te[J]+`
|
|
25
|
+
`.concat(k,"+ actual").concat(U," ").concat(z,"- expected").concat(U),$=" ".concat(D,"...").concat(U," Lines skipped");for(M=0;M<X;M++){var se=M-A;if(R.length<M+1)se>1&&M>2&&(se>4?(E+=`
|
|
26
|
+
`.concat(D,"...").concat(U),C=!0):se>3&&(E+=`
|
|
27
|
+
`.concat(I[M-2]),re++),E+=`
|
|
28
|
+
`.concat(I[M-1]),re++),A=M,F+=`
|
|
29
|
+
`.concat(z,"-").concat(U," ").concat(I[M]),re++;else if(I.length<M+1)se>1&&M>2&&(se>4?(E+=`
|
|
30
|
+
`.concat(D,"...").concat(U),C=!0):se>3&&(E+=`
|
|
31
|
+
`.concat(R[M-2]),re++),E+=`
|
|
32
|
+
`.concat(R[M-1]),re++),A=M,E+=`
|
|
33
|
+
`.concat(k,"+").concat(U," ").concat(R[M]),re++;else{var me=I[M],ge=R[M],B=ge!==me&&(!b(ge,",")||ge.slice(0,-1)!==me);B&&b(me,",")&&me.slice(0,-1)===ge&&(B=!1,ge+=","),B?(se>1&&M>2&&(se>4?(E+=`
|
|
34
|
+
`.concat(D,"...").concat(U),C=!0):se>3&&(E+=`
|
|
35
|
+
`.concat(R[M-2]),re++),E+=`
|
|
36
|
+
`.concat(R[M-1]),re++),A=M,E+=`
|
|
37
|
+
`.concat(k,"+").concat(U," ").concat(ge),F+=`
|
|
38
|
+
`.concat(z,"-").concat(U," ").concat(me),re+=2):(E+=F,F="",(se===1||M===0)&&(E+=`
|
|
39
|
+
`.concat(ge),re++))}if(re>20&&M<X-2)return"".concat(q).concat($,`
|
|
46
40
|
`).concat(E,`
|
|
47
|
-
`).concat(D,"...").concat(U).concat(
|
|
48
|
-
`)+"".concat(D,"...").concat(U)}return"".concat(q).concat(C
|
|
49
|
-
`).concat(E).concat(
|
|
50
|
-
`);if(C==="notStrictEqual"&&y(R)==="object"&&R!==null&&(
|
|
41
|
+
`).concat(D,"...").concat(U).concat(F,`
|
|
42
|
+
`)+"".concat(D,"...").concat(U)}return"".concat(q).concat(C?$:"",`
|
|
43
|
+
`).concat(E).concat(F).concat(S).concat(W)}var le=(function(Z,ee){t(F,Z);var J=s(F);function F(E){var A;if(h(this,F),y(E)!=="object"||E===null)throw new T("options","Object",E);var S=E.message,C=E.operator,P=E.stackStartFn,R=E.actual,I=E.expected,M=Error.stackTraceLimit;if(Error.stackTraceLimit=0,S!=null)A=J.call(this,String(S));else if(be.stderr&&be.stderr.isTTY&&(be.stderr&&be.stderr.getColorDepth&&be.stderr.getColorDepth()!==1?(D="\x1B[34m",k="\x1B[32m",U="\x1B[39m",z="\x1B[31m"):(D="",k="",U="",z="")),y(R)==="object"&&R!==null&&y(I)==="object"&&I!==null&&"stack"in R&&R instanceof Error&&"stack"in I&&I instanceof Error&&(R=oe(R),I=oe(I)),C==="deepStrictEqual"||C==="strictEqual")A=J.call(this,Ee(R,I,C));else if(C==="notDeepStrictEqual"||C==="notStrictEqual"){var W=te[C],G=he(R).split(`
|
|
44
|
+
`);if(C==="notStrictEqual"&&y(R)==="object"&&R!==null&&(W=te.notStrictEqualObject),G.length>30)for(G[26]="".concat(D,"...").concat(U);G.length>27;)G.pop();G.length===1?A=J.call(this,"".concat(W," ").concat(G[0])):A=J.call(this,"".concat(W,`
|
|
51
45
|
|
|
52
|
-
`).concat(
|
|
46
|
+
`).concat(G.join(`
|
|
53
47
|
`),`
|
|
54
|
-
`))}else{var w=
|
|
48
|
+
`))}else{var w=he(R),L="",H=te[C];C==="notDeepEqual"||C==="notEqual"?(w="".concat(te[C],`
|
|
55
49
|
|
|
56
|
-
`).concat(w),w.length>1024&&(w="".concat(w.slice(0,1021),"..."))):(L="".concat(
|
|
50
|
+
`).concat(w),w.length>1024&&(w="".concat(w.slice(0,1021),"..."))):(L="".concat(he(I)),w.length>512&&(w="".concat(w.slice(0,509),"...")),L.length>512&&(L="".concat(L.slice(0,509),"...")),C==="deepEqual"||C==="equal"?w="".concat(H,`
|
|
57
51
|
|
|
58
52
|
`).concat(w,`
|
|
59
53
|
|
|
60
54
|
should equal
|
|
61
55
|
|
|
62
|
-
`):L=" ".concat(C," ").concat(L)),A=J.call(this,"".concat(w).concat(L))}return Error.stackTraceLimit=M,A.generatedMessage=!S,Object.defineProperty(o(A),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),A.code="ERR_ASSERTION",A.actual=R,A.expected=I,A.operator=C,Error.captureStackTrace&&Error.captureStackTrace(o(A),P),A.stack,A.name="AssertionError",e(A)}return a(
|
|
63
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c(j,$){if(j){if(typeof j=="string")return h(j,$);var ie=Object.prototype.toString.call(j).slice(8,-1);if(ie==="Object"&&j.constructor&&(ie=j.constructor.name),ie==="Map"||ie==="Set")return Array.from(j);if(ie==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ie))return h(j,$)}}function h(j,$){($==null||$>j.length)&&($=j.length);for(var ie=0,ce=new Array($);ie<$;ie++)ce[ie]=j[ie];return ce}function p(j,$){var ie=j==null?null:typeof Symbol<"u"&&j[Symbol.iterator]||j["@@iterator"];if(ie!=null){var ce,he,ge,ye,Ee=[],Se=!0,Le=!1;try{if(ge=(ie=ie.call(j)).next,$!==0)for(;!(Se=(ce=ge.call(ie)).done)&&(Ee.push(ce.value),Ee.length!==$);Se=!0);}catch(K){Le=!0,he=K}finally{try{if(!Se&&ie.return!=null&&(ye=ie.return(),Object(ye)!==ye))return}finally{if(Le)throw he}}return Ee}}function a(j){if(Array.isArray(j))return j}function r(j){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function($){return typeof $}:function($){return $&&typeof Symbol=="function"&&$.constructor===Symbol&&$!==Symbol.prototype?"symbol":typeof $},r(j)}var n=/a/g.flags!==void 0,t=function($){var ie=[];return $.forEach(function(ce){return ie.push(ce)}),ie},s=function($){var ie=[];return $.forEach(function(ce,he){return ie.push([he,ce])}),ie},e=Object.is?Object.is:a0(),o=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:c0();function f(j){return j.call.bind(j)}var d=f(Object.prototype.hasOwnProperty),g=f(Object.prototype.propertyIsEnumerable),x=f(Object.prototype.toString),m=Fn().types,y=m.isAnyArrayBuffer,_=m.isArrayBufferView,v=m.isDate,N=m.isMap,T=m.isRegExp,b=m.isSet,O=m.isNativeError,D=m.isBoxedPrimitive,k=m.isNumberObject,z=m.isStringObject,U=m.isBooleanObject,re=m.isBigIntObject,oe=m.isSymbolObject,se=m.isFloat32Array,de=m.isFloat64Array;function be(j){if(j.length===0||j.length>10)return!0;for(var $=0;$<j.length;$++){var ie=j.charCodeAt($);if(ie<48||ie>57)return!0}return j.length===10&&j>=Math.pow(2,32)}function fe(j){return Object.keys(j).filter(be).concat(o(j).filter(Object.prototype.propertyIsEnumerable.bind(j)))}/*!
|
|
64
|
-
|
|
65
|
-
*
|
|
66
|
-
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
67
|
-
* @license MIT
|
|
68
|
-
*/function Z(j,$){if(j===$)return 0;for(var ie=j.length,ce=$.length,he=0,ge=Math.min(ie,ce);he<ge;++he)if(j[he]!==$[he]){ie=j[he],ce=$[he];break}return ie<ce?-1:ce<ie?1:0}var te=!0,J=!1,B=0,E=1,A=2,S=3;function C(j,$){return n?j.source===$.source&&j.flags===$.flags:RegExp.prototype.toString.call(j)===RegExp.prototype.toString.call($)}function P(j,$){if(j.byteLength!==$.byteLength)return!1;for(var ie=0;ie<j.byteLength;ie++)if(j[ie]!==$[ie])return!1;return!0}function R(j,$){return j.byteLength!==$.byteLength?!1:Z(new Uint8Array(j.buffer,j.byteOffset,j.byteLength),new Uint8Array($.buffer,$.byteOffset,$.byteLength))===0}function I(j,$){return j.byteLength===$.byteLength&&Z(new Uint8Array(j),new Uint8Array($))===0}function M(j,$){return k(j)?k($)&&e(Number.prototype.valueOf.call(j),Number.prototype.valueOf.call($)):z(j)?z($)&&String.prototype.valueOf.call(j)===String.prototype.valueOf.call($):U(j)?U($)&&Boolean.prototype.valueOf.call(j)===Boolean.prototype.valueOf.call($):re(j)?re($)&&BigInt.prototype.valueOf.call(j)===BigInt.prototype.valueOf.call($):oe($)&&Symbol.prototype.valueOf.call(j)===Symbol.prototype.valueOf.call($)}function V(j,$,ie,ce){if(j===$)return j!==0?!0:ie?e(j,$):!0;if(ie){if(r(j)!=="object")return typeof j=="number"&&l(j)&&l($);if(r($)!=="object"||j===null||$===null||Object.getPrototypeOf(j)!==Object.getPrototypeOf($))return!1}else{if(j===null||r(j)!=="object")return $===null||r($)!=="object"?j==$:!1;if($===null||r($)!=="object")return!1}var he=x(j),ge=x($);if(he!==ge)return!1;if(Array.isArray(j)){if(j.length!==$.length)return!1;var ye=fe(j),Ee=fe($);return ye.length!==Ee.length?!1:w(j,$,ie,ce,E,ye)}if(he==="[object Object]"&&(!N(j)&&N($)||!b(j)&&b($)))return!1;if(v(j)){if(!v($)||Date.prototype.getTime.call(j)!==Date.prototype.getTime.call($))return!1}else if(T(j)){if(!T($)||!C(j,$))return!1}else if(O(j)||j instanceof Error){if(j.message!==$.message||j.name!==$.name)return!1}else if(_(j)){if(!ie&&(se(j)||de(j))){if(!P(j,$))return!1}else if(!R(j,$))return!1;var Se=fe(j),Le=fe($);return Se.length!==Le.length?!1:w(j,$,ie,ce,B,Se)}else{if(b(j))return!b($)||j.size!==$.size?!1:w(j,$,ie,ce,A);if(N(j))return!N($)||j.size!==$.size?!1:w(j,$,ie,ce,S);if(y(j)){if(!I(j,$))return!1}else if(D(j)&&!M(j,$))return!1}return w(j,$,ie,ce,B)}function W(j,$){return $.filter(function(ie){return g(j,ie)})}function w(j,$,ie,ce,he,ge){if(arguments.length===5){ge=Object.keys(j);var ye=Object.keys($);if(ge.length!==ye.length)return!1}for(var Ee=0;Ee<ge.length;Ee++)if(!d($,ge[Ee]))return!1;if(ie&&arguments.length===5){var Se=o(j);if(Se.length!==0){var Le=0;for(Ee=0;Ee<Se.length;Ee++){var K=Se[Ee];if(g(j,K)){if(!g($,K))return!1;ge.push(K),Le++}else if(g($,K))return!1}var pe=o($);if(Se.length!==pe.length&&W($,pe).length!==Le)return!1}else{var xe=o($);if(xe.length!==0&&W($,xe).length!==0)return!1}}if(ge.length===0&&(he===B||he===E&&j.length===0||j.size===0))return!0;if(ce===void 0)ce={val1:new Map,val2:new Map,position:0};else{var _e=ce.val1.get(j);if(_e!==void 0){var Ce=ce.val2.get($);if(Ce!==void 0)return _e===Ce}ce.position++}ce.val1.set(j,ce.position),ce.val2.set($,ce.position);var Ue=ue(j,$,ie,ge,ce,he);return ce.val1.delete(j),ce.val2.delete($),Ue}function L(j,$,ie,ce){for(var he=t(j),ge=0;ge<he.length;ge++){var ye=he[ge];if(V($,ye,ie,ce))return j.delete(ye),!0}return!1}function H(j){switch(r(j)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":j=+j;case"number":if(l(j))return!1}return!0}function G(j,$,ie){var ce=H(ie);return ce??($.has(ce)&&!j.has(ce))}function ee(j,$,ie,ce,he){var ge=H(ie);if(ge!=null)return ge;var ye=$.get(ge);return ye===void 0&&!$.has(ge)||!V(ce,ye,!1,he)?!1:!j.has(ge)&&V(ce,ye,!1,he)}function ne(j,$,ie,ce){for(var he=null,ge=t(j),ye=0;ye<ge.length;ye++){var Ee=ge[ye];if(r(Ee)==="object"&&Ee!==null)he===null&&(he=new Set),he.add(Ee);else if(!$.has(Ee)){if(ie||!G(j,$,Ee))return!1;he===null&&(he=new Set),he.add(Ee)}}if(he!==null){for(var Se=t($),Le=0;Le<Se.length;Le++){var K=Se[Le];if(r(K)==="object"&&K!==null){if(!L(he,K,ie,ce))return!1}else if(!ie&&!j.has(K)&&!L(he,K,ie,ce))return!1}return he.size===0}return!0}function q(j,$,ie,ce,he,ge){for(var ye=t(j),Ee=0;Ee<ye.length;Ee++){var Se=ye[Ee];if(V(ie,Se,he,ge)&&V(ce,$.get(Se),he,ge))return j.delete(Se),!0}return!1}function X(j,$,ie,ce){for(var he=null,ge=s(j),ye=0;ye<ge.length;ye++){var Ee=u(ge[ye],2),Se=Ee[0],Le=Ee[1];if(r(Se)==="object"&&Se!==null)he===null&&(he=new Set),he.add(Se);else{var K=$.get(Se);if(K===void 0&&!$.has(Se)||!V(Le,K,ie,ce)){if(ie||!ee(j,$,Se,Le,ce))return!1;he===null&&(he=new Set),he.add(Se)}}}if(he!==null){for(var pe=s($),xe=0;xe<pe.length;xe++){var _e=u(pe[xe],2),Ce=_e[0],Ue=_e[1];if(r(Ce)==="object"&&Ce!==null){if(!q(he,j,Ce,Ue,ie,ce))return!1}else if(!ie&&(!j.has(Ce)||!V(j.get(Ce),Ue,!1,ce))&&!q(he,j,Ce,Ue,!1,ce))return!1}return he.size===0}return!0}function ue(j,$,ie,ce,he,ge){var ye=0;if(ge===A){if(!ne(j,$,ie,he))return!1}else if(ge===S){if(!X(j,$,ie,he))return!1}else if(ge===E)for(;ye<j.length;ye++)if(d(j,ye)){if(!d($,ye)||!V(j[ye],$[ye],ie,he))return!1}else{if(d($,ye))return!1;for(var Ee=Object.keys(j);ye<Ee.length;ye++){var Se=Ee[ye];if(!d($,Se)||!V(j[Se],$[Se],ie,he))return!1}return Ee.length===Object.keys($).length}for(ye=0;ye<ce.length;ye++){var Le=ce[ye];if(!V(j[Le],$[Le],ie,he))return!1}return!0}function ve(j,$){return V(j,$,J)}function Te(j,$){return V(j,$,te)}return Rs={isDeepEqual:ve,isDeepStrictEqual:Te},Rs}var dl;function Me(){if(dl)return ro.exports;dl=1;function u(A){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},u(A)}function i(A,S,C){return Object.defineProperty(A,"prototype",{writable:!1}),A}function c(A,S){if(!(A instanceof S))throw new TypeError("Cannot call a class as a function")}var h=Va(),p=h.codes,a=p.ERR_AMBIGUOUS_ARGUMENT,r=p.ERR_INVALID_ARG_TYPE,n=p.ERR_INVALID_ARG_VALUE,t=p.ERR_INVALID_RETURN_VALUE,s=p.ERR_MISSING_ARGS,e=r0(),o=Fn(),l=o.inspect,f=Fn().types,d=f.isPromise,g=f.isRegExp,x=o0()(),m=vs()(),y=s0()("RegExp.prototype.test"),_,v;function N(){var A=f0();_=A.isDeepEqual,v=A.isDeepStrictEqual}var T=!1,b=ro.exports=U,O={};function D(A){throw A.message instanceof Error?A.message:new e(A)}function k(A,S,C,P,R){var I=arguments.length,M;if(I===0)M="Failed";else if(I===1)C=A,A=void 0;else{if(T===!1){T=!0;var V=Re.emitWarning?Re.emitWarning:console.warn.bind(console);V("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}I===2&&(P="!=")}if(C instanceof Error)throw C;var W={actual:A,expected:S,operator:P===void 0?"fail":P,stackStartFn:R||k};C!==void 0&&(W.message=C);var w=new e(W);throw M&&(w.message=M,w.generatedMessage=!0),w}b.fail=k,b.AssertionError=e;function z(A,S,C,P){if(!C){var R=!1;if(S===0)R=!0,P="No value argument passed to `assert.ok()`";else if(P instanceof Error)throw P;var I=new e({actual:C,expected:!0,message:P,operator:"==",stackStartFn:A});throw I.generatedMessage=R,I}}function U(){for(var A=arguments.length,S=new Array(A),C=0;C<A;C++)S[C]=arguments[C];z.apply(void 0,[U,S.length].concat(S))}b.ok=U,b.equal=function A(S,C,P){if(arguments.length<2)throw new s("actual","expected");S!=C&&D({actual:S,expected:C,message:P,operator:"==",stackStartFn:A})},b.notEqual=function A(S,C,P){if(arguments.length<2)throw new s("actual","expected");S==C&&D({actual:S,expected:C,message:P,operator:"!=",stackStartFn:A})},b.deepEqual=function A(S,C,P){if(arguments.length<2)throw new s("actual","expected");_===void 0&&N(),_(S,C)||D({actual:S,expected:C,message:P,operator:"deepEqual",stackStartFn:A})},b.notDeepEqual=function A(S,C,P){if(arguments.length<2)throw new s("actual","expected");_===void 0&&N(),_(S,C)&&D({actual:S,expected:C,message:P,operator:"notDeepEqual",stackStartFn:A})},b.deepStrictEqual=function A(S,C,P){if(arguments.length<2)throw new s("actual","expected");_===void 0&&N(),v(S,C)||D({actual:S,expected:C,message:P,operator:"deepStrictEqual",stackStartFn:A})},b.notDeepStrictEqual=re;function re(A,S,C){if(arguments.length<2)throw new s("actual","expected");_===void 0&&N(),v(A,S)&&D({actual:A,expected:S,message:C,operator:"notDeepStrictEqual",stackStartFn:re})}b.strictEqual=function A(S,C,P){if(arguments.length<2)throw new s("actual","expected");m(S,C)||D({actual:S,expected:C,message:P,operator:"strictEqual",stackStartFn:A})},b.notStrictEqual=function A(S,C,P){if(arguments.length<2)throw new s("actual","expected");m(S,C)&&D({actual:S,expected:C,message:P,operator:"notStrictEqual",stackStartFn:A})};var oe=i(function A(S,C,P){var R=this;c(this,A),C.forEach(function(I){I in S&&(P!==void 0&&typeof P[I]=="string"&&g(S[I])&&y(S[I],P[I])?R[I]=P[I]:R[I]=S[I])})});function se(A,S,C,P,R,I){if(!(C in A)||!v(A[C],S[C])){if(!P){var M=new oe(A,R),V=new oe(S,R,A),W=new e({actual:M,expected:V,operator:"deepStrictEqual",stackStartFn:I});throw W.actual=A,W.expected=S,W.operator=I.name,W}D({actual:A,expected:S,message:P,operator:I.name,stackStartFn:I})}}function de(A,S,C,P){if(typeof S!="function"){if(g(S))return y(S,A);if(arguments.length===2)throw new r("expected",["Function","RegExp"],S);if(u(A)!=="object"||A===null){var R=new e({actual:A,expected:S,message:C,operator:"deepStrictEqual",stackStartFn:P});throw R.operator=P.name,R}var I=Object.keys(S);if(S instanceof Error)I.push("name","message");else if(I.length===0)throw new n("error",S,"may not be an empty object");return _===void 0&&N(),I.forEach(function(M){typeof A[M]=="string"&&g(S[M])&&y(S[M],A[M])||se(A,S,M,C,I,P)}),!0}return S.prototype!==void 0&&A instanceof S?!0:Error.isPrototypeOf(S)?!1:S.call({},A)===!0}function be(A){if(typeof A!="function")throw new r("fn","Function",A);try{A()}catch(S){return S}return O}function fe(A){return d(A)||A!==null&&u(A)==="object"&&typeof A.then=="function"&&typeof A.catch=="function"}function Z(A){return Promise.resolve().then(function(){var S;if(typeof A=="function"){if(S=A(),!fe(S))throw new t("instance of Promise","promiseFn",S)}else if(fe(A))S=A;else throw new r("promiseFn",["Function","Promise"],A);return Promise.resolve().then(function(){return S}).then(function(){return O}).catch(function(C){return C})})}function te(A,S,C,P){if(typeof C=="string"){if(arguments.length===4)throw new r("error",["Object","Error","Function","RegExp"],C);if(u(S)==="object"&&S!==null){if(S.message===C)throw new a("error/message",'The error message "'.concat(S.message,'" is identical to the message.'))}else if(S===C)throw new a("error/message",'The error "'.concat(S,'" is identical to the message.'));P=C,C=void 0}else if(C!=null&&u(C)!=="object"&&typeof C!="function")throw new r("error",["Object","Error","Function","RegExp"],C);if(S===O){var R="";C&&C.name&&(R+=" (".concat(C.name,")")),R+=P?": ".concat(P):".";var I=A.name==="rejects"?"rejection":"exception";D({actual:void 0,expected:C,operator:A.name,message:"Missing expected ".concat(I).concat(R),stackStartFn:A})}if(C&&!de(S,C,P,A))throw S}function J(A,S,C,P){if(S!==O){if(typeof C=="string"&&(P=C,C=void 0),!C||de(S,C)){var R=P?": ".concat(P):".",I=A.name==="doesNotReject"?"rejection":"exception";D({actual:S,expected:C,operator:A.name,message:"Got unwanted ".concat(I).concat(R,`
|
|
69
|
-
`)+'Actual message: "'.concat(S&&S.message,'"'),stackStartFn:A})}throw S}}b.throws=function A(S){for(var C=arguments.length,P=new Array(C>1?C-1:0),R=1;R<C;R++)P[R-1]=arguments[R];te.apply(void 0,[A,be(S)].concat(P))},b.rejects=function A(S){for(var C=arguments.length,P=new Array(C>1?C-1:0),R=1;R<C;R++)P[R-1]=arguments[R];return Z(S).then(function(I){return te.apply(void 0,[A,I].concat(P))})},b.doesNotThrow=function A(S){for(var C=arguments.length,P=new Array(C>1?C-1:0),R=1;R<C;R++)P[R-1]=arguments[R];J.apply(void 0,[A,be(S)].concat(P))},b.doesNotReject=function A(S){for(var C=arguments.length,P=new Array(C>1?C-1:0),R=1;R<C;R++)P[R-1]=arguments[R];return Z(S).then(function(I){return J.apply(void 0,[A,I].concat(P))})},b.ifError=function A(S){if(S!=null){var C="ifError got unwanted exception: ";u(S)==="object"&&typeof S.message=="string"?S.message.length===0&&S.constructor?C+=S.constructor.name:C+=S.message:C+=l(S);var P=new e({actual:S,expected:null,operator:"ifError",message:C,stackStartFn:A}),R=S.stack;if(typeof R=="string"){var I=R.split(`
|
|
56
|
+
`):L=" ".concat(C," ").concat(L)),A=J.call(this,"".concat(w).concat(L))}return Error.stackTraceLimit=M,A.generatedMessage=!S,Object.defineProperty(o(A),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),A.code="ERR_ASSERTION",A.actual=R,A.expected=I,A.operator=C,Error.captureStackTrace&&Error.captureStackTrace(o(A),P),A.stack,A.name="AssertionError",e(A)}return a(F,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:ee,value:function(A,S){return v(this,i(i({},S),{},{customInspect:!1,depth:0}))}}]),F})(l(Error),v.custom);return cs=le,cs}var fs,Ga;function Xa(){if(Ga)return fs;Ga=1;var u=Object.prototype.toString;return fs=function(c){var h=u.call(c),p=h==="[object Arguments]";return p||(p=h!=="[object Array]"&&c!==null&&typeof c=="object"&&typeof c.length=="number"&&c.length>=0&&u.call(c.callee)==="[object Function]"),p},fs}var hs,$a;function n0(){if($a)return hs;$a=1;var u;if(!Object.keys){var i=Object.prototype.hasOwnProperty,c=Object.prototype.toString,h=Xa(),p=Object.prototype.propertyIsEnumerable,a=!p.call({toString:null},"toString"),r=p.call(function(){},"prototype"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],t=function(l){var f=l.constructor;return f&&f.prototype===l},s={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},e=(function(){if(typeof window>"u")return!1;for(var l in window)try{if(!s["$"+l]&&i.call(window,l)&&window[l]!==null&&typeof window[l]=="object")try{t(window[l])}catch{return!0}}catch{return!0}return!1})(),o=function(l){if(typeof window>"u"||!e)return t(l);try{return t(l)}catch{return!1}};u=function(f){var d=f!==null&&typeof f=="object",g=c.call(f)==="[object Function]",x=h(f),m=d&&c.call(f)==="[object String]",y=[];if(!d&&!g&&!x)throw new TypeError("Object.keys called on a non-object");var _=r&&g;if(m&&f.length>0&&!i.call(f,0))for(var v=0;v<f.length;++v)y.push(String(v));if(x&&f.length>0)for(var N=0;N<f.length;++N)y.push(String(N));else for(var T in f)!(_&&T==="prototype")&&i.call(f,T)&&y.push(String(T));if(a)for(var b=o(f),O=0;O<n.length;++O)!(b&&n[O]==="constructor")&&i.call(f,n[O])&&y.push(n[O]);return y}}return hs=u,hs}var ps,Ka;function Qa(){if(Ka)return ps;Ka=1;var u=Array.prototype.slice,i=Xa(),c=Object.keys,h=c?function(r){return c(r)}:n0(),p=Object.keys;return h.shim=function(){if(Object.keys){var r=(function(){var n=Object.keys(arguments);return n&&n.length===arguments.length})(1,2);r||(Object.keys=function(t){return i(t)?p(u.call(t)):p(t)})}else Object.keys=h;return Object.keys||h},ps=h,ps}var ds,Ja;function i0(){if(Ja)return ds;Ja=1;var u=Qa(),i=io()(),c=In(),h=uo(),p=c("Array.prototype.push"),a=c("Object.prototype.propertyIsEnumerable"),r=i?h.getOwnPropertySymbols:null;return ds=function(t,s){if(t==null)throw new TypeError("target must be an object");var e=h(t);if(arguments.length===1)return e;for(var o=1;o<arguments.length;++o){var l=h(arguments[o]),f=u(l),d=i&&(h.getOwnPropertySymbols||r);if(d)for(var g=d(l),x=0;x<g.length;++x){var m=g[x];a(l,m)&&p(f,m)}for(var y=0;y<f.length;++y){var _=f[y];if(a(l,_)){var v=l[_];e[_]=v}}}return e},ds}var xs,Za;function o0(){if(Za)return xs;Za=1;var u=i0(),i=function(){if(!Object.assign)return!1;for(var h="abcdefghijklmnopqrst",p=h.split(""),a={},r=0;r<p.length;++r)a[p[r]]=p[r];var n=Object.assign({},a),t="";for(var s in n)t+=s;return h!==t},c=function(){if(!Object.assign||!Object.preventExtensions)return!1;var h=Object.preventExtensions({1:2});try{Object.assign(h,"xy")}catch{return h[1]==="y"}return!1};return xs=function(){return!Object.assign||i()||c()?u:Object.assign},xs}var ys,Ya;function el(){if(Ya)return ys;Ya=1;var u=function(i){return i!==i};return ys=function(c,h){return c===0&&h===0?1/c===1/h:!!(c===h||u(c)&&u(h))},ys}var _s,tl;function ms(){if(tl)return _s;tl=1;var u=el();return _s=function(){return typeof Object.is=="function"?Object.is:u},_s}var gs,rl;function s0(){if(rl)return gs;rl=1;var u=Wo(),i=Oi(),c=i(u("String.prototype.indexOf"));return gs=function(p,a){var r=u(p,!!a);return typeof r=="function"&&c(p,".prototype.")>-1?i(r):r},gs}var vs,nl;function Pi(){if(nl)return vs;nl=1;var u=Qa(),i=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",c=Object.prototype.toString,h=Array.prototype.concat,p=Pa(),a=function(s){return typeof s=="function"&&c.call(s)==="[object Function]"},r=Ia()(),n=function(s,e,o,l){if(e in s){if(l===!0){if(s[e]===o)return}else if(!a(l)||!l())return}r?p(s,e,o,!0):p(s,e,o)},t=function(s,e){var o=arguments.length>2?arguments[2]:{},l=u(e);i&&(l=h.call(l,Object.getOwnPropertySymbols(e)));for(var f=0;f<l.length;f+=1)n(s,l[f],e[l[f]],o[l[f]])};return t.supportsDescriptors=!!r,vs=t,vs}var As,il;function u0(){if(il)return As;il=1;var u=ms(),i=Pi();return As=function(){var h=u();return i(Object,{is:h},{is:function(){return Object.is!==h}}),h},As}var Ts,ol;function a0(){if(ol)return Ts;ol=1;var u=Pi(),i=Oi(),c=el(),h=ms(),p=u0(),a=i(h(),Object);return u(a,{getPolyfill:h,implementation:c,shim:p}),Ts=a,Ts}var Es,sl;function ul(){return sl||(sl=1,Es=function(i){return i!==i}),Es}var Ss,al;function ll(){if(al)return Ss;al=1;var u=ul();return Ss=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:u},Ss}var Ns,cl;function l0(){if(cl)return Ns;cl=1;var u=Pi(),i=ll();return Ns=function(){var h=i();return u(Number,{isNaN:h},{isNaN:function(){return Number.isNaN!==h}}),h},Ns}var bs,fl;function c0(){if(fl)return bs;fl=1;var u=Oi(),i=Pi(),c=ul(),h=ll(),p=l0(),a=u(h(),Number);return i(a,{getPolyfill:h,implementation:c,shim:p}),bs=a,bs}var Cs,hl;function f0(){if(hl)return Cs;hl=1;function u(B,V){return a(B)||p(B,V)||c(B,V)||i()}function i(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
57
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function c(B,V){if(B){if(typeof B=="string")return h(B,V);var ne=Object.prototype.toString.call(B).slice(8,-1);if(ne==="Object"&&B.constructor&&(ne=B.constructor.name),ne==="Map"||ne==="Set")return Array.from(B);if(ne==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(ne))return h(B,V)}}function h(B,V){(V==null||V>B.length)&&(V=B.length);for(var ne=0,ae=new Array(V);ne<V;ne++)ae[ne]=B[ne];return ae}function p(B,V){var ne=B==null?null:typeof Symbol<"u"&&B[Symbol.iterator]||B["@@iterator"];if(ne!=null){var ae,ce,_e,de,ve=[],Ae=!0,De=!1;try{if(_e=(ne=ne.call(B)).next,V!==0)for(;!(Ae=(ae=_e.call(ne)).done)&&(ve.push(ae.value),ve.length!==V);Ae=!0);}catch(K){De=!0,ce=K}finally{try{if(!Ae&&ne.return!=null&&(de=ne.return(),Object(de)!==de))return}finally{if(De)throw ce}}return ve}}function a(B){if(Array.isArray(B))return B}function r(B){"@babel/helpers - typeof";return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(V){return typeof V}:function(V){return V&&typeof Symbol=="function"&&V.constructor===Symbol&&V!==Symbol.prototype?"symbol":typeof V},r(B)}var n=/a/g.flags!==void 0,t=function(V){var ne=[];return V.forEach(function(ae){return ne.push(ae)}),ne},s=function(V){var ne=[];return V.forEach(function(ae,ce){return ne.push([ce,ae])}),ne},e=Object.is?Object.is:a0(),o=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:c0();function f(B){return B.call.bind(B)}var d=f(Object.prototype.hasOwnProperty),g=f(Object.prototype.propertyIsEnumerable),x=f(Object.prototype.toString),m=wn().types,y=m.isAnyArrayBuffer,_=m.isArrayBufferView,v=m.isDate,N=m.isMap,T=m.isRegExp,b=m.isSet,O=m.isNativeError,D=m.isBoxedPrimitive,k=m.isNumberObject,z=m.isStringObject,U=m.isBooleanObject,te=m.isBigIntObject,ie=m.isSymbolObject,oe=m.isFloat32Array,he=m.isFloat64Array;function Ee(B){if(B.length===0||B.length>10)return!0;for(var V=0;V<B.length;V++){var ne=B.charCodeAt(V);if(ne<48||ne>57)return!0}return B.length===10&&B>=Math.pow(2,32)}function le(B){return Object.keys(B).filter(Ee).concat(o(B).filter(Object.prototype.propertyIsEnumerable.bind(B)))}function Z(B,V){if(B===V)return 0;for(var ne=B.length,ae=V.length,ce=0,_e=Math.min(ne,ae);ce<_e;++ce)if(B[ce]!==V[ce]){ne=B[ce],ae=V[ce];break}return ne<ae?-1:ae<ne?1:0}var ee=!0,J=!1,F=0,E=1,A=2,S=3;function C(B,V){return n?B.source===V.source&&B.flags===V.flags:RegExp.prototype.toString.call(B)===RegExp.prototype.toString.call(V)}function P(B,V){if(B.byteLength!==V.byteLength)return!1;for(var ne=0;ne<B.byteLength;ne++)if(B[ne]!==V[ne])return!1;return!0}function R(B,V){return B.byteLength!==V.byteLength?!1:Z(new Uint8Array(B.buffer,B.byteOffset,B.byteLength),new Uint8Array(V.buffer,V.byteOffset,V.byteLength))===0}function I(B,V){return B.byteLength===V.byteLength&&Z(new Uint8Array(B),new Uint8Array(V))===0}function M(B,V){return k(B)?k(V)&&e(Number.prototype.valueOf.call(B),Number.prototype.valueOf.call(V)):z(B)?z(V)&&String.prototype.valueOf.call(B)===String.prototype.valueOf.call(V):U(B)?U(V)&&Boolean.prototype.valueOf.call(B)===Boolean.prototype.valueOf.call(V):te(B)?te(V)&&BigInt.prototype.valueOf.call(B)===BigInt.prototype.valueOf.call(V):ie(V)&&Symbol.prototype.valueOf.call(B)===Symbol.prototype.valueOf.call(V)}function W(B,V,ne,ae){if(B===V)return B!==0?!0:ne?e(B,V):!0;if(ne){if(r(B)!=="object")return typeof B=="number"&&l(B)&&l(V);if(r(V)!=="object"||B===null||V===null||Object.getPrototypeOf(B)!==Object.getPrototypeOf(V))return!1}else{if(B===null||r(B)!=="object")return V===null||r(V)!=="object"?B==V:!1;if(V===null||r(V)!=="object")return!1}var ce=x(B),_e=x(V);if(ce!==_e)return!1;if(Array.isArray(B)){if(B.length!==V.length)return!1;var de=le(B),ve=le(V);return de.length!==ve.length?!1:w(B,V,ne,ae,E,de)}if(ce==="[object Object]"&&(!N(B)&&N(V)||!b(B)&&b(V)))return!1;if(v(B)){if(!v(V)||Date.prototype.getTime.call(B)!==Date.prototype.getTime.call(V))return!1}else if(T(B)){if(!T(V)||!C(B,V))return!1}else if(O(B)||B instanceof Error){if(B.message!==V.message||B.name!==V.name)return!1}else if(_(B)){if(!ne&&(oe(B)||he(B))){if(!P(B,V))return!1}else if(!R(B,V))return!1;var Ae=le(B),De=le(V);return Ae.length!==De.length?!1:w(B,V,ne,ae,F,Ae)}else{if(b(B))return!b(V)||B.size!==V.size?!1:w(B,V,ne,ae,A);if(N(B))return!N(V)||B.size!==V.size?!1:w(B,V,ne,ae,S);if(y(B)){if(!I(B,V))return!1}else if(D(B)&&!M(B,V))return!1}return w(B,V,ne,ae,F)}function G(B,V){return V.filter(function(ne){return g(B,ne)})}function w(B,V,ne,ae,ce,_e){if(arguments.length===5){_e=Object.keys(B);var de=Object.keys(V);if(_e.length!==de.length)return!1}for(var ve=0;ve<_e.length;ve++)if(!d(V,_e[ve]))return!1;if(ne&&arguments.length===5){var Ae=o(B);if(Ae.length!==0){var De=0;for(ve=0;ve<Ae.length;ve++){var K=Ae[ve];if(g(B,K)){if(!g(V,K))return!1;_e.push(K),De++}else if(g(V,K))return!1}var fe=o(V);if(Ae.length!==fe.length&&G(V,fe).length!==De)return!1}else{var pe=o(V);if(pe.length!==0&&G(V,pe).length!==0)return!1}}if(_e.length===0&&(ce===F||ce===E&&B.length===0||B.size===0))return!0;if(ae===void 0)ae={val1:new Map,val2:new Map,position:0};else{var xe=ae.val1.get(B);if(xe!==void 0){var Se=ae.val2.get(V);if(Se!==void 0)return xe===Se}ae.position++}ae.val1.set(B,ae.position),ae.val2.set(V,ae.position);var Me=se(B,V,ne,_e,ae,ce);return ae.val1.delete(B),ae.val2.delete(V),Me}function L(B,V,ne,ae){for(var ce=t(B),_e=0;_e<ce.length;_e++){var de=ce[_e];if(W(V,de,ne,ae))return B.delete(de),!0}return!1}function H(B){switch(r(B)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":B=+B;case"number":if(l(B))return!1}return!0}function X(B,V,ne){var ae=H(ne);return ae??(V.has(ae)&&!B.has(ae))}function Y(B,V,ne,ae,ce){var _e=H(ne);if(_e!=null)return _e;var de=V.get(_e);return de===void 0&&!V.has(_e)||!W(ae,de,!1,ce)?!1:!B.has(_e)&&W(ae,de,!1,ce)}function re(B,V,ne,ae){for(var ce=null,_e=t(B),de=0;de<_e.length;de++){var ve=_e[de];if(r(ve)==="object"&&ve!==null)ce===null&&(ce=new Set),ce.add(ve);else if(!V.has(ve)){if(ne||!X(B,V,ve))return!1;ce===null&&(ce=new Set),ce.add(ve)}}if(ce!==null){for(var Ae=t(V),De=0;De<Ae.length;De++){var K=Ae[De];if(r(K)==="object"&&K!==null){if(!L(ce,K,ne,ae))return!1}else if(!ne&&!B.has(K)&&!L(ce,K,ne,ae))return!1}return ce.size===0}return!0}function q(B,V,ne,ae,ce,_e){for(var de=t(B),ve=0;ve<de.length;ve++){var Ae=de[ve];if(W(ne,Ae,ce,_e)&&W(ae,V.get(Ae),ce,_e))return B.delete(Ae),!0}return!1}function $(B,V,ne,ae){for(var ce=null,_e=s(B),de=0;de<_e.length;de++){var ve=u(_e[de],2),Ae=ve[0],De=ve[1];if(r(Ae)==="object"&&Ae!==null)ce===null&&(ce=new Set),ce.add(Ae);else{var K=V.get(Ae);if(K===void 0&&!V.has(Ae)||!W(De,K,ne,ae)){if(ne||!Y(B,V,Ae,De,ae))return!1;ce===null&&(ce=new Set),ce.add(Ae)}}}if(ce!==null){for(var fe=s(V),pe=0;pe<fe.length;pe++){var xe=u(fe[pe],2),Se=xe[0],Me=xe[1];if(r(Se)==="object"&&Se!==null){if(!q(ce,B,Se,Me,ne,ae))return!1}else if(!ne&&(!B.has(Se)||!W(B.get(Se),Me,!1,ae))&&!q(ce,B,Se,Me,!1,ae))return!1}return ce.size===0}return!0}function se(B,V,ne,ae,ce,_e){var de=0;if(_e===A){if(!re(B,V,ne,ce))return!1}else if(_e===S){if(!$(B,V,ne,ce))return!1}else if(_e===E)for(;de<B.length;de++)if(d(B,de)){if(!d(V,de)||!W(B[de],V[de],ne,ce))return!1}else{if(d(V,de))return!1;for(var ve=Object.keys(B);de<ve.length;de++){var Ae=ve[de];if(!d(V,Ae)||!W(B[Ae],V[Ae],ne,ce))return!1}return ve.length===Object.keys(V).length}for(de=0;de<ae.length;de++){var De=ae[de];if(!W(B[De],V[De],ne,ce))return!1}return!0}function me(B,V){return W(B,V,J)}function ge(B,V){return W(B,V,ee)}return Cs={isDeepEqual:me,isDeepStrictEqual:ge},Cs}var pl;function Fe(){if(pl)return Yi.exports;pl=1;function u(A){"@babel/helpers - typeof";return u=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},u(A)}function i(A,S,C){return Object.defineProperty(A,"prototype",{writable:!1}),A}function c(A,S){if(!(A instanceof S))throw new TypeError("Cannot call a class as a function")}var h=Va(),p=h.codes,a=p.ERR_AMBIGUOUS_ARGUMENT,r=p.ERR_INVALID_ARG_TYPE,n=p.ERR_INVALID_ARG_VALUE,t=p.ERR_INVALID_RETURN_VALUE,s=p.ERR_MISSING_ARGS,e=r0(),o=wn(),l=o.inspect,f=wn().types,d=f.isPromise,g=f.isRegExp,x=o0()(),m=ms()(),y=s0()("RegExp.prototype.test"),_,v;function N(){var A=f0();_=A.isDeepEqual,v=A.isDeepStrictEqual}var T=!1,b=Yi.exports=U,O={};function D(A){throw A.message instanceof Error?A.message:new e(A)}function k(A,S,C,P,R){var I=arguments.length,M;if(I===0)M="Failed";else if(I===1)C=A,A=void 0;else{if(T===!1){T=!0;var W=be.emitWarning?be.emitWarning:console.warn.bind(console);W("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094")}I===2&&(P="!=")}if(C instanceof Error)throw C;var G={actual:A,expected:S,operator:P===void 0?"fail":P,stackStartFn:R||k};C!==void 0&&(G.message=C);var w=new e(G);throw M&&(w.message=M,w.generatedMessage=!0),w}b.fail=k,b.AssertionError=e;function z(A,S,C,P){if(!C){var R=!1;if(S===0)R=!0,P="No value argument passed to `assert.ok()`";else if(P instanceof Error)throw P;var I=new e({actual:C,expected:!0,message:P,operator:"==",stackStartFn:A});throw I.generatedMessage=R,I}}function U(){for(var A=arguments.length,S=new Array(A),C=0;C<A;C++)S[C]=arguments[C];z.apply(void 0,[U,S.length].concat(S))}b.ok=U,b.equal=function A(S,C,P){if(arguments.length<2)throw new s("actual","expected");S!=C&&D({actual:S,expected:C,message:P,operator:"==",stackStartFn:A})},b.notEqual=function A(S,C,P){if(arguments.length<2)throw new s("actual","expected");S==C&&D({actual:S,expected:C,message:P,operator:"!=",stackStartFn:A})},b.deepEqual=function A(S,C,P){if(arguments.length<2)throw new s("actual","expected");_===void 0&&N(),_(S,C)||D({actual:S,expected:C,message:P,operator:"deepEqual",stackStartFn:A})},b.notDeepEqual=function A(S,C,P){if(arguments.length<2)throw new s("actual","expected");_===void 0&&N(),_(S,C)&&D({actual:S,expected:C,message:P,operator:"notDeepEqual",stackStartFn:A})},b.deepStrictEqual=function A(S,C,P){if(arguments.length<2)throw new s("actual","expected");_===void 0&&N(),v(S,C)||D({actual:S,expected:C,message:P,operator:"deepStrictEqual",stackStartFn:A})},b.notDeepStrictEqual=te;function te(A,S,C){if(arguments.length<2)throw new s("actual","expected");_===void 0&&N(),v(A,S)&&D({actual:A,expected:S,message:C,operator:"notDeepStrictEqual",stackStartFn:te})}b.strictEqual=function A(S,C,P){if(arguments.length<2)throw new s("actual","expected");m(S,C)||D({actual:S,expected:C,message:P,operator:"strictEqual",stackStartFn:A})},b.notStrictEqual=function A(S,C,P){if(arguments.length<2)throw new s("actual","expected");m(S,C)&&D({actual:S,expected:C,message:P,operator:"notStrictEqual",stackStartFn:A})};var ie=i(function A(S,C,P){var R=this;c(this,A),C.forEach(function(I){I in S&&(P!==void 0&&typeof P[I]=="string"&&g(S[I])&&y(S[I],P[I])?R[I]=P[I]:R[I]=S[I])})});function oe(A,S,C,P,R,I){if(!(C in A)||!v(A[C],S[C])){if(!P){var M=new ie(A,R),W=new ie(S,R,A),G=new e({actual:M,expected:W,operator:"deepStrictEqual",stackStartFn:I});throw G.actual=A,G.expected=S,G.operator=I.name,G}D({actual:A,expected:S,message:P,operator:I.name,stackStartFn:I})}}function he(A,S,C,P){if(typeof S!="function"){if(g(S))return y(S,A);if(arguments.length===2)throw new r("expected",["Function","RegExp"],S);if(u(A)!=="object"||A===null){var R=new e({actual:A,expected:S,message:C,operator:"deepStrictEqual",stackStartFn:P});throw R.operator=P.name,R}var I=Object.keys(S);if(S instanceof Error)I.push("name","message");else if(I.length===0)throw new n("error",S,"may not be an empty object");return _===void 0&&N(),I.forEach(function(M){typeof A[M]=="string"&&g(S[M])&&y(S[M],A[M])||oe(A,S,M,C,I,P)}),!0}return S.prototype!==void 0&&A instanceof S?!0:Error.isPrototypeOf(S)?!1:S.call({},A)===!0}function Ee(A){if(typeof A!="function")throw new r("fn","Function",A);try{A()}catch(S){return S}return O}function le(A){return d(A)||A!==null&&u(A)==="object"&&typeof A.then=="function"&&typeof A.catch=="function"}function Z(A){return Promise.resolve().then(function(){var S;if(typeof A=="function"){if(S=A(),!le(S))throw new t("instance of Promise","promiseFn",S)}else if(le(A))S=A;else throw new r("promiseFn",["Function","Promise"],A);return Promise.resolve().then(function(){return S}).then(function(){return O}).catch(function(C){return C})})}function ee(A,S,C,P){if(typeof C=="string"){if(arguments.length===4)throw new r("error",["Object","Error","Function","RegExp"],C);if(u(S)==="object"&&S!==null){if(S.message===C)throw new a("error/message",'The error message "'.concat(S.message,'" is identical to the message.'))}else if(S===C)throw new a("error/message",'The error "'.concat(S,'" is identical to the message.'));P=C,C=void 0}else if(C!=null&&u(C)!=="object"&&typeof C!="function")throw new r("error",["Object","Error","Function","RegExp"],C);if(S===O){var R="";C&&C.name&&(R+=" (".concat(C.name,")")),R+=P?": ".concat(P):".";var I=A.name==="rejects"?"rejection":"exception";D({actual:void 0,expected:C,operator:A.name,message:"Missing expected ".concat(I).concat(R),stackStartFn:A})}if(C&&!he(S,C,P,A))throw S}function J(A,S,C,P){if(S!==O){if(typeof C=="string"&&(P=C,C=void 0),!C||he(S,C)){var R=P?": ".concat(P):".",I=A.name==="doesNotReject"?"rejection":"exception";D({actual:S,expected:C,operator:A.name,message:"Got unwanted ".concat(I).concat(R,`
|
|
58
|
+
`)+'Actual message: "'.concat(S&&S.message,'"'),stackStartFn:A})}throw S}}b.throws=function A(S){for(var C=arguments.length,P=new Array(C>1?C-1:0),R=1;R<C;R++)P[R-1]=arguments[R];ee.apply(void 0,[A,Ee(S)].concat(P))},b.rejects=function A(S){for(var C=arguments.length,P=new Array(C>1?C-1:0),R=1;R<C;R++)P[R-1]=arguments[R];return Z(S).then(function(I){return ee.apply(void 0,[A,I].concat(P))})},b.doesNotThrow=function A(S){for(var C=arguments.length,P=new Array(C>1?C-1:0),R=1;R<C;R++)P[R-1]=arguments[R];J.apply(void 0,[A,Ee(S)].concat(P))},b.doesNotReject=function A(S){for(var C=arguments.length,P=new Array(C>1?C-1:0),R=1;R<C;R++)P[R-1]=arguments[R];return Z(S).then(function(I){return J.apply(void 0,[A,I].concat(P))})},b.ifError=function A(S){if(S!=null){var C="ifError got unwanted exception: ";u(S)==="object"&&typeof S.message=="string"?S.message.length===0&&S.constructor?C+=S.constructor.name:C+=S.message:C+=l(S);var P=new e({actual:S,expected:null,operator:"ifError",message:C,stackStartFn:A}),R=S.stack;if(typeof R=="string"){var I=R.split(`
|
|
70
59
|
`);I.shift();for(var M=P.stack.split(`
|
|
71
|
-
`),
|
|
60
|
+
`),W=0;W<I.length;W++){var G=M.indexOf(I[W]);if(G!==-1){M=M.slice(0,G);break}}P.stack="".concat(M.join(`
|
|
72
61
|
`),`
|
|
73
62
|
`).concat(I.join(`
|
|
74
|
-
`))}throw P}};function
|
|
63
|
+
`))}throw P}};function F(A,S,C,P,R){if(!g(S))throw new r("regexp","RegExp",S);var I=R==="match";if(typeof A!="string"||y(S,A)!==I){if(C instanceof Error)throw C;var M=!C;C=C||(typeof A!="string"?'The "string" argument must be of type string. Received type '+"".concat(u(A)," (").concat(l(A),")"):(I?"The input did not match the regular expression ":"The input was expected to not match the regular expression ")+"".concat(l(S),`. Input:
|
|
75
64
|
|
|
76
65
|
`).concat(l(A),`
|
|
77
|
-
`));var V=new e({actual:A,expected:S,message:C,operator:R,stackStartFn:P});throw V.generatedMessage=M,V}}b.match=function A(S,C,P){B(S,C,P,A,"match")},b.doesNotMatch=function A(S,C,P){B(S,C,P,A,"doesNotMatch")};function E(){for(var A=arguments.length,S=new Array(A),C=0;C<A;C++)S[C]=arguments[C];z.apply(void 0,[E,S.length].concat(S))}return b.strict=x(E,b,{equal:b.strictEqual,deepEqual:b.deepStrictEqual,notEqual:b.notStrictEqual,notDeepEqual:b.notDeepStrictEqual}),b.strict.strict=b.strict,ro.exports}var Qe={},xl;function Q(){if(xl)return Qe;xl=1;/*!
|
|
78
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
79
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
80
|
-
*/Object.defineProperty(Qe,"__esModule",{value:!0}),Qe.SuppressWarnings=Qe.Override=Qe.Nullable=Qe.NotNull=void 0;function u(p,a,r){}Qe.NotNull=u;function i(p,a,r){}Qe.Nullable=i;function c(p,a,r){}Qe.Override=c;function h(p){return(a,r,n)=>{}}return Qe.SuppressWarnings=h,Qe}var Ps={},yl;function hr(){return yl||(yl=1,function(u){/*!
|
|
81
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
82
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
83
|
-
*/Object.defineProperty(u,"__esModule",{value:!0}),u.IntStream=void 0,function(i){i.EOF=-1,i.UNKNOWN_SOURCE_NAME="<unknown>"}(u.IntStream||(u.IntStream={}))}(Ps)),Ps}var _l;function h0(){if(_l)return Tr;_l=1;/*!
|
|
84
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
85
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
86
|
-
*/var u=Tr&&Tr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Tr,"__esModule",{value:!0}),Tr.ANTLRInputStream=void 0;const i=Me(),c=Q(),h=hr();let p=class{constructor(r){this.p=0,this.data=r,this.n=r.length}reset(){this.p=0}consume(){if(this.p>=this.n)throw i(this.LA(1)===h.IntStream.EOF),new Error("cannot consume EOF");this.p<this.n&&this.p++}LA(r){return r===0?0:r<0&&(r++,this.p+r-1<0)||this.p+r-1>=this.n?h.IntStream.EOF:this.data.charCodeAt(this.p+r-1)}LT(r){return this.LA(r)}get index(){return this.p}get size(){return this.n}mark(){return-1}release(r){}seek(r){if(r<=this.p){this.p=r;return}for(r=Math.min(r,this.n);this.p<r;)this.consume()}getText(r){let n=r.a,t=r.b;t>=this.n&&(t=this.n-1);let s=t-n+1;return n>=this.n?"":this.data.substr(n,s)}get sourceName(){return this.name?this.name:h.IntStream.UNKNOWN_SOURCE_NAME}toString(){return this.data}};return u([c.Override],p.prototype,"consume",null),u([c.Override],p.prototype,"LA",null),u([c.Override],p.prototype,"index",null),u([c.Override],p.prototype,"size",null),u([c.Override],p.prototype,"mark",null),u([c.Override],p.prototype,"release",null),u([c.Override],p.prototype,"seek",null),u([c.Override],p.prototype,"getText",null),u([c.Override],p.prototype,"sourceName",null),u([c.Override],p.prototype,"toString",null),Tr.ANTLRInputStream=p,Tr}var Sr={},st={},zn={},ml;function ut(){return ml||(ml=1,function(u){/*!
|
|
87
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
88
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
89
|
-
*/var i=zn&&zn.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(u,"__esModule",{value:!0}),u.ATNState=void 0;const c=Q();let h=class vu{constructor(){this.stateNumber=vu.INVALID_STATE_NUMBER,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.optimizedTransitions=this.transitions}getStateNumber(){return this.stateNumber}get nonStopStateNumber(){return this.getStateNumber()}hashCode(){return this.stateNumber}equals(a){return a instanceof vu?this.stateNumber===a.stateNumber:!1}get isNonGreedyExitState(){return!1}toString(){return String(this.stateNumber)}getTransitions(){return this.transitions.slice(0)}get numberOfTransitions(){return this.transitions.length}addTransition(a,r){if(this.transitions.length===0)this.epsilonOnlyTransitions=a.isEpsilon;else if(this.epsilonOnlyTransitions!==a.isEpsilon)throw this.epsilonOnlyTransitions=!1,new Error("ATN state "+this.stateNumber+" has both epsilon and non-epsilon transitions.");this.transitions.splice(r!==void 0?r:this.transitions.length,0,a)}transition(a){return this.transitions[a]}setTransition(a,r){this.transitions[a]=r}removeTransition(a){return this.transitions.splice(a,1)[0]}get onlyHasEpsilonTransitions(){return this.epsilonOnlyTransitions}setRuleIndex(a){this.ruleIndex=a}get isOptimized(){return this.optimizedTransitions!==this.transitions}get numberOfOptimizedTransitions(){return this.optimizedTransitions.length}getOptimizedTransition(a){return this.optimizedTransitions[a]}addOptimizedTransition(a){this.isOptimized||(this.optimizedTransitions=new Array),this.optimizedTransitions.push(a)}setOptimizedTransition(a,r){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions[a]=r}removeOptimizedTransition(a){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions.splice(a,1)}};i([c.Override],h.prototype,"hashCode",null),i([c.Override],h.prototype,"equals",null),i([c.Override],h.prototype,"toString",null),u.ATNState=h,function(p){p.INVALID_STATE_NUMBER=-1}(h=u.ATNState||(u.ATNState={}))}(zn)),zn}var Ds={},gl;function Fe(){return gl||(gl=1,function(u){/*!
|
|
90
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
91
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
92
|
-
*/Object.defineProperty(u,"__esModule",{value:!0}),u.ATNStateType=void 0,function(i){i[i.INVALID_TYPE=0]="INVALID_TYPE",i[i.BASIC=1]="BASIC",i[i.RULE_START=2]="RULE_START",i[i.BLOCK_START=3]="BLOCK_START",i[i.PLUS_BLOCK_START=4]="PLUS_BLOCK_START",i[i.STAR_BLOCK_START=5]="STAR_BLOCK_START",i[i.TOKEN_START=6]="TOKEN_START",i[i.RULE_STOP=7]="RULE_STOP",i[i.BLOCK_END=8]="BLOCK_END",i[i.STAR_LOOP_BACK=9]="STAR_LOOP_BACK",i[i.STAR_LOOP_ENTRY=10]="STAR_LOOP_ENTRY",i[i.PLUS_LOOP_BACK=11]="PLUS_LOOP_BACK",i[i.LOOP_END=12]="LOOP_END"}(u.ATNStateType||(u.ATNStateType={}))}(Ds)),Ds}var at={},Hn={},vl;function pr(){if(vl)return Hn;vl=1;/*!
|
|
93
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
94
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
95
|
-
*/Object.defineProperty(Hn,"__esModule",{value:!0}),Hn.RecognitionException=void 0;let u=class extends Error{constructor(c,h,p,a){super(a),this._offendingState=-1,this._recognizer=c,this.input=h,this.ctx=p,c&&(this._offendingState=c.state)}get offendingState(){return this._offendingState}setOffendingState(c){this._offendingState=c}get expectedTokens(){if(this._recognizer)return this._recognizer.atn.getExpectedTokens(this._offendingState,this.ctx)}get context(){return this.ctx}get inputStream(){return this.input}getOffendingToken(c){if(!(c&&c!==this._recognizer))return this.offendingToken}setOffendingToken(c,h){c===this._recognizer&&(this.offendingToken=h)}get recognizer(){return this._recognizer}};return Hn.RecognitionException=u,Hn}var lt={},$n={},ct={},Al;function dr(){if(Al)return ct;Al=1;/*!
|
|
96
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
97
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
98
|
-
*/var u=ct&&ct.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s},i=ct&&ct.__param||function(p,a){return function(r,n){a(r,n,p)}};Object.defineProperty(ct,"__esModule",{value:!0}),ct.Transition=void 0;const c=Q();let h=class{constructor(a){if(a==null)throw new Error("target cannot be null.");this.target=a}get isEpsilon(){return!1}get label(){}};return h.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],u([c.NotNull],h.prototype,"target",void 0),h=u([i(0,c.NotNull)],h),ct.Transition=h,ct}var Tl;function Is(){if(Tl)return $n;Tl=1;/*!
|
|
99
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
100
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
101
|
-
*/Object.defineProperty($n,"__esModule",{value:!0}),$n.AbstractPredicateTransition=void 0;const u=dr();let i=class extends u.Transition{constructor(h){super(h)}};return $n.AbstractPredicateTransition=i,$n}var Nr={},ft={},br={},ws={},El;function we(){return El||(El=1,function(u){/*!
|
|
102
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
103
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
104
|
-
*/Object.defineProperty(u,"__esModule",{value:!0}),u.MurmurHash=void 0,function(i){function h(t=0){return t}i.initialize=h;function p(t,s){s==null?s=0:typeof s=="string"?s=n(s):typeof s=="object"&&(s=s.hashCode());let x=s;return x=Math.imul(x,3432918353),x=x<<15|x>>>17,x=Math.imul(x,461845907),t=t^x,t=t<<13|t>>>19,t=Math.imul(t,5)+3864292196,t&4294967295}i.update=p;function a(t,s){return t=t^s*4,t=t^t>>>16,t=Math.imul(t,2246822507),t=t^t>>>13,t=Math.imul(t,3266489909),t=t^t>>>16,t}i.finish=a;function r(t,s=0){let e=h(s),o=0;for(let l of t)e=p(e,l),o++;return e=a(e,o),e}i.hashCode=r;function n(t){let s=t.length;if(s===0)return 0;let e=0;for(let o=0;o<s;o++){let l=t.charCodeAt(o);e=(e<<5>>>0)-e+l,e|=0}return e}}(u.MurmurHash||(u.MurmurHash={}))}(ws)),ws}var Cr={},Sl;function nt(){if(Sl)return Cr;Sl=1;/*!
|
|
105
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
106
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
107
|
-
*/var u=Cr&&Cr.__decorate||function(h,p,a,r){var n=arguments.length,t=n<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,a):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(h,p,a,r);else for(var e=h.length-1;e>=0;e--)(s=h[e])&&(t=(n<3?s(t):n>3?s(p,a,t):s(p,a))||t);return n>3&&t&&Object.defineProperty(p,a,t),t};Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.ObjectEqualityComparator=void 0;const i=Q();let c=class{hashCode(p){return p==null?0:p.hashCode()}equals(p,a){return p==null?a==null:p.equals(a)}};return c.INSTANCE=new c,u([i.Override],c.prototype,"hashCode",null),u([i.Override],c.prototype,"equals",null),Cr.ObjectEqualityComparator=c,Cr}var Nl;function p0(){if(Nl)return br;Nl=1;/*!
|
|
108
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
109
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
110
|
-
*/var u=br&&br.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(br,"__esModule",{value:!0}),br.DefaultEqualityComparator=void 0;const i=Q(),c=we(),h=nt();let p=class{hashCode(r){return r==null?0:typeof r=="string"||typeof r=="number"?c.MurmurHash.hashCode([r]):h.ObjectEqualityComparator.INSTANCE.hashCode(r)}equals(r,n){return r==null?n==null:typeof r=="string"||typeof r=="number"?r===n:h.ObjectEqualityComparator.INSTANCE.equals(r,n)}};return p.INSTANCE=new p,u([i.Override],p.prototype,"hashCode",null),u([i.Override],p.prototype,"equals",null),br.DefaultEqualityComparator=p,br}var bl;function xr(){if(bl)return ft;bl=1;/*!
|
|
111
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
112
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
113
|
-
*/var u=ft&&ft.__decorate||function(s,e,o,l){var f=arguments.length,d=f<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,o):l,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(s,e,o,l);else for(var x=s.length-1;x>=0;x--)(g=s[x])&&(d=(f<3?g(d):f>3?g(e,o,d):g(e,o))||d);return f>3&&d&&Object.defineProperty(e,o,d),d},i=ft&&ft.__param||function(s,e){return function(o,l){e(o,l,s)}};Object.defineProperty(ft,"__esModule",{value:!0}),ft.Array2DHashSet=void 0;const c=Me(),h=p0(),p=Q(),a=we(),r=16,n=.75;let t=class Gi{constructor(e,o=r){if(this.n=0,this.threshold=Math.floor(r*n),e instanceof Gi){this.comparator=e.comparator,this.buckets=e.buckets.slice(0);for(let l=0;l<this.buckets.length;l++){let f=this.buckets[l];f&&(this.buckets[l]=f.slice(0))}this.n=e.n,this.threshold=e.threshold}else this.comparator=e||h.DefaultEqualityComparator.INSTANCE,this.buckets=this.createBuckets(o)}getOrAdd(e){return this.n>this.threshold&&this.expand(),this.getOrAddImpl(e)}getOrAddImpl(e){let o=this.getBucket(e),l=this.buckets[o];if(!l)return l=[e],this.buckets[o]=l,this.n++,e;for(let f of l)if(this.comparator.equals(f,e))return f;return l.push(e),this.n++,e}get(e){if(e==null)return e;let o=this.getBucket(e),l=this.buckets[o];if(l){for(let f of l)if(this.comparator.equals(f,e))return f}}getBucket(e){return this.comparator.hashCode(e)&this.buckets.length-1}hashCode(){let e=a.MurmurHash.initialize();for(let o of this.buckets)if(o!=null)for(let l of o){if(l==null)break;e=a.MurmurHash.update(e,this.comparator.hashCode(l))}return e=a.MurmurHash.finish(e,this.size),e}equals(e){return e===this?!0:!(e instanceof Gi)||e.size!==this.size?!1:this.containsAll(e)}expand(){let e=this.buckets,o=this.buckets.length*2,l=this.createBuckets(o);this.buckets=l,this.threshold=Math.floor(o*n);let f=this.size;for(let d of e)if(d)for(let g of d){let x=this.getBucket(g),m=this.buckets[x];m||(m=[],this.buckets[x]=m),m.push(g)}c(this.n===f)}add(e){return this.getOrAdd(e)===e}get size(){return this.n}get isEmpty(){return this.n===0}contains(e){return this.containsFast(this.asElementType(e))}containsFast(e){return e==null?!1:this.get(e)!=null}*[Symbol.iterator](){yield*this.toArray()}toArray(){const e=new Array(this.size);let o=0;for(let l of this.buckets)if(l!=null)for(let f of l){if(f==null)break;e[o++]=f}return e}containsAll(e){if(e instanceof Gi){let o=e;for(let l of o.buckets)if(l!=null)for(let f of l){if(f==null)break;if(!this.containsFast(this.asElementType(f)))return!1}}else for(let o of e)if(!this.containsFast(this.asElementType(o)))return!1;return!0}addAll(e){let o=!1;for(let l of e)this.getOrAdd(l)!==l&&(o=!0);return o}clear(){this.buckets=this.createBuckets(r),this.n=0,this.threshold=Math.floor(r*n)}toString(){if(this.size===0)return"{}";let e="{",o=!0;for(let l of this.buckets)if(l!=null)for(let f of l){if(f==null)break;o?o=!1:e+=", ",e+=f.toString()}return e+="}",e}toTableString(){let e="";for(let o of this.buckets){if(o==null){e+=`null
|
|
66
|
+
`));var W=new e({actual:A,expected:S,message:C,operator:R,stackStartFn:P});throw W.generatedMessage=M,W}}b.match=function A(S,C,P){F(S,C,P,A,"match")},b.doesNotMatch=function A(S,C,P){F(S,C,P,A,"doesNotMatch")};function E(){for(var A=arguments.length,S=new Array(A),C=0;C<A;C++)S[C]=arguments[C];z.apply(void 0,[E,S.length].concat(S))}return b.strict=x(E,b,{equal:b.strictEqual,deepEqual:b.deepStrictEqual,notEqual:b.notStrictEqual,notDeepEqual:b.notDeepStrictEqual}),b.strict.strict=b.strict,Yi.exports}var Ge={},dl;function Q(){if(dl)return Ge;dl=1;Object.defineProperty(Ge,"__esModule",{value:!0}),Ge.SuppressWarnings=Ge.Override=Ge.Nullable=Ge.NotNull=void 0;function u(p,a,r){}Ge.NotNull=u;function i(p,a,r){}Ge.Nullable=i;function c(p,a,r){}Ge.Override=c;function h(p){return(a,r,n)=>{}}return Ge.SuppressWarnings=h,Ge}var Os={},xl;function ur(){return xl||(xl=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.IntStream=void 0,(function(i){i.EOF=-1,i.UNKNOWN_SOURCE_NAME="<unknown>"})(u.IntStream||(u.IntStream={}))})(Os)),Os}var yl;function h0(){if(yl)return gr;yl=1;var u=gr&&gr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(gr,"__esModule",{value:!0}),gr.ANTLRInputStream=void 0;const i=Fe(),c=Q(),h=ur();let p=class{constructor(r){this.p=0,this.data=r,this.n=r.length}reset(){this.p=0}consume(){if(this.p>=this.n)throw i(this.LA(1)===h.IntStream.EOF),new Error("cannot consume EOF");this.p<this.n&&this.p++}LA(r){return r===0?0:r<0&&(r++,this.p+r-1<0)||this.p+r-1>=this.n?h.IntStream.EOF:this.data.charCodeAt(this.p+r-1)}LT(r){return this.LA(r)}get index(){return this.p}get size(){return this.n}mark(){return-1}release(r){}seek(r){if(r<=this.p){this.p=r;return}for(r=Math.min(r,this.n);this.p<r;)this.consume()}getText(r){let n=r.a,t=r.b;t>=this.n&&(t=this.n-1);let s=t-n+1;return n>=this.n?"":this.data.substr(n,s)}get sourceName(){return this.name?this.name:h.IntStream.UNKNOWN_SOURCE_NAME}toString(){return this.data}};return u([c.Override],p.prototype,"consume",null),u([c.Override],p.prototype,"LA",null),u([c.Override],p.prototype,"index",null),u([c.Override],p.prototype,"size",null),u([c.Override],p.prototype,"mark",null),u([c.Override],p.prototype,"release",null),u([c.Override],p.prototype,"seek",null),u([c.Override],p.prototype,"getText",null),u([c.Override],p.prototype,"sourceName",null),u([c.Override],p.prototype,"toString",null),gr.ANTLRInputStream=p,gr}var Ar={},tt={},kn={},_l;function rt(){return _l||(_l=1,(function(u){var i=kn&&kn.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(u,"__esModule",{value:!0}),u.ATNState=void 0;const c=Q();let h=class mu{constructor(){this.stateNumber=mu.INVALID_STATE_NUMBER,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.optimizedTransitions=this.transitions}getStateNumber(){return this.stateNumber}get nonStopStateNumber(){return this.getStateNumber()}hashCode(){return this.stateNumber}equals(a){return a instanceof mu?this.stateNumber===a.stateNumber:!1}get isNonGreedyExitState(){return!1}toString(){return String(this.stateNumber)}getTransitions(){return this.transitions.slice(0)}get numberOfTransitions(){return this.transitions.length}addTransition(a,r){if(this.transitions.length===0)this.epsilonOnlyTransitions=a.isEpsilon;else if(this.epsilonOnlyTransitions!==a.isEpsilon)throw this.epsilonOnlyTransitions=!1,new Error("ATN state "+this.stateNumber+" has both epsilon and non-epsilon transitions.");this.transitions.splice(r!==void 0?r:this.transitions.length,0,a)}transition(a){return this.transitions[a]}setTransition(a,r){this.transitions[a]=r}removeTransition(a){return this.transitions.splice(a,1)[0]}get onlyHasEpsilonTransitions(){return this.epsilonOnlyTransitions}setRuleIndex(a){this.ruleIndex=a}get isOptimized(){return this.optimizedTransitions!==this.transitions}get numberOfOptimizedTransitions(){return this.optimizedTransitions.length}getOptimizedTransition(a){return this.optimizedTransitions[a]}addOptimizedTransition(a){this.isOptimized||(this.optimizedTransitions=new Array),this.optimizedTransitions.push(a)}setOptimizedTransition(a,r){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions[a]=r}removeOptimizedTransition(a){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions.splice(a,1)}};i([c.Override],h.prototype,"hashCode",null),i([c.Override],h.prototype,"equals",null),i([c.Override],h.prototype,"toString",null),u.ATNState=h,(function(p){p.INVALID_STATE_NUMBER=-1})(h=u.ATNState||(u.ATNState={}))})(kn)),kn}var Rs={},ml;function Ie(){return ml||(ml=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.ATNStateType=void 0,(function(i){i[i.INVALID_TYPE=0]="INVALID_TYPE",i[i.BASIC=1]="BASIC",i[i.RULE_START=2]="RULE_START",i[i.BLOCK_START=3]="BLOCK_START",i[i.PLUS_BLOCK_START=4]="PLUS_BLOCK_START",i[i.STAR_BLOCK_START=5]="STAR_BLOCK_START",i[i.TOKEN_START=6]="TOKEN_START",i[i.RULE_STOP=7]="RULE_STOP",i[i.BLOCK_END=8]="BLOCK_END",i[i.STAR_LOOP_BACK=9]="STAR_LOOP_BACK",i[i.STAR_LOOP_ENTRY=10]="STAR_LOOP_ENTRY",i[i.PLUS_LOOP_BACK=11]="PLUS_LOOP_BACK",i[i.LOOP_END=12]="LOOP_END"})(u.ATNStateType||(u.ATNStateType={}))})(Rs)),Rs}var nt={},Un={},gl;function ar(){if(gl)return Un;gl=1;Object.defineProperty(Un,"__esModule",{value:!0}),Un.RecognitionException=void 0;let u=class extends Error{constructor(c,h,p,a){super(a),this._offendingState=-1,this._recognizer=c,this.input=h,this.ctx=p,c&&(this._offendingState=c.state)}get offendingState(){return this._offendingState}setOffendingState(c){this._offendingState=c}get expectedTokens(){if(this._recognizer)return this._recognizer.atn.getExpectedTokens(this._offendingState,this.ctx)}get context(){return this.ctx}get inputStream(){return this.input}getOffendingToken(c){if(!(c&&c!==this._recognizer))return this.offendingToken}setOffendingToken(c,h){c===this._recognizer&&(this.offendingToken=h)}get recognizer(){return this._recognizer}};return Un.RecognitionException=u,Un}var it={},zn={},ot={},vl;function lr(){if(vl)return ot;vl=1;var u=ot&&ot.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s},i=ot&&ot.__param||function(p,a){return function(r,n){a(r,n,p)}};Object.defineProperty(ot,"__esModule",{value:!0}),ot.Transition=void 0;const c=Q();let h=class{constructor(a){if(a==null)throw new Error("target cannot be null.");this.target=a}get isEpsilon(){return!1}get label(){}};return h.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],u([c.NotNull],h.prototype,"target",void 0),h=u([i(0,c.NotNull)],h),ot.Transition=h,ot}var Al;function Ps(){if(Al)return zn;Al=1;Object.defineProperty(zn,"__esModule",{value:!0}),zn.AbstractPredicateTransition=void 0;const u=lr();let i=class extends u.Transition{constructor(h){super(h)}};return zn.AbstractPredicateTransition=i,zn}var Tr={},st={},Er={},Ds={},Tl;function Pe(){return Tl||(Tl=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.MurmurHash=void 0,(function(i){function h(t=0){return t}i.initialize=h;function p(t,s){s==null?s=0:typeof s=="string"?s=n(s):typeof s=="object"&&(s=s.hashCode());let x=s;return x=Math.imul(x,3432918353),x=x<<15|x>>>17,x=Math.imul(x,461845907),t=t^x,t=t<<13|t>>>19,t=Math.imul(t,5)+3864292196,t&4294967295}i.update=p;function a(t,s){return t=t^s*4,t=t^t>>>16,t=Math.imul(t,2246822507),t=t^t>>>13,t=Math.imul(t,3266489909),t=t^t>>>16,t}i.finish=a;function r(t,s=0){let e=h(s),o=0;for(let l of t)e=p(e,l),o++;return e=a(e,o),e}i.hashCode=r;function n(t){let s=t.length;if(s===0)return 0;let e=0;for(let o=0;o<s;o++){let l=t.charCodeAt(o);e=(e<<5>>>0)-e+l,e|=0}return e}})(u.MurmurHash||(u.MurmurHash={}))})(Ds)),Ds}var Sr={},El;function Ze(){if(El)return Sr;El=1;var u=Sr&&Sr.__decorate||function(h,p,a,r){var n=arguments.length,t=n<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,a):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(h,p,a,r);else for(var e=h.length-1;e>=0;e--)(s=h[e])&&(t=(n<3?s(t):n>3?s(p,a,t):s(p,a))||t);return n>3&&t&&Object.defineProperty(p,a,t),t};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.ObjectEqualityComparator=void 0;const i=Q();let c=class{hashCode(p){return p==null?0:p.hashCode()}equals(p,a){return p==null?a==null:p.equals(a)}};return c.INSTANCE=new c,u([i.Override],c.prototype,"hashCode",null),u([i.Override],c.prototype,"equals",null),Sr.ObjectEqualityComparator=c,Sr}var Sl;function p0(){if(Sl)return Er;Sl=1;var u=Er&&Er.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Er,"__esModule",{value:!0}),Er.DefaultEqualityComparator=void 0;const i=Q(),c=Pe(),h=Ze();let p=class{hashCode(r){return r==null?0:typeof r=="string"||typeof r=="number"?c.MurmurHash.hashCode([r]):h.ObjectEqualityComparator.INSTANCE.hashCode(r)}equals(r,n){return r==null?n==null:typeof r=="string"||typeof r=="number"?r===n:h.ObjectEqualityComparator.INSTANCE.equals(r,n)}};return p.INSTANCE=new p,u([i.Override],p.prototype,"hashCode",null),u([i.Override],p.prototype,"equals",null),Er.DefaultEqualityComparator=p,Er}var Nl;function cr(){if(Nl)return st;Nl=1;var u=st&&st.__decorate||function(s,e,o,l){var f=arguments.length,d=f<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,o):l,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(s,e,o,l);else for(var x=s.length-1;x>=0;x--)(g=s[x])&&(d=(f<3?g(d):f>3?g(e,o,d):g(e,o))||d);return f>3&&d&&Object.defineProperty(e,o,d),d},i=st&&st.__param||function(s,e){return function(o,l){e(o,l,s)}};Object.defineProperty(st,"__esModule",{value:!0}),st.Array2DHashSet=void 0;const c=Fe(),h=p0(),p=Q(),a=Pe(),r=16,n=.75;let t=class Vi{constructor(e,o=r){if(this.n=0,this.threshold=Math.floor(r*n),e instanceof Vi){this.comparator=e.comparator,this.buckets=e.buckets.slice(0);for(let l=0;l<this.buckets.length;l++){let f=this.buckets[l];f&&(this.buckets[l]=f.slice(0))}this.n=e.n,this.threshold=e.threshold}else this.comparator=e||h.DefaultEqualityComparator.INSTANCE,this.buckets=this.createBuckets(o)}getOrAdd(e){return this.n>this.threshold&&this.expand(),this.getOrAddImpl(e)}getOrAddImpl(e){let o=this.getBucket(e),l=this.buckets[o];if(!l)return l=[e],this.buckets[o]=l,this.n++,e;for(let f of l)if(this.comparator.equals(f,e))return f;return l.push(e),this.n++,e}get(e){if(e==null)return e;let o=this.getBucket(e),l=this.buckets[o];if(l){for(let f of l)if(this.comparator.equals(f,e))return f}}getBucket(e){return this.comparator.hashCode(e)&this.buckets.length-1}hashCode(){let e=a.MurmurHash.initialize();for(let o of this.buckets)if(o!=null)for(let l of o){if(l==null)break;e=a.MurmurHash.update(e,this.comparator.hashCode(l))}return e=a.MurmurHash.finish(e,this.size),e}equals(e){return e===this?!0:!(e instanceof Vi)||e.size!==this.size?!1:this.containsAll(e)}expand(){let e=this.buckets,o=this.buckets.length*2,l=this.createBuckets(o);this.buckets=l,this.threshold=Math.floor(o*n);let f=this.size;for(let d of e)if(d)for(let g of d){let x=this.getBucket(g),m=this.buckets[x];m||(m=[],this.buckets[x]=m),m.push(g)}c(this.n===f)}add(e){return this.getOrAdd(e)===e}get size(){return this.n}get isEmpty(){return this.n===0}contains(e){return this.containsFast(this.asElementType(e))}containsFast(e){return e==null?!1:this.get(e)!=null}*[Symbol.iterator](){yield*this.toArray()}toArray(){const e=new Array(this.size);let o=0;for(let l of this.buckets)if(l!=null)for(let f of l){if(f==null)break;e[o++]=f}return e}containsAll(e){if(e instanceof Vi){let o=e;for(let l of o.buckets)if(l!=null)for(let f of l){if(f==null)break;if(!this.containsFast(this.asElementType(f)))return!1}}else for(let o of e)if(!this.containsFast(this.asElementType(o)))return!1;return!0}addAll(e){let o=!1;for(let l of e)this.getOrAdd(l)!==l&&(o=!0);return o}clear(){this.buckets=this.createBuckets(r),this.n=0,this.threshold=Math.floor(r*n)}toString(){if(this.size===0)return"{}";let e="{",o=!0;for(let l of this.buckets)if(l!=null)for(let f of l){if(f==null)break;o?o=!1:e+=", ",e+=f.toString()}return e+="}",e}toTableString(){let e="";for(let o of this.buckets){if(o==null){e+=`null
|
|
114
67
|
`;continue}e+="[";let l=!0;for(let f of o)l?l=!1:e+=" ",f==null?e+="_":e+=f.toString();e+=`]
|
|
115
|
-
`}return e}asElementType(e){return e}createBuckets(e){return new Array(e)}};return u([p.NotNull],t.prototype,"comparator",void 0),u([p.Override],t.prototype,"hashCode",null),u([p.Override],t.prototype,"equals",null),u([p.Override],t.prototype,"add",null),u([p.Override],t.prototype,"size",null),u([p.Override],t.prototype,"isEmpty",null),u([p.Override],t.prototype,"contains",null),u([i(0,p.Nullable)],t.prototype,"containsFast",null),u([p.Override],t.prototype,Symbol.iterator,null),u([p.Override],t.prototype,"toArray",null),u([p.Override],t.prototype,"containsAll",null),u([p.Override],t.prototype,"addAll",null),u([p.Override],t.prototype,"clear",null),u([p.Override],t.prototype,"toString",null),u([p.SuppressWarnings("unchecked")],t.prototype,"asElementType",null),u([p.SuppressWarnings("unchecked")],t.prototype,"createBuckets",null),ft.Array2DHashSet=t,ft}var Or={},Cl;function wi(){if(Cl)return Or;Cl=1;/*!
|
|
116
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
117
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
118
|
-
*/var u=Or&&Or.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Or,"__esModule",{value:!0}),Or.ArrayEqualityComparator=void 0;const i=Q(),c=we(),h=nt();let p=class{hashCode(r){return r==null?0:c.MurmurHash.hashCode(r,0)}equals(r,n){if(r==null)return n==null;if(n==null||r.length!==n.length)return!1;for(let t=0;t<r.length;t++)if(!h.ObjectEqualityComparator.INSTANCE.equals(r[t],n[t]))return!1;return!0}};return p.INSTANCE=new p,u([i.Override],p.prototype,"hashCode",null),u([i.Override],p.prototype,"equals",null),Or.ArrayEqualityComparator=p,Or}var He={},Ol;function ht(){if(Ol)return He;Ol=1;/*!
|
|
119
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
120
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
121
|
-
*/Object.defineProperty(He,"__esModule",{value:!0}),He.toCharArray=He.toMap=He.equals=He.join=He.escapeWhitespace=void 0;function u(a,r){return r?a.replace(/ /,"·"):a.replace(/\t/,"\\t").replace(/\n/,"\\n").replace(/\r/,"\\r")}He.escapeWhitespace=u;function i(a,r){let n="",t=!0;for(let s of a)t?t=!1:n+=r,n+=s;return n}He.join=i;function c(a,r){return a===r?!0:a===void 0||r===void 0?!1:a.equals(r)}He.equals=c;function h(a){let r=new Map;for(let n=0;n<a.length;n++)r.set(a[n],n);return r}He.toMap=h;function p(a){if(typeof a=="string"){let r=new Uint16Array(a.length);for(let n=0;n<a.length;n++)r[n]=a.charCodeAt(n);return r}else return a.toCharArray()}return He.toCharArray=p,He}var Rl;function Bn(){return Rl||(Rl=1,function(u){/*!
|
|
122
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
123
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
124
|
-
*/var i=Nr&&Nr.__decorate||function(l,f,d,g){var x=arguments.length,m=x<3?f:g===null?g=Object.getOwnPropertyDescriptor(f,d):g,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(l,f,d,g);else for(var _=l.length-1;_>=0;_--)(y=l[_])&&(m=(x<3?y(m):x>3?y(f,d,m):y(f,d))||m);return x>3&&m&&Object.defineProperty(f,d,m),m},c=Nr&&Nr.__param||function(l,f){return function(d,g){f(d,g,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SemanticContext=void 0;const h=xr(),p=wi(),a=we(),r=Q(),n=nt(),t=ht();function s(l){let f;for(let d of l){if(f===void 0){f=d;continue}f.compareTo(d)<0&&(f=d)}return f}function e(l){let f;for(let d of l){if(f===void 0){f=d;continue}f.compareTo(d)>0&&(f=d)}return f}let o=class Xe{static get NONE(){return Xe._NONE===void 0&&(Xe._NONE=new Xe.Predicate),Xe._NONE}evalPrecedence(f,d){return this}static and(f,d){if(!f||f===Xe.NONE)return d;if(d===Xe.NONE)return f;let g=new Xe.AND(f,d);return g.opnds.length===1?g.opnds[0]:g}static or(f,d){if(!f)return d;if(f===Xe.NONE||d===Xe.NONE)return Xe.NONE;let g=new Xe.OR(f,d);return g.opnds.length===1?g.opnds[0]:g}};u.SemanticContext=o,function(l){function g(N){let T=[];for(let b=0;b<N.length;b++){let O=N[b];O instanceof l.PrecedencePredicate&&(T.push(O),N.splice(b,1),b--)}return T}class x extends l{constructor(T=-1,b=-1,O=!1){super(),this.ruleIndex=T,this.predIndex=b,this.isCtxDependent=O}eval(T,b){let O=this.isCtxDependent?b:void 0;return T.sempred(O,this.ruleIndex,this.predIndex)}hashCode(){let T=a.MurmurHash.initialize();return T=a.MurmurHash.update(T,this.ruleIndex),T=a.MurmurHash.update(T,this.predIndex),T=a.MurmurHash.update(T,this.isCtxDependent?1:0),T=a.MurmurHash.finish(T,3),T}equals(T){return T instanceof x?this===T?!0:this.ruleIndex===T.ruleIndex&&this.predIndex===T.predIndex&&this.isCtxDependent===T.isCtxDependent:!1}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}i([r.Override],x.prototype,"eval",null),i([r.Override],x.prototype,"hashCode",null),i([r.Override],x.prototype,"equals",null),i([r.Override],x.prototype,"toString",null),l.Predicate=x;class m extends l{constructor(T){super(),this.precedence=T}eval(T,b){return T.precpred(b,this.precedence)}evalPrecedence(T,b){if(T.precpred(b,this.precedence))return l.NONE}compareTo(T){return this.precedence-T.precedence}hashCode(){let T=1;return T=31*T+this.precedence,T}equals(T){return T instanceof m?this===T?!0:this.precedence===T.precedence:!1}toString(){return"{"+this.precedence+">=prec}?"}}i([r.Override],m.prototype,"eval",null),i([r.Override],m.prototype,"evalPrecedence",null),i([r.Override],m.prototype,"compareTo",null),i([r.Override],m.prototype,"hashCode",null),i([r.Override],m.prototype,"equals",null),i([r.Override],m.prototype,"toString",null),l.PrecedencePredicate=m;class y extends l{}l.Operator=y;let _=class Xi extends y{constructor(T,b){super();let O=new h.Array2DHashSet(n.ObjectEqualityComparator.INSTANCE);T instanceof Xi?O.addAll(T.opnds):O.add(T),b instanceof Xi?O.addAll(b.opnds):O.add(b),this.opnds=O.toArray();let D=g(this.opnds),k=e(D);k&&this.opnds.push(k)}get operands(){return this.opnds}equals(T){return this===T?!0:T instanceof Xi?p.ArrayEqualityComparator.INSTANCE.equals(this.opnds,T.opnds):!1}hashCode(){return a.MurmurHash.hashCode(this.opnds,40363613)}eval(T,b){for(let O of this.opnds)if(!O.eval(T,b))return!1;return!0}evalPrecedence(T,b){let O=!1,D=[];for(let z of this.opnds){let U=z.evalPrecedence(T,b);if(O=O||U!==z,U==null)return;U!==l.NONE&&D.push(U)}if(!O)return this;if(D.length===0)return l.NONE;let k=D[0];for(let z=1;z<D.length;z++)k=l.and(k,D[z]);return k}toString(){return t.join(this.opnds,"&&")}};i([r.Override],_.prototype,"operands",null),i([r.Override],_.prototype,"equals",null),i([r.Override],_.prototype,"hashCode",null),i([r.Override],_.prototype,"eval",null),i([r.Override],_.prototype,"evalPrecedence",null),i([r.Override],_.prototype,"toString",null),_=i([c(0,r.NotNull),c(1,r.NotNull)],_),l.AND=_;let v=class Ki extends y{constructor(T,b){super();let O=new h.Array2DHashSet(n.ObjectEqualityComparator.INSTANCE);T instanceof Ki?O.addAll(T.opnds):O.add(T),b instanceof Ki?O.addAll(b.opnds):O.add(b),this.opnds=O.toArray();let D=g(this.opnds),k=s(D);k&&this.opnds.push(k)}get operands(){return this.opnds}equals(T){return this===T?!0:T instanceof Ki?p.ArrayEqualityComparator.INSTANCE.equals(this.opnds,T.opnds):!1}hashCode(){return a.MurmurHash.hashCode(this.opnds,486279973)}eval(T,b){for(let O of this.opnds)if(O.eval(T,b))return!0;return!1}evalPrecedence(T,b){let O=!1,D=[];for(let z of this.opnds){let U=z.evalPrecedence(T,b);if(O=O||U!==z,U===l.NONE)return l.NONE;U&&D.push(U)}if(!O)return this;if(D.length===0)return;let k=D[0];for(let z=1;z<D.length;z++)k=l.or(k,D[z]);return k}toString(){return t.join(this.opnds,"||")}};i([r.Override],v.prototype,"operands",null),i([r.Override],v.prototype,"equals",null),i([r.Override],v.prototype,"hashCode",null),i([r.Override],v.prototype,"eval",null),i([r.Override],v.prototype,"evalPrecedence",null),i([r.Override],v.prototype,"toString",null),v=i([c(0,r.NotNull),c(1,r.NotNull)],v),l.OR=v}(o=u.SemanticContext||(u.SemanticContext={}))}(Nr)),Nr}var Pl;function Dl(){if(Pl)return lt;Pl=1;/*!
|
|
125
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
126
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
127
|
-
*/var u=lt&<.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=lt&<.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(lt,"__esModule",{value:!0}),lt.PredicateTransition=void 0;const c=Is(),h=Q(),p=Bn();let a=class extends c.AbstractPredicateTransition{constructor(n,t,s,e){super(n),this.ruleIndex=t,this.predIndex=s,this.isCtxDependent=e}get serializationType(){return 4}get isEpsilon(){return!0}matches(n,t,s){return!1}get predicate(){return new p.SemanticContext.Predicate(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}};return u([h.Override],a.prototype,"serializationType",null),u([h.Override],a.prototype,"isEpsilon",null),u([h.Override],a.prototype,"matches",null),u([h.Override,h.NotNull],a.prototype,"toString",null),a=u([i(0,h.NotNull)],a),lt.PredicateTransition=a,lt}var Il;function Li(){if(Il)return at;Il=1;/*!
|
|
128
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
129
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
130
|
-
*/var u=at&&at.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=at&&at.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(at,"__esModule",{value:!0}),at.FailedPredicateException=void 0;const c=pr(),h=Q(),p=Dl();let a=class ip extends c.RecognitionException{constructor(n,t,s){super(n,n.inputStream,n.context,ip.formatMessage(t,s));let o=n.interpreter.atn.states[n.state].transition(0);o instanceof p.PredicateTransition?(this._ruleIndex=o.ruleIndex,this._predicateIndex=o.predIndex):(this._ruleIndex=0,this._predicateIndex=0),this._predicate=t,super.setOffendingToken(n,n.currentToken)}get ruleIndex(){return this._ruleIndex}get predicateIndex(){return this._predicateIndex}get predicate(){return this._predicate}static formatMessage(n,t){return t||`failed predicate: {${n}}?`}};return u([h.NotNull],a,"formatMessage",null),a=u([i(0,h.NotNull)],a),at.FailedPredicateException=a,at}var pt={},wl;function Fi(){if(wl)return pt;wl=1;/*!
|
|
131
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
132
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
133
|
-
*/var u=pt&&pt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=pt&&pt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(pt,"__esModule",{value:!0}),pt.InputMismatchException=void 0;const c=pr(),h=Q();let p=class extends c.RecognitionException{constructor(r,n,t){t===void 0&&(t=r.context),super(r,r.inputStream,t),n!==void 0&&this.setOffendingState(n),this.setOffendingToken(r,r.currentToken)}};return p=u([i(0,h.NotNull)],p),pt.InputMismatchException=p,pt}var dt={},Rr={},Ls={},Ll;function Fs(){return Ll||(Ll=1,function(u){/*!
|
|
134
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
135
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
136
|
-
*/Object.defineProperty(u,"__esModule",{value:!0}),u.Arrays=void 0,function(i){function c(a,r,n,t){return h(a,n!==void 0?n:0,t!==void 0?t:a.length,r)}i.binarySearch=c;function h(a,r,n,t){let s=r,e=n-1;for(;s<=e;){let o=s+e>>>1,l=a[o];if(l<t)s=o+1;else if(l>t)e=o-1;else return o}return-(s+1)}function p(a){let r="[",n=!0;for(let t of a)n?n=!1:r+=", ",t===null?r+="null":t===void 0?r+="undefined":r+=t;return r+="]",r}i.toString=p}(u.Arrays||(u.Arrays={}))}(Ls)),Ls}var Fl;function Bs(){if(Fl)return Rr;Fl=1;/*!
|
|
137
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
138
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
139
|
-
*/var u=Rr&&Rr.__decorate||function(n,t,s,e){var o=arguments.length,l=o<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,t,s,e);else for(var d=n.length-1;d>=0;d--)(f=n[d])&&(l=(o<3?f(l):o>3?f(t,s,l):f(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l};Object.defineProperty(Rr,"__esModule",{value:!0}),Rr.IntegerList=void 0;const i=Fs(),c=Q(),h=new Int32Array(0),p=4,a=(1<<31>>>0)-1-8;let r=class Yi{constructor(t){if(!t)this._data=h,this._size=0;else if(t instanceof Yi)this._data=t._data.slice(0),this._size=t._size;else if(typeof t=="number")t===0?(this._data=h,this._size=0):(this._data=new Int32Array(t),this._size=0);else{this._data=h,this._size=0;for(let s of t)this.add(s)}}add(t){this._data.length===this._size&&this.ensureCapacity(this._size+1),this._data[this._size]=t,this._size++}addAll(t){if(Array.isArray(t))this.ensureCapacity(this._size+t.length),this._data.subarray(this._size,this._size+t.length).set(t),this._size+=t.length;else if(t instanceof Yi)this.ensureCapacity(this._size+t._size),this._data.subarray(this._size,this._size+t.size).set(t._data),this._size+=t._size;else{this.ensureCapacity(this._size+t.size);let s=0;for(let e of t)this._data[this._size+s]=e,s++;this._size+=t.size}}get(t){if(t<0||t>=this._size)throw RangeError();return this._data[t]}contains(t){for(let s=0;s<this._size;s++)if(this._data[s]===t)return!0;return!1}set(t,s){if(t<0||t>=this._size)throw RangeError();let e=this._data[t];return this._data[t]=s,e}removeAt(t){let s=this.get(t);return this._data.copyWithin(t,t+1,this._size),this._data[this._size-1]=0,this._size--,s}removeRange(t,s){if(t<0||s<0||t>this._size||s>this._size||t>s)throw RangeError();this._data.copyWithin(s,t,this._size),this._data.fill(0,this._size-(s-t),this._size),this._size-=s-t}get isEmpty(){return this._size===0}get size(){return this._size}trimToSize(){this._data.length!==this._size&&(this._data=this._data.slice(0,this._size))}clear(){this._data.fill(0,0,this._size),this._size=0}toArray(){return this._size===0?[]:Array.from(this._data.subarray(0,this._size))}sort(){this._data.subarray(0,this._size).sort()}equals(t){if(t===this)return!0;if(!(t instanceof Yi)||this._size!==t._size)return!1;for(let s=0;s<this._size;s++)if(this._data[s]!==t._data[s])return!1;return!0}hashCode(){let t=1;for(let s=0;s<this._size;s++)t=31*t+this._data[s];return t}toString(){return this._data.toString()}binarySearch(t,s,e){if(s===void 0&&(s=0),e===void 0&&(e=this._size),s<0||e<0||s>this._size||e>this._size)throw new RangeError;if(s>e)throw new RangeError;return i.Arrays.binarySearch(this._data,t,s,e)}ensureCapacity(t){if(t<0||t>a)throw new RangeError;let s;for(this._data.length===0?s=p:s=this._data.length;s<t;)s=s*2,(s<0||s>a)&&(s=a);let e=new Int32Array(s);e.set(this._data),this._data=e}toCharArray(){let t=new Uint16Array(this._size),s=0,e=!1;for(let o=0;o<this._size;o++){let l=this._data[o];if(l>=0&&l<65536){t[s]=l,s++;continue}if(!e){let d=new Uint16Array(this.charArraySize());d.set(t,0),t=d,e=!0}let f=String.fromCodePoint(l);t[s]=f.charCodeAt(0),t[s+1]=f.charCodeAt(1),s+=2}return t}charArraySize(){let t=0;for(let s=0;s<this._size;s++)t+=this._data[s]>=65536?2:1;return t}};return u([c.NotNull],r.prototype,"_data",void 0),u([c.Override],r.prototype,"equals",null),u([c.Override],r.prototype,"hashCode",null),u([c.Override],r.prototype,"toString",null),Rr.IntegerList=r,Rr}var Pr={},Bl;function ke(){if(Bl)return Pr;Bl=1;/*!
|
|
140
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
141
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
142
|
-
*/var u=Pr&&Pr.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(Pr,"__esModule",{value:!0}),Pr.Interval=void 0;const i=Q(),c=1e3;let h=class Ke{constructor(a,r){this.a=a,this.b=r}static get INVALID(){return Ke._INVALID}static of(a,r){return a!==r||a<0||a>c?new Ke(a,r):(Ke.cache[a]==null&&(Ke.cache[a]=new Ke(a,a)),Ke.cache[a])}get length(){return this.b<this.a?0:this.b-this.a+1}equals(a){return a===this?!0:a instanceof Ke?this.a===a.a&&this.b===a.b:!1}hashCode(){let a=23;return a=a*31+this.a,a=a*31+this.b,a}startsBeforeDisjoint(a){return this.a<a.a&&this.b<a.a}startsBeforeNonDisjoint(a){return this.a<=a.a&&this.b>=a.a}startsAfter(a){return this.a>a.a}startsAfterDisjoint(a){return this.a>a.b}startsAfterNonDisjoint(a){return this.a>a.a&&this.a<=a.b}disjoint(a){return this.startsBeforeDisjoint(a)||this.startsAfterDisjoint(a)}adjacent(a){return this.a===a.b+1||this.b===a.a-1}properlyContains(a){return a.a>=this.a&&a.b<=this.b}union(a){return Ke.of(Math.min(this.a,a.a),Math.max(this.b,a.b))}intersection(a){return Ke.of(Math.max(this.a,a.a),Math.min(this.b,a.b))}differenceNotProperlyContained(a){let r;return a.startsBeforeNonDisjoint(this)?r=Ke.of(Math.max(this.a,a.b+1),this.b):a.startsAfterNonDisjoint(this)&&(r=Ke.of(this.a,a.a-1)),r}toString(){return this.a+".."+this.b}};return h._INVALID=new h(-1,-2),h.cache=new Array(c+1),u([i.Override],h.prototype,"equals",null),u([i.Override],h.prototype,"hashCode",null),u([i.Override],h.prototype,"toString",null),Pr.Interval=h,Pr}var Dr={},Vn={},xt={},js={},jl;function Oe(){return jl||(jl=1,function(u){/*!
|
|
143
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
144
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
145
|
-
*/Object.defineProperty(u,"__esModule",{value:!0}),u.Token=void 0;const i=hr();(function(c){c.INVALID_TYPE=0,c.EPSILON=-2,c.MIN_USER_TOKEN_TYPE=1,c.EOF=i.IntStream.EOF,c.DEFAULT_CHANNEL=0,c.HIDDEN_CHANNEL=1,c.MIN_USER_CHANNEL_VALUE=2})(u.Token||(u.Token={}))}(js)),js}var Ml;function Wn(){if(Ml)return xt;Ml=1;/*!
|
|
146
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
147
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
148
|
-
*/var u=xt&&xt.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=xt&&xt.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(xt,"__esModule",{value:!0}),xt.CommonToken=void 0;const c=ke(),h=Q(),p=Oe();let a=class Ai{constructor(n,t,s=Ai.EMPTY_SOURCE,e=p.Token.DEFAULT_CHANNEL,o=0,l=0){this._line=0,this._charPositionInLine=-1,this._channel=p.Token.DEFAULT_CHANNEL,this.index=-1,this._text=t,this._type=n,this.source=s,this._channel=e,this.start=o,this.stop=l,s.source!=null&&(this._line=s.source.line,this._charPositionInLine=s.source.charPositionInLine)}static fromToken(n){let t=new Ai(n.type,void 0,Ai.EMPTY_SOURCE,n.channel,n.startIndex,n.stopIndex);return t._line=n.line,t.index=n.tokenIndex,t._charPositionInLine=n.charPositionInLine,n instanceof Ai?(t._text=n._text,t.source=n.source):(t._text=n.text,t.source={source:n.tokenSource,stream:n.inputStream}),t}get type(){return this._type}set type(n){this._type=n}get line(){return this._line}set line(n){this._line=n}get text(){if(this._text!=null)return this._text;let n=this.inputStream;if(n==null)return;let t=n.size;return this.start<t&&this.stop<t?n.getText(c.Interval.of(this.start,this.stop)):"<EOF>"}set text(n){this._text=n}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(n){this._charPositionInLine=n}get channel(){return this._channel}set channel(n){this._channel=n}get startIndex(){return this.start}set startIndex(n){this.start=n}get stopIndex(){return this.stop}set stopIndex(n){this.stop=n}get tokenIndex(){return this.index}set tokenIndex(n){this.index=n}get tokenSource(){return this.source.source}get inputStream(){return this.source.stream}toString(n){let t="";this._channel>0&&(t=",channel="+this._channel);let s=this.text;s!=null?(s=s.replace(/\n/g,"\\n"),s=s.replace(/\r/g,"\\r"),s=s.replace(/\t/g,"\\t")):s="<no text>";let e=String(this._type);return n&&(e=n.vocabulary.getDisplayName(this._type)),"[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+s+"',<"+e+">"+t+","+this._line+":"+this.charPositionInLine+"]"}};return a.EMPTY_SOURCE={source:void 0,stream:void 0},u([h.NotNull],a.prototype,"source",void 0),u([h.Override],a.prototype,"type",null),u([h.Override],a.prototype,"line",null),u([h.Override],a.prototype,"text",null),u([h.Override],a.prototype,"charPositionInLine",null),u([h.Override],a.prototype,"channel",null),u([h.Override],a.prototype,"startIndex",null),u([h.Override],a.prototype,"stopIndex",null),u([h.Override],a.prototype,"tokenIndex",null),u([h.Override],a.prototype,"tokenSource",null),u([h.Override],a.prototype,"inputStream",null),u([h.Override],a.prototype,"toString",null),u([i(0,h.NotNull)],a,"fromToken",null),a=u([i(2,h.NotNull)],a),xt.CommonToken=a,xt}var ql;function Ms(){return ql||(ql=1,function(u){/*!
|
|
149
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
150
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
151
|
-
*/var i=Vn&&Vn.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(u,"__esModule",{value:!0}),u.CommonTokenFactory=void 0;const c=Wn(),h=ke(),p=Q();let a=class{constructor(n=!1){this.copyText=n}create(n,t,s,e,o,l,f,d){let g=new c.CommonToken(t,s,n,e,o,l);return g.line=f,g.charPositionInLine=d,s==null&&this.copyText&&n.stream!=null&&(g.text=n.stream.getText(h.Interval.of(o,l))),g}createSimple(n,t){return new c.CommonToken(n,t)}};i([p.Override],a.prototype,"create",null),i([p.Override],a.prototype,"createSimple",null),u.CommonTokenFactory=a,function(r){r.DEFAULT=new r}(a=u.CommonTokenFactory||(u.CommonTokenFactory={}))}(Vn)),Vn}var Gn={},kl;function Ul(){if(kl)return Gn;kl=1;/*!
|
|
152
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
153
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
154
|
-
*/Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.IntegerStack=void 0;const u=Bs();let i=class extends u.IntegerList{constructor(h){super(h)}push(h){this.add(h)}pop(){return this.removeAt(this.size-1)}peek(){return this.get(this.size-1)}};return Gn.IntegerStack=i,Gn}var Ir={},Xn={},zl;function Hl(){if(zl)return Xn;zl=1;/*!
|
|
155
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
156
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
157
|
-
*/Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.AcceptStateInfo=void 0;let u=class{constructor(c,h){this._prediction=c,this._lexerActionExecutor=h}get prediction(){return this._prediction}get lexerActionExecutor(){return this._lexerActionExecutor}};return Xn.AcceptStateInfo=u,Xn}var wr={},Kn={},$l;function jn(){if($l)return Kn;$l=1;/*!
|
|
158
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
159
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
160
|
-
*/Object.defineProperty(Kn,"__esModule",{value:!0}),Kn.Array2DHashMap=void 0;const u=xr();class i{constructor(p){this.keyComparator=p}hashCode(p){return this.keyComparator.hashCode(p.key)}equals(p,a){return this.keyComparator.equals(p.key,a.key)}}let c=class Au{constructor(p){p instanceof Au?this.backingStore=new u.Array2DHashSet(p.backingStore):this.backingStore=new u.Array2DHashSet(new i(p))}clear(){this.backingStore.clear()}containsKey(p){return this.backingStore.contains({key:p})}get(p){let a=this.backingStore.get({key:p});if(a)return a.value}get isEmpty(){return this.backingStore.isEmpty}put(p,a){let r=this.backingStore.get({key:p,value:a}),n;return r?(n=r.value,r.value=a):this.backingStore.add({key:p,value:a}),n}putIfAbsent(p,a){let r=this.backingStore.get({key:p,value:a}),n;return r?n=r.value:this.backingStore.add({key:p,value:a}),n}get size(){return this.backingStore.size}hashCode(){return this.backingStore.hashCode()}equals(p){return p instanceof Au?this.backingStore.equals(p.backingStore):!1}};return Kn.Array2DHashMap=c,Kn}var yt={},Lr={},_t={},Yn={},Vl;function Fr(){if(Vl)return Yn;Vl=1;/*!
|
|
161
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
162
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
163
|
-
*/Object.defineProperty(Yn,"__esModule",{value:!0}),Yn.DecisionState=void 0;const u=ut();let i=class extends u.ATNState{constructor(){super(...arguments),this.decision=-1,this.nonGreedy=!1,this.sll=!1}};return Yn.DecisionState=i,Yn}var Br={},Qn={},Wl;function qs(){return Wl||(Wl=1,function(u){/*!
|
|
164
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
165
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
166
|
-
*/var i=Qn&&Qn.__decorate||function(t,s,e,o){var l=arguments.length,f=l<3?s:o===null?o=Object.getOwnPropertyDescriptor(s,e):o,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(t,s,e,o);else for(var g=t.length-1;g>=0;g--)(d=t[g])&&(f=(l<3?d(f):l>3?d(s,e,f):d(s,e))||f);return l>3&&f&&Object.defineProperty(s,e,f),f};Object.defineProperty(u,"__esModule",{value:!0}),u.PredictionContextCache=void 0;const c=jn(),h=Q(),p=nt(),a=Je(),r=Me();let n=class Tu{constructor(s=!0){this.contexts=new c.Array2DHashMap(p.ObjectEqualityComparator.INSTANCE),this.childContexts=new c.Array2DHashMap(p.ObjectEqualityComparator.INSTANCE),this.joinContexts=new c.Array2DHashMap(p.ObjectEqualityComparator.INSTANCE),this.enableCache=s}getAsCached(s){if(!this.enableCache)return s;let e=this.contexts.get(s);return e||(e=s,this.contexts.put(s,s)),e}getChild(s,e){if(!this.enableCache)return s.getChild(e);let o=new Tu.PredictionContextAndInt(s,e),l=this.childContexts.get(o);return l||(l=s.getChild(e),l=this.getAsCached(l),this.childContexts.put(o,l)),l}join(s,e){if(!this.enableCache)return a.PredictionContext.join(s,e,this);let o=new Tu.IdentityCommutativePredictionContextOperands(s,e),l=this.joinContexts.get(o);return l||(l=a.PredictionContext.join(s,e,this),l=this.getAsCached(l),this.joinContexts.put(o,l),l)}};u.PredictionContextCache=n,n.UNCACHED=new n(!1),function(t){class s{constructor(l,f){this.obj=l,this.value=f}equals(l){if(l instanceof s){if(l===this)return!0}else return!1;let f=l;return this.value===f.value&&(this.obj===f.obj||this.obj!=null&&this.obj.equals(f.obj))}hashCode(){let l=5;return l=7*l+(this.obj!=null?this.obj.hashCode():0),l=7*l+this.value,l}}i([h.Override],s.prototype,"equals",null),i([h.Override],s.prototype,"hashCode",null),t.PredictionContextAndInt=s;class e{constructor(l,f){r(l!=null),r(f!=null),this._x=l,this._y=f}get x(){return this._x}get y(){return this._y}equals(l){if(l instanceof e){if(this===l)return!0}else return!1;let f=l;return this._x===f._x&&this._y===f._y||this._x===f._y&&this._y===f._x}hashCode(){return this._x.hashCode()^this._y.hashCode()}}i([h.Override],e.prototype,"equals",null),i([h.Override],e.prototype,"hashCode",null),t.IdentityCommutativePredictionContextOperands=e}(n=u.PredictionContextCache||(u.PredictionContextCache={}))}(Qn)),Qn}var Gl;function Je(){return Gl||(Gl=1,function(u){/*!
|
|
167
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
168
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
169
|
-
*/var i=Br&&Br.__decorate||function(g,x,m,y){var _=arguments.length,v=_<3?x:y===null?y=Object.getOwnPropertyDescriptor(x,m):y,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(g,x,m,y);else for(var T=g.length-1;T>=0;T--)(N=g[T])&&(v=(_<3?N(v):_>3?N(x,m,v):N(x,m))||v);return _>3&&v&&Object.defineProperty(x,m,v),v},c=Br&&Br.__param||function(g,x){return function(m,y){x(m,y,g)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SingletonPredictionContext=u.PredictionContext=void 0;const h=jn(),p=xr(),a=Fs(),r=we(),n=Q(),t=qs(),s=Me(),e=1;let o=class je{constructor(x){this.cachedHashCode=x}static calculateEmptyHashCode(){let x=r.MurmurHash.initialize(e);return x=r.MurmurHash.finish(x,0),x}static calculateSingleHashCode(x,m){let y=r.MurmurHash.initialize(e);return y=r.MurmurHash.update(y,x),y=r.MurmurHash.update(y,m),y=r.MurmurHash.finish(y,2),y}static calculateHashCode(x,m){let y=r.MurmurHash.initialize(e);for(let _ of x)y=r.MurmurHash.update(y,_);for(let _ of m)y=r.MurmurHash.update(y,_);return y=r.MurmurHash.finish(y,2*x.length),y}static fromRuleContext(x,m,y=!0){if(m.isEmpty)return y?je.EMPTY_FULL:je.EMPTY_LOCAL;let _;m._parent?_=je.fromRuleContext(x,m._parent,y):_=y?je.EMPTY_FULL:je.EMPTY_LOCAL;let N=x.states[m.invokingState].transition(0);return _.getChild(N.followState.stateNumber)}static addEmptyContext(x){return x.addEmptyContext()}static removeEmptyContext(x){return x.removeEmptyContext()}static join(x,m,y=t.PredictionContextCache.UNCACHED){if(x===m)return x;if(x.isEmpty)return je.isEmptyLocal(x)?x:je.addEmptyContext(m);if(m.isEmpty)return je.isEmptyLocal(m)?m:je.addEmptyContext(x);let _=x.size,v=m.size;if(_===1&&v===1&&x.getReturnState(0)===m.getReturnState(0)){let U=y.join(x.getParent(0),m.getParent(0));return U===x.getParent(0)?x:U===m.getParent(0)?m:U.getChild(x.getReturnState(0))}let N=0,T=new Array(_+v),b=new Array(T.length),O=0,D=0,k=!0,z=!0;for(;O<_&&D<v;)x.getReturnState(O)===m.getReturnState(D)?(T[N]=y.join(x.getParent(O),m.getParent(D)),b[N]=x.getReturnState(O),k=k&&T[N]===x.getParent(O),z=z&&T[N]===m.getParent(D),O++,D++):x.getReturnState(O)<m.getReturnState(D)?(T[N]=x.getParent(O),b[N]=x.getReturnState(O),z=!1,O++):(s(m.getReturnState(D)<x.getReturnState(O)),T[N]=m.getParent(D),b[N]=m.getReturnState(D),k=!1,D++),N++;for(;O<_;)T[N]=x.getParent(O),b[N]=x.getReturnState(O),O++,z=!1,N++;for(;D<v;)T[N]=m.getParent(D),b[N]=m.getReturnState(D),D++,k=!1,N++;return k?x:z?m:(N<T.length&&(T=T.slice(0,N),b=b.slice(0,N)),T.length===0?je.EMPTY_FULL:T.length===1?new d(T[0],b[0]):new f(T,b))}static isEmptyLocal(x){return x===je.EMPTY_LOCAL}static getCachedContext(x,m,y){if(x.isEmpty)return x;let _=y.get(x);if(_)return _;if(_=m.get(x),_)return y.put(x,_),_;let v=!1,N=new Array(x.size);for(let b=0;b<N.length;b++){let O=je.getCachedContext(x.getParent(b),m,y);if(v||O!==x.getParent(b)){if(!v){N=new Array(x.size);for(let D=0;D<x.size;D++)N[D]=x.getParent(D);v=!0}N[b]=O}}if(!v)return _=m.putIfAbsent(x,x),y.put(x,_??x),x;let T;if(N.length===1)T=new d(N[0],x.getReturnState(0));else{let b=new Array(x.size);for(let O=0;O<x.size;O++)b[O]=x.getReturnState(O);T=new f(N,b,x.hashCode())}return _=m.putIfAbsent(T,T),y.put(T,_||T),y.put(x,_||T),T}appendSingleContext(x,m){return this.appendContext(je.EMPTY_FULL.getChild(x),m)}getChild(x){return new d(this,x)}hashCode(){return this.cachedHashCode}toStrings(x,m,y=je.EMPTY_FULL){let _=[];e:for(let v=0;;v++){let N=0,T=!0,b=this,O=m,D="";for(D+="[";!b.isEmpty&&b!==y;){let k=0;if(b.size>0){let z=1;for(;1<<z>>>0<b.size;)z++;let U=(1<<z>>>0)-1;if(k=v>>N&U,T=T&&k>=b.size-1,k>=b.size)continue e;N+=z}if(x){D.length>1&&(D+=" ");let U=x.atn.states[O],re=x.ruleNames[U.ruleIndex];D+=re}else b.getReturnState(k)!==je.EMPTY_FULL_STATE_KEY&&(b.isEmpty||(D.length>1&&(D+=" "),D+=b.getReturnState(k)));O=b.getReturnState(k),b=b.getParent(k)}if(D+="]",_.push(D),T)break}return _}};i([n.Override],o.prototype,"hashCode",null),i([c(0,n.NotNull),c(1,n.NotNull),c(2,n.NotNull)],o,"join",null),i([c(0,n.NotNull),c(1,n.NotNull),c(2,n.NotNull)],o,"getCachedContext",null),u.PredictionContext=o;class l extends o{constructor(x){super(o.calculateEmptyHashCode()),this.fullContext=x}get isFullContext(){return this.fullContext}addEmptyContext(){return this}removeEmptyContext(){throw new Error("Cannot remove the empty context from itself.")}getParent(x){throw new Error("index out of bounds")}getReturnState(x){throw new Error("index out of bounds")}findReturnState(x){return-1}get size(){return 0}appendSingleContext(x,m){return m.getChild(this,x)}appendContext(x,m){return x}get isEmpty(){return!0}get hasEmpty(){return!0}equals(x){return this===x}toStrings(x,m,y){return["[]"]}}i([n.Override],l.prototype,"addEmptyContext",null),i([n.Override],l.prototype,"removeEmptyContext",null),i([n.Override],l.prototype,"getParent",null),i([n.Override],l.prototype,"getReturnState",null),i([n.Override],l.prototype,"findReturnState",null),i([n.Override],l.prototype,"size",null),i([n.Override],l.prototype,"appendSingleContext",null),i([n.Override],l.prototype,"appendContext",null),i([n.Override],l.prototype,"isEmpty",null),i([n.Override],l.prototype,"hasEmpty",null),i([n.Override],l.prototype,"equals",null),i([n.Override],l.prototype,"toStrings",null);let f=class Dn extends o{constructor(x,m,y){super(y||o.calculateHashCode(x,m)),s(x.length===m.length),s(m.length>1||m[0]!==o.EMPTY_FULL_STATE_KEY,"Should be using PredictionContext.EMPTY instead."),this.parents=x,this.returnStates=m}getParent(x){return this.parents[x]}getReturnState(x){return this.returnStates[x]}findReturnState(x){return a.Arrays.binarySearch(this.returnStates,x)}get size(){return this.returnStates.length}get isEmpty(){return!1}get hasEmpty(){return this.returnStates[this.returnStates.length-1]===o.EMPTY_FULL_STATE_KEY}addEmptyContext(){if(this.hasEmpty)return this;let x=this.parents.slice(0),m=this.returnStates.slice(0);return x.push(o.EMPTY_FULL),m.push(o.EMPTY_FULL_STATE_KEY),new Dn(x,m)}removeEmptyContext(){if(!this.hasEmpty)return this;if(this.returnStates.length===2)return new d(this.parents[0],this.returnStates[0]);{let x=this.parents.slice(0,this.parents.length-1),m=this.returnStates.slice(0,this.returnStates.length-1);return new Dn(x,m)}}appendContext(x,m){return Dn.appendContextImpl(this,x,new o.IdentityHashMap)}static appendContextImpl(x,m,y){if(m.isEmpty){if(o.isEmptyLocal(m)){if(x.hasEmpty)return o.EMPTY_LOCAL;throw new Error("what to do here?")}return x}if(m.size!==1)throw new Error("Appending a tree suffix is not yet supported.");let _=y.get(x);if(!_){if(x.isEmpty)_=m;else{let v=x.size;x.hasEmpty&&v--;let N=new Array(v),T=new Array(v);for(let b=0;b<v;b++)T[b]=x.getReturnState(b);for(let b=0;b<v;b++)N[b]=Dn.appendContextImpl(x.getParent(b),m,y);N.length===1?_=new d(N[0],T[0]):(s(N.length>1),_=new Dn(N,T)),x.hasEmpty&&(_=o.join(_,m))}y.put(x,_)}return _}equals(x){if(this===x)return!0;if(!(x instanceof Dn)||this.hashCode()!==x.hashCode())return!1;let m=x;return this.equalsImpl(m,new p.Array2DHashSet)}equalsImpl(x,m){let y=[],_=[];for(y.push(this),_.push(x);;){let v=y.pop(),N=_.pop();if(!v||!N)break;let T=new t.PredictionContextCache.IdentityCommutativePredictionContextOperands(v,N);if(!m.add(T))continue;let b=T.x.size;if(b===0){if(!T.x.equals(T.y))return!1;continue}let O=T.y.size;if(b!==O)return!1;for(let D=0;D<b;D++){if(T.x.getReturnState(D)!==T.y.getReturnState(D))return!1;let k=T.x.getParent(D),z=T.y.getParent(D);if(k.hashCode()!==z.hashCode())return!1;k!==z&&(y.push(k),_.push(z))}}return!0}};i([n.NotNull],f.prototype,"parents",void 0),i([n.NotNull],f.prototype,"returnStates",void 0),i([n.Override],f.prototype,"getParent",null),i([n.Override],f.prototype,"getReturnState",null),i([n.Override],f.prototype,"findReturnState",null),i([n.Override],f.prototype,"size",null),i([n.Override],f.prototype,"isEmpty",null),i([n.Override],f.prototype,"hasEmpty",null),i([n.Override],f.prototype,"addEmptyContext",null),i([n.Override],f.prototype,"removeEmptyContext",null),i([n.Override],f.prototype,"appendContext",null),i([n.Override],f.prototype,"equals",null),f=i([c(0,n.NotNull)],f);let d=class op extends o{constructor(x,m){super(o.calculateSingleHashCode(x,m)),this.parent=x,this.returnState=m}getParent(x){return this.parent}getReturnState(x){return this.returnState}findReturnState(x){return this.returnState===x?0:-1}get size(){return 1}get isEmpty(){return!1}get hasEmpty(){return!1}appendContext(x,m){return m.getChild(this.parent.appendContext(x,m),this.returnState)}addEmptyContext(){let x=[this.parent,o.EMPTY_FULL],m=[this.returnState,o.EMPTY_FULL_STATE_KEY];return new f(x,m)}removeEmptyContext(){return this}equals(x){if(x===this)return!0;if(!(x instanceof op))return!1;let m=x;return this.hashCode()!==m.hashCode()?!1:this.returnState===m.returnState&&this.parent.equals(m.parent)}};i([n.NotNull],d.prototype,"parent",void 0),i([n.Override],d.prototype,"getParent",null),i([n.Override],d.prototype,"getReturnState",null),i([n.Override],d.prototype,"findReturnState",null),i([n.Override],d.prototype,"size",null),i([n.Override],d.prototype,"isEmpty",null),i([n.Override],d.prototype,"hasEmpty",null),i([n.Override],d.prototype,"appendContext",null),i([n.Override],d.prototype,"addEmptyContext",null),i([n.Override],d.prototype,"removeEmptyContext",null),i([n.Override],d.prototype,"equals",null),d=i([c(0,n.NotNull)],d),u.SingletonPredictionContext=d,function(g){g.EMPTY_LOCAL=new l(!1),g.EMPTY_FULL=new l(!0),g.EMPTY_LOCAL_STATE_KEY=-2147483648,g.EMPTY_FULL_STATE_KEY=(1<<31>>>0)-1;class x extends h.Array2DHashMap{constructor(){super(m.INSTANCE)}}g.IdentityHashMap=x;class m{IdentityEqualityComparator(){}hashCode(_){return _.hashCode()}equals(_,v){return _===v}}m.INSTANCE=new m,i([n.Override],m.prototype,"hashCode",null),i([n.Override],m.prototype,"equals",null),g.IdentityEqualityComparator=m}(o=u.PredictionContext||(u.PredictionContext={}))}(Br)),Br}var Xl;function Bi(){if(Xl)return _t;Xl=1;/*!
|
|
170
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
171
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
172
|
-
*/var u=_t&&_t.__decorate||function(g,x,m,y){var _=arguments.length,v=_<3?x:y===null?y=Object.getOwnPropertyDescriptor(x,m):y,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(g,x,m,y);else for(var T=g.length-1;T>=0;T--)(N=g[T])&&(v=(_<3?N(v):_>3?N(x,m,v):N(x,m))||v);return _>3&&v&&Object.defineProperty(x,m,v),v},i=_t&&_t.__param||function(g,x){return function(m,y){x(m,y,g)}};Object.defineProperty(_t,"__esModule",{value:!0}),_t.ATNConfig=void 0;const c=jn(),h=Fr(),p=we(),a=Q(),r=nt(),n=Je(),t=Bn(),s=Me(),e=2147483648;let o=class Ti{constructor(x,m,y){typeof m=="number"?(s((m&16777215)===m),this._state=x,this.altAndOuterContextDepth=m,this._context=y):(this._state=x,this.altAndOuterContextDepth=m.altAndOuterContextDepth,this._context=y)}static create(x,m,y,_=t.SemanticContext.NONE,v){return _!==t.SemanticContext.NONE?v!=null?new d(v,_,x,m,y,!1):new l(_,x,m,y):v!=null?new f(v,x,m,y,!1):new Ti(x,m,y)}get state(){return this._state}get alt(){return this.altAndOuterContextDepth&16777215}get context(){return this._context}set context(x){this._context=x}get reachesIntoOuterContext(){return this.outerContextDepth!==0}get outerContextDepth(){return this.altAndOuterContextDepth>>>24&127}set outerContextDepth(x){s(x>=0),x=Math.min(x,127),this.altAndOuterContextDepth=x<<24|(this.altAndOuterContextDepth&-2130706433)>>>0}get lexerActionExecutor(){}get semanticContext(){return t.SemanticContext.NONE}get hasPassedThroughNonGreedyDecision(){return!1}clone(){return this.transform(this.state,!1)}transform(x,m,y){return y==null?this.transformImpl(x,this._context,this.semanticContext,m,this.lexerActionExecutor):y instanceof n.PredictionContext?this.transformImpl(x,y,this.semanticContext,m,this.lexerActionExecutor):y instanceof t.SemanticContext?this.transformImpl(x,this._context,y,m,this.lexerActionExecutor):this.transformImpl(x,this._context,this.semanticContext,m,y)}transformImpl(x,m,y,_,v){let N=_&&Ti.checkNonGreedyDecision(this,x);return y!==t.SemanticContext.NONE?v!=null||N?new d(v,y,x,this,m,N):new l(y,x,this,m):v!=null||N?new f(v,x,this,m,N):new Ti(x,this,m)}static checkNonGreedyDecision(x,m){return x.hasPassedThroughNonGreedyDecision||m instanceof h.DecisionState&&m.nonGreedy}appendContext(x,m){if(typeof x=="number"){let y=this.context.appendSingleContext(x,m);return this.transform(this.state,!1,y)}else{let y=this.context.appendContext(x,m);return this.transform(this.state,!1,y)}}contains(x){if(this.state.stateNumber!==x.state.stateNumber||this.alt!==x.alt||!this.semanticContext.equals(x.semanticContext))return!1;let m=[],y=[];for(m.push(this.context),y.push(x.context);;){let _=m.pop(),v=y.pop();if(!_||!v)break;if(_===v)return!0;if(_.size<v.size)return!1;if(v.isEmpty)return _.hasEmpty;for(let N=0;N<v.size;N++){let T=_.findReturnState(v.getReturnState(N));if(T<0)return!1;m.push(_.getParent(T)),y.push(v.getParent(N))}}return!1}get isPrecedenceFilterSuppressed(){return(this.altAndOuterContextDepth&e)!==0}set isPrecedenceFilterSuppressed(x){x?this.altAndOuterContextDepth|=e:this.altAndOuterContextDepth&=~e}equals(x){return this===x?!0:x instanceof Ti?this.state.stateNumber===x.state.stateNumber&&this.alt===x.alt&&this.reachesIntoOuterContext===x.reachesIntoOuterContext&&this.context.equals(x.context)&&this.semanticContext.equals(x.semanticContext)&&this.isPrecedenceFilterSuppressed===x.isPrecedenceFilterSuppressed&&this.hasPassedThroughNonGreedyDecision===x.hasPassedThroughNonGreedyDecision&&r.ObjectEqualityComparator.INSTANCE.equals(this.lexerActionExecutor,x.lexerActionExecutor):!1}hashCode(){let x=p.MurmurHash.initialize(7);return x=p.MurmurHash.update(x,this.state.stateNumber),x=p.MurmurHash.update(x,this.alt),x=p.MurmurHash.update(x,this.reachesIntoOuterContext?1:0),x=p.MurmurHash.update(x,this.context),x=p.MurmurHash.update(x,this.semanticContext),x=p.MurmurHash.update(x,this.hasPassedThroughNonGreedyDecision?1:0),x=p.MurmurHash.update(x,this.lexerActionExecutor),x=p.MurmurHash.finish(x,7),x}toDotString(){let x="";x+=`digraph G {
|
|
68
|
+
`}return e}asElementType(e){return e}createBuckets(e){return new Array(e)}};return u([p.NotNull],t.prototype,"comparator",void 0),u([p.Override],t.prototype,"hashCode",null),u([p.Override],t.prototype,"equals",null),u([p.Override],t.prototype,"add",null),u([p.Override],t.prototype,"size",null),u([p.Override],t.prototype,"isEmpty",null),u([p.Override],t.prototype,"contains",null),u([i(0,p.Nullable)],t.prototype,"containsFast",null),u([p.Override],t.prototype,Symbol.iterator,null),u([p.Override],t.prototype,"toArray",null),u([p.Override],t.prototype,"containsAll",null),u([p.Override],t.prototype,"addAll",null),u([p.Override],t.prototype,"clear",null),u([p.Override],t.prototype,"toString",null),u([p.SuppressWarnings("unchecked")],t.prototype,"asElementType",null),u([p.SuppressWarnings("unchecked")],t.prototype,"createBuckets",null),st.Array2DHashSet=t,st}var Nr={},bl;function Di(){if(bl)return Nr;bl=1;var u=Nr&&Nr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Nr,"__esModule",{value:!0}),Nr.ArrayEqualityComparator=void 0;const i=Q(),c=Pe(),h=Ze();let p=class{hashCode(r){return r==null?0:c.MurmurHash.hashCode(r,0)}equals(r,n){if(r==null)return n==null;if(n==null||r.length!==n.length)return!1;for(let t=0;t<r.length;t++)if(!h.ObjectEqualityComparator.INSTANCE.equals(r[t],n[t]))return!1;return!0}};return p.INSTANCE=new p,u([i.Override],p.prototype,"hashCode",null),u([i.Override],p.prototype,"equals",null),Nr.ArrayEqualityComparator=p,Nr}var qe={},Cl;function ut(){if(Cl)return qe;Cl=1;Object.defineProperty(qe,"__esModule",{value:!0}),qe.toCharArray=qe.toMap=qe.equals=qe.join=qe.escapeWhitespace=void 0;function u(a,r){return r?a.replace(/ /,"·"):a.replace(/\t/,"\\t").replace(/\n/,"\\n").replace(/\r/,"\\r")}qe.escapeWhitespace=u;function i(a,r){let n="",t=!0;for(let s of a)t?t=!1:n+=r,n+=s;return n}qe.join=i;function c(a,r){return a===r?!0:a===void 0||r===void 0?!1:a.equals(r)}qe.equals=c;function h(a){let r=new Map;for(let n=0;n<a.length;n++)r.set(a[n],n);return r}qe.toMap=h;function p(a){if(typeof a=="string"){let r=new Uint16Array(a.length);for(let n=0;n<a.length;n++)r[n]=a.charCodeAt(n);return r}else return a.toCharArray()}return qe.toCharArray=p,qe}var Ol;function Ln(){return Ol||(Ol=1,(function(u){var i=Tr&&Tr.__decorate||function(l,f,d,g){var x=arguments.length,m=x<3?f:g===null?g=Object.getOwnPropertyDescriptor(f,d):g,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(l,f,d,g);else for(var _=l.length-1;_>=0;_--)(y=l[_])&&(m=(x<3?y(m):x>3?y(f,d,m):y(f,d))||m);return x>3&&m&&Object.defineProperty(f,d,m),m},c=Tr&&Tr.__param||function(l,f){return function(d,g){f(d,g,l)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SemanticContext=void 0;const h=cr(),p=Di(),a=Pe(),r=Q(),n=Ze(),t=ut();function s(l){let f;for(let d of l){if(f===void 0){f=d;continue}f.compareTo(d)<0&&(f=d)}return f}function e(l){let f;for(let d of l){if(f===void 0){f=d;continue}f.compareTo(d)>0&&(f=d)}return f}let o=class He{static get NONE(){return He._NONE===void 0&&(He._NONE=new He.Predicate),He._NONE}evalPrecedence(f,d){return this}static and(f,d){if(!f||f===He.NONE)return d;if(d===He.NONE)return f;let g=new He.AND(f,d);return g.opnds.length===1?g.opnds[0]:g}static or(f,d){if(!f)return d;if(f===He.NONE||d===He.NONE)return He.NONE;let g=new He.OR(f,d);return g.opnds.length===1?g.opnds[0]:g}};u.SemanticContext=o,(function(l){function g(N){let T=[];for(let b=0;b<N.length;b++){let O=N[b];O instanceof l.PrecedencePredicate&&(T.push(O),N.splice(b,1),b--)}return T}class x extends l{constructor(T=-1,b=-1,O=!1){super(),this.ruleIndex=T,this.predIndex=b,this.isCtxDependent=O}eval(T,b){let O=this.isCtxDependent?b:void 0;return T.sempred(O,this.ruleIndex,this.predIndex)}hashCode(){let T=a.MurmurHash.initialize();return T=a.MurmurHash.update(T,this.ruleIndex),T=a.MurmurHash.update(T,this.predIndex),T=a.MurmurHash.update(T,this.isCtxDependent?1:0),T=a.MurmurHash.finish(T,3),T}equals(T){return T instanceof x?this===T?!0:this.ruleIndex===T.ruleIndex&&this.predIndex===T.predIndex&&this.isCtxDependent===T.isCtxDependent:!1}toString(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}i([r.Override],x.prototype,"eval",null),i([r.Override],x.prototype,"hashCode",null),i([r.Override],x.prototype,"equals",null),i([r.Override],x.prototype,"toString",null),l.Predicate=x;class m extends l{constructor(T){super(),this.precedence=T}eval(T,b){return T.precpred(b,this.precedence)}evalPrecedence(T,b){if(T.precpred(b,this.precedence))return l.NONE}compareTo(T){return this.precedence-T.precedence}hashCode(){let T=1;return T=31*T+this.precedence,T}equals(T){return T instanceof m?this===T?!0:this.precedence===T.precedence:!1}toString(){return"{"+this.precedence+">=prec}?"}}i([r.Override],m.prototype,"eval",null),i([r.Override],m.prototype,"evalPrecedence",null),i([r.Override],m.prototype,"compareTo",null),i([r.Override],m.prototype,"hashCode",null),i([r.Override],m.prototype,"equals",null),i([r.Override],m.prototype,"toString",null),l.PrecedencePredicate=m;class y extends l{}l.Operator=y;let _=class Wi extends y{constructor(T,b){super();let O=new h.Array2DHashSet(n.ObjectEqualityComparator.INSTANCE);T instanceof Wi?O.addAll(T.opnds):O.add(T),b instanceof Wi?O.addAll(b.opnds):O.add(b),this.opnds=O.toArray();let D=g(this.opnds),k=e(D);k&&this.opnds.push(k)}get operands(){return this.opnds}equals(T){return this===T?!0:T instanceof Wi?p.ArrayEqualityComparator.INSTANCE.equals(this.opnds,T.opnds):!1}hashCode(){return a.MurmurHash.hashCode(this.opnds,40363613)}eval(T,b){for(let O of this.opnds)if(!O.eval(T,b))return!1;return!0}evalPrecedence(T,b){let O=!1,D=[];for(let z of this.opnds){let U=z.evalPrecedence(T,b);if(O=O||U!==z,U==null)return;U!==l.NONE&&D.push(U)}if(!O)return this;if(D.length===0)return l.NONE;let k=D[0];for(let z=1;z<D.length;z++)k=l.and(k,D[z]);return k}toString(){return t.join(this.opnds,"&&")}};i([r.Override],_.prototype,"operands",null),i([r.Override],_.prototype,"equals",null),i([r.Override],_.prototype,"hashCode",null),i([r.Override],_.prototype,"eval",null),i([r.Override],_.prototype,"evalPrecedence",null),i([r.Override],_.prototype,"toString",null),_=i([c(0,r.NotNull),c(1,r.NotNull)],_),l.AND=_;let v=class Gi extends y{constructor(T,b){super();let O=new h.Array2DHashSet(n.ObjectEqualityComparator.INSTANCE);T instanceof Gi?O.addAll(T.opnds):O.add(T),b instanceof Gi?O.addAll(b.opnds):O.add(b),this.opnds=O.toArray();let D=g(this.opnds),k=s(D);k&&this.opnds.push(k)}get operands(){return this.opnds}equals(T){return this===T?!0:T instanceof Gi?p.ArrayEqualityComparator.INSTANCE.equals(this.opnds,T.opnds):!1}hashCode(){return a.MurmurHash.hashCode(this.opnds,486279973)}eval(T,b){for(let O of this.opnds)if(O.eval(T,b))return!0;return!1}evalPrecedence(T,b){let O=!1,D=[];for(let z of this.opnds){let U=z.evalPrecedence(T,b);if(O=O||U!==z,U===l.NONE)return l.NONE;U&&D.push(U)}if(!O)return this;if(D.length===0)return;let k=D[0];for(let z=1;z<D.length;z++)k=l.or(k,D[z]);return k}toString(){return t.join(this.opnds,"||")}};i([r.Override],v.prototype,"operands",null),i([r.Override],v.prototype,"equals",null),i([r.Override],v.prototype,"hashCode",null),i([r.Override],v.prototype,"eval",null),i([r.Override],v.prototype,"evalPrecedence",null),i([r.Override],v.prototype,"toString",null),v=i([c(0,r.NotNull),c(1,r.NotNull)],v),l.OR=v})(o=u.SemanticContext||(u.SemanticContext={}))})(Tr)),Tr}var Rl;function Pl(){if(Rl)return it;Rl=1;var u=it&&it.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=it&&it.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(it,"__esModule",{value:!0}),it.PredicateTransition=void 0;const c=Ps(),h=Q(),p=Ln();let a=class extends c.AbstractPredicateTransition{constructor(n,t,s,e){super(n),this.ruleIndex=t,this.predIndex=s,this.isCtxDependent=e}get serializationType(){return 4}get isEpsilon(){return!0}matches(n,t,s){return!1}get predicate(){return new p.SemanticContext.Predicate(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return"pred_"+this.ruleIndex+":"+this.predIndex}};return u([h.Override],a.prototype,"serializationType",null),u([h.Override],a.prototype,"isEpsilon",null),u([h.Override],a.prototype,"matches",null),u([h.Override,h.NotNull],a.prototype,"toString",null),a=u([i(0,h.NotNull)],a),it.PredicateTransition=a,it}var Dl;function Ii(){if(Dl)return nt;Dl=1;var u=nt&&nt.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=nt&&nt.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(nt,"__esModule",{value:!0}),nt.FailedPredicateException=void 0;const c=ar(),h=Q(),p=Pl();let a=class np extends c.RecognitionException{constructor(n,t,s){super(n,n.inputStream,n.context,np.formatMessage(t,s));let o=n.interpreter.atn.states[n.state].transition(0);o instanceof p.PredicateTransition?(this._ruleIndex=o.ruleIndex,this._predicateIndex=o.predIndex):(this._ruleIndex=0,this._predicateIndex=0),this._predicate=t,super.setOffendingToken(n,n.currentToken)}get ruleIndex(){return this._ruleIndex}get predicateIndex(){return this._predicateIndex}get predicate(){return this._predicate}static formatMessage(n,t){return t||`failed predicate: {${n}}?`}};return u([h.NotNull],a,"formatMessage",null),a=u([i(0,h.NotNull)],a),nt.FailedPredicateException=a,nt}var at={},Il;function wi(){if(Il)return at;Il=1;var u=at&&at.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=at&&at.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(at,"__esModule",{value:!0}),at.InputMismatchException=void 0;const c=ar(),h=Q();let p=class extends c.RecognitionException{constructor(r,n,t){t===void 0&&(t=r.context),super(r,r.inputStream,t),n!==void 0&&this.setOffendingState(n),this.setOffendingToken(r,r.currentToken)}};return p=u([i(0,h.NotNull)],p),at.InputMismatchException=p,at}var lt={},br={},Is={},wl;function ws(){return wl||(wl=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.Arrays=void 0,(function(i){function c(a,r,n,t){return h(a,n!==void 0?n:0,t!==void 0?t:a.length,r)}i.binarySearch=c;function h(a,r,n,t){let s=r,e=n-1;for(;s<=e;){let o=s+e>>>1,l=a[o];if(l<t)s=o+1;else if(l>t)e=o-1;else return o}return-(s+1)}function p(a){let r="[",n=!0;for(let t of a)n?n=!1:r+=", ",t===null?r+="null":t===void 0?r+="undefined":r+=t;return r+="]",r}i.toString=p})(u.Arrays||(u.Arrays={}))})(Is)),Is}var Ll;function Ls(){if(Ll)return br;Ll=1;var u=br&&br.__decorate||function(n,t,s,e){var o=arguments.length,l=o<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,t,s,e);else for(var d=n.length-1;d>=0;d--)(f=n[d])&&(l=(o<3?f(l):o>3?f(t,s,l):f(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l};Object.defineProperty(br,"__esModule",{value:!0}),br.IntegerList=void 0;const i=ws(),c=Q(),h=new Int32Array(0),p=4,a=(1<<31>>>0)-1-8;let r=class Xi{constructor(t){if(!t)this._data=h,this._size=0;else if(t instanceof Xi)this._data=t._data.slice(0),this._size=t._size;else if(typeof t=="number")t===0?(this._data=h,this._size=0):(this._data=new Int32Array(t),this._size=0);else{this._data=h,this._size=0;for(let s of t)this.add(s)}}add(t){this._data.length===this._size&&this.ensureCapacity(this._size+1),this._data[this._size]=t,this._size++}addAll(t){if(Array.isArray(t))this.ensureCapacity(this._size+t.length),this._data.subarray(this._size,this._size+t.length).set(t),this._size+=t.length;else if(t instanceof Xi)this.ensureCapacity(this._size+t._size),this._data.subarray(this._size,this._size+t.size).set(t._data),this._size+=t._size;else{this.ensureCapacity(this._size+t.size);let s=0;for(let e of t)this._data[this._size+s]=e,s++;this._size+=t.size}}get(t){if(t<0||t>=this._size)throw RangeError();return this._data[t]}contains(t){for(let s=0;s<this._size;s++)if(this._data[s]===t)return!0;return!1}set(t,s){if(t<0||t>=this._size)throw RangeError();let e=this._data[t];return this._data[t]=s,e}removeAt(t){let s=this.get(t);return this._data.copyWithin(t,t+1,this._size),this._data[this._size-1]=0,this._size--,s}removeRange(t,s){if(t<0||s<0||t>this._size||s>this._size||t>s)throw RangeError();this._data.copyWithin(s,t,this._size),this._data.fill(0,this._size-(s-t),this._size),this._size-=s-t}get isEmpty(){return this._size===0}get size(){return this._size}trimToSize(){this._data.length!==this._size&&(this._data=this._data.slice(0,this._size))}clear(){this._data.fill(0,0,this._size),this._size=0}toArray(){return this._size===0?[]:Array.from(this._data.subarray(0,this._size))}sort(){this._data.subarray(0,this._size).sort()}equals(t){if(t===this)return!0;if(!(t instanceof Xi)||this._size!==t._size)return!1;for(let s=0;s<this._size;s++)if(this._data[s]!==t._data[s])return!1;return!0}hashCode(){let t=1;for(let s=0;s<this._size;s++)t=31*t+this._data[s];return t}toString(){return this._data.toString()}binarySearch(t,s,e){if(s===void 0&&(s=0),e===void 0&&(e=this._size),s<0||e<0||s>this._size||e>this._size)throw new RangeError;if(s>e)throw new RangeError;return i.Arrays.binarySearch(this._data,t,s,e)}ensureCapacity(t){if(t<0||t>a)throw new RangeError;let s;for(this._data.length===0?s=p:s=this._data.length;s<t;)s=s*2,(s<0||s>a)&&(s=a);let e=new Int32Array(s);e.set(this._data),this._data=e}toCharArray(){let t=new Uint16Array(this._size),s=0,e=!1;for(let o=0;o<this._size;o++){let l=this._data[o];if(l>=0&&l<65536){t[s]=l,s++;continue}if(!e){let d=new Uint16Array(this.charArraySize());d.set(t,0),t=d,e=!0}let f=String.fromCodePoint(l);t[s]=f.charCodeAt(0),t[s+1]=f.charCodeAt(1),s+=2}return t}charArraySize(){let t=0;for(let s=0;s<this._size;s++)t+=this._data[s]>=65536?2:1;return t}};return u([c.NotNull],r.prototype,"_data",void 0),u([c.Override],r.prototype,"equals",null),u([c.Override],r.prototype,"hashCode",null),u([c.Override],r.prototype,"toString",null),br.IntegerList=r,br}var Cr={},Fl;function je(){if(Fl)return Cr;Fl=1;var u=Cr&&Cr.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(Cr,"__esModule",{value:!0}),Cr.Interval=void 0;const i=Q(),c=1e3;let h=class Ve{constructor(a,r){this.a=a,this.b=r}static get INVALID(){return Ve._INVALID}static of(a,r){return a!==r||a<0||a>c?new Ve(a,r):(Ve.cache[a]==null&&(Ve.cache[a]=new Ve(a,a)),Ve.cache[a])}get length(){return this.b<this.a?0:this.b-this.a+1}equals(a){return a===this?!0:a instanceof Ve?this.a===a.a&&this.b===a.b:!1}hashCode(){let a=23;return a=a*31+this.a,a=a*31+this.b,a}startsBeforeDisjoint(a){return this.a<a.a&&this.b<a.a}startsBeforeNonDisjoint(a){return this.a<=a.a&&this.b>=a.a}startsAfter(a){return this.a>a.a}startsAfterDisjoint(a){return this.a>a.b}startsAfterNonDisjoint(a){return this.a>a.a&&this.a<=a.b}disjoint(a){return this.startsBeforeDisjoint(a)||this.startsAfterDisjoint(a)}adjacent(a){return this.a===a.b+1||this.b===a.a-1}properlyContains(a){return a.a>=this.a&&a.b<=this.b}union(a){return Ve.of(Math.min(this.a,a.a),Math.max(this.b,a.b))}intersection(a){return Ve.of(Math.max(this.a,a.a),Math.min(this.b,a.b))}differenceNotProperlyContained(a){let r;return a.startsBeforeNonDisjoint(this)?r=Ve.of(Math.max(this.a,a.b+1),this.b):a.startsAfterNonDisjoint(this)&&(r=Ve.of(this.a,a.a-1)),r}toString(){return this.a+".."+this.b}};return h._INVALID=new h(-1,-2),h.cache=new Array(c+1),u([i.Override],h.prototype,"equals",null),u([i.Override],h.prototype,"hashCode",null),u([i.Override],h.prototype,"toString",null),Cr.Interval=h,Cr}var Or={},Hn={},ct={},Fs={},Bl;function Ne(){return Bl||(Bl=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.Token=void 0;const i=ur();(function(c){c.INVALID_TYPE=0,c.EPSILON=-2,c.MIN_USER_TOKEN_TYPE=1,c.EOF=i.IntStream.EOF,c.DEFAULT_CHANNEL=0,c.HIDDEN_CHANNEL=1,c.MIN_USER_CHANNEL_VALUE=2})(u.Token||(u.Token={}))})(Fs)),Fs}var jl;function Vn(){if(jl)return ct;jl=1;var u=ct&&ct.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=ct&&ct.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(ct,"__esModule",{value:!0}),ct.CommonToken=void 0;const c=je(),h=Q(),p=Ne();let a=class gi{constructor(n,t,s=gi.EMPTY_SOURCE,e=p.Token.DEFAULT_CHANNEL,o=0,l=0){this._line=0,this._charPositionInLine=-1,this._channel=p.Token.DEFAULT_CHANNEL,this.index=-1,this._text=t,this._type=n,this.source=s,this._channel=e,this.start=o,this.stop=l,s.source!=null&&(this._line=s.source.line,this._charPositionInLine=s.source.charPositionInLine)}static fromToken(n){let t=new gi(n.type,void 0,gi.EMPTY_SOURCE,n.channel,n.startIndex,n.stopIndex);return t._line=n.line,t.index=n.tokenIndex,t._charPositionInLine=n.charPositionInLine,n instanceof gi?(t._text=n._text,t.source=n.source):(t._text=n.text,t.source={source:n.tokenSource,stream:n.inputStream}),t}get type(){return this._type}set type(n){this._type=n}get line(){return this._line}set line(n){this._line=n}get text(){if(this._text!=null)return this._text;let n=this.inputStream;if(n==null)return;let t=n.size;return this.start<t&&this.stop<t?n.getText(c.Interval.of(this.start,this.stop)):"<EOF>"}set text(n){this._text=n}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(n){this._charPositionInLine=n}get channel(){return this._channel}set channel(n){this._channel=n}get startIndex(){return this.start}set startIndex(n){this.start=n}get stopIndex(){return this.stop}set stopIndex(n){this.stop=n}get tokenIndex(){return this.index}set tokenIndex(n){this.index=n}get tokenSource(){return this.source.source}get inputStream(){return this.source.stream}toString(n){let t="";this._channel>0&&(t=",channel="+this._channel);let s=this.text;s!=null?(s=s.replace(/\n/g,"\\n"),s=s.replace(/\r/g,"\\r"),s=s.replace(/\t/g,"\\t")):s="<no text>";let e=String(this._type);return n&&(e=n.vocabulary.getDisplayName(this._type)),"[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+s+"',<"+e+">"+t+","+this._line+":"+this.charPositionInLine+"]"}};return a.EMPTY_SOURCE={source:void 0,stream:void 0},u([h.NotNull],a.prototype,"source",void 0),u([h.Override],a.prototype,"type",null),u([h.Override],a.prototype,"line",null),u([h.Override],a.prototype,"text",null),u([h.Override],a.prototype,"charPositionInLine",null),u([h.Override],a.prototype,"channel",null),u([h.Override],a.prototype,"startIndex",null),u([h.Override],a.prototype,"stopIndex",null),u([h.Override],a.prototype,"tokenIndex",null),u([h.Override],a.prototype,"tokenSource",null),u([h.Override],a.prototype,"inputStream",null),u([h.Override],a.prototype,"toString",null),u([i(0,h.NotNull)],a,"fromToken",null),a=u([i(2,h.NotNull)],a),ct.CommonToken=a,ct}var Ml;function Bs(){return Ml||(Ml=1,(function(u){var i=Hn&&Hn.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(u,"__esModule",{value:!0}),u.CommonTokenFactory=void 0;const c=Vn(),h=je(),p=Q();let a=class{constructor(n=!1){this.copyText=n}create(n,t,s,e,o,l,f,d){let g=new c.CommonToken(t,s,n,e,o,l);return g.line=f,g.charPositionInLine=d,s==null&&this.copyText&&n.stream!=null&&(g.text=n.stream.getText(h.Interval.of(o,l))),g}createSimple(n,t){return new c.CommonToken(n,t)}};i([p.Override],a.prototype,"create",null),i([p.Override],a.prototype,"createSimple",null),u.CommonTokenFactory=a,(function(r){r.DEFAULT=new r})(a=u.CommonTokenFactory||(u.CommonTokenFactory={}))})(Hn)),Hn}var Wn={},ql;function kl(){if(ql)return Wn;ql=1;Object.defineProperty(Wn,"__esModule",{value:!0}),Wn.IntegerStack=void 0;const u=Ls();let i=class extends u.IntegerList{constructor(h){super(h)}push(h){this.add(h)}pop(){return this.removeAt(this.size-1)}peek(){return this.get(this.size-1)}};return Wn.IntegerStack=i,Wn}var Rr={},Gn={},Ul;function zl(){if(Ul)return Gn;Ul=1;Object.defineProperty(Gn,"__esModule",{value:!0}),Gn.AcceptStateInfo=void 0;let u=class{constructor(c,h){this._prediction=c,this._lexerActionExecutor=h}get prediction(){return this._prediction}get lexerActionExecutor(){return this._lexerActionExecutor}};return Gn.AcceptStateInfo=u,Gn}var Pr={},Xn={},Hl;function Fn(){if(Hl)return Xn;Hl=1;Object.defineProperty(Xn,"__esModule",{value:!0}),Xn.Array2DHashMap=void 0;const u=cr();class i{constructor(p){this.keyComparator=p}hashCode(p){return this.keyComparator.hashCode(p.key)}equals(p,a){return this.keyComparator.equals(p.key,a.key)}}let c=class gu{constructor(p){p instanceof gu?this.backingStore=new u.Array2DHashSet(p.backingStore):this.backingStore=new u.Array2DHashSet(new i(p))}clear(){this.backingStore.clear()}containsKey(p){return this.backingStore.contains({key:p})}get(p){let a=this.backingStore.get({key:p});if(a)return a.value}get isEmpty(){return this.backingStore.isEmpty}put(p,a){let r=this.backingStore.get({key:p,value:a}),n;return r?(n=r.value,r.value=a):this.backingStore.add({key:p,value:a}),n}putIfAbsent(p,a){let r=this.backingStore.get({key:p,value:a}),n;return r?n=r.value:this.backingStore.add({key:p,value:a}),n}get size(){return this.backingStore.size}hashCode(){return this.backingStore.hashCode()}equals(p){return p instanceof gu?this.backingStore.equals(p.backingStore):!1}};return Xn.Array2DHashMap=c,Xn}var ft={},Dr={},ht={},$n={},Vl;function Ir(){if(Vl)return $n;Vl=1;Object.defineProperty($n,"__esModule",{value:!0}),$n.DecisionState=void 0;const u=rt();let i=class extends u.ATNState{constructor(){super(...arguments),this.decision=-1,this.nonGreedy=!1,this.sll=!1}};return $n.DecisionState=i,$n}var wr={},Kn={},Wl;function js(){return Wl||(Wl=1,(function(u){var i=Kn&&Kn.__decorate||function(t,s,e,o){var l=arguments.length,f=l<3?s:o===null?o=Object.getOwnPropertyDescriptor(s,e):o,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(t,s,e,o);else for(var g=t.length-1;g>=0;g--)(d=t[g])&&(f=(l<3?d(f):l>3?d(s,e,f):d(s,e))||f);return l>3&&f&&Object.defineProperty(s,e,f),f};Object.defineProperty(u,"__esModule",{value:!0}),u.PredictionContextCache=void 0;const c=Fn(),h=Q(),p=Ze(),a=Xe(),r=Fe();let n=class vu{constructor(s=!0){this.contexts=new c.Array2DHashMap(p.ObjectEqualityComparator.INSTANCE),this.childContexts=new c.Array2DHashMap(p.ObjectEqualityComparator.INSTANCE),this.joinContexts=new c.Array2DHashMap(p.ObjectEqualityComparator.INSTANCE),this.enableCache=s}getAsCached(s){if(!this.enableCache)return s;let e=this.contexts.get(s);return e||(e=s,this.contexts.put(s,s)),e}getChild(s,e){if(!this.enableCache)return s.getChild(e);let o=new vu.PredictionContextAndInt(s,e),l=this.childContexts.get(o);return l||(l=s.getChild(e),l=this.getAsCached(l),this.childContexts.put(o,l)),l}join(s,e){if(!this.enableCache)return a.PredictionContext.join(s,e,this);let o=new vu.IdentityCommutativePredictionContextOperands(s,e),l=this.joinContexts.get(o);return l||(l=a.PredictionContext.join(s,e,this),l=this.getAsCached(l),this.joinContexts.put(o,l),l)}};u.PredictionContextCache=n,n.UNCACHED=new n(!1),(function(t){class s{constructor(l,f){this.obj=l,this.value=f}equals(l){if(l instanceof s){if(l===this)return!0}else return!1;let f=l;return this.value===f.value&&(this.obj===f.obj||this.obj!=null&&this.obj.equals(f.obj))}hashCode(){let l=5;return l=7*l+(this.obj!=null?this.obj.hashCode():0),l=7*l+this.value,l}}i([h.Override],s.prototype,"equals",null),i([h.Override],s.prototype,"hashCode",null),t.PredictionContextAndInt=s;class e{constructor(l,f){r(l!=null),r(f!=null),this._x=l,this._y=f}get x(){return this._x}get y(){return this._y}equals(l){if(l instanceof e){if(this===l)return!0}else return!1;let f=l;return this._x===f._x&&this._y===f._y||this._x===f._y&&this._y===f._x}hashCode(){return this._x.hashCode()^this._y.hashCode()}}i([h.Override],e.prototype,"equals",null),i([h.Override],e.prototype,"hashCode",null),t.IdentityCommutativePredictionContextOperands=e})(n=u.PredictionContextCache||(u.PredictionContextCache={}))})(Kn)),Kn}var Gl;function Xe(){return Gl||(Gl=1,(function(u){var i=wr&&wr.__decorate||function(g,x,m,y){var _=arguments.length,v=_<3?x:y===null?y=Object.getOwnPropertyDescriptor(x,m):y,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(g,x,m,y);else for(var T=g.length-1;T>=0;T--)(N=g[T])&&(v=(_<3?N(v):_>3?N(x,m,v):N(x,m))||v);return _>3&&v&&Object.defineProperty(x,m,v),v},c=wr&&wr.__param||function(g,x){return function(m,y){x(m,y,g)}};Object.defineProperty(u,"__esModule",{value:!0}),u.SingletonPredictionContext=u.PredictionContext=void 0;const h=Fn(),p=cr(),a=ws(),r=Pe(),n=Q(),t=js(),s=Fe(),e=1;let o=class Le{constructor(x){this.cachedHashCode=x}static calculateEmptyHashCode(){let x=r.MurmurHash.initialize(e);return x=r.MurmurHash.finish(x,0),x}static calculateSingleHashCode(x,m){let y=r.MurmurHash.initialize(e);return y=r.MurmurHash.update(y,x),y=r.MurmurHash.update(y,m),y=r.MurmurHash.finish(y,2),y}static calculateHashCode(x,m){let y=r.MurmurHash.initialize(e);for(let _ of x)y=r.MurmurHash.update(y,_);for(let _ of m)y=r.MurmurHash.update(y,_);return y=r.MurmurHash.finish(y,2*x.length),y}static fromRuleContext(x,m,y=!0){if(m.isEmpty)return y?Le.EMPTY_FULL:Le.EMPTY_LOCAL;let _;m._parent?_=Le.fromRuleContext(x,m._parent,y):_=y?Le.EMPTY_FULL:Le.EMPTY_LOCAL;let N=x.states[m.invokingState].transition(0);return _.getChild(N.followState.stateNumber)}static addEmptyContext(x){return x.addEmptyContext()}static removeEmptyContext(x){return x.removeEmptyContext()}static join(x,m,y=t.PredictionContextCache.UNCACHED){if(x===m)return x;if(x.isEmpty)return Le.isEmptyLocal(x)?x:Le.addEmptyContext(m);if(m.isEmpty)return Le.isEmptyLocal(m)?m:Le.addEmptyContext(x);let _=x.size,v=m.size;if(_===1&&v===1&&x.getReturnState(0)===m.getReturnState(0)){let U=y.join(x.getParent(0),m.getParent(0));return U===x.getParent(0)?x:U===m.getParent(0)?m:U.getChild(x.getReturnState(0))}let N=0,T=new Array(_+v),b=new Array(T.length),O=0,D=0,k=!0,z=!0;for(;O<_&&D<v;)x.getReturnState(O)===m.getReturnState(D)?(T[N]=y.join(x.getParent(O),m.getParent(D)),b[N]=x.getReturnState(O),k=k&&T[N]===x.getParent(O),z=z&&T[N]===m.getParent(D),O++,D++):x.getReturnState(O)<m.getReturnState(D)?(T[N]=x.getParent(O),b[N]=x.getReturnState(O),z=!1,O++):(s(m.getReturnState(D)<x.getReturnState(O)),T[N]=m.getParent(D),b[N]=m.getReturnState(D),k=!1,D++),N++;for(;O<_;)T[N]=x.getParent(O),b[N]=x.getReturnState(O),O++,z=!1,N++;for(;D<v;)T[N]=m.getParent(D),b[N]=m.getReturnState(D),D++,k=!1,N++;return k?x:z?m:(N<T.length&&(T=T.slice(0,N),b=b.slice(0,N)),T.length===0?Le.EMPTY_FULL:T.length===1?new d(T[0],b[0]):new f(T,b))}static isEmptyLocal(x){return x===Le.EMPTY_LOCAL}static getCachedContext(x,m,y){if(x.isEmpty)return x;let _=y.get(x);if(_)return _;if(_=m.get(x),_)return y.put(x,_),_;let v=!1,N=new Array(x.size);for(let b=0;b<N.length;b++){let O=Le.getCachedContext(x.getParent(b),m,y);if(v||O!==x.getParent(b)){if(!v){N=new Array(x.size);for(let D=0;D<x.size;D++)N[D]=x.getParent(D);v=!0}N[b]=O}}if(!v)return _=m.putIfAbsent(x,x),y.put(x,_??x),x;let T;if(N.length===1)T=new d(N[0],x.getReturnState(0));else{let b=new Array(x.size);for(let O=0;O<x.size;O++)b[O]=x.getReturnState(O);T=new f(N,b,x.hashCode())}return _=m.putIfAbsent(T,T),y.put(T,_||T),y.put(x,_||T),T}appendSingleContext(x,m){return this.appendContext(Le.EMPTY_FULL.getChild(x),m)}getChild(x){return new d(this,x)}hashCode(){return this.cachedHashCode}toStrings(x,m,y=Le.EMPTY_FULL){let _=[];e:for(let v=0;;v++){let N=0,T=!0,b=this,O=m,D="";for(D+="[";!b.isEmpty&&b!==y;){let k=0;if(b.size>0){let z=1;for(;1<<z>>>0<b.size;)z++;let U=(1<<z>>>0)-1;if(k=v>>N&U,T=T&&k>=b.size-1,k>=b.size)continue e;N+=z}if(x){D.length>1&&(D+=" ");let U=x.atn.states[O],te=x.ruleNames[U.ruleIndex];D+=te}else b.getReturnState(k)!==Le.EMPTY_FULL_STATE_KEY&&(b.isEmpty||(D.length>1&&(D+=" "),D+=b.getReturnState(k)));O=b.getReturnState(k),b=b.getParent(k)}if(D+="]",_.push(D),T)break}return _}};i([n.Override],o.prototype,"hashCode",null),i([c(0,n.NotNull),c(1,n.NotNull),c(2,n.NotNull)],o,"join",null),i([c(0,n.NotNull),c(1,n.NotNull),c(2,n.NotNull)],o,"getCachedContext",null),u.PredictionContext=o;class l extends o{constructor(x){super(o.calculateEmptyHashCode()),this.fullContext=x}get isFullContext(){return this.fullContext}addEmptyContext(){return this}removeEmptyContext(){throw new Error("Cannot remove the empty context from itself.")}getParent(x){throw new Error("index out of bounds")}getReturnState(x){throw new Error("index out of bounds")}findReturnState(x){return-1}get size(){return 0}appendSingleContext(x,m){return m.getChild(this,x)}appendContext(x,m){return x}get isEmpty(){return!0}get hasEmpty(){return!0}equals(x){return this===x}toStrings(x,m,y){return["[]"]}}i([n.Override],l.prototype,"addEmptyContext",null),i([n.Override],l.prototype,"removeEmptyContext",null),i([n.Override],l.prototype,"getParent",null),i([n.Override],l.prototype,"getReturnState",null),i([n.Override],l.prototype,"findReturnState",null),i([n.Override],l.prototype,"size",null),i([n.Override],l.prototype,"appendSingleContext",null),i([n.Override],l.prototype,"appendContext",null),i([n.Override],l.prototype,"isEmpty",null),i([n.Override],l.prototype,"hasEmpty",null),i([n.Override],l.prototype,"equals",null),i([n.Override],l.prototype,"toStrings",null);let f=class On extends o{constructor(x,m,y){super(y||o.calculateHashCode(x,m)),s(x.length===m.length),s(m.length>1||m[0]!==o.EMPTY_FULL_STATE_KEY,"Should be using PredictionContext.EMPTY instead."),this.parents=x,this.returnStates=m}getParent(x){return this.parents[x]}getReturnState(x){return this.returnStates[x]}findReturnState(x){return a.Arrays.binarySearch(this.returnStates,x)}get size(){return this.returnStates.length}get isEmpty(){return!1}get hasEmpty(){return this.returnStates[this.returnStates.length-1]===o.EMPTY_FULL_STATE_KEY}addEmptyContext(){if(this.hasEmpty)return this;let x=this.parents.slice(0),m=this.returnStates.slice(0);return x.push(o.EMPTY_FULL),m.push(o.EMPTY_FULL_STATE_KEY),new On(x,m)}removeEmptyContext(){if(!this.hasEmpty)return this;if(this.returnStates.length===2)return new d(this.parents[0],this.returnStates[0]);{let x=this.parents.slice(0,this.parents.length-1),m=this.returnStates.slice(0,this.returnStates.length-1);return new On(x,m)}}appendContext(x,m){return On.appendContextImpl(this,x,new o.IdentityHashMap)}static appendContextImpl(x,m,y){if(m.isEmpty){if(o.isEmptyLocal(m)){if(x.hasEmpty)return o.EMPTY_LOCAL;throw new Error("what to do here?")}return x}if(m.size!==1)throw new Error("Appending a tree suffix is not yet supported.");let _=y.get(x);if(!_){if(x.isEmpty)_=m;else{let v=x.size;x.hasEmpty&&v--;let N=new Array(v),T=new Array(v);for(let b=0;b<v;b++)T[b]=x.getReturnState(b);for(let b=0;b<v;b++)N[b]=On.appendContextImpl(x.getParent(b),m,y);N.length===1?_=new d(N[0],T[0]):(s(N.length>1),_=new On(N,T)),x.hasEmpty&&(_=o.join(_,m))}y.put(x,_)}return _}equals(x){if(this===x)return!0;if(!(x instanceof On)||this.hashCode()!==x.hashCode())return!1;let m=x;return this.equalsImpl(m,new p.Array2DHashSet)}equalsImpl(x,m){let y=[],_=[];for(y.push(this),_.push(x);;){let v=y.pop(),N=_.pop();if(!v||!N)break;let T=new t.PredictionContextCache.IdentityCommutativePredictionContextOperands(v,N);if(!m.add(T))continue;let b=T.x.size;if(b===0){if(!T.x.equals(T.y))return!1;continue}let O=T.y.size;if(b!==O)return!1;for(let D=0;D<b;D++){if(T.x.getReturnState(D)!==T.y.getReturnState(D))return!1;let k=T.x.getParent(D),z=T.y.getParent(D);if(k.hashCode()!==z.hashCode())return!1;k!==z&&(y.push(k),_.push(z))}}return!0}};i([n.NotNull],f.prototype,"parents",void 0),i([n.NotNull],f.prototype,"returnStates",void 0),i([n.Override],f.prototype,"getParent",null),i([n.Override],f.prototype,"getReturnState",null),i([n.Override],f.prototype,"findReturnState",null),i([n.Override],f.prototype,"size",null),i([n.Override],f.prototype,"isEmpty",null),i([n.Override],f.prototype,"hasEmpty",null),i([n.Override],f.prototype,"addEmptyContext",null),i([n.Override],f.prototype,"removeEmptyContext",null),i([n.Override],f.prototype,"appendContext",null),i([n.Override],f.prototype,"equals",null),f=i([c(0,n.NotNull)],f);let d=class ip extends o{constructor(x,m){super(o.calculateSingleHashCode(x,m)),this.parent=x,this.returnState=m}getParent(x){return this.parent}getReturnState(x){return this.returnState}findReturnState(x){return this.returnState===x?0:-1}get size(){return 1}get isEmpty(){return!1}get hasEmpty(){return!1}appendContext(x,m){return m.getChild(this.parent.appendContext(x,m),this.returnState)}addEmptyContext(){let x=[this.parent,o.EMPTY_FULL],m=[this.returnState,o.EMPTY_FULL_STATE_KEY];return new f(x,m)}removeEmptyContext(){return this}equals(x){if(x===this)return!0;if(!(x instanceof ip))return!1;let m=x;return this.hashCode()!==m.hashCode()?!1:this.returnState===m.returnState&&this.parent.equals(m.parent)}};i([n.NotNull],d.prototype,"parent",void 0),i([n.Override],d.prototype,"getParent",null),i([n.Override],d.prototype,"getReturnState",null),i([n.Override],d.prototype,"findReturnState",null),i([n.Override],d.prototype,"size",null),i([n.Override],d.prototype,"isEmpty",null),i([n.Override],d.prototype,"hasEmpty",null),i([n.Override],d.prototype,"appendContext",null),i([n.Override],d.prototype,"addEmptyContext",null),i([n.Override],d.prototype,"removeEmptyContext",null),i([n.Override],d.prototype,"equals",null),d=i([c(0,n.NotNull)],d),u.SingletonPredictionContext=d,(function(g){g.EMPTY_LOCAL=new l(!1),g.EMPTY_FULL=new l(!0),g.EMPTY_LOCAL_STATE_KEY=-2147483648,g.EMPTY_FULL_STATE_KEY=(1<<31>>>0)-1;class x extends h.Array2DHashMap{constructor(){super(m.INSTANCE)}}g.IdentityHashMap=x;class m{IdentityEqualityComparator(){}hashCode(_){return _.hashCode()}equals(_,v){return _===v}}m.INSTANCE=new m,i([n.Override],m.prototype,"hashCode",null),i([n.Override],m.prototype,"equals",null),g.IdentityEqualityComparator=m})(o=u.PredictionContext||(u.PredictionContext={}))})(wr)),wr}var Xl;function Li(){if(Xl)return ht;Xl=1;var u=ht&&ht.__decorate||function(g,x,m,y){var _=arguments.length,v=_<3?x:y===null?y=Object.getOwnPropertyDescriptor(x,m):y,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(g,x,m,y);else for(var T=g.length-1;T>=0;T--)(N=g[T])&&(v=(_<3?N(v):_>3?N(x,m,v):N(x,m))||v);return _>3&&v&&Object.defineProperty(x,m,v),v},i=ht&&ht.__param||function(g,x){return function(m,y){x(m,y,g)}};Object.defineProperty(ht,"__esModule",{value:!0}),ht.ATNConfig=void 0;const c=Fn(),h=Ir(),p=Pe(),a=Q(),r=Ze(),n=Xe(),t=Ln(),s=Fe(),e=2147483648;let o=class vi{constructor(x,m,y){typeof m=="number"?(s((m&16777215)===m),this._state=x,this.altAndOuterContextDepth=m,this._context=y):(this._state=x,this.altAndOuterContextDepth=m.altAndOuterContextDepth,this._context=y)}static create(x,m,y,_=t.SemanticContext.NONE,v){return _!==t.SemanticContext.NONE?v!=null?new d(v,_,x,m,y,!1):new l(_,x,m,y):v!=null?new f(v,x,m,y,!1):new vi(x,m,y)}get state(){return this._state}get alt(){return this.altAndOuterContextDepth&16777215}get context(){return this._context}set context(x){this._context=x}get reachesIntoOuterContext(){return this.outerContextDepth!==0}get outerContextDepth(){return this.altAndOuterContextDepth>>>24&127}set outerContextDepth(x){s(x>=0),x=Math.min(x,127),this.altAndOuterContextDepth=x<<24|(this.altAndOuterContextDepth&-2130706433)>>>0}get lexerActionExecutor(){}get semanticContext(){return t.SemanticContext.NONE}get hasPassedThroughNonGreedyDecision(){return!1}clone(){return this.transform(this.state,!1)}transform(x,m,y){return y==null?this.transformImpl(x,this._context,this.semanticContext,m,this.lexerActionExecutor):y instanceof n.PredictionContext?this.transformImpl(x,y,this.semanticContext,m,this.lexerActionExecutor):y instanceof t.SemanticContext?this.transformImpl(x,this._context,y,m,this.lexerActionExecutor):this.transformImpl(x,this._context,this.semanticContext,m,y)}transformImpl(x,m,y,_,v){let N=_&&vi.checkNonGreedyDecision(this,x);return y!==t.SemanticContext.NONE?v!=null||N?new d(v,y,x,this,m,N):new l(y,x,this,m):v!=null||N?new f(v,x,this,m,N):new vi(x,this,m)}static checkNonGreedyDecision(x,m){return x.hasPassedThroughNonGreedyDecision||m instanceof h.DecisionState&&m.nonGreedy}appendContext(x,m){if(typeof x=="number"){let y=this.context.appendSingleContext(x,m);return this.transform(this.state,!1,y)}else{let y=this.context.appendContext(x,m);return this.transform(this.state,!1,y)}}contains(x){if(this.state.stateNumber!==x.state.stateNumber||this.alt!==x.alt||!this.semanticContext.equals(x.semanticContext))return!1;let m=[],y=[];for(m.push(this.context),y.push(x.context);;){let _=m.pop(),v=y.pop();if(!_||!v)break;if(_===v)return!0;if(_.size<v.size)return!1;if(v.isEmpty)return _.hasEmpty;for(let N=0;N<v.size;N++){let T=_.findReturnState(v.getReturnState(N));if(T<0)return!1;m.push(_.getParent(T)),y.push(v.getParent(N))}}return!1}get isPrecedenceFilterSuppressed(){return(this.altAndOuterContextDepth&e)!==0}set isPrecedenceFilterSuppressed(x){x?this.altAndOuterContextDepth|=e:this.altAndOuterContextDepth&=~e}equals(x){return this===x?!0:x instanceof vi?this.state.stateNumber===x.state.stateNumber&&this.alt===x.alt&&this.reachesIntoOuterContext===x.reachesIntoOuterContext&&this.context.equals(x.context)&&this.semanticContext.equals(x.semanticContext)&&this.isPrecedenceFilterSuppressed===x.isPrecedenceFilterSuppressed&&this.hasPassedThroughNonGreedyDecision===x.hasPassedThroughNonGreedyDecision&&r.ObjectEqualityComparator.INSTANCE.equals(this.lexerActionExecutor,x.lexerActionExecutor):!1}hashCode(){let x=p.MurmurHash.initialize(7);return x=p.MurmurHash.update(x,this.state.stateNumber),x=p.MurmurHash.update(x,this.alt),x=p.MurmurHash.update(x,this.reachesIntoOuterContext?1:0),x=p.MurmurHash.update(x,this.context),x=p.MurmurHash.update(x,this.semanticContext),x=p.MurmurHash.update(x,this.hasPassedThroughNonGreedyDecision?1:0),x=p.MurmurHash.update(x,this.lexerActionExecutor),x=p.MurmurHash.finish(x,7),x}toDotString(){let x="";x+=`digraph G {
|
|
173
69
|
`,x+=`rankdir=LR;
|
|
174
70
|
`;let m=new c.Array2DHashMap(n.PredictionContext.IdentityEqualityComparator.INSTANCE),y=[];function _(v){let N=m.size,T=m.putIfAbsent(v,N);return T??(y.push(v),N)}for(y.push(this.context),m.put(this.context,0);;){let v=y.pop();if(!v)break;for(let N=0;N<v.size;N++)x+=" s"+_(v),x+="->",x+="s"+_(v.getParent(N)),x+='[label="'+v.getReturnState(N)+`"];
|
|
175
71
|
`}return x+=`}
|
|
176
|
-
`,x.toString()}toString(x,m,y){y==null&&(y=m!=null),m==null&&(m=!0);let _="",v;y?v=this.context.toStrings(x,this.state.stateNumber):v=["?"];let N=!0;for(let T of v)N?N=!1:_+=", ",_+="(",_+=this.state,m&&(_+=",",_+=this.alt),this.context&&(_+=",",_+=T),this.semanticContext!==t.SemanticContext.NONE&&(_+=",",_+=this.semanticContext),this.reachesIntoOuterContext&&(_+=",up="+this.outerContextDepth),_+=")";return _.toString()}};u([a.NotNull],o.prototype,"_state",void 0),u([a.NotNull],o.prototype,"_context",void 0),u([a.NotNull],o.prototype,"state",null),u([a.NotNull,i(0,a.NotNull)],o.prototype,"context",null),u([a.NotNull],o.prototype,"semanticContext",null),u([a.Override],o.prototype,"clone",null),u([i(0,a.NotNull),i(2,a.NotNull)],o.prototype,"transformImpl",null),u([a.Override],o.prototype,"equals",null),u([a.Override],o.prototype,"hashCode",null),u([i(0,a.NotNull),i(3,a.NotNull)],o,"create",null),o=u([i(0,a.NotNull),i(2,a.NotNull)],o),_t.ATNConfig=o;let l=class extends o{constructor(x,m,y,_){typeof y=="number"?super(m,y,_):super(m,y,_),this._semanticContext=x}get semanticContext(){return this._semanticContext}};u([a.NotNull],l.prototype,"_semanticContext",void 0),u([a.Override],l.prototype,"semanticContext",null),l=u([i(1,a.NotNull),i(2,a.NotNull)],l);let f=class extends o{constructor(x,m,y,_,v){if(typeof y=="number")super(m,y,_);else if(super(m,y,_),y.semanticContext!==t.SemanticContext.NONE)throw new Error("Not supported");this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=v}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};u([a.Override],f.prototype,"lexerActionExecutor",null),u([a.Override],f.prototype,"hasPassedThroughNonGreedyDecision",null),f=u([i(1,a.NotNull),i(2,a.NotNull)],f);let d=class extends l{constructor(x,m,y,_,v,N){typeof _=="number"?super(m,y,_,v):super(m,y,_,v),this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=N}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};return u([a.Override],d.prototype,"lexerActionExecutor",null),u([a.Override],d.prototype,"hasPassedThroughNonGreedyDecision",null),d=u([i(1,a.NotNull),i(2,a.NotNull)],d),_t}var Jn={},Kl;function yr(){if(Kl)return Jn;Kl=1;/*!
|
|
177
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
178
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
179
|
-
*/Object.defineProperty(Jn,"__esModule",{value:!0}),Jn.BitSet=void 0;const u=Fn(),i=we(),c=new Uint16Array(0);function h(o){return o>>>4}function p(o){return o*16}function a(o){let l=1;for(let f=0;f<16;f++){if((o&l)!==0)return f;l=l<<1>>>0}throw new RangeError("No specified bit found")}function r(o){let l=32768;for(let f=15;f>=0;f--){if((o&l)!==0)return f;l=l>>>1}throw new RangeError("No specified bit found")}function n(o,l){return o&=15,l&=15,o===l?1<<o>>>0:65535>>>15-l^65535>>>16-o}const t=new Uint8Array(65536);for(let o=0;o<16;o++){const l=1<<o>>>0;let f=0;for(;f<t.length;){f+=l;for(let d=0;d<l;d++)t[f]++,f++}}let s=class Ei{constructor(l){if(!l)this.data=c;else if(typeof l=="number"){if(l<0)throw new RangeError("nbits cannot be negative");this.data=new Uint16Array(h(l-1)+1)}else if(l instanceof Ei)this.data=l.data.slice(0);else{let f=-1;for(let d of l)f<d&&(f=d);this.data=new Uint16Array(h(f-1)+1);for(let d of l)this.set(d)}}and(l){const f=this.data,d=l.data,g=Math.min(f.length,d.length);let x=-1;for(let m=0;m<g;m++)(f[m]&=d[m])!==0&&(x=m);x===-1&&(this.data=c),x<f.length-1&&(this.data=f.slice(0,x+1))}andNot(l){const f=this.data,d=l.data,g=Math.min(f.length,d.length);let x=-1;for(let m=0;m<g;m++)(f[m]&=d[m]^65535)!==0&&(x=m);x===-1&&(this.data=c),x<f.length-1&&(this.data=f.slice(0,x+1))}cardinality(){if(this.isEmpty)return 0;const l=this.data,f=l.length;let d=0;for(let g=0;g<f;g++)d+=t[l[g]];return d}clear(l,f){l==null?this.data.fill(0):f==null?this.set(l,!1):this.set(l,f,!1)}flip(l,f){if(f==null&&(f=l),l<0||f<l)throw new RangeError;let d=h(l);const g=h(f);if(d===g)this.data[d]^=n(l,f);else{for(this.data[d++]^=n(l,15);d<g;)this.data[d++]^=65535;this.data[d++]^=n(0,f)}}get(l,f){if(f===void 0)return!!(this.data[h(l)]&n(l,l));{let d=new Ei(f+1);for(let g=l;g<=f;g++)d.set(g,this.get(g));return d}}intersects(l){let f=Math.min(this.length(),l.length());if(f===0)return!1;let d=h(f-1);for(let g=0;g<=d;g++)if((this.data[g]&l.data[g])!==0)return!0;return!1}get isEmpty(){return this.length()===0}length(){return this.data.length?this.previousSetBit(p(this.data.length)-1)+1:0}nextClearBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const f=this.data,d=f.length;let g=h(l);if(g>d)return-1;let x=65535^n(l,15);if((f[g]|x)===65535){for(g++,x=0;g<d&&f[g]===65535;g++);if(g===d)return-1}return p(g)+a((f[g]|x)^65535)}nextSetBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const f=this.data,d=f.length;let g=h(l);if(g>d)return-1;let x=n(l,15);if((f[g]&x)===0){for(g++,x=65535;g<d&&f[g]===0;g++);if(g>=d)return-1}return p(g)+a(f[g]&x)}or(l){const f=this.data,d=l.data,g=Math.min(f.length,d.length),x=Math.max(f.length,d.length),m=f.length===x?f:new Uint16Array(x);let y=-1;for(let v=0;v<g;v++)(m[v]=f[v]|d[v])!==0&&(y=v);const _=f.length>d.length?f:d;for(let v=g;v<x;v++)(m[v]=_[v])!==0&&(y=v);y===-1?this.data=c:m.length===y+1?this.data=m:this.data=m.slice(0,y)}previousClearBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const f=this.data,d=f.length;let g=h(l);g>=d&&(g=d-1);let x=65535^n(0,l);if((f[g]|x)===65535){for(x=0,g--;g>=0&&f[g]===65535;g--);if(g<0)return-1}return p(g)+r((f[g]|x)^65535)}previousSetBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const f=this.data,d=f.length;let g=h(l);g>=d&&(g=d-1);let x=n(0,l);if((f[g]&x)===0){for(g--,x=65535;g>=0&&f[g]===0;g--);if(g<0)return-1}return p(g)+r(f[g]&x)}set(l,f,d){if(f===void 0?(f=l,d=!0):typeof f=="boolean"&&(d=f,f=l),d===void 0&&(d=!0),l<0||l>f)throw new RangeError;let g=h(l),x=h(f);if(d&&x>=this.data.length){let m=new Uint16Array(x+1);this.data.forEach((y,_)=>m[_]=y),this.data=m}else if(!d){if(g>=this.data.length)return;x>=this.data.length&&(x=this.data.length-1,f=this.data.length*16-1)}if(g===x)this._setBits(g,d,n(l,f));else{for(this._setBits(g++,d,n(l,15));g<x;)this.data[g++]=d?65535:0;this._setBits(g,d,n(0,f))}}_setBits(l,f,d){f?this.data[l]|=d:this.data[l]&=65535^d}get size(){return this.data.byteLength*8}hashCode(){return i.MurmurHash.hashCode(this.data,22)}equals(l){if(l===this)return!0;if(!(l instanceof Ei))return!1;const f=this.length();if(f!==l.length())return!1;if(f===0)return!0;let d=h(f-1);for(let g=0;g<=d;g++)if(this.data[g]!==l.data[g])return!1;return!0}toString(){let l="{",f=!0;for(let d=this.nextSetBit(0);d>=0;d=this.nextSetBit(d+1))f?f=!1:l+=", ",l+=d;return l+="}",l}xor(l){const f=this.data,d=l.data,g=Math.min(f.length,d.length),x=Math.max(f.length,d.length),m=f.length===x?f:new Uint16Array(x);let y=-1;for(let v=0;v<g;v++)(m[v]=f[v]^d[v])!==0&&(y=v);const _=f.length>d.length?f:d;for(let v=g;v<x;v++)(m[v]=_[v])!==0&&(y=v);y===-1?this.data=c:m.length===y+1?this.data=m:this.data=m.slice(0,y+1)}clone(){return new Ei(this)}[Symbol.iterator](){return new e(this.data)}[u.inspect.custom](){return"BitSet "+this.toString()}};Jn.BitSet=s;class e{constructor(l){this.data=l,this.index=0,this.mask=65535}next(){for(;this.index<this.data.length;){const l=this.data[this.index]&this.mask;if(l!==0){const f=p(this.index)+a(l);return this.mask=n(f+1,15),{done:!1,value:f}}this.index++,this.mask=65535}return{done:!0,value:-1}}[Symbol.iterator](){return this}}return Jn}var Yl;function Zn(){if(Yl)return Lr;Yl=1;/*!
|
|
180
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
181
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
182
|
-
*/var u=Lr&&Lr.__decorate||function(m,y,_,v){var N=arguments.length,T=N<3?y:v===null?v=Object.getOwnPropertyDescriptor(y,_):v,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(m,y,_,v);else for(var O=m.length-1;O>=0;O--)(b=m[O])&&(T=(N<3?b(T):N>3?b(y,_,T):b(y,_))||T);return N>3&&T&&Object.defineProperty(y,_,T),T};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.ATNConfigSet=void 0;const i=jn(),c=xr(),h=wi(),p=bt(),a=Bi(),r=yr(),n=Q(),t=nt(),s=Je(),e=qs(),o=Bn(),l=Me(),f=ht();class d{hashCode(y){return y.state^y.alt}equals(y,_){return y.state===_.state&&y.alt===_.alt}}d.INSTANCE=new d;function g(m){return m?new i.Array2DHashMap(m):new i.Array2DHashMap(d.INSTANCE)}let x=class Eu{constructor(y,_){this._uniqueAlt=0,this._hasSemanticContext=!1,this._dipsIntoOuterContext=!1,this.outermostConfigSet=!1,this.cachedHashCode=-1,y?(_?(this.mergedConfigs=void 0,this.unmerged=void 0):y.isReadOnly?(this.mergedConfigs=g(),this.unmerged=[]):(this.mergedConfigs=g(y.mergedConfigs),this.unmerged=y.unmerged.slice(0)),this.configs=y.configs.slice(0),this._dipsIntoOuterContext=y._dipsIntoOuterContext,this._hasSemanticContext=y._hasSemanticContext,this.outermostConfigSet=y.outermostConfigSet,(_||!y.isReadOnly)&&(this._uniqueAlt=y._uniqueAlt,this._conflictInfo=y._conflictInfo)):(this.mergedConfigs=g(),this.unmerged=[],this.configs=[],this._uniqueAlt=p.ATN.INVALID_ALT_NUMBER)}getRepresentedAlternatives(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts.clone();let y=new r.BitSet;for(let _ of this)y.set(_.alt);return y}get isReadOnly(){return this.mergedConfigs==null}get isOutermostConfigSet(){return this.outermostConfigSet}set isOutermostConfigSet(y){if(this.outermostConfigSet&&!y)throw new Error("IllegalStateException");l(!y||!this._dipsIntoOuterContext),this.outermostConfigSet=y}getStates(){let y=new c.Array2DHashSet(t.ObjectEqualityComparator.INSTANCE);for(let _ of this.configs)y.add(_.state);return y}optimizeConfigs(y){if(this.configs.length!==0)for(let _ of this.configs)_.context=y.atn.getCachedContext(_.context)}clone(y){let _=new Eu(this,y);return!y&&this.isReadOnly&&_.addAll(this.configs),_}get size(){return this.configs.length}get isEmpty(){return this.configs.length===0}contains(y){if(!(y instanceof a.ATNConfig))return!1;if(this.mergedConfigs&&this.unmerged){let _=y,v=this.getKey(_),N=this.mergedConfigs.get(v);if(N!=null&&this.canMerge(_,v,N))return N.contains(_);for(let T of this.unmerged)if(T.contains(y))return!0}else for(let _ of this.configs)if(_.contains(y))return!0;return!1}*[Symbol.iterator](){yield*this.configs}toArray(){return this.configs}add(y,_){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");l(!this.outermostConfigSet||!y.reachesIntoOuterContext),_==null&&(_=e.PredictionContextCache.UNCACHED);let v,N=this.getKey(y),T=this.mergedConfigs.get(N);if(v=T==null,T!=null&&this.canMerge(y,N,T)){T.outerContextDepth=Math.max(T.outerContextDepth,y.outerContextDepth),y.isPrecedenceFilterSuppressed&&(T.isPrecedenceFilterSuppressed=!0);let b=s.PredictionContext.join(T.context,y.context,_);return this.updatePropertiesForMergedConfig(y),T.context===b?!1:(T.context=b,!0)}for(let b=0;b<this.unmerged.length;b++){let O=this.unmerged[b];if(this.canMerge(y,N,O)){O.outerContextDepth=Math.max(O.outerContextDepth,y.outerContextDepth),y.isPrecedenceFilterSuppressed&&(O.isPrecedenceFilterSuppressed=!0);let D=s.PredictionContext.join(O.context,y.context,_);return this.updatePropertiesForMergedConfig(y),O.context===D?!1:(O.context=D,v&&(this.mergedConfigs.put(N,O),this.unmerged.splice(b,1)),!0)}}return this.configs.push(y),v?this.mergedConfigs.put(N,y):this.unmerged.push(y),this.updatePropertiesForAddedConfig(y),!0}updatePropertiesForMergedConfig(y){this._dipsIntoOuterContext=this._dipsIntoOuterContext||y.reachesIntoOuterContext,l(!this.outermostConfigSet||!this._dipsIntoOuterContext)}updatePropertiesForAddedConfig(y){this.configs.length===1?this._uniqueAlt=y.alt:this._uniqueAlt!==y.alt&&(this._uniqueAlt=p.ATN.INVALID_ALT_NUMBER),this._hasSemanticContext=this._hasSemanticContext||!o.SemanticContext.NONE.equals(y.semanticContext),this._dipsIntoOuterContext=this._dipsIntoOuterContext||y.reachesIntoOuterContext,l(!this.outermostConfigSet||!this._dipsIntoOuterContext)}canMerge(y,_,v){return y.state.stateNumber!==v.state.stateNumber||_.alt!==v.alt?!1:y.semanticContext.equals(v.semanticContext)}getKey(y){return{state:y.state.stateNumber,alt:y.alt}}containsAll(y){for(let _ of y)if(!(_ instanceof a.ATNConfig)||!this.contains(_))return!1;return!0}addAll(y,_){this.ensureWritable();let v=!1;for(let N of y)this.add(N,_)&&(v=!0);return v}clear(){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");this.mergedConfigs.clear(),this.unmerged.length=0,this.configs.length=0,this._dipsIntoOuterContext=!1,this._hasSemanticContext=!1,this._uniqueAlt=p.ATN.INVALID_ALT_NUMBER,this._conflictInfo=void 0}equals(y){return this===y?!0:y instanceof Eu?this.outermostConfigSet===y.outermostConfigSet&&f.equals(this._conflictInfo,y._conflictInfo)&&h.ArrayEqualityComparator.INSTANCE.equals(this.configs,y.configs):!1}hashCode(){if(this.isReadOnly&&this.cachedHashCode!==-1)return this.cachedHashCode;let y=1;return y=5*y^(this.outermostConfigSet?1:0),y=5*y^h.ArrayEqualityComparator.INSTANCE.hashCode(this.configs),this.isReadOnly&&(this.cachedHashCode=y),y}toString(y){y==null&&(y=!1);let _="",v=this.configs.slice(0);v.sort((N,T)=>N.alt!==T.alt?N.alt-T.alt:N.state.stateNumber!==T.state.stateNumber?N.state.stateNumber-T.state.stateNumber:N.semanticContext.toString().localeCompare(T.semanticContext.toString())),_+="[";for(let N=0;N<v.length;N++)N>0&&(_+=", "),_+=v[N].toString(void 0,!0,y);return _+="]",this._hasSemanticContext&&(_+=",hasSemanticContext="+this._hasSemanticContext),this._uniqueAlt!==p.ATN.INVALID_ALT_NUMBER&&(_+=",uniqueAlt="+this._uniqueAlt),this._conflictInfo!=null&&(_+=",conflictingAlts="+this._conflictInfo.conflictedAlts,this._conflictInfo.isExact||(_+="*")),this._dipsIntoOuterContext&&(_+=",dipsIntoOuterContext"),_.toString()}get uniqueAlt(){return this._uniqueAlt}get hasSemanticContext(){return this._hasSemanticContext}set hasSemanticContext(y){this.ensureWritable(),this._hasSemanticContext=y}get conflictInfo(){return this._conflictInfo}set conflictInfo(y){this.ensureWritable(),this._conflictInfo=y}get conflictingAlts(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts}get isExactConflict(){return this._conflictInfo==null?!1:this._conflictInfo.isExact}get dipsIntoOuterContext(){return this._dipsIntoOuterContext}get(y){return this.configs[y]}ensureWritable(){if(this.isReadOnly)throw new Error("This ATNConfigSet is read only.")}};return u([n.NotNull],x.prototype,"getRepresentedAlternatives",null),u([n.Override],x.prototype,"size",null),u([n.Override],x.prototype,"isEmpty",null),u([n.Override],x.prototype,"contains",null),u([n.Override],x.prototype,Symbol.iterator,null),u([n.Override],x.prototype,"toArray",null),u([n.Override],x.prototype,"containsAll",null),u([n.Override],x.prototype,"clear",null),u([n.Override],x.prototype,"equals",null),u([n.Override],x.prototype,"hashCode",null),Lr.ATNConfigSet=x,Lr}var jr={},Mr={},qr={},Ql;function ji(){return Ql||(Ql=1,function(u){/*!
|
|
183
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
184
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
185
|
-
*/var i=qr&&qr.__decorate||function(e,o,l,f){var d=arguments.length,g=d<3?o:f===null?f=Object.getOwnPropertyDescriptor(o,l):f,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(e,o,l,f);else for(var m=e.length-1;m>=0;m--)(x=e[m])&&(g=(d<3?x(g):d>3?x(o,l,g):x(o,l))||g);return d>3&&g&&Object.defineProperty(o,l,g),g},c=qr&&qr.__param||function(e,o){return function(l,f){o(l,f,e)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DFAState=void 0;const h=bt(),p=yr(),a=we(),r=Q(),n=Je(),t=Me();let s=class sp{constructor(o){this.stateNumber=-1,this.configs=o,this.edges=new Map,this.contextEdges=new Map}get isContextSensitive(){return!!this.contextSymbols}isContextSymbol(o){return this.isContextSensitive?this.contextSymbols.get(o):!1}setContextSymbol(o){t(this.isContextSensitive),this.contextSymbols.set(o)}setContextSensitive(o){t(!this.configs.isOutermostConfigSet),!this.isContextSensitive&&(this.contextSymbols||(this.contextSymbols=new p.BitSet))}get acceptStateInfo(){return this._acceptStateInfo}set acceptStateInfo(o){this._acceptStateInfo=o}get isAcceptState(){return!!this._acceptStateInfo}get prediction(){return this._acceptStateInfo?this._acceptStateInfo.prediction:h.ATN.INVALID_ALT_NUMBER}get lexerActionExecutor(){if(this._acceptStateInfo)return this._acceptStateInfo.lexerActionExecutor}getTarget(o){return this.edges.get(o)}setTarget(o,l){this.edges.set(o,l)}getEdgeMap(){return this.edges}getContextTarget(o){return o===n.PredictionContext.EMPTY_FULL_STATE_KEY&&(o=-1),this.contextEdges.get(o)}setContextTarget(o,l){if(!this.isContextSensitive)throw new Error("The state is not context sensitive.");o===n.PredictionContext.EMPTY_FULL_STATE_KEY&&(o=-1),this.contextEdges.set(o,l)}getContextEdgeMap(){let o=new Map(this.contextEdges),l=o.get(-1);if(l!==void 0)if(o.size===1){let f=new Map;return f.set(n.PredictionContext.EMPTY_FULL_STATE_KEY,l),f}else o.delete(-1),o.set(n.PredictionContext.EMPTY_FULL_STATE_KEY,l);return o}hashCode(){let o=a.MurmurHash.initialize(7);return o=a.MurmurHash.update(o,this.configs.hashCode()),o=a.MurmurHash.finish(o,1),o}equals(o){if(this===o)return!0;if(!(o instanceof sp))return!1;let l=o;return this.configs.equals(l.configs)}toString(){let o="";return o+=this.stateNumber+":"+this.configs,this.isAcceptState&&(o+="=>",this.predicates?o+=this.predicates:o+=this.prediction),o.toString()}};i([r.NotNull],s.prototype,"configs",void 0),i([r.NotNull],s.prototype,"edges",void 0),i([r.NotNull],s.prototype,"contextEdges",void 0),i([r.Override],s.prototype,"hashCode",null),i([r.Override],s.prototype,"equals",null),i([r.Override],s.prototype,"toString",null),u.DFAState=s,function(e){let o=class{constructor(f,d){this.alt=d,this.pred=f}toString(){return"("+this.pred+", "+this.alt+")"}};i([r.NotNull],o.prototype,"pred",void 0),i([r.Override],o.prototype,"toString",null),o=i([c(0,r.NotNull)],o),e.PredPrediction=o}(s=u.DFAState||(u.DFAState={}))}(qr)),qr}var Jl;function Mi(){return Jl||(Jl=1,function(u){/*!
|
|
186
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
187
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
188
|
-
*/var i=Mr&&Mr.__decorate||function(t,s,e,o){var l=arguments.length,f=l<3?s:o===null?o=Object.getOwnPropertyDescriptor(s,e):o,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(t,s,e,o);else for(var g=t.length-1;g>=0;g--)(d=t[g])&&(f=(l<3?d(f):l>3?d(s,e,f):d(s,e))||f);return l>3&&f&&Object.defineProperty(s,e,f),f},c=Mr&&Mr.__param||function(t,s){return function(e,o){s(e,o,t)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ATNSimulator=void 0;const h=Zn(),p=ji(),a=Q(),r=Je();let n=class Si{constructor(s){this.atn=s}static get ERROR(){return Si._ERROR||(Si._ERROR=new p.DFAState(new h.ATNConfigSet),Si._ERROR.stateNumber=r.PredictionContext.EMPTY_FULL_STATE_KEY),Si._ERROR}clearDFA(){this.atn.clearDFA()}};i([a.NotNull],n.prototype,"atn",void 0),i([a.NotNull],n,"ERROR",null),n=i([c(0,a.NotNull)],n),u.ATNSimulator=n,n=u.ATNSimulator||(u.ATNSimulator={}),u.ATNSimulator=n}(Mr)),Mr}var mt={},ei={},Zl;function ec(){if(Zl)return ei;Zl=1;/*!
|
|
189
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
190
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
191
|
-
*/Object.defineProperty(ei,"__esModule",{value:!0}),ei.ConsoleErrorListener=void 0;let u=class{syntaxError(c,h,p,a,r,n){console.error(`line ${p}:${a} ${r}`)}};return ei.ConsoleErrorListener=u,u.INSTANCE=new u,ei}var gt={},tc;function ks(){if(tc)return gt;tc=1;/*!
|
|
192
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
193
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
194
|
-
*/var u=gt&>.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s},i=gt&>.__param||function(p,a){return function(r,n){a(r,n,p)}};Object.defineProperty(gt,"__esModule",{value:!0}),gt.ProxyErrorListener=void 0;const c=Q();let h=class{constructor(a){if(this.delegates=a,!a)throw new Error("Invalid delegates")}getDelegates(){return this.delegates}syntaxError(a,r,n,t,s,e){this.delegates.forEach(o=>{o.syntaxError&&o.syntaxError(a,r,n,t,s,e)})}};return u([c.Override,i(0,c.NotNull),i(4,c.NotNull)],h.prototype,"syntaxError",null),gt.ProxyErrorListener=h,gt}var rc;function ti(){if(rc)return mt;rc=1;/*!
|
|
195
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
196
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
197
|
-
*/var u=mt&&mt.__decorate||function(t,s,e,o){var l=arguments.length,f=l<3?s:o===null?o=Object.getOwnPropertyDescriptor(s,e):o,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(t,s,e,o);else for(var g=t.length-1;g>=0;g--)(d=t[g])&&(f=(l<3?d(f):l>3?d(s,e,f):d(s,e))||f);return l>3&&f&&Object.defineProperty(s,e,f),f},i=mt&&mt.__param||function(t,s){return function(e,o){s(e,o,t)}};Object.defineProperty(mt,"__esModule",{value:!0}),mt.Recognizer=void 0;const c=ec(),h=ks(),p=Q(),a=Oe(),r=ht();let n=class Ni{constructor(){this._listeners=[c.ConsoleErrorListener.INSTANCE],this._stateNumber=-1}getTokenTypeMap(){let s=this.vocabulary,e=Ni.tokenTypeMapCache.get(s);if(e==null){let o=new Map;for(let l=0;l<=this.atn.maxTokenType;l++){let f=s.getLiteralName(l);f!=null&&o.set(f,l);let d=s.getSymbolicName(l);d!=null&&o.set(d,l)}o.set("EOF",a.Token.EOF),e=o,Ni.tokenTypeMapCache.set(s,e)}return e}getRuleIndexMap(){let s=this.ruleNames;if(s==null)throw new Error("The current recognizer does not provide a list of rule names.");let e=Ni.ruleIndexMapCache.get(s);return e==null&&(e=r.toMap(s),Ni.ruleIndexMapCache.set(s,e)),e}getTokenType(s){let e=this.getTokenTypeMap().get(s);return e??a.Token.INVALID_TYPE}get serializedATN(){throw new Error("there is no serialized ATN")}get atn(){return this._interp.atn}get interpreter(){return this._interp}set interpreter(s){this._interp=s}get parseInfo(){return Promise.resolve(void 0)}getErrorHeader(s){let e=s.getOffendingToken();if(!e)return"";let o=e.line,l=e.charPositionInLine;return"line "+o+":"+l}addErrorListener(s){if(!s)throw new TypeError("listener must not be null");this._listeners.push(s)}removeErrorListener(s){let e=this._listeners.indexOf(s);e!==-1&&this._listeners.splice(e,1)}removeErrorListeners(){this._listeners.length=0}getErrorListeners(){return this._listeners.slice(0)}getErrorListenerDispatch(){return new h.ProxyErrorListener(this.getErrorListeners())}sempred(s,e,o){return!0}precpred(s,e){return!0}action(s,e,o){}get state(){return this._stateNumber}set state(s){this._stateNumber=s}};return n.EOF=-1,n.tokenTypeMapCache=new WeakMap,n.ruleIndexMapCache=new WeakMap,u([p.SuppressWarnings("serial"),p.NotNull],n.prototype,"_listeners",void 0),u([p.NotNull],n.prototype,"getTokenTypeMap",null),u([p.NotNull],n.prototype,"getRuleIndexMap",null),u([p.NotNull],n.prototype,"serializedATN",null),u([p.NotNull],n.prototype,"atn",null),u([p.NotNull,i(0,p.NotNull)],n.prototype,"interpreter",null),u([p.NotNull,i(0,p.NotNull)],n.prototype,"getErrorHeader",null),u([i(0,p.NotNull)],n.prototype,"addErrorListener",null),u([i(0,p.NotNull)],n.prototype,"removeErrorListener",null),u([p.NotNull],n.prototype,"getErrorListeners",null),mt.Recognizer=n,mt}var kr={},nc;function Ur(){if(nc)return kr;nc=1;/*!
|
|
198
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
199
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
200
|
-
*/var u=kr&&kr.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(kr,"__esModule",{value:!0}),kr.VocabularyImpl=void 0;const i=Q(),c=Oe();let h=class{constructor(a,r,n){this.literalNames=a,this.symbolicNames=r,this.displayNames=n,this._maxTokenType=Math.max(this.displayNames.length,Math.max(this.literalNames.length,this.symbolicNames.length))-1}get maxTokenType(){return this._maxTokenType}getLiteralName(a){if(a>=0&&a<this.literalNames.length)return this.literalNames[a]}getSymbolicName(a){if(a>=0&&a<this.symbolicNames.length)return this.symbolicNames[a];if(a===c.Token.EOF)return"EOF"}getDisplayName(a){if(a>=0&&a<this.displayNames.length){let t=this.displayNames[a];if(t)return t}let r=this.getLiteralName(a);if(r)return r;let n=this.getSymbolicName(a);return n||String(a)}};return h.EMPTY_VOCABULARY=new h([],[],[]),u([i.NotNull],h.prototype,"literalNames",void 0),u([i.NotNull],h.prototype,"symbolicNames",void 0),u([i.NotNull],h.prototype,"displayNames",void 0),u([i.Override],h.prototype,"maxTokenType",null),u([i.Override],h.prototype,"getLiteralName",null),u([i.Override],h.prototype,"getSymbolicName",null),u([i.Override,i.NotNull],h.prototype,"getDisplayName",null),u([i.NotNull],h,"EMPTY_VOCABULARY",void 0),kr.VocabularyImpl=h,kr}var ic;function oc(){if(ic)return jr;ic=1;/*!
|
|
201
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
202
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
203
|
-
*/var u=jr&&jr.__decorate||function(n,t,s,e){var o=arguments.length,l=o<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,t,s,e);else for(var d=n.length-1;d>=0;d--)(f=n[d])&&(l=(o<3?f(l):o>3?f(t,s,l):f(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l};Object.defineProperty(jr,"__esModule",{value:!0}),jr.DFASerializer=void 0;const i=Mi(),c=Q(),h=Je(),p=ti(),a=Ur();let r=class{constructor(t,s,e,o){s instanceof p.Recognizer?(e=s.ruleNames,o=s.atn,s=s.vocabulary):s||(s=a.VocabularyImpl.EMPTY_VOCABULARY),this.dfa=t,this.vocabulary=s,this.ruleNames=e,this.atn=o}toString(){if(!this.dfa.s0)return"";let t="";if(this.dfa.states){let e=new Array(...this.dfa.states.toArray());e.sort((o,l)=>o.stateNumber-l.stateNumber);for(let o of e){let l=o.getEdgeMap(),f=[...l.keys()].sort((x,m)=>x-m),d=o.getContextEdgeMap(),g=[...d.keys()].sort((x,m)=>x-m);for(let x of f){let m=l.get(x);if((m==null||m===i.ATNSimulator.ERROR)&&!o.isContextSymbol(x))continue;let y=!1;t+=this.getStateString(o)+"-"+this.getEdgeLabel(x)+"->",o.isContextSymbol(x)&&(t+="!",y=!0);let _=m;_&&_.stateNumber!==i.ATNSimulator.ERROR.stateNumber?t+=this.getStateString(_)+`
|
|
72
|
+
`,x.toString()}toString(x,m,y){y==null&&(y=m!=null),m==null&&(m=!0);let _="",v;y?v=this.context.toStrings(x,this.state.stateNumber):v=["?"];let N=!0;for(let T of v)N?N=!1:_+=", ",_+="(",_+=this.state,m&&(_+=",",_+=this.alt),this.context&&(_+=",",_+=T),this.semanticContext!==t.SemanticContext.NONE&&(_+=",",_+=this.semanticContext),this.reachesIntoOuterContext&&(_+=",up="+this.outerContextDepth),_+=")";return _.toString()}};u([a.NotNull],o.prototype,"_state",void 0),u([a.NotNull],o.prototype,"_context",void 0),u([a.NotNull],o.prototype,"state",null),u([a.NotNull,i(0,a.NotNull)],o.prototype,"context",null),u([a.NotNull],o.prototype,"semanticContext",null),u([a.Override],o.prototype,"clone",null),u([i(0,a.NotNull),i(2,a.NotNull)],o.prototype,"transformImpl",null),u([a.Override],o.prototype,"equals",null),u([a.Override],o.prototype,"hashCode",null),u([i(0,a.NotNull),i(3,a.NotNull)],o,"create",null),o=u([i(0,a.NotNull),i(2,a.NotNull)],o),ht.ATNConfig=o;let l=class extends o{constructor(x,m,y,_){typeof y=="number"?super(m,y,_):super(m,y,_),this._semanticContext=x}get semanticContext(){return this._semanticContext}};u([a.NotNull],l.prototype,"_semanticContext",void 0),u([a.Override],l.prototype,"semanticContext",null),l=u([i(1,a.NotNull),i(2,a.NotNull)],l);let f=class extends o{constructor(x,m,y,_,v){if(typeof y=="number")super(m,y,_);else if(super(m,y,_),y.semanticContext!==t.SemanticContext.NONE)throw new Error("Not supported");this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=v}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};u([a.Override],f.prototype,"lexerActionExecutor",null),u([a.Override],f.prototype,"hasPassedThroughNonGreedyDecision",null),f=u([i(1,a.NotNull),i(2,a.NotNull)],f);let d=class extends l{constructor(x,m,y,_,v,N){typeof _=="number"?super(m,y,_,v):super(m,y,_,v),this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=N}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};return u([a.Override],d.prototype,"lexerActionExecutor",null),u([a.Override],d.prototype,"hasPassedThroughNonGreedyDecision",null),d=u([i(1,a.NotNull),i(2,a.NotNull)],d),ht}var Qn={},$l;function fr(){if($l)return Qn;$l=1;Object.defineProperty(Qn,"__esModule",{value:!0}),Qn.BitSet=void 0;const u=wn(),i=Pe(),c=new Uint16Array(0);function h(o){return o>>>4}function p(o){return o*16}function a(o){let l=1;for(let f=0;f<16;f++){if((o&l)!==0)return f;l=l<<1>>>0}throw new RangeError("No specified bit found")}function r(o){let l=32768;for(let f=15;f>=0;f--){if((o&l)!==0)return f;l=l>>>1}throw new RangeError("No specified bit found")}function n(o,l){return o&=15,l&=15,o===l?1<<o>>>0:65535>>>15-l^65535>>>16-o}const t=new Uint8Array(65536);for(let o=0;o<16;o++){const l=1<<o>>>0;let f=0;for(;f<t.length;){f+=l;for(let d=0;d<l;d++)t[f]++,f++}}let s=class Ai{constructor(l){if(!l)this.data=c;else if(typeof l=="number"){if(l<0)throw new RangeError("nbits cannot be negative");this.data=new Uint16Array(h(l-1)+1)}else if(l instanceof Ai)this.data=l.data.slice(0);else{let f=-1;for(let d of l)f<d&&(f=d);this.data=new Uint16Array(h(f-1)+1);for(let d of l)this.set(d)}}and(l){const f=this.data,d=l.data,g=Math.min(f.length,d.length);let x=-1;for(let m=0;m<g;m++)(f[m]&=d[m])!==0&&(x=m);x===-1&&(this.data=c),x<f.length-1&&(this.data=f.slice(0,x+1))}andNot(l){const f=this.data,d=l.data,g=Math.min(f.length,d.length);let x=-1;for(let m=0;m<g;m++)(f[m]&=d[m]^65535)!==0&&(x=m);x===-1&&(this.data=c),x<f.length-1&&(this.data=f.slice(0,x+1))}cardinality(){if(this.isEmpty)return 0;const l=this.data,f=l.length;let d=0;for(let g=0;g<f;g++)d+=t[l[g]];return d}clear(l,f){l==null?this.data.fill(0):f==null?this.set(l,!1):this.set(l,f,!1)}flip(l,f){if(f==null&&(f=l),l<0||f<l)throw new RangeError;let d=h(l);const g=h(f);if(d===g)this.data[d]^=n(l,f);else{for(this.data[d++]^=n(l,15);d<g;)this.data[d++]^=65535;this.data[d++]^=n(0,f)}}get(l,f){if(f===void 0)return!!(this.data[h(l)]&n(l,l));{let d=new Ai(f+1);for(let g=l;g<=f;g++)d.set(g,this.get(g));return d}}intersects(l){let f=Math.min(this.length(),l.length());if(f===0)return!1;let d=h(f-1);for(let g=0;g<=d;g++)if((this.data[g]&l.data[g])!==0)return!0;return!1}get isEmpty(){return this.length()===0}length(){return this.data.length?this.previousSetBit(p(this.data.length)-1)+1:0}nextClearBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const f=this.data,d=f.length;let g=h(l);if(g>d)return-1;let x=65535^n(l,15);if((f[g]|x)===65535){for(g++,x=0;g<d&&f[g]===65535;g++);if(g===d)return-1}return p(g)+a((f[g]|x)^65535)}nextSetBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const f=this.data,d=f.length;let g=h(l);if(g>d)return-1;let x=n(l,15);if((f[g]&x)===0){for(g++,x=65535;g<d&&f[g]===0;g++);if(g>=d)return-1}return p(g)+a(f[g]&x)}or(l){const f=this.data,d=l.data,g=Math.min(f.length,d.length),x=Math.max(f.length,d.length),m=f.length===x?f:new Uint16Array(x);let y=-1;for(let v=0;v<g;v++)(m[v]=f[v]|d[v])!==0&&(y=v);const _=f.length>d.length?f:d;for(let v=g;v<x;v++)(m[v]=_[v])!==0&&(y=v);y===-1?this.data=c:m.length===y+1?this.data=m:this.data=m.slice(0,y)}previousClearBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const f=this.data,d=f.length;let g=h(l);g>=d&&(g=d-1);let x=65535^n(0,l);if((f[g]|x)===65535){for(x=0,g--;g>=0&&f[g]===65535;g--);if(g<0)return-1}return p(g)+r((f[g]|x)^65535)}previousSetBit(l){if(l<0)throw new RangeError("fromIndex cannot be negative");const f=this.data,d=f.length;let g=h(l);g>=d&&(g=d-1);let x=n(0,l);if((f[g]&x)===0){for(g--,x=65535;g>=0&&f[g]===0;g--);if(g<0)return-1}return p(g)+r(f[g]&x)}set(l,f,d){if(f===void 0?(f=l,d=!0):typeof f=="boolean"&&(d=f,f=l),d===void 0&&(d=!0),l<0||l>f)throw new RangeError;let g=h(l),x=h(f);if(d&&x>=this.data.length){let m=new Uint16Array(x+1);this.data.forEach((y,_)=>m[_]=y),this.data=m}else if(!d){if(g>=this.data.length)return;x>=this.data.length&&(x=this.data.length-1,f=this.data.length*16-1)}if(g===x)this._setBits(g,d,n(l,f));else{for(this._setBits(g++,d,n(l,15));g<x;)this.data[g++]=d?65535:0;this._setBits(g,d,n(0,f))}}_setBits(l,f,d){f?this.data[l]|=d:this.data[l]&=65535^d}get size(){return this.data.byteLength*8}hashCode(){return i.MurmurHash.hashCode(this.data,22)}equals(l){if(l===this)return!0;if(!(l instanceof Ai))return!1;const f=this.length();if(f!==l.length())return!1;if(f===0)return!0;let d=h(f-1);for(let g=0;g<=d;g++)if(this.data[g]!==l.data[g])return!1;return!0}toString(){let l="{",f=!0;for(let d=this.nextSetBit(0);d>=0;d=this.nextSetBit(d+1))f?f=!1:l+=", ",l+=d;return l+="}",l}xor(l){const f=this.data,d=l.data,g=Math.min(f.length,d.length),x=Math.max(f.length,d.length),m=f.length===x?f:new Uint16Array(x);let y=-1;for(let v=0;v<g;v++)(m[v]=f[v]^d[v])!==0&&(y=v);const _=f.length>d.length?f:d;for(let v=g;v<x;v++)(m[v]=_[v])!==0&&(y=v);y===-1?this.data=c:m.length===y+1?this.data=m:this.data=m.slice(0,y+1)}clone(){return new Ai(this)}[Symbol.iterator](){return new e(this.data)}[u.inspect.custom](){return"BitSet "+this.toString()}};Qn.BitSet=s;class e{constructor(l){this.data=l,this.index=0,this.mask=65535}next(){for(;this.index<this.data.length;){const l=this.data[this.index]&this.mask;if(l!==0){const f=p(this.index)+a(l);return this.mask=n(f+1,15),{done:!1,value:f}}this.index++,this.mask=65535}return{done:!0,value:-1}}[Symbol.iterator](){return this}}return Qn}var Kl;function Jn(){if(Kl)return Dr;Kl=1;var u=Dr&&Dr.__decorate||function(m,y,_,v){var N=arguments.length,T=N<3?y:v===null?v=Object.getOwnPropertyDescriptor(y,_):v,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(m,y,_,v);else for(var O=m.length-1;O>=0;O--)(b=m[O])&&(T=(N<3?b(T):N>3?b(y,_,T):b(y,_))||T);return N>3&&T&&Object.defineProperty(y,_,T),T};Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.ATNConfigSet=void 0;const i=Fn(),c=cr(),h=Di(),p=At(),a=Li(),r=fr(),n=Q(),t=Ze(),s=Xe(),e=js(),o=Ln(),l=Fe(),f=ut();class d{hashCode(y){return y.state^y.alt}equals(y,_){return y.state===_.state&&y.alt===_.alt}}d.INSTANCE=new d;function g(m){return m?new i.Array2DHashMap(m):new i.Array2DHashMap(d.INSTANCE)}let x=class Au{constructor(y,_){this._uniqueAlt=0,this._hasSemanticContext=!1,this._dipsIntoOuterContext=!1,this.outermostConfigSet=!1,this.cachedHashCode=-1,y?(_?(this.mergedConfigs=void 0,this.unmerged=void 0):y.isReadOnly?(this.mergedConfigs=g(),this.unmerged=[]):(this.mergedConfigs=g(y.mergedConfigs),this.unmerged=y.unmerged.slice(0)),this.configs=y.configs.slice(0),this._dipsIntoOuterContext=y._dipsIntoOuterContext,this._hasSemanticContext=y._hasSemanticContext,this.outermostConfigSet=y.outermostConfigSet,(_||!y.isReadOnly)&&(this._uniqueAlt=y._uniqueAlt,this._conflictInfo=y._conflictInfo)):(this.mergedConfigs=g(),this.unmerged=[],this.configs=[],this._uniqueAlt=p.ATN.INVALID_ALT_NUMBER)}getRepresentedAlternatives(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts.clone();let y=new r.BitSet;for(let _ of this)y.set(_.alt);return y}get isReadOnly(){return this.mergedConfigs==null}get isOutermostConfigSet(){return this.outermostConfigSet}set isOutermostConfigSet(y){if(this.outermostConfigSet&&!y)throw new Error("IllegalStateException");l(!y||!this._dipsIntoOuterContext),this.outermostConfigSet=y}getStates(){let y=new c.Array2DHashSet(t.ObjectEqualityComparator.INSTANCE);for(let _ of this.configs)y.add(_.state);return y}optimizeConfigs(y){if(this.configs.length!==0)for(let _ of this.configs)_.context=y.atn.getCachedContext(_.context)}clone(y){let _=new Au(this,y);return!y&&this.isReadOnly&&_.addAll(this.configs),_}get size(){return this.configs.length}get isEmpty(){return this.configs.length===0}contains(y){if(!(y instanceof a.ATNConfig))return!1;if(this.mergedConfigs&&this.unmerged){let _=y,v=this.getKey(_),N=this.mergedConfigs.get(v);if(N!=null&&this.canMerge(_,v,N))return N.contains(_);for(let T of this.unmerged)if(T.contains(y))return!0}else for(let _ of this.configs)if(_.contains(y))return!0;return!1}*[Symbol.iterator](){yield*this.configs}toArray(){return this.configs}add(y,_){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");l(!this.outermostConfigSet||!y.reachesIntoOuterContext),_==null&&(_=e.PredictionContextCache.UNCACHED);let v,N=this.getKey(y),T=this.mergedConfigs.get(N);if(v=T==null,T!=null&&this.canMerge(y,N,T)){T.outerContextDepth=Math.max(T.outerContextDepth,y.outerContextDepth),y.isPrecedenceFilterSuppressed&&(T.isPrecedenceFilterSuppressed=!0);let b=s.PredictionContext.join(T.context,y.context,_);return this.updatePropertiesForMergedConfig(y),T.context===b?!1:(T.context=b,!0)}for(let b=0;b<this.unmerged.length;b++){let O=this.unmerged[b];if(this.canMerge(y,N,O)){O.outerContextDepth=Math.max(O.outerContextDepth,y.outerContextDepth),y.isPrecedenceFilterSuppressed&&(O.isPrecedenceFilterSuppressed=!0);let D=s.PredictionContext.join(O.context,y.context,_);return this.updatePropertiesForMergedConfig(y),O.context===D?!1:(O.context=D,v&&(this.mergedConfigs.put(N,O),this.unmerged.splice(b,1)),!0)}}return this.configs.push(y),v?this.mergedConfigs.put(N,y):this.unmerged.push(y),this.updatePropertiesForAddedConfig(y),!0}updatePropertiesForMergedConfig(y){this._dipsIntoOuterContext=this._dipsIntoOuterContext||y.reachesIntoOuterContext,l(!this.outermostConfigSet||!this._dipsIntoOuterContext)}updatePropertiesForAddedConfig(y){this.configs.length===1?this._uniqueAlt=y.alt:this._uniqueAlt!==y.alt&&(this._uniqueAlt=p.ATN.INVALID_ALT_NUMBER),this._hasSemanticContext=this._hasSemanticContext||!o.SemanticContext.NONE.equals(y.semanticContext),this._dipsIntoOuterContext=this._dipsIntoOuterContext||y.reachesIntoOuterContext,l(!this.outermostConfigSet||!this._dipsIntoOuterContext)}canMerge(y,_,v){return y.state.stateNumber!==v.state.stateNumber||_.alt!==v.alt?!1:y.semanticContext.equals(v.semanticContext)}getKey(y){return{state:y.state.stateNumber,alt:y.alt}}containsAll(y){for(let _ of y)if(!(_ instanceof a.ATNConfig)||!this.contains(_))return!1;return!0}addAll(y,_){this.ensureWritable();let v=!1;for(let N of y)this.add(N,_)&&(v=!0);return v}clear(){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");this.mergedConfigs.clear(),this.unmerged.length=0,this.configs.length=0,this._dipsIntoOuterContext=!1,this._hasSemanticContext=!1,this._uniqueAlt=p.ATN.INVALID_ALT_NUMBER,this._conflictInfo=void 0}equals(y){return this===y?!0:y instanceof Au?this.outermostConfigSet===y.outermostConfigSet&&f.equals(this._conflictInfo,y._conflictInfo)&&h.ArrayEqualityComparator.INSTANCE.equals(this.configs,y.configs):!1}hashCode(){if(this.isReadOnly&&this.cachedHashCode!==-1)return this.cachedHashCode;let y=1;return y=5*y^(this.outermostConfigSet?1:0),y=5*y^h.ArrayEqualityComparator.INSTANCE.hashCode(this.configs),this.isReadOnly&&(this.cachedHashCode=y),y}toString(y){y==null&&(y=!1);let _="",v=this.configs.slice(0);v.sort((N,T)=>N.alt!==T.alt?N.alt-T.alt:N.state.stateNumber!==T.state.stateNumber?N.state.stateNumber-T.state.stateNumber:N.semanticContext.toString().localeCompare(T.semanticContext.toString())),_+="[";for(let N=0;N<v.length;N++)N>0&&(_+=", "),_+=v[N].toString(void 0,!0,y);return _+="]",this._hasSemanticContext&&(_+=",hasSemanticContext="+this._hasSemanticContext),this._uniqueAlt!==p.ATN.INVALID_ALT_NUMBER&&(_+=",uniqueAlt="+this._uniqueAlt),this._conflictInfo!=null&&(_+=",conflictingAlts="+this._conflictInfo.conflictedAlts,this._conflictInfo.isExact||(_+="*")),this._dipsIntoOuterContext&&(_+=",dipsIntoOuterContext"),_.toString()}get uniqueAlt(){return this._uniqueAlt}get hasSemanticContext(){return this._hasSemanticContext}set hasSemanticContext(y){this.ensureWritable(),this._hasSemanticContext=y}get conflictInfo(){return this._conflictInfo}set conflictInfo(y){this.ensureWritable(),this._conflictInfo=y}get conflictingAlts(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts}get isExactConflict(){return this._conflictInfo==null?!1:this._conflictInfo.isExact}get dipsIntoOuterContext(){return this._dipsIntoOuterContext}get(y){return this.configs[y]}ensureWritable(){if(this.isReadOnly)throw new Error("This ATNConfigSet is read only.")}};return u([n.NotNull],x.prototype,"getRepresentedAlternatives",null),u([n.Override],x.prototype,"size",null),u([n.Override],x.prototype,"isEmpty",null),u([n.Override],x.prototype,"contains",null),u([n.Override],x.prototype,Symbol.iterator,null),u([n.Override],x.prototype,"toArray",null),u([n.Override],x.prototype,"containsAll",null),u([n.Override],x.prototype,"clear",null),u([n.Override],x.prototype,"equals",null),u([n.Override],x.prototype,"hashCode",null),Dr.ATNConfigSet=x,Dr}var Lr={},Fr={},Br={},Ql;function Fi(){return Ql||(Ql=1,(function(u){var i=Br&&Br.__decorate||function(e,o,l,f){var d=arguments.length,g=d<3?o:f===null?f=Object.getOwnPropertyDescriptor(o,l):f,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(e,o,l,f);else for(var m=e.length-1;m>=0;m--)(x=e[m])&&(g=(d<3?x(g):d>3?x(o,l,g):x(o,l))||g);return d>3&&g&&Object.defineProperty(o,l,g),g},c=Br&&Br.__param||function(e,o){return function(l,f){o(l,f,e)}};Object.defineProperty(u,"__esModule",{value:!0}),u.DFAState=void 0;const h=At(),p=fr(),a=Pe(),r=Q(),n=Xe(),t=Fe();let s=class op{constructor(o){this.stateNumber=-1,this.configs=o,this.edges=new Map,this.contextEdges=new Map}get isContextSensitive(){return!!this.contextSymbols}isContextSymbol(o){return this.isContextSensitive?this.contextSymbols.get(o):!1}setContextSymbol(o){t(this.isContextSensitive),this.contextSymbols.set(o)}setContextSensitive(o){t(!this.configs.isOutermostConfigSet),!this.isContextSensitive&&(this.contextSymbols||(this.contextSymbols=new p.BitSet))}get acceptStateInfo(){return this._acceptStateInfo}set acceptStateInfo(o){this._acceptStateInfo=o}get isAcceptState(){return!!this._acceptStateInfo}get prediction(){return this._acceptStateInfo?this._acceptStateInfo.prediction:h.ATN.INVALID_ALT_NUMBER}get lexerActionExecutor(){if(this._acceptStateInfo)return this._acceptStateInfo.lexerActionExecutor}getTarget(o){return this.edges.get(o)}setTarget(o,l){this.edges.set(o,l)}getEdgeMap(){return this.edges}getContextTarget(o){return o===n.PredictionContext.EMPTY_FULL_STATE_KEY&&(o=-1),this.contextEdges.get(o)}setContextTarget(o,l){if(!this.isContextSensitive)throw new Error("The state is not context sensitive.");o===n.PredictionContext.EMPTY_FULL_STATE_KEY&&(o=-1),this.contextEdges.set(o,l)}getContextEdgeMap(){let o=new Map(this.contextEdges),l=o.get(-1);if(l!==void 0)if(o.size===1){let f=new Map;return f.set(n.PredictionContext.EMPTY_FULL_STATE_KEY,l),f}else o.delete(-1),o.set(n.PredictionContext.EMPTY_FULL_STATE_KEY,l);return o}hashCode(){let o=a.MurmurHash.initialize(7);return o=a.MurmurHash.update(o,this.configs.hashCode()),o=a.MurmurHash.finish(o,1),o}equals(o){if(this===o)return!0;if(!(o instanceof op))return!1;let l=o;return this.configs.equals(l.configs)}toString(){let o="";return o+=this.stateNumber+":"+this.configs,this.isAcceptState&&(o+="=>",this.predicates?o+=this.predicates:o+=this.prediction),o.toString()}};i([r.NotNull],s.prototype,"configs",void 0),i([r.NotNull],s.prototype,"edges",void 0),i([r.NotNull],s.prototype,"contextEdges",void 0),i([r.Override],s.prototype,"hashCode",null),i([r.Override],s.prototype,"equals",null),i([r.Override],s.prototype,"toString",null),u.DFAState=s,(function(e){let o=class{constructor(f,d){this.alt=d,this.pred=f}toString(){return"("+this.pred+", "+this.alt+")"}};i([r.NotNull],o.prototype,"pred",void 0),i([r.Override],o.prototype,"toString",null),o=i([c(0,r.NotNull)],o),e.PredPrediction=o})(s=u.DFAState||(u.DFAState={}))})(Br)),Br}var Jl;function Bi(){return Jl||(Jl=1,(function(u){var i=Fr&&Fr.__decorate||function(t,s,e,o){var l=arguments.length,f=l<3?s:o===null?o=Object.getOwnPropertyDescriptor(s,e):o,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(t,s,e,o);else for(var g=t.length-1;g>=0;g--)(d=t[g])&&(f=(l<3?d(f):l>3?d(s,e,f):d(s,e))||f);return l>3&&f&&Object.defineProperty(s,e,f),f},c=Fr&&Fr.__param||function(t,s){return function(e,o){s(e,o,t)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ATNSimulator=void 0;const h=Jn(),p=Fi(),a=Q(),r=Xe();let n=class Ti{constructor(s){this.atn=s}static get ERROR(){return Ti._ERROR||(Ti._ERROR=new p.DFAState(new h.ATNConfigSet),Ti._ERROR.stateNumber=r.PredictionContext.EMPTY_FULL_STATE_KEY),Ti._ERROR}clearDFA(){this.atn.clearDFA()}};i([a.NotNull],n.prototype,"atn",void 0),i([a.NotNull],n,"ERROR",null),n=i([c(0,a.NotNull)],n),u.ATNSimulator=n,n=u.ATNSimulator||(u.ATNSimulator={}),u.ATNSimulator=n})(Fr)),Fr}var pt={},Zn={},Zl;function Yl(){if(Zl)return Zn;Zl=1;Object.defineProperty(Zn,"__esModule",{value:!0}),Zn.ConsoleErrorListener=void 0;let u=class{syntaxError(c,h,p,a,r,n){console.error(`line ${p}:${a} ${r}`)}};return Zn.ConsoleErrorListener=u,u.INSTANCE=new u,Zn}var dt={},ec;function Ms(){if(ec)return dt;ec=1;var u=dt&&dt.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s},i=dt&&dt.__param||function(p,a){return function(r,n){a(r,n,p)}};Object.defineProperty(dt,"__esModule",{value:!0}),dt.ProxyErrorListener=void 0;const c=Q();let h=class{constructor(a){if(this.delegates=a,!a)throw new Error("Invalid delegates")}getDelegates(){return this.delegates}syntaxError(a,r,n,t,s,e){this.delegates.forEach(o=>{o.syntaxError&&o.syntaxError(a,r,n,t,s,e)})}};return u([c.Override,i(0,c.NotNull),i(4,c.NotNull)],h.prototype,"syntaxError",null),dt.ProxyErrorListener=h,dt}var tc;function Yn(){if(tc)return pt;tc=1;var u=pt&&pt.__decorate||function(t,s,e,o){var l=arguments.length,f=l<3?s:o===null?o=Object.getOwnPropertyDescriptor(s,e):o,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(t,s,e,o);else for(var g=t.length-1;g>=0;g--)(d=t[g])&&(f=(l<3?d(f):l>3?d(s,e,f):d(s,e))||f);return l>3&&f&&Object.defineProperty(s,e,f),f},i=pt&&pt.__param||function(t,s){return function(e,o){s(e,o,t)}};Object.defineProperty(pt,"__esModule",{value:!0}),pt.Recognizer=void 0;const c=Yl(),h=Ms(),p=Q(),a=Ne(),r=ut();let n=class Ei{constructor(){this._listeners=[c.ConsoleErrorListener.INSTANCE],this._stateNumber=-1}getTokenTypeMap(){let s=this.vocabulary,e=Ei.tokenTypeMapCache.get(s);if(e==null){let o=new Map;for(let l=0;l<=this.atn.maxTokenType;l++){let f=s.getLiteralName(l);f!=null&&o.set(f,l);let d=s.getSymbolicName(l);d!=null&&o.set(d,l)}o.set("EOF",a.Token.EOF),e=o,Ei.tokenTypeMapCache.set(s,e)}return e}getRuleIndexMap(){let s=this.ruleNames;if(s==null)throw new Error("The current recognizer does not provide a list of rule names.");let e=Ei.ruleIndexMapCache.get(s);return e==null&&(e=r.toMap(s),Ei.ruleIndexMapCache.set(s,e)),e}getTokenType(s){let e=this.getTokenTypeMap().get(s);return e??a.Token.INVALID_TYPE}get serializedATN(){throw new Error("there is no serialized ATN")}get atn(){return this._interp.atn}get interpreter(){return this._interp}set interpreter(s){this._interp=s}get parseInfo(){return Promise.resolve(void 0)}getErrorHeader(s){let e=s.getOffendingToken();if(!e)return"";let o=e.line,l=e.charPositionInLine;return"line "+o+":"+l}addErrorListener(s){if(!s)throw new TypeError("listener must not be null");this._listeners.push(s)}removeErrorListener(s){let e=this._listeners.indexOf(s);e!==-1&&this._listeners.splice(e,1)}removeErrorListeners(){this._listeners.length=0}getErrorListeners(){return this._listeners.slice(0)}getErrorListenerDispatch(){return new h.ProxyErrorListener(this.getErrorListeners())}sempred(s,e,o){return!0}precpred(s,e){return!0}action(s,e,o){}get state(){return this._stateNumber}set state(s){this._stateNumber=s}};return n.EOF=-1,n.tokenTypeMapCache=new WeakMap,n.ruleIndexMapCache=new WeakMap,u([p.SuppressWarnings("serial"),p.NotNull],n.prototype,"_listeners",void 0),u([p.NotNull],n.prototype,"getTokenTypeMap",null),u([p.NotNull],n.prototype,"getRuleIndexMap",null),u([p.NotNull],n.prototype,"serializedATN",null),u([p.NotNull],n.prototype,"atn",null),u([p.NotNull,i(0,p.NotNull)],n.prototype,"interpreter",null),u([p.NotNull,i(0,p.NotNull)],n.prototype,"getErrorHeader",null),u([i(0,p.NotNull)],n.prototype,"addErrorListener",null),u([i(0,p.NotNull)],n.prototype,"removeErrorListener",null),u([p.NotNull],n.prototype,"getErrorListeners",null),pt.Recognizer=n,pt}var jr={},rc;function Mr(){if(rc)return jr;rc=1;var u=jr&&jr.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(jr,"__esModule",{value:!0}),jr.VocabularyImpl=void 0;const i=Q(),c=Ne();let h=class{constructor(a,r,n){this.literalNames=a,this.symbolicNames=r,this.displayNames=n,this._maxTokenType=Math.max(this.displayNames.length,Math.max(this.literalNames.length,this.symbolicNames.length))-1}get maxTokenType(){return this._maxTokenType}getLiteralName(a){if(a>=0&&a<this.literalNames.length)return this.literalNames[a]}getSymbolicName(a){if(a>=0&&a<this.symbolicNames.length)return this.symbolicNames[a];if(a===c.Token.EOF)return"EOF"}getDisplayName(a){if(a>=0&&a<this.displayNames.length){let t=this.displayNames[a];if(t)return t}let r=this.getLiteralName(a);if(r)return r;let n=this.getSymbolicName(a);return n||String(a)}};return h.EMPTY_VOCABULARY=new h([],[],[]),u([i.NotNull],h.prototype,"literalNames",void 0),u([i.NotNull],h.prototype,"symbolicNames",void 0),u([i.NotNull],h.prototype,"displayNames",void 0),u([i.Override],h.prototype,"maxTokenType",null),u([i.Override],h.prototype,"getLiteralName",null),u([i.Override],h.prototype,"getSymbolicName",null),u([i.Override,i.NotNull],h.prototype,"getDisplayName",null),u([i.NotNull],h,"EMPTY_VOCABULARY",void 0),jr.VocabularyImpl=h,jr}var nc;function ic(){if(nc)return Lr;nc=1;var u=Lr&&Lr.__decorate||function(n,t,s,e){var o=arguments.length,l=o<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,t,s,e);else for(var d=n.length-1;d>=0;d--)(f=n[d])&&(l=(o<3?f(l):o>3?f(t,s,l):f(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l};Object.defineProperty(Lr,"__esModule",{value:!0}),Lr.DFASerializer=void 0;const i=Bi(),c=Q(),h=Xe(),p=Yn(),a=Mr();let r=class{constructor(t,s,e,o){s instanceof p.Recognizer?(e=s.ruleNames,o=s.atn,s=s.vocabulary):s||(s=a.VocabularyImpl.EMPTY_VOCABULARY),this.dfa=t,this.vocabulary=s,this.ruleNames=e,this.atn=o}toString(){if(!this.dfa.s0)return"";let t="";if(this.dfa.states){let e=new Array(...this.dfa.states.toArray());e.sort((o,l)=>o.stateNumber-l.stateNumber);for(let o of e){let l=o.getEdgeMap(),f=[...l.keys()].sort((x,m)=>x-m),d=o.getContextEdgeMap(),g=[...d.keys()].sort((x,m)=>x-m);for(let x of f){let m=l.get(x);if((m==null||m===i.ATNSimulator.ERROR)&&!o.isContextSymbol(x))continue;let y=!1;t+=this.getStateString(o)+"-"+this.getEdgeLabel(x)+"->",o.isContextSymbol(x)&&(t+="!",y=!0);let _=m;_&&_.stateNumber!==i.ATNSimulator.ERROR.stateNumber?t+=this.getStateString(_)+`
|
|
204
73
|
`:y&&(t+=`ctx
|
|
205
74
|
`)}if(o.isContextSensitive)for(let x of g)t+=this.getStateString(o)+"-"+this.getContextLabel(x)+"->"+this.getStateString(d.get(x))+`
|
|
206
|
-
`}}let s=t;return s.length===0?"":s}getContextLabel(t){if(t===h.PredictionContext.EMPTY_FULL_STATE_KEY)return"ctx:EMPTY_FULL";if(t===h.PredictionContext.EMPTY_LOCAL_STATE_KEY)return"ctx:EMPTY_LOCAL";if(this.atn&&t>0&&t<=this.atn.states.length){let e=this.atn.states[t].ruleIndex;if(this.ruleNames&&e>=0&&e<this.ruleNames.length)return"ctx:"+String(t)+"("+this.ruleNames[e]+")"}return"ctx:"+String(t)}getEdgeLabel(t){return this.vocabulary.getDisplayName(t)}getStateString(t){if(t===i.ATNSimulator.ERROR)return"ERROR";let s=t.stateNumber,e="s"+s;if(t.isAcceptState&&(t.predicates?e=":s"+s+"=>"+t.predicates:e=":s"+s+"=>"+t.prediction),t.isContextSensitive){e+="*";for(let o of t.configs)if(o.reachesIntoOuterContext){e+="*";break}}return e}};return u([c.NotNull],r.prototype,"dfa",void 0),u([c.NotNull],r.prototype,"vocabulary",void 0),u([c.Override],r.prototype,"toString",null),jr.DFASerializer=r,jr}var vt={},sc;function d0(){if(sc)return vt;sc=1;/*!
|
|
207
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
208
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
209
|
-
*/var u=vt&&vt.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=vt&&vt.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(vt,"__esModule",{value:!0}),vt.LexerDFASerializer=void 0;const c=oc(),h=Q(),p=Ur();let a=class extends c.DFASerializer{constructor(n){super(n,p.VocabularyImpl.EMPTY_VOCABULARY)}getEdgeLabel(n){return"'"+String.fromCodePoint(n)+"'"}};return u([h.Override,h.NotNull],a.prototype,"getEdgeLabel",null),a=u([i(0,h.NotNull)],a),vt.LexerDFASerializer=a,vt}var zr={},uc;function Us(){if(uc)return zr;uc=1;/*!
|
|
210
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
211
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
212
|
-
*/var u=zr&&zr.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(zr,"__esModule",{value:!0}),zr.StarLoopEntryState=void 0;const i=Fe(),c=yr(),h=Fr(),p=Q();let a=class extends h.DecisionState{constructor(){super(...arguments),this.precedenceRuleDecision=!1,this.precedenceLoopbackStates=new c.BitSet}get stateType(){return i.ATNStateType.STAR_LOOP_ENTRY}};return u([p.Override],a.prototype,"stateType",null),zr.StarLoopEntryState=a,zr}var ac;function lc(){if(ac)return yt;ac=1;/*!
|
|
213
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
214
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
215
|
-
*/var u=yt&&yt.__decorate||function(l,f,d,g){var x=arguments.length,m=x<3?f:g===null?g=Object.getOwnPropertyDescriptor(f,d):g,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(l,f,d,g);else for(var _=l.length-1;_>=0;_--)(y=l[_])&&(m=(x<3?y(m):x>3?y(f,d,m):y(f,d))||m);return x>3&&m&&Object.defineProperty(f,d,m),m},i=yt&&yt.__param||function(l,f){return function(d,g){f(d,g,l)}};Object.defineProperty(yt,"__esModule",{value:!0}),yt.DFA=void 0;const c=xr(),h=Zn(),p=oc(),a=ji(),r=d0(),n=Q(),t=nt(),s=Us(),e=Ur();let o=class{constructor(f,d=0){if(this.states=new c.Array2DHashSet(t.ObjectEqualityComparator.INSTANCE),this.nextStateNumber=0,!f.atn)throw new Error("The ATNState must be associated with an ATN");this.atnStartState=f,this.atn=f.atn,this.decision=d;let g=!1;f instanceof s.StarLoopEntryState&&f.precedenceRuleDecision&&(g=!0,this.s0=new a.DFAState(new h.ATNConfigSet),this.s0full=new a.DFAState(new h.ATNConfigSet)),this.precedenceDfa=g}get isPrecedenceDfa(){return this.precedenceDfa}getPrecedenceStartState(f,d){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");return d?this.s0full.getTarget(f):this.s0.getTarget(f)}setPrecedenceStartState(f,d,g){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");f<0||(d?this.s0full.setTarget(f,g):this.s0.setTarget(f,g))}get isEmpty(){return this.isPrecedenceDfa?this.s0.getEdgeMap().size===0&&this.s0full.getEdgeMap().size===0:this.s0==null&&this.s0full==null}get isContextSensitive(){return this.isPrecedenceDfa?this.s0full.getEdgeMap().size>0:this.s0full!=null}addState(f){return f.stateNumber=this.nextStateNumber++,this.states.getOrAdd(f)}toString(f,d){if(f||(f=e.VocabularyImpl.EMPTY_VOCABULARY),!this.s0)return"";let g;return d?g=new p.DFASerializer(this,f,d,this.atnStartState.atn):g=new p.DFASerializer(this,f),g.toString()}toLexerString(){return this.s0?new r.LexerDFASerializer(this).toString():""}};return u([n.NotNull],o.prototype,"states",void 0),u([n.NotNull],o.prototype,"atnStartState",void 0),u([n.NotNull],o.prototype,"atn",void 0),o=u([i(0,n.NotNull)],o),yt.DFA=o,yt}var Hr={},$r={},cc;function fc(){if(cc)return $r;cc=1;/*!
|
|
216
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
217
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
218
|
-
*/var u=$r&&$r.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty($r,"__esModule",{value:!0}),$r.BasicState=void 0;const i=ut(),c=Fe(),h=Q();let p=class extends i.ATNState{get stateType(){return c.ATNStateType.BASIC}};return u([h.Override],p.prototype,"stateType",null),$r.BasicState=p,$r}var hc;function pc(){if(hc)return Hr;hc=1;/*!
|
|
219
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
220
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
221
|
-
*/var u=Hr&&Hr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.InvalidState=void 0;const i=Fe(),c=fc(),h=Q();let p=class extends c.BasicState{get stateType(){return i.ATNStateType.INVALID_TYPE}};return u([h.Override],p.prototype,"stateType",null),Hr.InvalidState=p,Hr}var At={},Tt={},Et={},dc;function zs(){if(dc)return Et;dc=1;/*!
|
|
222
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
223
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
224
|
-
*/var u=Et&&Et.__decorate||function(n,t,s,e){var o=arguments.length,l=o<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,t,s,e);else for(var d=n.length-1;d>=0;d--)(f=n[d])&&(l=(o<3?f(l):o>3?f(t,s,l):f(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l},i=Et&&Et.__param||function(n,t){return function(s,e){t(s,e,n)}};Object.defineProperty(Et,"__esModule",{value:!0}),Et.SetTransition=void 0;const c=Gr(),h=Q(),p=Oe(),a=dr();let r=class extends a.Transition{constructor(t,s){super(t),s==null&&(s=c.IntervalSet.of(p.Token.INVALID_TYPE)),this.set=s}get serializationType(){return 7}get label(){return this.set}matches(t,s,e){return this.set.contains(t)}toString(){return this.set.toString()}};return u([h.NotNull],r.prototype,"set",void 0),u([h.Override],r.prototype,"serializationType",null),u([h.Override,h.NotNull],r.prototype,"label",null),u([h.Override],r.prototype,"matches",null),u([h.Override,h.NotNull],r.prototype,"toString",null),r=u([i(0,h.NotNull),i(1,h.Nullable)],r),Et.SetTransition=r,Et}var xc;function Hs(){if(xc)return Tt;xc=1;/*!
|
|
225
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
226
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
227
|
-
*/var u=Tt&&Tt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Tt&&Tt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.NotSetTransition=void 0;const c=Q(),h=zs();let p=class extends h.SetTransition{constructor(r,n){super(r,n)}get serializationType(){return 8}matches(r,n,t){return r>=n&&r<=t&&!super.matches(r,n,t)}toString(){return"~"+super.toString()}};return u([c.Override],p.prototype,"serializationType",null),u([c.Override],p.prototype,"matches",null),u([c.Override],p.prototype,"toString",null),p=u([i(0,c.NotNull),i(1,c.Nullable)],p),Tt.NotSetTransition=p,Tt}var Vr={},yc;function ri(){if(yc)return Vr;yc=1;/*!
|
|
228
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
229
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
230
|
-
*/var u=Vr&&Vr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Vr,"__esModule",{value:!0}),Vr.RuleStopState=void 0;const i=ut(),c=Fe(),h=Q();let p=class extends i.ATNState{get nonStopStateNumber(){return-1}get stateType(){return c.ATNStateType.RULE_STOP}};return u([h.Override],p.prototype,"nonStopStateNumber",null),u([h.Override],p.prototype,"stateType",null),Vr.RuleStopState=p,Vr}var St={},_c;function $s(){if(_c)return St;_c=1;/*!
|
|
231
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
232
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
233
|
-
*/var u=St&&St.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=St&&St.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(St,"__esModule",{value:!0}),St.RuleTransition=void 0;const c=Q(),h=dr();let p=class extends h.Transition{constructor(r,n,t,s){super(r),this.tailCall=!1,this.optimizedTailCall=!1,this.ruleIndex=n,this.precedence=t,this.followState=s}get serializationType(){return 3}get isEpsilon(){return!0}matches(r,n,t){return!1}};return u([c.NotNull],p.prototype,"followState",void 0),u([c.Override],p.prototype,"serializationType",null),u([c.Override],p.prototype,"isEpsilon",null),u([c.Override],p.prototype,"matches",null),p=u([i(0,c.NotNull),i(3,c.NotNull)],p),St.RuleTransition=p,St}var Nt={},mc;function gc(){if(mc)return Nt;mc=1;/*!
|
|
234
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
235
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
236
|
-
*/var u=Nt&&Nt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Nt&&Nt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.WildcardTransition=void 0;const c=Q(),h=dr();let p=class extends h.Transition{constructor(r){super(r)}get serializationType(){return 9}matches(r,n,t){return r>=n&&r<=t}toString(){return"."}};return u([c.Override],p.prototype,"serializationType",null),u([c.Override],p.prototype,"matches",null),u([c.Override,c.NotNull],p.prototype,"toString",null),p=u([i(0,c.NotNull)],p),Nt.WildcardTransition=p,Nt}var vc;function x0(){if(vc)return At;vc=1;/*!
|
|
237
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
238
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
239
|
-
*/var u=At&&At.__decorate||function(x,m,y,_){var v=arguments.length,N=v<3?m:_===null?_=Object.getOwnPropertyDescriptor(m,y):_,T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(x,m,y,_);else for(var b=x.length-1;b>=0;b--)(T=x[b])&&(N=(v<3?T(N):v>3?T(m,y,N):T(m,y))||N);return v>3&&N&&Object.defineProperty(m,y,N),N},i=At&&At.__param||function(x,m){return function(y,_){m(y,_,x)}};Object.defineProperty(At,"__esModule",{value:!0}),At.LL1Analyzer=void 0;const c=Is(),h=xr(),p=Bi(),a=yr(),r=Gr(),n=Q(),t=Hs(),s=nt(),e=Je(),o=ri(),l=$s(),f=Oe(),d=gc();let g=class Su{constructor(m){this.atn=m}getDecisionLookahead(m){if(m==null)return;let y=new Array(m.numberOfTransitions);for(let _=0;_<m.numberOfTransitions;_++){let v=new r.IntervalSet;y[_]=v;let N=new h.Array2DHashSet(s.ObjectEqualityComparator.INSTANCE);this._LOOK(m.transition(_).target,void 0,e.PredictionContext.EMPTY_LOCAL,v,N,new a.BitSet,!1,!1),(v.size===0||v.contains(Su.HIT_PRED))&&(v=void 0,y[_]=v)}return y}LOOK(m,y,_){if(_===void 0){if(m.atn==null)throw new Error("Illegal state");_=m.atn.ruleToStopState[m.ruleIndex]}else _===null&&(_=void 0);let v=new r.IntervalSet;return this._LOOK(m,_,y,v,new h.Array2DHashSet,new a.BitSet,!0,!0),v}_LOOK(m,y,_,v,N,T,b,O){let D=p.ATNConfig.create(m,0,_);if(!N.add(D))return;if(m===y){if(e.PredictionContext.isEmptyLocal(_)){v.add(f.Token.EPSILON);return}else if(_.isEmpty){O&&v.add(f.Token.EOF);return}}if(m instanceof o.RuleStopState){if(_.isEmpty&&!e.PredictionContext.isEmptyLocal(_)){O&&v.add(f.Token.EOF);return}let z=T.get(m.ruleIndex);try{T.clear(m.ruleIndex);for(let U=0;U<_.size;U++){if(_.getReturnState(U)===e.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let re=this.atn.states[_.getReturnState(U)];this._LOOK(re,y,_.getParent(U),v,N,T,b,O)}}finally{z&&T.set(m.ruleIndex)}}let k=m.numberOfTransitions;for(let z=0;z<k;z++){let U=m.transition(z);if(U instanceof l.RuleTransition){if(T.get(U.ruleIndex))continue;let re=_.getChild(U.followState.stateNumber);try{T.set(U.ruleIndex),this._LOOK(U.target,y,re,v,N,T,b,O)}finally{T.clear(U.ruleIndex)}}else if(U instanceof c.AbstractPredicateTransition)b?this._LOOK(U.target,y,_,v,N,T,b,O):v.add(Su.HIT_PRED);else if(U.isEpsilon)this._LOOK(U.target,y,_,v,N,T,b,O);else if(U instanceof d.WildcardTransition)v.addAll(r.IntervalSet.of(f.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType));else{let re=U.label;re!=null&&(U instanceof t.NotSetTransition&&(re=re.complement(r.IntervalSet.of(f.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType))),v.addAll(re))}}}};return g.HIT_PRED=f.Token.INVALID_TYPE,u([n.NotNull],g.prototype,"atn",void 0),u([n.NotNull,i(0,n.NotNull),i(1,n.NotNull)],g.prototype,"LOOK",null),u([i(0,n.NotNull),i(2,n.NotNull),i(3,n.NotNull),i(4,n.NotNull),i(5,n.NotNull)],g.prototype,"_LOOK",null),g=u([i(0,n.NotNull)],g),At.LL1Analyzer=g,At}var Ac;function bt(){return Ac||(Ac=1,function(u){/*!
|
|
240
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
241
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
242
|
-
*/var i=wr&&wr.__decorate||function(d,g,x,m){var y=arguments.length,_=y<3?g:m===null?m=Object.getOwnPropertyDescriptor(g,x):m,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(d,g,x,m);else for(var N=d.length-1;N>=0;N--)(v=d[N])&&(_=(y<3?v(_):y>3?v(g,x,_):v(g,x))||_);return y>3&&_&&Object.defineProperty(g,x,_),_},c=wr&&wr.__param||function(d,g){return function(x,m){g(x,m,d)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ATN=void 0;const h=jn(),p=lc(),a=Gr(),r=pc(),n=x0(),t=Q(),s=nt(),e=Je(),o=Oe(),l=Me();let f=class{constructor(g,x){this.states=[],this.decisionToState=[],this.modeNameToStartState=new Map,this.modeToStartState=[],this.contextCache=new h.Array2DHashMap(s.ObjectEqualityComparator.INSTANCE),this.decisionToDFA=[],this.modeToDFA=[],this.LL1Table=new Map,this.grammarType=g,this.maxTokenType=x}clearDFA(){this.decisionToDFA=new Array(this.decisionToState.length);for(let g=0;g<this.decisionToDFA.length;g++)this.decisionToDFA[g]=new p.DFA(this.decisionToState[g],g);this.modeToDFA=new Array(this.modeToStartState.length);for(let g=0;g<this.modeToDFA.length;g++)this.modeToDFA[g]=new p.DFA(this.modeToStartState[g]);this.contextCache.clear(),this.LL1Table.clear()}get contextCacheSize(){return this.contextCache.size}getCachedContext(g){return e.PredictionContext.getCachedContext(g,this.contextCache,new e.PredictionContext.IdentityHashMap)}getDecisionToDFA(){return l(this.decisionToDFA!=null&&this.decisionToDFA.length===this.decisionToState.length),this.decisionToDFA}nextTokens(g,x){return x?new n.LL1Analyzer(this).LOOK(g,x):(g.nextTokenWithinRule||(g.nextTokenWithinRule=this.nextTokens(g,e.PredictionContext.EMPTY_LOCAL),g.nextTokenWithinRule.setReadonly(!0)),g.nextTokenWithinRule)}addState(g){g.atn=this,g.stateNumber=this.states.length,this.states.push(g)}removeState(g){let x=new r.InvalidState;x.atn=this,x.stateNumber=g.stateNumber,this.states[g.stateNumber]=x}defineMode(g,x){this.modeNameToStartState.set(g,x),this.modeToStartState.push(x),this.modeToDFA.push(new p.DFA(x)),this.defineDecisionState(x)}defineDecisionState(g){return this.decisionToState.push(g),g.decision=this.decisionToState.length-1,this.decisionToDFA.push(new p.DFA(g,g.decision)),g.decision}getDecisionState(g){if(this.decisionToState.length>0)return this.decisionToState[g]}get numberOfDecisions(){return this.decisionToState.length}getExpectedTokens(g,x){if(g<0||g>=this.states.length)throw new RangeError("Invalid state number.");let m=x,y=this.states[g],_=this.nextTokens(y);if(!_.contains(o.Token.EPSILON))return _;let v=new a.IntervalSet;for(v.addAll(_),v.remove(o.Token.EPSILON);m!=null&&m.invokingState>=0&&_.contains(o.Token.EPSILON);){let T=this.states[m.invokingState].transition(0);_=this.nextTokens(T.followState),v.addAll(_),v.remove(o.Token.EPSILON),m=m._parent}return _.contains(o.Token.EPSILON)&&v.add(o.Token.EOF),v}};i([t.NotNull],f.prototype,"states",void 0),i([t.NotNull],f.prototype,"decisionToState",void 0),i([t.NotNull],f.prototype,"modeNameToStartState",void 0),i([t.NotNull],f.prototype,"modeToStartState",void 0),i([t.NotNull],f.prototype,"decisionToDFA",void 0),i([t.NotNull],f.prototype,"modeToDFA",void 0),i([t.NotNull],f.prototype,"nextTokens",null),i([c(0,t.NotNull)],f.prototype,"removeState",null),i([c(0,t.NotNull),c(1,t.NotNull)],f.prototype,"defineMode",null),i([c(0,t.NotNull)],f.prototype,"defineDecisionState",null),i([t.NotNull],f.prototype,"getExpectedTokens",null),f=i([c(0,t.NotNull)],f),u.ATN=f,function(d){d.INVALID_ALT_NUMBER=0}(f=u.ATN||(u.ATN={})),u.ATN=f}(wr)),wr}var Ct={},Ot={},Tc;function y0(){if(Tc)return Ot;Tc=1;/*!
|
|
243
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
244
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
245
|
-
*/var u=Ot&&Ot.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Ot&&Ot.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.LexerIndexedCustomAction=void 0;const c=we(),h=Q();let p=class up{constructor(r,n){this._offset=r,this._action=n}get offset(){return this._offset}get action(){return this._action}get actionType(){return this._action.actionType}get isPositionDependent(){return!0}execute(r){this._action.execute(r)}hashCode(){let r=c.MurmurHash.initialize();return r=c.MurmurHash.update(r,this._offset),r=c.MurmurHash.update(r,this._action),c.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof up?this._offset===r._offset&&this._action.equals(r._action):!1}};return u([h.NotNull],p.prototype,"action",null),u([h.Override],p.prototype,"actionType",null),u([h.Override],p.prototype,"isPositionDependent",null),u([h.Override],p.prototype,"execute",null),u([h.Override],p.prototype,"hashCode",null),u([h.Override],p.prototype,"equals",null),p=u([i(1,h.NotNull)],p),Ot.LexerIndexedCustomAction=p,Ot}var Ec;function _0(){if(Ec)return Ct;Ec=1;/*!
|
|
246
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
247
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
248
|
-
*/var u=Ct&&Ct.__decorate||function(n,t,s,e){var o=arguments.length,l=o<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,t,s,e);else for(var d=n.length-1;d>=0;d--)(f=n[d])&&(l=(o<3?f(l):o>3?f(t,s,l):f(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l},i=Ct&&Ct.__param||function(n,t){return function(s,e){t(s,e,n)}};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.LexerActionExecutor=void 0;const c=wi(),h=y0(),p=we(),a=Q();let r=class bi{constructor(t){this._lexerActions=t;let s=p.MurmurHash.initialize();for(let e of t)s=p.MurmurHash.update(s,e);this.cachedHashCode=p.MurmurHash.finish(s,t.length)}static append(t,s){if(!t)return new bi([s]);let e=t._lexerActions.slice(0);return e.push(s),new bi(e)}fixOffsetBeforeMatch(t){let s;for(let e=0;e<this._lexerActions.length;e++)this._lexerActions[e].isPositionDependent&&!(this._lexerActions[e]instanceof h.LexerIndexedCustomAction)&&(s||(s=this._lexerActions.slice(0)),s[e]=new h.LexerIndexedCustomAction(t,this._lexerActions[e]));return s?new bi(s):this}get lexerActions(){return this._lexerActions}execute(t,s,e){let o=!1,l=s.index;try{for(let f of this._lexerActions){if(f instanceof h.LexerIndexedCustomAction){let d=f.offset;s.seek(e+d),f=f.action,o=e+d!==l}else f.isPositionDependent&&(s.seek(l),o=!1);f.execute(t)}}finally{o&&s.seek(l)}}hashCode(){return this.cachedHashCode}equals(t){return t===this?!0:t instanceof bi?this.cachedHashCode===t.cachedHashCode&&c.ArrayEqualityComparator.INSTANCE.equals(this._lexerActions,t._lexerActions):!1}};return u([a.NotNull],r.prototype,"_lexerActions",void 0),u([a.NotNull],r.prototype,"lexerActions",null),u([i(0,a.NotNull)],r.prototype,"execute",null),u([a.Override],r.prototype,"hashCode",null),u([a.Override],r.prototype,"equals",null),u([a.NotNull,i(1,a.NotNull)],r,"append",null),r=u([i(0,a.NotNull)],r),Ct.LexerActionExecutor=r,Ct}var Rt={},Sc;function qi(){if(Sc)return Rt;Sc=1;/*!
|
|
249
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
250
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
251
|
-
*/var u=Rt&&Rt.__decorate||function(n,t,s,e){var o=arguments.length,l=o<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,t,s,e);else for(var d=n.length-1;d>=0;d--)(f=n[d])&&(l=(o<3?f(l):o>3?f(t,s,l):f(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l},i=Rt&&Rt.__param||function(n,t){return function(s,e){t(s,e,n)}};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.LexerNoViableAltException=void 0;const c=pr(),h=Q(),p=ke(),a=ht();let r=class extends c.RecognitionException{constructor(t,s,e,o){super(t,s),this._startIndex=e,this._deadEndConfigs=o}get startIndex(){return this._startIndex}get deadEndConfigs(){return this._deadEndConfigs}get inputStream(){return super.inputStream}toString(){let t="";return this._startIndex>=0&&this._startIndex<this.inputStream.size&&(t=this.inputStream.getText(p.Interval.of(this._startIndex,this._startIndex)),t=a.escapeWhitespace(t,!1)),`LexerNoViableAltException('${t}')`}};return u([h.Override],r.prototype,"inputStream",null),u([h.Override],r.prototype,"toString",null),r=u([i(1,h.NotNull)],r),Rt.LexerNoViableAltException=r,Rt}var Wr={},Nc;function m0(){if(Nc)return Wr;Nc=1;/*!
|
|
252
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
253
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
254
|
-
*/var u=Wr&&Wr.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.OrderedATNConfigSet=void 0;const i=Zn(),c=Q();let h=class ap extends i.ATNConfigSet{constructor(a,r){a!=null&&r!=null?super(a,r):super()}clone(a){let r=new ap(this,a);return!a&&this.isReadOnly&&r.addAll(this),r}getKey(a){return{state:0,alt:a.hashCode()}}canMerge(a,r,n){return a.equals(n)}};return u([c.Override],h.prototype,"clone",null),u([c.Override],h.prototype,"getKey",null),u([c.Override],h.prototype,"canMerge",null),Wr.OrderedATNConfigSet=h,Wr}var bc;function ki(){return bc||(bc=1,function(u){/*!
|
|
255
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
256
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
257
|
-
*/var i=Ir&&Ir.__decorate||function(N,T,b,O){var D=arguments.length,k=D<3?T:O===null?O=Object.getOwnPropertyDescriptor(T,b):O,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(N,T,b,O);else for(var U=N.length-1;U>=0;U--)(z=N[U])&&(k=(D<3?z(k):D>3?z(T,b,k):z(T,b))||k);return D>3&&k&&Object.defineProperty(T,b,k),k},c=Ir&&Ir.__param||function(N,T){return function(b,O){T(b,O,N)}};Object.defineProperty(u,"__esModule",{value:!0}),u.LexerATNSimulator=void 0;const h=Hl(),p=bt(),a=Bi(),r=Zn(),n=Mi(),t=ji(),s=ke(),e=hr(),o=_r(),l=_0(),f=qi(),d=Q(),g=m0(),x=Je(),m=ri(),y=Oe(),_=Me();let v=class $e extends n.ATNSimulator{constructor(T,b){super(T),this.optimize_tail_calls=!0,this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=o.Lexer.DEFAULT_MODE,this.prevAccept=new $e.SimState,this.recog=b}copyState(T){this._charPositionInLine=T.charPositionInLine,this._line=T._line,this.mode=T.mode,this.startIndex=T.startIndex}match(T,b){this.mode=b;let O=T.mark();try{this.startIndex=T.index,this.prevAccept.reset();let D=this.atn.modeToDFA[b].s0;return D==null?this.matchATN(T):this.execATN(T,D)}finally{T.release(O)}}reset(){this.prevAccept.reset(),this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=o.Lexer.DEFAULT_MODE}matchATN(T){let b=this.atn.modeToStartState[this.mode];$e.debug&&console.log(`matchATN mode ${this.mode} start: ${b}`);let O=this.mode,D=this.computeStartState(T,b),k=D.hasSemanticContext;k&&(D.hasSemanticContext=!1);let z=this.addDFAState(D);if(!k){let re=this.atn.modeToDFA[this.mode];re.s0?z=re.s0:re.s0=z}let U=this.execATN(T,z);return $e.debug&&console.log(`DFA after matchATN: ${this.atn.modeToDFA[O].toLexerString()}`),U}execATN(T,b){$e.debug&&console.log(`start state closure=${b.configs}`),b.isAcceptState&&this.captureSimState(this.prevAccept,T,b);let O=T.LA(1),D=b;for(;;){$e.debug&&console.log(`execATN loop starting closure: ${D.configs}`);let k=this.getExistingTargetState(D,O);if(k==null&&(k=this.computeTargetState(T,D,O)),k===n.ATNSimulator.ERROR||(O!==e.IntStream.EOF&&this.consume(T),k.isAcceptState&&(this.captureSimState(this.prevAccept,T,k),O===e.IntStream.EOF)))break;O=T.LA(1),D=k}return this.failOrAccept(this.prevAccept,T,D.configs,O)}getExistingTargetState(T,b){let O=T.getTarget(b);return $e.debug&&O!=null&&console.log("reuse state "+T.stateNumber+" edge to "+O.stateNumber),O}computeTargetState(T,b,O){let D=new g.OrderedATNConfigSet;return this.getReachableConfigSet(T,b.configs,D,O),D.isEmpty?(D.hasSemanticContext||this.addDFAEdge(b,O,n.ATNSimulator.ERROR),n.ATNSimulator.ERROR):this.addDFAEdge(b,O,D)}failOrAccept(T,b,O,D){if(T.dfaState!=null){let k=T.dfaState.lexerActionExecutor;return this.accept(b,k,this.startIndex,T.index,T.line,T.charPos),T.dfaState.prediction}else{if(D===e.IntStream.EOF&&b.index===this.startIndex)return y.Token.EOF;throw new f.LexerNoViableAltException(this.recog,b,this.startIndex,O)}}getReachableConfigSet(T,b,O,D){let k=p.ATN.INVALID_ALT_NUMBER;for(let z of b){let U=z.alt===k;if(U&&z.hasPassedThroughNonGreedyDecision)continue;$e.debug&&console.log(`testing ${this.getTokenName(D)} at ${z.toString(this.recog,!0)}`);let re=z.state.numberOfOptimizedTransitions;for(let oe=0;oe<re;oe++){let se=z.state.getOptimizedTransition(oe),de=this.getReachableTarget(se,D);if(de!=null){let be=z.lexerActionExecutor,fe;be!=null?(be=be.fixOffsetBeforeMatch(T.index-this.startIndex),fe=z.transform(de,!0,be)):(_(z.lexerActionExecutor==null),fe=z.transform(de,!0));let Z=D===e.IntStream.EOF;if(this.closure(T,fe,O,U,!0,Z)){k=z.alt;break}}}}}accept(T,b,O,D,k,z){$e.debug&&console.log(`ACTION ${b}`),T.seek(D),this._line=k,this._charPositionInLine=z,b!=null&&this.recog!=null&&b.execute(this.recog,T,O)}getReachableTarget(T,b){if(T.matches(b,o.Lexer.MIN_CHAR_VALUE,o.Lexer.MAX_CHAR_VALUE))return T.target}computeStartState(T,b){let O=x.PredictionContext.EMPTY_FULL,D=new g.OrderedATNConfigSet;for(let k=0;k<b.numberOfTransitions;k++){let z=b.transition(k).target,U=a.ATNConfig.create(z,k+1,O);this.closure(T,U,D,!1,!1,!1)}return D}closure(T,b,O,D,k,z){if($e.debug&&console.log("closure("+b.toString(this.recog,!0)+")"),b.state instanceof m.RuleStopState){$e.debug&&(this.recog!=null?console.log(`closure at ${this.recog.ruleNames[b.state.ruleIndex]} rule stop ${b}`):console.log(`closure at rule stop ${b}`));let re=b.context;if(re.isEmpty)return O.add(b),!0;re.hasEmpty&&(O.add(b.transform(b.state,!0,x.PredictionContext.EMPTY_FULL)),D=!0);for(let oe=0;oe<re.size;oe++){let se=re.getReturnState(oe);if(se===x.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let de=re.getParent(oe),be=this.atn.states[se],fe=b.transform(be,!1,de);D=this.closure(T,fe,O,D,k,z)}return D}b.state.onlyHasEpsilonTransitions||(!D||!b.hasPassedThroughNonGreedyDecision)&&O.add(b);let U=b.state;for(let re=0;re<U.numberOfOptimizedTransitions;re++){let oe=U.getOptimizedTransition(re),se=this.getEpsilonTarget(T,b,oe,O,k,z);se!=null&&(D=this.closure(T,se,O,D,k,z))}return D}getEpsilonTarget(T,b,O,D,k,z){let U;switch(O.serializationType){case 3:let re=O;if(this.optimize_tail_calls&&re.optimizedTailCall&&!b.context.hasEmpty)U=b.transform(O.target,!0);else{let se=b.context.getChild(re.followState.stateNumber);U=b.transform(O.target,!0,se)}break;case 10:throw new Error("Precedence predicates are not supported in lexers.");case 4:let oe=O;$e.debug&&console.log("EVAL rule "+oe.ruleIndex+":"+oe.predIndex),D.hasSemanticContext=!0,this.evaluatePredicate(T,oe.ruleIndex,oe.predIndex,k)?U=b.transform(O.target,!0):U=void 0;break;case 6:if(b.context.hasEmpty){let se=l.LexerActionExecutor.append(b.lexerActionExecutor,this.atn.lexerActions[O.actionIndex]);U=b.transform(O.target,!0,se);break}else{U=b.transform(O.target,!0);break}case 1:U=b.transform(O.target,!0);break;case 5:case 2:case 7:if(z&&O.matches(e.IntStream.EOF,o.Lexer.MIN_CHAR_VALUE,o.Lexer.MAX_CHAR_VALUE)){U=b.transform(O.target,!1);break}U=void 0;break;default:U=void 0;break}return U}evaluatePredicate(T,b,O,D){if(this.recog==null)return!0;if(!D)return this.recog.sempred(void 0,b,O);let k=this._charPositionInLine,z=this._line,U=T.index,re=T.mark();try{return this.consume(T),this.recog.sempred(void 0,b,O)}finally{this._charPositionInLine=k,this._line=z,T.seek(U),T.release(re)}}captureSimState(T,b,O){T.index=b.index,T.line=this._line,T.charPos=this._charPositionInLine,T.dfaState=O}addDFAEdge(T,b,O){if(O instanceof r.ATNConfigSet){let D=O.hasSemanticContext;D&&(O.hasSemanticContext=!1);let k=this.addDFAState(O);return D||this.addDFAEdge(T,b,k),k}else $e.debug&&console.log("EDGE "+T+" -> "+O+" upon "+String.fromCharCode(b)),T!=null&&T.setTarget(b,O)}addDFAState(T){_(!T.hasSemanticContext);let b=new t.DFAState(T),O=this.atn.modeToDFA[this.mode].states.get(b);if(O!=null)return O;T.optimizeConfigs(this);let D=new t.DFAState(T.clone(!0)),k;for(let z of T)if(z.state instanceof m.RuleStopState){k=z;break}if(k!=null){let z=this.atn.ruleToTokenType[k.state.ruleIndex],U=k.lexerActionExecutor;D.acceptStateInfo=new h.AcceptStateInfo(z,U)}return this.atn.modeToDFA[this.mode].addState(D)}getDFA(T){return this.atn.modeToDFA[T]}getText(T){return T.getText(s.Interval.of(this.startIndex,T.index-1))}get line(){return this._line}set line(T){this._line=T}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(T){this._charPositionInLine=T}consume(T){T.LA(1)===10?(this._line++,this._charPositionInLine=0):this._charPositionInLine++,T.consume()}getTokenName(T){return T===-1?"EOF":"'"+String.fromCharCode(T)+"'"}};i([d.NotNull],v.prototype,"prevAccept",void 0),i([c(0,d.NotNull)],v.prototype,"copyState",null),i([c(0,d.NotNull)],v.prototype,"match",null),i([d.Override],v.prototype,"reset",null),i([c(0,d.NotNull)],v.prototype,"matchATN",null),i([c(0,d.NotNull),c(1,d.NotNull)],v.prototype,"execATN",null),i([c(0,d.NotNull)],v.prototype,"getExistingTargetState",null),i([d.NotNull,c(0,d.NotNull),c(1,d.NotNull)],v.prototype,"computeTargetState",null),i([c(0,d.NotNull),c(1,d.NotNull),c(2,d.NotNull)],v.prototype,"getReachableConfigSet",null),i([c(0,d.NotNull)],v.prototype,"accept",null),i([d.NotNull,c(0,d.NotNull),c(1,d.NotNull)],v.prototype,"computeStartState",null),i([c(0,d.NotNull),c(1,d.NotNull),c(2,d.NotNull)],v.prototype,"closure",null),i([c(0,d.NotNull),c(1,d.NotNull),c(2,d.NotNull),c(3,d.NotNull)],v.prototype,"getEpsilonTarget",null),i([c(0,d.NotNull)],v.prototype,"evaluatePredicate",null),i([c(0,d.NotNull),c(1,d.NotNull),c(2,d.NotNull)],v.prototype,"captureSimState",null),i([d.NotNull,c(0,d.NotNull)],v.prototype,"addDFAState",null),i([d.NotNull],v.prototype,"getDFA",null),i([d.NotNull,c(0,d.NotNull)],v.prototype,"getText",null),i([c(0,d.NotNull)],v.prototype,"consume",null),i([d.NotNull],v.prototype,"getTokenName",null),v=i([c(0,d.NotNull)],v),u.LexerATNSimulator=v,function(N){N.debug=!1,N.dfa_debug=!1;class T{constructor(){this.index=-1,this.line=0,this.charPos=-1}reset(){this.index=-1,this.line=0,this.charPos=-1,this.dfaState=void 0}}N.SimState=T}(v=u.LexerATNSimulator||(u.LexerATNSimulator={})),u.LexerATNSimulator=v}(Ir)),Ir}var Cc;function _r(){if(Cc)return Dr;Cc=1;/*!
|
|
258
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
259
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
260
|
-
*/var u=Dr&&Dr.__decorate||function(o,l,f,d){var g=arguments.length,x=g<3?l:d===null?d=Object.getOwnPropertyDescriptor(l,f):d,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(o,l,f,d);else for(var y=o.length-1;y>=0;y--)(m=o[y])&&(x=(g<3?m(x):g>3?m(l,f,x):m(l,f))||x);return g>3&&x&&Object.defineProperty(l,f,x),x};Object.defineProperty(Dr,"__esModule",{value:!0}),Dr.Lexer=void 0;const i=Ms(),c=Ul(),h=ke(),p=hr(),a=ki(),r=qi(),n=Q(),t=ti(),s=Oe();let e=class vr extends t.Recognizer{constructor(l){super(),this._factory=i.CommonTokenFactory.DEFAULT,this._tokenStartCharIndex=-1,this._tokenStartLine=0,this._tokenStartCharPositionInLine=0,this._hitEOF=!1,this._channel=0,this._type=0,this._modeStack=new c.IntegerStack,this._mode=vr.DEFAULT_MODE,this._input=l,this._tokenFactorySourcePair={source:this,stream:l}}static get DEFAULT_TOKEN_CHANNEL(){return s.Token.DEFAULT_CHANNEL}static get HIDDEN(){return s.Token.HIDDEN_CHANNEL}reset(l){(l===void 0||l)&&this._input.seek(0),this._token=void 0,this._type=s.Token.INVALID_TYPE,this._channel=s.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartCharPositionInLine=-1,this._tokenStartLine=-1,this._text=void 0,this._hitEOF=!1,this._mode=vr.DEFAULT_MODE,this._modeStack.clear(),this.interpreter.reset()}nextToken(){if(this._input==null)throw new Error("nextToken requires a non-null input stream.");let l=this._input.mark();try{e:for(;;){if(this._hitEOF)return this.emitEOF();this._token=void 0,this._channel=s.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartCharPositionInLine=this.interpreter.charPositionInLine,this._tokenStartLine=this.interpreter.line,this._text=void 0;do{this._type=s.Token.INVALID_TYPE;let f;try{f=this.interpreter.match(this._input,this._mode)}catch(d){if(d instanceof r.LexerNoViableAltException)this.notifyListeners(d),this.recover(d),f=vr.SKIP;else throw d}if(this._input.LA(1)===p.IntStream.EOF&&(this._hitEOF=!0),this._type===s.Token.INVALID_TYPE&&(this._type=f),this._type===vr.SKIP)continue e}while(this._type===vr.MORE);return this._token==null?this.emit():this._token}}finally{this._input.release(l)}}skip(){this._type=vr.SKIP}more(){this._type=vr.MORE}mode(l){this._mode=l}pushMode(l){a.LexerATNSimulator.debug&&console.log("pushMode "+l),this._modeStack.push(this._mode),this.mode(l)}popMode(){if(this._modeStack.isEmpty)throw new Error("EmptyStackException");return a.LexerATNSimulator.debug&&console.log("popMode back to "+this._modeStack.peek()),this.mode(this._modeStack.pop()),this._mode}get tokenFactory(){return this._factory}set tokenFactory(l){this._factory=l}get inputStream(){return this._input}set inputStream(l){this.reset(!1),this._input=l,this._tokenFactorySourcePair={source:this,stream:this._input}}get sourceName(){return this._input.sourceName}emit(l){return l||(l=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.charIndex-1,this._tokenStartLine,this._tokenStartCharPositionInLine)),this._token=l,l}emitEOF(){let l=this.charPositionInLine,f=this.line,d=this._factory.create(this._tokenFactorySourcePair,s.Token.EOF,void 0,s.Token.DEFAULT_CHANNEL,this._input.index,this._input.index-1,f,l);return this.emit(d),d}get line(){return this.interpreter.line}set line(l){this.interpreter.line=l}get charPositionInLine(){return this.interpreter.charPositionInLine}set charPositionInLine(l){this.interpreter.charPositionInLine=l}get charIndex(){return this._input.index}get text(){return this._text!=null?this._text:this.interpreter.getText(this._input)}set text(l){this._text=l}get token(){return this._token}set token(l){this._token=l}set type(l){this._type=l}get type(){return this._type}set channel(l){this._channel=l}get channel(){return this._channel}getAllTokens(){let l=[],f=this.nextToken();for(;f.type!==s.Token.EOF;)l.push(f),f=this.nextToken();return l}notifyListeners(l){let f=this._input.getText(h.Interval.of(this._tokenStartCharIndex,this._input.index)),d="token recognition error at: '"+this.getErrorDisplay(f)+"'",g=this.getErrorListenerDispatch();g.syntaxError&&g.syntaxError(this,void 0,this._tokenStartLine,this._tokenStartCharPositionInLine,d,l)}getErrorDisplay(l){if(typeof l=="number"){switch(l){case s.Token.EOF:return"<EOF>";case 10:return"\\n";case 9:return"\\t";case 13:return"\\r"}return String.fromCharCode(l)}return l.replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}getCharErrorDisplay(l){return"'"+this.getErrorDisplay(l)+"'"}recover(l){l instanceof r.LexerNoViableAltException?this._input.LA(1)!==p.IntStream.EOF&&this.interpreter.consume(this._input):this._input.consume()}};return e.DEFAULT_MODE=0,e.MORE=-2,e.SKIP=-3,e.MIN_CHAR_VALUE=0,e.MAX_CHAR_VALUE=1114111,u([n.Override],e.prototype,"nextToken",null),u([n.Override],e.prototype,"tokenFactory",null),u([n.Override],e.prototype,"inputStream",null),u([n.Override],e.prototype,"sourceName",null),u([n.Override],e.prototype,"line",null),u([n.Override],e.prototype,"charPositionInLine",null),Dr.Lexer=e,Dr}var Oc;function Gr(){if(Oc)return dt;Oc=1;/*!
|
|
261
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
262
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
263
|
-
*/var u=dt&&dt.__decorate||function(e,o,l,f){var d=arguments.length,g=d<3?o:f===null?f=Object.getOwnPropertyDescriptor(o,l):f,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(e,o,l,f);else for(var m=e.length-1;m>=0;m--)(x=e[m])&&(g=(d<3?x(g):d>3?x(o,l,g):x(o,l))||g);return d>3&&g&&Object.defineProperty(o,l,g),g},i=dt&&dt.__param||function(e,o){return function(l,f){o(l,f,e)}};Object.defineProperty(dt,"__esModule",{value:!0}),dt.IntervalSet=void 0;const c=wi(),h=Bs(),p=ke(),a=_r(),r=we(),n=Q(),t=Oe();let s=class Ne{constructor(o){this.readonly=!1,o!=null?this._intervals=o.slice(0):this._intervals=[]}static get COMPLETE_CHAR_SET(){return Ne._COMPLETE_CHAR_SET===void 0&&(Ne._COMPLETE_CHAR_SET=Ne.of(a.Lexer.MIN_CHAR_VALUE,a.Lexer.MAX_CHAR_VALUE),Ne._COMPLETE_CHAR_SET.setReadonly(!0)),Ne._COMPLETE_CHAR_SET}static get EMPTY_SET(){return Ne._EMPTY_SET==null&&(Ne._EMPTY_SET=new Ne,Ne._EMPTY_SET.setReadonly(!0)),Ne._EMPTY_SET}static of(o,l=o){let f=new Ne;return f.add(o,l),f}clear(){if(this.readonly)throw new Error("can't alter readonly IntervalSet");this._intervals.length=0}add(o,l=o){this.addRange(p.Interval.of(o,l))}addRange(o){if(this.readonly)throw new Error("can't alter readonly IntervalSet");if(!(o.b<o.a)){for(let l=0;l<this._intervals.length;l++){let f=this._intervals[l];if(o.equals(f))return;if(o.adjacent(f)||!o.disjoint(f)){let d=o.union(f);for(this._intervals[l]=d;l<this._intervals.length-1;){l++;let g=this._intervals[l];if(!d.adjacent(g)&&d.disjoint(g))break;this._intervals.splice(l,1),l--,this._intervals[l]=d.union(g)}return}if(o.startsBeforeDisjoint(f)){this._intervals.splice(l,0,o);return}}this._intervals.push(o)}}static or(o){let l=new Ne;for(let f of o)l.addAll(f);return l}addAll(o){if(o==null)return this;if(o instanceof Ne){let l=o,f=l._intervals.length;for(let d=0;d<f;d++){let g=l._intervals[d];this.add(g.a,g.b)}}else for(let l of o.toArray())this.add(l);return this}complementRange(o,l){return this.complement(Ne.of(o,l))}complement(o){if(o.isNil)return Ne.EMPTY_SET;let l;return o instanceof Ne?l=o:(l=new Ne,l.addAll(o)),l.subtract(this)}subtract(o){if(o==null||o.isNil)return new Ne(this._intervals);if(o instanceof Ne)return Ne.subtract(this,o);let l=new Ne;return l.addAll(o),Ne.subtract(this,l)}static subtract(o,l){if(o.isNil)return new Ne;let f=new Ne(o._intervals);if(l.isNil)return f;let d=0,g=0;for(;d<f._intervals.length&&g<l._intervals.length;){let x=f._intervals[d],m=l._intervals[g];if(m.b<x.a){g++;continue}if(m.a>x.b){d++;continue}let y,_;if(m.a>x.a&&(y=new p.Interval(x.a,m.a-1)),m.b<x.b&&(_=new p.Interval(m.b+1,x.b)),y)if(_){f._intervals[d]=y,f._intervals.splice(d+1,0,_),d++,g++;continue}else{f._intervals[d]=y,d++;continue}else if(_){f._intervals[d]=_,g++;continue}else{f._intervals.splice(d,1);continue}}return f}or(o){let l=new Ne;return l.addAll(this),l.addAll(o),l}and(o){if(o.isNil)return new Ne;let l=this._intervals,f=o._intervals,d,g=l.length,x=f.length,m=0,y=0;for(;m<g&&y<x;){let _=l[m],v=f[y];_.startsBeforeDisjoint(v)?m++:v.startsBeforeDisjoint(_)?y++:_.properlyContains(v)?(d||(d=new Ne),d.addRange(_.intersection(v)),y++):v.properlyContains(_)?(d||(d=new Ne),d.addRange(_.intersection(v)),m++):_.disjoint(v)||(d||(d=new Ne),d.addRange(_.intersection(v)),_.startsAfterNonDisjoint(v)?y++:v.startsAfterNonDisjoint(_)&&m++)}return d||new Ne}contains(o){let l=this._intervals.length,f=0,d=l-1;for(;f<=d;){let g=f+d>>1,x=this._intervals[g],m=x.a;if(x.b<o)f=g+1;else if(m>o)d=g-1;else return!0}return!1}get isNil(){return this._intervals==null||this._intervals.length===0}get maxElement(){if(this.isNil)throw new RangeError("set is empty");return this._intervals[this._intervals.length-1].b}get minElement(){if(this.isNil)throw new RangeError("set is empty");return this._intervals[0].a}get intervals(){return this._intervals}hashCode(){let o=r.MurmurHash.initialize();for(let l of this._intervals)o=r.MurmurHash.update(o,l.a),o=r.MurmurHash.update(o,l.b);return o=r.MurmurHash.finish(o,this._intervals.length*2),o}equals(o){return o==null||!(o instanceof Ne)?!1:c.ArrayEqualityComparator.INSTANCE.equals(this._intervals,o._intervals)}toString(o=!1){let l="";if(this._intervals==null||this._intervals.length===0)return"{}";this.size>1&&(l+="{");let f=!0;for(let d of this._intervals){f?f=!1:l+=", ";let g=d.a,x=d.b;g===x?g===t.Token.EOF?l+="<EOF>":o?l+="'"+String.fromCodePoint(g)+"'":l+=g:o?l+="'"+String.fromCodePoint(g)+"'..'"+String.fromCodePoint(x)+"'":l+=g+".."+x}return this.size>1&&(l+="}"),l}toStringVocabulary(o){if(this._intervals==null||this._intervals.length===0)return"{}";let l="";this.size>1&&(l+="{");let f=!0;for(let d of this._intervals){f?f=!1:l+=", ";let g=d.a,x=d.b;if(g===x)l+=this.elementName(o,g);else for(let m=g;m<=x;m++)m>g&&(l+=", "),l+=this.elementName(o,m)}return this.size>1&&(l+="}"),l}elementName(o,l){return l===t.Token.EOF?"<EOF>":l===t.Token.EPSILON?"<EPSILON>":o.getDisplayName(l)}get size(){let o=0,l=this._intervals.length;if(l===1){let f=this._intervals[0];return f.b-f.a+1}for(let f=0;f<l;f++){let d=this._intervals[f];o+=d.b-d.a+1}return o}toIntegerList(){let o=new h.IntegerList(this.size),l=this._intervals.length;for(let f=0;f<l;f++){let d=this._intervals[f],g=d.a,x=d.b;for(let m=g;m<=x;m++)o.add(m)}return o}toSet(){let o=new Set;for(let l of this._intervals){let f=l.a,d=l.b;for(let g=f;g<=d;g++)o.add(g)}return o}toArray(){let o=new Array,l=this._intervals.length;for(let f=0;f<l;f++){let d=this._intervals[f],g=d.a,x=d.b;for(let m=g;m<=x;m++)o.push(m)}return o}remove(o){if(this.readonly)throw new Error("can't alter readonly IntervalSet");let l=this._intervals.length;for(let f=0;f<l;f++){let d=this._intervals[f],g=d.a,x=d.b;if(o<g)break;if(o===g&&o===x){this._intervals.splice(f,1);break}if(o===g){this._intervals[f]=p.Interval.of(d.a+1,d.b);break}if(o===x){this._intervals[f]=p.Interval.of(d.a,d.b-1);break}if(o>g&&o<x){let m=d.b;this._intervals[f]=p.Interval.of(d.a,o-1),this.add(o+1,m)}}}get isReadonly(){return this.readonly}setReadonly(o){if(this.readonly&&!o)throw new Error("can't alter readonly IntervalSet");this.readonly=o}};return u([n.Override],s.prototype,"addAll",null),u([n.Override],s.prototype,"complement",null),u([n.Override],s.prototype,"subtract",null),u([n.Override],s.prototype,"or",null),u([n.Override],s.prototype,"and",null),u([n.Override],s.prototype,"contains",null),u([n.Override],s.prototype,"isNil",null),u([n.Override],s.prototype,"hashCode",null),u([n.Override],s.prototype,"equals",null),u([i(0,n.NotNull)],s.prototype,"toStringVocabulary",null),u([n.NotNull,i(0,n.NotNull)],s.prototype,"elementName",null),u([n.Override],s.prototype,"size",null),u([n.Override],s.prototype,"remove",null),u([n.NotNull],s,"of",null),u([n.NotNull],s,"subtract",null),dt.IntervalSet=s,dt}var Xr={},Ze={},Kr={},Rc;function Pc(){if(Rc)return Kr;Rc=1;/*!
|
|
264
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
265
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
266
|
-
*/var u=Kr&&Kr.__decorate||function(h,p,a,r){var n=arguments.length,t=n<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,a):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(h,p,a,r);else for(var e=h.length-1;e>=0;e--)(s=h[e])&&(t=(n<3?s(t):n>3?s(p,a,t):s(p,a))||t);return n>3&&t&&Object.defineProperty(p,a,t),t};Object.defineProperty(Kr,"__esModule",{value:!0}),Kr.ATNDeserializationOptions=void 0;const i=Q();let c=class qn{constructor(p){this.readOnly=!1,p?(this.verifyATN=p.verifyATN,this.generateRuleBypassTransitions=p.generateRuleBypassTransitions,this.optimize=p.optimize):(this.verifyATN=!0,this.generateRuleBypassTransitions=!1,this.optimize=!0)}static get defaultOptions(){return qn._defaultOptions==null&&(qn._defaultOptions=new qn,qn._defaultOptions.makeReadOnly()),qn._defaultOptions}get isReadOnly(){return this.readOnly}makeReadOnly(){this.readOnly=!0}get isVerifyATN(){return this.verifyATN}set isVerifyATN(p){this.throwIfReadOnly(),this.verifyATN=p}get isGenerateRuleBypassTransitions(){return this.generateRuleBypassTransitions}set isGenerateRuleBypassTransitions(p){this.throwIfReadOnly(),this.generateRuleBypassTransitions=p}get isOptimize(){return this.optimize}set isOptimize(p){this.throwIfReadOnly(),this.optimize=p}throwIfReadOnly(){if(this.isReadOnly)throw new Error("The object is read only.")}};return u([i.NotNull],c,"defaultOptions",null),Kr.ATNDeserializationOptions=c,Kr}var Pt={},Dt={},Dc;function Ic(){if(Dc)return Dt;Dc=1;/*!
|
|
267
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
268
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
269
|
-
*/var u=Dt&&Dt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Dt&&Dt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.ActionTransition=void 0;const c=Q(),h=dr();let p=class extends h.Transition{constructor(r,n,t=-1,s=!1){super(r),this.ruleIndex=n,this.actionIndex=t,this.isCtxDependent=s}get serializationType(){return 6}get isEpsilon(){return!0}matches(r,n,t){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}};return u([c.Override],p.prototype,"serializationType",null),u([c.Override],p.prototype,"isEpsilon",null),u([c.Override],p.prototype,"matches",null),u([c.Override],p.prototype,"toString",null),p=u([i(0,c.NotNull)],p),Dt.ActionTransition=p,Dt}var It={},wc;function Lc(){if(wc)return It;wc=1;/*!
|
|
270
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
271
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
272
|
-
*/var u=It&&It.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=It&&It.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(It,"__esModule",{value:!0}),It.AtomTransition=void 0;const c=Gr(),h=Q(),p=dr();let a=class extends p.Transition{constructor(n,t){super(n),this._label=t}get serializationType(){return 5}get label(){return c.IntervalSet.of(this._label)}matches(n,t,s){return this._label===n}toString(){return String(this.label)}};return u([h.Override],a.prototype,"serializationType",null),u([h.Override,h.NotNull],a.prototype,"label",null),u([h.Override],a.prototype,"matches",null),u([h.Override,h.NotNull],a.prototype,"toString",null),a=u([i(0,h.NotNull)],a),It.AtomTransition=a,It}var Yr={},ni={},Fc;function Ui(){if(Fc)return ni;Fc=1;/*!
|
|
273
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
274
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
275
|
-
*/Object.defineProperty(ni,"__esModule",{value:!0}),ni.BlockStartState=void 0;const u=Fr();let i=class extends u.DecisionState{};return ni.BlockStartState=i,ni}var Bc;function g0(){if(Bc)return Yr;Bc=1;/*!
|
|
276
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
277
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
278
|
-
*/var u=Yr&&Yr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.BasicBlockStartState=void 0;const i=Fe(),c=Ui(),h=Q();let p=class extends c.BlockStartState{get stateType(){return i.ATNStateType.BLOCK_START}};return u([h.Override],p.prototype,"stateType",null),Yr.BasicBlockStartState=p,Yr}var Qr={},jc;function v0(){if(jc)return Qr;jc=1;/*!
|
|
279
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
280
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
281
|
-
*/var u=Qr&&Qr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Qr,"__esModule",{value:!0}),Qr.BlockEndState=void 0;const i=ut(),c=Fe(),h=Q();let p=class extends i.ATNState{get stateType(){return c.ATNStateType.BLOCK_END}};return u([h.Override],p.prototype,"stateType",null),Qr.BlockEndState=p,Qr}var wt={},Mc;function A0(){if(Mc)return wt;Mc=1;/*!
|
|
282
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
283
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
284
|
-
*/var u=wt&&wt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=wt&&wt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(wt,"__esModule",{value:!0}),wt.EpsilonTransition=void 0;const c=Q(),h=dr();let p=class extends h.Transition{constructor(r,n=-1){super(r),this._outermostPrecedenceReturn=n}get outermostPrecedenceReturn(){return this._outermostPrecedenceReturn}get serializationType(){return 1}get isEpsilon(){return!0}matches(r,n,t){return!1}toString(){return"epsilon"}};return u([c.Override],p.prototype,"serializationType",null),u([c.Override],p.prototype,"isEpsilon",null),u([c.Override],p.prototype,"matches",null),u([c.Override,c.NotNull],p.prototype,"toString",null),p=u([i(0,c.NotNull)],p),wt.EpsilonTransition=p,wt}var Lt={},qc;function T0(){if(qc)return Lt;qc=1;/*!
|
|
285
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
286
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
287
|
-
*/var u=Lt&&Lt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Lt&&Lt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.LexerChannelAction=void 0;const c=we(),h=Q();let p=class lp{constructor(r){this._channel=r}get channel(){return this._channel}get actionType(){return 0}get isPositionDependent(){return!1}execute(r){r.channel=this._channel}hashCode(){let r=c.MurmurHash.initialize();return r=c.MurmurHash.update(r,this.actionType),r=c.MurmurHash.update(r,this._channel),c.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof lp?this._channel===r._channel:!1}toString(){return`channel(${this._channel})`}};return u([h.Override],p.prototype,"actionType",null),u([h.Override],p.prototype,"isPositionDependent",null),u([h.Override,i(0,h.NotNull)],p.prototype,"execute",null),u([h.Override],p.prototype,"hashCode",null),u([h.Override],p.prototype,"equals",null),u([h.Override],p.prototype,"toString",null),Lt.LexerChannelAction=p,Lt}var Ft={},kc;function E0(){if(kc)return Ft;kc=1;/*!
|
|
288
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
289
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
290
|
-
*/var u=Ft&&Ft.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Ft&&Ft.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.LexerCustomAction=void 0;const c=we(),h=Q();let p=class cp{constructor(r,n){this._ruleIndex=r,this._actionIndex=n}get ruleIndex(){return this._ruleIndex}get actionIndex(){return this._actionIndex}get actionType(){return 1}get isPositionDependent(){return!0}execute(r){r.action(void 0,this._ruleIndex,this._actionIndex)}hashCode(){let r=c.MurmurHash.initialize();return r=c.MurmurHash.update(r,this.actionType),r=c.MurmurHash.update(r,this._ruleIndex),r=c.MurmurHash.update(r,this._actionIndex),c.MurmurHash.finish(r,3)}equals(r){return r===this?!0:r instanceof cp?this._ruleIndex===r._ruleIndex&&this._actionIndex===r._actionIndex:!1}};return u([h.Override],p.prototype,"actionType",null),u([h.Override],p.prototype,"isPositionDependent",null),u([h.Override,i(0,h.NotNull)],p.prototype,"execute",null),u([h.Override],p.prototype,"hashCode",null),u([h.Override],p.prototype,"equals",null),Ft.LexerCustomAction=p,Ft}var Bt={},Uc;function S0(){if(Uc)return Bt;Uc=1;/*!
|
|
291
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
292
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
293
|
-
*/var u=Bt&&Bt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Bt&&Bt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.LexerModeAction=void 0;const c=we(),h=Q();let p=class fp{constructor(r){this._mode=r}get mode(){return this._mode}get actionType(){return 2}get isPositionDependent(){return!1}execute(r){r.mode(this._mode)}hashCode(){let r=c.MurmurHash.initialize();return r=c.MurmurHash.update(r,this.actionType),r=c.MurmurHash.update(r,this._mode),c.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof fp?this._mode===r._mode:!1}toString(){return`mode(${this._mode})`}};return u([h.Override],p.prototype,"actionType",null),u([h.Override],p.prototype,"isPositionDependent",null),u([h.Override,i(0,h.NotNull)],p.prototype,"execute",null),u([h.Override],p.prototype,"hashCode",null),u([h.Override],p.prototype,"equals",null),u([h.Override],p.prototype,"toString",null),Bt.LexerModeAction=p,Bt}var Jr={},zc;function N0(){return zc||(zc=1,function(u){/*!
|
|
294
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
295
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
296
|
-
*/var i=Jr&&Jr.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},c=Jr&&Jr.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(u,"__esModule",{value:!0}),u.LexerMoreAction=void 0;const h=we(),p=Q();let a=class{constructor(){}get actionType(){return 3}get isPositionDependent(){return!1}execute(n){n.more()}hashCode(){let n=h.MurmurHash.initialize();return n=h.MurmurHash.update(n,this.actionType),h.MurmurHash.finish(n,1)}equals(n){return n===this}toString(){return"more"}};i([p.Override],a.prototype,"actionType",null),i([p.Override],a.prototype,"isPositionDependent",null),i([p.Override,c(0,p.NotNull)],a.prototype,"execute",null),i([p.Override],a.prototype,"hashCode",null),i([p.Override],a.prototype,"equals",null),i([p.Override],a.prototype,"toString",null),u.LexerMoreAction=a,function(r){r.INSTANCE=new r}(a=u.LexerMoreAction||(u.LexerMoreAction={}))}(Jr)),Jr}var Zr={},Hc;function b0(){return Hc||(Hc=1,function(u){/*!
|
|
297
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
298
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
299
|
-
*/var i=Zr&&Zr.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},c=Zr&&Zr.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(u,"__esModule",{value:!0}),u.LexerPopModeAction=void 0;const h=we(),p=Q();let a=class{constructor(){}get actionType(){return 4}get isPositionDependent(){return!1}execute(n){n.popMode()}hashCode(){let n=h.MurmurHash.initialize();return n=h.MurmurHash.update(n,this.actionType),h.MurmurHash.finish(n,1)}equals(n){return n===this}toString(){return"popMode"}};i([p.Override],a.prototype,"actionType",null),i([p.Override],a.prototype,"isPositionDependent",null),i([p.Override,c(0,p.NotNull)],a.prototype,"execute",null),i([p.Override],a.prototype,"hashCode",null),i([p.Override],a.prototype,"equals",null),i([p.Override],a.prototype,"toString",null),u.LexerPopModeAction=a,function(r){r.INSTANCE=new r}(a=u.LexerPopModeAction||(u.LexerPopModeAction={}))}(Zr)),Zr}var jt={},$c;function C0(){if($c)return jt;$c=1;/*!
|
|
300
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
301
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
302
|
-
*/var u=jt&&jt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=jt&&jt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(jt,"__esModule",{value:!0}),jt.LexerPushModeAction=void 0;const c=we(),h=Q();let p=class hp{constructor(r){this._mode=r}get mode(){return this._mode}get actionType(){return 5}get isPositionDependent(){return!1}execute(r){r.pushMode(this._mode)}hashCode(){let r=c.MurmurHash.initialize();return r=c.MurmurHash.update(r,this.actionType),r=c.MurmurHash.update(r,this._mode),c.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof hp?this._mode===r._mode:!1}toString(){return`pushMode(${this._mode})`}};return u([h.Override],p.prototype,"actionType",null),u([h.Override],p.prototype,"isPositionDependent",null),u([h.Override,i(0,h.NotNull)],p.prototype,"execute",null),u([h.Override],p.prototype,"hashCode",null),u([h.Override],p.prototype,"equals",null),u([h.Override],p.prototype,"toString",null),jt.LexerPushModeAction=p,jt}var en={},Vc;function O0(){return Vc||(Vc=1,function(u){/*!
|
|
303
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
304
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
305
|
-
*/var i=en&&en.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},c=en&&en.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(u,"__esModule",{value:!0}),u.LexerSkipAction=void 0;const h=we(),p=Q();let a=class{constructor(){}get actionType(){return 6}get isPositionDependent(){return!1}execute(n){n.skip()}hashCode(){let n=h.MurmurHash.initialize();return n=h.MurmurHash.update(n,this.actionType),h.MurmurHash.finish(n,1)}equals(n){return n===this}toString(){return"skip"}};i([p.Override],a.prototype,"actionType",null),i([p.Override],a.prototype,"isPositionDependent",null),i([p.Override,c(0,p.NotNull)],a.prototype,"execute",null),i([p.Override],a.prototype,"hashCode",null),i([p.Override],a.prototype,"equals",null),i([p.Override],a.prototype,"toString",null),u.LexerSkipAction=a,function(r){r.INSTANCE=new r}(a=u.LexerSkipAction||(u.LexerSkipAction={}))}(en)),en}var Mt={},Wc;function R0(){if(Wc)return Mt;Wc=1;/*!
|
|
306
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
307
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
308
|
-
*/var u=Mt&&Mt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Mt&&Mt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.LexerTypeAction=void 0;const c=we(),h=Q();let p=class pp{constructor(r){this._type=r}get type(){return this._type}get actionType(){return 7}get isPositionDependent(){return!1}execute(r){r.type=this._type}hashCode(){let r=c.MurmurHash.initialize();return r=c.MurmurHash.update(r,this.actionType),r=c.MurmurHash.update(r,this._type),c.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof pp?this._type===r._type:!1}toString(){return`type(${this._type})`}};return u([h.Override],p.prototype,"actionType",null),u([h.Override],p.prototype,"isPositionDependent",null),u([h.Override,i(0,h.NotNull)],p.prototype,"execute",null),u([h.Override],p.prototype,"hashCode",null),u([h.Override],p.prototype,"equals",null),u([h.Override],p.prototype,"toString",null),Mt.LexerTypeAction=p,Mt}var tn={},Gc;function Xc(){if(Gc)return tn;Gc=1;/*!
|
|
309
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
310
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
311
|
-
*/var u=tn&&tn.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(tn,"__esModule",{value:!0}),tn.LoopEndState=void 0;const i=ut(),c=Fe(),h=Q();let p=class extends i.ATNState{get stateType(){return c.ATNStateType.LOOP_END}};return u([h.Override],p.prototype,"stateType",null),tn.LoopEndState=p,tn}var qt={},rn={},Kc;function P0(){if(Kc)return rn;Kc=1;/*!
|
|
312
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
313
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
314
|
-
*/var u=rn&&rn.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(rn,"__esModule",{value:!0}),rn.ConflictInfo=void 0;const i=Q(),c=ht();let h=class dp{constructor(a,r){this._conflictedAlts=a,this.exact=r}get conflictedAlts(){return this._conflictedAlts}get isExact(){return this.exact}equals(a){return a===this?!0:a instanceof dp?this.isExact===a.isExact&&c.equals(this.conflictedAlts,a.conflictedAlts):!1}hashCode(){return this.conflictedAlts.hashCode()}};return u([i.Override],h.prototype,"equals",null),u([i.Override],h.prototype,"hashCode",null),rn.ConflictInfo=h,rn}var nn={},on={},sn={},Yc;function mr(){if(Yc)return sn;Yc=1;/*!
|
|
315
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
316
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
317
|
-
*/var u=sn&&sn.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(sn,"__esModule",{value:!0}),sn.TerminalNode=void 0;const i=ke(),c=Q(),h=Oe();let p=class{constructor(r){this._symbol=r}getChild(r){throw new RangeError("Terminal Node has no children.")}get symbol(){return this._symbol}get parent(){return this._parent}setParent(r){this._parent=r}get payload(){return this._symbol}get sourceInterval(){let r=this._symbol.tokenIndex;return new i.Interval(r,r)}get childCount(){return 0}accept(r){return r.visitTerminal(this)}get text(){return this._symbol.text||""}toStringTree(r){return this.toString()}toString(){return this._symbol.type===h.Token.EOF?"<EOF>":this._symbol.text||""}};return u([c.Override],p.prototype,"getChild",null),u([c.Override],p.prototype,"parent",null),u([c.Override],p.prototype,"setParent",null),u([c.Override],p.prototype,"payload",null),u([c.Override],p.prototype,"sourceInterval",null),u([c.Override],p.prototype,"childCount",null),u([c.Override],p.prototype,"accept",null),u([c.Override],p.prototype,"text",null),u([c.Override],p.prototype,"toStringTree",null),u([c.Override],p.prototype,"toString",null),sn.TerminalNode=p,sn}var Qc;function ii(){if(Qc)return on;Qc=1;/*!
|
|
318
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
319
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
320
|
-
*/var u=on&&on.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(on,"__esModule",{value:!0}),on.ErrorNode=void 0;const i=Q(),c=mr();let h=class extends c.TerminalNode{constructor(a){super(a)}accept(a){return a.visitErrorNode(this)}};return u([i.Override],h.prototype,"accept",null),on.ErrorNode=h,on}var un={},oi={},Jc;function si(){if(Jc)return oi;Jc=1;/*!
|
|
321
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
322
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
323
|
-
*/Object.defineProperty(oi,"__esModule",{value:!0}),oi.RuleNode=void 0;let u=class{};return oi.RuleNode=u,oi}var kt={},Zc;function gr(){if(Zc)return kt;Zc=1;/*!
|
|
324
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
325
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
326
|
-
*/var u=kt&&kt.__decorate||function(f,d,g,x){var m=arguments.length,y=m<3?d:x===null?x=Object.getOwnPropertyDescriptor(d,g):x,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(f,d,g,x);else for(var v=f.length-1;v>=0;v--)(_=f[v])&&(y=(m<3?_(y):m>3?_(d,g,y):_(d,g))||y);return m>3&&y&&Object.defineProperty(d,g,y),y},i=kt&&kt.__param||function(f,d){return function(g,x){d(g,x,f)}};Object.defineProperty(kt,"__esModule",{value:!0}),kt.Trees=void 0;const c=bt(),h=Wn(),p=ii(),a=Q(),r=yi(),n=et(),t=si(),s=mr(),e=Oe(),o=ht();let l=class Ar{static toStringTree(d,g){let x;g instanceof r.Parser?x=g.ruleNames:x=g;let m=o.escapeWhitespace(this.getNodeText(d,x),!1);if(d.childCount===0)return m;let y="";y+="(",m=o.escapeWhitespace(this.getNodeText(d,x),!1),y+=m,y+=" ";for(let _=0;_<d.childCount;_++)_>0&&(y+=" "),y+=this.toStringTree(d.getChild(_),x);return y+=")",y}static getNodeText(d,g){let x;if(g instanceof r.Parser)x=g.ruleNames;else if(g)x=g;else{let m=d.payload;return typeof m.text=="string"?m.text:d.payload.toString()}if(d instanceof t.RuleNode){let m=d.ruleContext,y=m.ruleIndex,_=x[y],v=m.altNumber;return v!==c.ATN.INVALID_ALT_NUMBER?_+":"+v:_}else{if(d instanceof p.ErrorNode)return d.toString();if(d instanceof s.TerminalNode)return d.symbol.text||""}throw new TypeError("Unexpected node type")}static getChildren(d){let g=[];for(let x=0;x<d.childCount;x++)g.push(d.getChild(x));return g}static getAncestors(d){let g=[],x=d.parent;for(;x;)g.unshift(x),x=x.parent;return g}static isAncestorOf(d,g){if(!d||!g||!d.parent)return!1;let x=g.parent;for(;x;){if(d===x)return!0;x=x.parent}return!1}static findAllTokenNodes(d,g){return Ar.findAllNodes(d,g,!0)}static findAllRuleNodes(d,g){return Ar.findAllNodes(d,g,!1)}static findAllNodes(d,g,x){let m=[];return Ar._findAllNodes(d,g,x,m),m}static _findAllNodes(d,g,x,m){x&&d instanceof s.TerminalNode?d.symbol.type===g&&m.push(d):!x&&d instanceof n.ParserRuleContext&&d.ruleIndex===g&&m.push(d);for(let y=0;y<d.childCount;y++)Ar._findAllNodes(d.getChild(y),g,x,m)}static getDescendants(d){let g=[];function x(m){g.push(m);const y=m.childCount;for(let _=0;_<y;_++)x(m.getChild(_))}return x(d),g}static getRootOfSubtreeEnclosingRegion(d,g,x){let m=d.childCount;for(let y=0;y<m;y++){let _=d.getChild(y),v=Ar.getRootOfSubtreeEnclosingRegion(_,g,x);if(v)return v}if(d instanceof n.ParserRuleContext){let y=d.stop;if(g>=d.start.tokenIndex&&(y==null||x<=y.tokenIndex))return d}}static stripChildrenOutOfRange(d,g,x,m){if(!d)return;let y=d.childCount;for(let _=0;_<y;_++){let v=d.getChild(_),N=v.sourceInterval;if(v instanceof n.ParserRuleContext&&(N.b<x||N.a>m)&&Ar.isAncestorOf(v,g)){let T=new h.CommonToken(e.Token.INVALID_TYPE,"...");d.children[_]=new s.TerminalNode(T)}}}static findNodeSuchThat(d,g){if(g(d))return d;let x=d.childCount;for(let m=0;m<x;m++){let y=Ar.findNodeSuchThat(d.getChild(m),g);if(y!==void 0)return y}}};return u([i(0,a.NotNull)],l,"toStringTree",null),u([a.NotNull,i(0,a.NotNull)],l,"getAncestors",null),u([i(0,a.NotNull)],l,"getRootOfSubtreeEnclosingRegion",null),kt.Trees=l,kt}var ef;function tf(){if(ef)return un;ef=1;/*!
|
|
327
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
328
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
329
|
-
*/var u=un&&un.__decorate||function(s,e,o,l){var f=arguments.length,d=f<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,o):l,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(s,e,o,l);else for(var x=s.length-1;x>=0;x--)(g=s[x])&&(d=(f<3?g(d):f>3?g(e,o,d):g(e,o))||d);return f>3&&d&&Object.defineProperty(e,o,d),d};Object.defineProperty(un,"__esModule",{value:!0}),un.RuleContext=void 0;const i=bt(),c=ti(),h=si(),p=ke(),a=Q(),r=gr(),n=et();let t=class xp extends h.RuleNode{constructor(e,o){super(),this._parent=e,this.invokingState=o??-1}static getChildContext(e,o){return new xp(e,o)}depth(){let e=0,o=this;for(;o;)o=o._parent,e++;return e}get isEmpty(){return this.invokingState===-1}get sourceInterval(){return p.Interval.INVALID}get ruleContext(){return this}get parent(){return this._parent}setParent(e){this._parent=e}get payload(){return this}get text(){if(this.childCount===0)return"";let e="";for(let o=0;o<this.childCount;o++)e+=this.getChild(o).text;return e.toString()}get ruleIndex(){return-1}get altNumber(){return i.ATN.INVALID_ALT_NUMBER}set altNumber(e){}getChild(e){throw new RangeError("i must be greater than or equal to 0 and less than childCount")}get childCount(){return 0}accept(e){return e.visitChildren(this)}toStringTree(e){return r.Trees.toStringTree(this,e)}toString(e,o){const l=e instanceof c.Recognizer?e.ruleNames:e;o=o||n.ParserRuleContext.emptyContext();let f="",d=this;for(f+="[";d&&d!==o;){if(!l)d.isEmpty||(f+=d.invokingState);else{let g=d.ruleIndex,x=g>=0&&g<l.length?l[g]:g.toString();f+=x}d._parent&&(l||!d._parent.isEmpty)&&(f+=" "),d=d._parent}return f+="]",f.toString()}};return u([a.Override],t.prototype,"sourceInterval",null),u([a.Override],t.prototype,"ruleContext",null),u([a.Override],t.prototype,"parent",null),u([a.Override],t.prototype,"setParent",null),u([a.Override],t.prototype,"payload",null),u([a.Override],t.prototype,"text",null),u([a.Override],t.prototype,"getChild",null),u([a.Override],t.prototype,"childCount",null),u([a.Override],t.prototype,"accept",null),u([a.Override],t.prototype,"toStringTree",null),un.RuleContext=t,un}var rf;function et(){if(rf)return nn;rf=1;/*!
|
|
330
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
331
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
332
|
-
*/var u=nn&&nn.__decorate||function(n,t,s,e){var o=arguments.length,l=o<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,t,s,e);else for(var d=n.length-1;d>=0;d--)(f=n[d])&&(l=(o<3?f(l):o>3?f(t,s,l):f(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l};Object.defineProperty(nn,"__esModule",{value:!0}),nn.ParserRuleContext=void 0;const i=ii(),c=ke(),h=Q(),p=tf(),a=mr();let r=class Nu extends p.RuleContext{constructor(t,s){s==null?super():super(t,s)}static emptyContext(){return Nu.EMPTY}copyFrom(t){if(this._parent=t._parent,this.invokingState=t.invokingState,this._start=t._start,this._stop=t._stop,t.children){this.children=[];for(let s of t.children)s instanceof i.ErrorNode&&this.addChild(s)}}enterRule(t){}exitRule(t){}addAnyChild(t){return this.children?this.children.push(t):this.children=[t],t}addChild(t){if(t instanceof a.TerminalNode){t.setParent(this),this.addAnyChild(t);return}else if(t instanceof p.RuleContext){this.addAnyChild(t);return}else return t=new a.TerminalNode(t),this.addAnyChild(t),t.setParent(this),t}addErrorNode(t){if(t instanceof i.ErrorNode){const s=t;return s.setParent(this),this.addAnyChild(s)}else{const s=t;let e=new i.ErrorNode(s);return this.addAnyChild(e),e.setParent(this),e}}removeLastChild(){this.children&&this.children.pop()}get parent(){let t=super.parent;if(t===void 0||t instanceof Nu)return t;throw new TypeError("Invalid parent type for ParserRuleContext")}getChild(t,s){if(!this.children||t<0||t>=this.children.length)throw new RangeError("index parameter must be between >= 0 and <= number of children.");if(s==null)return this.children[t];let e=this.tryGetChild(t,s);if(e===void 0)throw new Error("The specified node does not exist");return e}tryGetChild(t,s){if(!this.children||t<0||t>=this.children.length)return;let e=-1;for(let o of this.children)if(o instanceof s&&(e++,e===t))return o}getToken(t,s){let e=this.tryGetToken(t,s);if(e===void 0)throw new Error("The specified token does not exist");return e}tryGetToken(t,s){if(!this.children||s<0||s>=this.children.length)return;let e=-1;for(let o of this.children)if(o instanceof a.TerminalNode&&o.symbol.type===t&&(e++,e===s))return o}getTokens(t){let s=[];if(!this.children)return s;for(let e of this.children)e instanceof a.TerminalNode&&e.symbol.type===t&&s.push(e);return s}get ruleContext(){return this}getRuleContext(t,s){return this.getChild(t,s)}tryGetRuleContext(t,s){return this.tryGetChild(t,s)}getRuleContexts(t){let s=[];if(!this.children)return s;for(let e of this.children)e instanceof t&&s.push(e);return s}get childCount(){return this.children?this.children.length:0}get sourceInterval(){return this._start?!this._stop||this._stop.tokenIndex<this._start.tokenIndex?c.Interval.of(this._start.tokenIndex,this._start.tokenIndex-1):c.Interval.of(this._start.tokenIndex,this._stop.tokenIndex):c.Interval.INVALID}get start(){return this._start}get stop(){return this._stop}toInfoString(t){return"ParserRuleContext"+t.getRuleInvocationStack(this).reverse()+"{start="+this._start+", stop="+this._stop+"}"}};return r.EMPTY=new r,u([h.Override],r.prototype,"parent",null),u([h.Override],r.prototype,"childCount",null),u([h.Override],r.prototype,"sourceInterval",null),nn.ParserRuleContext=r,nn}var ui={},nf;function D0(){return nf||(nf=1,function(u){/*!
|
|
333
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
334
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
335
|
-
*/var i=ui&&ui.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(u,"__esModule",{value:!0}),u.PredictionMode=void 0;const c=jn(),h=we(),p=Q(),a=ri();(function(r){r[r.SLL=0]="SLL",r[r.LL=1]="LL",r[r.LL_EXACT_AMBIG_DETECTION=2]="LL_EXACT_AMBIG_DETECTION"})(u.PredictionMode||(u.PredictionMode={})),function(r){class n extends c.Array2DHashMap{constructor(){super(t.INSTANCE)}}class t{AltAndContextConfigEqualityComparator(){}hashCode(l){let f=h.MurmurHash.initialize(7);return f=h.MurmurHash.update(f,l.state.stateNumber),f=h.MurmurHash.update(f,l.context),f=h.MurmurHash.finish(f,2),f}equals(l,f){return l===f?!0:l==null||f==null?!1:l.state.stateNumber===f.state.stateNumber&&l.context.equals(f.context)}}t.INSTANCE=new t,i([p.Override],t.prototype,"hashCode",null),i([p.Override],t.prototype,"equals",null);function s(o){for(let l of o)if(l.state instanceof a.RuleStopState)return!0;return!1}r.hasConfigInRuleStopState=s;function e(o){for(let l of o)if(!(l.state instanceof a.RuleStopState))return!1;return!0}r.allConfigsInRuleStopStates=e}(u.PredictionMode||(u.PredictionMode={}))}(ui)),ui}var Ut={},of;function sf(){if(of)return Ut;of=1;/*!
|
|
336
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
337
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
338
|
-
*/var u=Ut&&Ut.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Ut&&Ut.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.SimulatorState=void 0;const c=Q(),h=et();let p=class{constructor(r,n,t,s){this.outerContext=r??h.ParserRuleContext.emptyContext(),this.s0=n,this.useContext=t,this.remainingOuterContext=s}};return p=u([i(1,c.NotNull)],p),Ut.SimulatorState=p,Ut}var uf;function ai(){if(uf)return qt;uf=1;/*!
|
|
339
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
340
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
341
|
-
*/var u=qt&&qt.__decorate||function(B,E,A,S){var C=arguments.length,P=C<3?E:S===null?S=Object.getOwnPropertyDescriptor(E,A):S,R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(B,E,A,S);else for(var I=B.length-1;I>=0;I--)(R=B[I])&&(P=(C<3?R(P):C>3?R(E,A,P):R(E,A))||P);return C>3&&P&&Object.defineProperty(E,A,P),P},i=qt&&qt.__param||function(B,E){return function(A,S){E(A,S,B)}};Object.defineProperty(qt,"__esModule",{value:!0}),qt.ParserATNSimulator=void 0;const c=Hl(),h=Ic(),p=xr(),a=Fs(),r=bt(),n=Bi(),t=Zn(),s=Mi(),e=Fe(),o=Lc(),l=yr(),f=P0(),d=Fr(),g=ji(),x=Bs(),m=ke(),y=hr(),_=Q(),v=Hs(),N=zi(),T=nt(),b=et(),O=Je(),D=qs(),k=D0(),z=ri(),U=$s(),re=Bn(),oe=zs(),se=sf(),de=Oe(),be=Ur(),fe=Me(),Z=65535,te=-2147483648;let J=class me extends s.ATNSimulator{constructor(E,A){super(E),this.predictionMode=k.PredictionMode.LL,this.force_global_context=!1,this.always_try_local_context=!0,this.enable_global_context_dfa=!1,this.optimize_unique_closure=!0,this.optimize_ll1=!0,this.optimize_tail_calls=!0,this.tail_call_preserves_sll=!0,this.treat_sllk1_conflict_as_ambiguity=!1,this.reportAmbiguities=!1,this.userWantsCtxSensitive=!0,this._parser=A}getPredictionMode(){return this.predictionMode}setPredictionMode(E){this.predictionMode=E}reset(){}adaptivePredict(E,A,S,C){C===void 0&&(C=!1);let P=this.atn.decisionToDFA[A];if(fe(P!=null),this.optimize_ll1&&!P.isPrecedenceDfa&&!P.isEmpty){let V=E.LA(1);if(V>=0&&V<=65535){let W=(A<<16>>>0)+V,w=this.atn.LL1Table.get(W);if(w!=null)return w}}this.dfa=P,this.force_global_context?C=!0:this.always_try_local_context||(C=C||P.isContextSensitive),this.userWantsCtxSensitive=C||this.predictionMode!==k.PredictionMode.SLL&&S!=null&&!this.atn.decisionToState[A].sll,S==null&&(S=b.ParserRuleContext.emptyContext());let R;P.isEmpty||(R=this.getStartState(P,E,S,C)),R==null&&(S==null&&(S=b.ParserRuleContext.emptyContext()),me.debug&&console.log("ATN decision "+P.decision+" exec LA(1)=="+this.getLookaheadName(E)+", outerContext="+S.toString(this._parser)),R=this.computeStartState(P,S,C));let I=E.mark(),M=E.index;try{let V=this.execDFA(P,E,M,R);return me.debug&&console.log("DFA after predictATN: "+P.toString(this._parser.vocabulary,this._parser.ruleNames)),V}finally{this.dfa=void 0,E.seek(M),E.release(I)}}getStartState(E,A,S,C){if(!C)if(E.isPrecedenceDfa){let I=E.getPrecedenceStartState(this._parser.precedence,!1);return I==null?void 0:new se.SimulatorState(S,I,!1,S)}else return E.s0==null?void 0:new se.SimulatorState(S,E.s0,!1,S);if(!this.enable_global_context_dfa)return;let P=S;fe(S!=null);let R;for(E.isPrecedenceDfa?R=E.getPrecedenceStartState(this._parser.precedence,!0):R=E.s0full;P!=null&&R!=null&&R.isContextSensitive;)P=this.skipTailCalls(P),R=R.getContextTarget(this.getReturnState(P)),P.isEmpty?fe(R==null||!R.isContextSensitive):P=P.parent;if(R!=null)return new se.SimulatorState(S,R,C,P)}execDFA(E,A,S,C){let P=C.outerContext;me.dfa_debug&&console.log("DFA decision "+E.decision+" exec LA(1)=="+this.getLookaheadName(A)+", outerContext="+P.toString(this._parser)),me.dfa_debug&&console.log(E.toString(this._parser.vocabulary,this._parser.ruleNames));let R=C.s0,I=A.LA(1),M=C.remainingOuterContext;for(;;){if(me.dfa_debug&&console.log("DFA state "+R.stateNumber+" LA(1)=="+this.getLookaheadName(A)),C.useContext)for(;R.isContextSymbol(I);){let w;if(M!=null&&(M=this.skipTailCalls(M),w=R.getContextTarget(this.getReturnState(M))),w==null){let L=new se.SimulatorState(C.outerContext,R,C.useContext,M);return this.execATN(E,A,S,L)}fe(M!=null),M=M.parent,R=w}if(this.isAcceptState(R,C.useContext)){R.predicates!=null?me.dfa_debug&&console.log("accept "+R):me.dfa_debug&&console.log("accept; predict "+R.prediction+" in state "+R.stateNumber);break}fe(!this.isAcceptState(R,C.useContext));let W=this.getExistingTargetState(R,I);if(W==null){me.dfa_debug&&I>=0&&console.log("no edge for "+this._parser.vocabulary.getDisplayName(I));let w;if(me.dfa_debug){let H=m.Interval.of(S,this._parser.inputStream.index);console.log("ATN exec upon "+this._parser.inputStream.getText(H)+" at DFA state "+R.stateNumber)}let L=new se.SimulatorState(P,R,C.useContext,M);return w=this.execATN(E,A,S,L),me.dfa_debug&&console.log("back from DFA update, alt="+w+`, dfa=
|
|
342
|
-
`+E.toString(this._parser.vocabulary,this._parser.ruleNames)),me.dfa_debug&&console.log("DFA decision "+E.decision+" predicts "+w),w}else if(W===s.ATNSimulator.ERROR){let w=new se.SimulatorState(P,R,C.useContext,M);return this.handleNoViableAlt(A,S,w)}R=W,!this.isAcceptState(R,C.useContext)&&I!==y.IntStream.EOF&&(A.consume(),I=A.LA(1))}if(!C.useContext&&R.configs.conflictInfo!=null&&E.atnStartState instanceof d.DecisionState&&!(!this.userWantsCtxSensitive||!R.configs.dipsIntoOuterContext&&R.configs.isExactConflict||this.treat_sllk1_conflict_as_ambiguity&&A.index===S)){fe(!C.useContext);let W,w=R.predicates;if(w!=null){let L=A.index;if(L!==S&&A.seek(S),W=this.evalSemanticContext(w,P,!0),W.cardinality()===1)return W.nextSetBit(0);L!==S&&A.seek(L)}if(this.reportAmbiguities){let L=new se.SimulatorState(P,R,C.useContext,M);this.reportAttemptingFullContext(E,W,L,S,A.index)}return A.seek(S),this.adaptivePredict(A,E.decision,P,!0)}let V=R.predicates;if(V!=null){let W=A.index;S!==W&&A.seek(S);let w=this.evalSemanticContext(V,P,this.reportAmbiguities&&this.predictionMode===k.PredictionMode.LL_EXACT_AMBIG_DETECTION);switch(w.cardinality()){case 0:throw this.noViableAlt(A,P,R.configs,S);case 1:return w.nextSetBit(0);default:return S!==W&&A.seek(W),this.reportAmbiguity(E,R,S,W,R.configs.isExactConflict,w,R.configs),w.nextSetBit(0)}}return me.dfa_debug&&console.log("DFA decision "+E.decision+" predicts "+R.prediction),R.prediction}isAcceptState(E,A){return E.isAcceptState?E.configs.conflictingAlts==null?!0:A&&this.predictionMode===k.PredictionMode.LL_EXACT_AMBIG_DETECTION?E.configs.isExactConflict:!0:!1}execATN(E,A,S,C){me.debug&&console.log("execATN decision "+E.decision+" exec LA(1)=="+this.getLookaheadName(A));let P=C.outerContext,R=C.useContext,I=A.LA(1),M=C,V=new D.PredictionContextCache;for(;;){let W=this.computeReachSet(E,M,I,V);if(W==null)return this.setDFAEdge(M.s0,A.LA(1),s.ATNSimulator.ERROR),this.handleNoViableAlt(A,S,M);let w=W.s0;if(fe(w.isAcceptState||w.prediction===r.ATN.INVALID_ALT_NUMBER),fe(w.isAcceptState||w.configs.conflictInfo==null),this.isAcceptState(w,R)){let L=w.configs.conflictingAlts,H=L==null?w.prediction:r.ATN.INVALID_ALT_NUMBER;if(H!==r.ATN.INVALID_ALT_NUMBER){if(this.optimize_ll1&&A.index===S&&!E.isPrecedenceDfa&&W.outerContext===W.remainingOuterContext&&E.decision>=0&&!w.configs.hasSemanticContext&&I>=0&&I<=Z){let ee=(E.decision<<16>>>0)+I;this.atn.LL1Table.set(ee,H)}R&&this.always_try_local_context&&this.reportContextSensitivity(E,H,W,S,A.index)}H=w.prediction;let G=L!=null&&this.userWantsCtxSensitive;if(G&&(G=!R&&(w.configs.dipsIntoOuterContext||!w.configs.isExactConflict)&&(!this.treat_sllk1_conflict_as_ambiguity||A.index!==S)),w.configs.hasSemanticContext){let ee=w.predicates;if(ee!=null){let ne=A.index;switch(ne!==S&&A.seek(S),L=this.evalSemanticContext(ee,P,G||this.reportAmbiguities),L.cardinality()){case 0:throw this.noViableAlt(A,P,w.configs,S);case 1:return L.nextSetBit(0)}ne!==S&&A.seek(ne)}}if(G){fe(!R),fe(this.isAcceptState(w,!1)),me.debug&&console.log("RETRY with outerContext="+P);let ee=this.computeStartState(E,P,!0);return this.reportAmbiguities&&this.reportAttemptingFullContext(E,L,W,S,A.index),A.seek(S),this.execATN(E,A,S,ee)}else return L!=null&&(this.reportAmbiguities&&L.cardinality()>1&&this.reportAmbiguity(E,w,S,A.index,w.configs.isExactConflict,L,w.configs),H=L.nextSetBit(0)),H}M=W,I!==y.IntStream.EOF&&(A.consume(),I=A.LA(1))}}handleNoViableAlt(E,A,S){if(S.s0!=null){let C=new l.BitSet,P=0;for(let R of S.s0.configs)(R.reachesIntoOuterContext||R.state instanceof z.RuleStopState)&&(C.set(R.alt),P=Math.max(P,R.alt));switch(C.cardinality()){case 0:break;case 1:return C.nextSetBit(0);default:if(!S.s0.configs.hasSemanticContext)return C.nextSetBit(0);let R=new t.ATNConfigSet;for(let M of S.s0.configs)(M.reachesIntoOuterContext||M.state instanceof z.RuleStopState)&&R.add(M);let I=this.getPredsForAmbigAlts(C,R,P);if(I!=null){let M=this.getPredicatePredictions(C,I);if(M!=null){let V=E.index;try{E.seek(A);let W=this.evalSemanticContext(M,S.outerContext,!1);if(!W.isEmpty)return W.nextSetBit(0)}finally{E.seek(V)}}}return C.nextSetBit(0)}}throw this.noViableAlt(E,S.outerContext,S.s0.configs,A)}computeReachSet(E,A,S,C){let P=A.useContext,R=A.remainingOuterContext,I=A.s0;if(P)for(;I.isContextSymbol(S);){let W;if(R!=null&&(R=this.skipTailCalls(R),W=I.getContextTarget(this.getReturnState(R))),W==null)break;fe(R!=null),R=R.parent,I=W}if(fe(!this.isAcceptState(I,P)),this.isAcceptState(I,P))return new se.SimulatorState(A.outerContext,I,P,R);let M=I,V=this.getExistingTargetState(M,S);if(V==null){let W=this.computeTargetState(E,M,R,S,P,C);V=W[0],R=W[1]}if(V!==s.ATNSimulator.ERROR)return fe(!P||!V.configs.dipsIntoOuterContext),new se.SimulatorState(A.outerContext,V,P,R)}getExistingTargetState(E,A){return E.getTarget(A)}computeTargetState(E,A,S,C,P,R){let I=A.configs.toArray(),M,V=new t.ATNConfigSet,W;do{let L=!P||S!=null;L||(V.isOutermostConfigSet=!0);let H=new t.ATNConfigSet,G;for(let q of I){if(me.debug&&console.log("testing "+this.getTokenName(C)+" at "+q.toString()),q.state instanceof z.RuleStopState){fe(q.context.isEmpty),(P&&!q.reachesIntoOuterContext||C===y.IntStream.EOF)&&(G==null&&(G=[]),G.push(q));continue}let X=q.state.numberOfOptimizedTransitions;for(let ue=0;ue<X;ue++){let ve=q.state.getOptimizedTransition(ue),Te=this.getReachableTarget(q,ve,C);Te!=null&&H.add(q.transform(Te,!1),R)}}if(this.optimize_unique_closure&&G==null&&C!==de.Token.EOF&&H.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER){H.isOutermostConfigSet=V.isOutermostConfigSet,V=H;break}let ee=!1,ne=C===de.Token.EOF;if(this.closure(H,V,ee,L,R,ne),W=V.dipsIntoOuterContext,C===y.IntStream.EOF&&(V=this.removeAllConfigsNotInRuleStopState(V,R)),G!=null&&(!P||!k.PredictionMode.hasConfigInRuleStopState(V))){fe(G.length>0);for(let q of G)V.add(q,R)}if(P&&W){V.clear(),S=S,S=this.skipTailCalls(S);let q=this.getReturnState(S);if(M==null&&(M=new x.IntegerList),S.isEmpty?S=void 0:S=S.parent,M.add(q),q!==O.PredictionContext.EMPTY_FULL_STATE_KEY)for(let X=0;X<I.length;X++)I[X]=I[X].appendContext(q,R)}}while(P&&W);return V.isEmpty?(this.setDFAEdge(A,C,s.ATNSimulator.ERROR),[s.ATNSimulator.ERROR,S]):[this.addDFAEdge(E,A,C,M,V,R),S]}removeAllConfigsNotInRuleStopState(E,A){if(k.PredictionMode.allConfigsInRuleStopStates(E))return E;let S=new t.ATNConfigSet;for(let C of E)C.state instanceof z.RuleStopState&&S.add(C,A);return S}computeStartState(E,A,S){let C=E.isPrecedenceDfa?E.getPrecedenceStartState(this._parser.precedence,S):S?E.s0full:E.s0;if(C!=null){if(!S)return new se.SimulatorState(A,C,S,A);C.setContextSensitive(this.atn)}E.decision;let P=E.atnStartState,R=0,I=A,M=S?O.PredictionContext.EMPTY_FULL:O.PredictionContext.EMPTY_LOCAL,V=new D.PredictionContextCache;if(S){if(!this.enable_global_context_dfa)for(;I!=null;)I.isEmpty?(R=O.PredictionContext.EMPTY_FULL_STATE_KEY,I=void 0):(R=this.getReturnState(I),M=M.appendSingleContext(R,V),I=I.parent);for(;C!=null&&C.isContextSensitive&&I!=null;){let w;if(I=this.skipTailCalls(I),I.isEmpty?(w=C.getContextTarget(O.PredictionContext.EMPTY_FULL_STATE_KEY),R=O.PredictionContext.EMPTY_FULL_STATE_KEY,I=void 0):(R=this.getReturnState(I),w=C.getContextTarget(R),M=M.appendSingleContext(R,V),I=I.parent),w==null)break;C=w}}if(C!=null&&!C.isContextSensitive)return new se.SimulatorState(A,C,S,I);let W=new t.ATNConfigSet;for(;;){let w=new t.ATNConfigSet,L=P.numberOfTransitions;for(let X=0;X<L;X++){let ue=P.transition(X).target;w.add(n.ATNConfig.create(ue,X+1,M))}let H=I!=null;H||(W.isOutermostConfigSet=!0),this.closure(w,W,!0,H,V,!1);let ee=W.dipsIntoOuterContext,ne;if(S&&!this.enable_global_context_dfa){C=this.addDFAState(E,W,V);break}else C==null?E.isPrecedenceDfa?(W=this.applyPrecedenceFilter(W,A,V),ne=this.addDFAState(E,W,V),E.setPrecedenceStartState(this._parser.precedence,S,ne)):(ne=this.addDFAState(E,W,V),S?E.s0full?ne=E.s0full:E.s0full=ne:E.s0?ne=E.s0:E.s0=ne):(E.isPrecedenceDfa&&(W=this.applyPrecedenceFilter(W,A,V)),ne=this.addDFAState(E,W,V),C.setContextTarget(R,ne));if(C=ne,!S||!ee)break;ne.setContextSensitive(this.atn),I=I,W.clear(),I=this.skipTailCalls(I);let q=this.getReturnState(I);I.isEmpty?I=void 0:I=I.parent,q!==O.PredictionContext.EMPTY_FULL_STATE_KEY&&(M=M.appendSingleContext(q,V)),R=q}return new se.SimulatorState(A,C,S,I)}applyPrecedenceFilter(E,A,S){let C=new Map,P=new t.ATNConfigSet;for(let R of E){if(R.alt!==1)continue;let I=R.semanticContext.evalPrecedence(this._parser,A);I!=null&&(C.set(R.state.stateNumber,R.context),I!==R.semanticContext?P.add(R.transform(R.state,!1,I),S):P.add(R,S))}for(let R of E)if(R.alt!==1){if(!R.isPrecedenceFilterSuppressed){let I=C.get(R.state.stateNumber);if(I!=null&&I.equals(R.context))continue}P.add(R,S)}return P}getReachableTarget(E,A,S){if(A.matches(S,0,this.atn.maxTokenType))return A.target}predicateDFAState(E,A,S){let C=this.getConflictingAltsFromConfigSet(A);if(!C)throw new Error("This unhandled scenario is intended to be unreachable, but I'm currently not sure of why we know that's the case.");me.debug&&console.log("predicateDFAState "+E);let P=this.getPredsForAmbigAlts(C,A,S),R;return P!=null&&(R=this.getPredicatePredictions(C,P),E.predicates=R),R}getPredsForAmbigAlts(E,A,S){let C=new Array(S+1),P=C.length;for(let M of A)E.get(M.alt)&&(C[M.alt]=re.SemanticContext.or(C[M.alt],M.semanticContext));let R=0;for(let M=0;M<P;M++)C[M]==null?C[M]=re.SemanticContext.NONE:C[M]!==re.SemanticContext.NONE&&R++;let I=C;return R===0&&(I=void 0),me.debug&&console.log("getPredsForAmbigAlts result "+(I?a.Arrays.toString(I):"undefined")),I}getPredicatePredictions(E,A){let S=[],C=!1;for(let P=1;P<A.length;P++){let R=A[P];fe(R!=null),E!=null&&E.get(P)&&R===re.SemanticContext.NONE?S.push(new g.DFAState.PredPrediction(R,P)):R!==re.SemanticContext.NONE&&(C=!0,S.push(new g.DFAState.PredPrediction(R,P)))}if(C)return S}evalSemanticContext(E,A,S){let C=new l.BitSet;for(let P of E){if(P.pred===re.SemanticContext.NONE){if(C.set(P.alt),!S)break;continue}let R=this.evalSemanticContextImpl(P.pred,A,P.alt);if((me.debug||me.dfa_debug)&&console.log("eval pred "+P+"="+R),R&&((me.debug||me.dfa_debug)&&console.log("PREDICT "+P.alt),C.set(P.alt),!S))break}return C}evalSemanticContextImpl(E,A,S){return E.eval(this._parser,A)}closure(E,A,S,C,P,R){P==null&&(P=D.PredictionContextCache.UNCACHED);let I=E,M=new p.Array2DHashSet(T.ObjectEqualityComparator.INSTANCE);for(;I.size>0;){let V=new t.ATNConfigSet;for(let W of I)this.closureImpl(W,A,V,M,S,C,P,0,R);I=V}}closureImpl(E,A,S,C,P,R,I,M,V){if(me.debug&&console.log("closure("+E.toString(this._parser,!0)+")"),E.state instanceof z.RuleStopState)if(E.context.isEmpty)if(R)me.debug&&console.log("FALLING off rule "+this.getRuleName(E.state.ruleIndex)),E.context===O.PredictionContext.EMPTY_FULL?E=E.transform(E.state,!1,O.PredictionContext.EMPTY_LOCAL):!E.reachesIntoOuterContext&&O.PredictionContext.isEmptyLocal(E.context)&&A.add(E,I);else{A.add(E,I);return}else{let w=E.context.hasEmpty,L=E.context.size-(w?1:0);for(let H=0;H<L;H++){let G=E.context.getParent(H),ee=this.atn.states[E.context.getReturnState(H)],ne=n.ATNConfig.create(ee,E.alt,G,E.semanticContext);ne.outerContextDepth=E.outerContextDepth,ne.isPrecedenceFilterSuppressed=E.isPrecedenceFilterSuppressed,fe(M>te),this.closureImpl(ne,A,S,C,P,R,I,M-1,V)}if(!w||!R)return;E=E.transform(E.state,!1,O.PredictionContext.EMPTY_LOCAL)}let W=E.state;W.onlyHasEpsilonTransitions||(A.add(E,I),me.debug&&console.log("added config "+A));for(let w=0;w<W.numberOfOptimizedTransitions;w++){if(w===0&&W.stateType===e.ATNStateType.STAR_LOOP_ENTRY&&W.precedenceRuleDecision&&!E.context.hasEmpty){let ee=W,ne=!0;for(let q=0;q<E.context.size;q++)if(!ee.precedenceLoopbackStates.get(E.context.getReturnState(q))){ne=!1;break}if(ne)continue}let L=W.getOptimizedTransition(w),H=!(L instanceof h.ActionTransition)&&P,G=this.getEpsilonTarget(E,L,H,M===0,I,V);if(G!=null){if(L instanceof U.RuleTransition&&S!=null&&!P){S.add(G,I);continue}let ee=M;if(E.state instanceof z.RuleStopState){if(this.dfa!=null&&this.dfa.isPrecedenceDfa&&L.outermostPrecedenceReturn===this.dfa.atnStartState.ruleIndex&&(G.isPrecedenceFilterSuppressed=!0),G.outerContextDepth=G.outerContextDepth+1,!C.add(G))continue;fe(ee>te),ee--,me.debug&&console.log("dips into outer ctx: "+G)}else if(L instanceof U.RuleTransition)this.optimize_tail_calls&&L.optimizedTailCall&&(!this.tail_call_preserves_sll||!O.PredictionContext.isEmptyLocal(E.context))?(fe(G.context===E.context),ee===0&&(ee--,!this.tail_call_preserves_sll&&O.PredictionContext.isEmptyLocal(E.context)&&(G.outerContextDepth=G.outerContextDepth+1))):ee>=0&&ee++;else if(!L.isEpsilon&&!C.add(G))continue;this.closureImpl(G,A,S,C,H,R,I,ee,V)}}}getRuleName(E){return this._parser!=null&&E>=0?this._parser.ruleNames[E]:"<rule "+E+">"}getEpsilonTarget(E,A,S,C,P,R){switch(A.serializationType){case 3:return this.ruleTransition(E,A,P);case 10:return this.precedenceTransition(E,A,S,C);case 4:return this.predTransition(E,A,S,C);case 6:return this.actionTransition(E,A);case 1:return E.transform(A.target,!1);case 5:case 2:case 7:return R&&A.matches(de.Token.EOF,0,1)?E.transform(A.target,!1):void 0;default:return}}actionTransition(E,A){return me.debug&&console.log("ACTION edge "+A.ruleIndex+":"+A.actionIndex),E.transform(A.target,!1)}precedenceTransition(E,A,S,C){me.debug&&(console.log("PRED (collectPredicates="+S+") "+A.precedence+">=_p, ctx dependent=true"),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let P;if(S&&C){let R=re.SemanticContext.and(E.semanticContext,A.predicate);P=E.transform(A.target,!1,R)}else P=E.transform(A.target,!1);return me.debug&&console.log("config from pred transition="+P),P}predTransition(E,A,S,C){me.debug&&(console.log("PRED (collectPredicates="+S+") "+A.ruleIndex+":"+A.predIndex+", ctx dependent="+A.isCtxDependent),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let P;if(S&&(!A.isCtxDependent||A.isCtxDependent&&C)){let R=re.SemanticContext.and(E.semanticContext,A.predicate);P=E.transform(A.target,!1,R)}else P=E.transform(A.target,!1);return me.debug&&console.log("config from pred transition="+P),P}ruleTransition(E,A,S){me.debug&&console.log("CALL rule "+this.getRuleName(A.target.ruleIndex)+", ctx="+E.context);let C=A.followState,P;return this.optimize_tail_calls&&A.optimizedTailCall&&(!this.tail_call_preserves_sll||!O.PredictionContext.isEmptyLocal(E.context))?P=E.context:S!=null?P=S.getChild(E.context,C.stateNumber):P=E.context.getChild(C.stateNumber),E.transform(A.target,!1,P)}isConflicted(E,A){if(E.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER||E.size<=1)return;let S=E.toArray();S.sort(me.STATE_ALT_SORT_COMPARATOR);let C=!E.dipsIntoOuterContext,P=new l.BitSet,R=S[0].alt;P.set(R);let I=S[0].state.nonStopStateNumber;for(let L of S){let H=L.state.nonStopStateNumber;if(H!==I){if(L.alt!==R)return;I=H}}let M;if(C){I=S[0].state.nonStopStateNumber,M=new l.BitSet;let L=R;for(let G of S){if(G.state.nonStopStateNumber!==I)break;let ee=G.alt;M.set(ee),L=ee}I=S[0].state.nonStopStateNumber;let H=R;for(let G of S){let ee=G.state.nonStopStateNumber,ne=G.alt;if(ee!==I){if(H!==L){C=!1;break}I=ee,H=R}else if(ne!==H){if(ne!==M.nextSetBit(H+1)){C=!1;break}H=ne}}}I=S[0].state.nonStopStateNumber;let V=0,W=0,w=S[0].context;for(let L=1;L<S.length;L++){let H=S[L];if(H.alt!==R||H.state.nonStopStateNumber!==I)break;W=L,w=A.join(w,S[L].context)}for(let L=W+1;L<S.length;L++){let H=S[L],G=H.state;if(P.set(H.alt),G.nonStopStateNumber!==I){I=G.nonStopStateNumber,V=L,W=L,w=H.context;for(let ue=V+1;ue<S.length;ue++){let ve=S[ue];if(ve.alt!==R||ve.state.nonStopStateNumber!==I)break;W=ue,w=A.join(w,ve.context)}L=W;continue}let ee=H.context,ne=H.alt,q=L;for(let ue=q+1;ue<S.length;ue++){let ve=S[ue];if(ve.alt!==ne||ve.state.nonStopStateNumber!==I)break;q=ue,ee=A.join(ee,ve.context)}L=q;let X=A.join(w,ee);if(!w.equals(X))return;C=C&&w.equals(ee)}return new f.ConflictInfo(P,C)}getConflictingAltsFromConfigSet(E){let A=E.conflictingAlts;return A==null&&E.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER&&(A=new l.BitSet,A.set(E.uniqueAlt)),A}getTokenName(E){if(E===de.Token.EOF)return"EOF";let S=(this._parser!=null?this._parser.vocabulary:be.VocabularyImpl.EMPTY_VOCABULARY).getDisplayName(E);return S===String(E)?S:S+"<"+E+">"}getLookaheadName(E){return this.getTokenName(E.LA(1))}dumpDeadEndConfigs(E){console.log("dead end configs: ");let A=E.deadEndConfigs;if(A)for(let S of A){let C="no edges";if(S.state.numberOfOptimizedTransitions>0){let P=S.state.getOptimizedTransition(0);P instanceof o.AtomTransition?C="Atom "+this.getTokenName(P._label):P instanceof oe.SetTransition&&(C=(P instanceof v.NotSetTransition?"~":"")+"Set "+P.set.toString())}console.log(S.toString(this._parser,!0)+":"+C)}}noViableAlt(E,A,S,C){return new N.NoViableAltException(this._parser,E,E.get(C),E.LT(1),S,A)}getUniqueAlt(E){let A=r.ATN.INVALID_ALT_NUMBER;for(let S of E)if(A===r.ATN.INVALID_ALT_NUMBER)A=S.alt;else if(S.alt!==A)return r.ATN.INVALID_ALT_NUMBER;return A}configWithAltAtStopState(E,A){for(let S of E)if(S.alt===A&&S.state instanceof z.RuleStopState)return!0;return!1}addDFAEdge(E,A,S,C,P,R){fe(C==null||C.isEmpty||E.isContextSensitive);let I=A,M=this.addDFAState(E,P,R);if(C!=null)for(let V of C.toArray()){if(V===O.PredictionContext.EMPTY_FULL_STATE_KEY&&I.configs.isOutermostConfigSet)continue;I.setContextSensitive(this.atn),I.setContextSymbol(S);let W=I.getContextTarget(V);if(W!=null){I=W;continue}W=this.addDFAContextState(E,I.configs,V,R),fe(V!==O.PredictionContext.EMPTY_FULL_STATE_KEY||W.configs.isOutermostConfigSet),I.setContextTarget(V,W),I=W}return me.debug&&console.log("EDGE "+I+" -> "+M+" upon "+this.getTokenName(S)),this.setDFAEdge(I,S,M),me.debug&&console.log(`DFA=
|
|
343
|
-
`+E.toString(this._parser!=null?this._parser.vocabulary:be.VocabularyImpl.EMPTY_VOCABULARY,this._parser!=null?this._parser.ruleNames:void 0)),M}setDFAEdge(E,A,S){E!=null&&E.setTarget(A,S)}addDFAContextState(E,A,S,C){if(S!==O.PredictionContext.EMPTY_FULL_STATE_KEY){let P=new t.ATNConfigSet;for(let R of A)P.add(R.appendContext(S,C));return this.addDFAState(E,P,C)}else return fe(!A.isOutermostConfigSet,"Shouldn't be adding a duplicate edge."),A=A.clone(!0),A.isOutermostConfigSet=!0,this.addDFAState(E,A,C)}addDFAState(E,A,S){let C=this.enable_global_context_dfa||!A.isOutermostConfigSet;if(C){A.isReadOnly||A.optimizeConfigs(this);let V=this.createDFAState(E,A),W=E.states.get(V);if(W!=null)return W}A.isReadOnly||A.conflictInfo==null&&(A.conflictInfo=this.isConflicted(A,S));let P=this.createDFAState(E,A.clone(!0)),R=this.atn.getDecisionState(E.decision),I=this.getUniqueAlt(A);if(I!==r.ATN.INVALID_ALT_NUMBER)P.acceptStateInfo=new c.AcceptStateInfo(I);else if(A.conflictingAlts!=null){let V=A.conflictingAlts;V&&(P.acceptStateInfo=new c.AcceptStateInfo(V.nextSetBit(0)))}if(P.isAcceptState&&A.hasSemanticContext&&this.predicateDFAState(P,A,R.numberOfTransitions),!C)return P;let M=E.addState(P);return me.debug&&M===P&&console.log("adding new DFA state: "+P),M}createDFAState(E,A){return new g.DFAState(A)}reportAttemptingFullContext(E,A,S,C,P){if(me.debug||me.retry_debug){let R=m.Interval.of(C,P);console.log("reportAttemptingFullContext decision="+E.decision+":"+S.s0.configs+", input="+this._parser.inputStream.getText(R))}if(this._parser!=null){let R=this._parser.getErrorListenerDispatch();R.reportAttemptingFullContext&&R.reportAttemptingFullContext(this._parser,E,C,P,A,S)}}reportContextSensitivity(E,A,S,C,P){if(me.debug||me.retry_debug){let R=m.Interval.of(C,P);console.log("reportContextSensitivity decision="+E.decision+":"+S.s0.configs+", input="+this._parser.inputStream.getText(R))}if(this._parser!=null){let R=this._parser.getErrorListenerDispatch();R.reportContextSensitivity&&R.reportContextSensitivity(this._parser,E,C,P,A,S)}}reportAmbiguity(E,A,S,C,P,R,I){if(me.debug||me.retry_debug){let M=m.Interval.of(S,C);console.log("reportAmbiguity "+R+":"+I+", input="+this._parser.inputStream.getText(M))}if(this._parser!=null){let M=this._parser.getErrorListenerDispatch();M.reportAmbiguity&&M.reportAmbiguity(this._parser,E,S,C,P,R,I)}}getReturnState(E){return E.isEmpty?O.PredictionContext.EMPTY_FULL_STATE_KEY:this.atn.states[E.invokingState].transition(0).followState.stateNumber}skipTailCalls(E){if(!this.optimize_tail_calls)return E;for(;!E.isEmpty;){let A=this.atn.states[E.invokingState];if(fe(A.numberOfTransitions===1&&A.transition(0).serializationType===3),!A.transition(0).tailCall)break;E=E.parent}return E}get parser(){return this._parser}};return J.debug=!1,J.dfa_debug=!1,J.retry_debug=!1,J.STATE_ALT_SORT_COMPARATOR=(B,E)=>{let A=B.state.nonStopStateNumber-E.state.nonStopStateNumber;return A!==0||(A=B.alt-E.alt,A!==0)?A:0},u([_.NotNull],J.prototype,"predictionMode",void 0),u([_.NotNull],J.prototype,"getPredictionMode",null),u([i(0,_.NotNull)],J.prototype,"setPredictionMode",null),u([_.Override],J.prototype,"reset",null),u([i(0,_.NotNull)],J.prototype,"adaptivePredict",null),u([i(0,_.NotNull),i(1,_.NotNull),i(2,_.NotNull)],J.prototype,"getStartState",null),u([i(0,_.NotNull),i(1,_.NotNull),i(3,_.NotNull)],J.prototype,"execDFA",null),u([i(0,_.NotNull),i(1,_.NotNull),i(3,_.NotNull)],J.prototype,"execATN",null),u([i(0,_.NotNull),i(2,_.NotNull)],J.prototype,"handleNoViableAlt",null),u([i(0,_.NotNull)],J.prototype,"getExistingTargetState",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"computeTargetState",null),u([_.NotNull,i(0,_.NotNull)],J.prototype,"removeAllConfigsNotInRuleStopState",null),u([_.NotNull],J.prototype,"computeStartState",null),u([_.NotNull,i(0,_.NotNull)],J.prototype,"applyPrecedenceFilter",null),u([i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"getReachableTarget",null),u([i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"getPredsForAmbigAlts",null),u([i(0,_.NotNull)],J.prototype,"evalSemanticContext",null),u([i(0,_.NotNull)],J.prototype,"evalSemanticContextImpl",null),u([i(1,_.NotNull),i(4,_.Nullable)],J.prototype,"closure",null),u([i(0,_.NotNull),i(1,_.NotNull),i(2,_.Nullable),i(3,_.NotNull),i(6,_.NotNull)],J.prototype,"closureImpl",null),u([_.NotNull],J.prototype,"getRuleName",null),u([i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"getEpsilonTarget",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"actionTransition",null),u([_.Nullable,i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"precedenceTransition",null),u([_.Nullable,i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"predTransition",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull),i(2,_.Nullable)],J.prototype,"ruleTransition",null),u([i(0,_.NotNull)],J.prototype,"isConflicted",null),u([_.NotNull],J.prototype,"getTokenName",null),u([i(0,_.NotNull)],J.prototype,"dumpDeadEndConfigs",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull),i(2,_.NotNull)],J.prototype,"noViableAlt",null),u([i(0,_.NotNull)],J.prototype,"getUniqueAlt",null),u([i(0,_.NotNull)],J.prototype,"configWithAltAtStopState",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull),i(4,_.NotNull)],J.prototype,"addDFAEdge",null),u([i(0,_.Nullable),i(2,_.Nullable)],J.prototype,"setDFAEdge",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"addDFAContextState",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"addDFAState",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"createDFAState",null),u([i(0,_.NotNull),i(2,_.NotNull)],J.prototype,"reportAttemptingFullContext",null),u([i(0,_.NotNull),i(2,_.NotNull)],J.prototype,"reportContextSensitivity",null),u([i(0,_.NotNull),i(5,_.NotNull),i(6,_.NotNull)],J.prototype,"reportAmbiguity",null),J=u([i(0,_.NotNull)],J),qt.ParserATNSimulator=J,qt}var an={},af;function I0(){if(af)return an;af=1;/*!
|
|
344
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
345
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
346
|
-
*/var u=an&&an.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(an,"__esModule",{value:!0}),an.PlusBlockStartState=void 0;const i=Fe(),c=Ui(),h=Q();let p=class extends c.BlockStartState{get stateType(){return i.ATNStateType.PLUS_BLOCK_START}};return u([h.Override],p.prototype,"stateType",null),an.PlusBlockStartState=p,an}var ln={},lf;function w0(){if(lf)return ln;lf=1;/*!
|
|
347
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
348
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
349
|
-
*/var u=ln&&ln.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(ln,"__esModule",{value:!0}),ln.PlusLoopbackState=void 0;const i=Fe(),c=Fr(),h=Q();let p=class extends c.DecisionState{get stateType(){return i.ATNStateType.PLUS_LOOP_BACK}};return u([h.Override],p.prototype,"stateType",null),ln.PlusLoopbackState=p,ln}var zt={},cf;function L0(){if(cf)return zt;cf=1;/*!
|
|
350
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
351
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
352
|
-
*/var u=zt&&zt.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=zt&&zt.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(zt,"__esModule",{value:!0}),zt.PrecedencePredicateTransition=void 0;const c=Is(),h=Q(),p=Bn();let a=class extends c.AbstractPredicateTransition{constructor(n,t){super(n),this.precedence=t}get serializationType(){return 10}get isEpsilon(){return!0}matches(n,t,s){return!1}get predicate(){return new p.SemanticContext.PrecedencePredicate(this.precedence)}toString(){return this.precedence+" >= _p"}};return u([h.Override],a.prototype,"serializationType",null),u([h.Override],a.prototype,"isEpsilon",null),u([h.Override],a.prototype,"matches",null),u([h.Override],a.prototype,"toString",null),a=u([i(0,h.NotNull)],a),zt.PrecedencePredicateTransition=a,zt}var Ht={},ff;function F0(){if(ff)return Ht;ff=1;/*!
|
|
353
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
354
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
355
|
-
*/var u=Ht&&Ht.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=Ht&&Ht.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.RangeTransition=void 0;const c=Gr(),h=Q(),p=dr();let a=class extends p.Transition{constructor(n,t,s){super(n),this.from=t,this.to=s}get serializationType(){return 2}get label(){return c.IntervalSet.of(this.from,this.to)}matches(n,t,s){return n>=this.from&&n<=this.to}toString(){return"'"+String.fromCodePoint(this.from)+"'..'"+String.fromCodePoint(this.to)+"'"}};return u([h.Override],a.prototype,"serializationType",null),u([h.Override,h.NotNull],a.prototype,"label",null),u([h.Override],a.prototype,"matches",null),u([h.Override,h.NotNull],a.prototype,"toString",null),a=u([i(0,h.NotNull)],a),Ht.RangeTransition=a,Ht}var cn={},hf;function B0(){if(hf)return cn;hf=1;/*!
|
|
356
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
357
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
358
|
-
*/var u=cn&&cn.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(cn,"__esModule",{value:!0}),cn.RuleStartState=void 0;const i=ut(),c=Fe(),h=Q();let p=class extends i.ATNState{constructor(){super(...arguments),this.isPrecedenceRule=!1,this.leftFactored=!1}get stateType(){return c.ATNStateType.RULE_START}};return u([h.Override],p.prototype,"stateType",null),cn.RuleStartState=p,cn}var fn={},pf;function j0(){if(pf)return fn;pf=1;/*!
|
|
359
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
360
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
361
|
-
*/var u=fn&&fn.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(fn,"__esModule",{value:!0}),fn.StarBlockStartState=void 0;const i=Fe(),c=Ui(),h=Q();let p=class extends c.BlockStartState{get stateType(){return i.ATNStateType.STAR_BLOCK_START}};return u([h.Override],p.prototype,"stateType",null),fn.StarBlockStartState=p,fn}var hn={},df;function M0(){if(df)return hn;df=1;/*!
|
|
362
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
363
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
364
|
-
*/var u=hn&&hn.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(hn,"__esModule",{value:!0}),hn.StarLoopbackState=void 0;const i=ut(),c=Fe(),h=Q();let p=class extends i.ATNState{get loopEntryState(){return this.transition(0).target}get stateType(){return c.ATNStateType.STAR_LOOP_BACK}};return u([h.Override],p.prototype,"stateType",null),hn.StarLoopbackState=p,hn}var pn={},xf;function q0(){if(xf)return pn;xf=1;/*!
|
|
365
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
366
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
367
|
-
*/var u=pn&&pn.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(pn,"__esModule",{value:!0}),pn.TokensStartState=void 0;const i=Fe(),c=Fr(),h=Q();let p=class extends c.DecisionState{get stateType(){return i.ATNStateType.TOKEN_START}};return u([h.Override],p.prototype,"stateType",null),pn.TokensStartState=p,pn}var li={},yf;function k0(){if(yf)return li;yf=1;/*!
|
|
368
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
369
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
370
|
-
*/Object.defineProperty(li,"__esModule",{value:!0}),li.UUID=void 0;const u=we();let i=class bu{constructor(h,p,a,r){this.data=new Uint32Array(4),this.data[0]=h,this.data[1]=p,this.data[2]=a,this.data[3]=r}static fromString(h){if(!/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(h))throw new Error("Incorrectly formatted UUID");let p=h.split("-"),a=parseInt(p[0],16),r=(parseInt(p[1],16)<<16>>>0)+parseInt(p[2],16),n=(parseInt(p[3],16)<<16>>>0)+parseInt(p[4].substr(0,4),16),t=parseInt(p[4].substr(-8),16);return new bu(a,r,n,t)}hashCode(){return u.MurmurHash.hashCode([this.data[0],this.data[1],this.data[2],this.data[3]])}equals(h){return h===this?!0:h instanceof bu?this.data[0]===h.data[0]&&this.data[1]===h.data[1]&&this.data[2]===h.data[2]&&this.data[3]===h.data[3]:!1}toString(){return("00000000"+this.data[0].toString(16)).substr(-8)+"-"+("0000"+(this.data[1]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[1].toString(16)).substr(-4)+"-"+("0000"+(this.data[2]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[2].toString(16)).substr(-4)+("00000000"+this.data[3].toString(16)).substr(-8)}};return li.UUID=i,li}var _f;function Vs(){if(_f)return Pt;_f=1;/*!
|
|
371
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
372
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
373
|
-
*/var u=Pt&&Pt.__decorate||function(W,w,L,H){var G=arguments.length,ee=G<3?w:H===null?H=Object.getOwnPropertyDescriptor(w,L):H,ne;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ee=Reflect.decorate(W,w,L,H);else for(var q=W.length-1;q>=0;q--)(ne=W[q])&&(ee=(G<3?ne(ee):G>3?ne(w,L,ee):ne(w,L))||ee);return G>3&&ee&&Object.defineProperty(w,L,ee),ee},i=Pt&&Pt.__param||function(W,w){return function(L,H){w(L,H,W)}};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.ATNDeserializer=void 0;const c=Ic(),h=xr(),p=bt(),a=Pc(),r=Fe(),n=Lc(),t=g0(),s=fc(),e=yr(),o=v0(),l=Ui(),f=Fr(),d=lc(),g=A0(),x=Gr(),m=pc(),y=T0(),_=E0(),v=S0(),N=N0(),T=b0(),b=C0(),O=O0(),D=R0(),k=Xc(),z=Q(),U=Hs(),re=ai(),oe=I0(),se=w0(),de=L0(),be=Dl(),fe=F0(),Z=B0(),te=ri(),J=$s(),B=zs(),E=j0(),A=M0(),S=Us(),C=Oe(),P=q0(),R=k0(),I=gc();var M;(function(W){W[W.UNICODE_BMP=0]="UNICODE_BMP",W[W.UNICODE_SMP=1]="UNICODE_SMP"})(M||(M={}));let V=class ae{constructor(w){w===void 0&&(w=a.ATNDeserializationOptions.defaultOptions),this.deserializationOptions=w}static get SERIALIZED_VERSION(){return 3}static isFeatureSupported(w,L){let H=ae.SUPPORTED_UUIDS.findIndex(G=>G.equals(w));return H<0?!1:ae.SUPPORTED_UUIDS.findIndex(G=>G.equals(L))>=H}static getUnicodeDeserializer(w){return w===0?{readUnicode:(L,H)=>ae.toInt(L[H]),size:1}:{readUnicode:(L,H)=>ae.toInt32(L,H),size:2}}deserialize(w){w=w.slice(0);for(let K=1;K<w.length;K++)w[K]=w[K]-2&65535;let L=0,H=ae.toInt(w[L++]);if(H!==ae.SERIALIZED_VERSION){let K=`Could not deserialize ATN with version ${H} (expected ${ae.SERIALIZED_VERSION}).`;throw new Error(K)}let G=ae.toUUID(w,L);if(L+=8,ae.SUPPORTED_UUIDS.findIndex(K=>K.equals(G))<0){let K=`Could not deserialize ATN with UUID ${G} (expected ${ae.SERIALIZED_UUID} or a legacy UUID).`;throw new Error(K)}let ee=ae.isFeatureSupported(ae.ADDED_LEXER_ACTIONS,G),ne=ae.toInt(w[L++]),q=ae.toInt(w[L++]),X=new p.ATN(ne,q),ue=[],ve=[],Te=ae.toInt(w[L++]);for(let K=0;K<Te;K++){let pe=ae.toInt(w[L++]);if(pe===r.ATNStateType.INVALID_TYPE){X.addState(new m.InvalidState);continue}let xe=ae.toInt(w[L++]);xe===65535&&(xe=-1);let _e=this.stateFactory(pe,xe);if(pe===r.ATNStateType.LOOP_END){let Ce=ae.toInt(w[L++]);ue.push([_e,Ce])}else if(_e instanceof l.BlockStartState){let Ce=ae.toInt(w[L++]);ve.push([_e,Ce])}X.addState(_e)}for(let K of ue)K[0].loopBackState=X.states[K[1]];for(let K of ve)K[0].endState=X.states[K[1]];let j=ae.toInt(w[L++]);for(let K=0;K<j;K++){let pe=ae.toInt(w[L++]);X.states[pe].nonGreedy=!0}let $=ae.toInt(w[L++]);for(let K=0;K<$;K++){let pe=ae.toInt(w[L++]);X.states[pe].sll=!0}let ie=ae.toInt(w[L++]);for(let K=0;K<ie;K++){let pe=ae.toInt(w[L++]);X.states[pe].isPrecedenceRule=!0}let ce=ae.toInt(w[L++]);X.grammarType===0&&(X.ruleToTokenType=new Int32Array(ce)),X.ruleToStartState=new Array(ce);for(let K=0;K<ce;K++){let pe=ae.toInt(w[L++]),xe=X.states[pe];if(xe.leftFactored=ae.toInt(w[L++])!==0,X.ruleToStartState[K]=xe,X.grammarType===0){let _e=ae.toInt(w[L++]);_e===65535&&(_e=C.Token.EOF),X.ruleToTokenType[K]=_e,ae.isFeatureSupported(ae.ADDED_LEXER_ACTIONS,G)||ae.toInt(w[L++])}}X.ruleToStopState=new Array(ce);for(let K of X.states)K instanceof te.RuleStopState&&(X.ruleToStopState[K.ruleIndex]=K,X.ruleToStartState[K.ruleIndex].stopState=K);let he=ae.toInt(w[L++]);for(let K=0;K<he;K++){let pe=ae.toInt(w[L++]);X.modeToStartState.push(X.states[pe])}X.modeToDFA=new Array(he);for(let K=0;K<he;K++)X.modeToDFA[K]=new d.DFA(X.modeToStartState[K]);let ge=[];L=this.deserializeSets(w,L,ge,ae.getUnicodeDeserializer(0)),ae.isFeatureSupported(ae.ADDED_UNICODE_SMP,G)&&(L=this.deserializeSets(w,L,ge,ae.getUnicodeDeserializer(1)));let ye=ae.toInt(w[L++]);for(let K=0;K<ye;K++){let pe=ae.toInt(w[L]),xe=ae.toInt(w[L+1]),_e=ae.toInt(w[L+2]),Ce=ae.toInt(w[L+3]),Ue=ae.toInt(w[L+4]),Be=ae.toInt(w[L+5]),Ge=this.edgeFactory(X,_e,pe,xe,Ce,Ue,Be,ge);X.states[pe].addTransition(Ge),L+=6}let Ee=new h.Array2DHashSet({hashCode:K=>K.stopState^K.returnState^K.outermostPrecedenceReturn,equals:(K,pe)=>K.stopState===pe.stopState&&K.returnState===pe.returnState&&K.outermostPrecedenceReturn===pe.outermostPrecedenceReturn}),Se=[];for(let K of X.states){let pe=K.ruleIndex>=0&&X.ruleToStartState[K.ruleIndex].leftFactored;for(let xe=0;xe<K.numberOfTransitions;xe++){let _e=K.transition(xe);if(!(_e instanceof J.RuleTransition))continue;let Ce=_e;if(!X.ruleToStartState[Ce.target.ruleIndex].leftFactored&&pe)continue;let Be=-1;X.ruleToStartState[Ce.target.ruleIndex].isPrecedenceRule&&Ce.precedence===0&&(Be=Ce.target.ruleIndex);let Ge={stopState:Ce.target.ruleIndex,returnState:Ce.followState.stateNumber,outermostPrecedenceReturn:Be};Ee.add(Ge)&&Se.push(Ge)}}for(let K of Se){let pe=new g.EpsilonTransition(X.states[K.returnState],K.outermostPrecedenceReturn);X.ruleToStopState[K.stopState].addTransition(pe)}for(let K of X.states){if(K instanceof l.BlockStartState){if(K.endState===void 0)throw new Error("IllegalStateException");if(K.endState.startState!==void 0)throw new Error("IllegalStateException");K.endState.startState=K}if(K instanceof se.PlusLoopbackState){let pe=K;for(let xe=0;xe<pe.numberOfTransitions;xe++){let _e=pe.transition(xe).target;_e instanceof oe.PlusBlockStartState&&(_e.loopBackState=pe)}}else if(K instanceof A.StarLoopbackState){let pe=K;for(let xe=0;xe<pe.numberOfTransitions;xe++){let _e=pe.transition(xe).target;_e instanceof S.StarLoopEntryState&&(_e.loopBackState=pe)}}}let Le=ae.toInt(w[L++]);for(let K=1;K<=Le;K++){let pe=ae.toInt(w[L++]),xe=X.states[pe];X.decisionToState.push(xe),xe.decision=K-1}if(X.grammarType===0)if(ee){X.lexerActions=new Array(ae.toInt(w[L++]));for(let K=0;K<X.lexerActions.length;K++){let pe=ae.toInt(w[L++]),xe=ae.toInt(w[L++]);xe===65535&&(xe=-1);let _e=ae.toInt(w[L++]);_e===65535&&(_e=-1);let Ce=this.lexerActionFactory(pe,xe,_e);X.lexerActions[K]=Ce}}else{let K=[];for(let pe of X.states)for(let xe=0;xe<pe.numberOfTransitions;xe++){let _e=pe.transition(xe);if(!(_e instanceof c.ActionTransition))continue;let Ce=_e.ruleIndex,Ue=_e.actionIndex,Be=new _.LexerCustomAction(Ce,Ue);pe.setTransition(xe,new c.ActionTransition(_e.target,Ce,K.length,!1)),K.push(Be)}X.lexerActions=K}this.markPrecedenceDecisions(X),X.decisionToDFA=new Array(Le);for(let K=0;K<Le;K++)X.decisionToDFA[K]=new d.DFA(X.decisionToState[K],K);if(this.deserializationOptions.isVerifyATN&&this.verifyATN(X),this.deserializationOptions.isGenerateRuleBypassTransitions&&X.grammarType===1){X.ruleToTokenType=new Int32Array(X.ruleToStartState.length);for(let K=0;K<X.ruleToStartState.length;K++)X.ruleToTokenType[K]=X.maxTokenType+K+1;for(let K=0;K<X.ruleToStartState.length;K++){let pe=new t.BasicBlockStartState;pe.ruleIndex=K,X.addState(pe);let xe=new o.BlockEndState;xe.ruleIndex=K,X.addState(xe),pe.endState=xe,X.defineDecisionState(pe),xe.startState=pe;let _e,Ce;if(X.ruleToStartState[K].isPrecedenceRule){_e=void 0;for(let Be of X.states){if(Be.ruleIndex!==K||!(Be instanceof S.StarLoopEntryState))continue;let Ge=Be.transition(Be.numberOfTransitions-1).target;if(Ge instanceof k.LoopEndState&&Ge.epsilonOnlyTransitions&&Ge.transition(0).target instanceof te.RuleStopState){_e=Be;break}}if(!_e)throw new Error("Couldn't identify final state of the precedence rule prefix section.");Ce=_e.loopBackState.transition(0)}else _e=X.ruleToStopState[K];for(let Be of X.states)for(let Ge=0;Ge<Be.numberOfTransitions;Ge++){let Wi=Be.transition(Ge);Wi!==Ce&&Wi.target===_e&&(Wi.target=xe)}for(;X.ruleToStartState[K].numberOfTransitions>0;){let Be=X.ruleToStartState[K].removeTransition(X.ruleToStartState[K].numberOfTransitions-1);pe.addTransition(Be)}X.ruleToStartState[K].addTransition(new g.EpsilonTransition(pe)),xe.addTransition(new g.EpsilonTransition(_e));let Ue=new s.BasicState;X.addState(Ue),Ue.addTransition(new n.AtomTransition(xe,X.ruleToTokenType[K])),pe.addTransition(new g.EpsilonTransition(Ue))}this.deserializationOptions.isVerifyATN&&this.verifyATN(X)}if(this.deserializationOptions.isOptimize){for(;;){let K=0;K+=ae.inlineSetRules(X),K+=ae.combineChainedEpsilons(X);let pe=X.grammarType===0;if(K+=ae.optimizeSets(X,pe),K===0)break}this.deserializationOptions.isVerifyATN&&this.verifyATN(X)}return ae.identifyTailCalls(X),X}deserializeSets(w,L,H,G){let ee=ae.toInt(w[L++]);for(let ne=0;ne<ee;ne++){let q=ae.toInt(w[L]);L++;let X=new x.IntervalSet;H.push(X),ae.toInt(w[L++])!==0&&X.add(-1);for(let ve=0;ve<q;ve++){let Te=G.readUnicode(w,L);L+=G.size;let j=G.readUnicode(w,L);L+=G.size,X.add(Te,j)}}return L}markPrecedenceDecisions(w){let L=new Map;for(let H of w.states)if(H instanceof S.StarLoopEntryState&&w.ruleToStartState[H.ruleIndex].isPrecedenceRule){let G=H.transition(H.numberOfTransitions-1).target;G instanceof k.LoopEndState&&G.epsilonOnlyTransitions&&G.transition(0).target instanceof te.RuleStopState&&(L.set(H.ruleIndex,H),H.precedenceRuleDecision=!0,H.precedenceLoopbackStates=new e.BitSet(w.states.length))}for(let H of L)for(let G of w.ruleToStopState[H[0]].getTransitions())G.serializationType!==1||G.outermostPrecedenceReturn!==-1||H[1].precedenceLoopbackStates.set(G.target.stateNumber)}verifyATN(w){for(let L of w.states)if(this.checkCondition(L!==void 0,"ATN states should not be undefined."),L.stateType!==r.ATNStateType.INVALID_TYPE){if(this.checkCondition(L.onlyHasEpsilonTransitions||L.numberOfTransitions<=1),L instanceof oe.PlusBlockStartState&&this.checkCondition(L.loopBackState!==void 0),L instanceof S.StarLoopEntryState){let H=L;if(this.checkCondition(H.loopBackState!==void 0),this.checkCondition(H.numberOfTransitions===2),H.transition(0).target instanceof E.StarBlockStartState)this.checkCondition(H.transition(1).target instanceof k.LoopEndState),this.checkCondition(!H.nonGreedy);else if(H.transition(0).target instanceof k.LoopEndState)this.checkCondition(H.transition(1).target instanceof E.StarBlockStartState),this.checkCondition(H.nonGreedy);else throw new Error("IllegalStateException")}if(L instanceof A.StarLoopbackState&&(this.checkCondition(L.numberOfTransitions===1),this.checkCondition(L.transition(0).target instanceof S.StarLoopEntryState)),L instanceof k.LoopEndState&&this.checkCondition(L.loopBackState!==void 0),L instanceof Z.RuleStartState&&this.checkCondition(L.stopState!==void 0),L instanceof l.BlockStartState&&this.checkCondition(L.endState!==void 0),L instanceof o.BlockEndState&&this.checkCondition(L.startState!==void 0),L instanceof f.DecisionState){let H=L;this.checkCondition(H.numberOfTransitions<=1||H.decision>=0)}else this.checkCondition(L.numberOfTransitions<=1||L instanceof te.RuleStopState)}}checkCondition(w,L){if(!w)throw new Error("IllegalStateException: "+L)}static inlineSetRules(w){let L=0,H=new Array(w.ruleToStartState.length);for(let G=0;G<w.ruleToStartState.length;G++){let ne=w.ruleToStartState[G];for(;ne.onlyHasEpsilonTransitions&&ne.numberOfOptimizedTransitions===1&&ne.getOptimizedTransition(0).serializationType===1;)ne=ne.getOptimizedTransition(0).target;if(ne.numberOfOptimizedTransitions!==1)continue;let q=ne.getOptimizedTransition(0),X=q.target;if(!(q.isEpsilon||!X.onlyHasEpsilonTransitions||X.numberOfOptimizedTransitions!==1||!(X.getOptimizedTransition(0).target instanceof te.RuleStopState)))switch(q.serializationType){case 5:case 2:case 7:H[G]=q;break;case 8:case 9:continue;default:continue}}for(let G of w.states){if(G.ruleIndex<0)continue;let ee;for(let ne=0;ne<G.numberOfOptimizedTransitions;ne++){let q=G.getOptimizedTransition(ne);if(!(q instanceof J.RuleTransition)){ee!==void 0&&ee.push(q);continue}let X=q,ue=H[X.target.ruleIndex];if(ue===void 0){ee!==void 0&&ee.push(q);continue}if(ee===void 0){ee=[];for(let j=0;j<ne;j++)ee.push(G.getOptimizedTransition(ne))}L++;let ve=X.followState,Te=new s.BasicState;switch(Te.setRuleIndex(ve.ruleIndex),w.addState(Te),ee.push(new g.EpsilonTransition(Te)),ue.serializationType){case 5:Te.addTransition(new n.AtomTransition(ve,ue._label));break;case 2:Te.addTransition(new fe.RangeTransition(ve,ue.from,ue.to));break;case 7:Te.addTransition(new B.SetTransition(ve,ue.label));break;default:throw new Error("UnsupportedOperationException")}}if(ee!==void 0){if(G.isOptimized)for(;G.numberOfOptimizedTransitions>0;)G.removeOptimizedTransition(G.numberOfOptimizedTransitions-1);for(let ne of ee)G.addOptimizedTransition(ne)}}return re.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+L+" rule invocations by inlining sets."),L}static combineChainedEpsilons(w){let L=0;for(let H of w.states){if(!H.onlyHasEpsilonTransitions||H instanceof te.RuleStopState)continue;let G;e:for(let ee=0;ee<H.numberOfOptimizedTransitions;ee++){let ne=H.getOptimizedTransition(ee),q=ne.target;if(ne.serializationType!==1||ne.outermostPrecedenceReturn!==-1||q.stateType!==r.ATNStateType.BASIC||!q.onlyHasEpsilonTransitions){G!==void 0&&G.push(ne);continue e}for(let X=0;X<q.numberOfOptimizedTransitions;X++)if(q.getOptimizedTransition(X).serializationType!==1||q.getOptimizedTransition(X).outermostPrecedenceReturn!==-1){G!==void 0&&G.push(ne);continue e}if(L++,G===void 0){G=[];for(let X=0;X<ee;X++)G.push(H.getOptimizedTransition(X))}for(let X=0;X<q.numberOfOptimizedTransitions;X++){let ue=q.getOptimizedTransition(X).target;G.push(new g.EpsilonTransition(ue))}}if(G!==void 0){if(H.isOptimized)for(;H.numberOfOptimizedTransitions>0;)H.removeOptimizedTransition(H.numberOfOptimizedTransitions-1);for(let ee of G)H.addOptimizedTransition(ee)}}return re.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+L+" transitions by combining chained epsilon transitions."),L}static optimizeSets(w,L){if(L)return 0;let H=0,G=w.decisionToState;for(let ee of G){let ne=new x.IntervalSet;for(let j=0;j<ee.numberOfOptimizedTransitions;j++){let $=ee.getOptimizedTransition(j);if(!($ instanceof g.EpsilonTransition)||$.target.numberOfOptimizedTransitions!==1)continue;let ie=$.target.getOptimizedTransition(0);ie.target instanceof o.BlockEndState&&(ie instanceof U.NotSetTransition||(ie instanceof n.AtomTransition||ie instanceof fe.RangeTransition||ie instanceof B.SetTransition)&&ne.add(j))}if(ne.size<=1)continue;let q=[];for(let j=0;j<ee.numberOfOptimizedTransitions;j++)ne.contains(j)||q.push(ee.getOptimizedTransition(j));let X=ee.getOptimizedTransition(ne.minElement).target.getOptimizedTransition(0).target,ue=new x.IntervalSet;for(let j of ne.intervals)for(let $=j.a;$<=j.b;$++){let ie=ee.getOptimizedTransition($).target.getOptimizedTransition(0);if(ie instanceof U.NotSetTransition)throw new Error("Not yet implemented.");ue.addAll(ie.label)}let ve;if(ue.intervals.length===1)if(ue.size===1)ve=new n.AtomTransition(X,ue.minElement);else{let j=ue.intervals[0];ve=new fe.RangeTransition(X,j.a,j.b)}else ve=new B.SetTransition(X,ue);let Te=new s.BasicState;if(Te.setRuleIndex(ee.ruleIndex),w.addState(Te),Te.addTransition(ve),q.push(new g.EpsilonTransition(Te)),H+=ee.numberOfOptimizedTransitions-q.length,ee.isOptimized)for(;ee.numberOfOptimizedTransitions>0;)ee.removeOptimizedTransition(ee.numberOfOptimizedTransitions-1);for(let j of q)ee.addOptimizedTransition(j)}return re.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+H+" paths by collapsing sets."),H}static identifyTailCalls(w){for(let L of w.states){for(let H=0;H<L.numberOfTransitions;H++){let G=L.transition(H);G instanceof J.RuleTransition&&(G.tailCall=this.testTailCall(w,G,!1),G.optimizedTailCall=this.testTailCall(w,G,!0))}if(L.isOptimized)for(let H=0;H<L.numberOfOptimizedTransitions;H++){let G=L.getOptimizedTransition(H);G instanceof J.RuleTransition&&(G.tailCall=this.testTailCall(w,G,!1),G.optimizedTailCall=this.testTailCall(w,G,!0))}}}static testTailCall(w,L,H){if(!H&&L.tailCall||H&&L.optimizedTailCall)return!0;let G=new e.BitSet(w.states.length),ee=[];for(ee.push(L.followState);;){let ne=ee.pop();if(!ne)break;if(G.get(ne.stateNumber)||ne instanceof te.RuleStopState)continue;if(!ne.onlyHasEpsilonTransitions)return!1;let q=H?ne.numberOfOptimizedTransitions:ne.numberOfTransitions;for(let X=0;X<q;X++){let ue=H?ne.getOptimizedTransition(X):ne.transition(X);if(ue.serializationType!==1)return!1;ee.push(ue.target)}}return!0}static toInt(w){return w}static toInt32(w,L){return(w[L]|w[L+1]<<16)>>>0}static toUUID(w,L){let H=ae.toInt32(w,L),G=ae.toInt32(w,L+2),ee=ae.toInt32(w,L+4),ne=ae.toInt32(w,L+6);return new R.UUID(ne,ee,G,H)}edgeFactory(w,L,H,G,ee,ne,q,X){let ue=w.states[G];switch(L){case 1:return new g.EpsilonTransition(ue);case 2:return q!==0?new fe.RangeTransition(ue,C.Token.EOF,ne):new fe.RangeTransition(ue,ee,ne);case 3:return new J.RuleTransition(w.states[ee],ne,q,ue);case 4:return new be.PredicateTransition(ue,ee,ne,q!==0);case 10:return new de.PrecedencePredicateTransition(ue,ee);case 5:return q!==0?new n.AtomTransition(ue,C.Token.EOF):new n.AtomTransition(ue,ee);case 6:return new c.ActionTransition(ue,ee,ne,q!==0);case 7:return new B.SetTransition(ue,X[ee]);case 8:return new U.NotSetTransition(ue,X[ee]);case 9:return new I.WildcardTransition(ue)}throw new Error("The specified transition type is not valid.")}stateFactory(w,L){let H;switch(w){case r.ATNStateType.INVALID_TYPE:return new m.InvalidState;case r.ATNStateType.BASIC:H=new s.BasicState;break;case r.ATNStateType.RULE_START:H=new Z.RuleStartState;break;case r.ATNStateType.BLOCK_START:H=new t.BasicBlockStartState;break;case r.ATNStateType.PLUS_BLOCK_START:H=new oe.PlusBlockStartState;break;case r.ATNStateType.STAR_BLOCK_START:H=new E.StarBlockStartState;break;case r.ATNStateType.TOKEN_START:H=new P.TokensStartState;break;case r.ATNStateType.RULE_STOP:H=new te.RuleStopState;break;case r.ATNStateType.BLOCK_END:H=new o.BlockEndState;break;case r.ATNStateType.STAR_LOOP_BACK:H=new A.StarLoopbackState;break;case r.ATNStateType.STAR_LOOP_ENTRY:H=new S.StarLoopEntryState;break;case r.ATNStateType.PLUS_LOOP_BACK:H=new se.PlusLoopbackState;break;case r.ATNStateType.LOOP_END:H=new k.LoopEndState;break;default:let G=`The specified state type ${w} is not valid.`;throw new Error(G)}return H.ruleIndex=L,H}lexerActionFactory(w,L,H){switch(w){case 0:return new y.LexerChannelAction(L);case 1:return new _.LexerCustomAction(L,H);case 2:return new v.LexerModeAction(L);case 3:return N.LexerMoreAction.INSTANCE;case 4:return T.LexerPopModeAction.INSTANCE;case 5:return new b.LexerPushModeAction(L);case 6:return O.LexerSkipAction.INSTANCE;case 7:return new D.LexerTypeAction(L);default:let G=`The specified lexer action type ${w} is not valid.`;throw new Error(G)}}};return V.BASE_SERIALIZED_UUID=R.UUID.fromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3"),V.ADDED_LEXER_ACTIONS=R.UUID.fromString("AB35191A-1603-487E-B75A-479B831EAF6D"),V.ADDED_UNICODE_SMP=R.UUID.fromString("C23FEA89-0605-4f51-AFB8-058BCAB8C91B"),V.SUPPORTED_UUIDS=[V.BASE_SERIALIZED_UUID,V.ADDED_LEXER_ACTIONS,V.ADDED_UNICODE_SMP],V.SERIALIZED_UUID=V.ADDED_UNICODE_SMP,u([z.NotNull],V.prototype,"deserializationOptions",void 0),u([i(0,z.NotNull)],V.prototype,"deserialize",null),u([i(0,z.NotNull)],V.prototype,"markPrecedenceDecisions",null),u([z.NotNull,i(0,z.NotNull)],V.prototype,"edgeFactory",null),Pt.ATNDeserializer=V,Pt}var $t={},mf;function U0(){if(mf)return $t;mf=1;/*!
|
|
374
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
375
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
376
|
-
*/var u=$t&&$t.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s},i=$t&&$t.__param||function(p,a){return function(r,n){a(r,n,p)}};Object.defineProperty($t,"__esModule",{value:!0}),$t.ParseInfo=void 0;const c=Q();let h=class{constructor(a){this.atnSimulator=a}getDecisionInfo(){return this.atnSimulator.getDecisionInfo()}getLLDecisions(){let a=this.atnSimulator.getDecisionInfo(),r=[];for(let n=0;n<a.length;n++)a[n].LL_Fallback>0&&r.push(n);return r}getTotalTimeInPrediction(){let a=this.atnSimulator.getDecisionInfo(),r=0;for(let n of a)r+=n.timeInPrediction;return r}getTotalSLLLookaheadOps(){let a=this.atnSimulator.getDecisionInfo(),r=0;for(let n of a)r+=n.SLL_TotalLook;return r}getTotalLLLookaheadOps(){let a=this.atnSimulator.getDecisionInfo(),r=0;for(let n of a)r+=n.LL_TotalLook;return r}getTotalSLLATNLookaheadOps(){let a=this.atnSimulator.getDecisionInfo(),r=0;for(let n of a)r+=n.SLL_ATNTransitions;return r}getTotalLLATNLookaheadOps(){let a=this.atnSimulator.getDecisionInfo(),r=0;for(let n of a)r+=n.LL_ATNTransitions;return r}getTotalATNLookaheadOps(){let a=this.atnSimulator.getDecisionInfo(),r=0;for(let n of a)r+=n.SLL_ATNTransitions,r+=n.LL_ATNTransitions;return r}getDFASize(a){if(a)return this.atnSimulator.atn.decisionToDFA[a].states.size;{let r=0,n=this.atnSimulator.atn.decisionToDFA;for(let t=0;t<n.length;t++)r+=this.getDFASize(t);return r}}};return u([c.NotNull],h.prototype,"getDecisionInfo",null),u([c.NotNull],h.prototype,"getLLDecisions",null),h=u([i(0,c.NotNull)],h),$t.ParseInfo=h,$t}var dn={},gf;function vf(){if(gf)return dn;gf=1;/*!
|
|
377
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
378
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
379
|
-
*/var u=dn&&dn.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(dn,"__esModule",{value:!0}),dn.ProxyParserErrorListener=void 0;const i=ks(),c=Q();let h=class extends i.ProxyErrorListener{constructor(a){super(a)}reportAmbiguity(a,r,n,t,s,e,o){this.getDelegates().forEach(l=>{l.reportAmbiguity&&l.reportAmbiguity(a,r,n,t,s,e,o)})}reportAttemptingFullContext(a,r,n,t,s,e){this.getDelegates().forEach(o=>{o.reportAttemptingFullContext&&o.reportAttemptingFullContext(a,r,n,t,s,e)})}reportContextSensitivity(a,r,n,t,s,e){this.getDelegates().forEach(o=>{o.reportContextSensitivity&&o.reportContextSensitivity(a,r,n,t,s,e)})}};return u([c.Override],h.prototype,"reportAmbiguity",null),u([c.Override],h.prototype,"reportAttemptingFullContext",null),u([c.Override],h.prototype,"reportContextSensitivity",null),dn.ProxyParserErrorListener=h,dn}var xn={},Ws={},Gs={},Vt={},Af;function z0(){if(Af)return Vt;Af=1;/*!
|
|
380
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
381
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
382
|
-
*/Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.isSupplementaryCodePoint=Vt.isLowSurrogate=Vt.isHighSurrogate=void 0;function u(h){return h>=55296&&h<=56319}Vt.isHighSurrogate=u;function i(h){return h>=56320&&h<=57343}Vt.isLowSurrogate=i;function c(h){return h>=65536}return Vt.isSupplementaryCodePoint=c,Vt}var Tf;function Ef(){return Tf||(Tf=1,function(u){/*!
|
|
383
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
384
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
385
|
-
*/Object.defineProperty(u,"__esModule",{value:!0}),u.CodePointBuffer=void 0;const i=Me(),c=z0();class h{constructor(a,r){this.buffer=a,this._position=0,this._size=r}static withArray(a){return new h(a,a.length)}get position(){return this._position}set position(a){if(a<0||a>this._size)throw new RangeError;this._position=a}get remaining(){return this._size-this.position}get(a){return this.buffer[a]}array(){return this.buffer.slice(0,this._size)}static builder(a){return new h.Builder(a)}}u.CodePointBuffer=h,function(p){let a;(function(n){n[n.BYTE=0]="BYTE",n[n.CHAR=1]="CHAR",n[n.INT=2]="INT"})(a||(a={}));class r{constructor(t){this.type=0,this.buffer=new Uint8Array(t),this.prevHighSurrogate=-1,this.position=0}build(){return new p(this.buffer,this.position)}static roundUpToNextPowerOfTwo(t){let s=32-Math.clz32(t-1);return Math.pow(2,s)}ensureRemaining(t){switch(this.type){case 0:if(this.buffer.length-this.position<t){let s=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Uint8Array(s);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break;case 1:if(this.buffer.length-this.position<t){let s=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Uint16Array(s);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break;case 2:if(this.buffer.length-this.position<t){let s=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Int32Array(s);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break}}append(t){this.ensureRemaining(t.length),this.appendArray(t)}appendArray(t){switch(this.type){case 0:this.appendArrayByte(t);break;case 1:this.appendArrayChar(t);break;case 2:this.appendArrayInt(t);break}}appendArrayByte(t){i(this.prevHighSurrogate===-1);let s=t,e=0,o=t.length,l=this.buffer,f=this.position;for(;e<o;){let d=s[e];if(d<=255)l[f]=d;else if(t=t.subarray(e,o),this.position=f,c.isHighSurrogate(d)){this.byteToIntBuffer(t.length),this.appendArrayInt(t);return}else{this.byteToCharBuffer(t.length),this.appendArrayChar(t);return}e++,f++}this.position=f}appendArrayChar(t){i(this.prevHighSurrogate===-1);let s=t,e=0,o=t.length,l=this.buffer,f=this.position;for(;e<o;){let d=s[e];if(!c.isHighSurrogate(d))l[f]=d;else{t=t.subarray(e,o),this.position=f,this.charToIntBuffer(t.length),this.appendArrayInt(t);return}e++,f++}this.position=f}appendArrayInt(t){let s=t,e=0,o=t.length,l=this.buffer,f=this.position;for(;e<o;){let d=s[e];e++,this.prevHighSurrogate!==-1?c.isLowSurrogate(d)?(l[f]=String.fromCharCode(this.prevHighSurrogate,d).codePointAt(0),f++,this.prevHighSurrogate=-1):(l[f]=this.prevHighSurrogate,f++,c.isHighSurrogate(d)?this.prevHighSurrogate=d:(l[f]=d,f++,this.prevHighSurrogate=-1)):c.isHighSurrogate(d)?this.prevHighSurrogate=d:(l[f]=d,f++)}this.prevHighSurrogate!==-1&&(l[f]=this.prevHighSurrogate,f++),this.position=f}byteToCharBuffer(t){let s=new Uint16Array(Math.max(this.position+t,this.buffer.length>>1));s.set(this.buffer.subarray(0,this.position),0),this.type=1,this.buffer=s}byteToIntBuffer(t){let s=new Int32Array(Math.max(this.position+t,this.buffer.length>>2));s.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=s}charToIntBuffer(t){let s=new Int32Array(Math.max(this.position+t,this.buffer.length>>1));s.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=s}}p.Builder=r}(h=u.CodePointBuffer||(u.CodePointBuffer={}))}(Gs)),Gs}var yn={},Sf;function Nf(){if(Sf)return yn;Sf=1;/*!
|
|
386
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
387
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
388
|
-
*/var u=yn&&yn.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(yn,"__esModule",{value:!0}),yn.CodePointCharStream=void 0;const i=Me(),c=hr(),h=ke(),p=Q();let a=class yp{constructor(n,t,s,e){i(t===0),this._array=n,this._size=s,this._name=e,this._position=0}get internalStorage(){return this._array}static fromBuffer(n,t){return(t===void 0||t.length===0)&&(t=c.IntStream.UNKNOWN_SOURCE_NAME),new yp(n.array(),n.position,n.remaining,t)}consume(){if(this._size-this._position===0)throw i(this.LA(1)===c.IntStream.EOF),new RangeError("cannot consume EOF");this._position++}get index(){return this._position}get size(){return this._size}mark(){return-1}release(n){}seek(n){this._position=n}get sourceName(){return this._name}toString(){return this.getText(h.Interval.of(0,this.size-1))}LA(n){let t;switch(Math.sign(n)){case-1:return t=this.index+n,t<0?c.IntStream.EOF:this._array[t];case 0:return 0;case 1:return t=this.index+n-1,t>=this.size?c.IntStream.EOF:this._array[t]}throw new RangeError("Not reached")}getText(n){const t=Math.min(n.a,this.size),s=Math.min(n.b-n.a+1,this.size-t);return this._array instanceof Int32Array?String.fromCodePoint(...Array.from(this._array.subarray(t,t+s))):String.fromCharCode(...Array.from(this._array.subarray(t,t+s)))}};return u([p.Override],a.prototype,"consume",null),u([p.Override],a.prototype,"index",null),u([p.Override],a.prototype,"size",null),u([p.Override],a.prototype,"mark",null),u([p.Override],a.prototype,"release",null),u([p.Override],a.prototype,"seek",null),u([p.Override],a.prototype,"sourceName",null),u([p.Override],a.prototype,"toString",null),u([p.Override],a.prototype,"LA",null),u([p.Override],a.prototype,"getText",null),yn.CodePointCharStream=a,yn}var bf;function Xs(){return bf||(bf=1,function(u){/*!
|
|
389
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
390
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
391
|
-
*/Object.defineProperty(u,"__esModule",{value:!0}),u.CharStreams=void 0;const i=Ef(),c=Nf(),h=hr();(function(p){function a(r,n){(n===void 0||n.length===0)&&(n=h.IntStream.UNKNOWN_SOURCE_NAME);let t=i.CodePointBuffer.builder(r.length),s=new Uint16Array(r.length);for(let e=0;e<r.length;e++)s[e]=r.charCodeAt(e);return t.append(s),c.CodePointCharStream.fromBuffer(t.build(),n)}p.fromString=a})(u.CharStreams||(u.CharStreams={}))}(Ws)),Ws}var Wt={},Gt={},Cf;function Of(){if(Cf)return Gt;Cf=1;/*!
|
|
392
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
393
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
394
|
-
*/var u=Gt&&Gt.__decorate||function(s,e,o,l){var f=arguments.length,d=f<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,o):l,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(s,e,o,l);else for(var x=s.length-1;x>=0;x--)(g=s[x])&&(d=(f<3?g(d):f>3?g(e,o,d):g(e,o))||d);return f>3&&d&&Object.defineProperty(e,o,d),d},i=Gt&&Gt.__param||function(s,e){return function(o,l){e(o,l,s)}};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.BufferedTokenStream=void 0;const c=Me(),h=Wn(),p=ke(),a=_r(),r=Q(),n=Oe();let t=class{constructor(e){if(this.tokens=[],this.p=-1,this.fetchedEOF=!1,e==null)throw new Error("tokenSource cannot be null");this._tokenSource=e}get tokenSource(){return this._tokenSource}set tokenSource(e){this._tokenSource=e,this.tokens.length=0,this.p=-1,this.fetchedEOF=!1}get index(){return this.p}mark(){return 0}release(e){}seek(e){this.lazyInit(),this.p=this.adjustSeekIndex(e)}get size(){return this.tokens.length}consume(){let e;if(this.p>=0?this.fetchedEOF?e=this.p<this.tokens.length-1:e=this.p<this.tokens.length:e=!1,!e&&this.LA(1)===n.Token.EOF)throw new Error("cannot consume EOF");this.sync(this.p+1)&&(this.p=this.adjustSeekIndex(this.p+1))}sync(e){c(e>=0);let o=e-this.tokens.length+1;return o>0?this.fetch(o)>=o:!0}fetch(e){if(this.fetchedEOF)return 0;for(let o=0;o<e;o++){let l=this.tokenSource.nextToken();if(this.isWritableToken(l)&&(l.tokenIndex=this.tokens.length),this.tokens.push(l),l.type===n.Token.EOF)return this.fetchedEOF=!0,o+1}return e}get(e){if(e<0||e>=this.tokens.length)throw new RangeError("token index "+e+" out of range 0.."+(this.tokens.length-1));return this.tokens[e]}getRange(e,o){if(e<0||o<0)return[];this.lazyInit();let l=new Array;o>=this.tokens.length&&(o=this.tokens.length-1);for(let f=e;f<=o;f++){let d=this.tokens[f];if(d.type===n.Token.EOF)break;l.push(d)}return l}LA(e){let o=this.LT(e);return o?o.type:n.Token.INVALID_TYPE}tryLB(e){if(!(this.p-e<0))return this.tokens[this.p-e]}LT(e){let o=this.tryLT(e);if(o===void 0)throw new RangeError("requested lookback index out of range");return o}tryLT(e){if(this.lazyInit(),e===0)throw new RangeError("0 is not a valid lookahead index");if(e<0)return this.tryLB(-e);let o=this.p+e-1;return this.sync(o),o>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[o]}adjustSeekIndex(e){return e}lazyInit(){this.p===-1&&this.setup()}setup(){this.sync(0),this.p=this.adjustSeekIndex(0)}getTokens(e,o,l){if(this.lazyInit(),e===void 0)return c(o===void 0&&l===void 0),this.tokens;if(o===void 0&&(o=this.tokens.length-1),e<0||o>=this.tokens.length||o<0||e>=this.tokens.length)throw new RangeError("start "+e+" or stop "+o+" not in 0.."+(this.tokens.length-1));if(e>o)return[];if(l===void 0)return this.tokens.slice(e,o+1);typeof l=="number"&&(l=new Set().add(l));let f=l,d=this.tokens.slice(e,o+1);return d=d.filter(g=>f.has(g.type)),d}nextTokenOnChannel(e,o){if(this.sync(e),e>=this.size)return this.size-1;let l=this.tokens[e];for(;l.channel!==o;){if(l.type===n.Token.EOF)return e;e++,this.sync(e),l=this.tokens[e]}return e}previousTokenOnChannel(e,o){if(this.sync(e),e>=this.size)return this.size-1;for(;e>=0;){let l=this.tokens[e];if(l.type===n.Token.EOF||l.channel===o)return e;e--}return e}getHiddenTokensToRight(e,o=-1){if(this.lazyInit(),e<0||e>=this.tokens.length)throw new RangeError(e+" not in 0.."+(this.tokens.length-1));let l=this.nextTokenOnChannel(e+1,a.Lexer.DEFAULT_TOKEN_CHANNEL),f,d=e+1;return l===-1?f=this.size-1:f=l,this.filterForChannel(d,f,o)}getHiddenTokensToLeft(e,o=-1){if(this.lazyInit(),e<0||e>=this.tokens.length)throw new RangeError(e+" not in 0.."+(this.tokens.length-1));if(e===0)return[];let l=this.previousTokenOnChannel(e-1,a.Lexer.DEFAULT_TOKEN_CHANNEL);if(l===e-1)return[];let f=l+1,d=e-1;return this.filterForChannel(f,d,o)}filterForChannel(e,o,l){let f=new Array;for(let d=e;d<=o;d++){let g=this.tokens[d];l===-1?g.channel!==a.Lexer.DEFAULT_TOKEN_CHANNEL&&f.push(g):g.channel===l&&f.push(g)}return f}get sourceName(){return this.tokenSource.sourceName}getText(e){e===void 0?e=p.Interval.of(0,this.size-1):e instanceof p.Interval||(e=e.sourceInterval);let o=e.a,l=e.b;if(o<0||l<0)return"";this.fill(),l>=this.tokens.length&&(l=this.tokens.length-1);let f="";for(let d=o;d<=l;d++){let g=this.tokens[d];if(g.type===n.Token.EOF)break;f+=g.text}return f.toString()}getTextFromRange(e,o){return this.isToken(e)&&this.isToken(o)?this.getText(p.Interval.of(e.tokenIndex,o.tokenIndex)):""}fill(){this.lazyInit();const e=1e3;for(;;)if(this.fetch(e)<e)return}isWritableToken(e){return e instanceof h.CommonToken}isToken(e){return e instanceof h.CommonToken}};return u([r.NotNull],t.prototype,"_tokenSource",void 0),u([r.Override],t.prototype,"tokenSource",null),u([r.Override],t.prototype,"index",null),u([r.Override],t.prototype,"mark",null),u([r.Override],t.prototype,"release",null),u([r.Override],t.prototype,"seek",null),u([r.Override],t.prototype,"size",null),u([r.Override],t.prototype,"consume",null),u([r.Override],t.prototype,"get",null),u([r.Override],t.prototype,"LA",null),u([r.NotNull,r.Override],t.prototype,"LT",null),u([r.Override],t.prototype,"sourceName",null),u([r.NotNull,r.Override],t.prototype,"getText",null),u([r.NotNull,r.Override],t.prototype,"getTextFromRange",null),t=u([i(0,r.NotNull)],t),Gt.BufferedTokenStream=t,Gt}var Rf;function Ks(){if(Rf)return Wt;Rf=1;/*!
|
|
395
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
396
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
397
|
-
*/var u=Wt&&Wt.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=Wt&&Wt.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.CommonTokenStream=void 0;const c=Of(),h=Q(),p=Oe();let a=class extends c.BufferedTokenStream{constructor(n,t=p.Token.DEFAULT_CHANNEL){super(n),this.channel=t}adjustSeekIndex(n){return this.nextTokenOnChannel(n,this.channel)}tryLB(n){if(this.p-n<0)return;let t=this.p,s=1;for(;s<=n&&t>0;)t=this.previousTokenOnChannel(t-1,this.channel),s++;if(!(t<0))return this.tokens[t]}tryLT(n){if(this.lazyInit(),n===0)throw new RangeError("0 is not a valid lookahead index");if(n<0)return this.tryLB(-n);let t=this.p,s=1;for(;s<n;)this.sync(t+1)&&(t=this.nextTokenOnChannel(t+1,this.channel)),s++;return this.tokens[t]}getNumberOfOnChannelTokens(){let n=0;this.fill();for(let t of this.tokens)if(t.channel===this.channel&&n++,t.type===p.Token.EOF)break;return n}};return u([h.Override],a.prototype,"adjustSeekIndex",null),u([h.Override],a.prototype,"tryLB",null),u([h.Override],a.prototype,"tryLT",null),a=u([i(0,h.NotNull)],a),Wt.CommonTokenStream=a,Wt}var Xt={},Pf;function Df(){if(Pf)return Xt;Pf=1;/*!
|
|
398
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
399
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
400
|
-
*/var u=Xt&&Xt.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=Xt&&Xt.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.ListTokenSource=void 0;const c=Ms(),h=Q(),p=Oe();let a=class{constructor(n,t){if(this.i=0,this._factory=c.CommonTokenFactory.DEFAULT,n==null)throw new Error("tokens cannot be null");this.tokens=n,this._sourceName=t}get charPositionInLine(){if(this.i<this.tokens.length)return this.tokens[this.i].charPositionInLine;if(this.eofToken!=null)return this.eofToken.charPositionInLine;if(this.tokens.length>0){let n=this.tokens[this.tokens.length-1],t=n.text;if(t!=null){let s=t.lastIndexOf(`
|
|
75
|
+
`}}let s=t;return s.length===0?"":s}getContextLabel(t){if(t===h.PredictionContext.EMPTY_FULL_STATE_KEY)return"ctx:EMPTY_FULL";if(t===h.PredictionContext.EMPTY_LOCAL_STATE_KEY)return"ctx:EMPTY_LOCAL";if(this.atn&&t>0&&t<=this.atn.states.length){let e=this.atn.states[t].ruleIndex;if(this.ruleNames&&e>=0&&e<this.ruleNames.length)return"ctx:"+String(t)+"("+this.ruleNames[e]+")"}return"ctx:"+String(t)}getEdgeLabel(t){return this.vocabulary.getDisplayName(t)}getStateString(t){if(t===i.ATNSimulator.ERROR)return"ERROR";let s=t.stateNumber,e="s"+s;if(t.isAcceptState&&(t.predicates?e=":s"+s+"=>"+t.predicates:e=":s"+s+"=>"+t.prediction),t.isContextSensitive){e+="*";for(let o of t.configs)if(o.reachesIntoOuterContext){e+="*";break}}return e}};return u([c.NotNull],r.prototype,"dfa",void 0),u([c.NotNull],r.prototype,"vocabulary",void 0),u([c.Override],r.prototype,"toString",null),Lr.DFASerializer=r,Lr}var xt={},oc;function d0(){if(oc)return xt;oc=1;var u=xt&&xt.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=xt&&xt.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(xt,"__esModule",{value:!0}),xt.LexerDFASerializer=void 0;const c=ic(),h=Q(),p=Mr();let a=class extends c.DFASerializer{constructor(n){super(n,p.VocabularyImpl.EMPTY_VOCABULARY)}getEdgeLabel(n){return"'"+String.fromCodePoint(n)+"'"}};return u([h.Override,h.NotNull],a.prototype,"getEdgeLabel",null),a=u([i(0,h.NotNull)],a),xt.LexerDFASerializer=a,xt}var qr={},sc;function qs(){if(sc)return qr;sc=1;var u=qr&&qr.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(qr,"__esModule",{value:!0}),qr.StarLoopEntryState=void 0;const i=Ie(),c=fr(),h=Ir(),p=Q();let a=class extends h.DecisionState{constructor(){super(...arguments),this.precedenceRuleDecision=!1,this.precedenceLoopbackStates=new c.BitSet}get stateType(){return i.ATNStateType.STAR_LOOP_ENTRY}};return u([p.Override],a.prototype,"stateType",null),qr.StarLoopEntryState=a,qr}var uc;function ac(){if(uc)return ft;uc=1;var u=ft&&ft.__decorate||function(l,f,d,g){var x=arguments.length,m=x<3?f:g===null?g=Object.getOwnPropertyDescriptor(f,d):g,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(l,f,d,g);else for(var _=l.length-1;_>=0;_--)(y=l[_])&&(m=(x<3?y(m):x>3?y(f,d,m):y(f,d))||m);return x>3&&m&&Object.defineProperty(f,d,m),m},i=ft&&ft.__param||function(l,f){return function(d,g){f(d,g,l)}};Object.defineProperty(ft,"__esModule",{value:!0}),ft.DFA=void 0;const c=cr(),h=Jn(),p=ic(),a=Fi(),r=d0(),n=Q(),t=Ze(),s=qs(),e=Mr();let o=class{constructor(f,d=0){if(this.states=new c.Array2DHashSet(t.ObjectEqualityComparator.INSTANCE),this.nextStateNumber=0,!f.atn)throw new Error("The ATNState must be associated with an ATN");this.atnStartState=f,this.atn=f.atn,this.decision=d;let g=!1;f instanceof s.StarLoopEntryState&&f.precedenceRuleDecision&&(g=!0,this.s0=new a.DFAState(new h.ATNConfigSet),this.s0full=new a.DFAState(new h.ATNConfigSet)),this.precedenceDfa=g}get isPrecedenceDfa(){return this.precedenceDfa}getPrecedenceStartState(f,d){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");return d?this.s0full.getTarget(f):this.s0.getTarget(f)}setPrecedenceStartState(f,d,g){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");f<0||(d?this.s0full.setTarget(f,g):this.s0.setTarget(f,g))}get isEmpty(){return this.isPrecedenceDfa?this.s0.getEdgeMap().size===0&&this.s0full.getEdgeMap().size===0:this.s0==null&&this.s0full==null}get isContextSensitive(){return this.isPrecedenceDfa?this.s0full.getEdgeMap().size>0:this.s0full!=null}addState(f){return f.stateNumber=this.nextStateNumber++,this.states.getOrAdd(f)}toString(f,d){if(f||(f=e.VocabularyImpl.EMPTY_VOCABULARY),!this.s0)return"";let g;return d?g=new p.DFASerializer(this,f,d,this.atnStartState.atn):g=new p.DFASerializer(this,f),g.toString()}toLexerString(){return this.s0?new r.LexerDFASerializer(this).toString():""}};return u([n.NotNull],o.prototype,"states",void 0),u([n.NotNull],o.prototype,"atnStartState",void 0),u([n.NotNull],o.prototype,"atn",void 0),o=u([i(0,n.NotNull)],o),ft.DFA=o,ft}var kr={},Ur={},lc;function cc(){if(lc)return Ur;lc=1;var u=Ur&&Ur.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Ur,"__esModule",{value:!0}),Ur.BasicState=void 0;const i=rt(),c=Ie(),h=Q();let p=class extends i.ATNState{get stateType(){return c.ATNStateType.BASIC}};return u([h.Override],p.prototype,"stateType",null),Ur.BasicState=p,Ur}var fc;function hc(){if(fc)return kr;fc=1;var u=kr&&kr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(kr,"__esModule",{value:!0}),kr.InvalidState=void 0;const i=Ie(),c=cc(),h=Q();let p=class extends c.BasicState{get stateType(){return i.ATNStateType.INVALID_TYPE}};return u([h.Override],p.prototype,"stateType",null),kr.InvalidState=p,kr}var yt={},_t={},mt={},pc;function ks(){if(pc)return mt;pc=1;var u=mt&&mt.__decorate||function(n,t,s,e){var o=arguments.length,l=o<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,t,s,e);else for(var d=n.length-1;d>=0;d--)(f=n[d])&&(l=(o<3?f(l):o>3?f(t,s,l):f(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l},i=mt&&mt.__param||function(n,t){return function(s,e){t(s,e,n)}};Object.defineProperty(mt,"__esModule",{value:!0}),mt.SetTransition=void 0;const c=Vr(),h=Q(),p=Ne(),a=lr();let r=class extends a.Transition{constructor(t,s){super(t),s==null&&(s=c.IntervalSet.of(p.Token.INVALID_TYPE)),this.set=s}get serializationType(){return 7}get label(){return this.set}matches(t,s,e){return this.set.contains(t)}toString(){return this.set.toString()}};return u([h.NotNull],r.prototype,"set",void 0),u([h.Override],r.prototype,"serializationType",null),u([h.Override,h.NotNull],r.prototype,"label",null),u([h.Override],r.prototype,"matches",null),u([h.Override,h.NotNull],r.prototype,"toString",null),r=u([i(0,h.NotNull),i(1,h.Nullable)],r),mt.SetTransition=r,mt}var dc;function Us(){if(dc)return _t;dc=1;var u=_t&&_t.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=_t&&_t.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(_t,"__esModule",{value:!0}),_t.NotSetTransition=void 0;const c=Q(),h=ks();let p=class extends h.SetTransition{constructor(r,n){super(r,n)}get serializationType(){return 8}matches(r,n,t){return r>=n&&r<=t&&!super.matches(r,n,t)}toString(){return"~"+super.toString()}};return u([c.Override],p.prototype,"serializationType",null),u([c.Override],p.prototype,"matches",null),u([c.Override],p.prototype,"toString",null),p=u([i(0,c.NotNull),i(1,c.Nullable)],p),_t.NotSetTransition=p,_t}var zr={},xc;function ei(){if(xc)return zr;xc=1;var u=zr&&zr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(zr,"__esModule",{value:!0}),zr.RuleStopState=void 0;const i=rt(),c=Ie(),h=Q();let p=class extends i.ATNState{get nonStopStateNumber(){return-1}get stateType(){return c.ATNStateType.RULE_STOP}};return u([h.Override],p.prototype,"nonStopStateNumber",null),u([h.Override],p.prototype,"stateType",null),zr.RuleStopState=p,zr}var gt={},yc;function zs(){if(yc)return gt;yc=1;var u=gt&>.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=gt&>.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(gt,"__esModule",{value:!0}),gt.RuleTransition=void 0;const c=Q(),h=lr();let p=class extends h.Transition{constructor(r,n,t,s){super(r),this.tailCall=!1,this.optimizedTailCall=!1,this.ruleIndex=n,this.precedence=t,this.followState=s}get serializationType(){return 3}get isEpsilon(){return!0}matches(r,n,t){return!1}};return u([c.NotNull],p.prototype,"followState",void 0),u([c.Override],p.prototype,"serializationType",null),u([c.Override],p.prototype,"isEpsilon",null),u([c.Override],p.prototype,"matches",null),p=u([i(0,c.NotNull),i(3,c.NotNull)],p),gt.RuleTransition=p,gt}var vt={},_c;function mc(){if(_c)return vt;_c=1;var u=vt&&vt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=vt&&vt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(vt,"__esModule",{value:!0}),vt.WildcardTransition=void 0;const c=Q(),h=lr();let p=class extends h.Transition{constructor(r){super(r)}get serializationType(){return 9}matches(r,n,t){return r>=n&&r<=t}toString(){return"."}};return u([c.Override],p.prototype,"serializationType",null),u([c.Override],p.prototype,"matches",null),u([c.Override,c.NotNull],p.prototype,"toString",null),p=u([i(0,c.NotNull)],p),vt.WildcardTransition=p,vt}var gc;function x0(){if(gc)return yt;gc=1;var u=yt&&yt.__decorate||function(x,m,y,_){var v=arguments.length,N=v<3?m:_===null?_=Object.getOwnPropertyDescriptor(m,y):_,T;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(x,m,y,_);else for(var b=x.length-1;b>=0;b--)(T=x[b])&&(N=(v<3?T(N):v>3?T(m,y,N):T(m,y))||N);return v>3&&N&&Object.defineProperty(m,y,N),N},i=yt&&yt.__param||function(x,m){return function(y,_){m(y,_,x)}};Object.defineProperty(yt,"__esModule",{value:!0}),yt.LL1Analyzer=void 0;const c=Ps(),h=cr(),p=Li(),a=fr(),r=Vr(),n=Q(),t=Us(),s=Ze(),e=Xe(),o=ei(),l=zs(),f=Ne(),d=mc();let g=class Tu{constructor(m){this.atn=m}getDecisionLookahead(m){if(m==null)return;let y=new Array(m.numberOfTransitions);for(let _=0;_<m.numberOfTransitions;_++){let v=new r.IntervalSet;y[_]=v;let N=new h.Array2DHashSet(s.ObjectEqualityComparator.INSTANCE);this._LOOK(m.transition(_).target,void 0,e.PredictionContext.EMPTY_LOCAL,v,N,new a.BitSet,!1,!1),(v.size===0||v.contains(Tu.HIT_PRED))&&(v=void 0,y[_]=v)}return y}LOOK(m,y,_){if(_===void 0){if(m.atn==null)throw new Error("Illegal state");_=m.atn.ruleToStopState[m.ruleIndex]}else _===null&&(_=void 0);let v=new r.IntervalSet;return this._LOOK(m,_,y,v,new h.Array2DHashSet,new a.BitSet,!0,!0),v}_LOOK(m,y,_,v,N,T,b,O){let D=p.ATNConfig.create(m,0,_);if(!N.add(D))return;if(m===y){if(e.PredictionContext.isEmptyLocal(_)){v.add(f.Token.EPSILON);return}else if(_.isEmpty){O&&v.add(f.Token.EOF);return}}if(m instanceof o.RuleStopState){if(_.isEmpty&&!e.PredictionContext.isEmptyLocal(_)){O&&v.add(f.Token.EOF);return}let z=T.get(m.ruleIndex);try{T.clear(m.ruleIndex);for(let U=0;U<_.size;U++){if(_.getReturnState(U)===e.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let te=this.atn.states[_.getReturnState(U)];this._LOOK(te,y,_.getParent(U),v,N,T,b,O)}}finally{z&&T.set(m.ruleIndex)}}let k=m.numberOfTransitions;for(let z=0;z<k;z++){let U=m.transition(z);if(U instanceof l.RuleTransition){if(T.get(U.ruleIndex))continue;let te=_.getChild(U.followState.stateNumber);try{T.set(U.ruleIndex),this._LOOK(U.target,y,te,v,N,T,b,O)}finally{T.clear(U.ruleIndex)}}else if(U instanceof c.AbstractPredicateTransition)b?this._LOOK(U.target,y,_,v,N,T,b,O):v.add(Tu.HIT_PRED);else if(U.isEpsilon)this._LOOK(U.target,y,_,v,N,T,b,O);else if(U instanceof d.WildcardTransition)v.addAll(r.IntervalSet.of(f.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType));else{let te=U.label;te!=null&&(U instanceof t.NotSetTransition&&(te=te.complement(r.IntervalSet.of(f.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType))),v.addAll(te))}}}};return g.HIT_PRED=f.Token.INVALID_TYPE,u([n.NotNull],g.prototype,"atn",void 0),u([n.NotNull,i(0,n.NotNull),i(1,n.NotNull)],g.prototype,"LOOK",null),u([i(0,n.NotNull),i(2,n.NotNull),i(3,n.NotNull),i(4,n.NotNull),i(5,n.NotNull)],g.prototype,"_LOOK",null),g=u([i(0,n.NotNull)],g),yt.LL1Analyzer=g,yt}var vc;function At(){return vc||(vc=1,(function(u){var i=Pr&&Pr.__decorate||function(d,g,x,m){var y=arguments.length,_=y<3?g:m===null?m=Object.getOwnPropertyDescriptor(g,x):m,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(d,g,x,m);else for(var N=d.length-1;N>=0;N--)(v=d[N])&&(_=(y<3?v(_):y>3?v(g,x,_):v(g,x))||_);return y>3&&_&&Object.defineProperty(g,x,_),_},c=Pr&&Pr.__param||function(d,g){return function(x,m){g(x,m,d)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ATN=void 0;const h=Fn(),p=ac(),a=Vr(),r=hc(),n=x0(),t=Q(),s=Ze(),e=Xe(),o=Ne(),l=Fe();let f=class{constructor(g,x){this.states=[],this.decisionToState=[],this.modeNameToStartState=new Map,this.modeToStartState=[],this.contextCache=new h.Array2DHashMap(s.ObjectEqualityComparator.INSTANCE),this.decisionToDFA=[],this.modeToDFA=[],this.LL1Table=new Map,this.grammarType=g,this.maxTokenType=x}clearDFA(){this.decisionToDFA=new Array(this.decisionToState.length);for(let g=0;g<this.decisionToDFA.length;g++)this.decisionToDFA[g]=new p.DFA(this.decisionToState[g],g);this.modeToDFA=new Array(this.modeToStartState.length);for(let g=0;g<this.modeToDFA.length;g++)this.modeToDFA[g]=new p.DFA(this.modeToStartState[g]);this.contextCache.clear(),this.LL1Table.clear()}get contextCacheSize(){return this.contextCache.size}getCachedContext(g){return e.PredictionContext.getCachedContext(g,this.contextCache,new e.PredictionContext.IdentityHashMap)}getDecisionToDFA(){return l(this.decisionToDFA!=null&&this.decisionToDFA.length===this.decisionToState.length),this.decisionToDFA}nextTokens(g,x){return x?new n.LL1Analyzer(this).LOOK(g,x):(g.nextTokenWithinRule||(g.nextTokenWithinRule=this.nextTokens(g,e.PredictionContext.EMPTY_LOCAL),g.nextTokenWithinRule.setReadonly(!0)),g.nextTokenWithinRule)}addState(g){g.atn=this,g.stateNumber=this.states.length,this.states.push(g)}removeState(g){let x=new r.InvalidState;x.atn=this,x.stateNumber=g.stateNumber,this.states[g.stateNumber]=x}defineMode(g,x){this.modeNameToStartState.set(g,x),this.modeToStartState.push(x),this.modeToDFA.push(new p.DFA(x)),this.defineDecisionState(x)}defineDecisionState(g){return this.decisionToState.push(g),g.decision=this.decisionToState.length-1,this.decisionToDFA.push(new p.DFA(g,g.decision)),g.decision}getDecisionState(g){if(this.decisionToState.length>0)return this.decisionToState[g]}get numberOfDecisions(){return this.decisionToState.length}getExpectedTokens(g,x){if(g<0||g>=this.states.length)throw new RangeError("Invalid state number.");let m=x,y=this.states[g],_=this.nextTokens(y);if(!_.contains(o.Token.EPSILON))return _;let v=new a.IntervalSet;for(v.addAll(_),v.remove(o.Token.EPSILON);m!=null&&m.invokingState>=0&&_.contains(o.Token.EPSILON);){let T=this.states[m.invokingState].transition(0);_=this.nextTokens(T.followState),v.addAll(_),v.remove(o.Token.EPSILON),m=m._parent}return _.contains(o.Token.EPSILON)&&v.add(o.Token.EOF),v}};i([t.NotNull],f.prototype,"states",void 0),i([t.NotNull],f.prototype,"decisionToState",void 0),i([t.NotNull],f.prototype,"modeNameToStartState",void 0),i([t.NotNull],f.prototype,"modeToStartState",void 0),i([t.NotNull],f.prototype,"decisionToDFA",void 0),i([t.NotNull],f.prototype,"modeToDFA",void 0),i([t.NotNull],f.prototype,"nextTokens",null),i([c(0,t.NotNull)],f.prototype,"removeState",null),i([c(0,t.NotNull),c(1,t.NotNull)],f.prototype,"defineMode",null),i([c(0,t.NotNull)],f.prototype,"defineDecisionState",null),i([t.NotNull],f.prototype,"getExpectedTokens",null),f=i([c(0,t.NotNull)],f),u.ATN=f,(function(d){d.INVALID_ALT_NUMBER=0})(f=u.ATN||(u.ATN={})),u.ATN=f})(Pr)),Pr}var Tt={},Et={},Ac;function y0(){if(Ac)return Et;Ac=1;var u=Et&&Et.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Et&&Et.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Et,"__esModule",{value:!0}),Et.LexerIndexedCustomAction=void 0;const c=Pe(),h=Q();let p=class sp{constructor(r,n){this._offset=r,this._action=n}get offset(){return this._offset}get action(){return this._action}get actionType(){return this._action.actionType}get isPositionDependent(){return!0}execute(r){this._action.execute(r)}hashCode(){let r=c.MurmurHash.initialize();return r=c.MurmurHash.update(r,this._offset),r=c.MurmurHash.update(r,this._action),c.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof sp?this._offset===r._offset&&this._action.equals(r._action):!1}};return u([h.NotNull],p.prototype,"action",null),u([h.Override],p.prototype,"actionType",null),u([h.Override],p.prototype,"isPositionDependent",null),u([h.Override],p.prototype,"execute",null),u([h.Override],p.prototype,"hashCode",null),u([h.Override],p.prototype,"equals",null),p=u([i(1,h.NotNull)],p),Et.LexerIndexedCustomAction=p,Et}var Tc;function _0(){if(Tc)return Tt;Tc=1;var u=Tt&&Tt.__decorate||function(n,t,s,e){var o=arguments.length,l=o<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,t,s,e);else for(var d=n.length-1;d>=0;d--)(f=n[d])&&(l=(o<3?f(l):o>3?f(t,s,l):f(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l},i=Tt&&Tt.__param||function(n,t){return function(s,e){t(s,e,n)}};Object.defineProperty(Tt,"__esModule",{value:!0}),Tt.LexerActionExecutor=void 0;const c=Di(),h=y0(),p=Pe(),a=Q();let r=class Si{constructor(t){this._lexerActions=t;let s=p.MurmurHash.initialize();for(let e of t)s=p.MurmurHash.update(s,e);this.cachedHashCode=p.MurmurHash.finish(s,t.length)}static append(t,s){if(!t)return new Si([s]);let e=t._lexerActions.slice(0);return e.push(s),new Si(e)}fixOffsetBeforeMatch(t){let s;for(let e=0;e<this._lexerActions.length;e++)this._lexerActions[e].isPositionDependent&&!(this._lexerActions[e]instanceof h.LexerIndexedCustomAction)&&(s||(s=this._lexerActions.slice(0)),s[e]=new h.LexerIndexedCustomAction(t,this._lexerActions[e]));return s?new Si(s):this}get lexerActions(){return this._lexerActions}execute(t,s,e){let o=!1,l=s.index;try{for(let f of this._lexerActions){if(f instanceof h.LexerIndexedCustomAction){let d=f.offset;s.seek(e+d),f=f.action,o=e+d!==l}else f.isPositionDependent&&(s.seek(l),o=!1);f.execute(t)}}finally{o&&s.seek(l)}}hashCode(){return this.cachedHashCode}equals(t){return t===this?!0:t instanceof Si?this.cachedHashCode===t.cachedHashCode&&c.ArrayEqualityComparator.INSTANCE.equals(this._lexerActions,t._lexerActions):!1}};return u([a.NotNull],r.prototype,"_lexerActions",void 0),u([a.NotNull],r.prototype,"lexerActions",null),u([i(0,a.NotNull)],r.prototype,"execute",null),u([a.Override],r.prototype,"hashCode",null),u([a.Override],r.prototype,"equals",null),u([a.NotNull,i(1,a.NotNull)],r,"append",null),r=u([i(0,a.NotNull)],r),Tt.LexerActionExecutor=r,Tt}var St={},Ec;function ji(){if(Ec)return St;Ec=1;var u=St&&St.__decorate||function(n,t,s,e){var o=arguments.length,l=o<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,t,s,e);else for(var d=n.length-1;d>=0;d--)(f=n[d])&&(l=(o<3?f(l):o>3?f(t,s,l):f(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l},i=St&&St.__param||function(n,t){return function(s,e){t(s,e,n)}};Object.defineProperty(St,"__esModule",{value:!0}),St.LexerNoViableAltException=void 0;const c=ar(),h=Q(),p=je(),a=ut();let r=class extends c.RecognitionException{constructor(t,s,e,o){super(t,s),this._startIndex=e,this._deadEndConfigs=o}get startIndex(){return this._startIndex}get deadEndConfigs(){return this._deadEndConfigs}get inputStream(){return super.inputStream}toString(){let t="";return this._startIndex>=0&&this._startIndex<this.inputStream.size&&(t=this.inputStream.getText(p.Interval.of(this._startIndex,this._startIndex)),t=a.escapeWhitespace(t,!1)),`LexerNoViableAltException('${t}')`}};return u([h.Override],r.prototype,"inputStream",null),u([h.Override],r.prototype,"toString",null),r=u([i(1,h.NotNull)],r),St.LexerNoViableAltException=r,St}var Hr={},Sc;function m0(){if(Sc)return Hr;Sc=1;var u=Hr&&Hr.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(Hr,"__esModule",{value:!0}),Hr.OrderedATNConfigSet=void 0;const i=Jn(),c=Q();let h=class up extends i.ATNConfigSet{constructor(a,r){a!=null&&r!=null?super(a,r):super()}clone(a){let r=new up(this,a);return!a&&this.isReadOnly&&r.addAll(this),r}getKey(a){return{state:0,alt:a.hashCode()}}canMerge(a,r,n){return a.equals(n)}};return u([c.Override],h.prototype,"clone",null),u([c.Override],h.prototype,"getKey",null),u([c.Override],h.prototype,"canMerge",null),Hr.OrderedATNConfigSet=h,Hr}var Nc;function Mi(){return Nc||(Nc=1,(function(u){var i=Rr&&Rr.__decorate||function(N,T,b,O){var D=arguments.length,k=D<3?T:O===null?O=Object.getOwnPropertyDescriptor(T,b):O,z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(N,T,b,O);else for(var U=N.length-1;U>=0;U--)(z=N[U])&&(k=(D<3?z(k):D>3?z(T,b,k):z(T,b))||k);return D>3&&k&&Object.defineProperty(T,b,k),k},c=Rr&&Rr.__param||function(N,T){return function(b,O){T(b,O,N)}};Object.defineProperty(u,"__esModule",{value:!0}),u.LexerATNSimulator=void 0;const h=zl(),p=At(),a=Li(),r=Jn(),n=Bi(),t=Fi(),s=je(),e=ur(),o=hr(),l=_0(),f=ji(),d=Q(),g=m0(),x=Xe(),m=ei(),y=Ne(),_=Fe();let v=class ke extends n.ATNSimulator{constructor(T,b){super(T),this.optimize_tail_calls=!0,this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=o.Lexer.DEFAULT_MODE,this.prevAccept=new ke.SimState,this.recog=b}copyState(T){this._charPositionInLine=T.charPositionInLine,this._line=T._line,this.mode=T.mode,this.startIndex=T.startIndex}match(T,b){this.mode=b;let O=T.mark();try{this.startIndex=T.index,this.prevAccept.reset();let D=this.atn.modeToDFA[b].s0;return D==null?this.matchATN(T):this.execATN(T,D)}finally{T.release(O)}}reset(){this.prevAccept.reset(),this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=o.Lexer.DEFAULT_MODE}matchATN(T){let b=this.atn.modeToStartState[this.mode];ke.debug&&console.log(`matchATN mode ${this.mode} start: ${b}`);let O=this.mode,D=this.computeStartState(T,b),k=D.hasSemanticContext;k&&(D.hasSemanticContext=!1);let z=this.addDFAState(D);if(!k){let te=this.atn.modeToDFA[this.mode];te.s0?z=te.s0:te.s0=z}let U=this.execATN(T,z);return ke.debug&&console.log(`DFA after matchATN: ${this.atn.modeToDFA[O].toLexerString()}`),U}execATN(T,b){ke.debug&&console.log(`start state closure=${b.configs}`),b.isAcceptState&&this.captureSimState(this.prevAccept,T,b);let O=T.LA(1),D=b;for(;;){ke.debug&&console.log(`execATN loop starting closure: ${D.configs}`);let k=this.getExistingTargetState(D,O);if(k==null&&(k=this.computeTargetState(T,D,O)),k===n.ATNSimulator.ERROR||(O!==e.IntStream.EOF&&this.consume(T),k.isAcceptState&&(this.captureSimState(this.prevAccept,T,k),O===e.IntStream.EOF)))break;O=T.LA(1),D=k}return this.failOrAccept(this.prevAccept,T,D.configs,O)}getExistingTargetState(T,b){let O=T.getTarget(b);return ke.debug&&O!=null&&console.log("reuse state "+T.stateNumber+" edge to "+O.stateNumber),O}computeTargetState(T,b,O){let D=new g.OrderedATNConfigSet;return this.getReachableConfigSet(T,b.configs,D,O),D.isEmpty?(D.hasSemanticContext||this.addDFAEdge(b,O,n.ATNSimulator.ERROR),n.ATNSimulator.ERROR):this.addDFAEdge(b,O,D)}failOrAccept(T,b,O,D){if(T.dfaState!=null){let k=T.dfaState.lexerActionExecutor;return this.accept(b,k,this.startIndex,T.index,T.line,T.charPos),T.dfaState.prediction}else{if(D===e.IntStream.EOF&&b.index===this.startIndex)return y.Token.EOF;throw new f.LexerNoViableAltException(this.recog,b,this.startIndex,O)}}getReachableConfigSet(T,b,O,D){let k=p.ATN.INVALID_ALT_NUMBER;for(let z of b){let U=z.alt===k;if(U&&z.hasPassedThroughNonGreedyDecision)continue;ke.debug&&console.log(`testing ${this.getTokenName(D)} at ${z.toString(this.recog,!0)}`);let te=z.state.numberOfOptimizedTransitions;for(let ie=0;ie<te;ie++){let oe=z.state.getOptimizedTransition(ie),he=this.getReachableTarget(oe,D);if(he!=null){let Ee=z.lexerActionExecutor,le;Ee!=null?(Ee=Ee.fixOffsetBeforeMatch(T.index-this.startIndex),le=z.transform(he,!0,Ee)):(_(z.lexerActionExecutor==null),le=z.transform(he,!0));let Z=D===e.IntStream.EOF;if(this.closure(T,le,O,U,!0,Z)){k=z.alt;break}}}}}accept(T,b,O,D,k,z){ke.debug&&console.log(`ACTION ${b}`),T.seek(D),this._line=k,this._charPositionInLine=z,b!=null&&this.recog!=null&&b.execute(this.recog,T,O)}getReachableTarget(T,b){if(T.matches(b,o.Lexer.MIN_CHAR_VALUE,o.Lexer.MAX_CHAR_VALUE))return T.target}computeStartState(T,b){let O=x.PredictionContext.EMPTY_FULL,D=new g.OrderedATNConfigSet;for(let k=0;k<b.numberOfTransitions;k++){let z=b.transition(k).target,U=a.ATNConfig.create(z,k+1,O);this.closure(T,U,D,!1,!1,!1)}return D}closure(T,b,O,D,k,z){if(ke.debug&&console.log("closure("+b.toString(this.recog,!0)+")"),b.state instanceof m.RuleStopState){ke.debug&&(this.recog!=null?console.log(`closure at ${this.recog.ruleNames[b.state.ruleIndex]} rule stop ${b}`):console.log(`closure at rule stop ${b}`));let te=b.context;if(te.isEmpty)return O.add(b),!0;te.hasEmpty&&(O.add(b.transform(b.state,!0,x.PredictionContext.EMPTY_FULL)),D=!0);for(let ie=0;ie<te.size;ie++){let oe=te.getReturnState(ie);if(oe===x.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let he=te.getParent(ie),Ee=this.atn.states[oe],le=b.transform(Ee,!1,he);D=this.closure(T,le,O,D,k,z)}return D}b.state.onlyHasEpsilonTransitions||(!D||!b.hasPassedThroughNonGreedyDecision)&&O.add(b);let U=b.state;for(let te=0;te<U.numberOfOptimizedTransitions;te++){let ie=U.getOptimizedTransition(te),oe=this.getEpsilonTarget(T,b,ie,O,k,z);oe!=null&&(D=this.closure(T,oe,O,D,k,z))}return D}getEpsilonTarget(T,b,O,D,k,z){let U;switch(O.serializationType){case 3:let te=O;if(this.optimize_tail_calls&&te.optimizedTailCall&&!b.context.hasEmpty)U=b.transform(O.target,!0);else{let oe=b.context.getChild(te.followState.stateNumber);U=b.transform(O.target,!0,oe)}break;case 10:throw new Error("Precedence predicates are not supported in lexers.");case 4:let ie=O;ke.debug&&console.log("EVAL rule "+ie.ruleIndex+":"+ie.predIndex),D.hasSemanticContext=!0,this.evaluatePredicate(T,ie.ruleIndex,ie.predIndex,k)?U=b.transform(O.target,!0):U=void 0;break;case 6:if(b.context.hasEmpty){let oe=l.LexerActionExecutor.append(b.lexerActionExecutor,this.atn.lexerActions[O.actionIndex]);U=b.transform(O.target,!0,oe);break}else{U=b.transform(O.target,!0);break}case 1:U=b.transform(O.target,!0);break;case 5:case 2:case 7:if(z&&O.matches(e.IntStream.EOF,o.Lexer.MIN_CHAR_VALUE,o.Lexer.MAX_CHAR_VALUE)){U=b.transform(O.target,!1);break}U=void 0;break;default:U=void 0;break}return U}evaluatePredicate(T,b,O,D){if(this.recog==null)return!0;if(!D)return this.recog.sempred(void 0,b,O);let k=this._charPositionInLine,z=this._line,U=T.index,te=T.mark();try{return this.consume(T),this.recog.sempred(void 0,b,O)}finally{this._charPositionInLine=k,this._line=z,T.seek(U),T.release(te)}}captureSimState(T,b,O){T.index=b.index,T.line=this._line,T.charPos=this._charPositionInLine,T.dfaState=O}addDFAEdge(T,b,O){if(O instanceof r.ATNConfigSet){let D=O.hasSemanticContext;D&&(O.hasSemanticContext=!1);let k=this.addDFAState(O);return D||this.addDFAEdge(T,b,k),k}else ke.debug&&console.log("EDGE "+T+" -> "+O+" upon "+String.fromCharCode(b)),T?.setTarget(b,O)}addDFAState(T){_(!T.hasSemanticContext);let b=new t.DFAState(T),O=this.atn.modeToDFA[this.mode].states.get(b);if(O!=null)return O;T.optimizeConfigs(this);let D=new t.DFAState(T.clone(!0)),k;for(let z of T)if(z.state instanceof m.RuleStopState){k=z;break}if(k!=null){let z=this.atn.ruleToTokenType[k.state.ruleIndex],U=k.lexerActionExecutor;D.acceptStateInfo=new h.AcceptStateInfo(z,U)}return this.atn.modeToDFA[this.mode].addState(D)}getDFA(T){return this.atn.modeToDFA[T]}getText(T){return T.getText(s.Interval.of(this.startIndex,T.index-1))}get line(){return this._line}set line(T){this._line=T}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(T){this._charPositionInLine=T}consume(T){T.LA(1)===10?(this._line++,this._charPositionInLine=0):this._charPositionInLine++,T.consume()}getTokenName(T){return T===-1?"EOF":"'"+String.fromCharCode(T)+"'"}};i([d.NotNull],v.prototype,"prevAccept",void 0),i([c(0,d.NotNull)],v.prototype,"copyState",null),i([c(0,d.NotNull)],v.prototype,"match",null),i([d.Override],v.prototype,"reset",null),i([c(0,d.NotNull)],v.prototype,"matchATN",null),i([c(0,d.NotNull),c(1,d.NotNull)],v.prototype,"execATN",null),i([c(0,d.NotNull)],v.prototype,"getExistingTargetState",null),i([d.NotNull,c(0,d.NotNull),c(1,d.NotNull)],v.prototype,"computeTargetState",null),i([c(0,d.NotNull),c(1,d.NotNull),c(2,d.NotNull)],v.prototype,"getReachableConfigSet",null),i([c(0,d.NotNull)],v.prototype,"accept",null),i([d.NotNull,c(0,d.NotNull),c(1,d.NotNull)],v.prototype,"computeStartState",null),i([c(0,d.NotNull),c(1,d.NotNull),c(2,d.NotNull)],v.prototype,"closure",null),i([c(0,d.NotNull),c(1,d.NotNull),c(2,d.NotNull),c(3,d.NotNull)],v.prototype,"getEpsilonTarget",null),i([c(0,d.NotNull)],v.prototype,"evaluatePredicate",null),i([c(0,d.NotNull),c(1,d.NotNull),c(2,d.NotNull)],v.prototype,"captureSimState",null),i([d.NotNull,c(0,d.NotNull)],v.prototype,"addDFAState",null),i([d.NotNull],v.prototype,"getDFA",null),i([d.NotNull,c(0,d.NotNull)],v.prototype,"getText",null),i([c(0,d.NotNull)],v.prototype,"consume",null),i([d.NotNull],v.prototype,"getTokenName",null),v=i([c(0,d.NotNull)],v),u.LexerATNSimulator=v,(function(N){N.debug=!1,N.dfa_debug=!1;class T{constructor(){this.index=-1,this.line=0,this.charPos=-1}reset(){this.index=-1,this.line=0,this.charPos=-1,this.dfaState=void 0}}N.SimState=T})(v=u.LexerATNSimulator||(u.LexerATNSimulator={})),u.LexerATNSimulator=v})(Rr)),Rr}var bc;function hr(){if(bc)return Or;bc=1;var u=Or&&Or.__decorate||function(o,l,f,d){var g=arguments.length,x=g<3?l:d===null?d=Object.getOwnPropertyDescriptor(l,f):d,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(o,l,f,d);else for(var y=o.length-1;y>=0;y--)(m=o[y])&&(x=(g<3?m(x):g>3?m(l,f,x):m(l,f))||x);return g>3&&x&&Object.defineProperty(l,f,x),x};Object.defineProperty(Or,"__esModule",{value:!0}),Or.Lexer=void 0;const i=Bs(),c=kl(),h=je(),p=ur(),a=Mi(),r=ji(),n=Q(),t=Yn(),s=Ne();let e=class xr extends t.Recognizer{constructor(l){super(),this._factory=i.CommonTokenFactory.DEFAULT,this._tokenStartCharIndex=-1,this._tokenStartLine=0,this._tokenStartCharPositionInLine=0,this._hitEOF=!1,this._channel=0,this._type=0,this._modeStack=new c.IntegerStack,this._mode=xr.DEFAULT_MODE,this._input=l,this._tokenFactorySourcePair={source:this,stream:l}}static get DEFAULT_TOKEN_CHANNEL(){return s.Token.DEFAULT_CHANNEL}static get HIDDEN(){return s.Token.HIDDEN_CHANNEL}reset(l){(l===void 0||l)&&this._input.seek(0),this._token=void 0,this._type=s.Token.INVALID_TYPE,this._channel=s.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartCharPositionInLine=-1,this._tokenStartLine=-1,this._text=void 0,this._hitEOF=!1,this._mode=xr.DEFAULT_MODE,this._modeStack.clear(),this.interpreter.reset()}nextToken(){if(this._input==null)throw new Error("nextToken requires a non-null input stream.");let l=this._input.mark();try{e:for(;;){if(this._hitEOF)return this.emitEOF();this._token=void 0,this._channel=s.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartCharPositionInLine=this.interpreter.charPositionInLine,this._tokenStartLine=this.interpreter.line,this._text=void 0;do{this._type=s.Token.INVALID_TYPE;let f;try{f=this.interpreter.match(this._input,this._mode)}catch(d){if(d instanceof r.LexerNoViableAltException)this.notifyListeners(d),this.recover(d),f=xr.SKIP;else throw d}if(this._input.LA(1)===p.IntStream.EOF&&(this._hitEOF=!0),this._type===s.Token.INVALID_TYPE&&(this._type=f),this._type===xr.SKIP)continue e}while(this._type===xr.MORE);return this._token==null?this.emit():this._token}}finally{this._input.release(l)}}skip(){this._type=xr.SKIP}more(){this._type=xr.MORE}mode(l){this._mode=l}pushMode(l){a.LexerATNSimulator.debug&&console.log("pushMode "+l),this._modeStack.push(this._mode),this.mode(l)}popMode(){if(this._modeStack.isEmpty)throw new Error("EmptyStackException");return a.LexerATNSimulator.debug&&console.log("popMode back to "+this._modeStack.peek()),this.mode(this._modeStack.pop()),this._mode}get tokenFactory(){return this._factory}set tokenFactory(l){this._factory=l}get inputStream(){return this._input}set inputStream(l){this.reset(!1),this._input=l,this._tokenFactorySourcePair={source:this,stream:this._input}}get sourceName(){return this._input.sourceName}emit(l){return l||(l=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.charIndex-1,this._tokenStartLine,this._tokenStartCharPositionInLine)),this._token=l,l}emitEOF(){let l=this.charPositionInLine,f=this.line,d=this._factory.create(this._tokenFactorySourcePair,s.Token.EOF,void 0,s.Token.DEFAULT_CHANNEL,this._input.index,this._input.index-1,f,l);return this.emit(d),d}get line(){return this.interpreter.line}set line(l){this.interpreter.line=l}get charPositionInLine(){return this.interpreter.charPositionInLine}set charPositionInLine(l){this.interpreter.charPositionInLine=l}get charIndex(){return this._input.index}get text(){return this._text!=null?this._text:this.interpreter.getText(this._input)}set text(l){this._text=l}get token(){return this._token}set token(l){this._token=l}set type(l){this._type=l}get type(){return this._type}set channel(l){this._channel=l}get channel(){return this._channel}getAllTokens(){let l=[],f=this.nextToken();for(;f.type!==s.Token.EOF;)l.push(f),f=this.nextToken();return l}notifyListeners(l){let f=this._input.getText(h.Interval.of(this._tokenStartCharIndex,this._input.index)),d="token recognition error at: '"+this.getErrorDisplay(f)+"'",g=this.getErrorListenerDispatch();g.syntaxError&&g.syntaxError(this,void 0,this._tokenStartLine,this._tokenStartCharPositionInLine,d,l)}getErrorDisplay(l){if(typeof l=="number"){switch(l){case s.Token.EOF:return"<EOF>";case 10:return"\\n";case 9:return"\\t";case 13:return"\\r"}return String.fromCharCode(l)}return l.replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}getCharErrorDisplay(l){return"'"+this.getErrorDisplay(l)+"'"}recover(l){l instanceof r.LexerNoViableAltException?this._input.LA(1)!==p.IntStream.EOF&&this.interpreter.consume(this._input):this._input.consume()}};return e.DEFAULT_MODE=0,e.MORE=-2,e.SKIP=-3,e.MIN_CHAR_VALUE=0,e.MAX_CHAR_VALUE=1114111,u([n.Override],e.prototype,"nextToken",null),u([n.Override],e.prototype,"tokenFactory",null),u([n.Override],e.prototype,"inputStream",null),u([n.Override],e.prototype,"sourceName",null),u([n.Override],e.prototype,"line",null),u([n.Override],e.prototype,"charPositionInLine",null),Or.Lexer=e,Or}var Cc;function Vr(){if(Cc)return lt;Cc=1;var u=lt&<.__decorate||function(e,o,l,f){var d=arguments.length,g=d<3?o:f===null?f=Object.getOwnPropertyDescriptor(o,l):f,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(e,o,l,f);else for(var m=e.length-1;m>=0;m--)(x=e[m])&&(g=(d<3?x(g):d>3?x(o,l,g):x(o,l))||g);return d>3&&g&&Object.defineProperty(o,l,g),g},i=lt&<.__param||function(e,o){return function(l,f){o(l,f,e)}};Object.defineProperty(lt,"__esModule",{value:!0}),lt.IntervalSet=void 0;const c=Di(),h=Ls(),p=je(),a=hr(),r=Pe(),n=Q(),t=Ne();let s=class Te{constructor(o){this.readonly=!1,o!=null?this._intervals=o.slice(0):this._intervals=[]}static get COMPLETE_CHAR_SET(){return Te._COMPLETE_CHAR_SET===void 0&&(Te._COMPLETE_CHAR_SET=Te.of(a.Lexer.MIN_CHAR_VALUE,a.Lexer.MAX_CHAR_VALUE),Te._COMPLETE_CHAR_SET.setReadonly(!0)),Te._COMPLETE_CHAR_SET}static get EMPTY_SET(){return Te._EMPTY_SET==null&&(Te._EMPTY_SET=new Te,Te._EMPTY_SET.setReadonly(!0)),Te._EMPTY_SET}static of(o,l=o){let f=new Te;return f.add(o,l),f}clear(){if(this.readonly)throw new Error("can't alter readonly IntervalSet");this._intervals.length=0}add(o,l=o){this.addRange(p.Interval.of(o,l))}addRange(o){if(this.readonly)throw new Error("can't alter readonly IntervalSet");if(!(o.b<o.a)){for(let l=0;l<this._intervals.length;l++){let f=this._intervals[l];if(o.equals(f))return;if(o.adjacent(f)||!o.disjoint(f)){let d=o.union(f);for(this._intervals[l]=d;l<this._intervals.length-1;){l++;let g=this._intervals[l];if(!d.adjacent(g)&&d.disjoint(g))break;this._intervals.splice(l,1),l--,this._intervals[l]=d.union(g)}return}if(o.startsBeforeDisjoint(f)){this._intervals.splice(l,0,o);return}}this._intervals.push(o)}}static or(o){let l=new Te;for(let f of o)l.addAll(f);return l}addAll(o){if(o==null)return this;if(o instanceof Te){let l=o,f=l._intervals.length;for(let d=0;d<f;d++){let g=l._intervals[d];this.add(g.a,g.b)}}else for(let l of o.toArray())this.add(l);return this}complementRange(o,l){return this.complement(Te.of(o,l))}complement(o){if(o.isNil)return Te.EMPTY_SET;let l;return o instanceof Te?l=o:(l=new Te,l.addAll(o)),l.subtract(this)}subtract(o){if(o==null||o.isNil)return new Te(this._intervals);if(o instanceof Te)return Te.subtract(this,o);let l=new Te;return l.addAll(o),Te.subtract(this,l)}static subtract(o,l){if(o.isNil)return new Te;let f=new Te(o._intervals);if(l.isNil)return f;let d=0,g=0;for(;d<f._intervals.length&&g<l._intervals.length;){let x=f._intervals[d],m=l._intervals[g];if(m.b<x.a){g++;continue}if(m.a>x.b){d++;continue}let y,_;if(m.a>x.a&&(y=new p.Interval(x.a,m.a-1)),m.b<x.b&&(_=new p.Interval(m.b+1,x.b)),y)if(_){f._intervals[d]=y,f._intervals.splice(d+1,0,_),d++,g++;continue}else{f._intervals[d]=y,d++;continue}else if(_){f._intervals[d]=_,g++;continue}else{f._intervals.splice(d,1);continue}}return f}or(o){let l=new Te;return l.addAll(this),l.addAll(o),l}and(o){if(o.isNil)return new Te;let l=this._intervals,f=o._intervals,d,g=l.length,x=f.length,m=0,y=0;for(;m<g&&y<x;){let _=l[m],v=f[y];_.startsBeforeDisjoint(v)?m++:v.startsBeforeDisjoint(_)?y++:_.properlyContains(v)?(d||(d=new Te),d.addRange(_.intersection(v)),y++):v.properlyContains(_)?(d||(d=new Te),d.addRange(_.intersection(v)),m++):_.disjoint(v)||(d||(d=new Te),d.addRange(_.intersection(v)),_.startsAfterNonDisjoint(v)?y++:v.startsAfterNonDisjoint(_)&&m++)}return d||new Te}contains(o){let l=this._intervals.length,f=0,d=l-1;for(;f<=d;){let g=f+d>>1,x=this._intervals[g],m=x.a;if(x.b<o)f=g+1;else if(m>o)d=g-1;else return!0}return!1}get isNil(){return this._intervals==null||this._intervals.length===0}get maxElement(){if(this.isNil)throw new RangeError("set is empty");return this._intervals[this._intervals.length-1].b}get minElement(){if(this.isNil)throw new RangeError("set is empty");return this._intervals[0].a}get intervals(){return this._intervals}hashCode(){let o=r.MurmurHash.initialize();for(let l of this._intervals)o=r.MurmurHash.update(o,l.a),o=r.MurmurHash.update(o,l.b);return o=r.MurmurHash.finish(o,this._intervals.length*2),o}equals(o){return o==null||!(o instanceof Te)?!1:c.ArrayEqualityComparator.INSTANCE.equals(this._intervals,o._intervals)}toString(o=!1){let l="";if(this._intervals==null||this._intervals.length===0)return"{}";this.size>1&&(l+="{");let f=!0;for(let d of this._intervals){f?f=!1:l+=", ";let g=d.a,x=d.b;g===x?g===t.Token.EOF?l+="<EOF>":o?l+="'"+String.fromCodePoint(g)+"'":l+=g:o?l+="'"+String.fromCodePoint(g)+"'..'"+String.fromCodePoint(x)+"'":l+=g+".."+x}return this.size>1&&(l+="}"),l}toStringVocabulary(o){if(this._intervals==null||this._intervals.length===0)return"{}";let l="";this.size>1&&(l+="{");let f=!0;for(let d of this._intervals){f?f=!1:l+=", ";let g=d.a,x=d.b;if(g===x)l+=this.elementName(o,g);else for(let m=g;m<=x;m++)m>g&&(l+=", "),l+=this.elementName(o,m)}return this.size>1&&(l+="}"),l}elementName(o,l){return l===t.Token.EOF?"<EOF>":l===t.Token.EPSILON?"<EPSILON>":o.getDisplayName(l)}get size(){let o=0,l=this._intervals.length;if(l===1){let f=this._intervals[0];return f.b-f.a+1}for(let f=0;f<l;f++){let d=this._intervals[f];o+=d.b-d.a+1}return o}toIntegerList(){let o=new h.IntegerList(this.size),l=this._intervals.length;for(let f=0;f<l;f++){let d=this._intervals[f],g=d.a,x=d.b;for(let m=g;m<=x;m++)o.add(m)}return o}toSet(){let o=new Set;for(let l of this._intervals){let f=l.a,d=l.b;for(let g=f;g<=d;g++)o.add(g)}return o}toArray(){let o=new Array,l=this._intervals.length;for(let f=0;f<l;f++){let d=this._intervals[f],g=d.a,x=d.b;for(let m=g;m<=x;m++)o.push(m)}return o}remove(o){if(this.readonly)throw new Error("can't alter readonly IntervalSet");let l=this._intervals.length;for(let f=0;f<l;f++){let d=this._intervals[f],g=d.a,x=d.b;if(o<g)break;if(o===g&&o===x){this._intervals.splice(f,1);break}if(o===g){this._intervals[f]=p.Interval.of(d.a+1,d.b);break}if(o===x){this._intervals[f]=p.Interval.of(d.a,d.b-1);break}if(o>g&&o<x){let m=d.b;this._intervals[f]=p.Interval.of(d.a,o-1),this.add(o+1,m)}}}get isReadonly(){return this.readonly}setReadonly(o){if(this.readonly&&!o)throw new Error("can't alter readonly IntervalSet");this.readonly=o}};return u([n.Override],s.prototype,"addAll",null),u([n.Override],s.prototype,"complement",null),u([n.Override],s.prototype,"subtract",null),u([n.Override],s.prototype,"or",null),u([n.Override],s.prototype,"and",null),u([n.Override],s.prototype,"contains",null),u([n.Override],s.prototype,"isNil",null),u([n.Override],s.prototype,"hashCode",null),u([n.Override],s.prototype,"equals",null),u([i(0,n.NotNull)],s.prototype,"toStringVocabulary",null),u([n.NotNull,i(0,n.NotNull)],s.prototype,"elementName",null),u([n.Override],s.prototype,"size",null),u([n.Override],s.prototype,"remove",null),u([n.NotNull],s,"of",null),u([n.NotNull],s,"subtract",null),lt.IntervalSet=s,lt}var Wr={},$e={},Gr={},Oc;function Rc(){if(Oc)return Gr;Oc=1;var u=Gr&&Gr.__decorate||function(h,p,a,r){var n=arguments.length,t=n<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,a):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(h,p,a,r);else for(var e=h.length-1;e>=0;e--)(s=h[e])&&(t=(n<3?s(t):n>3?s(p,a,t):s(p,a))||t);return n>3&&t&&Object.defineProperty(p,a,t),t};Object.defineProperty(Gr,"__esModule",{value:!0}),Gr.ATNDeserializationOptions=void 0;const i=Q();let c=class jn{constructor(p){this.readOnly=!1,p?(this.verifyATN=p.verifyATN,this.generateRuleBypassTransitions=p.generateRuleBypassTransitions,this.optimize=p.optimize):(this.verifyATN=!0,this.generateRuleBypassTransitions=!1,this.optimize=!0)}static get defaultOptions(){return jn._defaultOptions==null&&(jn._defaultOptions=new jn,jn._defaultOptions.makeReadOnly()),jn._defaultOptions}get isReadOnly(){return this.readOnly}makeReadOnly(){this.readOnly=!0}get isVerifyATN(){return this.verifyATN}set isVerifyATN(p){this.throwIfReadOnly(),this.verifyATN=p}get isGenerateRuleBypassTransitions(){return this.generateRuleBypassTransitions}set isGenerateRuleBypassTransitions(p){this.throwIfReadOnly(),this.generateRuleBypassTransitions=p}get isOptimize(){return this.optimize}set isOptimize(p){this.throwIfReadOnly(),this.optimize=p}throwIfReadOnly(){if(this.isReadOnly)throw new Error("The object is read only.")}};return u([i.NotNull],c,"defaultOptions",null),Gr.ATNDeserializationOptions=c,Gr}var Nt={},bt={},Pc;function Dc(){if(Pc)return bt;Pc=1;var u=bt&&bt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=bt&&bt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(bt,"__esModule",{value:!0}),bt.ActionTransition=void 0;const c=Q(),h=lr();let p=class extends h.Transition{constructor(r,n,t=-1,s=!1){super(r),this.ruleIndex=n,this.actionIndex=t,this.isCtxDependent=s}get serializationType(){return 6}get isEpsilon(){return!0}matches(r,n,t){return!1}toString(){return"action_"+this.ruleIndex+":"+this.actionIndex}};return u([c.Override],p.prototype,"serializationType",null),u([c.Override],p.prototype,"isEpsilon",null),u([c.Override],p.prototype,"matches",null),u([c.Override],p.prototype,"toString",null),p=u([i(0,c.NotNull)],p),bt.ActionTransition=p,bt}var Ct={},Ic;function wc(){if(Ic)return Ct;Ic=1;var u=Ct&&Ct.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=Ct&&Ct.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.AtomTransition=void 0;const c=Vr(),h=Q(),p=lr();let a=class extends p.Transition{constructor(n,t){super(n),this._label=t}get serializationType(){return 5}get label(){return c.IntervalSet.of(this._label)}matches(n,t,s){return this._label===n}toString(){return String(this.label)}};return u([h.Override],a.prototype,"serializationType",null),u([h.Override,h.NotNull],a.prototype,"label",null),u([h.Override],a.prototype,"matches",null),u([h.Override,h.NotNull],a.prototype,"toString",null),a=u([i(0,h.NotNull)],a),Ct.AtomTransition=a,Ct}var Xr={},ti={},Lc;function qi(){if(Lc)return ti;Lc=1;Object.defineProperty(ti,"__esModule",{value:!0}),ti.BlockStartState=void 0;const u=Ir();let i=class extends u.DecisionState{};return ti.BlockStartState=i,ti}var Fc;function g0(){if(Fc)return Xr;Fc=1;var u=Xr&&Xr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.BasicBlockStartState=void 0;const i=Ie(),c=qi(),h=Q();let p=class extends c.BlockStartState{get stateType(){return i.ATNStateType.BLOCK_START}};return u([h.Override],p.prototype,"stateType",null),Xr.BasicBlockStartState=p,Xr}var $r={},Bc;function v0(){if(Bc)return $r;Bc=1;var u=$r&&$r.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty($r,"__esModule",{value:!0}),$r.BlockEndState=void 0;const i=rt(),c=Ie(),h=Q();let p=class extends i.ATNState{get stateType(){return c.ATNStateType.BLOCK_END}};return u([h.Override],p.prototype,"stateType",null),$r.BlockEndState=p,$r}var Ot={},jc;function A0(){if(jc)return Ot;jc=1;var u=Ot&&Ot.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Ot&&Ot.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Ot,"__esModule",{value:!0}),Ot.EpsilonTransition=void 0;const c=Q(),h=lr();let p=class extends h.Transition{constructor(r,n=-1){super(r),this._outermostPrecedenceReturn=n}get outermostPrecedenceReturn(){return this._outermostPrecedenceReturn}get serializationType(){return 1}get isEpsilon(){return!0}matches(r,n,t){return!1}toString(){return"epsilon"}};return u([c.Override],p.prototype,"serializationType",null),u([c.Override],p.prototype,"isEpsilon",null),u([c.Override],p.prototype,"matches",null),u([c.Override,c.NotNull],p.prototype,"toString",null),p=u([i(0,c.NotNull)],p),Ot.EpsilonTransition=p,Ot}var Rt={},Mc;function T0(){if(Mc)return Rt;Mc=1;var u=Rt&&Rt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Rt&&Rt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Rt,"__esModule",{value:!0}),Rt.LexerChannelAction=void 0;const c=Pe(),h=Q();let p=class ap{constructor(r){this._channel=r}get channel(){return this._channel}get actionType(){return 0}get isPositionDependent(){return!1}execute(r){r.channel=this._channel}hashCode(){let r=c.MurmurHash.initialize();return r=c.MurmurHash.update(r,this.actionType),r=c.MurmurHash.update(r,this._channel),c.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof ap?this._channel===r._channel:!1}toString(){return`channel(${this._channel})`}};return u([h.Override],p.prototype,"actionType",null),u([h.Override],p.prototype,"isPositionDependent",null),u([h.Override,i(0,h.NotNull)],p.prototype,"execute",null),u([h.Override],p.prototype,"hashCode",null),u([h.Override],p.prototype,"equals",null),u([h.Override],p.prototype,"toString",null),Rt.LexerChannelAction=p,Rt}var Pt={},qc;function E0(){if(qc)return Pt;qc=1;var u=Pt&&Pt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Pt&&Pt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Pt,"__esModule",{value:!0}),Pt.LexerCustomAction=void 0;const c=Pe(),h=Q();let p=class lp{constructor(r,n){this._ruleIndex=r,this._actionIndex=n}get ruleIndex(){return this._ruleIndex}get actionIndex(){return this._actionIndex}get actionType(){return 1}get isPositionDependent(){return!0}execute(r){r.action(void 0,this._ruleIndex,this._actionIndex)}hashCode(){let r=c.MurmurHash.initialize();return r=c.MurmurHash.update(r,this.actionType),r=c.MurmurHash.update(r,this._ruleIndex),r=c.MurmurHash.update(r,this._actionIndex),c.MurmurHash.finish(r,3)}equals(r){return r===this?!0:r instanceof lp?this._ruleIndex===r._ruleIndex&&this._actionIndex===r._actionIndex:!1}};return u([h.Override],p.prototype,"actionType",null),u([h.Override],p.prototype,"isPositionDependent",null),u([h.Override,i(0,h.NotNull)],p.prototype,"execute",null),u([h.Override],p.prototype,"hashCode",null),u([h.Override],p.prototype,"equals",null),Pt.LexerCustomAction=p,Pt}var Dt={},kc;function S0(){if(kc)return Dt;kc=1;var u=Dt&&Dt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Dt&&Dt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Dt,"__esModule",{value:!0}),Dt.LexerModeAction=void 0;const c=Pe(),h=Q();let p=class cp{constructor(r){this._mode=r}get mode(){return this._mode}get actionType(){return 2}get isPositionDependent(){return!1}execute(r){r.mode(this._mode)}hashCode(){let r=c.MurmurHash.initialize();return r=c.MurmurHash.update(r,this.actionType),r=c.MurmurHash.update(r,this._mode),c.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof cp?this._mode===r._mode:!1}toString(){return`mode(${this._mode})`}};return u([h.Override],p.prototype,"actionType",null),u([h.Override],p.prototype,"isPositionDependent",null),u([h.Override,i(0,h.NotNull)],p.prototype,"execute",null),u([h.Override],p.prototype,"hashCode",null),u([h.Override],p.prototype,"equals",null),u([h.Override],p.prototype,"toString",null),Dt.LexerModeAction=p,Dt}var Kr={},Uc;function N0(){return Uc||(Uc=1,(function(u){var i=Kr&&Kr.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},c=Kr&&Kr.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(u,"__esModule",{value:!0}),u.LexerMoreAction=void 0;const h=Pe(),p=Q();let a=class{constructor(){}get actionType(){return 3}get isPositionDependent(){return!1}execute(n){n.more()}hashCode(){let n=h.MurmurHash.initialize();return n=h.MurmurHash.update(n,this.actionType),h.MurmurHash.finish(n,1)}equals(n){return n===this}toString(){return"more"}};i([p.Override],a.prototype,"actionType",null),i([p.Override],a.prototype,"isPositionDependent",null),i([p.Override,c(0,p.NotNull)],a.prototype,"execute",null),i([p.Override],a.prototype,"hashCode",null),i([p.Override],a.prototype,"equals",null),i([p.Override],a.prototype,"toString",null),u.LexerMoreAction=a,(function(r){r.INSTANCE=new r})(a=u.LexerMoreAction||(u.LexerMoreAction={}))})(Kr)),Kr}var Qr={},zc;function b0(){return zc||(zc=1,(function(u){var i=Qr&&Qr.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},c=Qr&&Qr.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(u,"__esModule",{value:!0}),u.LexerPopModeAction=void 0;const h=Pe(),p=Q();let a=class{constructor(){}get actionType(){return 4}get isPositionDependent(){return!1}execute(n){n.popMode()}hashCode(){let n=h.MurmurHash.initialize();return n=h.MurmurHash.update(n,this.actionType),h.MurmurHash.finish(n,1)}equals(n){return n===this}toString(){return"popMode"}};i([p.Override],a.prototype,"actionType",null),i([p.Override],a.prototype,"isPositionDependent",null),i([p.Override,c(0,p.NotNull)],a.prototype,"execute",null),i([p.Override],a.prototype,"hashCode",null),i([p.Override],a.prototype,"equals",null),i([p.Override],a.prototype,"toString",null),u.LexerPopModeAction=a,(function(r){r.INSTANCE=new r})(a=u.LexerPopModeAction||(u.LexerPopModeAction={}))})(Qr)),Qr}var It={},Hc;function C0(){if(Hc)return It;Hc=1;var u=It&&It.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=It&&It.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(It,"__esModule",{value:!0}),It.LexerPushModeAction=void 0;const c=Pe(),h=Q();let p=class fp{constructor(r){this._mode=r}get mode(){return this._mode}get actionType(){return 5}get isPositionDependent(){return!1}execute(r){r.pushMode(this._mode)}hashCode(){let r=c.MurmurHash.initialize();return r=c.MurmurHash.update(r,this.actionType),r=c.MurmurHash.update(r,this._mode),c.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof fp?this._mode===r._mode:!1}toString(){return`pushMode(${this._mode})`}};return u([h.Override],p.prototype,"actionType",null),u([h.Override],p.prototype,"isPositionDependent",null),u([h.Override,i(0,h.NotNull)],p.prototype,"execute",null),u([h.Override],p.prototype,"hashCode",null),u([h.Override],p.prototype,"equals",null),u([h.Override],p.prototype,"toString",null),It.LexerPushModeAction=p,It}var Jr={},Vc;function O0(){return Vc||(Vc=1,(function(u){var i=Jr&&Jr.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},c=Jr&&Jr.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(u,"__esModule",{value:!0}),u.LexerSkipAction=void 0;const h=Pe(),p=Q();let a=class{constructor(){}get actionType(){return 6}get isPositionDependent(){return!1}execute(n){n.skip()}hashCode(){let n=h.MurmurHash.initialize();return n=h.MurmurHash.update(n,this.actionType),h.MurmurHash.finish(n,1)}equals(n){return n===this}toString(){return"skip"}};i([p.Override],a.prototype,"actionType",null),i([p.Override],a.prototype,"isPositionDependent",null),i([p.Override,c(0,p.NotNull)],a.prototype,"execute",null),i([p.Override],a.prototype,"hashCode",null),i([p.Override],a.prototype,"equals",null),i([p.Override],a.prototype,"toString",null),u.LexerSkipAction=a,(function(r){r.INSTANCE=new r})(a=u.LexerSkipAction||(u.LexerSkipAction={}))})(Jr)),Jr}var wt={},Wc;function R0(){if(Wc)return wt;Wc=1;var u=wt&&wt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=wt&&wt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(wt,"__esModule",{value:!0}),wt.LexerTypeAction=void 0;const c=Pe(),h=Q();let p=class hp{constructor(r){this._type=r}get type(){return this._type}get actionType(){return 7}get isPositionDependent(){return!1}execute(r){r.type=this._type}hashCode(){let r=c.MurmurHash.initialize();return r=c.MurmurHash.update(r,this.actionType),r=c.MurmurHash.update(r,this._type),c.MurmurHash.finish(r,2)}equals(r){return r===this?!0:r instanceof hp?this._type===r._type:!1}toString(){return`type(${this._type})`}};return u([h.Override],p.prototype,"actionType",null),u([h.Override],p.prototype,"isPositionDependent",null),u([h.Override,i(0,h.NotNull)],p.prototype,"execute",null),u([h.Override],p.prototype,"hashCode",null),u([h.Override],p.prototype,"equals",null),u([h.Override],p.prototype,"toString",null),wt.LexerTypeAction=p,wt}var Zr={},Gc;function Xc(){if(Gc)return Zr;Gc=1;var u=Zr&&Zr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Zr,"__esModule",{value:!0}),Zr.LoopEndState=void 0;const i=rt(),c=Ie(),h=Q();let p=class extends i.ATNState{get stateType(){return c.ATNStateType.LOOP_END}};return u([h.Override],p.prototype,"stateType",null),Zr.LoopEndState=p,Zr}var Lt={},Yr={},$c;function P0(){if($c)return Yr;$c=1;var u=Yr&&Yr.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(Yr,"__esModule",{value:!0}),Yr.ConflictInfo=void 0;const i=Q(),c=ut();let h=class pp{constructor(a,r){this._conflictedAlts=a,this.exact=r}get conflictedAlts(){return this._conflictedAlts}get isExact(){return this.exact}equals(a){return a===this?!0:a instanceof pp?this.isExact===a.isExact&&c.equals(this.conflictedAlts,a.conflictedAlts):!1}hashCode(){return this.conflictedAlts.hashCode()}};return u([i.Override],h.prototype,"equals",null),u([i.Override],h.prototype,"hashCode",null),Yr.ConflictInfo=h,Yr}var en={},tn={},rn={},Kc;function pr(){if(Kc)return rn;Kc=1;var u=rn&&rn.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(rn,"__esModule",{value:!0}),rn.TerminalNode=void 0;const i=je(),c=Q(),h=Ne();let p=class{constructor(r){this._symbol=r}getChild(r){throw new RangeError("Terminal Node has no children.")}get symbol(){return this._symbol}get parent(){return this._parent}setParent(r){this._parent=r}get payload(){return this._symbol}get sourceInterval(){let r=this._symbol.tokenIndex;return new i.Interval(r,r)}get childCount(){return 0}accept(r){return r.visitTerminal(this)}get text(){return this._symbol.text||""}toStringTree(r){return this.toString()}toString(){return this._symbol.type===h.Token.EOF?"<EOF>":this._symbol.text||""}};return u([c.Override],p.prototype,"getChild",null),u([c.Override],p.prototype,"parent",null),u([c.Override],p.prototype,"setParent",null),u([c.Override],p.prototype,"payload",null),u([c.Override],p.prototype,"sourceInterval",null),u([c.Override],p.prototype,"childCount",null),u([c.Override],p.prototype,"accept",null),u([c.Override],p.prototype,"text",null),u([c.Override],p.prototype,"toStringTree",null),u([c.Override],p.prototype,"toString",null),rn.TerminalNode=p,rn}var Qc;function ri(){if(Qc)return tn;Qc=1;var u=tn&&tn.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(tn,"__esModule",{value:!0}),tn.ErrorNode=void 0;const i=Q(),c=pr();let h=class extends c.TerminalNode{constructor(a){super(a)}accept(a){return a.visitErrorNode(this)}};return u([i.Override],h.prototype,"accept",null),tn.ErrorNode=h,tn}var nn={},ni={},Jc;function ii(){if(Jc)return ni;Jc=1;Object.defineProperty(ni,"__esModule",{value:!0}),ni.RuleNode=void 0;let u=class{};return ni.RuleNode=u,ni}var Ft={},Zc;function dr(){if(Zc)return Ft;Zc=1;var u=Ft&&Ft.__decorate||function(f,d,g,x){var m=arguments.length,y=m<3?d:x===null?x=Object.getOwnPropertyDescriptor(d,g):x,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(f,d,g,x);else for(var v=f.length-1;v>=0;v--)(_=f[v])&&(y=(m<3?_(y):m>3?_(d,g,y):_(d,g))||y);return m>3&&y&&Object.defineProperty(d,g,y),y},i=Ft&&Ft.__param||function(f,d){return function(g,x){d(g,x,f)}};Object.defineProperty(Ft,"__esModule",{value:!0}),Ft.Trees=void 0;const c=At(),h=Vn(),p=ri(),a=Q(),r=di(),n=Ke(),t=ii(),s=pr(),e=Ne(),o=ut();let l=class yr{static toStringTree(d,g){let x;g instanceof r.Parser?x=g.ruleNames:x=g;let m=o.escapeWhitespace(this.getNodeText(d,x),!1);if(d.childCount===0)return m;let y="";y+="(",m=o.escapeWhitespace(this.getNodeText(d,x),!1),y+=m,y+=" ";for(let _=0;_<d.childCount;_++)_>0&&(y+=" "),y+=this.toStringTree(d.getChild(_),x);return y+=")",y}static getNodeText(d,g){let x;if(g instanceof r.Parser)x=g.ruleNames;else if(g)x=g;else{let m=d.payload;return typeof m.text=="string"?m.text:d.payload.toString()}if(d instanceof t.RuleNode){let m=d.ruleContext,y=m.ruleIndex,_=x[y],v=m.altNumber;return v!==c.ATN.INVALID_ALT_NUMBER?_+":"+v:_}else{if(d instanceof p.ErrorNode)return d.toString();if(d instanceof s.TerminalNode)return d.symbol.text||""}throw new TypeError("Unexpected node type")}static getChildren(d){let g=[];for(let x=0;x<d.childCount;x++)g.push(d.getChild(x));return g}static getAncestors(d){let g=[],x=d.parent;for(;x;)g.unshift(x),x=x.parent;return g}static isAncestorOf(d,g){if(!d||!g||!d.parent)return!1;let x=g.parent;for(;x;){if(d===x)return!0;x=x.parent}return!1}static findAllTokenNodes(d,g){return yr.findAllNodes(d,g,!0)}static findAllRuleNodes(d,g){return yr.findAllNodes(d,g,!1)}static findAllNodes(d,g,x){let m=[];return yr._findAllNodes(d,g,x,m),m}static _findAllNodes(d,g,x,m){x&&d instanceof s.TerminalNode?d.symbol.type===g&&m.push(d):!x&&d instanceof n.ParserRuleContext&&d.ruleIndex===g&&m.push(d);for(let y=0;y<d.childCount;y++)yr._findAllNodes(d.getChild(y),g,x,m)}static getDescendants(d){let g=[];function x(m){g.push(m);const y=m.childCount;for(let _=0;_<y;_++)x(m.getChild(_))}return x(d),g}static getRootOfSubtreeEnclosingRegion(d,g,x){let m=d.childCount;for(let y=0;y<m;y++){let _=d.getChild(y),v=yr.getRootOfSubtreeEnclosingRegion(_,g,x);if(v)return v}if(d instanceof n.ParserRuleContext){let y=d.stop;if(g>=d.start.tokenIndex&&(y==null||x<=y.tokenIndex))return d}}static stripChildrenOutOfRange(d,g,x,m){if(!d)return;let y=d.childCount;for(let _=0;_<y;_++){let v=d.getChild(_),N=v.sourceInterval;if(v instanceof n.ParserRuleContext&&(N.b<x||N.a>m)&&yr.isAncestorOf(v,g)){let T=new h.CommonToken(e.Token.INVALID_TYPE,"...");d.children[_]=new s.TerminalNode(T)}}}static findNodeSuchThat(d,g){if(g(d))return d;let x=d.childCount;for(let m=0;m<x;m++){let y=yr.findNodeSuchThat(d.getChild(m),g);if(y!==void 0)return y}}};return u([i(0,a.NotNull)],l,"toStringTree",null),u([a.NotNull,i(0,a.NotNull)],l,"getAncestors",null),u([i(0,a.NotNull)],l,"getRootOfSubtreeEnclosingRegion",null),Ft.Trees=l,Ft}var Yc;function ef(){if(Yc)return nn;Yc=1;var u=nn&&nn.__decorate||function(s,e,o,l){var f=arguments.length,d=f<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,o):l,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(s,e,o,l);else for(var x=s.length-1;x>=0;x--)(g=s[x])&&(d=(f<3?g(d):f>3?g(e,o,d):g(e,o))||d);return f>3&&d&&Object.defineProperty(e,o,d),d};Object.defineProperty(nn,"__esModule",{value:!0}),nn.RuleContext=void 0;const i=At(),c=Yn(),h=ii(),p=je(),a=Q(),r=dr(),n=Ke();let t=class dp extends h.RuleNode{constructor(e,o){super(),this._parent=e,this.invokingState=o??-1}static getChildContext(e,o){return new dp(e,o)}depth(){let e=0,o=this;for(;o;)o=o._parent,e++;return e}get isEmpty(){return this.invokingState===-1}get sourceInterval(){return p.Interval.INVALID}get ruleContext(){return this}get parent(){return this._parent}setParent(e){this._parent=e}get payload(){return this}get text(){if(this.childCount===0)return"";let e="";for(let o=0;o<this.childCount;o++)e+=this.getChild(o).text;return e.toString()}get ruleIndex(){return-1}get altNumber(){return i.ATN.INVALID_ALT_NUMBER}set altNumber(e){}getChild(e){throw new RangeError("i must be greater than or equal to 0 and less than childCount")}get childCount(){return 0}accept(e){return e.visitChildren(this)}toStringTree(e){return r.Trees.toStringTree(this,e)}toString(e,o){const l=e instanceof c.Recognizer?e.ruleNames:e;o=o||n.ParserRuleContext.emptyContext();let f="",d=this;for(f+="[";d&&d!==o;){if(!l)d.isEmpty||(f+=d.invokingState);else{let g=d.ruleIndex,x=g>=0&&g<l.length?l[g]:g.toString();f+=x}d._parent&&(l||!d._parent.isEmpty)&&(f+=" "),d=d._parent}return f+="]",f.toString()}};return u([a.Override],t.prototype,"sourceInterval",null),u([a.Override],t.prototype,"ruleContext",null),u([a.Override],t.prototype,"parent",null),u([a.Override],t.prototype,"setParent",null),u([a.Override],t.prototype,"payload",null),u([a.Override],t.prototype,"text",null),u([a.Override],t.prototype,"getChild",null),u([a.Override],t.prototype,"childCount",null),u([a.Override],t.prototype,"accept",null),u([a.Override],t.prototype,"toStringTree",null),nn.RuleContext=t,nn}var tf;function Ke(){if(tf)return en;tf=1;var u=en&&en.__decorate||function(n,t,s,e){var o=arguments.length,l=o<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,t,s,e);else for(var d=n.length-1;d>=0;d--)(f=n[d])&&(l=(o<3?f(l):o>3?f(t,s,l):f(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l};Object.defineProperty(en,"__esModule",{value:!0}),en.ParserRuleContext=void 0;const i=ri(),c=je(),h=Q(),p=ef(),a=pr();let r=class Eu extends p.RuleContext{constructor(t,s){s==null?super():super(t,s)}static emptyContext(){return Eu.EMPTY}copyFrom(t){if(this._parent=t._parent,this.invokingState=t.invokingState,this._start=t._start,this._stop=t._stop,t.children){this.children=[];for(let s of t.children)s instanceof i.ErrorNode&&this.addChild(s)}}enterRule(t){}exitRule(t){}addAnyChild(t){return this.children?this.children.push(t):this.children=[t],t}addChild(t){if(t instanceof a.TerminalNode){t.setParent(this),this.addAnyChild(t);return}else if(t instanceof p.RuleContext){this.addAnyChild(t);return}else return t=new a.TerminalNode(t),this.addAnyChild(t),t.setParent(this),t}addErrorNode(t){if(t instanceof i.ErrorNode){const s=t;return s.setParent(this),this.addAnyChild(s)}else{const s=t;let e=new i.ErrorNode(s);return this.addAnyChild(e),e.setParent(this),e}}removeLastChild(){this.children&&this.children.pop()}get parent(){let t=super.parent;if(t===void 0||t instanceof Eu)return t;throw new TypeError("Invalid parent type for ParserRuleContext")}getChild(t,s){if(!this.children||t<0||t>=this.children.length)throw new RangeError("index parameter must be between >= 0 and <= number of children.");if(s==null)return this.children[t];let e=this.tryGetChild(t,s);if(e===void 0)throw new Error("The specified node does not exist");return e}tryGetChild(t,s){if(!this.children||t<0||t>=this.children.length)return;let e=-1;for(let o of this.children)if(o instanceof s&&(e++,e===t))return o}getToken(t,s){let e=this.tryGetToken(t,s);if(e===void 0)throw new Error("The specified token does not exist");return e}tryGetToken(t,s){if(!this.children||s<0||s>=this.children.length)return;let e=-1;for(let o of this.children)if(o instanceof a.TerminalNode&&o.symbol.type===t&&(e++,e===s))return o}getTokens(t){let s=[];if(!this.children)return s;for(let e of this.children)e instanceof a.TerminalNode&&e.symbol.type===t&&s.push(e);return s}get ruleContext(){return this}getRuleContext(t,s){return this.getChild(t,s)}tryGetRuleContext(t,s){return this.tryGetChild(t,s)}getRuleContexts(t){let s=[];if(!this.children)return s;for(let e of this.children)e instanceof t&&s.push(e);return s}get childCount(){return this.children?this.children.length:0}get sourceInterval(){return this._start?!this._stop||this._stop.tokenIndex<this._start.tokenIndex?c.Interval.of(this._start.tokenIndex,this._start.tokenIndex-1):c.Interval.of(this._start.tokenIndex,this._stop.tokenIndex):c.Interval.INVALID}get start(){return this._start}get stop(){return this._stop}toInfoString(t){return"ParserRuleContext"+t.getRuleInvocationStack(this).reverse()+"{start="+this._start+", stop="+this._stop+"}"}};return r.EMPTY=new r,u([h.Override],r.prototype,"parent",null),u([h.Override],r.prototype,"childCount",null),u([h.Override],r.prototype,"sourceInterval",null),en.ParserRuleContext=r,en}var oi={},rf;function D0(){return rf||(rf=1,(function(u){var i=oi&&oi.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(u,"__esModule",{value:!0}),u.PredictionMode=void 0;const c=Fn(),h=Pe(),p=Q(),a=ei();(function(r){r[r.SLL=0]="SLL",r[r.LL=1]="LL",r[r.LL_EXACT_AMBIG_DETECTION=2]="LL_EXACT_AMBIG_DETECTION"})(u.PredictionMode||(u.PredictionMode={})),(function(r){class n extends c.Array2DHashMap{constructor(){super(t.INSTANCE)}}class t{AltAndContextConfigEqualityComparator(){}hashCode(l){let f=h.MurmurHash.initialize(7);return f=h.MurmurHash.update(f,l.state.stateNumber),f=h.MurmurHash.update(f,l.context),f=h.MurmurHash.finish(f,2),f}equals(l,f){return l===f?!0:l==null||f==null?!1:l.state.stateNumber===f.state.stateNumber&&l.context.equals(f.context)}}t.INSTANCE=new t,i([p.Override],t.prototype,"hashCode",null),i([p.Override],t.prototype,"equals",null);function s(o){for(let l of o)if(l.state instanceof a.RuleStopState)return!0;return!1}r.hasConfigInRuleStopState=s;function e(o){for(let l of o)if(!(l.state instanceof a.RuleStopState))return!1;return!0}r.allConfigsInRuleStopStates=e})(u.PredictionMode||(u.PredictionMode={}))})(oi)),oi}var Bt={},nf;function of(){if(nf)return Bt;nf=1;var u=Bt&&Bt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Bt&&Bt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Bt,"__esModule",{value:!0}),Bt.SimulatorState=void 0;const c=Q(),h=Ke();let p=class{constructor(r,n,t,s){this.outerContext=r??h.ParserRuleContext.emptyContext(),this.s0=n,this.useContext=t,this.remainingOuterContext=s}};return p=u([i(1,c.NotNull)],p),Bt.SimulatorState=p,Bt}var sf;function si(){if(sf)return Lt;sf=1;var u=Lt&&Lt.__decorate||function(F,E,A,S){var C=arguments.length,P=C<3?E:S===null?S=Object.getOwnPropertyDescriptor(E,A):S,R;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")P=Reflect.decorate(F,E,A,S);else for(var I=F.length-1;I>=0;I--)(R=F[I])&&(P=(C<3?R(P):C>3?R(E,A,P):R(E,A))||P);return C>3&&P&&Object.defineProperty(E,A,P),P},i=Lt&&Lt.__param||function(F,E){return function(A,S){E(A,S,F)}};Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.ParserATNSimulator=void 0;const c=zl(),h=Dc(),p=cr(),a=ws(),r=At(),n=Li(),t=Jn(),s=Bi(),e=Ie(),o=wc(),l=fr(),f=P0(),d=Ir(),g=Fi(),x=Ls(),m=je(),y=ur(),_=Q(),v=Us(),N=ki(),T=Ze(),b=Ke(),O=Xe(),D=js(),k=D0(),z=ei(),U=zs(),te=Ln(),ie=ks(),oe=of(),he=Ne(),Ee=Mr(),le=Fe(),Z=65535,ee=-2147483648;let J=class ye extends s.ATNSimulator{constructor(E,A){super(E),this.predictionMode=k.PredictionMode.LL,this.force_global_context=!1,this.always_try_local_context=!0,this.enable_global_context_dfa=!1,this.optimize_unique_closure=!0,this.optimize_ll1=!0,this.optimize_tail_calls=!0,this.tail_call_preserves_sll=!0,this.treat_sllk1_conflict_as_ambiguity=!1,this.reportAmbiguities=!1,this.userWantsCtxSensitive=!0,this._parser=A}getPredictionMode(){return this.predictionMode}setPredictionMode(E){this.predictionMode=E}reset(){}adaptivePredict(E,A,S,C){C===void 0&&(C=!1);let P=this.atn.decisionToDFA[A];if(le(P!=null),this.optimize_ll1&&!P.isPrecedenceDfa&&!P.isEmpty){let W=E.LA(1);if(W>=0&&W<=65535){let G=(A<<16>>>0)+W,w=this.atn.LL1Table.get(G);if(w!=null)return w}}this.dfa=P,this.force_global_context?C=!0:this.always_try_local_context||(C=C||P.isContextSensitive),this.userWantsCtxSensitive=C||this.predictionMode!==k.PredictionMode.SLL&&S!=null&&!this.atn.decisionToState[A].sll,S==null&&(S=b.ParserRuleContext.emptyContext());let R;P.isEmpty||(R=this.getStartState(P,E,S,C)),R==null&&(S==null&&(S=b.ParserRuleContext.emptyContext()),ye.debug&&console.log("ATN decision "+P.decision+" exec LA(1)=="+this.getLookaheadName(E)+", outerContext="+S.toString(this._parser)),R=this.computeStartState(P,S,C));let I=E.mark(),M=E.index;try{let W=this.execDFA(P,E,M,R);return ye.debug&&console.log("DFA after predictATN: "+P.toString(this._parser.vocabulary,this._parser.ruleNames)),W}finally{this.dfa=void 0,E.seek(M),E.release(I)}}getStartState(E,A,S,C){if(!C)if(E.isPrecedenceDfa){let I=E.getPrecedenceStartState(this._parser.precedence,!1);return I==null?void 0:new oe.SimulatorState(S,I,!1,S)}else return E.s0==null?void 0:new oe.SimulatorState(S,E.s0,!1,S);if(!this.enable_global_context_dfa)return;let P=S;le(S!=null);let R;for(E.isPrecedenceDfa?R=E.getPrecedenceStartState(this._parser.precedence,!0):R=E.s0full;P!=null&&R!=null&&R.isContextSensitive;)P=this.skipTailCalls(P),R=R.getContextTarget(this.getReturnState(P)),P.isEmpty?le(R==null||!R.isContextSensitive):P=P.parent;if(R!=null)return new oe.SimulatorState(S,R,C,P)}execDFA(E,A,S,C){let P=C.outerContext;ye.dfa_debug&&console.log("DFA decision "+E.decision+" exec LA(1)=="+this.getLookaheadName(A)+", outerContext="+P.toString(this._parser)),ye.dfa_debug&&console.log(E.toString(this._parser.vocabulary,this._parser.ruleNames));let R=C.s0,I=A.LA(1),M=C.remainingOuterContext;for(;;){if(ye.dfa_debug&&console.log("DFA state "+R.stateNumber+" LA(1)=="+this.getLookaheadName(A)),C.useContext)for(;R.isContextSymbol(I);){let w;if(M!=null&&(M=this.skipTailCalls(M),w=R.getContextTarget(this.getReturnState(M))),w==null){let L=new oe.SimulatorState(C.outerContext,R,C.useContext,M);return this.execATN(E,A,S,L)}le(M!=null),M=M.parent,R=w}if(this.isAcceptState(R,C.useContext)){R.predicates!=null?ye.dfa_debug&&console.log("accept "+R):ye.dfa_debug&&console.log("accept; predict "+R.prediction+" in state "+R.stateNumber);break}le(!this.isAcceptState(R,C.useContext));let G=this.getExistingTargetState(R,I);if(G==null){ye.dfa_debug&&I>=0&&console.log("no edge for "+this._parser.vocabulary.getDisplayName(I));let w;if(ye.dfa_debug){let H=m.Interval.of(S,this._parser.inputStream.index);console.log("ATN exec upon "+this._parser.inputStream.getText(H)+" at DFA state "+R.stateNumber)}let L=new oe.SimulatorState(P,R,C.useContext,M);return w=this.execATN(E,A,S,L),ye.dfa_debug&&console.log("back from DFA update, alt="+w+`, dfa=
|
|
76
|
+
`+E.toString(this._parser.vocabulary,this._parser.ruleNames)),ye.dfa_debug&&console.log("DFA decision "+E.decision+" predicts "+w),w}else if(G===s.ATNSimulator.ERROR){let w=new oe.SimulatorState(P,R,C.useContext,M);return this.handleNoViableAlt(A,S,w)}R=G,!this.isAcceptState(R,C.useContext)&&I!==y.IntStream.EOF&&(A.consume(),I=A.LA(1))}if(!C.useContext&&R.configs.conflictInfo!=null&&E.atnStartState instanceof d.DecisionState&&!(!this.userWantsCtxSensitive||!R.configs.dipsIntoOuterContext&&R.configs.isExactConflict||this.treat_sllk1_conflict_as_ambiguity&&A.index===S)){le(!C.useContext);let G,w=R.predicates;if(w!=null){let L=A.index;if(L!==S&&A.seek(S),G=this.evalSemanticContext(w,P,!0),G.cardinality()===1)return G.nextSetBit(0);L!==S&&A.seek(L)}if(this.reportAmbiguities){let L=new oe.SimulatorState(P,R,C.useContext,M);this.reportAttemptingFullContext(E,G,L,S,A.index)}return A.seek(S),this.adaptivePredict(A,E.decision,P,!0)}let W=R.predicates;if(W!=null){let G=A.index;S!==G&&A.seek(S);let w=this.evalSemanticContext(W,P,this.reportAmbiguities&&this.predictionMode===k.PredictionMode.LL_EXACT_AMBIG_DETECTION);switch(w.cardinality()){case 0:throw this.noViableAlt(A,P,R.configs,S);case 1:return w.nextSetBit(0);default:return S!==G&&A.seek(G),this.reportAmbiguity(E,R,S,G,R.configs.isExactConflict,w,R.configs),w.nextSetBit(0)}}return ye.dfa_debug&&console.log("DFA decision "+E.decision+" predicts "+R.prediction),R.prediction}isAcceptState(E,A){return E.isAcceptState?E.configs.conflictingAlts==null?!0:A&&this.predictionMode===k.PredictionMode.LL_EXACT_AMBIG_DETECTION?E.configs.isExactConflict:!0:!1}execATN(E,A,S,C){ye.debug&&console.log("execATN decision "+E.decision+" exec LA(1)=="+this.getLookaheadName(A));let P=C.outerContext,R=C.useContext,I=A.LA(1),M=C,W=new D.PredictionContextCache;for(;;){let G=this.computeReachSet(E,M,I,W);if(G==null)return this.setDFAEdge(M.s0,A.LA(1),s.ATNSimulator.ERROR),this.handleNoViableAlt(A,S,M);let w=G.s0;if(le(w.isAcceptState||w.prediction===r.ATN.INVALID_ALT_NUMBER),le(w.isAcceptState||w.configs.conflictInfo==null),this.isAcceptState(w,R)){let L=w.configs.conflictingAlts,H=L==null?w.prediction:r.ATN.INVALID_ALT_NUMBER;if(H!==r.ATN.INVALID_ALT_NUMBER){if(this.optimize_ll1&&A.index===S&&!E.isPrecedenceDfa&&G.outerContext===G.remainingOuterContext&&E.decision>=0&&!w.configs.hasSemanticContext&&I>=0&&I<=Z){let Y=(E.decision<<16>>>0)+I;this.atn.LL1Table.set(Y,H)}R&&this.always_try_local_context&&this.reportContextSensitivity(E,H,G,S,A.index)}H=w.prediction;let X=L!=null&&this.userWantsCtxSensitive;if(X&&(X=!R&&(w.configs.dipsIntoOuterContext||!w.configs.isExactConflict)&&(!this.treat_sllk1_conflict_as_ambiguity||A.index!==S)),w.configs.hasSemanticContext){let Y=w.predicates;if(Y!=null){let re=A.index;switch(re!==S&&A.seek(S),L=this.evalSemanticContext(Y,P,X||this.reportAmbiguities),L.cardinality()){case 0:throw this.noViableAlt(A,P,w.configs,S);case 1:return L.nextSetBit(0)}re!==S&&A.seek(re)}}if(X){le(!R),le(this.isAcceptState(w,!1)),ye.debug&&console.log("RETRY with outerContext="+P);let Y=this.computeStartState(E,P,!0);return this.reportAmbiguities&&this.reportAttemptingFullContext(E,L,G,S,A.index),A.seek(S),this.execATN(E,A,S,Y)}else return L!=null&&(this.reportAmbiguities&&L.cardinality()>1&&this.reportAmbiguity(E,w,S,A.index,w.configs.isExactConflict,L,w.configs),H=L.nextSetBit(0)),H}M=G,I!==y.IntStream.EOF&&(A.consume(),I=A.LA(1))}}handleNoViableAlt(E,A,S){if(S.s0!=null){let C=new l.BitSet,P=0;for(let R of S.s0.configs)(R.reachesIntoOuterContext||R.state instanceof z.RuleStopState)&&(C.set(R.alt),P=Math.max(P,R.alt));switch(C.cardinality()){case 0:break;case 1:return C.nextSetBit(0);default:if(!S.s0.configs.hasSemanticContext)return C.nextSetBit(0);let R=new t.ATNConfigSet;for(let M of S.s0.configs)(M.reachesIntoOuterContext||M.state instanceof z.RuleStopState)&&R.add(M);let I=this.getPredsForAmbigAlts(C,R,P);if(I!=null){let M=this.getPredicatePredictions(C,I);if(M!=null){let W=E.index;try{E.seek(A);let G=this.evalSemanticContext(M,S.outerContext,!1);if(!G.isEmpty)return G.nextSetBit(0)}finally{E.seek(W)}}}return C.nextSetBit(0)}}throw this.noViableAlt(E,S.outerContext,S.s0.configs,A)}computeReachSet(E,A,S,C){let P=A.useContext,R=A.remainingOuterContext,I=A.s0;if(P)for(;I.isContextSymbol(S);){let G;if(R!=null&&(R=this.skipTailCalls(R),G=I.getContextTarget(this.getReturnState(R))),G==null)break;le(R!=null),R=R.parent,I=G}if(le(!this.isAcceptState(I,P)),this.isAcceptState(I,P))return new oe.SimulatorState(A.outerContext,I,P,R);let M=I,W=this.getExistingTargetState(M,S);if(W==null){let G=this.computeTargetState(E,M,R,S,P,C);W=G[0],R=G[1]}if(W!==s.ATNSimulator.ERROR)return le(!P||!W.configs.dipsIntoOuterContext),new oe.SimulatorState(A.outerContext,W,P,R)}getExistingTargetState(E,A){return E.getTarget(A)}computeTargetState(E,A,S,C,P,R){let I=A.configs.toArray(),M,W=new t.ATNConfigSet,G;do{let L=!P||S!=null;L||(W.isOutermostConfigSet=!0);let H=new t.ATNConfigSet,X;for(let q of I){if(ye.debug&&console.log("testing "+this.getTokenName(C)+" at "+q.toString()),q.state instanceof z.RuleStopState){le(q.context.isEmpty),(P&&!q.reachesIntoOuterContext||C===y.IntStream.EOF)&&(X==null&&(X=[]),X.push(q));continue}let $=q.state.numberOfOptimizedTransitions;for(let se=0;se<$;se++){let me=q.state.getOptimizedTransition(se),ge=this.getReachableTarget(q,me,C);ge!=null&&H.add(q.transform(ge,!1),R)}}if(this.optimize_unique_closure&&X==null&&C!==he.Token.EOF&&H.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER){H.isOutermostConfigSet=W.isOutermostConfigSet,W=H;break}let Y=!1,re=C===he.Token.EOF;if(this.closure(H,W,Y,L,R,re),G=W.dipsIntoOuterContext,C===y.IntStream.EOF&&(W=this.removeAllConfigsNotInRuleStopState(W,R)),X!=null&&(!P||!k.PredictionMode.hasConfigInRuleStopState(W))){le(X.length>0);for(let q of X)W.add(q,R)}if(P&&G){W.clear(),S=S,S=this.skipTailCalls(S);let q=this.getReturnState(S);if(M==null&&(M=new x.IntegerList),S.isEmpty?S=void 0:S=S.parent,M.add(q),q!==O.PredictionContext.EMPTY_FULL_STATE_KEY)for(let $=0;$<I.length;$++)I[$]=I[$].appendContext(q,R)}}while(P&&G);return W.isEmpty?(this.setDFAEdge(A,C,s.ATNSimulator.ERROR),[s.ATNSimulator.ERROR,S]):[this.addDFAEdge(E,A,C,M,W,R),S]}removeAllConfigsNotInRuleStopState(E,A){if(k.PredictionMode.allConfigsInRuleStopStates(E))return E;let S=new t.ATNConfigSet;for(let C of E)C.state instanceof z.RuleStopState&&S.add(C,A);return S}computeStartState(E,A,S){let C=E.isPrecedenceDfa?E.getPrecedenceStartState(this._parser.precedence,S):S?E.s0full:E.s0;if(C!=null){if(!S)return new oe.SimulatorState(A,C,S,A);C.setContextSensitive(this.atn)}E.decision;let P=E.atnStartState,R=0,I=A,M=S?O.PredictionContext.EMPTY_FULL:O.PredictionContext.EMPTY_LOCAL,W=new D.PredictionContextCache;if(S){if(!this.enable_global_context_dfa)for(;I!=null;)I.isEmpty?(R=O.PredictionContext.EMPTY_FULL_STATE_KEY,I=void 0):(R=this.getReturnState(I),M=M.appendSingleContext(R,W),I=I.parent);for(;C!=null&&C.isContextSensitive&&I!=null;){let w;if(I=this.skipTailCalls(I),I.isEmpty?(w=C.getContextTarget(O.PredictionContext.EMPTY_FULL_STATE_KEY),R=O.PredictionContext.EMPTY_FULL_STATE_KEY,I=void 0):(R=this.getReturnState(I),w=C.getContextTarget(R),M=M.appendSingleContext(R,W),I=I.parent),w==null)break;C=w}}if(C!=null&&!C.isContextSensitive)return new oe.SimulatorState(A,C,S,I);let G=new t.ATNConfigSet;for(;;){let w=new t.ATNConfigSet,L=P.numberOfTransitions;for(let $=0;$<L;$++){let se=P.transition($).target;w.add(n.ATNConfig.create(se,$+1,M))}let H=I!=null;H||(G.isOutermostConfigSet=!0),this.closure(w,G,!0,H,W,!1);let Y=G.dipsIntoOuterContext,re;if(S&&!this.enable_global_context_dfa){C=this.addDFAState(E,G,W);break}else C==null?E.isPrecedenceDfa?(G=this.applyPrecedenceFilter(G,A,W),re=this.addDFAState(E,G,W),E.setPrecedenceStartState(this._parser.precedence,S,re)):(re=this.addDFAState(E,G,W),S?E.s0full?re=E.s0full:E.s0full=re:E.s0?re=E.s0:E.s0=re):(E.isPrecedenceDfa&&(G=this.applyPrecedenceFilter(G,A,W)),re=this.addDFAState(E,G,W),C.setContextTarget(R,re));if(C=re,!S||!Y)break;re.setContextSensitive(this.atn),I=I,G.clear(),I=this.skipTailCalls(I);let q=this.getReturnState(I);I.isEmpty?I=void 0:I=I.parent,q!==O.PredictionContext.EMPTY_FULL_STATE_KEY&&(M=M.appendSingleContext(q,W)),R=q}return new oe.SimulatorState(A,C,S,I)}applyPrecedenceFilter(E,A,S){let C=new Map,P=new t.ATNConfigSet;for(let R of E){if(R.alt!==1)continue;let I=R.semanticContext.evalPrecedence(this._parser,A);I!=null&&(C.set(R.state.stateNumber,R.context),I!==R.semanticContext?P.add(R.transform(R.state,!1,I),S):P.add(R,S))}for(let R of E)if(R.alt!==1){if(!R.isPrecedenceFilterSuppressed){let I=C.get(R.state.stateNumber);if(I!=null&&I.equals(R.context))continue}P.add(R,S)}return P}getReachableTarget(E,A,S){if(A.matches(S,0,this.atn.maxTokenType))return A.target}predicateDFAState(E,A,S){let C=this.getConflictingAltsFromConfigSet(A);if(!C)throw new Error("This unhandled scenario is intended to be unreachable, but I'm currently not sure of why we know that's the case.");ye.debug&&console.log("predicateDFAState "+E);let P=this.getPredsForAmbigAlts(C,A,S),R;return P!=null&&(R=this.getPredicatePredictions(C,P),E.predicates=R),R}getPredsForAmbigAlts(E,A,S){let C=new Array(S+1),P=C.length;for(let M of A)E.get(M.alt)&&(C[M.alt]=te.SemanticContext.or(C[M.alt],M.semanticContext));let R=0;for(let M=0;M<P;M++)C[M]==null?C[M]=te.SemanticContext.NONE:C[M]!==te.SemanticContext.NONE&&R++;let I=C;return R===0&&(I=void 0),ye.debug&&console.log("getPredsForAmbigAlts result "+(I?a.Arrays.toString(I):"undefined")),I}getPredicatePredictions(E,A){let S=[],C=!1;for(let P=1;P<A.length;P++){let R=A[P];le(R!=null),E!=null&&E.get(P)&&R===te.SemanticContext.NONE?S.push(new g.DFAState.PredPrediction(R,P)):R!==te.SemanticContext.NONE&&(C=!0,S.push(new g.DFAState.PredPrediction(R,P)))}if(C)return S}evalSemanticContext(E,A,S){let C=new l.BitSet;for(let P of E){if(P.pred===te.SemanticContext.NONE){if(C.set(P.alt),!S)break;continue}let R=this.evalSemanticContextImpl(P.pred,A,P.alt);if((ye.debug||ye.dfa_debug)&&console.log("eval pred "+P+"="+R),R&&((ye.debug||ye.dfa_debug)&&console.log("PREDICT "+P.alt),C.set(P.alt),!S))break}return C}evalSemanticContextImpl(E,A,S){return E.eval(this._parser,A)}closure(E,A,S,C,P,R){P==null&&(P=D.PredictionContextCache.UNCACHED);let I=E,M=new p.Array2DHashSet(T.ObjectEqualityComparator.INSTANCE);for(;I.size>0;){let W=new t.ATNConfigSet;for(let G of I)this.closureImpl(G,A,W,M,S,C,P,0,R);I=W}}closureImpl(E,A,S,C,P,R,I,M,W){if(ye.debug&&console.log("closure("+E.toString(this._parser,!0)+")"),E.state instanceof z.RuleStopState)if(E.context.isEmpty)if(R)ye.debug&&console.log("FALLING off rule "+this.getRuleName(E.state.ruleIndex)),E.context===O.PredictionContext.EMPTY_FULL?E=E.transform(E.state,!1,O.PredictionContext.EMPTY_LOCAL):!E.reachesIntoOuterContext&&O.PredictionContext.isEmptyLocal(E.context)&&A.add(E,I);else{A.add(E,I);return}else{let w=E.context.hasEmpty,L=E.context.size-(w?1:0);for(let H=0;H<L;H++){let X=E.context.getParent(H),Y=this.atn.states[E.context.getReturnState(H)],re=n.ATNConfig.create(Y,E.alt,X,E.semanticContext);re.outerContextDepth=E.outerContextDepth,re.isPrecedenceFilterSuppressed=E.isPrecedenceFilterSuppressed,le(M>ee),this.closureImpl(re,A,S,C,P,R,I,M-1,W)}if(!w||!R)return;E=E.transform(E.state,!1,O.PredictionContext.EMPTY_LOCAL)}let G=E.state;G.onlyHasEpsilonTransitions||(A.add(E,I),ye.debug&&console.log("added config "+A));for(let w=0;w<G.numberOfOptimizedTransitions;w++){if(w===0&&G.stateType===e.ATNStateType.STAR_LOOP_ENTRY&&G.precedenceRuleDecision&&!E.context.hasEmpty){let Y=G,re=!0;for(let q=0;q<E.context.size;q++)if(!Y.precedenceLoopbackStates.get(E.context.getReturnState(q))){re=!1;break}if(re)continue}let L=G.getOptimizedTransition(w),H=!(L instanceof h.ActionTransition)&&P,X=this.getEpsilonTarget(E,L,H,M===0,I,W);if(X!=null){if(L instanceof U.RuleTransition&&S!=null&&!P){S.add(X,I);continue}let Y=M;if(E.state instanceof z.RuleStopState){if(this.dfa!=null&&this.dfa.isPrecedenceDfa&&L.outermostPrecedenceReturn===this.dfa.atnStartState.ruleIndex&&(X.isPrecedenceFilterSuppressed=!0),X.outerContextDepth=X.outerContextDepth+1,!C.add(X))continue;le(Y>ee),Y--,ye.debug&&console.log("dips into outer ctx: "+X)}else if(L instanceof U.RuleTransition)this.optimize_tail_calls&&L.optimizedTailCall&&(!this.tail_call_preserves_sll||!O.PredictionContext.isEmptyLocal(E.context))?(le(X.context===E.context),Y===0&&(Y--,!this.tail_call_preserves_sll&&O.PredictionContext.isEmptyLocal(E.context)&&(X.outerContextDepth=X.outerContextDepth+1))):Y>=0&&Y++;else if(!L.isEpsilon&&!C.add(X))continue;this.closureImpl(X,A,S,C,H,R,I,Y,W)}}}getRuleName(E){return this._parser!=null&&E>=0?this._parser.ruleNames[E]:"<rule "+E+">"}getEpsilonTarget(E,A,S,C,P,R){switch(A.serializationType){case 3:return this.ruleTransition(E,A,P);case 10:return this.precedenceTransition(E,A,S,C);case 4:return this.predTransition(E,A,S,C);case 6:return this.actionTransition(E,A);case 1:return E.transform(A.target,!1);case 5:case 2:case 7:return R&&A.matches(he.Token.EOF,0,1)?E.transform(A.target,!1):void 0;default:return}}actionTransition(E,A){return ye.debug&&console.log("ACTION edge "+A.ruleIndex+":"+A.actionIndex),E.transform(A.target,!1)}precedenceTransition(E,A,S,C){ye.debug&&(console.log("PRED (collectPredicates="+S+") "+A.precedence+">=_p, ctx dependent=true"),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let P;if(S&&C){let R=te.SemanticContext.and(E.semanticContext,A.predicate);P=E.transform(A.target,!1,R)}else P=E.transform(A.target,!1);return ye.debug&&console.log("config from pred transition="+P),P}predTransition(E,A,S,C){ye.debug&&(console.log("PRED (collectPredicates="+S+") "+A.ruleIndex+":"+A.predIndex+", ctx dependent="+A.isCtxDependent),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let P;if(S&&(!A.isCtxDependent||A.isCtxDependent&&C)){let R=te.SemanticContext.and(E.semanticContext,A.predicate);P=E.transform(A.target,!1,R)}else P=E.transform(A.target,!1);return ye.debug&&console.log("config from pred transition="+P),P}ruleTransition(E,A,S){ye.debug&&console.log("CALL rule "+this.getRuleName(A.target.ruleIndex)+", ctx="+E.context);let C=A.followState,P;return this.optimize_tail_calls&&A.optimizedTailCall&&(!this.tail_call_preserves_sll||!O.PredictionContext.isEmptyLocal(E.context))?P=E.context:S!=null?P=S.getChild(E.context,C.stateNumber):P=E.context.getChild(C.stateNumber),E.transform(A.target,!1,P)}isConflicted(E,A){if(E.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER||E.size<=1)return;let S=E.toArray();S.sort(ye.STATE_ALT_SORT_COMPARATOR);let C=!E.dipsIntoOuterContext,P=new l.BitSet,R=S[0].alt;P.set(R);let I=S[0].state.nonStopStateNumber;for(let L of S){let H=L.state.nonStopStateNumber;if(H!==I){if(L.alt!==R)return;I=H}}let M;if(C){I=S[0].state.nonStopStateNumber,M=new l.BitSet;let L=R;for(let X of S){if(X.state.nonStopStateNumber!==I)break;let Y=X.alt;M.set(Y),L=Y}I=S[0].state.nonStopStateNumber;let H=R;for(let X of S){let Y=X.state.nonStopStateNumber,re=X.alt;if(Y!==I){if(H!==L){C=!1;break}I=Y,H=R}else if(re!==H){if(re!==M.nextSetBit(H+1)){C=!1;break}H=re}}}I=S[0].state.nonStopStateNumber;let W=0,G=0,w=S[0].context;for(let L=1;L<S.length;L++){let H=S[L];if(H.alt!==R||H.state.nonStopStateNumber!==I)break;G=L,w=A.join(w,S[L].context)}for(let L=G+1;L<S.length;L++){let H=S[L],X=H.state;if(P.set(H.alt),X.nonStopStateNumber!==I){I=X.nonStopStateNumber,W=L,G=L,w=H.context;for(let se=W+1;se<S.length;se++){let me=S[se];if(me.alt!==R||me.state.nonStopStateNumber!==I)break;G=se,w=A.join(w,me.context)}L=G;continue}let Y=H.context,re=H.alt,q=L;for(let se=q+1;se<S.length;se++){let me=S[se];if(me.alt!==re||me.state.nonStopStateNumber!==I)break;q=se,Y=A.join(Y,me.context)}L=q;let $=A.join(w,Y);if(!w.equals($))return;C=C&&w.equals(Y)}return new f.ConflictInfo(P,C)}getConflictingAltsFromConfigSet(E){let A=E.conflictingAlts;return A==null&&E.uniqueAlt!==r.ATN.INVALID_ALT_NUMBER&&(A=new l.BitSet,A.set(E.uniqueAlt)),A}getTokenName(E){if(E===he.Token.EOF)return"EOF";let S=(this._parser!=null?this._parser.vocabulary:Ee.VocabularyImpl.EMPTY_VOCABULARY).getDisplayName(E);return S===String(E)?S:S+"<"+E+">"}getLookaheadName(E){return this.getTokenName(E.LA(1))}dumpDeadEndConfigs(E){console.log("dead end configs: ");let A=E.deadEndConfigs;if(A)for(let S of A){let C="no edges";if(S.state.numberOfOptimizedTransitions>0){let P=S.state.getOptimizedTransition(0);P instanceof o.AtomTransition?C="Atom "+this.getTokenName(P._label):P instanceof ie.SetTransition&&(C=(P instanceof v.NotSetTransition?"~":"")+"Set "+P.set.toString())}console.log(S.toString(this._parser,!0)+":"+C)}}noViableAlt(E,A,S,C){return new N.NoViableAltException(this._parser,E,E.get(C),E.LT(1),S,A)}getUniqueAlt(E){let A=r.ATN.INVALID_ALT_NUMBER;for(let S of E)if(A===r.ATN.INVALID_ALT_NUMBER)A=S.alt;else if(S.alt!==A)return r.ATN.INVALID_ALT_NUMBER;return A}configWithAltAtStopState(E,A){for(let S of E)if(S.alt===A&&S.state instanceof z.RuleStopState)return!0;return!1}addDFAEdge(E,A,S,C,P,R){le(C==null||C.isEmpty||E.isContextSensitive);let I=A,M=this.addDFAState(E,P,R);if(C!=null)for(let W of C.toArray()){if(W===O.PredictionContext.EMPTY_FULL_STATE_KEY&&I.configs.isOutermostConfigSet)continue;I.setContextSensitive(this.atn),I.setContextSymbol(S);let G=I.getContextTarget(W);if(G!=null){I=G;continue}G=this.addDFAContextState(E,I.configs,W,R),le(W!==O.PredictionContext.EMPTY_FULL_STATE_KEY||G.configs.isOutermostConfigSet),I.setContextTarget(W,G),I=G}return ye.debug&&console.log("EDGE "+I+" -> "+M+" upon "+this.getTokenName(S)),this.setDFAEdge(I,S,M),ye.debug&&console.log(`DFA=
|
|
77
|
+
`+E.toString(this._parser!=null?this._parser.vocabulary:Ee.VocabularyImpl.EMPTY_VOCABULARY,this._parser!=null?this._parser.ruleNames:void 0)),M}setDFAEdge(E,A,S){E?.setTarget(A,S)}addDFAContextState(E,A,S,C){if(S!==O.PredictionContext.EMPTY_FULL_STATE_KEY){let P=new t.ATNConfigSet;for(let R of A)P.add(R.appendContext(S,C));return this.addDFAState(E,P,C)}else return le(!A.isOutermostConfigSet,"Shouldn't be adding a duplicate edge."),A=A.clone(!0),A.isOutermostConfigSet=!0,this.addDFAState(E,A,C)}addDFAState(E,A,S){let C=this.enable_global_context_dfa||!A.isOutermostConfigSet;if(C){A.isReadOnly||A.optimizeConfigs(this);let W=this.createDFAState(E,A),G=E.states.get(W);if(G!=null)return G}A.isReadOnly||A.conflictInfo==null&&(A.conflictInfo=this.isConflicted(A,S));let P=this.createDFAState(E,A.clone(!0)),R=this.atn.getDecisionState(E.decision),I=this.getUniqueAlt(A);if(I!==r.ATN.INVALID_ALT_NUMBER)P.acceptStateInfo=new c.AcceptStateInfo(I);else if(A.conflictingAlts!=null){let W=A.conflictingAlts;W&&(P.acceptStateInfo=new c.AcceptStateInfo(W.nextSetBit(0)))}if(P.isAcceptState&&A.hasSemanticContext&&this.predicateDFAState(P,A,R.numberOfTransitions),!C)return P;let M=E.addState(P);return ye.debug&&M===P&&console.log("adding new DFA state: "+P),M}createDFAState(E,A){return new g.DFAState(A)}reportAttemptingFullContext(E,A,S,C,P){if(ye.debug||ye.retry_debug){let R=m.Interval.of(C,P);console.log("reportAttemptingFullContext decision="+E.decision+":"+S.s0.configs+", input="+this._parser.inputStream.getText(R))}if(this._parser!=null){let R=this._parser.getErrorListenerDispatch();R.reportAttemptingFullContext&&R.reportAttemptingFullContext(this._parser,E,C,P,A,S)}}reportContextSensitivity(E,A,S,C,P){if(ye.debug||ye.retry_debug){let R=m.Interval.of(C,P);console.log("reportContextSensitivity decision="+E.decision+":"+S.s0.configs+", input="+this._parser.inputStream.getText(R))}if(this._parser!=null){let R=this._parser.getErrorListenerDispatch();R.reportContextSensitivity&&R.reportContextSensitivity(this._parser,E,C,P,A,S)}}reportAmbiguity(E,A,S,C,P,R,I){if(ye.debug||ye.retry_debug){let M=m.Interval.of(S,C);console.log("reportAmbiguity "+R+":"+I+", input="+this._parser.inputStream.getText(M))}if(this._parser!=null){let M=this._parser.getErrorListenerDispatch();M.reportAmbiguity&&M.reportAmbiguity(this._parser,E,S,C,P,R,I)}}getReturnState(E){return E.isEmpty?O.PredictionContext.EMPTY_FULL_STATE_KEY:this.atn.states[E.invokingState].transition(0).followState.stateNumber}skipTailCalls(E){if(!this.optimize_tail_calls)return E;for(;!E.isEmpty;){let A=this.atn.states[E.invokingState];if(le(A.numberOfTransitions===1&&A.transition(0).serializationType===3),!A.transition(0).tailCall)break;E=E.parent}return E}get parser(){return this._parser}};return J.debug=!1,J.dfa_debug=!1,J.retry_debug=!1,J.STATE_ALT_SORT_COMPARATOR=(F,E)=>{let A=F.state.nonStopStateNumber-E.state.nonStopStateNumber;return A!==0||(A=F.alt-E.alt,A!==0)?A:0},u([_.NotNull],J.prototype,"predictionMode",void 0),u([_.NotNull],J.prototype,"getPredictionMode",null),u([i(0,_.NotNull)],J.prototype,"setPredictionMode",null),u([_.Override],J.prototype,"reset",null),u([i(0,_.NotNull)],J.prototype,"adaptivePredict",null),u([i(0,_.NotNull),i(1,_.NotNull),i(2,_.NotNull)],J.prototype,"getStartState",null),u([i(0,_.NotNull),i(1,_.NotNull),i(3,_.NotNull)],J.prototype,"execDFA",null),u([i(0,_.NotNull),i(1,_.NotNull),i(3,_.NotNull)],J.prototype,"execATN",null),u([i(0,_.NotNull),i(2,_.NotNull)],J.prototype,"handleNoViableAlt",null),u([i(0,_.NotNull)],J.prototype,"getExistingTargetState",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"computeTargetState",null),u([_.NotNull,i(0,_.NotNull)],J.prototype,"removeAllConfigsNotInRuleStopState",null),u([_.NotNull],J.prototype,"computeStartState",null),u([_.NotNull,i(0,_.NotNull)],J.prototype,"applyPrecedenceFilter",null),u([i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"getReachableTarget",null),u([i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"getPredsForAmbigAlts",null),u([i(0,_.NotNull)],J.prototype,"evalSemanticContext",null),u([i(0,_.NotNull)],J.prototype,"evalSemanticContextImpl",null),u([i(1,_.NotNull),i(4,_.Nullable)],J.prototype,"closure",null),u([i(0,_.NotNull),i(1,_.NotNull),i(2,_.Nullable),i(3,_.NotNull),i(6,_.NotNull)],J.prototype,"closureImpl",null),u([_.NotNull],J.prototype,"getRuleName",null),u([i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"getEpsilonTarget",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"actionTransition",null),u([_.Nullable,i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"precedenceTransition",null),u([_.Nullable,i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"predTransition",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull),i(2,_.Nullable)],J.prototype,"ruleTransition",null),u([i(0,_.NotNull)],J.prototype,"isConflicted",null),u([_.NotNull],J.prototype,"getTokenName",null),u([i(0,_.NotNull)],J.prototype,"dumpDeadEndConfigs",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull),i(2,_.NotNull)],J.prototype,"noViableAlt",null),u([i(0,_.NotNull)],J.prototype,"getUniqueAlt",null),u([i(0,_.NotNull)],J.prototype,"configWithAltAtStopState",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull),i(4,_.NotNull)],J.prototype,"addDFAEdge",null),u([i(0,_.Nullable),i(2,_.Nullable)],J.prototype,"setDFAEdge",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"addDFAContextState",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"addDFAState",null),u([_.NotNull,i(0,_.NotNull),i(1,_.NotNull)],J.prototype,"createDFAState",null),u([i(0,_.NotNull),i(2,_.NotNull)],J.prototype,"reportAttemptingFullContext",null),u([i(0,_.NotNull),i(2,_.NotNull)],J.prototype,"reportContextSensitivity",null),u([i(0,_.NotNull),i(5,_.NotNull),i(6,_.NotNull)],J.prototype,"reportAmbiguity",null),J=u([i(0,_.NotNull)],J),Lt.ParserATNSimulator=J,Lt}var on={},uf;function I0(){if(uf)return on;uf=1;var u=on&&on.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(on,"__esModule",{value:!0}),on.PlusBlockStartState=void 0;const i=Ie(),c=qi(),h=Q();let p=class extends c.BlockStartState{get stateType(){return i.ATNStateType.PLUS_BLOCK_START}};return u([h.Override],p.prototype,"stateType",null),on.PlusBlockStartState=p,on}var sn={},af;function w0(){if(af)return sn;af=1;var u=sn&&sn.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(sn,"__esModule",{value:!0}),sn.PlusLoopbackState=void 0;const i=Ie(),c=Ir(),h=Q();let p=class extends c.DecisionState{get stateType(){return i.ATNStateType.PLUS_LOOP_BACK}};return u([h.Override],p.prototype,"stateType",null),sn.PlusLoopbackState=p,sn}var jt={},lf;function L0(){if(lf)return jt;lf=1;var u=jt&&jt.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=jt&&jt.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(jt,"__esModule",{value:!0}),jt.PrecedencePredicateTransition=void 0;const c=Ps(),h=Q(),p=Ln();let a=class extends c.AbstractPredicateTransition{constructor(n,t){super(n),this.precedence=t}get serializationType(){return 10}get isEpsilon(){return!0}matches(n,t,s){return!1}get predicate(){return new p.SemanticContext.PrecedencePredicate(this.precedence)}toString(){return this.precedence+" >= _p"}};return u([h.Override],a.prototype,"serializationType",null),u([h.Override],a.prototype,"isEpsilon",null),u([h.Override],a.prototype,"matches",null),u([h.Override],a.prototype,"toString",null),a=u([i(0,h.NotNull)],a),jt.PrecedencePredicateTransition=a,jt}var Mt={},cf;function F0(){if(cf)return Mt;cf=1;var u=Mt&&Mt.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=Mt&&Mt.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(Mt,"__esModule",{value:!0}),Mt.RangeTransition=void 0;const c=Vr(),h=Q(),p=lr();let a=class extends p.Transition{constructor(n,t,s){super(n),this.from=t,this.to=s}get serializationType(){return 2}get label(){return c.IntervalSet.of(this.from,this.to)}matches(n,t,s){return n>=this.from&&n<=this.to}toString(){return"'"+String.fromCodePoint(this.from)+"'..'"+String.fromCodePoint(this.to)+"'"}};return u([h.Override],a.prototype,"serializationType",null),u([h.Override,h.NotNull],a.prototype,"label",null),u([h.Override],a.prototype,"matches",null),u([h.Override,h.NotNull],a.prototype,"toString",null),a=u([i(0,h.NotNull)],a),Mt.RangeTransition=a,Mt}var un={},ff;function B0(){if(ff)return un;ff=1;var u=un&&un.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(un,"__esModule",{value:!0}),un.RuleStartState=void 0;const i=rt(),c=Ie(),h=Q();let p=class extends i.ATNState{constructor(){super(...arguments),this.isPrecedenceRule=!1,this.leftFactored=!1}get stateType(){return c.ATNStateType.RULE_START}};return u([h.Override],p.prototype,"stateType",null),un.RuleStartState=p,un}var an={},hf;function j0(){if(hf)return an;hf=1;var u=an&&an.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(an,"__esModule",{value:!0}),an.StarBlockStartState=void 0;const i=Ie(),c=qi(),h=Q();let p=class extends c.BlockStartState{get stateType(){return i.ATNStateType.STAR_BLOCK_START}};return u([h.Override],p.prototype,"stateType",null),an.StarBlockStartState=p,an}var ln={},pf;function M0(){if(pf)return ln;pf=1;var u=ln&&ln.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(ln,"__esModule",{value:!0}),ln.StarLoopbackState=void 0;const i=rt(),c=Ie(),h=Q();let p=class extends i.ATNState{get loopEntryState(){return this.transition(0).target}get stateType(){return c.ATNStateType.STAR_LOOP_BACK}};return u([h.Override],p.prototype,"stateType",null),ln.StarLoopbackState=p,ln}var cn={},df;function q0(){if(df)return cn;df=1;var u=cn&&cn.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(cn,"__esModule",{value:!0}),cn.TokensStartState=void 0;const i=Ie(),c=Ir(),h=Q();let p=class extends c.DecisionState{get stateType(){return i.ATNStateType.TOKEN_START}};return u([h.Override],p.prototype,"stateType",null),cn.TokensStartState=p,cn}var ui={},xf;function k0(){if(xf)return ui;xf=1;Object.defineProperty(ui,"__esModule",{value:!0}),ui.UUID=void 0;const u=Pe();let i=class Su{constructor(h,p,a,r){this.data=new Uint32Array(4),this.data[0]=h,this.data[1]=p,this.data[2]=a,this.data[3]=r}static fromString(h){if(!/^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{4}-[a-fA-F0-9]{12}$/.test(h))throw new Error("Incorrectly formatted UUID");let p=h.split("-"),a=parseInt(p[0],16),r=(parseInt(p[1],16)<<16>>>0)+parseInt(p[2],16),n=(parseInt(p[3],16)<<16>>>0)+parseInt(p[4].substr(0,4),16),t=parseInt(p[4].substr(-8),16);return new Su(a,r,n,t)}hashCode(){return u.MurmurHash.hashCode([this.data[0],this.data[1],this.data[2],this.data[3]])}equals(h){return h===this?!0:h instanceof Su?this.data[0]===h.data[0]&&this.data[1]===h.data[1]&&this.data[2]===h.data[2]&&this.data[3]===h.data[3]:!1}toString(){return("00000000"+this.data[0].toString(16)).substr(-8)+"-"+("0000"+(this.data[1]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[1].toString(16)).substr(-4)+"-"+("0000"+(this.data[2]>>>16).toString(16)).substr(-4)+"-"+("0000"+this.data[2].toString(16)).substr(-4)+("00000000"+this.data[3].toString(16)).substr(-8)}};return ui.UUID=i,ui}var yf;function Hs(){if(yf)return Nt;yf=1;var u=Nt&&Nt.__decorate||function(G,w,L,H){var X=arguments.length,Y=X<3?w:H===null?H=Object.getOwnPropertyDescriptor(w,L):H,re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Y=Reflect.decorate(G,w,L,H);else for(var q=G.length-1;q>=0;q--)(re=G[q])&&(Y=(X<3?re(Y):X>3?re(w,L,Y):re(w,L))||Y);return X>3&&Y&&Object.defineProperty(w,L,Y),Y},i=Nt&&Nt.__param||function(G,w){return function(L,H){w(L,H,G)}};Object.defineProperty(Nt,"__esModule",{value:!0}),Nt.ATNDeserializer=void 0;const c=Dc(),h=cr(),p=At(),a=Rc(),r=Ie(),n=wc(),t=g0(),s=cc(),e=fr(),o=v0(),l=qi(),f=Ir(),d=ac(),g=A0(),x=Vr(),m=hc(),y=T0(),_=E0(),v=S0(),N=N0(),T=b0(),b=C0(),O=O0(),D=R0(),k=Xc(),z=Q(),U=Us(),te=si(),ie=I0(),oe=w0(),he=L0(),Ee=Pl(),le=F0(),Z=B0(),ee=ei(),J=zs(),F=ks(),E=j0(),A=M0(),S=qs(),C=Ne(),P=q0(),R=k0(),I=mc();var M;(function(G){G[G.UNICODE_BMP=0]="UNICODE_BMP",G[G.UNICODE_SMP=1]="UNICODE_SMP"})(M||(M={}));let W=class ue{constructor(w){w===void 0&&(w=a.ATNDeserializationOptions.defaultOptions),this.deserializationOptions=w}static get SERIALIZED_VERSION(){return 3}static isFeatureSupported(w,L){let H=ue.SUPPORTED_UUIDS.findIndex(X=>X.equals(w));return H<0?!1:ue.SUPPORTED_UUIDS.findIndex(X=>X.equals(L))>=H}static getUnicodeDeserializer(w){return w===0?{readUnicode:(L,H)=>ue.toInt(L[H]),size:1}:{readUnicode:(L,H)=>ue.toInt32(L,H),size:2}}deserialize(w){w=w.slice(0);for(let K=1;K<w.length;K++)w[K]=w[K]-2&65535;let L=0,H=ue.toInt(w[L++]);if(H!==ue.SERIALIZED_VERSION){let K=`Could not deserialize ATN with version ${H} (expected ${ue.SERIALIZED_VERSION}).`;throw new Error(K)}let X=ue.toUUID(w,L);if(L+=8,ue.SUPPORTED_UUIDS.findIndex(K=>K.equals(X))<0){let K=`Could not deserialize ATN with UUID ${X} (expected ${ue.SERIALIZED_UUID} or a legacy UUID).`;throw new Error(K)}let Y=ue.isFeatureSupported(ue.ADDED_LEXER_ACTIONS,X),re=ue.toInt(w[L++]),q=ue.toInt(w[L++]),$=new p.ATN(re,q),se=[],me=[],ge=ue.toInt(w[L++]);for(let K=0;K<ge;K++){let fe=ue.toInt(w[L++]);if(fe===r.ATNStateType.INVALID_TYPE){$.addState(new m.InvalidState);continue}let pe=ue.toInt(w[L++]);pe===65535&&(pe=-1);let xe=this.stateFactory(fe,pe);if(fe===r.ATNStateType.LOOP_END){let Se=ue.toInt(w[L++]);se.push([xe,Se])}else if(xe instanceof l.BlockStartState){let Se=ue.toInt(w[L++]);me.push([xe,Se])}$.addState(xe)}for(let K of se)K[0].loopBackState=$.states[K[1]];for(let K of me)K[0].endState=$.states[K[1]];let B=ue.toInt(w[L++]);for(let K=0;K<B;K++){let fe=ue.toInt(w[L++]);$.states[fe].nonGreedy=!0}let V=ue.toInt(w[L++]);for(let K=0;K<V;K++){let fe=ue.toInt(w[L++]);$.states[fe].sll=!0}let ne=ue.toInt(w[L++]);for(let K=0;K<ne;K++){let fe=ue.toInt(w[L++]);$.states[fe].isPrecedenceRule=!0}let ae=ue.toInt(w[L++]);$.grammarType===0&&($.ruleToTokenType=new Int32Array(ae)),$.ruleToStartState=new Array(ae);for(let K=0;K<ae;K++){let fe=ue.toInt(w[L++]),pe=$.states[fe];if(pe.leftFactored=ue.toInt(w[L++])!==0,$.ruleToStartState[K]=pe,$.grammarType===0){let xe=ue.toInt(w[L++]);xe===65535&&(xe=C.Token.EOF),$.ruleToTokenType[K]=xe,ue.isFeatureSupported(ue.ADDED_LEXER_ACTIONS,X)||ue.toInt(w[L++])}}$.ruleToStopState=new Array(ae);for(let K of $.states)K instanceof ee.RuleStopState&&($.ruleToStopState[K.ruleIndex]=K,$.ruleToStartState[K.ruleIndex].stopState=K);let ce=ue.toInt(w[L++]);for(let K=0;K<ce;K++){let fe=ue.toInt(w[L++]);$.modeToStartState.push($.states[fe])}$.modeToDFA=new Array(ce);for(let K=0;K<ce;K++)$.modeToDFA[K]=new d.DFA($.modeToStartState[K]);let _e=[];L=this.deserializeSets(w,L,_e,ue.getUnicodeDeserializer(0)),ue.isFeatureSupported(ue.ADDED_UNICODE_SMP,X)&&(L=this.deserializeSets(w,L,_e,ue.getUnicodeDeserializer(1)));let de=ue.toInt(w[L++]);for(let K=0;K<de;K++){let fe=ue.toInt(w[L]),pe=ue.toInt(w[L+1]),xe=ue.toInt(w[L+2]),Se=ue.toInt(w[L+3]),Me=ue.toInt(w[L+4]),we=ue.toInt(w[L+5]),ze=this.edgeFactory($,xe,fe,pe,Se,Me,we,_e);$.states[fe].addTransition(ze),L+=6}let ve=new h.Array2DHashSet({hashCode:K=>K.stopState^K.returnState^K.outermostPrecedenceReturn,equals:(K,fe)=>K.stopState===fe.stopState&&K.returnState===fe.returnState&&K.outermostPrecedenceReturn===fe.outermostPrecedenceReturn}),Ae=[];for(let K of $.states){let fe=K.ruleIndex>=0&&$.ruleToStartState[K.ruleIndex].leftFactored;for(let pe=0;pe<K.numberOfTransitions;pe++){let xe=K.transition(pe);if(!(xe instanceof J.RuleTransition))continue;let Se=xe;if(!$.ruleToStartState[Se.target.ruleIndex].leftFactored&&fe)continue;let we=-1;$.ruleToStartState[Se.target.ruleIndex].isPrecedenceRule&&Se.precedence===0&&(we=Se.target.ruleIndex);let ze={stopState:Se.target.ruleIndex,returnState:Se.followState.stateNumber,outermostPrecedenceReturn:we};ve.add(ze)&&Ae.push(ze)}}for(let K of Ae){let fe=new g.EpsilonTransition($.states[K.returnState],K.outermostPrecedenceReturn);$.ruleToStopState[K.stopState].addTransition(fe)}for(let K of $.states){if(K instanceof l.BlockStartState){if(K.endState===void 0)throw new Error("IllegalStateException");if(K.endState.startState!==void 0)throw new Error("IllegalStateException");K.endState.startState=K}if(K instanceof oe.PlusLoopbackState){let fe=K;for(let pe=0;pe<fe.numberOfTransitions;pe++){let xe=fe.transition(pe).target;xe instanceof ie.PlusBlockStartState&&(xe.loopBackState=fe)}}else if(K instanceof A.StarLoopbackState){let fe=K;for(let pe=0;pe<fe.numberOfTransitions;pe++){let xe=fe.transition(pe).target;xe instanceof S.StarLoopEntryState&&(xe.loopBackState=fe)}}}let De=ue.toInt(w[L++]);for(let K=1;K<=De;K++){let fe=ue.toInt(w[L++]),pe=$.states[fe];$.decisionToState.push(pe),pe.decision=K-1}if($.grammarType===0)if(Y){$.lexerActions=new Array(ue.toInt(w[L++]));for(let K=0;K<$.lexerActions.length;K++){let fe=ue.toInt(w[L++]),pe=ue.toInt(w[L++]);pe===65535&&(pe=-1);let xe=ue.toInt(w[L++]);xe===65535&&(xe=-1);let Se=this.lexerActionFactory(fe,pe,xe);$.lexerActions[K]=Se}}else{let K=[];for(let fe of $.states)for(let pe=0;pe<fe.numberOfTransitions;pe++){let xe=fe.transition(pe);if(!(xe instanceof c.ActionTransition))continue;let Se=xe.ruleIndex,Me=xe.actionIndex,we=new _.LexerCustomAction(Se,Me);fe.setTransition(pe,new c.ActionTransition(xe.target,Se,K.length,!1)),K.push(we)}$.lexerActions=K}this.markPrecedenceDecisions($),$.decisionToDFA=new Array(De);for(let K=0;K<De;K++)$.decisionToDFA[K]=new d.DFA($.decisionToState[K],K);if(this.deserializationOptions.isVerifyATN&&this.verifyATN($),this.deserializationOptions.isGenerateRuleBypassTransitions&&$.grammarType===1){$.ruleToTokenType=new Int32Array($.ruleToStartState.length);for(let K=0;K<$.ruleToStartState.length;K++)$.ruleToTokenType[K]=$.maxTokenType+K+1;for(let K=0;K<$.ruleToStartState.length;K++){let fe=new t.BasicBlockStartState;fe.ruleIndex=K,$.addState(fe);let pe=new o.BlockEndState;pe.ruleIndex=K,$.addState(pe),fe.endState=pe,$.defineDecisionState(fe),pe.startState=fe;let xe,Se;if($.ruleToStartState[K].isPrecedenceRule){xe=void 0;for(let we of $.states){if(we.ruleIndex!==K||!(we instanceof S.StarLoopEntryState))continue;let ze=we.transition(we.numberOfTransitions-1).target;if(ze instanceof k.LoopEndState&&ze.epsilonOnlyTransitions&&ze.transition(0).target instanceof ee.RuleStopState){xe=we;break}}if(!xe)throw new Error("Couldn't identify final state of the precedence rule prefix section.");Se=xe.loopBackState.transition(0)}else xe=$.ruleToStopState[K];for(let we of $.states)for(let ze=0;ze<we.numberOfTransitions;ze++){let Hi=we.transition(ze);Hi!==Se&&Hi.target===xe&&(Hi.target=pe)}for(;$.ruleToStartState[K].numberOfTransitions>0;){let we=$.ruleToStartState[K].removeTransition($.ruleToStartState[K].numberOfTransitions-1);fe.addTransition(we)}$.ruleToStartState[K].addTransition(new g.EpsilonTransition(fe)),pe.addTransition(new g.EpsilonTransition(xe));let Me=new s.BasicState;$.addState(Me),Me.addTransition(new n.AtomTransition(pe,$.ruleToTokenType[K])),fe.addTransition(new g.EpsilonTransition(Me))}this.deserializationOptions.isVerifyATN&&this.verifyATN($)}if(this.deserializationOptions.isOptimize){for(;;){let K=0;K+=ue.inlineSetRules($),K+=ue.combineChainedEpsilons($);let fe=$.grammarType===0;if(K+=ue.optimizeSets($,fe),K===0)break}this.deserializationOptions.isVerifyATN&&this.verifyATN($)}return ue.identifyTailCalls($),$}deserializeSets(w,L,H,X){let Y=ue.toInt(w[L++]);for(let re=0;re<Y;re++){let q=ue.toInt(w[L]);L++;let $=new x.IntervalSet;H.push($),ue.toInt(w[L++])!==0&&$.add(-1);for(let me=0;me<q;me++){let ge=X.readUnicode(w,L);L+=X.size;let B=X.readUnicode(w,L);L+=X.size,$.add(ge,B)}}return L}markPrecedenceDecisions(w){let L=new Map;for(let H of w.states)if(H instanceof S.StarLoopEntryState&&w.ruleToStartState[H.ruleIndex].isPrecedenceRule){let X=H.transition(H.numberOfTransitions-1).target;X instanceof k.LoopEndState&&X.epsilonOnlyTransitions&&X.transition(0).target instanceof ee.RuleStopState&&(L.set(H.ruleIndex,H),H.precedenceRuleDecision=!0,H.precedenceLoopbackStates=new e.BitSet(w.states.length))}for(let H of L)for(let X of w.ruleToStopState[H[0]].getTransitions())X.serializationType!==1||X.outermostPrecedenceReturn!==-1||H[1].precedenceLoopbackStates.set(X.target.stateNumber)}verifyATN(w){for(let L of w.states)if(this.checkCondition(L!==void 0,"ATN states should not be undefined."),L.stateType!==r.ATNStateType.INVALID_TYPE){if(this.checkCondition(L.onlyHasEpsilonTransitions||L.numberOfTransitions<=1),L instanceof ie.PlusBlockStartState&&this.checkCondition(L.loopBackState!==void 0),L instanceof S.StarLoopEntryState){let H=L;if(this.checkCondition(H.loopBackState!==void 0),this.checkCondition(H.numberOfTransitions===2),H.transition(0).target instanceof E.StarBlockStartState)this.checkCondition(H.transition(1).target instanceof k.LoopEndState),this.checkCondition(!H.nonGreedy);else if(H.transition(0).target instanceof k.LoopEndState)this.checkCondition(H.transition(1).target instanceof E.StarBlockStartState),this.checkCondition(H.nonGreedy);else throw new Error("IllegalStateException")}if(L instanceof A.StarLoopbackState&&(this.checkCondition(L.numberOfTransitions===1),this.checkCondition(L.transition(0).target instanceof S.StarLoopEntryState)),L instanceof k.LoopEndState&&this.checkCondition(L.loopBackState!==void 0),L instanceof Z.RuleStartState&&this.checkCondition(L.stopState!==void 0),L instanceof l.BlockStartState&&this.checkCondition(L.endState!==void 0),L instanceof o.BlockEndState&&this.checkCondition(L.startState!==void 0),L instanceof f.DecisionState){let H=L;this.checkCondition(H.numberOfTransitions<=1||H.decision>=0)}else this.checkCondition(L.numberOfTransitions<=1||L instanceof ee.RuleStopState)}}checkCondition(w,L){if(!w)throw new Error("IllegalStateException: "+L)}static inlineSetRules(w){let L=0,H=new Array(w.ruleToStartState.length);for(let X=0;X<w.ruleToStartState.length;X++){let re=w.ruleToStartState[X];for(;re.onlyHasEpsilonTransitions&&re.numberOfOptimizedTransitions===1&&re.getOptimizedTransition(0).serializationType===1;)re=re.getOptimizedTransition(0).target;if(re.numberOfOptimizedTransitions!==1)continue;let q=re.getOptimizedTransition(0),$=q.target;if(!(q.isEpsilon||!$.onlyHasEpsilonTransitions||$.numberOfOptimizedTransitions!==1||!($.getOptimizedTransition(0).target instanceof ee.RuleStopState)))switch(q.serializationType){case 5:case 2:case 7:H[X]=q;break;case 8:case 9:continue;default:continue}}for(let X of w.states){if(X.ruleIndex<0)continue;let Y;for(let re=0;re<X.numberOfOptimizedTransitions;re++){let q=X.getOptimizedTransition(re);if(!(q instanceof J.RuleTransition)){Y!==void 0&&Y.push(q);continue}let $=q,se=H[$.target.ruleIndex];if(se===void 0){Y!==void 0&&Y.push(q);continue}if(Y===void 0){Y=[];for(let B=0;B<re;B++)Y.push(X.getOptimizedTransition(re))}L++;let me=$.followState,ge=new s.BasicState;switch(ge.setRuleIndex(me.ruleIndex),w.addState(ge),Y.push(new g.EpsilonTransition(ge)),se.serializationType){case 5:ge.addTransition(new n.AtomTransition(me,se._label));break;case 2:ge.addTransition(new le.RangeTransition(me,se.from,se.to));break;case 7:ge.addTransition(new F.SetTransition(me,se.label));break;default:throw new Error("UnsupportedOperationException")}}if(Y!==void 0){if(X.isOptimized)for(;X.numberOfOptimizedTransitions>0;)X.removeOptimizedTransition(X.numberOfOptimizedTransitions-1);for(let re of Y)X.addOptimizedTransition(re)}}return te.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+L+" rule invocations by inlining sets."),L}static combineChainedEpsilons(w){let L=0;for(let H of w.states){if(!H.onlyHasEpsilonTransitions||H instanceof ee.RuleStopState)continue;let X;e:for(let Y=0;Y<H.numberOfOptimizedTransitions;Y++){let re=H.getOptimizedTransition(Y),q=re.target;if(re.serializationType!==1||re.outermostPrecedenceReturn!==-1||q.stateType!==r.ATNStateType.BASIC||!q.onlyHasEpsilonTransitions){X!==void 0&&X.push(re);continue e}for(let $=0;$<q.numberOfOptimizedTransitions;$++)if(q.getOptimizedTransition($).serializationType!==1||q.getOptimizedTransition($).outermostPrecedenceReturn!==-1){X!==void 0&&X.push(re);continue e}if(L++,X===void 0){X=[];for(let $=0;$<Y;$++)X.push(H.getOptimizedTransition($))}for(let $=0;$<q.numberOfOptimizedTransitions;$++){let se=q.getOptimizedTransition($).target;X.push(new g.EpsilonTransition(se))}}if(X!==void 0){if(H.isOptimized)for(;H.numberOfOptimizedTransitions>0;)H.removeOptimizedTransition(H.numberOfOptimizedTransitions-1);for(let Y of X)H.addOptimizedTransition(Y)}}return te.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+L+" transitions by combining chained epsilon transitions."),L}static optimizeSets(w,L){if(L)return 0;let H=0,X=w.decisionToState;for(let Y of X){let re=new x.IntervalSet;for(let B=0;B<Y.numberOfOptimizedTransitions;B++){let V=Y.getOptimizedTransition(B);if(!(V instanceof g.EpsilonTransition)||V.target.numberOfOptimizedTransitions!==1)continue;let ne=V.target.getOptimizedTransition(0);ne.target instanceof o.BlockEndState&&(ne instanceof U.NotSetTransition||(ne instanceof n.AtomTransition||ne instanceof le.RangeTransition||ne instanceof F.SetTransition)&&re.add(B))}if(re.size<=1)continue;let q=[];for(let B=0;B<Y.numberOfOptimizedTransitions;B++)re.contains(B)||q.push(Y.getOptimizedTransition(B));let $=Y.getOptimizedTransition(re.minElement).target.getOptimizedTransition(0).target,se=new x.IntervalSet;for(let B of re.intervals)for(let V=B.a;V<=B.b;V++){let ne=Y.getOptimizedTransition(V).target.getOptimizedTransition(0);if(ne instanceof U.NotSetTransition)throw new Error("Not yet implemented.");se.addAll(ne.label)}let me;if(se.intervals.length===1)if(se.size===1)me=new n.AtomTransition($,se.minElement);else{let B=se.intervals[0];me=new le.RangeTransition($,B.a,B.b)}else me=new F.SetTransition($,se);let ge=new s.BasicState;if(ge.setRuleIndex(Y.ruleIndex),w.addState(ge),ge.addTransition(me),q.push(new g.EpsilonTransition(ge)),H+=Y.numberOfOptimizedTransitions-q.length,Y.isOptimized)for(;Y.numberOfOptimizedTransitions>0;)Y.removeOptimizedTransition(Y.numberOfOptimizedTransitions-1);for(let B of q)Y.addOptimizedTransition(B)}return te.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+H+" paths by collapsing sets."),H}static identifyTailCalls(w){for(let L of w.states){for(let H=0;H<L.numberOfTransitions;H++){let X=L.transition(H);X instanceof J.RuleTransition&&(X.tailCall=this.testTailCall(w,X,!1),X.optimizedTailCall=this.testTailCall(w,X,!0))}if(L.isOptimized)for(let H=0;H<L.numberOfOptimizedTransitions;H++){let X=L.getOptimizedTransition(H);X instanceof J.RuleTransition&&(X.tailCall=this.testTailCall(w,X,!1),X.optimizedTailCall=this.testTailCall(w,X,!0))}}}static testTailCall(w,L,H){if(!H&&L.tailCall||H&&L.optimizedTailCall)return!0;let X=new e.BitSet(w.states.length),Y=[];for(Y.push(L.followState);;){let re=Y.pop();if(!re)break;if(X.get(re.stateNumber)||re instanceof ee.RuleStopState)continue;if(!re.onlyHasEpsilonTransitions)return!1;let q=H?re.numberOfOptimizedTransitions:re.numberOfTransitions;for(let $=0;$<q;$++){let se=H?re.getOptimizedTransition($):re.transition($);if(se.serializationType!==1)return!1;Y.push(se.target)}}return!0}static toInt(w){return w}static toInt32(w,L){return(w[L]|w[L+1]<<16)>>>0}static toUUID(w,L){let H=ue.toInt32(w,L),X=ue.toInt32(w,L+2),Y=ue.toInt32(w,L+4),re=ue.toInt32(w,L+6);return new R.UUID(re,Y,X,H)}edgeFactory(w,L,H,X,Y,re,q,$){let se=w.states[X];switch(L){case 1:return new g.EpsilonTransition(se);case 2:return q!==0?new le.RangeTransition(se,C.Token.EOF,re):new le.RangeTransition(se,Y,re);case 3:return new J.RuleTransition(w.states[Y],re,q,se);case 4:return new Ee.PredicateTransition(se,Y,re,q!==0);case 10:return new he.PrecedencePredicateTransition(se,Y);case 5:return q!==0?new n.AtomTransition(se,C.Token.EOF):new n.AtomTransition(se,Y);case 6:return new c.ActionTransition(se,Y,re,q!==0);case 7:return new F.SetTransition(se,$[Y]);case 8:return new U.NotSetTransition(se,$[Y]);case 9:return new I.WildcardTransition(se)}throw new Error("The specified transition type is not valid.")}stateFactory(w,L){let H;switch(w){case r.ATNStateType.INVALID_TYPE:return new m.InvalidState;case r.ATNStateType.BASIC:H=new s.BasicState;break;case r.ATNStateType.RULE_START:H=new Z.RuleStartState;break;case r.ATNStateType.BLOCK_START:H=new t.BasicBlockStartState;break;case r.ATNStateType.PLUS_BLOCK_START:H=new ie.PlusBlockStartState;break;case r.ATNStateType.STAR_BLOCK_START:H=new E.StarBlockStartState;break;case r.ATNStateType.TOKEN_START:H=new P.TokensStartState;break;case r.ATNStateType.RULE_STOP:H=new ee.RuleStopState;break;case r.ATNStateType.BLOCK_END:H=new o.BlockEndState;break;case r.ATNStateType.STAR_LOOP_BACK:H=new A.StarLoopbackState;break;case r.ATNStateType.STAR_LOOP_ENTRY:H=new S.StarLoopEntryState;break;case r.ATNStateType.PLUS_LOOP_BACK:H=new oe.PlusLoopbackState;break;case r.ATNStateType.LOOP_END:H=new k.LoopEndState;break;default:let X=`The specified state type ${w} is not valid.`;throw new Error(X)}return H.ruleIndex=L,H}lexerActionFactory(w,L,H){switch(w){case 0:return new y.LexerChannelAction(L);case 1:return new _.LexerCustomAction(L,H);case 2:return new v.LexerModeAction(L);case 3:return N.LexerMoreAction.INSTANCE;case 4:return T.LexerPopModeAction.INSTANCE;case 5:return new b.LexerPushModeAction(L);case 6:return O.LexerSkipAction.INSTANCE;case 7:return new D.LexerTypeAction(L);default:let X=`The specified lexer action type ${w} is not valid.`;throw new Error(X)}}};return W.BASE_SERIALIZED_UUID=R.UUID.fromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3"),W.ADDED_LEXER_ACTIONS=R.UUID.fromString("AB35191A-1603-487E-B75A-479B831EAF6D"),W.ADDED_UNICODE_SMP=R.UUID.fromString("C23FEA89-0605-4f51-AFB8-058BCAB8C91B"),W.SUPPORTED_UUIDS=[W.BASE_SERIALIZED_UUID,W.ADDED_LEXER_ACTIONS,W.ADDED_UNICODE_SMP],W.SERIALIZED_UUID=W.ADDED_UNICODE_SMP,u([z.NotNull],W.prototype,"deserializationOptions",void 0),u([i(0,z.NotNull)],W.prototype,"deserialize",null),u([i(0,z.NotNull)],W.prototype,"markPrecedenceDecisions",null),u([z.NotNull,i(0,z.NotNull)],W.prototype,"edgeFactory",null),Nt.ATNDeserializer=W,Nt}var qt={},_f;function U0(){if(_f)return qt;_f=1;var u=qt&&qt.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s},i=qt&&qt.__param||function(p,a){return function(r,n){a(r,n,p)}};Object.defineProperty(qt,"__esModule",{value:!0}),qt.ParseInfo=void 0;const c=Q();let h=class{constructor(a){this.atnSimulator=a}getDecisionInfo(){return this.atnSimulator.getDecisionInfo()}getLLDecisions(){let a=this.atnSimulator.getDecisionInfo(),r=[];for(let n=0;n<a.length;n++)a[n].LL_Fallback>0&&r.push(n);return r}getTotalTimeInPrediction(){let a=this.atnSimulator.getDecisionInfo(),r=0;for(let n of a)r+=n.timeInPrediction;return r}getTotalSLLLookaheadOps(){let a=this.atnSimulator.getDecisionInfo(),r=0;for(let n of a)r+=n.SLL_TotalLook;return r}getTotalLLLookaheadOps(){let a=this.atnSimulator.getDecisionInfo(),r=0;for(let n of a)r+=n.LL_TotalLook;return r}getTotalSLLATNLookaheadOps(){let a=this.atnSimulator.getDecisionInfo(),r=0;for(let n of a)r+=n.SLL_ATNTransitions;return r}getTotalLLATNLookaheadOps(){let a=this.atnSimulator.getDecisionInfo(),r=0;for(let n of a)r+=n.LL_ATNTransitions;return r}getTotalATNLookaheadOps(){let a=this.atnSimulator.getDecisionInfo(),r=0;for(let n of a)r+=n.SLL_ATNTransitions,r+=n.LL_ATNTransitions;return r}getDFASize(a){if(a)return this.atnSimulator.atn.decisionToDFA[a].states.size;{let r=0,n=this.atnSimulator.atn.decisionToDFA;for(let t=0;t<n.length;t++)r+=this.getDFASize(t);return r}}};return u([c.NotNull],h.prototype,"getDecisionInfo",null),u([c.NotNull],h.prototype,"getLLDecisions",null),h=u([i(0,c.NotNull)],h),qt.ParseInfo=h,qt}var fn={},mf;function gf(){if(mf)return fn;mf=1;var u=fn&&fn.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(fn,"__esModule",{value:!0}),fn.ProxyParserErrorListener=void 0;const i=Ms(),c=Q();let h=class extends i.ProxyErrorListener{constructor(a){super(a)}reportAmbiguity(a,r,n,t,s,e,o){this.getDelegates().forEach(l=>{l.reportAmbiguity&&l.reportAmbiguity(a,r,n,t,s,e,o)})}reportAttemptingFullContext(a,r,n,t,s,e){this.getDelegates().forEach(o=>{o.reportAttemptingFullContext&&o.reportAttemptingFullContext(a,r,n,t,s,e)})}reportContextSensitivity(a,r,n,t,s,e){this.getDelegates().forEach(o=>{o.reportContextSensitivity&&o.reportContextSensitivity(a,r,n,t,s,e)})}};return u([c.Override],h.prototype,"reportAmbiguity",null),u([c.Override],h.prototype,"reportAttemptingFullContext",null),u([c.Override],h.prototype,"reportContextSensitivity",null),fn.ProxyParserErrorListener=h,fn}var hn={},Vs={},Ws={},kt={},vf;function z0(){if(vf)return kt;vf=1;Object.defineProperty(kt,"__esModule",{value:!0}),kt.isSupplementaryCodePoint=kt.isLowSurrogate=kt.isHighSurrogate=void 0;function u(h){return h>=55296&&h<=56319}kt.isHighSurrogate=u;function i(h){return h>=56320&&h<=57343}kt.isLowSurrogate=i;function c(h){return h>=65536}return kt.isSupplementaryCodePoint=c,kt}var Af;function Tf(){return Af||(Af=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.CodePointBuffer=void 0;const i=Fe(),c=z0();class h{constructor(a,r){this.buffer=a,this._position=0,this._size=r}static withArray(a){return new h(a,a.length)}get position(){return this._position}set position(a){if(a<0||a>this._size)throw new RangeError;this._position=a}get remaining(){return this._size-this.position}get(a){return this.buffer[a]}array(){return this.buffer.slice(0,this._size)}static builder(a){return new h.Builder(a)}}u.CodePointBuffer=h,(function(p){let a;(function(n){n[n.BYTE=0]="BYTE",n[n.CHAR=1]="CHAR",n[n.INT=2]="INT"})(a||(a={}));class r{constructor(t){this.type=0,this.buffer=new Uint8Array(t),this.prevHighSurrogate=-1,this.position=0}build(){return new p(this.buffer,this.position)}static roundUpToNextPowerOfTwo(t){let s=32-Math.clz32(t-1);return Math.pow(2,s)}ensureRemaining(t){switch(this.type){case 0:if(this.buffer.length-this.position<t){let s=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Uint8Array(s);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break;case 1:if(this.buffer.length-this.position<t){let s=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Uint16Array(s);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break;case 2:if(this.buffer.length-this.position<t){let s=r.roundUpToNextPowerOfTwo(this.buffer.length+t),e=new Int32Array(s);e.set(this.buffer.subarray(0,this.position),0),this.buffer=e}break}}append(t){this.ensureRemaining(t.length),this.appendArray(t)}appendArray(t){switch(this.type){case 0:this.appendArrayByte(t);break;case 1:this.appendArrayChar(t);break;case 2:this.appendArrayInt(t);break}}appendArrayByte(t){i(this.prevHighSurrogate===-1);let s=t,e=0,o=t.length,l=this.buffer,f=this.position;for(;e<o;){let d=s[e];if(d<=255)l[f]=d;else if(t=t.subarray(e,o),this.position=f,c.isHighSurrogate(d)){this.byteToIntBuffer(t.length),this.appendArrayInt(t);return}else{this.byteToCharBuffer(t.length),this.appendArrayChar(t);return}e++,f++}this.position=f}appendArrayChar(t){i(this.prevHighSurrogate===-1);let s=t,e=0,o=t.length,l=this.buffer,f=this.position;for(;e<o;){let d=s[e];if(!c.isHighSurrogate(d))l[f]=d;else{t=t.subarray(e,o),this.position=f,this.charToIntBuffer(t.length),this.appendArrayInt(t);return}e++,f++}this.position=f}appendArrayInt(t){let s=t,e=0,o=t.length,l=this.buffer,f=this.position;for(;e<o;){let d=s[e];e++,this.prevHighSurrogate!==-1?c.isLowSurrogate(d)?(l[f]=String.fromCharCode(this.prevHighSurrogate,d).codePointAt(0),f++,this.prevHighSurrogate=-1):(l[f]=this.prevHighSurrogate,f++,c.isHighSurrogate(d)?this.prevHighSurrogate=d:(l[f]=d,f++,this.prevHighSurrogate=-1)):c.isHighSurrogate(d)?this.prevHighSurrogate=d:(l[f]=d,f++)}this.prevHighSurrogate!==-1&&(l[f]=this.prevHighSurrogate,f++),this.position=f}byteToCharBuffer(t){let s=new Uint16Array(Math.max(this.position+t,this.buffer.length>>1));s.set(this.buffer.subarray(0,this.position),0),this.type=1,this.buffer=s}byteToIntBuffer(t){let s=new Int32Array(Math.max(this.position+t,this.buffer.length>>2));s.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=s}charToIntBuffer(t){let s=new Int32Array(Math.max(this.position+t,this.buffer.length>>1));s.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=s}}p.Builder=r})(h=u.CodePointBuffer||(u.CodePointBuffer={}))})(Ws)),Ws}var pn={},Ef;function Sf(){if(Ef)return pn;Ef=1;var u=pn&&pn.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(pn,"__esModule",{value:!0}),pn.CodePointCharStream=void 0;const i=Fe(),c=ur(),h=je(),p=Q();let a=class xp{constructor(n,t,s,e){i(t===0),this._array=n,this._size=s,this._name=e,this._position=0}get internalStorage(){return this._array}static fromBuffer(n,t){return(t===void 0||t.length===0)&&(t=c.IntStream.UNKNOWN_SOURCE_NAME),new xp(n.array(),n.position,n.remaining,t)}consume(){if(this._size-this._position===0)throw i(this.LA(1)===c.IntStream.EOF),new RangeError("cannot consume EOF");this._position++}get index(){return this._position}get size(){return this._size}mark(){return-1}release(n){}seek(n){this._position=n}get sourceName(){return this._name}toString(){return this.getText(h.Interval.of(0,this.size-1))}LA(n){let t;switch(Math.sign(n)){case-1:return t=this.index+n,t<0?c.IntStream.EOF:this._array[t];case 0:return 0;case 1:return t=this.index+n-1,t>=this.size?c.IntStream.EOF:this._array[t]}throw new RangeError("Not reached")}getText(n){const t=Math.min(n.a,this.size),s=Math.min(n.b-n.a+1,this.size-t);return this._array instanceof Int32Array?String.fromCodePoint(...Array.from(this._array.subarray(t,t+s))):String.fromCharCode(...Array.from(this._array.subarray(t,t+s)))}};return u([p.Override],a.prototype,"consume",null),u([p.Override],a.prototype,"index",null),u([p.Override],a.prototype,"size",null),u([p.Override],a.prototype,"mark",null),u([p.Override],a.prototype,"release",null),u([p.Override],a.prototype,"seek",null),u([p.Override],a.prototype,"sourceName",null),u([p.Override],a.prototype,"toString",null),u([p.Override],a.prototype,"LA",null),u([p.Override],a.prototype,"getText",null),pn.CodePointCharStream=a,pn}var Nf;function Gs(){return Nf||(Nf=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.CharStreams=void 0;const i=Tf(),c=Sf(),h=ur();(function(p){function a(r,n){(n===void 0||n.length===0)&&(n=h.IntStream.UNKNOWN_SOURCE_NAME);let t=i.CodePointBuffer.builder(r.length),s=new Uint16Array(r.length);for(let e=0;e<r.length;e++)s[e]=r.charCodeAt(e);return t.append(s),c.CodePointCharStream.fromBuffer(t.build(),n)}p.fromString=a})(u.CharStreams||(u.CharStreams={}))})(Vs)),Vs}var Ut={},zt={},bf;function Cf(){if(bf)return zt;bf=1;var u=zt&&zt.__decorate||function(s,e,o,l){var f=arguments.length,d=f<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,o):l,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(s,e,o,l);else for(var x=s.length-1;x>=0;x--)(g=s[x])&&(d=(f<3?g(d):f>3?g(e,o,d):g(e,o))||d);return f>3&&d&&Object.defineProperty(e,o,d),d},i=zt&&zt.__param||function(s,e){return function(o,l){e(o,l,s)}};Object.defineProperty(zt,"__esModule",{value:!0}),zt.BufferedTokenStream=void 0;const c=Fe(),h=Vn(),p=je(),a=hr(),r=Q(),n=Ne();let t=class{constructor(e){if(this.tokens=[],this.p=-1,this.fetchedEOF=!1,e==null)throw new Error("tokenSource cannot be null");this._tokenSource=e}get tokenSource(){return this._tokenSource}set tokenSource(e){this._tokenSource=e,this.tokens.length=0,this.p=-1,this.fetchedEOF=!1}get index(){return this.p}mark(){return 0}release(e){}seek(e){this.lazyInit(),this.p=this.adjustSeekIndex(e)}get size(){return this.tokens.length}consume(){let e;if(this.p>=0?this.fetchedEOF?e=this.p<this.tokens.length-1:e=this.p<this.tokens.length:e=!1,!e&&this.LA(1)===n.Token.EOF)throw new Error("cannot consume EOF");this.sync(this.p+1)&&(this.p=this.adjustSeekIndex(this.p+1))}sync(e){c(e>=0);let o=e-this.tokens.length+1;return o>0?this.fetch(o)>=o:!0}fetch(e){if(this.fetchedEOF)return 0;for(let o=0;o<e;o++){let l=this.tokenSource.nextToken();if(this.isWritableToken(l)&&(l.tokenIndex=this.tokens.length),this.tokens.push(l),l.type===n.Token.EOF)return this.fetchedEOF=!0,o+1}return e}get(e){if(e<0||e>=this.tokens.length)throw new RangeError("token index "+e+" out of range 0.."+(this.tokens.length-1));return this.tokens[e]}getRange(e,o){if(e<0||o<0)return[];this.lazyInit();let l=new Array;o>=this.tokens.length&&(o=this.tokens.length-1);for(let f=e;f<=o;f++){let d=this.tokens[f];if(d.type===n.Token.EOF)break;l.push(d)}return l}LA(e){let o=this.LT(e);return o?o.type:n.Token.INVALID_TYPE}tryLB(e){if(!(this.p-e<0))return this.tokens[this.p-e]}LT(e){let o=this.tryLT(e);if(o===void 0)throw new RangeError("requested lookback index out of range");return o}tryLT(e){if(this.lazyInit(),e===0)throw new RangeError("0 is not a valid lookahead index");if(e<0)return this.tryLB(-e);let o=this.p+e-1;return this.sync(o),o>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[o]}adjustSeekIndex(e){return e}lazyInit(){this.p===-1&&this.setup()}setup(){this.sync(0),this.p=this.adjustSeekIndex(0)}getTokens(e,o,l){if(this.lazyInit(),e===void 0)return c(o===void 0&&l===void 0),this.tokens;if(o===void 0&&(o=this.tokens.length-1),e<0||o>=this.tokens.length||o<0||e>=this.tokens.length)throw new RangeError("start "+e+" or stop "+o+" not in 0.."+(this.tokens.length-1));if(e>o)return[];if(l===void 0)return this.tokens.slice(e,o+1);typeof l=="number"&&(l=new Set().add(l));let f=l,d=this.tokens.slice(e,o+1);return d=d.filter(g=>f.has(g.type)),d}nextTokenOnChannel(e,o){if(this.sync(e),e>=this.size)return this.size-1;let l=this.tokens[e];for(;l.channel!==o;){if(l.type===n.Token.EOF)return e;e++,this.sync(e),l=this.tokens[e]}return e}previousTokenOnChannel(e,o){if(this.sync(e),e>=this.size)return this.size-1;for(;e>=0;){let l=this.tokens[e];if(l.type===n.Token.EOF||l.channel===o)return e;e--}return e}getHiddenTokensToRight(e,o=-1){if(this.lazyInit(),e<0||e>=this.tokens.length)throw new RangeError(e+" not in 0.."+(this.tokens.length-1));let l=this.nextTokenOnChannel(e+1,a.Lexer.DEFAULT_TOKEN_CHANNEL),f,d=e+1;return l===-1?f=this.size-1:f=l,this.filterForChannel(d,f,o)}getHiddenTokensToLeft(e,o=-1){if(this.lazyInit(),e<0||e>=this.tokens.length)throw new RangeError(e+" not in 0.."+(this.tokens.length-1));if(e===0)return[];let l=this.previousTokenOnChannel(e-1,a.Lexer.DEFAULT_TOKEN_CHANNEL);if(l===e-1)return[];let f=l+1,d=e-1;return this.filterForChannel(f,d,o)}filterForChannel(e,o,l){let f=new Array;for(let d=e;d<=o;d++){let g=this.tokens[d];l===-1?g.channel!==a.Lexer.DEFAULT_TOKEN_CHANNEL&&f.push(g):g.channel===l&&f.push(g)}return f}get sourceName(){return this.tokenSource.sourceName}getText(e){e===void 0?e=p.Interval.of(0,this.size-1):e instanceof p.Interval||(e=e.sourceInterval);let o=e.a,l=e.b;if(o<0||l<0)return"";this.fill(),l>=this.tokens.length&&(l=this.tokens.length-1);let f="";for(let d=o;d<=l;d++){let g=this.tokens[d];if(g.type===n.Token.EOF)break;f+=g.text}return f.toString()}getTextFromRange(e,o){return this.isToken(e)&&this.isToken(o)?this.getText(p.Interval.of(e.tokenIndex,o.tokenIndex)):""}fill(){this.lazyInit();const e=1e3;for(;;)if(this.fetch(e)<e)return}isWritableToken(e){return e instanceof h.CommonToken}isToken(e){return e instanceof h.CommonToken}};return u([r.NotNull],t.prototype,"_tokenSource",void 0),u([r.Override],t.prototype,"tokenSource",null),u([r.Override],t.prototype,"index",null),u([r.Override],t.prototype,"mark",null),u([r.Override],t.prototype,"release",null),u([r.Override],t.prototype,"seek",null),u([r.Override],t.prototype,"size",null),u([r.Override],t.prototype,"consume",null),u([r.Override],t.prototype,"get",null),u([r.Override],t.prototype,"LA",null),u([r.NotNull,r.Override],t.prototype,"LT",null),u([r.Override],t.prototype,"sourceName",null),u([r.NotNull,r.Override],t.prototype,"getText",null),u([r.NotNull,r.Override],t.prototype,"getTextFromRange",null),t=u([i(0,r.NotNull)],t),zt.BufferedTokenStream=t,zt}var Of;function Xs(){if(Of)return Ut;Of=1;var u=Ut&&Ut.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=Ut&&Ut.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(Ut,"__esModule",{value:!0}),Ut.CommonTokenStream=void 0;const c=Cf(),h=Q(),p=Ne();let a=class extends c.BufferedTokenStream{constructor(n,t=p.Token.DEFAULT_CHANNEL){super(n),this.channel=t}adjustSeekIndex(n){return this.nextTokenOnChannel(n,this.channel)}tryLB(n){if(this.p-n<0)return;let t=this.p,s=1;for(;s<=n&&t>0;)t=this.previousTokenOnChannel(t-1,this.channel),s++;if(!(t<0))return this.tokens[t]}tryLT(n){if(this.lazyInit(),n===0)throw new RangeError("0 is not a valid lookahead index");if(n<0)return this.tryLB(-n);let t=this.p,s=1;for(;s<n;)this.sync(t+1)&&(t=this.nextTokenOnChannel(t+1,this.channel)),s++;return this.tokens[t]}getNumberOfOnChannelTokens(){let n=0;this.fill();for(let t of this.tokens)if(t.channel===this.channel&&n++,t.type===p.Token.EOF)break;return n}};return u([h.Override],a.prototype,"adjustSeekIndex",null),u([h.Override],a.prototype,"tryLB",null),u([h.Override],a.prototype,"tryLT",null),a=u([i(0,h.NotNull)],a),Ut.CommonTokenStream=a,Ut}var Ht={},Rf;function Pf(){if(Rf)return Ht;Rf=1;var u=Ht&&Ht.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=Ht&&Ht.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(Ht,"__esModule",{value:!0}),Ht.ListTokenSource=void 0;const c=Bs(),h=Q(),p=Ne();let a=class{constructor(n,t){if(this.i=0,this._factory=c.CommonTokenFactory.DEFAULT,n==null)throw new Error("tokens cannot be null");this.tokens=n,this._sourceName=t}get charPositionInLine(){if(this.i<this.tokens.length)return this.tokens[this.i].charPositionInLine;if(this.eofToken!=null)return this.eofToken.charPositionInLine;if(this.tokens.length>0){let n=this.tokens[this.tokens.length-1],t=n.text;if(t!=null){let s=t.lastIndexOf(`
|
|
401
78
|
`);if(s>=0)return t.length-s-1}return n.charPositionInLine+n.stopIndex-n.startIndex+1}return 0}nextToken(){if(this.i>=this.tokens.length){if(this.eofToken==null){let t=-1;if(this.tokens.length>0){let e=this.tokens[this.tokens.length-1].stopIndex;e!==-1&&(t=e+1)}let s=Math.max(-1,t-1);this.eofToken=this._factory.create({source:this,stream:this.inputStream},p.Token.EOF,"EOF",p.Token.DEFAULT_CHANNEL,t,s,this.line,this.charPositionInLine)}return this.eofToken}let n=this.tokens[this.i];return this.i===this.tokens.length-1&&n.type===p.Token.EOF&&(this.eofToken=n),this.i++,n}get line(){if(this.i<this.tokens.length)return this.tokens[this.i].line;if(this.eofToken!=null)return this.eofToken.line;if(this.tokens.length>0){let n=this.tokens[this.tokens.length-1],t=n.line,s=n.text;if(s!=null)for(let e=0;e<s.length;e++)s.charAt(e)===`
|
|
402
|
-
`&&t++;return t}return 1}get inputStream(){if(this.i<this.tokens.length)return this.tokens[this.i].inputStream;if(this.eofToken!=null)return this.eofToken.inputStream;if(this.tokens.length>0)return this.tokens[this.tokens.length-1].inputStream}get sourceName(){if(this._sourceName)return this._sourceName;let n=this.inputStream;return n!=null?n.sourceName:"List"}set tokenFactory(n){this._factory=n}get tokenFactory(){return this._factory}};return u([h.Override],a.prototype,"charPositionInLine",null),u([h.Override],a.prototype,"nextToken",null),u([h.Override],a.prototype,"line",null),u([h.Override],a.prototype,"inputStream",null),u([h.Override],a.prototype,"sourceName",null),u([h.Override,h.NotNull,i(0,h.NotNull)],a.prototype,"tokenFactory",null),a=u([i(0,h.NotNull)],a),Xt.ListTokenSource=a,Xt}var ci={},If;function H0(){if(If)return ci;If=1;/*!
|
|
403
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
404
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
405
|
-
*/Object.defineProperty(ci,"__esModule",{value:!0}),ci.MultiMap=void 0;let u=class extends Map{constructor(){super()}map(c,h){let p=super.get(c);p||(p=[],super.set(c,p)),p.push(h)}getPairs(){let c=[];return this.forEach((h,p)=>{h.forEach(a=>{c.push([p,a])})}),c}};return ci.MultiMap=u,ci}var fi={},wf;function Lf(){if(wf)return fi;wf=1;/*!
|
|
406
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
407
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
408
|
-
*/Object.defineProperty(fi,"__esModule",{value:!0}),fi.ParseCancellationException=void 0;let u=class extends Error{constructor(c){super(c.message),this.cause=c,this.stack=c.stack}getCause(){return this.cause}};return fi.ParseCancellationException=u,fi}var Kt={},_n={},Ff;function Bf(){if(Ff)return _n;Ff=1;/*!
|
|
409
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
410
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
411
|
-
*/var u=_n&&_n.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(_n,"__esModule",{value:!0}),_n.InterpreterRuleContext=void 0;const i=Q(),c=et();let h=class extends c.ParserRuleContext{constructor(a,r,n){n!==void 0?super(r,n):super(),this._ruleIndex=a}get ruleIndex(){return this._ruleIndex}};return u([i.Override],h.prototype,"ruleIndex",null),_n.InterpreterRuleContext=h,_n}var jf;function Mf(){if(jf)return Kt;jf=1;/*!
|
|
412
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
413
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
414
|
-
*/var u=Kt&&Kt.__decorate||function(m,y,_,v){var N=arguments.length,T=N<3?y:v===null?v=Object.getOwnPropertyDescriptor(y,_):v,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(m,y,_,v);else for(var O=m.length-1;O>=0;O--)(b=m[O])&&(T=(N<3?b(T):N>3?b(y,_,T):b(y,_))||T);return N>3&&T&&Object.defineProperty(y,_,T),T},i=Kt&&Kt.__param||function(m,y){return function(_,v){y(_,v,m)}};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.ParserInterpreter=void 0;const c=ut(),h=Fe(),p=yr(),a=Li(),r=Fi(),n=Bf(),t=Xc(),s=Q(),e=Q(),o=yi(),l=ai(),f=pr(),d=Us(),g=Oe();let x=class Cu extends o.Parser{constructor(y,_,v,N,T){if(super(y instanceof Cu?y.inputStream:T),this._parentContextStack=[],this.overrideDecision=-1,this.overrideDecisionInputIndex=-1,this.overrideDecisionAlt=-1,this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0,y instanceof Cu){let b=y;this._grammarFileName=b._grammarFileName,this._atn=b._atn,this.pushRecursionContextStates=b.pushRecursionContextStates,this._ruleNames=b._ruleNames,this._vocabulary=b._vocabulary,this.interpreter=new l.ParserATNSimulator(this._atn,this)}else{_=_,v=v,N=N,this._grammarFileName=y,this._atn=N,this._ruleNames=v.slice(0),this._vocabulary=_,this.pushRecursionContextStates=new p.BitSet(N.states.length);for(let b of N.states)b instanceof d.StarLoopEntryState&&b.precedenceRuleDecision&&this.pushRecursionContextStates.set(b.stateNumber);this.interpreter=new l.ParserATNSimulator(N,this)}}reset(y){y===void 0?super.reset():super.reset(y),this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0}get atn(){return this._atn}get vocabulary(){return this._vocabulary}get ruleNames(){return this._ruleNames}get grammarFileName(){return this._grammarFileName}parse(y){let _=this._atn.ruleToStartState[y];for(this._rootContext=this.createInterpreterRuleContext(void 0,c.ATNState.INVALID_STATE_NUMBER,y),_.isPrecedenceRule?this.enterRecursionRule(this._rootContext,_.stateNumber,y,0):this.enterRule(this._rootContext,_.stateNumber,y);;){let v=this.atnState;switch(v.stateType){case h.ATNStateType.RULE_STOP:if(this._ctx.isEmpty)if(_.isPrecedenceRule){let N=this._ctx,T=this._parentContextStack.pop();return this.unrollRecursionContexts(T[0]),N}else return this.exitRule(),this._rootContext;this.visitRuleStopState(v);break;default:try{this.visitState(v)}catch(N){if(N instanceof f.RecognitionException)this.state=this._atn.ruleToStopState[v.ruleIndex].stateNumber,this.context.exception=N,this.errorHandler.reportError(this,N),this.recover(N);else throw N}break}}}enterRecursionRule(y,_,v,N){this._parentContextStack.push([this._ctx,y.invokingState]),super.enterRecursionRule(y,_,v,N)}get atnState(){return this._atn.states[this.state]}visitState(y){let _=1;y.numberOfTransitions>1&&(_=this.visitDecisionState(y));let v=y.transition(_-1);switch(v.serializationType){case 1:if(this.pushRecursionContextStates.get(y.stateNumber)&&!(v.target instanceof t.LoopEndState)){let k=this._parentContextStack[this._parentContextStack.length-1],z=this.createInterpreterRuleContext(k[0],k[1],this._ctx.ruleIndex);this.pushNewRecursionContext(z,this._atn.ruleToStartState[y.ruleIndex].stateNumber,this._ctx.ruleIndex)}break;case 5:this.match(v._label);break;case 2:case 7:case 8:v.matches(this._input.LA(1),g.Token.MIN_USER_TOKEN_TYPE,65535)||this.recoverInline(),this.matchWildcard();break;case 9:this.matchWildcard();break;case 3:let N=v.target,T=N.ruleIndex,b=this.createInterpreterRuleContext(this._ctx,y.stateNumber,T);N.isPrecedenceRule?this.enterRecursionRule(b,N.stateNumber,T,v.precedence):this.enterRule(b,v.target.stateNumber,T);break;case 4:let O=v;if(!this.sempred(this._ctx,O.ruleIndex,O.predIndex))throw new a.FailedPredicateException(this);break;case 6:let D=v;this.action(this._ctx,D.ruleIndex,D.actionIndex);break;case 10:if(!this.precpred(this._ctx,v.precedence)){let k=v.precedence;throw new a.FailedPredicateException(this,`precpred(_ctx, ${k})`)}break;default:throw new Error("UnsupportedOperationException: Unrecognized ATN transition type.")}this.state=v.target.stateNumber}visitDecisionState(y){let _;this.errorHandler.sync(this);let v=y.decision;return v===this.overrideDecision&&this._input.index===this.overrideDecisionInputIndex&&!this.overrideDecisionReached?(_=this.overrideDecisionAlt,this.overrideDecisionReached=!0):_=this.interpreter.adaptivePredict(this._input,v,this._ctx),_}createInterpreterRuleContext(y,_,v){return new n.InterpreterRuleContext(v,y,_)}visitRuleStopState(y){if(this._atn.ruleToStartState[y.ruleIndex].isPrecedenceRule){let N=this._parentContextStack.pop();this.unrollRecursionContexts(N[0]),this.state=N[1]}else this.exitRule();let v=this._atn.states[this.state].transition(0);this.state=v.followState.stateNumber}addDecisionOverride(y,_,v){this.overrideDecision=y,this.overrideDecisionInputIndex=_,this.overrideDecisionAlt=v}get overrideDecisionRoot(){return this._overrideDecisionRoot}recover(y){let _=this._input.index;if(this.errorHandler.recover(this,y),this._input.index===_){let v=y.getOffendingToken();if(!v)throw new Error("Expected exception to have an offending token");let N=v.tokenSource,T=N!==void 0?N.inputStream:void 0,b={source:N,stream:T};if(y instanceof r.InputMismatchException){let O=y.expectedTokens;if(O===void 0)throw new Error("Expected the exception to provide expected tokens");let D=g.Token.INVALID_TYPE;O.isNil||(D=O.minElement);let k=this.tokenFactory.create(b,D,v.text,g.Token.DEFAULT_CHANNEL,-1,-1,v.line,v.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,k))}else{v.tokenSource;let O=this.tokenFactory.create(b,g.Token.INVALID_TYPE,v.text,g.Token.DEFAULT_CHANNEL,-1,-1,v.line,v.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,O))}}}recoverInline(){return this._errHandler.recoverInline(this)}get rootContext(){return this._rootContext}};return u([s.NotNull],x.prototype,"_vocabulary",void 0),u([e.Override],x.prototype,"reset",null),u([e.Override],x.prototype,"atn",null),u([e.Override],x.prototype,"vocabulary",null),u([e.Override],x.prototype,"ruleNames",null),u([e.Override],x.prototype,"grammarFileName",null),u([e.Override],x.prototype,"enterRecursionRule",null),x=u([i(1,s.NotNull)],x),Kt.ParserInterpreter=x,Kt}var Yt={},qf;function $0(){if(qf)return Yt;qf=1;/*!
|
|
415
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
416
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
417
|
-
*/var u=Yt&&Yt.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s},i=Yt&&Yt.__param||function(p,a){return function(r,n){a(r,n,p)}};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.ParseTreeMatch=void 0;const c=Q();let h=class{constructor(a,r,n,t){if(!a)throw new Error("tree cannot be null");if(!r)throw new Error("pattern cannot be null");if(!n)throw new Error("labels cannot be null");this._tree=a,this._pattern=r,this._labels=n,this._mismatchedNode=t}get(a){let r=this._labels.get(a);if(!(!r||r.length===0))return r[r.length-1]}getAll(a){const r=this._labels.get(a);return r||[]}get labels(){return this._labels}get mismatchedNode(){return this._mismatchedNode}get succeeded(){return!this._mismatchedNode}get pattern(){return this._pattern}get tree(){return this._tree}toString(){return`Match ${this.succeeded?"succeeded":"failed"}; found ${this.labels.size} labels`}};return u([c.NotNull,i(0,c.NotNull)],h.prototype,"getAll",null),u([c.NotNull],h.prototype,"labels",null),u([c.NotNull],h.prototype,"pattern",null),u([c.NotNull],h.prototype,"tree",null),u([c.Override],h.prototype,"toString",null),h=u([i(0,c.NotNull),i(1,c.NotNull),i(2,c.NotNull)],h),Yt.ParseTreeMatch=h,Yt}var Qt={},hi={},pi={},kf;function V0(){if(kf)return pi;kf=1,Object.defineProperty(pi,"__esModule",{value:!0}),pi.XPathLexer=void 0;const u=Vs(),i=_r(),c=ki(),h=Ur(),p=ht();let a=class Ve extends i.Lexer{constructor(n){super(n),this._interp=new c.LexerATNSimulator(Ve._ATN,this)}get vocabulary(){return Ve.VOCABULARY}get grammarFileName(){return"XPathLexer.g4"}get ruleNames(){return Ve.ruleNames}get serializedATN(){return Ve._serializedATN}get channelNames(){return Ve.channelNames}get modeNames(){return Ve.modeNames}action(n,t,s){switch(t){case 4:this.ID_action(n,s);break}}ID_action(n,t){switch(t){case 0:let s=this.text;s.charAt(0)===s.charAt(0).toUpperCase()?this.type=Ve.TOKEN_REF:this.type=Ve.RULE_REF;break}}static get _ATN(){return Ve.__ATN||(Ve.__ATN=new u.ATNDeserializer().deserialize(p.toCharArray(Ve._serializedATN))),Ve.__ATN}};return pi.XPathLexer=a,a.TOKEN_REF=1,a.RULE_REF=2,a.ANYWHERE=3,a.ROOT=4,a.WILDCARD=5,a.BANG=6,a.ID=7,a.STRING=8,a.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],a.modeNames=["DEFAULT_MODE"],a.ruleNames=["ANYWHERE","ROOT","WILDCARD","BANG","ID","NameChar","NameStartChar","STRING"],a._LITERAL_NAMES=[void 0,void 0,void 0,"'//'","'/'","'*'","'!'"],a._SYMBOLIC_NAMES=[void 0,"TOKEN_REF","RULE_REF","ANYWHERE","ROOT","WILDCARD","BANG","ID","STRING"],a.VOCABULARY=new h.VocabularyImpl(a._LITERAL_NAMES,a._SYMBOLIC_NAMES,[]),a._serializedATNSegments=2,a._serializedATNSegment0=`줝쪺֍꾺体؇쉁
|
|
79
|
+
`&&t++;return t}return 1}get inputStream(){if(this.i<this.tokens.length)return this.tokens[this.i].inputStream;if(this.eofToken!=null)return this.eofToken.inputStream;if(this.tokens.length>0)return this.tokens[this.tokens.length-1].inputStream}get sourceName(){if(this._sourceName)return this._sourceName;let n=this.inputStream;return n!=null?n.sourceName:"List"}set tokenFactory(n){this._factory=n}get tokenFactory(){return this._factory}};return u([h.Override],a.prototype,"charPositionInLine",null),u([h.Override],a.prototype,"nextToken",null),u([h.Override],a.prototype,"line",null),u([h.Override],a.prototype,"inputStream",null),u([h.Override],a.prototype,"sourceName",null),u([h.Override,h.NotNull,i(0,h.NotNull)],a.prototype,"tokenFactory",null),a=u([i(0,h.NotNull)],a),Ht.ListTokenSource=a,Ht}var ai={},Df;function H0(){if(Df)return ai;Df=1;Object.defineProperty(ai,"__esModule",{value:!0}),ai.MultiMap=void 0;let u=class extends Map{constructor(){super()}map(c,h){let p=super.get(c);p||(p=[],super.set(c,p)),p.push(h)}getPairs(){let c=[];return this.forEach((h,p)=>{h.forEach(a=>{c.push([p,a])})}),c}};return ai.MultiMap=u,ai}var li={},If;function wf(){if(If)return li;If=1;Object.defineProperty(li,"__esModule",{value:!0}),li.ParseCancellationException=void 0;let u=class extends Error{constructor(c){super(c.message),this.cause=c,this.stack=c.stack}getCause(){return this.cause}};return li.ParseCancellationException=u,li}var Vt={},dn={},Lf;function Ff(){if(Lf)return dn;Lf=1;var u=dn&&dn.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(dn,"__esModule",{value:!0}),dn.InterpreterRuleContext=void 0;const i=Q(),c=Ke();let h=class extends c.ParserRuleContext{constructor(a,r,n){n!==void 0?super(r,n):super(),this._ruleIndex=a}get ruleIndex(){return this._ruleIndex}};return u([i.Override],h.prototype,"ruleIndex",null),dn.InterpreterRuleContext=h,dn}var Bf;function jf(){if(Bf)return Vt;Bf=1;var u=Vt&&Vt.__decorate||function(m,y,_,v){var N=arguments.length,T=N<3?y:v===null?v=Object.getOwnPropertyDescriptor(y,_):v,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")T=Reflect.decorate(m,y,_,v);else for(var O=m.length-1;O>=0;O--)(b=m[O])&&(T=(N<3?b(T):N>3?b(y,_,T):b(y,_))||T);return N>3&&T&&Object.defineProperty(y,_,T),T},i=Vt&&Vt.__param||function(m,y){return function(_,v){y(_,v,m)}};Object.defineProperty(Vt,"__esModule",{value:!0}),Vt.ParserInterpreter=void 0;const c=rt(),h=Ie(),p=fr(),a=Ii(),r=wi(),n=Ff(),t=Xc(),s=Q(),e=Q(),o=di(),l=si(),f=ar(),d=qs(),g=Ne();let x=class Nu extends o.Parser{constructor(y,_,v,N,T){if(super(y instanceof Nu?y.inputStream:T),this._parentContextStack=[],this.overrideDecision=-1,this.overrideDecisionInputIndex=-1,this.overrideDecisionAlt=-1,this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0,y instanceof Nu){let b=y;this._grammarFileName=b._grammarFileName,this._atn=b._atn,this.pushRecursionContextStates=b.pushRecursionContextStates,this._ruleNames=b._ruleNames,this._vocabulary=b._vocabulary,this.interpreter=new l.ParserATNSimulator(this._atn,this)}else{_=_,v=v,N=N,this._grammarFileName=y,this._atn=N,this._ruleNames=v.slice(0),this._vocabulary=_,this.pushRecursionContextStates=new p.BitSet(N.states.length);for(let b of N.states)b instanceof d.StarLoopEntryState&&b.precedenceRuleDecision&&this.pushRecursionContextStates.set(b.stateNumber);this.interpreter=new l.ParserATNSimulator(N,this)}}reset(y){y===void 0?super.reset():super.reset(y),this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0}get atn(){return this._atn}get vocabulary(){return this._vocabulary}get ruleNames(){return this._ruleNames}get grammarFileName(){return this._grammarFileName}parse(y){let _=this._atn.ruleToStartState[y];for(this._rootContext=this.createInterpreterRuleContext(void 0,c.ATNState.INVALID_STATE_NUMBER,y),_.isPrecedenceRule?this.enterRecursionRule(this._rootContext,_.stateNumber,y,0):this.enterRule(this._rootContext,_.stateNumber,y);;){let v=this.atnState;switch(v.stateType){case h.ATNStateType.RULE_STOP:if(this._ctx.isEmpty)if(_.isPrecedenceRule){let N=this._ctx,T=this._parentContextStack.pop();return this.unrollRecursionContexts(T[0]),N}else return this.exitRule(),this._rootContext;this.visitRuleStopState(v);break;default:try{this.visitState(v)}catch(N){if(N instanceof f.RecognitionException)this.state=this._atn.ruleToStopState[v.ruleIndex].stateNumber,this.context.exception=N,this.errorHandler.reportError(this,N),this.recover(N);else throw N}break}}}enterRecursionRule(y,_,v,N){this._parentContextStack.push([this._ctx,y.invokingState]),super.enterRecursionRule(y,_,v,N)}get atnState(){return this._atn.states[this.state]}visitState(y){let _=1;y.numberOfTransitions>1&&(_=this.visitDecisionState(y));let v=y.transition(_-1);switch(v.serializationType){case 1:if(this.pushRecursionContextStates.get(y.stateNumber)&&!(v.target instanceof t.LoopEndState)){let k=this._parentContextStack[this._parentContextStack.length-1],z=this.createInterpreterRuleContext(k[0],k[1],this._ctx.ruleIndex);this.pushNewRecursionContext(z,this._atn.ruleToStartState[y.ruleIndex].stateNumber,this._ctx.ruleIndex)}break;case 5:this.match(v._label);break;case 2:case 7:case 8:v.matches(this._input.LA(1),g.Token.MIN_USER_TOKEN_TYPE,65535)||this.recoverInline(),this.matchWildcard();break;case 9:this.matchWildcard();break;case 3:let N=v.target,T=N.ruleIndex,b=this.createInterpreterRuleContext(this._ctx,y.stateNumber,T);N.isPrecedenceRule?this.enterRecursionRule(b,N.stateNumber,T,v.precedence):this.enterRule(b,v.target.stateNumber,T);break;case 4:let O=v;if(!this.sempred(this._ctx,O.ruleIndex,O.predIndex))throw new a.FailedPredicateException(this);break;case 6:let D=v;this.action(this._ctx,D.ruleIndex,D.actionIndex);break;case 10:if(!this.precpred(this._ctx,v.precedence)){let k=v.precedence;throw new a.FailedPredicateException(this,`precpred(_ctx, ${k})`)}break;default:throw new Error("UnsupportedOperationException: Unrecognized ATN transition type.")}this.state=v.target.stateNumber}visitDecisionState(y){let _;this.errorHandler.sync(this);let v=y.decision;return v===this.overrideDecision&&this._input.index===this.overrideDecisionInputIndex&&!this.overrideDecisionReached?(_=this.overrideDecisionAlt,this.overrideDecisionReached=!0):_=this.interpreter.adaptivePredict(this._input,v,this._ctx),_}createInterpreterRuleContext(y,_,v){return new n.InterpreterRuleContext(v,y,_)}visitRuleStopState(y){if(this._atn.ruleToStartState[y.ruleIndex].isPrecedenceRule){let N=this._parentContextStack.pop();this.unrollRecursionContexts(N[0]),this.state=N[1]}else this.exitRule();let v=this._atn.states[this.state].transition(0);this.state=v.followState.stateNumber}addDecisionOverride(y,_,v){this.overrideDecision=y,this.overrideDecisionInputIndex=_,this.overrideDecisionAlt=v}get overrideDecisionRoot(){return this._overrideDecisionRoot}recover(y){let _=this._input.index;if(this.errorHandler.recover(this,y),this._input.index===_){let v=y.getOffendingToken();if(!v)throw new Error("Expected exception to have an offending token");let N=v.tokenSource,T=N!==void 0?N.inputStream:void 0,b={source:N,stream:T};if(y instanceof r.InputMismatchException){let O=y.expectedTokens;if(O===void 0)throw new Error("Expected the exception to provide expected tokens");let D=g.Token.INVALID_TYPE;O.isNil||(D=O.minElement);let k=this.tokenFactory.create(b,D,v.text,g.Token.DEFAULT_CHANNEL,-1,-1,v.line,v.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,k))}else{v.tokenSource;let O=this.tokenFactory.create(b,g.Token.INVALID_TYPE,v.text,g.Token.DEFAULT_CHANNEL,-1,-1,v.line,v.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,O))}}}recoverInline(){return this._errHandler.recoverInline(this)}get rootContext(){return this._rootContext}};return u([s.NotNull],x.prototype,"_vocabulary",void 0),u([e.Override],x.prototype,"reset",null),u([e.Override],x.prototype,"atn",null),u([e.Override],x.prototype,"vocabulary",null),u([e.Override],x.prototype,"ruleNames",null),u([e.Override],x.prototype,"grammarFileName",null),u([e.Override],x.prototype,"enterRecursionRule",null),x=u([i(1,s.NotNull)],x),Vt.ParserInterpreter=x,Vt}var Wt={},Mf;function V0(){if(Mf)return Wt;Mf=1;var u=Wt&&Wt.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s},i=Wt&&Wt.__param||function(p,a){return function(r,n){a(r,n,p)}};Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.ParseTreeMatch=void 0;const c=Q();let h=class{constructor(a,r,n,t){if(!a)throw new Error("tree cannot be null");if(!r)throw new Error("pattern cannot be null");if(!n)throw new Error("labels cannot be null");this._tree=a,this._pattern=r,this._labels=n,this._mismatchedNode=t}get(a){let r=this._labels.get(a);if(!(!r||r.length===0))return r[r.length-1]}getAll(a){const r=this._labels.get(a);return r||[]}get labels(){return this._labels}get mismatchedNode(){return this._mismatchedNode}get succeeded(){return!this._mismatchedNode}get pattern(){return this._pattern}get tree(){return this._tree}toString(){return`Match ${this.succeeded?"succeeded":"failed"}; found ${this.labels.size} labels`}};return u([c.NotNull,i(0,c.NotNull)],h.prototype,"getAll",null),u([c.NotNull],h.prototype,"labels",null),u([c.NotNull],h.prototype,"pattern",null),u([c.NotNull],h.prototype,"tree",null),u([c.Override],h.prototype,"toString",null),h=u([i(0,c.NotNull),i(1,c.NotNull),i(2,c.NotNull)],h),Wt.ParseTreeMatch=h,Wt}var Gt={},ci={},fi={},qf;function W0(){if(qf)return fi;qf=1,Object.defineProperty(fi,"__esModule",{value:!0}),fi.XPathLexer=void 0;const u=Hs(),i=hr(),c=Mi(),h=Mr(),p=ut();let a=class Ue extends i.Lexer{constructor(n){super(n),this._interp=new c.LexerATNSimulator(Ue._ATN,this)}get vocabulary(){return Ue.VOCABULARY}get grammarFileName(){return"XPathLexer.g4"}get ruleNames(){return Ue.ruleNames}get serializedATN(){return Ue._serializedATN}get channelNames(){return Ue.channelNames}get modeNames(){return Ue.modeNames}action(n,t,s){switch(t){case 4:this.ID_action(n,s);break}}ID_action(n,t){switch(t){case 0:let s=this.text;s.charAt(0)===s.charAt(0).toUpperCase()?this.type=Ue.TOKEN_REF:this.type=Ue.RULE_REF;break}}static get _ATN(){return Ue.__ATN||(Ue.__ATN=new u.ATNDeserializer().deserialize(p.toCharArray(Ue._serializedATN))),Ue.__ATN}};return fi.XPathLexer=a,a.TOKEN_REF=1,a.RULE_REF=2,a.ANYWHERE=3,a.ROOT=4,a.WILDCARD=5,a.BANG=6,a.ID=7,a.STRING=8,a.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],a.modeNames=["DEFAULT_MODE"],a.ruleNames=["ANYWHERE","ROOT","WILDCARD","BANG","ID","NameChar","NameStartChar","STRING"],a._LITERAL_NAMES=[void 0,void 0,void 0,"'//'","'/'","'*'","'!'"],a._SYMBOLIC_NAMES=[void 0,"TOKEN_REF","RULE_REF","ANYWHERE","ROOT","WILDCARD","BANG","ID","STRING"],a.VOCABULARY=new h.VocabularyImpl(a._LITERAL_NAMES,a._SYMBOLIC_NAMES,[]),a._serializedATNSegments=2,a._serializedATNSegment0=`줝쪺֍꾺体؇쉁
|
|
418
80
|
2\b \x07 \x07\b \b \x07
|
|
419
81
|
\f"\v\x07\x07\b\b \x07 ,
|
|
420
82
|
\f /\v -
|
|
421
83
|
\x07\x07 \b\v \r
|
|
422
84
|
ʶ
|
|
423
85
|
2;C\\aac|¡¬¬¯¯··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰̂ͶͼͿΈΈΊΌΎΎΐΣΥϷϹ҃҅҉ҌԱԳ՛՛գ։ֿׁׁ֓׃ׄ׆ׇגײ״؇ؒ؞؞آ٫ٰە۪ۗ۟ۡ۬۾܁܁ܑݏ߂߷ࠂࡂࢢࢶࢸࢿࣖ॥२ॱॳঅইকপবলসা্য়ৡ২৳ਃਅਇਕਪਬਲਵਸਾਾੀ੍ਜ਼ਫ਼੨ઃઅઇએઑઓકપબલવષાેૉો્ૢ૨૱ૻૻଃଅଇକପବଲଵଷା୍ୟୡ୨ୱ୳୳அஇஐஒஔஜஞஞபரீைொௌ௨௱ంఅఇఎఐఒఔపబిెైొౌౘౚౢ౨ಂಅಇಎಐಒಔಪಬವಷಾೆೈೊೌೠೠೢ೨ೱೳഃഅഇഎഐഒഔ഼ിെൈൊൌൖ൙ൡ൨൱ർඁඅඇගඳඵලෂෑූෘෘේ෨෴ฃโ๐๒๛ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯົຽໂໆ່່໊໒ໞ༂༂༚༛༢༫༹༹༷༷༻༻ཀཉཋཱི྆ྈྙྛ྾࿈࿈ဂ။ၒ႟ႢჇგჼჾቊቌቒቘቚቚቜቢኊኌኒኲኴኺዀዂዂዄዊዘዚጒጔጚ፟፡ᎂ᎑Ꭲᏺᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰᜂᜎᜐᜢ᜶ᝂᝢᝮᝰᝲគ៕៙៙២᠍᠐᠒ᠢᢂᢲᤂᤠᤢᤲ᥈ᥲᦂᦲ᧒ᨂᨢ᩠ᩢ᪁᪒᪩᪩ᪿ᪲ᬂ᭒᭛᭭᭵ᮂᰂ᱂ᱏ᱿ᲂ᳔᳖᳒᳸ᳺᴂ᷽᷷ἚἢὊὒὙὛὛὝὝὟὟὡᾂᾶᾸι῀῀ῄῆῈ῎ῒῘ῝ῢ΅ῴῶῸ῾‑‰⁁⁂⁖⁖ⁱ₁₁ₒ⃒⃞⃣⃣⃧℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊ⰂⰰⰲⱠⱢ⳦Ⳮⴂⴧⴲⶁⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠⷢ⸁⸱⸱〇〉〣〱〳〷〺〾ぃ゛゜ゟァィーヾㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂꓒ꓿ꔂ꘎ꘒꙂ꙱ꙶꙿꚁ꛳ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹ꠩ꡂ꡵ꢂ꣒꣢꣹ꣽꣽꣿꣿ꤂꤯ꤲꥢꦂ꧂꧑ꧢꨀꨂꩂ꩒ꩢ꩸ꩼꫝ꫟ꫢ꫱ꫴꬃꬋꬓꬢꬨꬪꬰꬲꭜꭞꭧꭲ꯬꯲갂ힲퟍ車全flﬕײַשׁשּׁטּךּמּנּנּףּצּרּ﮳ﯕ﴿ﵒﶔﷲ﷽︂︑︢︱︵︶﹏﹑ﹲﹶﹸ!!2;C\aac|ィᅣᅩᅯᅵ�\r(*<>?AOR_üłŶǿǿʂʞʢ˒ˢˢ̡̲̂͌͒ͼΟυϊϑϓϗЂҟҢҫҲӕӚӽԂԩԲեܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠࣶࣴࣷंगढऻংহীুਂਅਇਈਕਗਙਛਵ਼ੁੁંઞૂૉો૨ଂଷୂୗୢ୴ஂஓంొಂೂဂ၈ၨၱႁႼႿႿგცჲ჻ᄂᄶᄸᅁᅒᅵᅸᅸᆂᇆᇌᇎᇒᇜᇞᇞሂሓሕሹቀቀኂኈኊኊኌኑኟኡኪኲዬዲዻጂጅጇጎጒጕጪጬጲጴጵጷጻጾፆፉፊፍፏፒፒፙፙ፟፥፨፮፲፶ᐂᑌᑒᑛᒂᓇᓉᓉᓒᓛᖂᖷᖺᗂᗚᗟᘂᙂᙆᙆᙒᙛᚂᚹᛂᛋᜂᜟᜭᜲᢢᣫᤁᤁ᫂ᰂᰊᰌ᱂᱒ᱛᱴᲑᲔᲩᲫᲸ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠橢橫櫒櫯櫲櫶欂欸歂歅歒歛步歹歿殑漂潆潒澀澑澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛벟베벢벥텧텫텯톄톇톍톬톯퉄퉆퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌ퟄퟆퟍퟐ\uD801\uDA02\uDA38\uDA3D\uDA6E\uDA77\uDA77\uDA86\uDA86\uDA9D\uDAA1\uDAA3\uDAB1ꛘ꜂뜶띂렟렢캣﨟"ĂDZɀC\\c|¬¬··¼¼ÂØÚøú˃ˈ˓ˢ˦ˮˮ˰˰ͲͶͼͿΈΈΊΌΎΎΐΣΥϷϹ҃ҌԱԳ՛՛գ։גײ״آٌٰٱٳەۗۗۧۨ۰۱ۼ۾܁܁ܒܒܔܱݏާߌ߬߶߷ࠂࠗࠜࠜࠦࠦࠪࠪࡂ࡚ࢢࢶࢸࢿआऻिि॒॒ग़ॣॳংইকপবলসিিয়ৡৣ৲৳ਇਕਪਬਲਵਸਜ਼ਫ਼ੴ੶ઇએઑઓકપબલવષિિૢૣૻૻଇକପବଲଵଷିିୟୡୣ୳୳அஅஇஐஒஔஜஞஞபரఇఎఐఒఔపబిిౚౢౣಂಂಇಎಐಒಔಪಬವಷಿಿೠೠೢೣೳഇഎഐഒഔ഼ിിൖ൘ൡൣർඁඇගඳඵලෂฃาิีโ่ຄຆຆຉຊຌຌຏຏຖນປມຣລວວຩຩຬອຯາິີໂໆ່່ໞ༂༂གཉཋྊྎဂာ၁၁ၒၗၜၟၣၣၧၨၰၲၷႃ႐႐ႢჇგჼჾቊቌቒቘቚቚቜቢኊኌኒኲኴኺዀዂዂዄዊዘዚጒጔጚᎂ᎑Ꭲᏺᐃ᙮ᙱᚁᚃ᚜ᚢ᛬ᛰᜂᜎᜐᜓᜢᜳᝂᝓᝢᝮᝰᝲគ឵៙៙ᠢᢂᢆᢉᢪᢲᤂᤠᥒᥲᦂᦲᨂᨘᨢᩖ᪩᪩ᬈᭇᮅᮢ᮰᮱ᮼᯧᰂᰥᱏ᱑ᱜ᱿ᲂᳫᳮᳰᳳ᳷᳸ᴂ᷁ḂἚἢὊὒὙὛὛὝὝὟὟὡᾂᾶᾸι῀῀ῄῆῈ῎ῒῘ῝ῢ΅ῴῶῸ῾₁₁ₒ℄℄℉℉ℌℕ℗℗ℛ℟ΩΩℨℨKKℬℯℱ℻ℾ⅁ⅇ⅋⅐⅐Ⅲ↊ⰂⰰⰲⱠⱢ⳦Ⳮ⳰ⴂⴧⴲⶂⶢⶨⶪⶰⶲⶸⶺⷀⷂⷈⷊⷐⷒⷘⷚⷠ⸱⸱〇〉〣〫〳〷〺〾ぃゟァィーヾㄇㄯㄳ㆐ㆢㆼㇲ㈁㐂䶷丂鿗ꀂꓒ꓿ꔂ꘎ꘒ꘡Ꙃ꙰ꚁꚟꚢ꛱ꜙ꜡Ꜥ꞊ꞍꞰꞲꞹꟹꠃꠅꠇꠉꠌꠎꠤꡂ꡵ꢄꢵꣴ꣹ꣽꣽꣿꣿꤌꤧꤲꥈꥢꦆꦴ꧑꧑ꧢꧦꧨ꧱ꧼꨀꨂꨪꩂꩄꩆꩍꩢ꩸ꩼꩼꪀꪱꪳꪳꪷꪸꪻ꪿ꫂꫂꫝ꫟ꫢꫬꫴ꫶ꬃꬋꬓꬢꬨꬪꬰꬲꭜꭞꭧꭲꯤ갂ힲퟍ車全flﬕײַײַﬡשׁשּׁטּךּמּנּנּףּצּרּ﮳ﯕ﴿ﵒﶔﷲ﷽ﹲﹶﹸC\c|ィᅣᅩᅯᅵ\r(*<>?AOR_üłŶʂʞʢ˒̡̲̂͌͒ͷΟυϊϑϓϗЂҟҲӕӚӽԂԩԲեܸ݂ݗݢݩࠂࠇࠊࠊࠌ࠷࠹࠺࠾࠾ࡁࡗࡢࡸࢂࢠࣶࣴࣷंगढऻংহীুਂਂਕਗਙਛਵંઞૂૉો૦ଂଷୂୗୢ୴ஂஓంొಂೂစ္ႅႱგცᄅᄨᅒᅴᅸᅸᆅᆴᇃᇆᇜᇜᇞᇞሂሓሕርኂኈኊኊኌኑኟኡኪኲዠጇጎጒጕጪጬጲጴጵጷጻጿጿፒፒ፟፣ᐂᐶᑉᑌᒂᒱᓆᓇᓉᓉᖂᖰᗚᗝᘂᘱᙆᙆᚂᚬᜂᢢᣡᤁᤁ᫂ᰂᰊᰌᰰ᱂᱂ᱴᲑ ⎛␂⑰⒂╅。㐰䐂䙈栂樺橂橠櫒櫯欂欱歂歅步歹歿殑漂潆潒潒澕澡濢濢瀂蟮蠂諴뀂뀃밂뱬뱲뱾벂벊벒벛퐂푖푘풞풠풡풤풤풧풨풫풮풰풻풽풽풿퓅퓇픇픉플픏픖픘픞픠픻픽핀핂핆핈핈`,a._serializedATNSegment1=`핌핒핔횧횪훂후훜훞훼훾휖휘휶휸흐흒흰흲힊힌ퟄퟆퟍꛘ꜂뜶띂렟렢캣﨟1\x07 \v\x07 \v\r%')\x071\x071\x071\x07,\b\x1B\x07#\x1B
|
|
424
|
-
\b\r\x07" !!#" #$\b$\f%& &'( ()-\x07)*,\v+*,/-.-+.0/-01\x07)1 -`,a._serializedATN=p.join([a._serializedATNSegment0,a._serializedATNSegment1],""),pi}var mn={},Uf;function W0(){if(Uf)return mn;Uf=1;/*!
|
|
425
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
426
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
427
|
-
*/var u=mn&&mn.__decorate||function(h,p,a,r){var n=arguments.length,t=n<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,a):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(h,p,a,r);else for(var e=h.length-1;e>=0;e--)(s=h[e])&&(t=(n<3?s(t):n>3?s(p,a,t):s(p,a))||t);return n>3&&t&&Object.defineProperty(p,a,t),t};Object.defineProperty(mn,"__esModule",{value:!0}),mn.XPathLexerErrorListener=void 0;const i=Q();let c=class{syntaxError(p,a,r,n,t,s){}};return u([i.Override],c.prototype,"syntaxError",null),mn.XPathLexerErrorListener=c,mn}var gn={},vn={},zf;function Mn(){if(zf)return vn;zf=1;/*!
|
|
428
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
429
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
430
|
-
*/var u=vn&&vn.__decorate||function(h,p,a,r){var n=arguments.length,t=n<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,a):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(h,p,a,r);else for(var e=h.length-1;e>=0;e--)(s=h[e])&&(t=(n<3?s(t):n>3?s(p,a,t):s(p,a))||t);return n>3&&t&&Object.defineProperty(p,a,t),t};Object.defineProperty(vn,"__esModule",{value:!0}),vn.XPathElement=void 0;const i=Q();let c=class{constructor(p){this.nodeName=p,this.invert=!1}toString(){let p=this.invert?"!":"";return Object.constructor.name+"["+p+this.nodeName+"]"}};return u([i.Override],c.prototype,"toString",null),vn.XPathElement=c,vn}var Hf;function G0(){if(Hf)return gn;Hf=1;/*!
|
|
431
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
432
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
433
|
-
*/var u=gn&&gn.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(gn,"__esModule",{value:!0}),gn.XPathRuleAnywhereElement=void 0;const i=Q(),c=gr(),h=Mn();let p=class extends h.XPathElement{constructor(r,n){super(r),this.ruleIndex=n}evaluate(r){return c.Trees.findAllRuleNodes(r,this.ruleIndex)}};return u([i.Override],p.prototype,"evaluate",null),gn.XPathRuleAnywhereElement=p,gn}var An={},$f;function X0(){if($f)return An;$f=1;/*!
|
|
434
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
435
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
436
|
-
*/var u=An&&An.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(An,"__esModule",{value:!0}),An.XPathRuleElement=void 0;const i=et(),c=Q(),h=gr(),p=Mn();let a=class extends p.XPathElement{constructor(n,t){super(n),this.ruleIndex=t}evaluate(n){let t=[];for(let s of h.Trees.getChildren(n))s instanceof i.ParserRuleContext&&(s.ruleIndex===this.ruleIndex&&!this.invert||s.ruleIndex!==this.ruleIndex&&this.invert)&&t.push(s);return t}};return u([c.Override],a.prototype,"evaluate",null),An.XPathRuleElement=a,An}var Tn={},Vf;function K0(){if(Vf)return Tn;Vf=1;/*!
|
|
437
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
438
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
439
|
-
*/var u=Tn&&Tn.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.XPathTokenAnywhereElement=void 0;const i=Q(),c=gr(),h=Mn();let p=class extends h.XPathElement{constructor(r,n){super(r),this.tokenType=n}evaluate(r){return c.Trees.findAllTokenNodes(r,this.tokenType)}};return u([i.Override],p.prototype,"evaluate",null),Tn.XPathTokenAnywhereElement=p,Tn}var En={},Wf;function Y0(){if(Wf)return En;Wf=1;/*!
|
|
440
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
441
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
442
|
-
*/var u=En&&En.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(En,"__esModule",{value:!0}),En.XPathTokenElement=void 0;const i=Q(),c=mr(),h=gr(),p=Mn();let a=class extends p.XPathElement{constructor(n,t){super(n),this.tokenType=t}evaluate(n){let t=[];for(let s of h.Trees.getChildren(n))s instanceof c.TerminalNode&&(s.symbol.type===this.tokenType&&!this.invert||s.symbol.type!==this.tokenType&&this.invert)&&t.push(s);return t}};return u([i.Override],a.prototype,"evaluate",null),En.XPathTokenElement=a,En}var Sn={},Gf;function Q0(){if(Gf)return Sn;Gf=1;/*!
|
|
443
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
444
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
445
|
-
*/var u=Sn&&Sn.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.XPathWildcardAnywhereElement=void 0;const i=Q(),c=gr(),h=Ys(),p=Mn();let a=class extends p.XPathElement{constructor(){super(h.XPath.WILDCARD)}evaluate(n){return this.invert?[]:c.Trees.getDescendants(n)}};return u([i.Override],a.prototype,"evaluate",null),Sn.XPathWildcardAnywhereElement=a,Sn}var Nn={},Xf;function J0(){if(Xf)return Nn;Xf=1;/*!
|
|
446
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
447
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
448
|
-
*/var u=Nn&&Nn.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.XPathWildcardElement=void 0;const i=Q(),c=gr(),h=Ys(),p=Mn();let a=class extends p.XPathElement{constructor(){super(h.XPath.WILDCARD)}evaluate(n){let t=[];if(this.invert)return t;for(let s of c.Trees.getChildren(n))t.push(s);return t}};return u([i.Override],a.prototype,"evaluate",null),Nn.XPathWildcardElement=a,Nn}var Kf;function Ys(){if(Kf)return hi;Kf=1;/*!
|
|
449
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
450
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
451
|
-
*/Object.defineProperty(hi,"__esModule",{value:!0}),hi.XPath=void 0;const u=Xs(),i=Ks(),c=qi(),h=et(),p=Oe(),a=V0(),r=W0(),n=G0(),t=X0(),s=K0(),e=Y0(),o=Q0(),l=J0();let f=class _p{constructor(g,x){this.parser=g,this.path=x,this.elements=this.split(x)}split(g){let x=new a.XPathLexer(u.CharStreams.fromString(g));x.recover=T=>{throw T},x.removeErrorListeners(),x.addErrorListener(new r.XPathLexerErrorListener);let m=new i.CommonTokenStream(x);try{m.fill()}catch(T){if(T instanceof c.LexerNoViableAltException){let O="Invalid tokens or characters at index "+x.charPositionInLine+" in path '"+g+"' -- "+T.message;throw new RangeError(O)}throw T}let y=m.getTokens(),_=[],v=y.length,N=0;e:for(;N<v;){let T=y[N],b;switch(T.type){case a.XPathLexer.ROOT:case a.XPathLexer.ANYWHERE:let O=T.type===a.XPathLexer.ANYWHERE;N++,b=y[N];let D=b.type===a.XPathLexer.BANG;D&&(N++,b=y[N]);let k=this.getXPathElement(b,O);k.invert=D,_.push(k),N++;break;case a.XPathLexer.TOKEN_REF:case a.XPathLexer.RULE_REF:case a.XPathLexer.WILDCARD:_.push(this.getXPathElement(T,!1)),N++;break;case p.Token.EOF:break e;default:throw new Error("Unknowth path element "+T)}}return _}getXPathElement(g,x){if(g.type===p.Token.EOF)throw new Error("Missing path element at end of path");let m=g.text;if(m==null)throw new Error("Expected wordToken to have text content.");let y=this.parser.getTokenType(m),_=this.parser.getRuleIndex(m);switch(g.type){case a.XPathLexer.WILDCARD:return x?new o.XPathWildcardAnywhereElement:new l.XPathWildcardElement;case a.XPathLexer.TOKEN_REF:case a.XPathLexer.STRING:if(y===p.Token.INVALID_TYPE)throw new Error(m+" at index "+g.startIndex+" isn't a valid token name");return x?new s.XPathTokenAnywhereElement(m,y):new e.XPathTokenElement(m,y);default:if(_===-1)throw new Error(m+" at index "+g.startIndex+" isn't a valid rule name");return x?new n.XPathRuleAnywhereElement(m,_):new t.XPathRuleElement(m,_)}}static findAll(g,x,m){return new _p(m,x).evaluate(g)}evaluate(g){let x=new h.ParserRuleContext;x.addChild(g);let m=new Set([x]),y=0;for(;y<this.elements.length;){let _=new Set;for(let v of m)v.childCount>0&&this.elements[y].evaluate(v).forEach(_.add,_);y++,m=_}return m}};return hi.XPath=f,f.WILDCARD="*",f.NOT="!",hi}var Yf;function Z0(){if(Yf)return Qt;Yf=1;/*!
|
|
452
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
453
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
454
|
-
*/var u=Qt&&Qt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Qt&&Qt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.ParseTreePattern=void 0;const c=Q(),h=Ys();let p=class{constructor(r,n,t,s){this._matcher=r,this._patternRuleIndex=t,this._pattern=n,this._patternTree=s}match(r){return this._matcher.match(r,this)}matches(r){return this._matcher.match(r,this).succeeded}findAll(r,n){let t=h.XPath.findAll(r,n,this._matcher.parser),s=[];for(let e of t){let o=this.match(e);o.succeeded&&s.push(o)}return s}get matcher(){return this._matcher}get pattern(){return this._pattern}get patternRuleIndex(){return this._patternRuleIndex}get patternTree(){return this._patternTree}};return u([c.NotNull],p.prototype,"_pattern",void 0),u([c.NotNull],p.prototype,"_patternTree",void 0),u([c.NotNull],p.prototype,"_matcher",void 0),u([c.NotNull,i(0,c.NotNull)],p.prototype,"match",null),u([i(0,c.NotNull)],p.prototype,"matches",null),u([c.NotNull,i(0,c.NotNull),i(1,c.NotNull)],p.prototype,"findAll",null),u([c.NotNull],p.prototype,"matcher",null),u([c.NotNull],p.prototype,"pattern",null),u([c.NotNull],p.prototype,"patternTree",null),p=u([i(0,c.NotNull),i(1,c.NotNull),i(3,c.NotNull)],p),Qt.ParseTreePattern=p,Qt}var Jt={},Qf;function ed(){if(Qf)return Jt;Qf=1;/*!
|
|
455
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
456
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
457
|
-
*/var u=Jt&&Jt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Jt&&Jt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.RuleTagToken=void 0;const c=Q(),h=Oe();let p=class{constructor(r,n,t){if(r==null||r.length===0)throw new Error("ruleName cannot be null or empty.");this._ruleName=r,this.bypassTokenType=n,this._label=t}get ruleName(){return this._ruleName}get label(){return this._label}get channel(){return h.Token.DEFAULT_CHANNEL}get text(){return this._label!=null?"<"+this._label+":"+this._ruleName+">":"<"+this._ruleName+">"}get type(){return this.bypassTokenType}get line(){return 0}get charPositionInLine(){return-1}get tokenIndex(){return-1}get startIndex(){return-1}get stopIndex(){return-1}get tokenSource(){}get inputStream(){}toString(){return this._ruleName+":"+this.bypassTokenType}};return u([c.NotNull],p.prototype,"ruleName",null),u([c.Override],p.prototype,"channel",null),u([c.Override],p.prototype,"text",null),u([c.Override],p.prototype,"type",null),u([c.Override],p.prototype,"line",null),u([c.Override],p.prototype,"charPositionInLine",null),u([c.Override],p.prototype,"tokenIndex",null),u([c.Override],p.prototype,"startIndex",null),u([c.Override],p.prototype,"stopIndex",null),u([c.Override],p.prototype,"tokenSource",null),u([c.Override],p.prototype,"inputStream",null),u([c.Override],p.prototype,"toString",null),p=u([i(0,c.NotNull)],p),Jt.RuleTagToken=p,Jt}var bn={},di={},Jf;function Zf(){if(Jf)return di;Jf=1;/*!
|
|
458
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
459
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
460
|
-
*/Object.defineProperty(di,"__esModule",{value:!0}),di.Chunk=void 0;let u=class{};return di.Chunk=u,di}var eh;function td(){if(eh)return bn;eh=1;/*!
|
|
461
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
462
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
463
|
-
*/var u=bn&&bn.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(bn,"__esModule",{value:!0}),bn.TagChunk=void 0;const i=Zf(),c=Q();let h=class extends i.Chunk{constructor(a,r){if(super(),a==null||a.length===0)throw new Error("tag cannot be null or empty");this._tag=a,this._label=r}get tag(){return this._tag}get label(){return this._label}toString(){return this._label!=null?this._label+":"+this._tag:this._tag}};return u([c.NotNull],h.prototype,"tag",null),u([c.Override],h.prototype,"toString",null),bn.TagChunk=h,bn}var Zt={},th;function rd(){if(th)return Zt;th=1;/*!
|
|
464
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
465
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
466
|
-
*/var u=Zt&&Zt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Zt&&Zt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.TextChunk=void 0;const c=Zf(),h=Q();let p=class extends c.Chunk{constructor(r){if(super(),r==null)throw new Error("text cannot be null");this._text=r}get text(){return this._text}toString(){return"'"+this._text+"'"}};return u([h.NotNull],p.prototype,"_text",void 0),u([h.NotNull],p.prototype,"text",null),u([h.Override],p.prototype,"toString",null),p=u([i(0,h.NotNull)],p),Zt.TextChunk=p,Zt}var er={},rh;function nd(){if(rh)return er;rh=1;/*!
|
|
467
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
468
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
469
|
-
*/var u=er&&er.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=er&&er.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(er,"__esModule",{value:!0}),er.TokenTagToken=void 0;const c=Wn(),h=Q();let p=class extends c.CommonToken{constructor(r,n,t){super(n),this._tokenName=r,this._label=t}get tokenName(){return this._tokenName}get label(){return this._label}get text(){return this._label!=null?"<"+this._label+":"+this._tokenName+">":"<"+this._tokenName+">"}toString(){return this._tokenName+":"+this.type}};return u([h.NotNull],p.prototype,"_tokenName",void 0),u([h.NotNull],p.prototype,"tokenName",null),u([h.Override],p.prototype,"text",null),u([h.Override],p.prototype,"toString",null),p=u([i(0,h.NotNull)],p),er.TokenTagToken=p,er}var nh;function id(){return nh||(nh=1,function(u){/*!
|
|
470
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
471
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
472
|
-
*/var i=xn&&xn.__decorate||function(b,O,D,k){var z=arguments.length,U=z<3?O:k===null?k=Object.getOwnPropertyDescriptor(O,D):k,re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(b,O,D,k);else for(var oe=b.length-1;oe>=0;oe--)(re=b[oe])&&(U=(z<3?re(U):z>3?re(O,D,U):re(O,D))||U);return z>3&&U&&Object.defineProperty(O,D,U),U},c=xn&&xn.__param||function(b,O){return function(D,k){O(D,k,b)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ParseTreePatternMatcher=void 0;const h=_h(),p=Xs(),a=Ks(),r=Df(),n=H0(),t=Q(),s=Lf(),e=Mf(),o=et(),l=$0(),f=Z0(),d=pr(),g=si(),x=ed(),m=td(),y=mr(),_=rd(),v=Oe(),N=nd();let T=class Ou{constructor(O,D){this.start="<",this.stop=">",this.escape="\\",this.escapeRE=/\\/g,this._lexer=O,this._parser=D}setDelimiters(O,D,k){if(!O)throw new Error("start cannot be null or empty");if(!D)throw new Error("stop cannot be null or empty");this.start=O,this.stop=D,this.escape=k,this.escapeRE=new RegExp(k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g")}matches(O,D,k=0){if(typeof D=="string"){let z=this.compile(D,k);return this.matches(O,z)}else{let z=new n.MultiMap;return!this.matchImpl(O,D.patternTree,z)}}match(O,D,k=0){if(typeof D=="string"){let z=this.compile(D,k);return this.match(O,z)}else{let z=new n.MultiMap,U=this.matchImpl(O,D.patternTree,z);return new l.ParseTreeMatch(O,D,z,U)}}compile(O,D){let k=this.tokenize(O),z=new r.ListTokenSource(k),U=new a.CommonTokenStream(z);const re=this._parser;let oe=new e.ParserInterpreter(re.grammarFileName,re.vocabulary,re.ruleNames,re.getATNWithBypassAlts(),U),se;try{oe.errorHandler=new h.BailErrorStrategy,se=oe.parse(D)}catch(de){throw de instanceof s.ParseCancellationException?de.getCause():de instanceof d.RecognitionException?de:de instanceof Error?new Ou.CannotInvokeStartRule(de):de}if(U.LA(1)!==v.Token.EOF)throw new Ou.StartRuleDoesNotConsumeFullPattern;return new f.ParseTreePattern(this,O,D,se)}get lexer(){return this._lexer}get parser(){return this._parser}matchImpl(O,D,k){if(!O)throw new TypeError("tree cannot be null");if(!D)throw new TypeError("patternTree cannot be null");if(O instanceof y.TerminalNode&&D instanceof y.TerminalNode){let z;if(O.symbol.type===D.symbol.type)if(D.symbol instanceof N.TokenTagToken){let U=D.symbol;k.map(U.tokenName,O);const re=U.label;re&&k.map(re,O)}else O.text===D.text||z||(z=O);else z||(z=O);return z}if(O instanceof o.ParserRuleContext&&D instanceof o.ParserRuleContext){let z,U=this.getRuleTagToken(D);if(U){if(O.ruleContext.ruleIndex===D.ruleContext.ruleIndex){k.map(U.ruleName,O);const oe=U.label;oe&&k.map(oe,O)}else z||(z=O);return z}if(O.childCount!==D.childCount)return z||(z=O),z;let re=O.childCount;for(let oe=0;oe<re;oe++){let se=this.matchImpl(O.getChild(oe),D.getChild(oe),k);if(se)return se}return z}return O}getRuleTagToken(O){if(O instanceof g.RuleNode&&O.childCount===1&&O.getChild(0)instanceof y.TerminalNode){let D=O.getChild(0);if(D.symbol instanceof x.RuleTagToken)return D.symbol}}tokenize(O){let D=this.split(O),k=[];for(let z of D)if(z instanceof m.TagChunk){let U=z;const re=U.tag.substr(0,1);if(re===re.toUpperCase()){let oe=this._parser.getTokenType(U.tag);if(oe===v.Token.INVALID_TYPE)throw new Error("Unknown token "+U.tag+" in pattern: "+O);let se=new N.TokenTagToken(U.tag,oe,U.label);k.push(se)}else if(re===re.toLowerCase()){let oe=this._parser.getRuleIndex(U.tag);if(oe===-1)throw new Error("Unknown rule "+U.tag+" in pattern: "+O);let se=this._parser.getATNWithBypassAlts().ruleToTokenType[oe];k.push(new x.RuleTagToken(U.tag,se,U.label))}else throw new Error("invalid tag: "+U.tag+" in pattern: "+O)}else{let U=z;this._lexer.inputStream=p.CharStreams.fromString(U.text);let re=this._lexer.nextToken();for(;re.type!==v.Token.EOF;)k.push(re),re=this._lexer.nextToken()}return k}split(O){let D=0,k=O.length,z=[],U=[],re=[];for(;D<k;)D===O.indexOf(this.escape+this.start,D)?D+=this.escape.length+this.start.length:D===O.indexOf(this.escape+this.stop,D)?D+=this.escape.length+this.stop.length:D===O.indexOf(this.start,D)?(U.push(D),D+=this.start.length):D===O.indexOf(this.stop,D)?(re.push(D),D+=this.stop.length):D++;if(U.length>re.length)throw new Error("unterminated tag in pattern: "+O);if(U.length<re.length)throw new Error("missing start tag in pattern: "+O);let oe=U.length;for(let se=0;se<oe;se++)if(U[se]>=re[se])throw new Error("tag delimiters out of order in pattern: "+O);if(oe===0){let se=O.substring(0,k);z.push(new _.TextChunk(se))}if(oe>0&&U[0]>0){let se=O.substring(0,U[0]);z.push(new _.TextChunk(se))}for(let se=0;se<oe;se++){let de=O.substring(U[se]+this.start.length,re[se]),be=de,fe,Z=de.indexOf(":");if(Z>=0&&(fe=de.substring(0,Z),be=de.substring(Z+1,de.length)),z.push(new m.TagChunk(be,fe)),se+1<oe){let te=O.substring(re[se]+this.stop.length,U[se+1]);z.push(new _.TextChunk(te))}}if(oe>0){let se=re[oe-1]+this.stop.length;if(se<k){let de=O.substring(se,k);z.push(new _.TextChunk(de))}}for(let se=0;se<z.length;se++){let de=z[se];if(de instanceof _.TextChunk){let be=de.text.replace(this.escapeRE,"");be.length<de.text.length&&(z[se]=new _.TextChunk(be))}}return z}};i([t.NotNull,c(1,t.NotNull)],T.prototype,"match",null),i([t.NotNull],T.prototype,"lexer",null),i([t.NotNull],T.prototype,"parser",null),i([c(0,t.NotNull),c(1,t.NotNull),c(2,t.NotNull)],T.prototype,"matchImpl",null),u.ParseTreePatternMatcher=T,function(b){class O extends Error{constructor(z){super(`CannotInvokeStartRule: ${z}`),this.error=z}}b.CannotInvokeStartRule=O;class D extends Error{constructor(){super("StartRuleDoesNotConsumeFullPattern")}}b.StartRuleDoesNotConsumeFullPattern=D}(T=u.ParseTreePatternMatcher||(u.ParseTreePatternMatcher={}))}(xn)),xn}var tr={},rr={},nr={},ih;function xi(){if(ih)return nr;ih=1;/*!
|
|
473
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
474
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
475
|
-
*/var u=nr&&nr.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s},i=nr&&nr.__param||function(p,a){return function(r,n){a(r,n,p)}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.DecisionEventInfo=void 0;const c=Q();let h=class{constructor(a,r,n,t,s,e){this.decision=a,this.fullCtx=e,this.stopIndex=s,this.input=n,this.startIndex=t,this.state=r}};return u([c.NotNull],h.prototype,"input",void 0),h=u([i(2,c.NotNull)],h),nr.DecisionEventInfo=h,nr}var oh;function od(){if(oh)return rr;oh=1;/*!
|
|
476
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
477
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
478
|
-
*/var u=rr&&rr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=rr&&rr.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(rr,"__esModule",{value:!0}),rr.AmbiguityInfo=void 0;const c=xi(),h=Q();let p=class extends c.DecisionEventInfo{constructor(r,n,t,s,e,o){super(r,n,s,e,o,n.useContext),this.ambigAlts=t}get ambiguousAlternatives(){return this.ambigAlts}};return u([h.NotNull],p.prototype,"ambigAlts",void 0),u([h.NotNull],p.prototype,"ambiguousAlternatives",null),p=u([i(1,h.NotNull),i(2,h.NotNull),i(3,h.NotNull)],p),rr.AmbiguityInfo=p,rr}var ir={},sh;function sd(){if(sh)return ir;sh=1;/*!
|
|
479
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
480
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
481
|
-
*/var u=ir&&ir.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=ir&&ir.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(ir,"__esModule",{value:!0}),ir.ContextSensitivityInfo=void 0;const c=xi(),h=Q();let p=class extends c.DecisionEventInfo{constructor(r,n,t,s,e){super(r,n,t,s,e,!0)}};return p=u([i(1,h.NotNull),i(2,h.NotNull)],p),ir.ContextSensitivityInfo=p,ir}var Cn={},uh;function ud(){if(uh)return Cn;uh=1;/*!
|
|
482
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
483
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
484
|
-
*/var u=Cn&&Cn.__decorate||function(h,p,a,r){var n=arguments.length,t=n<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,a):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(h,p,a,r);else for(var e=h.length-1;e>=0;e--)(s=h[e])&&(t=(n<3?s(t):n>3?s(p,a,t):s(p,a))||t);return n>3&&t&&Object.defineProperty(p,a,t),t};Object.defineProperty(Cn,"__esModule",{value:!0}),Cn.DecisionInfo=void 0;const i=Q();let c=class{constructor(p){this.invocations=0,this.timeInPrediction=0,this.SLL_TotalLook=0,this.SLL_MinLook=0,this.SLL_MaxLook=0,this.LL_TotalLook=0,this.LL_MinLook=0,this.LL_MaxLook=0,this.contextSensitivities=[],this.errors=[],this.ambiguities=[],this.predicateEvals=[],this.SLL_ATNTransitions=0,this.SLL_DFATransitions=0,this.LL_Fallback=0,this.LL_ATNTransitions=0,this.LL_DFATransitions=0,this.decision=p}toString(){return"{decision="+this.decision+", contextSensitivities="+this.contextSensitivities.length+", errors="+this.errors.length+", ambiguities="+this.ambiguities.length+", SLL_lookahead="+this.SLL_TotalLook+", SLL_ATNTransitions="+this.SLL_ATNTransitions+", SLL_DFATransitions="+this.SLL_DFATransitions+", LL_Fallback="+this.LL_Fallback+", LL_lookahead="+this.LL_TotalLook+", LL_ATNTransitions="+this.LL_ATNTransitions+"}"}};return u([i.Override],c.prototype,"toString",null),Cn.DecisionInfo=c,Cn}var or={},ah;function ad(){if(ah)return or;ah=1;/*!
|
|
485
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
486
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
487
|
-
*/var u=or&&or.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=or&&or.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(or,"__esModule",{value:!0}),or.ErrorInfo=void 0;const c=xi(),h=Q();let p=class extends c.DecisionEventInfo{constructor(r,n,t,s,e){super(r,n,t,s,e,n.useContext)}};return p=u([i(1,h.NotNull),i(2,h.NotNull)],p),or.ErrorInfo=p,or}var sr={},lh;function ld(){if(lh)return sr;lh=1;/*!
|
|
488
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
489
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
490
|
-
*/var u=sr&&sr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=sr&&sr.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(sr,"__esModule",{value:!0}),sr.LookaheadEventInfo=void 0;const c=xi(),h=Q();let p=class extends c.DecisionEventInfo{constructor(r,n,t,s,e,o,l){super(r,n,s,e,o,l),this.predictedAlt=t}};return p=u([i(3,h.NotNull)],p),sr.LookaheadEventInfo=p,sr}var ur={},ch;function cd(){if(ch)return ur;ch=1;/*!
|
|
491
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
492
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
493
|
-
*/var u=ur&&ur.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=ur&&ur.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(ur,"__esModule",{value:!0}),ur.PredicateEvalInfo=void 0;const c=xi(),h=Q();let p=class extends c.DecisionEventInfo{constructor(r,n,t,s,e,o,l,f){super(n,r,t,s,e,r.useContext),this.semctx=o,this.evalResult=l,this.predictedAlt=f}};return p=u([i(0,h.NotNull),i(2,h.NotNull),i(5,h.NotNull)],p),ur.PredicateEvalInfo=p,ur}var fh;function hh(){if(fh)return tr;fh=1;/*!
|
|
494
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
495
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
496
|
-
*/var u=tr&&tr.__decorate||function(g,x,m,y){var _=arguments.length,v=_<3?x:y===null?y=Object.getOwnPropertyDescriptor(x,m):y,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(g,x,m,y);else for(var T=g.length-1;T>=0;T--)(N=g[T])&&(v=(_<3?N(v):_>3?N(x,m,v):N(x,m))||v);return _>3&&v&&Object.defineProperty(x,m,v),v},i=tr&&tr.__param||function(g,x){return function(m,y){x(m,y,g)}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.ProfilingATNSimulator=void 0;const c=od(),h=bt(),p=Mi(),a=sd(),r=ud(),n=ad(),t=Q(),s=ld(),e=ai(),o=cd(),l=Bn(),f=sf();let d=class extends e.ParserATNSimulator{constructor(x){super(x.interpreter.atn,x),this._startIndex=0,this._sllStopIndex=0,this._llStopIndex=0,this.currentDecision=0,this.conflictingAltResolvedBySLL=0,this.optimize_ll1=!1,this.reportAmbiguities=!0,this.numDecisions=this.atn.decisionToState.length,this.decisions=[];for(let m=0;m<this.numDecisions;m++)this.decisions.push(new r.DecisionInfo(m))}adaptivePredict(x,m,y,_){if(_!==void 0)return super.adaptivePredict(x,m,y,_);try{this._input=x,this._startIndex=x.index,this._sllStopIndex=this._startIndex-1,this._llStopIndex=-1,this.currentDecision=m,this.currentState=void 0,this.conflictingAltResolvedBySLL=h.ATN.INVALID_ALT_NUMBER;let v=Re.hrtime(),N=super.adaptivePredict(x,m,y),T=Re.hrtime(),b=(T[0]-v[0])*1e9;b===0?b=T[1]-v[1]:b+=1e9-v[1]+T[1],this.decisions[m].timeInPrediction+=b,this.decisions[m].invocations++;let O=this._sllStopIndex-this._startIndex+1;if(this.decisions[m].SLL_TotalLook+=O,this.decisions[m].SLL_MinLook=this.decisions[m].SLL_MinLook===0?O:Math.min(this.decisions[m].SLL_MinLook,O),O>this.decisions[m].SLL_MaxLook&&(this.decisions[m].SLL_MaxLook=O,this.decisions[m].SLL_MaxLookEvent=new s.LookaheadEventInfo(m,void 0,N,x,this._startIndex,this._sllStopIndex,!1)),this._llStopIndex>=0){let D=this._llStopIndex-this._startIndex+1;this.decisions[m].LL_TotalLook+=D,this.decisions[m].LL_MinLook=this.decisions[m].LL_MinLook===0?D:Math.min(this.decisions[m].LL_MinLook,D),D>this.decisions[m].LL_MaxLook&&(this.decisions[m].LL_MaxLook=D,this.decisions[m].LL_MaxLookEvent=new s.LookaheadEventInfo(m,void 0,N,x,this._startIndex,this._llStopIndex,!0))}return N}finally{this._input=void 0,this.currentDecision=-1}}getStartState(x,m,y,_){let v=super.getStartState(x,m,y,_);return this.currentState=v,v}computeStartState(x,m,y){let _=super.computeStartState(x,m,y);return this.currentState=_,_}computeReachSet(x,m,y,_){if(this._input===void 0)throw new Error("Invalid state");let v=super.computeReachSet(x,m,y,_);return v==null&&this.decisions[this.currentDecision].errors.push(new n.ErrorInfo(this.currentDecision,m,this._input,this._startIndex,this._input.index)),this.currentState=v,v}getExistingTargetState(x,m){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");this.currentState.useContext?this._llStopIndex=this._input.index:this._sllStopIndex=this._input.index;let y=super.getExistingTargetState(x,m);if(y!=null&&(this.currentState=new f.SimulatorState(this.currentState.outerContext,y,this.currentState.useContext,this.currentState.remainingOuterContext),this.currentState.useContext?this.decisions[this.currentDecision].LL_DFATransitions++:this.decisions[this.currentDecision].SLL_DFATransitions++,y===p.ATNSimulator.ERROR)){let _=new f.SimulatorState(this.currentState.outerContext,x,this.currentState.useContext,this.currentState.remainingOuterContext);this.decisions[this.currentDecision].errors.push(new n.ErrorInfo(this.currentDecision,_,this._input,this._startIndex,this._input.index))}return y}computeTargetState(x,m,y,_,v,N){let T=super.computeTargetState(x,m,y,_,v,N);return v?this.decisions[this.currentDecision].LL_ATNTransitions++:this.decisions[this.currentDecision].SLL_ATNTransitions++,T}evalSemanticContextImpl(x,m,y){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let _=super.evalSemanticContextImpl(x,m,y);if(!(x instanceof l.SemanticContext.PrecedencePredicate)){let N=this._llStopIndex>=0?this._llStopIndex:this._sllStopIndex;this.decisions[this.currentDecision].predicateEvals.push(new o.PredicateEvalInfo(this.currentState,this.currentDecision,this._input,this._startIndex,N,x,_,y))}return _}reportContextSensitivity(x,m,y,_,v){if(this._input===void 0)throw new Error("Invalid state");m!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new a.ContextSensitivityInfo(this.currentDecision,y,this._input,_,v)),super.reportContextSensitivity(x,m,y,_,v)}reportAttemptingFullContext(x,m,y,_,v){m!=null?this.conflictingAltResolvedBySLL=m.nextSetBit(0):this.conflictingAltResolvedBySLL=y.s0.configs.getRepresentedAlternatives().nextSetBit(0),this.decisions[this.currentDecision].LL_Fallback++,super.reportAttemptingFullContext(x,m,y,_,v)}reportAmbiguity(x,m,y,_,v,N,T){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let b;N!=null?b=N.nextSetBit(0):b=T.getRepresentedAlternatives().nextSetBit(0),this.conflictingAltResolvedBySLL!==h.ATN.INVALID_ALT_NUMBER&&b!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new a.ContextSensitivityInfo(this.currentDecision,this.currentState,this._input,y,_)),this.decisions[this.currentDecision].ambiguities.push(new c.AmbiguityInfo(this.currentDecision,this.currentState,N,this._input,y,_)),super.reportAmbiguity(x,m,y,_,v,N,T)}getDecisionInfo(){return this.decisions}getCurrentState(){return this.currentState}};return u([t.Override,i(0,t.NotNull)],d.prototype,"adaptivePredict",null),u([t.Override],d.prototype,"getStartState",null),u([t.Override],d.prototype,"computeStartState",null),u([t.Override],d.prototype,"computeReachSet",null),u([t.Override],d.prototype,"getExistingTargetState",null),u([t.Override],d.prototype,"computeTargetState",null),u([t.Override],d.prototype,"evalSemanticContextImpl",null),u([t.Override],d.prototype,"reportContextSensitivity",null),u([t.Override],d.prototype,"reportAttemptingFullContext",null),u([t.Override,i(0,t.NotNull),i(5,t.NotNull),i(6,t.NotNull)],d.prototype,"reportAmbiguity",null),tr.ProfilingATNSimulator=d,tr}var ph;function yi(){if(ph)return Ze;ph=1;/*!
|
|
497
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
498
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
499
|
-
*/var u=Ze&&Ze.__decorate||function(_,v,N,T){var b=arguments.length,O=b<3?v:T===null?T=Object.getOwnPropertyDescriptor(v,N):T,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(_,v,N,T);else for(var k=_.length-1;k>=0;k--)(D=_[k])&&(O=(b<3?D(O):b>3?D(v,N,O):D(v,N))||O);return b>3&&O&&Object.defineProperty(v,N,O),O},i=Ze&&Ze.__param||function(_,v){return function(N,T){v(N,T,_)}},c=Ze&&Ze.__awaiter||function(_,v,N,T){function b(O){return O instanceof N?O:new N(function(D){D(O)})}return new(N||(N=Promise))(function(O,D){function k(re){try{U(T.next(re))}catch(oe){D(oe)}}function z(re){try{U(T.throw(re))}catch(oe){D(oe)}}function U(re){re.done?O(re.value):b(re.value).then(k,z)}U((T=T.apply(_,v||[])).next())})};Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.Parser=void 0;const h=ht(),p=Pc(),a=Vs(),r=Qs(),n=ii(),t=Ul(),s=_r(),e=Q(),o=U0(),l=ai(),f=vf(),d=ti(),g=mr(),x=Oe();class m{constructor(v,N){this.ruleNames=v,this.tokenStream=N}enterEveryRule(v){console.log("enter "+this.ruleNames[v.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text)}exitEveryRule(v){console.log("exit "+this.ruleNames[v.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text)}visitErrorNode(v){}visitTerminal(v){let N=v.parent.ruleContext,T=v.symbol;console.log("consume "+T+" rule "+this.ruleNames[N.ruleIndex])}}u([e.Override],m.prototype,"enterEveryRule",null),u([e.Override],m.prototype,"exitEveryRule",null),u([e.Override],m.prototype,"visitErrorNode",null),u([e.Override],m.prototype,"visitTerminal",null);let y=class Qi extends d.Recognizer{constructor(v){super(),this._errHandler=new r.DefaultErrorStrategy,this._precedenceStack=new t.IntegerStack,this._buildParseTrees=!0,this._parseListeners=[],this._syntaxErrors=0,this.matchedEOF=!1,this._precedenceStack.push(0),this.inputStream=v}reset(v){(v===void 0||v)&&this.inputStream.seek(0),this._errHandler.reset(this),this._ctx=void 0,this._syntaxErrors=0,this.matchedEOF=!1,this.isTrace=!1,this._precedenceStack.clear(),this._precedenceStack.push(0);let N=this.interpreter;N!=null&&N.reset()}match(v){let N=this.currentToken;return N.type===v?(v===x.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):(N=this._errHandler.recoverInline(this),this._buildParseTrees&&N.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,N))),N}matchWildcard(){let v=this.currentToken;return v.type>0?(this._errHandler.reportMatch(this),this.consume()):(v=this._errHandler.recoverInline(this),this._buildParseTrees&&v.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,v))),v}set buildParseTree(v){this._buildParseTrees=v}get buildParseTree(){return this._buildParseTrees}getParseListeners(){return this._parseListeners}addParseListener(v){if(v==null)throw new TypeError("listener cannot be null");this._parseListeners.push(v)}removeParseListener(v){let N=this._parseListeners.findIndex(T=>T===v);N!==-1&&this._parseListeners.splice(N,1)}removeParseListeners(){this._parseListeners.length=0}triggerEnterRuleEvent(){for(let v of this._parseListeners)v.enterEveryRule&&v.enterEveryRule(this._ctx),this._ctx.enterRule(v)}triggerExitRuleEvent(){for(let v=this._parseListeners.length-1;v>=0;v--){let N=this._parseListeners[v];this._ctx.exitRule(N),N.exitEveryRule&&N.exitEveryRule(this._ctx)}}get numberOfSyntaxErrors(){return this._syntaxErrors}get tokenFactory(){return this._input.tokenSource.tokenFactory}getATNWithBypassAlts(){let v=this.serializedATN;if(v==null)throw new Error("The current parser does not support an ATN with bypass alternatives.");let N=Qi.bypassAltsAtnCache.get(v);if(N==null){let T=new p.ATNDeserializationOptions;T.isGenerateRuleBypassTransitions=!0,N=new a.ATNDeserializer(T).deserialize(h.toCharArray(v)),Qi.bypassAltsAtnCache.set(v,N)}return N}compileParseTreePattern(v,N,T){return c(this,void 0,void 0,function*(){if(!T){if(this.inputStream){let k=this.inputStream.tokenSource;k instanceof s.Lexer&&(T=k)}if(!T)throw new Error("Parser can't discover a lexer to use")}let b=T,O=yield Promise.resolve().then(()=>id());return new O.ParseTreePatternMatcher(b,this).compile(v,N)})}get errorHandler(){return this._errHandler}set errorHandler(v){this._errHandler=v}get inputStream(){return this._input}set inputStream(v){this.reset(!1),this._input=v}get currentToken(){return this._input.LT(1)}notifyErrorListeners(v,N,T){N===void 0?N=this.currentToken:N===null&&(N=void 0),this._syntaxErrors++;let b=-1,O=-1;N!=null&&(b=N.line,O=N.charPositionInLine);let D=this.getErrorListenerDispatch();D.syntaxError&&D.syntaxError(this,N,b,O,v,T)}consume(){let v=this.currentToken;v.type!==Qi.EOF&&this.inputStream.consume();let N=this._parseListeners.length!==0;if(this._buildParseTrees||N)if(this._errHandler.inErrorRecoveryMode(this)){let T=this._ctx.addErrorNode(this.createErrorNode(this._ctx,v));if(N)for(let b of this._parseListeners)b.visitErrorNode&&b.visitErrorNode(T)}else{let T=this.createTerminalNode(this._ctx,v);if(this._ctx.addChild(T),N)for(let b of this._parseListeners)b.visitTerminal&&b.visitTerminal(T)}return v}createTerminalNode(v,N){return new g.TerminalNode(N)}createErrorNode(v,N){return new n.ErrorNode(N)}addContextToParseTree(){let v=this._ctx._parent;v!=null&&v.addChild(this._ctx)}enterRule(v,N,T){this.state=N,this._ctx=v,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}enterLeftFactoredRule(v,N,T){if(this.state=N,this._buildParseTrees){let b=this._ctx.getChild(this._ctx.childCount-1);this._ctx.removeLastChild(),b._parent=v,v.addChild(b)}this._ctx=v,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}exitRule(){this.matchedEOF?this._ctx._stop=this._input.LT(1):this._ctx._stop=this._input.tryLT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx._parent}enterOuterAlt(v,N){if(v.altNumber=N,this._buildParseTrees&&this._ctx!==v){let T=this._ctx._parent;T!=null&&(T.removeLastChild(),T.addChild(v))}this._ctx=v}get precedence(){return this._precedenceStack.isEmpty?-1:this._precedenceStack.peek()}enterRecursionRule(v,N,T,b){this.state=N,this._precedenceStack.push(b),this._ctx=v,this._ctx._start=this._input.LT(1),this.triggerEnterRuleEvent()}pushNewRecursionContext(v,N,T){let b=this._ctx;b._parent=v,b.invokingState=N,b._stop=this._input.tryLT(-1),this._ctx=v,this._ctx._start=b._start,this._buildParseTrees&&this._ctx.addChild(b),this.triggerEnterRuleEvent()}unrollRecursionContexts(v){this._precedenceStack.pop(),this._ctx._stop=this._input.tryLT(-1);let N=this._ctx;if(this._parseListeners.length>0)for(;this._ctx!==v;)this.triggerExitRuleEvent(),this._ctx=this._ctx._parent;else this._ctx=v;N._parent=v,this._buildParseTrees&&v!=null&&v.addChild(N)}getInvokingContext(v){let N=this._ctx;for(;N&&N.ruleIndex!==v;)N=N._parent;return N}get context(){return this._ctx}set context(v){this._ctx=v}precpred(v,N){return N>=this._precedenceStack.peek()}getErrorListenerDispatch(){return new f.ProxyParserErrorListener(this.getErrorListeners())}inContext(v){return!1}isExpectedToken(v){let N=this.interpreter.atn,T=this._ctx,b=N.states[this.state],O=N.nextTokens(b);if(O.contains(v))return!0;if(!O.contains(x.Token.EPSILON))return!1;for(;T!=null&&T.invokingState>=0&&O.contains(x.Token.EPSILON);){let k=N.states[T.invokingState].transition(0);if(O=N.nextTokens(k.followState),O.contains(v))return!0;T=T._parent}return!!(O.contains(x.Token.EPSILON)&&v===x.Token.EOF)}get isMatchedEOF(){return this.matchedEOF}getExpectedTokens(){return this.atn.getExpectedTokens(this.state,this.context)}getExpectedTokensWithinCurrentRule(){let v=this.interpreter.atn,N=v.states[this.state];return v.nextTokens(N)}getRuleIndex(v){let N=this.getRuleIndexMap().get(v);return N??-1}get ruleContext(){return this._ctx}getRuleInvocationStack(v=this._ctx){let N=v,T=this.ruleNames,b=[];for(;N!=null;){let O=N.ruleIndex;O<0?b.push("n/a"):b.push(T[O]),N=N._parent}return b}getDFAStrings(){let v=[];for(let N of this._interp.atn.decisionToDFA)v.push(N.toString(this.vocabulary,this.ruleNames));return v}dumpDFA(){let v=!1;for(let N of this._interp.atn.decisionToDFA)N.isEmpty||(v&&console.log(),console.log("Decision "+N.decision+":"),Re.stdout.write(N.toString(this.vocabulary,this.ruleNames)),v=!0)}get sourceName(){return this._input.sourceName}get parseInfo(){return Promise.resolve().then(()=>hh()).then(v=>{let N=this.interpreter;if(N instanceof v.ProfilingATNSimulator)return new o.ParseInfo(N)})}setProfile(v){return c(this,void 0,void 0,function*(){let N=yield Promise.resolve().then(()=>hh()),T=this.interpreter;v?T instanceof N.ProfilingATNSimulator||(this.interpreter=new N.ProfilingATNSimulator(this)):T instanceof N.ProfilingATNSimulator&&(this.interpreter=new l.ParserATNSimulator(this.atn,this)),this.interpreter.setPredictionMode(T.getPredictionMode())})}set isTrace(v){v?(this._tracer?this.removeParseListener(this._tracer):this._tracer=new m(this.ruleNames,this._input),this.addParseListener(this._tracer)):this._tracer&&(this.removeParseListener(this._tracer),this._tracer=void 0)}get isTrace(){return this._tracer!=null}};return y.bypassAltsAtnCache=new Map,u([e.NotNull],y.prototype,"_errHandler",void 0),u([e.NotNull],y.prototype,"match",null),u([e.NotNull],y.prototype,"matchWildcard",null),u([e.NotNull],y.prototype,"getParseListeners",null),u([i(0,e.NotNull)],y.prototype,"addParseListener",null),u([e.NotNull],y.prototype,"getATNWithBypassAlts",null),u([e.NotNull,i(0,e.NotNull)],y.prototype,"errorHandler",null),u([e.Override],y.prototype,"inputStream",null),u([e.NotNull],y.prototype,"currentToken",null),u([i(0,e.NotNull)],y.prototype,"enterRule",null),u([e.Override,i(0,e.Nullable)],y.prototype,"precpred",null),u([e.Override],y.prototype,"getErrorListenerDispatch",null),u([e.NotNull],y.prototype,"getExpectedTokens",null),u([e.NotNull],y.prototype,"getExpectedTokensWithinCurrentRule",null),u([e.Override],y.prototype,"parseInfo",null),Ze.Parser=y,Ze}var dh;function zi(){if(dh)return Xr;dh=1;/*!
|
|
500
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
501
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
502
|
-
*/var u=Xr&&Xr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.NoViableAltException=void 0;const i=yi(),c=pr(),h=Q();let p=class extends c.RecognitionException{constructor(r,n,t,s,e,o){r instanceof i.Parser&&(n===void 0&&(n=r.inputStream),t===void 0&&(t=r.currentToken),s===void 0&&(s=r.currentToken),o===void 0&&(o=r.context)),super(r,n,o),this._deadEndConfigs=e,this._startToken=t,this.setOffendingToken(r,s)}get startToken(){return this._startToken}get deadEndConfigs(){return this._deadEndConfigs}};return u([h.NotNull],p.prototype,"_startToken",void 0),Xr.NoViableAltException=p,Xr}var xh;function Qs(){if(xh)return st;xh=1;/*!
|
|
503
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
504
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
505
|
-
*/var u=st&&st.__decorate||function(l,f,d,g){var x=arguments.length,m=x<3?f:g===null?g=Object.getOwnPropertyDescriptor(f,d):g,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(l,f,d,g);else for(var _=l.length-1;_>=0;_--)(y=l[_])&&(m=(x<3?y(m):x>3?y(f,d,m):y(f,d))||m);return x>3&&m&&Object.defineProperty(f,d,m),m},i=st&&st.__param||function(l,f){return function(d,g){f(d,g,l)}};Object.defineProperty(st,"__esModule",{value:!0}),st.DefaultErrorStrategy=void 0;const c=ut(),h=Fe(),p=Li(),a=Fi(),r=Gr(),n=zi(),t=Je(),s=Oe(),e=Q();let o=class{constructor(){this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.nextTokensState=c.ATNState.INVALID_STATE_NUMBER}reset(f){this.endErrorCondition(f)}beginErrorCondition(f){this.errorRecoveryMode=!0}inErrorRecoveryMode(f){return this.errorRecoveryMode}endErrorCondition(f){this.errorRecoveryMode=!1,this.lastErrorStates=void 0,this.lastErrorIndex=-1}reportMatch(f){this.endErrorCondition(f)}reportError(f,d){this.inErrorRecoveryMode(f)||(this.beginErrorCondition(f),d instanceof n.NoViableAltException?this.reportNoViableAlternative(f,d):d instanceof a.InputMismatchException?this.reportInputMismatch(f,d):d instanceof p.FailedPredicateException?this.reportFailedPredicate(f,d):(console.error(`unknown recognition error type: ${d}`),this.notifyErrorListeners(f,d.toString(),d)))}notifyErrorListeners(f,d,g){let x=g.getOffendingToken(f);x===void 0&&(x=null),f.notifyErrorListeners(d,x,g)}recover(f,d){this.lastErrorIndex===f.inputStream.index&&this.lastErrorStates&&this.lastErrorStates.contains(f.state)&&f.consume(),this.lastErrorIndex=f.inputStream.index,this.lastErrorStates||(this.lastErrorStates=new r.IntervalSet),this.lastErrorStates.add(f.state);let g=this.getErrorRecoverySet(f);this.consumeUntil(f,g)}sync(f){let d=f.interpreter.atn.states[f.state];if(this.inErrorRecoveryMode(f))return;let x=f.inputStream.LA(1),m=f.atn.nextTokens(d);if(m.contains(x)){this.nextTokensContext=void 0,this.nextTokensState=c.ATNState.INVALID_STATE_NUMBER;return}if(m.contains(s.Token.EPSILON)){this.nextTokensContext===void 0&&(this.nextTokensContext=f.context,this.nextTokensState=f.state);return}switch(d.stateType){case h.ATNStateType.BLOCK_START:case h.ATNStateType.STAR_BLOCK_START:case h.ATNStateType.PLUS_BLOCK_START:case h.ATNStateType.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(f))return;throw new a.InputMismatchException(f);case h.ATNStateType.PLUS_LOOP_BACK:case h.ATNStateType.STAR_LOOP_BACK:this.reportUnwantedToken(f);let _=f.getExpectedTokens().or(this.getErrorRecoverySet(f));this.consumeUntil(f,_);break}}reportNoViableAlternative(f,d){let g=f.inputStream,x;g?d.startToken.type===s.Token.EOF?x="<EOF>":x=g.getTextFromRange(d.startToken,d.getOffendingToken()):x="<unknown input>";let m="no viable alternative at input "+this.escapeWSAndQuote(x);this.notifyErrorListeners(f,m,d)}reportInputMismatch(f,d){let g=d.expectedTokens,x=g?g.toStringVocabulary(f.vocabulary):"",m="mismatched input "+this.getTokenErrorDisplay(d.getOffendingToken(f))+" expecting "+x;this.notifyErrorListeners(f,m,d)}reportFailedPredicate(f,d){let x="rule "+f.ruleNames[f.context.ruleIndex]+" "+d.message;this.notifyErrorListeners(f,x,d)}reportUnwantedToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let d=f.currentToken,g=this.getTokenErrorDisplay(d),x=this.getExpectedTokens(f),m="extraneous input "+g+" expecting "+x.toStringVocabulary(f.vocabulary);f.notifyErrorListeners(m,d,void 0)}reportMissingToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let d=f.currentToken,x="missing "+this.getExpectedTokens(f).toStringVocabulary(f.vocabulary)+" at "+this.getTokenErrorDisplay(d);f.notifyErrorListeners(x,d,void 0)}recoverInline(f){let d=this.singleTokenDeletion(f);if(d)return f.consume(),d;if(this.singleTokenInsertion(f))return this.getMissingSymbol(f);throw this.nextTokensContext===void 0?new a.InputMismatchException(f):new a.InputMismatchException(f,this.nextTokensState,this.nextTokensContext)}singleTokenInsertion(f){let d=f.inputStream.LA(1),x=f.interpreter.atn.states[f.state].transition(0).target,m=f.interpreter.atn;return m.nextTokens(x,t.PredictionContext.fromRuleContext(m,f.context)).contains(d)?(this.reportMissingToken(f),!0):!1}singleTokenDeletion(f){let d=f.inputStream.LA(2);if(this.getExpectedTokens(f).contains(d)){this.reportUnwantedToken(f),f.consume();let x=f.currentToken;return this.reportMatch(f),x}}getMissingSymbol(f){let d=f.currentToken,g=this.getExpectedTokens(f),x=s.Token.INVALID_TYPE;g.isNil||(x=g.minElement);let m;x===s.Token.EOF?m="<missing EOF>":m="<missing "+f.vocabulary.getDisplayName(x)+">";let y=d,_=f.inputStream.tryLT(-1);return y.type===s.Token.EOF&&_!=null&&(y=_),this.constructToken(f.inputStream.tokenSource,x,m,y)}constructToken(f,d,g,x){let m=f.tokenFactory,y=x.tokenSource,_=y?y.inputStream:void 0;return m.create({source:f,stream:_},d,g,s.Token.DEFAULT_CHANNEL,-1,-1,x.line,x.charPositionInLine)}getExpectedTokens(f){return f.getExpectedTokens()}getTokenErrorDisplay(f){if(!f)return"<no token>";let d=this.getSymbolText(f);return d||(this.getSymbolType(f)===s.Token.EOF?d="<EOF>":d=`<${this.getSymbolType(f)}>`),this.escapeWSAndQuote(d)}getSymbolText(f){return f.text}getSymbolType(f){return f.type}escapeWSAndQuote(f){return f=f.replace(`
|
|
506
|
-
`,"\\n"),f=f.replace("\r","\\r"),f=f.replace(" ","\\t"),"'"+f+"'"}getErrorRecoverySet(f){let d=f.interpreter.atn,g=f.context,x=new r.IntervalSet;for(;g&&g.invokingState>=0;){let y=d.states[g.invokingState].transition(0),_=d.nextTokens(y.followState);x.addAll(_),g=g._parent}return x.remove(s.Token.EPSILON),x}consumeUntil(f,d){let g=f.inputStream.LA(1);for(;g!==s.Token.EOF&&!d.contains(g);)f.consume(),g=f.inputStream.LA(1)}};return u([e.Override],o.prototype,"reset",null),u([i(0,e.NotNull)],o.prototype,"beginErrorCondition",null),u([e.Override],o.prototype,"inErrorRecoveryMode",null),u([i(0,e.NotNull)],o.prototype,"endErrorCondition",null),u([e.Override],o.prototype,"reportMatch",null),u([e.Override],o.prototype,"reportError",null),u([i(0,e.NotNull)],o.prototype,"notifyErrorListeners",null),u([e.Override],o.prototype,"recover",null),u([e.Override],o.prototype,"sync",null),u([i(0,e.NotNull),i(1,e.NotNull)],o.prototype,"reportNoViableAlternative",null),u([i(0,e.NotNull),i(1,e.NotNull)],o.prototype,"reportInputMismatch",null),u([i(0,e.NotNull),i(1,e.NotNull)],o.prototype,"reportFailedPredicate",null),u([i(0,e.NotNull)],o.prototype,"reportUnwantedToken",null),u([i(0,e.NotNull)],o.prototype,"reportMissingToken",null),u([e.Override],o.prototype,"recoverInline",null),u([i(0,e.NotNull)],o.prototype,"singleTokenInsertion",null),u([i(0,e.NotNull)],o.prototype,"singleTokenDeletion",null),u([e.NotNull,i(0,e.NotNull)],o.prototype,"getMissingSymbol",null),u([e.NotNull,i(0,e.NotNull)],o.prototype,"getExpectedTokens",null),u([i(0,e.NotNull)],o.prototype,"getSymbolText",null),u([i(0,e.NotNull)],o.prototype,"getSymbolType",null),u([e.NotNull,i(0,e.NotNull)],o.prototype,"escapeWSAndQuote",null),u([e.NotNull,i(0,e.NotNull)],o.prototype,"getErrorRecoverySet",null),u([i(0,e.NotNull),i(1,e.NotNull)],o.prototype,"consumeUntil",null),st.DefaultErrorStrategy=o,st}var yh;function _h(){if(yh)return Sr;yh=1;/*!
|
|
507
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
508
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
509
|
-
*/var u=Sr&&Sr.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(Sr,"__esModule",{value:!0}),Sr.BailErrorStrategy=void 0;const i=Qs(),c=Fi(),h=Q(),p=Lf();let a=class extends i.DefaultErrorStrategy{recover(n,t){for(let s=n.context;s;s=s.parent)s.exception=t;throw new p.ParseCancellationException(t)}recoverInline(n){let t=new c.InputMismatchException(n);for(let s=n.context;s;s=s.parent)s.exception=t;throw new p.ParseCancellationException(t)}sync(n){}};return u([h.Override],a.prototype,"recover",null),u([h.Override],a.prototype,"recoverInline",null),u([h.Override],a.prototype,"sync",null),Sr.BailErrorStrategy=a,Sr}var Js={},mh;function fd(){if(mh)return Js;mh=1;/*!
|
|
510
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
511
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
512
|
-
*/return Object.defineProperty(Js,"__esModule",{value:!0}),Js}var Zs={},gh;function hd(){return gh||(gh=1,function(u){/*!
|
|
513
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
514
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
515
|
-
*/Object.defineProperty(u,"__esModule",{value:!0}),u.Dependents=void 0,function(i){i[i.SELF=0]="SELF",i[i.PARENTS=1]="PARENTS",i[i.CHILDREN=2]="CHILDREN",i[i.ANCESTORS=3]="ANCESTORS",i[i.DESCENDANTS=4]="DESCENDANTS",i[i.SIBLINGS=5]="SIBLINGS",i[i.PRECEEDING_SIBLINGS=6]="PRECEEDING_SIBLINGS",i[i.FOLLOWING_SIBLINGS=7]="FOLLOWING_SIBLINGS",i[i.PRECEEDING=8]="PRECEEDING",i[i.FOLLOWING=9]="FOLLOWING"}(u.Dependents||(u.Dependents={}))}(Zs)),Zs}var ar={},vh;function pd(){if(vh)return ar;vh=1;/*!
|
|
516
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
517
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
518
|
-
*/var u=ar&&ar.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=ar&&ar.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(ar,"__esModule",{value:!0}),ar.DiagnosticErrorListener=void 0;const c=yr(),h=Q(),p=ke();let a=class{constructor(n=!0){this.exactOnly=n,this.exactOnly=n}syntaxError(n,t,s,e,o,l){}reportAmbiguity(n,t,s,e,o,l,f){if(this.exactOnly&&!o)return;let d=this.getDecisionDescription(n,t),g=this.getConflictingAlts(l,f),x=n.inputStream.getText(p.Interval.of(s,e)),m=`reportAmbiguity d=${d}: ambigAlts=${g}, input='${x}'`;n.notifyErrorListeners(m)}reportAttemptingFullContext(n,t,s,e,o,l){let f=this.getDecisionDescription(n,t),d=n.inputStream.getText(p.Interval.of(s,e)),g=`reportAttemptingFullContext d=${f}, input='${d}'`;n.notifyErrorListeners(g)}reportContextSensitivity(n,t,s,e,o,l){let f=this.getDecisionDescription(n,t),d=n.inputStream.getText(p.Interval.of(s,e)),g=`reportContextSensitivity d=${f}, input='${d}'`;n.notifyErrorListeners(g)}getDecisionDescription(n,t){let s=t.decision,e=t.atnStartState.ruleIndex,o=n.ruleNames;if(e<0||e>=o.length)return s.toString();let l=o[e];return l?`${s} (${l})`:s.toString()}getConflictingAlts(n,t){if(n!=null)return n;let s=new c.BitSet;for(let e of t)s.set(e.alt);return s}};return u([h.Override],a.prototype,"syntaxError",null),u([h.Override,i(0,h.NotNull),i(1,h.NotNull),i(6,h.NotNull)],a.prototype,"reportAmbiguity",null),u([h.Override,i(0,h.NotNull),i(1,h.NotNull),i(5,h.NotNull)],a.prototype,"reportAttemptingFullContext",null),u([h.Override,i(0,h.NotNull),i(1,h.NotNull),i(5,h.NotNull)],a.prototype,"reportContextSensitivity",null),u([i(0,h.NotNull),i(1,h.NotNull)],a.prototype,"getDecisionDescription",null),u([h.NotNull,i(1,h.NotNull)],a.prototype,"getConflictingAlts",null),ar.DiagnosticErrorListener=a,ar}var lr={},Ah;function dd(){if(Ah)return lr;Ah=1;/*!
|
|
519
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
520
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
521
|
-
*/var u=lr&&lr.__decorate||function(n,t,s,e){var o=arguments.length,l=o<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,t,s,e);else for(var d=n.length-1;d>=0;d--)(f=n[d])&&(l=(o<3?f(l):o>3?f(t,s,l):f(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l},i=lr&&lr.__param||function(n,t){return function(s,e){t(s,e,n)}};Object.defineProperty(lr,"__esModule",{value:!0}),lr.LexerInterpreter=void 0;const c=_r(),h=ki(),p=Q(),a=Q();let r=class extends c.Lexer{constructor(t,s,e,o,l,f,d){if(super(d),f.grammarType!==0)throw new Error("IllegalArgumentException: The ATN must be a lexer ATN.");this._grammarFileName=t,this._atn=f,this._ruleNames=e.slice(0),this._channelNames=o.slice(0),this._modeNames=l.slice(0),this._vocabulary=s,this._interp=new h.LexerATNSimulator(f,this)}get atn(){return this._atn}get grammarFileName(){return this._grammarFileName}get ruleNames(){return this._ruleNames}get channelNames(){return this._channelNames}get modeNames(){return this._modeNames}get vocabulary(){return this._vocabulary}};return u([p.NotNull],r.prototype,"_vocabulary",void 0),u([a.Override],r.prototype,"atn",null),u([a.Override],r.prototype,"grammarFileName",null),u([a.Override],r.prototype,"ruleNames",null),u([a.Override],r.prototype,"channelNames",null),u([a.Override],r.prototype,"modeNames",null),u([a.Override],r.prototype,"vocabulary",null),r=u([i(1,p.NotNull)],r),lr.LexerInterpreter=r,lr}var eu={},Th;function xd(){if(Th)return eu;Th=1;/*!
|
|
522
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
523
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
524
|
-
*/return Object.defineProperty(eu,"__esModule",{value:!0}),eu}var On={},Eh;function yd(){if(Eh)return On;Eh=1;/*!
|
|
525
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
526
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
527
|
-
*/var u=On&&On.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(On,"__esModule",{value:!0}),On.RuleContextWithAltNum=void 0;const i=bt(),c=Q(),h=et();let p=class extends h.ParserRuleContext{constructor(r,n){n!==void 0?super(r,n):super(),this._altNumber=i.ATN.INVALID_ALT_NUMBER}get altNumber(){return this._altNumber}set altNumber(r){this._altNumber=r}};return u([c.Override],p.prototype,"altNumber",null),On.RuleContextWithAltNum=p,On}var _i={},Sh;function _d(){if(Sh)return _i;Sh=1;/*!
|
|
528
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
529
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
530
|
-
*/Object.defineProperty(_i,"__esModule",{value:!0}),_i.RuleDependency=void 0;function u(i){return(c,h,p)=>{}}return _i.RuleDependency=u,_i}var mi={},Nh;function md(){if(Nh)return mi;Nh=1;/*!
|
|
531
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
532
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
533
|
-
*/Object.defineProperty(mi,"__esModule",{value:!0}),mi.RuleVersion=void 0;function u(i){return(c,h,p)=>{}}return mi.RuleVersion=u,mi}var tu={},bh;function gd(){if(bh)return tu;bh=1;/*!
|
|
534
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
535
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
536
|
-
*/return Object.defineProperty(tu,"__esModule",{value:!0}),tu}var ru={},Ch;function vd(){if(Ch)return ru;Ch=1;/*!
|
|
537
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
538
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
539
|
-
*/return Object.defineProperty(ru,"__esModule",{value:!0}),ru}var nu={},Oh;function Ad(){if(Oh)return nu;Oh=1;/*!
|
|
540
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
541
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
542
|
-
*/return Object.defineProperty(nu,"__esModule",{value:!0}),nu}var cr={},Rh;function Td(){if(Rh)return cr;Rh=1;/*!
|
|
543
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
544
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
545
|
-
*/var u=cr&&cr.__decorate||function(s,e,o,l){var f=arguments.length,d=f<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,o):l,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(s,e,o,l);else for(var x=s.length-1;x>=0;x--)(g=s[x])&&(d=(f<3?g(d):f>3?g(e,o,d):g(e,o))||d);return f>3&&d&&Object.defineProperty(e,o,d),d};Object.defineProperty(cr,"__esModule",{value:!0}),cr.RewriteOperation=cr.TokenStreamRewriter=void 0;const i=ke(),c=Q(),h=Oe();let p=class Ye{constructor(e){this.tokens=e,this.programs=new Map,this.programs.set(Ye.DEFAULT_PROGRAM_NAME,[]),this.lastRewriteTokenIndexes=new Map}getTokenStream(){return this.tokens}rollback(e,o=Ye.DEFAULT_PROGRAM_NAME){let l=this.programs.get(o);l!=null&&this.programs.set(o,l.slice(Ye.MIN_TOKEN_INDEX,e))}deleteProgram(e=Ye.DEFAULT_PROGRAM_NAME){this.rollback(Ye.MIN_TOKEN_INDEX,e)}insertAfter(e,o,l=Ye.DEFAULT_PROGRAM_NAME){let f;typeof e=="number"?f=e:f=e.tokenIndex;let d=this.getProgram(l),g=new n(this.tokens,f,d.length,o);d.push(g)}insertBefore(e,o,l=Ye.DEFAULT_PROGRAM_NAME){let f;typeof e=="number"?f=e:f=e.tokenIndex;let d=this.getProgram(l),g=new r(this.tokens,f,d.length,o);d.push(g)}replaceSingle(e,o){typeof e=="number"?this.replace(e,e,o):this.replace(e,e,o)}replace(e,o,l,f=Ye.DEFAULT_PROGRAM_NAME){if(typeof e!="number"&&(e=e.tokenIndex),typeof o!="number"&&(o=o.tokenIndex),e>o||e<0||o<0||o>=this.tokens.size)throw new RangeError(`replace: range invalid: ${e}..${o}(size=${this.tokens.size})`);let d=this.getProgram(f),g=new t(this.tokens,e,o,d.length,l);d.push(g)}delete(e,o,l=Ye.DEFAULT_PROGRAM_NAME){o===void 0&&(o=e),typeof e=="number"?this.replace(e,o,"",l):this.replace(e,o,"",l)}getLastRewriteTokenIndex(e=Ye.DEFAULT_PROGRAM_NAME){let o=this.lastRewriteTokenIndexes.get(e);return o??-1}setLastRewriteTokenIndex(e,o){this.lastRewriteTokenIndexes.set(e,o)}getProgram(e){let o=this.programs.get(e);return o==null&&(o=this.initializeProgram(e)),o}initializeProgram(e){let o=[];return this.programs.set(e,o),o}getText(e,o=Ye.DEFAULT_PROGRAM_NAME){let l;e instanceof i.Interval?l=e:l=i.Interval.of(0,this.tokens.size-1),typeof e=="string"&&(o=e);let f=this.programs.get(o),d=l.a,g=l.b;if(g>this.tokens.size-1&&(g=this.tokens.size-1),d<0&&(d=0),f==null||f.length===0)return this.tokens.getText(l);let x=[],m=this.reduceToSingleOperationPerIndex(f),y=d;for(;y<=g&&y<this.tokens.size;){let _=m.get(y);m.delete(y);let v=this.tokens.get(y);_==null?(v.type!==h.Token.EOF&&x.push(String(v.text)),y++):y=_.execute(x)}if(g===this.tokens.size-1)for(let _ of m.values())_.index>=this.tokens.size-1&&x.push(_.text.toString());return x.join("")}reduceToSingleOperationPerIndex(e){for(let l=0;l<e.length;l++){let f=e[l];if(f==null||!(f instanceof t))continue;let d=f,g=this.getKindOfOps(e,r,l);for(let m of g)m.index===d.index?(e[m.instructionIndex]=void 0,d.text=m.text.toString()+(d.text!=null?d.text.toString():"")):m.index>d.index&&m.index<=d.lastIndex&&(e[m.instructionIndex]=void 0);let x=this.getKindOfOps(e,t,l);for(let m of x){if(m.index>=d.index&&m.lastIndex<=d.lastIndex){e[m.instructionIndex]=void 0;continue}let y=m.lastIndex<d.index||m.index>d.lastIndex;if(m.text==null&&d.text==null&&!y)e[m.instructionIndex]=void 0,d.index=Math.min(m.index,d.index),d.lastIndex=Math.max(m.lastIndex,d.lastIndex);else if(!y)throw new Error(`replace op boundaries of ${d} overlap with previous ${m}`)}}for(let l=0;l<e.length;l++){let f=e[l];if(f==null||!(f instanceof r))continue;let d=f,g=this.getKindOfOps(e,r,l);for(let m of g)m.index===d.index&&(m instanceof n?(d.text=this.catOpText(m.text,d.text),e[m.instructionIndex]=void 0):m instanceof r&&(d.text=this.catOpText(d.text,m.text),e[m.instructionIndex]=void 0));let x=this.getKindOfOps(e,t,l);for(let m of x){if(d.index===m.index){m.text=this.catOpText(d.text,m.text),e[l]=void 0;continue}if(d.index>=m.index&&d.index<=m.lastIndex)throw new Error(`insert op ${d} within boundaries of previous ${m}`)}}let o=new Map;for(let l of e)if(l!=null){if(o.get(l.index)!=null)throw new Error("should only be one op per index");o.set(l.index,l)}return o}catOpText(e,o){let l="",f="";return e!=null&&(l=e.toString()),o!=null&&(f=o.toString()),l+f}getKindOfOps(e,o,l){let f=[];for(let d=0;d<l&&d<e.length;d++){let g=e[d];g!=null&&g instanceof o&&f.push(g)}return f}};cr.TokenStreamRewriter=p,p.DEFAULT_PROGRAM_NAME="default",p.PROGRAM_INIT_SIZE=100,p.MIN_TOKEN_INDEX=0;class a{constructor(e,o,l,f){this.tokens=e,this.instructionIndex=l,this.index=o,this.text=f===void 0?"":f}execute(e){return this.index}toString(){let e=this.constructor.name,o=e.indexOf("$");return e=e.substring(o+1,e.length),"<"+e+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}}u([c.Override],a.prototype,"toString",null),cr.RewriteOperation=a;class r extends a{constructor(e,o,l,f){super(e,o,l,f)}execute(e){return e.push(this.text.toString()),this.tokens.get(this.index).type!==h.Token.EOF&&e.push(String(this.tokens.get(this.index).text)),this.index+1}}u([c.Override],r.prototype,"execute",null);class n extends r{constructor(e,o,l,f){super(e,o+1,l,f)}}class t extends a{constructor(e,o,l,f,d){super(e,o,f,d),this.lastIndex=l}execute(e){return this.text!=null&&e.push(this.text.toString()),this.lastIndex+1}toString(){return this.text==null?"<DeleteOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+">":"<ReplaceOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+':"'+this.text+'">'}}return u([c.Override],t.prototype,"execute",null),u([c.Override],t.prototype,"toString",null),cr}var iu={},Ph;function Ed(){if(Ph)return iu;Ph=1;/*!
|
|
546
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
547
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
548
|
-
*/return Object.defineProperty(iu,"__esModule",{value:!0}),iu}var ou={},Dh;function Sd(){if(Dh)return ou;Dh=1;/*!
|
|
549
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
550
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
551
|
-
*/return Object.defineProperty(ou,"__esModule",{value:!0}),ou}var Ih;function Nd(){return Ih||(Ih=1,function(u){/*!
|
|
552
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
553
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
554
|
-
*/var i=We&&We.__createBinding||(Object.create?function(h,p,a,r){r===void 0&&(r=a),Object.defineProperty(h,r,{enumerable:!0,get:function(){return p[a]}})}:function(h,p,a,r){r===void 0&&(r=a),h[r]=p[a]}),c=We&&We.__exportStar||function(h,p){for(var a in h)a!=="default"&&!Object.prototype.hasOwnProperty.call(p,a)&&i(p,h,a)};Object.defineProperty(u,"__esModule",{value:!0}),c(mp(),u),c(gp(),u),c(h0(),u),c(_h(),u),c(Of(),u),c(fd(),u),c(Xs(),u),c(Ef(),u),c(Nf(),u),c(Wn(),u),c(Ms(),u),c(Ks(),u),c(ec(),u),c(Qs(),u),c(hd(),u),c(pd(),u),c(Li(),u),c(Fi(),u),c(Bf(),u),c(hr(),u),c(_r(),u),c(dd(),u),c(qi(),u),c(Df(),u),c(zi(),u),c(yi(),u),c(xd(),u),c(Mf(),u),c(et(),u),c(ks(),u),c(vf(),u),c(pr(),u),c(ti(),u),c(tf(),u),c(yd(),u),c(_d(),u),c(md(),u),c(Oe(),u),c(gd(),u),c(vd(),u),c(Ad(),u),c(Td(),u),c(Ed(),u),c(Ur(),u),c(Sd(),u)}(We)),We}var Hi=Nd(),wh=Vs(),bd=_r(),Cd=ki(),Lh=Ur(),Fh=ht();const le=class le extends bd.Lexer{get vocabulary(){return le.VOCABULARY}constructor(i){super(i),this._interp=new Cd.LexerATNSimulator(le._ATN,this)}get grammarFileName(){return"YorkieSchema.g4"}get ruleNames(){return le.ruleNames}get serializedATN(){return le._serializedATN}get channelNames(){return le.channelNames}get modeNames(){return le.modeNames}static get _ATN(){return le.__ATN||(le.__ATN=new wh.ATNDeserializer().deserialize(Fh.toCharArray(le._serializedATN))),le.__ATN}};Y(le,"T__0",1),Y(le,"T__1",2),Y(le,"T__2",3),Y(le,"T__3",4),Y(le,"T__4",5),Y(le,"T__5",6),Y(le,"T__6",7),Y(le,"T__7",8),Y(le,"T__8",9),Y(le,"T__9",10),Y(le,"T__10",11),Y(le,"T__11",12),Y(le,"T__12",13),Y(le,"T__13",14),Y(le,"T__14",15),Y(le,"T__15",16),Y(le,"T__16",17),Y(le,"T__17",18),Y(le,"T__18",19),Y(le,"T__19",20),Y(le,"T__20",21),Y(le,"T__21",22),Y(le,"T__22",23),Y(le,"T__23",24),Y(le,"T__24",25),Y(le,"T__25",26),Y(le,"T__26",27),Y(le,"T__27",28),Y(le,"T__28",29),Y(le,"T__29",30),Y(le,"T__30",31),Y(le,"T__31",32),Y(le,"QUESTION",33),Y(le,"Identifier",34),Y(le,"StringLiteral",35),Y(le,"NumberLiteral",36),Y(le,"BooleanLiteral",37),Y(le,"SingleLineComment",38),Y(le,"MultiLineComment",39),Y(le,"WS",40),Y(le,"channelNames",["DEFAULT_TOKEN_CHANNEL","HIDDEN"]),Y(le,"modeNames",["DEFAULT_MODE"]),Y(le,"ruleNames",["T__0","T__1","T__2","T__3","T__4","T__5","T__6","T__7","T__8","T__9","T__10","T__11","T__12","T__13","T__14","T__15","T__16","T__17","T__18","T__19","T__20","T__21","T__22","T__23","T__24","T__25","T__26","T__27","T__28","T__29","T__30","T__31","QUESTION","Identifier","StringLiteral","NumberLiteral","BooleanLiteral","SingleLineComment","MultiLineComment","WS"]),Y(le,"_LITERAL_NAMES",[void 0,"'type'","'='","';'","'let'","':'","'|'","'&'","'['","']'","'Array'","'string'","'boolean'","'null'","'integer'","'double'","'long'","'bytes'","'date'","'any'","'{'","'}'","'yorkie.Object'","'yorkie.Array'","'yorkie.Counter'","'yorkie.Text'","'yorkie.Tree'","'('","')'","'<'","','","'>'","'extends'","'?'"]),Y(le,"_SYMBOLIC_NAMES",[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"QUESTION","Identifier","StringLiteral","NumberLiteral","BooleanLiteral","SingleLineComment","MultiLineComment","WS"]),Y(le,"VOCABULARY",new Lh.VocabularyImpl(le._LITERAL_NAMES,le._SYMBOLIC_NAMES,[])),Y(le,"_serializedATN",`줝쪺֍꾺体؇쉁*ʼn\b \x07 \x07\b \b
|
|
86
|
+
\b\r\x07" !!#" #$\b$\f%& &'( ()-\x07)*,\v+*,/-.-+.0/-01\x07)1 -`,a._serializedATN=p.join([a._serializedATNSegment0,a._serializedATNSegment1],""),fi}var xn={},kf;function G0(){if(kf)return xn;kf=1;var u=xn&&xn.__decorate||function(h,p,a,r){var n=arguments.length,t=n<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,a):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(h,p,a,r);else for(var e=h.length-1;e>=0;e--)(s=h[e])&&(t=(n<3?s(t):n>3?s(p,a,t):s(p,a))||t);return n>3&&t&&Object.defineProperty(p,a,t),t};Object.defineProperty(xn,"__esModule",{value:!0}),xn.XPathLexerErrorListener=void 0;const i=Q();let c=class{syntaxError(p,a,r,n,t,s){}};return u([i.Override],c.prototype,"syntaxError",null),xn.XPathLexerErrorListener=c,xn}var yn={},_n={},Uf;function Bn(){if(Uf)return _n;Uf=1;var u=_n&&_n.__decorate||function(h,p,a,r){var n=arguments.length,t=n<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,a):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(h,p,a,r);else for(var e=h.length-1;e>=0;e--)(s=h[e])&&(t=(n<3?s(t):n>3?s(p,a,t):s(p,a))||t);return n>3&&t&&Object.defineProperty(p,a,t),t};Object.defineProperty(_n,"__esModule",{value:!0}),_n.XPathElement=void 0;const i=Q();let c=class{constructor(p){this.nodeName=p,this.invert=!1}toString(){let p=this.invert?"!":"";return Object.constructor.name+"["+p+this.nodeName+"]"}};return u([i.Override],c.prototype,"toString",null),_n.XPathElement=c,_n}var zf;function X0(){if(zf)return yn;zf=1;var u=yn&&yn.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(yn,"__esModule",{value:!0}),yn.XPathRuleAnywhereElement=void 0;const i=Q(),c=dr(),h=Bn();let p=class extends h.XPathElement{constructor(r,n){super(r),this.ruleIndex=n}evaluate(r){return c.Trees.findAllRuleNodes(r,this.ruleIndex)}};return u([i.Override],p.prototype,"evaluate",null),yn.XPathRuleAnywhereElement=p,yn}var mn={},Hf;function $0(){if(Hf)return mn;Hf=1;var u=mn&&mn.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(mn,"__esModule",{value:!0}),mn.XPathRuleElement=void 0;const i=Ke(),c=Q(),h=dr(),p=Bn();let a=class extends p.XPathElement{constructor(n,t){super(n),this.ruleIndex=t}evaluate(n){let t=[];for(let s of h.Trees.getChildren(n))s instanceof i.ParserRuleContext&&(s.ruleIndex===this.ruleIndex&&!this.invert||s.ruleIndex!==this.ruleIndex&&this.invert)&&t.push(s);return t}};return u([c.Override],a.prototype,"evaluate",null),mn.XPathRuleElement=a,mn}var gn={},Vf;function K0(){if(Vf)return gn;Vf=1;var u=gn&&gn.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(gn,"__esModule",{value:!0}),gn.XPathTokenAnywhereElement=void 0;const i=Q(),c=dr(),h=Bn();let p=class extends h.XPathElement{constructor(r,n){super(r),this.tokenType=n}evaluate(r){return c.Trees.findAllTokenNodes(r,this.tokenType)}};return u([i.Override],p.prototype,"evaluate",null),gn.XPathTokenAnywhereElement=p,gn}var vn={},Wf;function Q0(){if(Wf)return vn;Wf=1;var u=vn&&vn.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(vn,"__esModule",{value:!0}),vn.XPathTokenElement=void 0;const i=Q(),c=pr(),h=dr(),p=Bn();let a=class extends p.XPathElement{constructor(n,t){super(n),this.tokenType=t}evaluate(n){let t=[];for(let s of h.Trees.getChildren(n))s instanceof c.TerminalNode&&(s.symbol.type===this.tokenType&&!this.invert||s.symbol.type!==this.tokenType&&this.invert)&&t.push(s);return t}};return u([i.Override],a.prototype,"evaluate",null),vn.XPathTokenElement=a,vn}var An={},Gf;function J0(){if(Gf)return An;Gf=1;var u=An&&An.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(An,"__esModule",{value:!0}),An.XPathWildcardAnywhereElement=void 0;const i=Q(),c=dr(),h=$s(),p=Bn();let a=class extends p.XPathElement{constructor(){super(h.XPath.WILDCARD)}evaluate(n){return this.invert?[]:c.Trees.getDescendants(n)}};return u([i.Override],a.prototype,"evaluate",null),An.XPathWildcardAnywhereElement=a,An}var Tn={},Xf;function Z0(){if(Xf)return Tn;Xf=1;var u=Tn&&Tn.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(Tn,"__esModule",{value:!0}),Tn.XPathWildcardElement=void 0;const i=Q(),c=dr(),h=$s(),p=Bn();let a=class extends p.XPathElement{constructor(){super(h.XPath.WILDCARD)}evaluate(n){let t=[];if(this.invert)return t;for(let s of c.Trees.getChildren(n))t.push(s);return t}};return u([i.Override],a.prototype,"evaluate",null),Tn.XPathWildcardElement=a,Tn}var $f;function $s(){if($f)return ci;$f=1;Object.defineProperty(ci,"__esModule",{value:!0}),ci.XPath=void 0;const u=Gs(),i=Xs(),c=ji(),h=Ke(),p=Ne(),a=W0(),r=G0(),n=X0(),t=$0(),s=K0(),e=Q0(),o=J0(),l=Z0();let f=class yp{constructor(g,x){this.parser=g,this.path=x,this.elements=this.split(x)}split(g){let x=new a.XPathLexer(u.CharStreams.fromString(g));x.recover=T=>{throw T},x.removeErrorListeners(),x.addErrorListener(new r.XPathLexerErrorListener);let m=new i.CommonTokenStream(x);try{m.fill()}catch(T){if(T instanceof c.LexerNoViableAltException){let O="Invalid tokens or characters at index "+x.charPositionInLine+" in path '"+g+"' -- "+T.message;throw new RangeError(O)}throw T}let y=m.getTokens(),_=[],v=y.length,N=0;e:for(;N<v;){let T=y[N],b;switch(T.type){case a.XPathLexer.ROOT:case a.XPathLexer.ANYWHERE:let O=T.type===a.XPathLexer.ANYWHERE;N++,b=y[N];let D=b.type===a.XPathLexer.BANG;D&&(N++,b=y[N]);let k=this.getXPathElement(b,O);k.invert=D,_.push(k),N++;break;case a.XPathLexer.TOKEN_REF:case a.XPathLexer.RULE_REF:case a.XPathLexer.WILDCARD:_.push(this.getXPathElement(T,!1)),N++;break;case p.Token.EOF:break e;default:throw new Error("Unknowth path element "+T)}}return _}getXPathElement(g,x){if(g.type===p.Token.EOF)throw new Error("Missing path element at end of path");let m=g.text;if(m==null)throw new Error("Expected wordToken to have text content.");let y=this.parser.getTokenType(m),_=this.parser.getRuleIndex(m);switch(g.type){case a.XPathLexer.WILDCARD:return x?new o.XPathWildcardAnywhereElement:new l.XPathWildcardElement;case a.XPathLexer.TOKEN_REF:case a.XPathLexer.STRING:if(y===p.Token.INVALID_TYPE)throw new Error(m+" at index "+g.startIndex+" isn't a valid token name");return x?new s.XPathTokenAnywhereElement(m,y):new e.XPathTokenElement(m,y);default:if(_===-1)throw new Error(m+" at index "+g.startIndex+" isn't a valid rule name");return x?new n.XPathRuleAnywhereElement(m,_):new t.XPathRuleElement(m,_)}}static findAll(g,x,m){return new yp(m,x).evaluate(g)}evaluate(g){let x=new h.ParserRuleContext;x.addChild(g);let m=new Set([x]),y=0;for(;y<this.elements.length;){let _=new Set;for(let v of m)v.childCount>0&&this.elements[y].evaluate(v).forEach(_.add,_);y++,m=_}return m}};return ci.XPath=f,f.WILDCARD="*",f.NOT="!",ci}var Kf;function Y0(){if(Kf)return Gt;Kf=1;var u=Gt&&Gt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Gt&&Gt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.ParseTreePattern=void 0;const c=Q(),h=$s();let p=class{constructor(r,n,t,s){this._matcher=r,this._patternRuleIndex=t,this._pattern=n,this._patternTree=s}match(r){return this._matcher.match(r,this)}matches(r){return this._matcher.match(r,this).succeeded}findAll(r,n){let t=h.XPath.findAll(r,n,this._matcher.parser),s=[];for(let e of t){let o=this.match(e);o.succeeded&&s.push(o)}return s}get matcher(){return this._matcher}get pattern(){return this._pattern}get patternRuleIndex(){return this._patternRuleIndex}get patternTree(){return this._patternTree}};return u([c.NotNull],p.prototype,"_pattern",void 0),u([c.NotNull],p.prototype,"_patternTree",void 0),u([c.NotNull],p.prototype,"_matcher",void 0),u([c.NotNull,i(0,c.NotNull)],p.prototype,"match",null),u([i(0,c.NotNull)],p.prototype,"matches",null),u([c.NotNull,i(0,c.NotNull),i(1,c.NotNull)],p.prototype,"findAll",null),u([c.NotNull],p.prototype,"matcher",null),u([c.NotNull],p.prototype,"pattern",null),u([c.NotNull],p.prototype,"patternTree",null),p=u([i(0,c.NotNull),i(1,c.NotNull),i(3,c.NotNull)],p),Gt.ParseTreePattern=p,Gt}var Xt={},Qf;function ed(){if(Qf)return Xt;Qf=1;var u=Xt&&Xt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Xt&&Xt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.RuleTagToken=void 0;const c=Q(),h=Ne();let p=class{constructor(r,n,t){if(r==null||r.length===0)throw new Error("ruleName cannot be null or empty.");this._ruleName=r,this.bypassTokenType=n,this._label=t}get ruleName(){return this._ruleName}get label(){return this._label}get channel(){return h.Token.DEFAULT_CHANNEL}get text(){return this._label!=null?"<"+this._label+":"+this._ruleName+">":"<"+this._ruleName+">"}get type(){return this.bypassTokenType}get line(){return 0}get charPositionInLine(){return-1}get tokenIndex(){return-1}get startIndex(){return-1}get stopIndex(){return-1}get tokenSource(){}get inputStream(){}toString(){return this._ruleName+":"+this.bypassTokenType}};return u([c.NotNull],p.prototype,"ruleName",null),u([c.Override],p.prototype,"channel",null),u([c.Override],p.prototype,"text",null),u([c.Override],p.prototype,"type",null),u([c.Override],p.prototype,"line",null),u([c.Override],p.prototype,"charPositionInLine",null),u([c.Override],p.prototype,"tokenIndex",null),u([c.Override],p.prototype,"startIndex",null),u([c.Override],p.prototype,"stopIndex",null),u([c.Override],p.prototype,"tokenSource",null),u([c.Override],p.prototype,"inputStream",null),u([c.Override],p.prototype,"toString",null),p=u([i(0,c.NotNull)],p),Xt.RuleTagToken=p,Xt}var En={},hi={},Jf;function Zf(){if(Jf)return hi;Jf=1;Object.defineProperty(hi,"__esModule",{value:!0}),hi.Chunk=void 0;let u=class{};return hi.Chunk=u,hi}var Yf;function td(){if(Yf)return En;Yf=1;var u=En&&En.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s};Object.defineProperty(En,"__esModule",{value:!0}),En.TagChunk=void 0;const i=Zf(),c=Q();let h=class extends i.Chunk{constructor(a,r){if(super(),a==null||a.length===0)throw new Error("tag cannot be null or empty");this._tag=a,this._label=r}get tag(){return this._tag}get label(){return this._label}toString(){return this._label!=null?this._label+":"+this._tag:this._tag}};return u([c.NotNull],h.prototype,"tag",null),u([c.Override],h.prototype,"toString",null),En.TagChunk=h,En}var $t={},eh;function rd(){if(eh)return $t;eh=1;var u=$t&&$t.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=$t&&$t.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty($t,"__esModule",{value:!0}),$t.TextChunk=void 0;const c=Zf(),h=Q();let p=class extends c.Chunk{constructor(r){if(super(),r==null)throw new Error("text cannot be null");this._text=r}get text(){return this._text}toString(){return"'"+this._text+"'"}};return u([h.NotNull],p.prototype,"_text",void 0),u([h.NotNull],p.prototype,"text",null),u([h.Override],p.prototype,"toString",null),p=u([i(0,h.NotNull)],p),$t.TextChunk=p,$t}var Kt={},th;function nd(){if(th)return Kt;th=1;var u=Kt&&Kt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Kt&&Kt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Kt,"__esModule",{value:!0}),Kt.TokenTagToken=void 0;const c=Vn(),h=Q();let p=class extends c.CommonToken{constructor(r,n,t){super(n),this._tokenName=r,this._label=t}get tokenName(){return this._tokenName}get label(){return this._label}get text(){return this._label!=null?"<"+this._label+":"+this._tokenName+">":"<"+this._tokenName+">"}toString(){return this._tokenName+":"+this.type}};return u([h.NotNull],p.prototype,"_tokenName",void 0),u([h.NotNull],p.prototype,"tokenName",null),u([h.Override],p.prototype,"text",null),u([h.Override],p.prototype,"toString",null),p=u([i(0,h.NotNull)],p),Kt.TokenTagToken=p,Kt}var rh;function id(){return rh||(rh=1,(function(u){var i=hn&&hn.__decorate||function(b,O,D,k){var z=arguments.length,U=z<3?O:k===null?k=Object.getOwnPropertyDescriptor(O,D):k,te;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(b,O,D,k);else for(var ie=b.length-1;ie>=0;ie--)(te=b[ie])&&(U=(z<3?te(U):z>3?te(O,D,U):te(O,D))||U);return z>3&&U&&Object.defineProperty(O,D,U),U},c=hn&&hn.__param||function(b,O){return function(D,k){O(D,k,b)}};Object.defineProperty(u,"__esModule",{value:!0}),u.ParseTreePatternMatcher=void 0;const h=yh(),p=Gs(),a=Xs(),r=Pf(),n=H0(),t=Q(),s=wf(),e=jf(),o=Ke(),l=V0(),f=Y0(),d=ar(),g=ii(),x=ed(),m=td(),y=pr(),_=rd(),v=Ne(),N=nd();let T=class bu{constructor(O,D){this.start="<",this.stop=">",this.escape="\\",this.escapeRE=/\\/g,this._lexer=O,this._parser=D}setDelimiters(O,D,k){if(!O)throw new Error("start cannot be null or empty");if(!D)throw new Error("stop cannot be null or empty");this.start=O,this.stop=D,this.escape=k,this.escapeRE=new RegExp(k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g")}matches(O,D,k=0){if(typeof D=="string"){let z=this.compile(D,k);return this.matches(O,z)}else{let z=new n.MultiMap;return!this.matchImpl(O,D.patternTree,z)}}match(O,D,k=0){if(typeof D=="string"){let z=this.compile(D,k);return this.match(O,z)}else{let z=new n.MultiMap,U=this.matchImpl(O,D.patternTree,z);return new l.ParseTreeMatch(O,D,z,U)}}compile(O,D){let k=this.tokenize(O),z=new r.ListTokenSource(k),U=new a.CommonTokenStream(z);const te=this._parser;let ie=new e.ParserInterpreter(te.grammarFileName,te.vocabulary,te.ruleNames,te.getATNWithBypassAlts(),U),oe;try{ie.errorHandler=new h.BailErrorStrategy,oe=ie.parse(D)}catch(he){throw he instanceof s.ParseCancellationException?he.getCause():he instanceof d.RecognitionException?he:he instanceof Error?new bu.CannotInvokeStartRule(he):he}if(U.LA(1)!==v.Token.EOF)throw new bu.StartRuleDoesNotConsumeFullPattern;return new f.ParseTreePattern(this,O,D,oe)}get lexer(){return this._lexer}get parser(){return this._parser}matchImpl(O,D,k){if(!O)throw new TypeError("tree cannot be null");if(!D)throw new TypeError("patternTree cannot be null");if(O instanceof y.TerminalNode&&D instanceof y.TerminalNode){let z;if(O.symbol.type===D.symbol.type)if(D.symbol instanceof N.TokenTagToken){let U=D.symbol;k.map(U.tokenName,O);const te=U.label;te&&k.map(te,O)}else O.text===D.text||z||(z=O);else z||(z=O);return z}if(O instanceof o.ParserRuleContext&&D instanceof o.ParserRuleContext){let z,U=this.getRuleTagToken(D);if(U){if(O.ruleContext.ruleIndex===D.ruleContext.ruleIndex){k.map(U.ruleName,O);const ie=U.label;ie&&k.map(ie,O)}else z||(z=O);return z}if(O.childCount!==D.childCount)return z||(z=O),z;let te=O.childCount;for(let ie=0;ie<te;ie++){let oe=this.matchImpl(O.getChild(ie),D.getChild(ie),k);if(oe)return oe}return z}return O}getRuleTagToken(O){if(O instanceof g.RuleNode&&O.childCount===1&&O.getChild(0)instanceof y.TerminalNode){let D=O.getChild(0);if(D.symbol instanceof x.RuleTagToken)return D.symbol}}tokenize(O){let D=this.split(O),k=[];for(let z of D)if(z instanceof m.TagChunk){let U=z;const te=U.tag.substr(0,1);if(te===te.toUpperCase()){let ie=this._parser.getTokenType(U.tag);if(ie===v.Token.INVALID_TYPE)throw new Error("Unknown token "+U.tag+" in pattern: "+O);let oe=new N.TokenTagToken(U.tag,ie,U.label);k.push(oe)}else if(te===te.toLowerCase()){let ie=this._parser.getRuleIndex(U.tag);if(ie===-1)throw new Error("Unknown rule "+U.tag+" in pattern: "+O);let oe=this._parser.getATNWithBypassAlts().ruleToTokenType[ie];k.push(new x.RuleTagToken(U.tag,oe,U.label))}else throw new Error("invalid tag: "+U.tag+" in pattern: "+O)}else{let U=z;this._lexer.inputStream=p.CharStreams.fromString(U.text);let te=this._lexer.nextToken();for(;te.type!==v.Token.EOF;)k.push(te),te=this._lexer.nextToken()}return k}split(O){let D=0,k=O.length,z=[],U=[],te=[];for(;D<k;)D===O.indexOf(this.escape+this.start,D)?D+=this.escape.length+this.start.length:D===O.indexOf(this.escape+this.stop,D)?D+=this.escape.length+this.stop.length:D===O.indexOf(this.start,D)?(U.push(D),D+=this.start.length):D===O.indexOf(this.stop,D)?(te.push(D),D+=this.stop.length):D++;if(U.length>te.length)throw new Error("unterminated tag in pattern: "+O);if(U.length<te.length)throw new Error("missing start tag in pattern: "+O);let ie=U.length;for(let oe=0;oe<ie;oe++)if(U[oe]>=te[oe])throw new Error("tag delimiters out of order in pattern: "+O);if(ie===0){let oe=O.substring(0,k);z.push(new _.TextChunk(oe))}if(ie>0&&U[0]>0){let oe=O.substring(0,U[0]);z.push(new _.TextChunk(oe))}for(let oe=0;oe<ie;oe++){let he=O.substring(U[oe]+this.start.length,te[oe]),Ee=he,le,Z=he.indexOf(":");if(Z>=0&&(le=he.substring(0,Z),Ee=he.substring(Z+1,he.length)),z.push(new m.TagChunk(Ee,le)),oe+1<ie){let ee=O.substring(te[oe]+this.stop.length,U[oe+1]);z.push(new _.TextChunk(ee))}}if(ie>0){let oe=te[ie-1]+this.stop.length;if(oe<k){let he=O.substring(oe,k);z.push(new _.TextChunk(he))}}for(let oe=0;oe<z.length;oe++){let he=z[oe];if(he instanceof _.TextChunk){let Ee=he.text.replace(this.escapeRE,"");Ee.length<he.text.length&&(z[oe]=new _.TextChunk(Ee))}}return z}};i([t.NotNull,c(1,t.NotNull)],T.prototype,"match",null),i([t.NotNull],T.prototype,"lexer",null),i([t.NotNull],T.prototype,"parser",null),i([c(0,t.NotNull),c(1,t.NotNull),c(2,t.NotNull)],T.prototype,"matchImpl",null),u.ParseTreePatternMatcher=T,(function(b){class O extends Error{constructor(z){super(`CannotInvokeStartRule: ${z}`),this.error=z}}b.CannotInvokeStartRule=O;class D extends Error{constructor(){super("StartRuleDoesNotConsumeFullPattern")}}b.StartRuleDoesNotConsumeFullPattern=D})(T=u.ParseTreePatternMatcher||(u.ParseTreePatternMatcher={}))})(hn)),hn}var Qt={},Jt={},Zt={},nh;function pi(){if(nh)return Zt;nh=1;var u=Zt&&Zt.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s},i=Zt&&Zt.__param||function(p,a){return function(r,n){a(r,n,p)}};Object.defineProperty(Zt,"__esModule",{value:!0}),Zt.DecisionEventInfo=void 0;const c=Q();let h=class{constructor(a,r,n,t,s,e){this.decision=a,this.fullCtx=e,this.stopIndex=s,this.input=n,this.startIndex=t,this.state=r}};return u([c.NotNull],h.prototype,"input",void 0),h=u([i(2,c.NotNull)],h),Zt.DecisionEventInfo=h,Zt}var ih;function od(){if(ih)return Jt;ih=1;var u=Jt&&Jt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Jt&&Jt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Jt,"__esModule",{value:!0}),Jt.AmbiguityInfo=void 0;const c=pi(),h=Q();let p=class extends c.DecisionEventInfo{constructor(r,n,t,s,e,o){super(r,n,s,e,o,n.useContext),this.ambigAlts=t}get ambiguousAlternatives(){return this.ambigAlts}};return u([h.NotNull],p.prototype,"ambigAlts",void 0),u([h.NotNull],p.prototype,"ambiguousAlternatives",null),p=u([i(1,h.NotNull),i(2,h.NotNull),i(3,h.NotNull)],p),Jt.AmbiguityInfo=p,Jt}var Yt={},oh;function sd(){if(oh)return Yt;oh=1;var u=Yt&&Yt.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=Yt&&Yt.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(Yt,"__esModule",{value:!0}),Yt.ContextSensitivityInfo=void 0;const c=pi(),h=Q();let p=class extends c.DecisionEventInfo{constructor(r,n,t,s,e){super(r,n,t,s,e,!0)}};return p=u([i(1,h.NotNull),i(2,h.NotNull)],p),Yt.ContextSensitivityInfo=p,Yt}var Sn={},sh;function ud(){if(sh)return Sn;sh=1;var u=Sn&&Sn.__decorate||function(h,p,a,r){var n=arguments.length,t=n<3?p:r===null?r=Object.getOwnPropertyDescriptor(p,a):r,s;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")t=Reflect.decorate(h,p,a,r);else for(var e=h.length-1;e>=0;e--)(s=h[e])&&(t=(n<3?s(t):n>3?s(p,a,t):s(p,a))||t);return n>3&&t&&Object.defineProperty(p,a,t),t};Object.defineProperty(Sn,"__esModule",{value:!0}),Sn.DecisionInfo=void 0;const i=Q();let c=class{constructor(p){this.invocations=0,this.timeInPrediction=0,this.SLL_TotalLook=0,this.SLL_MinLook=0,this.SLL_MaxLook=0,this.LL_TotalLook=0,this.LL_MinLook=0,this.LL_MaxLook=0,this.contextSensitivities=[],this.errors=[],this.ambiguities=[],this.predicateEvals=[],this.SLL_ATNTransitions=0,this.SLL_DFATransitions=0,this.LL_Fallback=0,this.LL_ATNTransitions=0,this.LL_DFATransitions=0,this.decision=p}toString(){return"{decision="+this.decision+", contextSensitivities="+this.contextSensitivities.length+", errors="+this.errors.length+", ambiguities="+this.ambiguities.length+", SLL_lookahead="+this.SLL_TotalLook+", SLL_ATNTransitions="+this.SLL_ATNTransitions+", SLL_DFATransitions="+this.SLL_DFATransitions+", LL_Fallback="+this.LL_Fallback+", LL_lookahead="+this.LL_TotalLook+", LL_ATNTransitions="+this.LL_ATNTransitions+"}"}};return u([i.Override],c.prototype,"toString",null),Sn.DecisionInfo=c,Sn}var er={},uh;function ad(){if(uh)return er;uh=1;var u=er&&er.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=er&&er.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(er,"__esModule",{value:!0}),er.ErrorInfo=void 0;const c=pi(),h=Q();let p=class extends c.DecisionEventInfo{constructor(r,n,t,s,e){super(r,n,t,s,e,n.useContext)}};return p=u([i(1,h.NotNull),i(2,h.NotNull)],p),er.ErrorInfo=p,er}var tr={},ah;function ld(){if(ah)return tr;ah=1;var u=tr&&tr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=tr&&tr.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(tr,"__esModule",{value:!0}),tr.LookaheadEventInfo=void 0;const c=pi(),h=Q();let p=class extends c.DecisionEventInfo{constructor(r,n,t,s,e,o,l){super(r,n,s,e,o,l),this.predictedAlt=t}};return p=u([i(3,h.NotNull)],p),tr.LookaheadEventInfo=p,tr}var rr={},lh;function cd(){if(lh)return rr;lh=1;var u=rr&&rr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e},i=rr&&rr.__param||function(a,r){return function(n,t){r(n,t,a)}};Object.defineProperty(rr,"__esModule",{value:!0}),rr.PredicateEvalInfo=void 0;const c=pi(),h=Q();let p=class extends c.DecisionEventInfo{constructor(r,n,t,s,e,o,l,f){super(n,r,t,s,e,r.useContext),this.semctx=o,this.evalResult=l,this.predictedAlt=f}};return p=u([i(0,h.NotNull),i(2,h.NotNull),i(5,h.NotNull)],p),rr.PredicateEvalInfo=p,rr}var ch;function fh(){if(ch)return Qt;ch=1;var u=Qt&&Qt.__decorate||function(g,x,m,y){var _=arguments.length,v=_<3?x:y===null?y=Object.getOwnPropertyDescriptor(x,m):y,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(g,x,m,y);else for(var T=g.length-1;T>=0;T--)(N=g[T])&&(v=(_<3?N(v):_>3?N(x,m,v):N(x,m))||v);return _>3&&v&&Object.defineProperty(x,m,v),v},i=Qt&&Qt.__param||function(g,x){return function(m,y){x(m,y,g)}};Object.defineProperty(Qt,"__esModule",{value:!0}),Qt.ProfilingATNSimulator=void 0;const c=od(),h=At(),p=Bi(),a=sd(),r=ud(),n=ad(),t=Q(),s=ld(),e=si(),o=cd(),l=Ln(),f=of();let d=class extends e.ParserATNSimulator{constructor(x){super(x.interpreter.atn,x),this._startIndex=0,this._sllStopIndex=0,this._llStopIndex=0,this.currentDecision=0,this.conflictingAltResolvedBySLL=0,this.optimize_ll1=!1,this.reportAmbiguities=!0,this.numDecisions=this.atn.decisionToState.length,this.decisions=[];for(let m=0;m<this.numDecisions;m++)this.decisions.push(new r.DecisionInfo(m))}adaptivePredict(x,m,y,_){if(_!==void 0)return super.adaptivePredict(x,m,y,_);try{this._input=x,this._startIndex=x.index,this._sllStopIndex=this._startIndex-1,this._llStopIndex=-1,this.currentDecision=m,this.currentState=void 0,this.conflictingAltResolvedBySLL=h.ATN.INVALID_ALT_NUMBER;let v=be.hrtime(),N=super.adaptivePredict(x,m,y),T=be.hrtime(),b=(T[0]-v[0])*1e9;b===0?b=T[1]-v[1]:b+=1e9-v[1]+T[1],this.decisions[m].timeInPrediction+=b,this.decisions[m].invocations++;let O=this._sllStopIndex-this._startIndex+1;if(this.decisions[m].SLL_TotalLook+=O,this.decisions[m].SLL_MinLook=this.decisions[m].SLL_MinLook===0?O:Math.min(this.decisions[m].SLL_MinLook,O),O>this.decisions[m].SLL_MaxLook&&(this.decisions[m].SLL_MaxLook=O,this.decisions[m].SLL_MaxLookEvent=new s.LookaheadEventInfo(m,void 0,N,x,this._startIndex,this._sllStopIndex,!1)),this._llStopIndex>=0){let D=this._llStopIndex-this._startIndex+1;this.decisions[m].LL_TotalLook+=D,this.decisions[m].LL_MinLook=this.decisions[m].LL_MinLook===0?D:Math.min(this.decisions[m].LL_MinLook,D),D>this.decisions[m].LL_MaxLook&&(this.decisions[m].LL_MaxLook=D,this.decisions[m].LL_MaxLookEvent=new s.LookaheadEventInfo(m,void 0,N,x,this._startIndex,this._llStopIndex,!0))}return N}finally{this._input=void 0,this.currentDecision=-1}}getStartState(x,m,y,_){let v=super.getStartState(x,m,y,_);return this.currentState=v,v}computeStartState(x,m,y){let _=super.computeStartState(x,m,y);return this.currentState=_,_}computeReachSet(x,m,y,_){if(this._input===void 0)throw new Error("Invalid state");let v=super.computeReachSet(x,m,y,_);return v==null&&this.decisions[this.currentDecision].errors.push(new n.ErrorInfo(this.currentDecision,m,this._input,this._startIndex,this._input.index)),this.currentState=v,v}getExistingTargetState(x,m){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");this.currentState.useContext?this._llStopIndex=this._input.index:this._sllStopIndex=this._input.index;let y=super.getExistingTargetState(x,m);if(y!=null&&(this.currentState=new f.SimulatorState(this.currentState.outerContext,y,this.currentState.useContext,this.currentState.remainingOuterContext),this.currentState.useContext?this.decisions[this.currentDecision].LL_DFATransitions++:this.decisions[this.currentDecision].SLL_DFATransitions++,y===p.ATNSimulator.ERROR)){let _=new f.SimulatorState(this.currentState.outerContext,x,this.currentState.useContext,this.currentState.remainingOuterContext);this.decisions[this.currentDecision].errors.push(new n.ErrorInfo(this.currentDecision,_,this._input,this._startIndex,this._input.index))}return y}computeTargetState(x,m,y,_,v,N){let T=super.computeTargetState(x,m,y,_,v,N);return v?this.decisions[this.currentDecision].LL_ATNTransitions++:this.decisions[this.currentDecision].SLL_ATNTransitions++,T}evalSemanticContextImpl(x,m,y){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let _=super.evalSemanticContextImpl(x,m,y);if(!(x instanceof l.SemanticContext.PrecedencePredicate)){let N=this._llStopIndex>=0?this._llStopIndex:this._sllStopIndex;this.decisions[this.currentDecision].predicateEvals.push(new o.PredicateEvalInfo(this.currentState,this.currentDecision,this._input,this._startIndex,N,x,_,y))}return _}reportContextSensitivity(x,m,y,_,v){if(this._input===void 0)throw new Error("Invalid state");m!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new a.ContextSensitivityInfo(this.currentDecision,y,this._input,_,v)),super.reportContextSensitivity(x,m,y,_,v)}reportAttemptingFullContext(x,m,y,_,v){m!=null?this.conflictingAltResolvedBySLL=m.nextSetBit(0):this.conflictingAltResolvedBySLL=y.s0.configs.getRepresentedAlternatives().nextSetBit(0),this.decisions[this.currentDecision].LL_Fallback++,super.reportAttemptingFullContext(x,m,y,_,v)}reportAmbiguity(x,m,y,_,v,N,T){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let b;N!=null?b=N.nextSetBit(0):b=T.getRepresentedAlternatives().nextSetBit(0),this.conflictingAltResolvedBySLL!==h.ATN.INVALID_ALT_NUMBER&&b!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new a.ContextSensitivityInfo(this.currentDecision,this.currentState,this._input,y,_)),this.decisions[this.currentDecision].ambiguities.push(new c.AmbiguityInfo(this.currentDecision,this.currentState,N,this._input,y,_)),super.reportAmbiguity(x,m,y,_,v,N,T)}getDecisionInfo(){return this.decisions}getCurrentState(){return this.currentState}};return u([t.Override,i(0,t.NotNull)],d.prototype,"adaptivePredict",null),u([t.Override],d.prototype,"getStartState",null),u([t.Override],d.prototype,"computeStartState",null),u([t.Override],d.prototype,"computeReachSet",null),u([t.Override],d.prototype,"getExistingTargetState",null),u([t.Override],d.prototype,"computeTargetState",null),u([t.Override],d.prototype,"evalSemanticContextImpl",null),u([t.Override],d.prototype,"reportContextSensitivity",null),u([t.Override],d.prototype,"reportAttemptingFullContext",null),u([t.Override,i(0,t.NotNull),i(5,t.NotNull),i(6,t.NotNull)],d.prototype,"reportAmbiguity",null),Qt.ProfilingATNSimulator=d,Qt}var hh;function di(){if(hh)return $e;hh=1;var u=$e&&$e.__decorate||function(_,v,N,T){var b=arguments.length,O=b<3?v:T===null?T=Object.getOwnPropertyDescriptor(v,N):T,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")O=Reflect.decorate(_,v,N,T);else for(var k=_.length-1;k>=0;k--)(D=_[k])&&(O=(b<3?D(O):b>3?D(v,N,O):D(v,N))||O);return b>3&&O&&Object.defineProperty(v,N,O),O},i=$e&&$e.__param||function(_,v){return function(N,T){v(N,T,_)}},c=$e&&$e.__awaiter||function(_,v,N,T){function b(O){return O instanceof N?O:new N(function(D){D(O)})}return new(N||(N=Promise))(function(O,D){function k(te){try{U(T.next(te))}catch(ie){D(ie)}}function z(te){try{U(T.throw(te))}catch(ie){D(ie)}}function U(te){te.done?O(te.value):b(te.value).then(k,z)}U((T=T.apply(_,v||[])).next())})};Object.defineProperty($e,"__esModule",{value:!0}),$e.Parser=void 0;const h=ut(),p=Rc(),a=Hs(),r=Ks(),n=ri(),t=kl(),s=hr(),e=Q(),o=U0(),l=si(),f=gf(),d=Yn(),g=pr(),x=Ne();class m{constructor(v,N){this.ruleNames=v,this.tokenStream=N}enterEveryRule(v){console.log("enter "+this.ruleNames[v.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text)}exitEveryRule(v){console.log("exit "+this.ruleNames[v.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text)}visitErrorNode(v){}visitTerminal(v){let N=v.parent.ruleContext,T=v.symbol;console.log("consume "+T+" rule "+this.ruleNames[N.ruleIndex])}}u([e.Override],m.prototype,"enterEveryRule",null),u([e.Override],m.prototype,"exitEveryRule",null),u([e.Override],m.prototype,"visitErrorNode",null),u([e.Override],m.prototype,"visitTerminal",null);let y=class $i extends d.Recognizer{constructor(v){super(),this._errHandler=new r.DefaultErrorStrategy,this._precedenceStack=new t.IntegerStack,this._buildParseTrees=!0,this._parseListeners=[],this._syntaxErrors=0,this.matchedEOF=!1,this._precedenceStack.push(0),this.inputStream=v}reset(v){(v===void 0||v)&&this.inputStream.seek(0),this._errHandler.reset(this),this._ctx=void 0,this._syntaxErrors=0,this.matchedEOF=!1,this.isTrace=!1,this._precedenceStack.clear(),this._precedenceStack.push(0);let N=this.interpreter;N?.reset()}match(v){let N=this.currentToken;return N.type===v?(v===x.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):(N=this._errHandler.recoverInline(this),this._buildParseTrees&&N.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,N))),N}matchWildcard(){let v=this.currentToken;return v.type>0?(this._errHandler.reportMatch(this),this.consume()):(v=this._errHandler.recoverInline(this),this._buildParseTrees&&v.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,v))),v}set buildParseTree(v){this._buildParseTrees=v}get buildParseTree(){return this._buildParseTrees}getParseListeners(){return this._parseListeners}addParseListener(v){if(v==null)throw new TypeError("listener cannot be null");this._parseListeners.push(v)}removeParseListener(v){let N=this._parseListeners.findIndex(T=>T===v);N!==-1&&this._parseListeners.splice(N,1)}removeParseListeners(){this._parseListeners.length=0}triggerEnterRuleEvent(){for(let v of this._parseListeners)v.enterEveryRule&&v.enterEveryRule(this._ctx),this._ctx.enterRule(v)}triggerExitRuleEvent(){for(let v=this._parseListeners.length-1;v>=0;v--){let N=this._parseListeners[v];this._ctx.exitRule(N),N.exitEveryRule&&N.exitEveryRule(this._ctx)}}get numberOfSyntaxErrors(){return this._syntaxErrors}get tokenFactory(){return this._input.tokenSource.tokenFactory}getATNWithBypassAlts(){let v=this.serializedATN;if(v==null)throw new Error("The current parser does not support an ATN with bypass alternatives.");let N=$i.bypassAltsAtnCache.get(v);if(N==null){let T=new p.ATNDeserializationOptions;T.isGenerateRuleBypassTransitions=!0,N=new a.ATNDeserializer(T).deserialize(h.toCharArray(v)),$i.bypassAltsAtnCache.set(v,N)}return N}compileParseTreePattern(v,N,T){return c(this,void 0,void 0,function*(){if(!T){if(this.inputStream){let k=this.inputStream.tokenSource;k instanceof s.Lexer&&(T=k)}if(!T)throw new Error("Parser can't discover a lexer to use")}let b=T,O=yield Promise.resolve().then(()=>id());return new O.ParseTreePatternMatcher(b,this).compile(v,N)})}get errorHandler(){return this._errHandler}set errorHandler(v){this._errHandler=v}get inputStream(){return this._input}set inputStream(v){this.reset(!1),this._input=v}get currentToken(){return this._input.LT(1)}notifyErrorListeners(v,N,T){N===void 0?N=this.currentToken:N===null&&(N=void 0),this._syntaxErrors++;let b=-1,O=-1;N!=null&&(b=N.line,O=N.charPositionInLine);let D=this.getErrorListenerDispatch();D.syntaxError&&D.syntaxError(this,N,b,O,v,T)}consume(){let v=this.currentToken;v.type!==$i.EOF&&this.inputStream.consume();let N=this._parseListeners.length!==0;if(this._buildParseTrees||N)if(this._errHandler.inErrorRecoveryMode(this)){let T=this._ctx.addErrorNode(this.createErrorNode(this._ctx,v));if(N)for(let b of this._parseListeners)b.visitErrorNode&&b.visitErrorNode(T)}else{let T=this.createTerminalNode(this._ctx,v);if(this._ctx.addChild(T),N)for(let b of this._parseListeners)b.visitTerminal&&b.visitTerminal(T)}return v}createTerminalNode(v,N){return new g.TerminalNode(N)}createErrorNode(v,N){return new n.ErrorNode(N)}addContextToParseTree(){let v=this._ctx._parent;v?.addChild(this._ctx)}enterRule(v,N,T){this.state=N,this._ctx=v,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}enterLeftFactoredRule(v,N,T){if(this.state=N,this._buildParseTrees){let b=this._ctx.getChild(this._ctx.childCount-1);this._ctx.removeLastChild(),b._parent=v,v.addChild(b)}this._ctx=v,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}exitRule(){this.matchedEOF?this._ctx._stop=this._input.LT(1):this._ctx._stop=this._input.tryLT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx._parent}enterOuterAlt(v,N){if(v.altNumber=N,this._buildParseTrees&&this._ctx!==v){let T=this._ctx._parent;T!=null&&(T.removeLastChild(),T.addChild(v))}this._ctx=v}get precedence(){return this._precedenceStack.isEmpty?-1:this._precedenceStack.peek()}enterRecursionRule(v,N,T,b){this.state=N,this._precedenceStack.push(b),this._ctx=v,this._ctx._start=this._input.LT(1),this.triggerEnterRuleEvent()}pushNewRecursionContext(v,N,T){let b=this._ctx;b._parent=v,b.invokingState=N,b._stop=this._input.tryLT(-1),this._ctx=v,this._ctx._start=b._start,this._buildParseTrees&&this._ctx.addChild(b),this.triggerEnterRuleEvent()}unrollRecursionContexts(v){this._precedenceStack.pop(),this._ctx._stop=this._input.tryLT(-1);let N=this._ctx;if(this._parseListeners.length>0)for(;this._ctx!==v;)this.triggerExitRuleEvent(),this._ctx=this._ctx._parent;else this._ctx=v;N._parent=v,this._buildParseTrees&&v!=null&&v.addChild(N)}getInvokingContext(v){let N=this._ctx;for(;N&&N.ruleIndex!==v;)N=N._parent;return N}get context(){return this._ctx}set context(v){this._ctx=v}precpred(v,N){return N>=this._precedenceStack.peek()}getErrorListenerDispatch(){return new f.ProxyParserErrorListener(this.getErrorListeners())}inContext(v){return!1}isExpectedToken(v){let N=this.interpreter.atn,T=this._ctx,b=N.states[this.state],O=N.nextTokens(b);if(O.contains(v))return!0;if(!O.contains(x.Token.EPSILON))return!1;for(;T!=null&&T.invokingState>=0&&O.contains(x.Token.EPSILON);){let k=N.states[T.invokingState].transition(0);if(O=N.nextTokens(k.followState),O.contains(v))return!0;T=T._parent}return!!(O.contains(x.Token.EPSILON)&&v===x.Token.EOF)}get isMatchedEOF(){return this.matchedEOF}getExpectedTokens(){return this.atn.getExpectedTokens(this.state,this.context)}getExpectedTokensWithinCurrentRule(){let v=this.interpreter.atn,N=v.states[this.state];return v.nextTokens(N)}getRuleIndex(v){let N=this.getRuleIndexMap().get(v);return N??-1}get ruleContext(){return this._ctx}getRuleInvocationStack(v=this._ctx){let N=v,T=this.ruleNames,b=[];for(;N!=null;){let O=N.ruleIndex;O<0?b.push("n/a"):b.push(T[O]),N=N._parent}return b}getDFAStrings(){let v=[];for(let N of this._interp.atn.decisionToDFA)v.push(N.toString(this.vocabulary,this.ruleNames));return v}dumpDFA(){let v=!1;for(let N of this._interp.atn.decisionToDFA)N.isEmpty||(v&&console.log(),console.log("Decision "+N.decision+":"),be.stdout.write(N.toString(this.vocabulary,this.ruleNames)),v=!0)}get sourceName(){return this._input.sourceName}get parseInfo(){return Promise.resolve().then(()=>fh()).then(v=>{let N=this.interpreter;if(N instanceof v.ProfilingATNSimulator)return new o.ParseInfo(N)})}setProfile(v){return c(this,void 0,void 0,function*(){let N=yield Promise.resolve().then(()=>fh()),T=this.interpreter;v?T instanceof N.ProfilingATNSimulator||(this.interpreter=new N.ProfilingATNSimulator(this)):T instanceof N.ProfilingATNSimulator&&(this.interpreter=new l.ParserATNSimulator(this.atn,this)),this.interpreter.setPredictionMode(T.getPredictionMode())})}set isTrace(v){v?(this._tracer?this.removeParseListener(this._tracer):this._tracer=new m(this.ruleNames,this._input),this.addParseListener(this._tracer)):this._tracer&&(this.removeParseListener(this._tracer),this._tracer=void 0)}get isTrace(){return this._tracer!=null}};return y.bypassAltsAtnCache=new Map,u([e.NotNull],y.prototype,"_errHandler",void 0),u([e.NotNull],y.prototype,"match",null),u([e.NotNull],y.prototype,"matchWildcard",null),u([e.NotNull],y.prototype,"getParseListeners",null),u([i(0,e.NotNull)],y.prototype,"addParseListener",null),u([e.NotNull],y.prototype,"getATNWithBypassAlts",null),u([e.NotNull,i(0,e.NotNull)],y.prototype,"errorHandler",null),u([e.Override],y.prototype,"inputStream",null),u([e.NotNull],y.prototype,"currentToken",null),u([i(0,e.NotNull)],y.prototype,"enterRule",null),u([e.Override,i(0,e.Nullable)],y.prototype,"precpred",null),u([e.Override],y.prototype,"getErrorListenerDispatch",null),u([e.NotNull],y.prototype,"getExpectedTokens",null),u([e.NotNull],y.prototype,"getExpectedTokensWithinCurrentRule",null),u([e.Override],y.prototype,"parseInfo",null),$e.Parser=y,$e}var ph;function ki(){if(ph)return Wr;ph=1;var u=Wr&&Wr.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Wr,"__esModule",{value:!0}),Wr.NoViableAltException=void 0;const i=di(),c=ar(),h=Q();let p=class extends c.RecognitionException{constructor(r,n,t,s,e,o){r instanceof i.Parser&&(n===void 0&&(n=r.inputStream),t===void 0&&(t=r.currentToken),s===void 0&&(s=r.currentToken),o===void 0&&(o=r.context)),super(r,n,o),this._deadEndConfigs=e,this._startToken=t,this.setOffendingToken(r,s)}get startToken(){return this._startToken}get deadEndConfigs(){return this._deadEndConfigs}};return u([h.NotNull],p.prototype,"_startToken",void 0),Wr.NoViableAltException=p,Wr}var dh;function Ks(){if(dh)return tt;dh=1;var u=tt&&tt.__decorate||function(l,f,d,g){var x=arguments.length,m=x<3?f:g===null?g=Object.getOwnPropertyDescriptor(f,d):g,y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(l,f,d,g);else for(var _=l.length-1;_>=0;_--)(y=l[_])&&(m=(x<3?y(m):x>3?y(f,d,m):y(f,d))||m);return x>3&&m&&Object.defineProperty(f,d,m),m},i=tt&&tt.__param||function(l,f){return function(d,g){f(d,g,l)}};Object.defineProperty(tt,"__esModule",{value:!0}),tt.DefaultErrorStrategy=void 0;const c=rt(),h=Ie(),p=Ii(),a=wi(),r=Vr(),n=ki(),t=Xe(),s=Ne(),e=Q();let o=class{constructor(){this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.nextTokensState=c.ATNState.INVALID_STATE_NUMBER}reset(f){this.endErrorCondition(f)}beginErrorCondition(f){this.errorRecoveryMode=!0}inErrorRecoveryMode(f){return this.errorRecoveryMode}endErrorCondition(f){this.errorRecoveryMode=!1,this.lastErrorStates=void 0,this.lastErrorIndex=-1}reportMatch(f){this.endErrorCondition(f)}reportError(f,d){this.inErrorRecoveryMode(f)||(this.beginErrorCondition(f),d instanceof n.NoViableAltException?this.reportNoViableAlternative(f,d):d instanceof a.InputMismatchException?this.reportInputMismatch(f,d):d instanceof p.FailedPredicateException?this.reportFailedPredicate(f,d):(console.error(`unknown recognition error type: ${d}`),this.notifyErrorListeners(f,d.toString(),d)))}notifyErrorListeners(f,d,g){let x=g.getOffendingToken(f);x===void 0&&(x=null),f.notifyErrorListeners(d,x,g)}recover(f,d){this.lastErrorIndex===f.inputStream.index&&this.lastErrorStates&&this.lastErrorStates.contains(f.state)&&f.consume(),this.lastErrorIndex=f.inputStream.index,this.lastErrorStates||(this.lastErrorStates=new r.IntervalSet),this.lastErrorStates.add(f.state);let g=this.getErrorRecoverySet(f);this.consumeUntil(f,g)}sync(f){let d=f.interpreter.atn.states[f.state];if(this.inErrorRecoveryMode(f))return;let x=f.inputStream.LA(1),m=f.atn.nextTokens(d);if(m.contains(x)){this.nextTokensContext=void 0,this.nextTokensState=c.ATNState.INVALID_STATE_NUMBER;return}if(m.contains(s.Token.EPSILON)){this.nextTokensContext===void 0&&(this.nextTokensContext=f.context,this.nextTokensState=f.state);return}switch(d.stateType){case h.ATNStateType.BLOCK_START:case h.ATNStateType.STAR_BLOCK_START:case h.ATNStateType.PLUS_BLOCK_START:case h.ATNStateType.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(f))return;throw new a.InputMismatchException(f);case h.ATNStateType.PLUS_LOOP_BACK:case h.ATNStateType.STAR_LOOP_BACK:this.reportUnwantedToken(f);let _=f.getExpectedTokens().or(this.getErrorRecoverySet(f));this.consumeUntil(f,_);break}}reportNoViableAlternative(f,d){let g=f.inputStream,x;g?d.startToken.type===s.Token.EOF?x="<EOF>":x=g.getTextFromRange(d.startToken,d.getOffendingToken()):x="<unknown input>";let m="no viable alternative at input "+this.escapeWSAndQuote(x);this.notifyErrorListeners(f,m,d)}reportInputMismatch(f,d){let g=d.expectedTokens,x=g?g.toStringVocabulary(f.vocabulary):"",m="mismatched input "+this.getTokenErrorDisplay(d.getOffendingToken(f))+" expecting "+x;this.notifyErrorListeners(f,m,d)}reportFailedPredicate(f,d){let x="rule "+f.ruleNames[f.context.ruleIndex]+" "+d.message;this.notifyErrorListeners(f,x,d)}reportUnwantedToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let d=f.currentToken,g=this.getTokenErrorDisplay(d),x=this.getExpectedTokens(f),m="extraneous input "+g+" expecting "+x.toStringVocabulary(f.vocabulary);f.notifyErrorListeners(m,d,void 0)}reportMissingToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let d=f.currentToken,x="missing "+this.getExpectedTokens(f).toStringVocabulary(f.vocabulary)+" at "+this.getTokenErrorDisplay(d);f.notifyErrorListeners(x,d,void 0)}recoverInline(f){let d=this.singleTokenDeletion(f);if(d)return f.consume(),d;if(this.singleTokenInsertion(f))return this.getMissingSymbol(f);throw this.nextTokensContext===void 0?new a.InputMismatchException(f):new a.InputMismatchException(f,this.nextTokensState,this.nextTokensContext)}singleTokenInsertion(f){let d=f.inputStream.LA(1),x=f.interpreter.atn.states[f.state].transition(0).target,m=f.interpreter.atn;return m.nextTokens(x,t.PredictionContext.fromRuleContext(m,f.context)).contains(d)?(this.reportMissingToken(f),!0):!1}singleTokenDeletion(f){let d=f.inputStream.LA(2);if(this.getExpectedTokens(f).contains(d)){this.reportUnwantedToken(f),f.consume();let x=f.currentToken;return this.reportMatch(f),x}}getMissingSymbol(f){let d=f.currentToken,g=this.getExpectedTokens(f),x=s.Token.INVALID_TYPE;g.isNil||(x=g.minElement);let m;x===s.Token.EOF?m="<missing EOF>":m="<missing "+f.vocabulary.getDisplayName(x)+">";let y=d,_=f.inputStream.tryLT(-1);return y.type===s.Token.EOF&&_!=null&&(y=_),this.constructToken(f.inputStream.tokenSource,x,m,y)}constructToken(f,d,g,x){let m=f.tokenFactory,y=x.tokenSource,_=y?y.inputStream:void 0;return m.create({source:f,stream:_},d,g,s.Token.DEFAULT_CHANNEL,-1,-1,x.line,x.charPositionInLine)}getExpectedTokens(f){return f.getExpectedTokens()}getTokenErrorDisplay(f){if(!f)return"<no token>";let d=this.getSymbolText(f);return d||(this.getSymbolType(f)===s.Token.EOF?d="<EOF>":d=`<${this.getSymbolType(f)}>`),this.escapeWSAndQuote(d)}getSymbolText(f){return f.text}getSymbolType(f){return f.type}escapeWSAndQuote(f){return f=f.replace(`
|
|
87
|
+
`,"\\n"),f=f.replace("\r","\\r"),f=f.replace(" ","\\t"),"'"+f+"'"}getErrorRecoverySet(f){let d=f.interpreter.atn,g=f.context,x=new r.IntervalSet;for(;g&&g.invokingState>=0;){let y=d.states[g.invokingState].transition(0),_=d.nextTokens(y.followState);x.addAll(_),g=g._parent}return x.remove(s.Token.EPSILON),x}consumeUntil(f,d){let g=f.inputStream.LA(1);for(;g!==s.Token.EOF&&!d.contains(g);)f.consume(),g=f.inputStream.LA(1)}};return u([e.Override],o.prototype,"reset",null),u([i(0,e.NotNull)],o.prototype,"beginErrorCondition",null),u([e.Override],o.prototype,"inErrorRecoveryMode",null),u([i(0,e.NotNull)],o.prototype,"endErrorCondition",null),u([e.Override],o.prototype,"reportMatch",null),u([e.Override],o.prototype,"reportError",null),u([i(0,e.NotNull)],o.prototype,"notifyErrorListeners",null),u([e.Override],o.prototype,"recover",null),u([e.Override],o.prototype,"sync",null),u([i(0,e.NotNull),i(1,e.NotNull)],o.prototype,"reportNoViableAlternative",null),u([i(0,e.NotNull),i(1,e.NotNull)],o.prototype,"reportInputMismatch",null),u([i(0,e.NotNull),i(1,e.NotNull)],o.prototype,"reportFailedPredicate",null),u([i(0,e.NotNull)],o.prototype,"reportUnwantedToken",null),u([i(0,e.NotNull)],o.prototype,"reportMissingToken",null),u([e.Override],o.prototype,"recoverInline",null),u([i(0,e.NotNull)],o.prototype,"singleTokenInsertion",null),u([i(0,e.NotNull)],o.prototype,"singleTokenDeletion",null),u([e.NotNull,i(0,e.NotNull)],o.prototype,"getMissingSymbol",null),u([e.NotNull,i(0,e.NotNull)],o.prototype,"getExpectedTokens",null),u([i(0,e.NotNull)],o.prototype,"getSymbolText",null),u([i(0,e.NotNull)],o.prototype,"getSymbolType",null),u([e.NotNull,i(0,e.NotNull)],o.prototype,"escapeWSAndQuote",null),u([e.NotNull,i(0,e.NotNull)],o.prototype,"getErrorRecoverySet",null),u([i(0,e.NotNull),i(1,e.NotNull)],o.prototype,"consumeUntil",null),tt.DefaultErrorStrategy=o,tt}var xh;function yh(){if(xh)return Ar;xh=1;var u=Ar&&Ar.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o};Object.defineProperty(Ar,"__esModule",{value:!0}),Ar.BailErrorStrategy=void 0;const i=Ks(),c=wi(),h=Q(),p=wf();let a=class extends i.DefaultErrorStrategy{recover(n,t){for(let s=n.context;s;s=s.parent)s.exception=t;throw new p.ParseCancellationException(t)}recoverInline(n){let t=new c.InputMismatchException(n);for(let s=n.context;s;s=s.parent)s.exception=t;throw new p.ParseCancellationException(t)}sync(n){}};return u([h.Override],a.prototype,"recover",null),u([h.Override],a.prototype,"recoverInline",null),u([h.Override],a.prototype,"sync",null),Ar.BailErrorStrategy=a,Ar}var Qs={},_h;function fd(){if(_h)return Qs;_h=1;return Object.defineProperty(Qs,"__esModule",{value:!0}),Qs}var Js={},mh;function hd(){return mh||(mh=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.Dependents=void 0,(function(i){i[i.SELF=0]="SELF",i[i.PARENTS=1]="PARENTS",i[i.CHILDREN=2]="CHILDREN",i[i.ANCESTORS=3]="ANCESTORS",i[i.DESCENDANTS=4]="DESCENDANTS",i[i.SIBLINGS=5]="SIBLINGS",i[i.PRECEEDING_SIBLINGS=6]="PRECEEDING_SIBLINGS",i[i.FOLLOWING_SIBLINGS=7]="FOLLOWING_SIBLINGS",i[i.PRECEEDING=8]="PRECEEDING",i[i.FOLLOWING=9]="FOLLOWING"})(u.Dependents||(u.Dependents={}))})(Js)),Js}var nr={},gh;function pd(){if(gh)return nr;gh=1;var u=nr&&nr.__decorate||function(r,n,t,s){var e=arguments.length,o=e<3?n:s===null?s=Object.getOwnPropertyDescriptor(n,t):s,l;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")o=Reflect.decorate(r,n,t,s);else for(var f=r.length-1;f>=0;f--)(l=r[f])&&(o=(e<3?l(o):e>3?l(n,t,o):l(n,t))||o);return e>3&&o&&Object.defineProperty(n,t,o),o},i=nr&&nr.__param||function(r,n){return function(t,s){n(t,s,r)}};Object.defineProperty(nr,"__esModule",{value:!0}),nr.DiagnosticErrorListener=void 0;const c=fr(),h=Q(),p=je();let a=class{constructor(n=!0){this.exactOnly=n,this.exactOnly=n}syntaxError(n,t,s,e,o,l){}reportAmbiguity(n,t,s,e,o,l,f){if(this.exactOnly&&!o)return;let d=this.getDecisionDescription(n,t),g=this.getConflictingAlts(l,f),x=n.inputStream.getText(p.Interval.of(s,e)),m=`reportAmbiguity d=${d}: ambigAlts=${g}, input='${x}'`;n.notifyErrorListeners(m)}reportAttemptingFullContext(n,t,s,e,o,l){let f=this.getDecisionDescription(n,t),d=n.inputStream.getText(p.Interval.of(s,e)),g=`reportAttemptingFullContext d=${f}, input='${d}'`;n.notifyErrorListeners(g)}reportContextSensitivity(n,t,s,e,o,l){let f=this.getDecisionDescription(n,t),d=n.inputStream.getText(p.Interval.of(s,e)),g=`reportContextSensitivity d=${f}, input='${d}'`;n.notifyErrorListeners(g)}getDecisionDescription(n,t){let s=t.decision,e=t.atnStartState.ruleIndex,o=n.ruleNames;if(e<0||e>=o.length)return s.toString();let l=o[e];return l?`${s} (${l})`:s.toString()}getConflictingAlts(n,t){if(n!=null)return n;let s=new c.BitSet;for(let e of t)s.set(e.alt);return s}};return u([h.Override],a.prototype,"syntaxError",null),u([h.Override,i(0,h.NotNull),i(1,h.NotNull),i(6,h.NotNull)],a.prototype,"reportAmbiguity",null),u([h.Override,i(0,h.NotNull),i(1,h.NotNull),i(5,h.NotNull)],a.prototype,"reportAttemptingFullContext",null),u([h.Override,i(0,h.NotNull),i(1,h.NotNull),i(5,h.NotNull)],a.prototype,"reportContextSensitivity",null),u([i(0,h.NotNull),i(1,h.NotNull)],a.prototype,"getDecisionDescription",null),u([h.NotNull,i(1,h.NotNull)],a.prototype,"getConflictingAlts",null),nr.DiagnosticErrorListener=a,nr}var ir={},vh;function dd(){if(vh)return ir;vh=1;var u=ir&&ir.__decorate||function(n,t,s,e){var o=arguments.length,l=o<3?t:e===null?e=Object.getOwnPropertyDescriptor(t,s):e,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(n,t,s,e);else for(var d=n.length-1;d>=0;d--)(f=n[d])&&(l=(o<3?f(l):o>3?f(t,s,l):f(t,s))||l);return o>3&&l&&Object.defineProperty(t,s,l),l},i=ir&&ir.__param||function(n,t){return function(s,e){t(s,e,n)}};Object.defineProperty(ir,"__esModule",{value:!0}),ir.LexerInterpreter=void 0;const c=hr(),h=Mi(),p=Q(),a=Q();let r=class extends c.Lexer{constructor(t,s,e,o,l,f,d){if(super(d),f.grammarType!==0)throw new Error("IllegalArgumentException: The ATN must be a lexer ATN.");this._grammarFileName=t,this._atn=f,this._ruleNames=e.slice(0),this._channelNames=o.slice(0),this._modeNames=l.slice(0),this._vocabulary=s,this._interp=new h.LexerATNSimulator(f,this)}get atn(){return this._atn}get grammarFileName(){return this._grammarFileName}get ruleNames(){return this._ruleNames}get channelNames(){return this._channelNames}get modeNames(){return this._modeNames}get vocabulary(){return this._vocabulary}};return u([p.NotNull],r.prototype,"_vocabulary",void 0),u([a.Override],r.prototype,"atn",null),u([a.Override],r.prototype,"grammarFileName",null),u([a.Override],r.prototype,"ruleNames",null),u([a.Override],r.prototype,"channelNames",null),u([a.Override],r.prototype,"modeNames",null),u([a.Override],r.prototype,"vocabulary",null),r=u([i(1,p.NotNull)],r),ir.LexerInterpreter=r,ir}var Zs={},Ah;function xd(){if(Ah)return Zs;Ah=1;return Object.defineProperty(Zs,"__esModule",{value:!0}),Zs}var Nn={},Th;function yd(){if(Th)return Nn;Th=1;var u=Nn&&Nn.__decorate||function(a,r,n,t){var s=arguments.length,e=s<3?r:t===null?t=Object.getOwnPropertyDescriptor(r,n):t,o;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")e=Reflect.decorate(a,r,n,t);else for(var l=a.length-1;l>=0;l--)(o=a[l])&&(e=(s<3?o(e):s>3?o(r,n,e):o(r,n))||e);return s>3&&e&&Object.defineProperty(r,n,e),e};Object.defineProperty(Nn,"__esModule",{value:!0}),Nn.RuleContextWithAltNum=void 0;const i=At(),c=Q(),h=Ke();let p=class extends h.ParserRuleContext{constructor(r,n){n!==void 0?super(r,n):super(),this._altNumber=i.ATN.INVALID_ALT_NUMBER}get altNumber(){return this._altNumber}set altNumber(r){this._altNumber=r}};return u([c.Override],p.prototype,"altNumber",null),Nn.RuleContextWithAltNum=p,Nn}var xi={},Eh;function _d(){if(Eh)return xi;Eh=1;Object.defineProperty(xi,"__esModule",{value:!0}),xi.RuleDependency=void 0;function u(i){return(c,h,p)=>{}}return xi.RuleDependency=u,xi}var yi={},Sh;function md(){if(Sh)return yi;Sh=1;Object.defineProperty(yi,"__esModule",{value:!0}),yi.RuleVersion=void 0;function u(i){return(c,h,p)=>{}}return yi.RuleVersion=u,yi}var Ys={},Nh;function gd(){if(Nh)return Ys;Nh=1;return Object.defineProperty(Ys,"__esModule",{value:!0}),Ys}var eu={},bh;function vd(){if(bh)return eu;bh=1;return Object.defineProperty(eu,"__esModule",{value:!0}),eu}var tu={},Ch;function Ad(){if(Ch)return tu;Ch=1;return Object.defineProperty(tu,"__esModule",{value:!0}),tu}var or={},Oh;function Td(){if(Oh)return or;Oh=1;var u=or&&or.__decorate||function(s,e,o,l){var f=arguments.length,d=f<3?e:l===null?l=Object.getOwnPropertyDescriptor(e,o):l,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(s,e,o,l);else for(var x=s.length-1;x>=0;x--)(g=s[x])&&(d=(f<3?g(d):f>3?g(e,o,d):g(e,o))||d);return f>3&&d&&Object.defineProperty(e,o,d),d};Object.defineProperty(or,"__esModule",{value:!0}),or.RewriteOperation=or.TokenStreamRewriter=void 0;const i=je(),c=Q(),h=Ne();let p=class We{constructor(e){this.tokens=e,this.programs=new Map,this.programs.set(We.DEFAULT_PROGRAM_NAME,[]),this.lastRewriteTokenIndexes=new Map}getTokenStream(){return this.tokens}rollback(e,o=We.DEFAULT_PROGRAM_NAME){let l=this.programs.get(o);l!=null&&this.programs.set(o,l.slice(We.MIN_TOKEN_INDEX,e))}deleteProgram(e=We.DEFAULT_PROGRAM_NAME){this.rollback(We.MIN_TOKEN_INDEX,e)}insertAfter(e,o,l=We.DEFAULT_PROGRAM_NAME){let f;typeof e=="number"?f=e:f=e.tokenIndex;let d=this.getProgram(l),g=new n(this.tokens,f,d.length,o);d.push(g)}insertBefore(e,o,l=We.DEFAULT_PROGRAM_NAME){let f;typeof e=="number"?f=e:f=e.tokenIndex;let d=this.getProgram(l),g=new r(this.tokens,f,d.length,o);d.push(g)}replaceSingle(e,o){typeof e=="number"?this.replace(e,e,o):this.replace(e,e,o)}replace(e,o,l,f=We.DEFAULT_PROGRAM_NAME){if(typeof e!="number"&&(e=e.tokenIndex),typeof o!="number"&&(o=o.tokenIndex),e>o||e<0||o<0||o>=this.tokens.size)throw new RangeError(`replace: range invalid: ${e}..${o}(size=${this.tokens.size})`);let d=this.getProgram(f),g=new t(this.tokens,e,o,d.length,l);d.push(g)}delete(e,o,l=We.DEFAULT_PROGRAM_NAME){o===void 0&&(o=e),typeof e=="number"?this.replace(e,o,"",l):this.replace(e,o,"",l)}getLastRewriteTokenIndex(e=We.DEFAULT_PROGRAM_NAME){let o=this.lastRewriteTokenIndexes.get(e);return o??-1}setLastRewriteTokenIndex(e,o){this.lastRewriteTokenIndexes.set(e,o)}getProgram(e){let o=this.programs.get(e);return o==null&&(o=this.initializeProgram(e)),o}initializeProgram(e){let o=[];return this.programs.set(e,o),o}getText(e,o=We.DEFAULT_PROGRAM_NAME){let l;e instanceof i.Interval?l=e:l=i.Interval.of(0,this.tokens.size-1),typeof e=="string"&&(o=e);let f=this.programs.get(o),d=l.a,g=l.b;if(g>this.tokens.size-1&&(g=this.tokens.size-1),d<0&&(d=0),f==null||f.length===0)return this.tokens.getText(l);let x=[],m=this.reduceToSingleOperationPerIndex(f),y=d;for(;y<=g&&y<this.tokens.size;){let _=m.get(y);m.delete(y);let v=this.tokens.get(y);_==null?(v.type!==h.Token.EOF&&x.push(String(v.text)),y++):y=_.execute(x)}if(g===this.tokens.size-1)for(let _ of m.values())_.index>=this.tokens.size-1&&x.push(_.text.toString());return x.join("")}reduceToSingleOperationPerIndex(e){for(let l=0;l<e.length;l++){let f=e[l];if(f==null||!(f instanceof t))continue;let d=f,g=this.getKindOfOps(e,r,l);for(let m of g)m.index===d.index?(e[m.instructionIndex]=void 0,d.text=m.text.toString()+(d.text!=null?d.text.toString():"")):m.index>d.index&&m.index<=d.lastIndex&&(e[m.instructionIndex]=void 0);let x=this.getKindOfOps(e,t,l);for(let m of x){if(m.index>=d.index&&m.lastIndex<=d.lastIndex){e[m.instructionIndex]=void 0;continue}let y=m.lastIndex<d.index||m.index>d.lastIndex;if(m.text==null&&d.text==null&&!y)e[m.instructionIndex]=void 0,d.index=Math.min(m.index,d.index),d.lastIndex=Math.max(m.lastIndex,d.lastIndex);else if(!y)throw new Error(`replace op boundaries of ${d} overlap with previous ${m}`)}}for(let l=0;l<e.length;l++){let f=e[l];if(f==null||!(f instanceof r))continue;let d=f,g=this.getKindOfOps(e,r,l);for(let m of g)m.index===d.index&&(m instanceof n?(d.text=this.catOpText(m.text,d.text),e[m.instructionIndex]=void 0):m instanceof r&&(d.text=this.catOpText(d.text,m.text),e[m.instructionIndex]=void 0));let x=this.getKindOfOps(e,t,l);for(let m of x){if(d.index===m.index){m.text=this.catOpText(d.text,m.text),e[l]=void 0;continue}if(d.index>=m.index&&d.index<=m.lastIndex)throw new Error(`insert op ${d} within boundaries of previous ${m}`)}}let o=new Map;for(let l of e)if(l!=null){if(o.get(l.index)!=null)throw new Error("should only be one op per index");o.set(l.index,l)}return o}catOpText(e,o){let l="",f="";return e!=null&&(l=e.toString()),o!=null&&(f=o.toString()),l+f}getKindOfOps(e,o,l){let f=[];for(let d=0;d<l&&d<e.length;d++){let g=e[d];g!=null&&g instanceof o&&f.push(g)}return f}};or.TokenStreamRewriter=p,p.DEFAULT_PROGRAM_NAME="default",p.PROGRAM_INIT_SIZE=100,p.MIN_TOKEN_INDEX=0;class a{constructor(e,o,l,f){this.tokens=e,this.instructionIndex=l,this.index=o,this.text=f===void 0?"":f}execute(e){return this.index}toString(){let e=this.constructor.name,o=e.indexOf("$");return e=e.substring(o+1,e.length),"<"+e+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}}u([c.Override],a.prototype,"toString",null),or.RewriteOperation=a;class r extends a{constructor(e,o,l,f){super(e,o,l,f)}execute(e){return e.push(this.text.toString()),this.tokens.get(this.index).type!==h.Token.EOF&&e.push(String(this.tokens.get(this.index).text)),this.index+1}}u([c.Override],r.prototype,"execute",null);class n extends r{constructor(e,o,l,f){super(e,o+1,l,f)}}class t extends a{constructor(e,o,l,f,d){super(e,o,f,d),this.lastIndex=l}execute(e){return this.text!=null&&e.push(this.text.toString()),this.lastIndex+1}toString(){return this.text==null?"<DeleteOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+">":"<ReplaceOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+':"'+this.text+'">'}}return u([c.Override],t.prototype,"execute",null),u([c.Override],t.prototype,"toString",null),or}var ru={},Rh;function Ed(){if(Rh)return ru;Rh=1;return Object.defineProperty(ru,"__esModule",{value:!0}),ru}var nu={},Ph;function Sd(){if(Ph)return nu;Ph=1;return Object.defineProperty(nu,"__esModule",{value:!0}),nu}var Dh;function Nd(){return Dh||(Dh=1,(function(u){var i=mr&&mr.__createBinding||(Object.create?(function(h,p,a,r){r===void 0&&(r=a),Object.defineProperty(h,r,{enumerable:!0,get:function(){return p[a]}})}):(function(h,p,a,r){r===void 0&&(r=a),h[r]=p[a]})),c=mr&&mr.__exportStar||function(h,p){for(var a in h)a!=="default"&&!Object.prototype.hasOwnProperty.call(p,a)&&i(p,h,a)};Object.defineProperty(u,"__esModule",{value:!0}),c(_p(),u),c(mp(),u),c(h0(),u),c(yh(),u),c(Cf(),u),c(fd(),u),c(Gs(),u),c(Tf(),u),c(Sf(),u),c(Vn(),u),c(Bs(),u),c(Xs(),u),c(Yl(),u),c(Ks(),u),c(hd(),u),c(pd(),u),c(Ii(),u),c(wi(),u),c(Ff(),u),c(ur(),u),c(hr(),u),c(dd(),u),c(ji(),u),c(Pf(),u),c(ki(),u),c(di(),u),c(xd(),u),c(jf(),u),c(Ke(),u),c(Ms(),u),c(gf(),u),c(ar(),u),c(Yn(),u),c(ef(),u),c(yd(),u),c(_d(),u),c(md(),u),c(Ne(),u),c(gd(),u),c(vd(),u),c(Ad(),u),c(Td(),u),c(Ed(),u),c(Mr(),u),c(Sd(),u)})(mr)),mr}var Ui=Nd(),Ih=Hs(),bd=hr(),Cd=Mi(),wh=Mr(),Lh=ut();class Be extends bd.Lexer{static T__0=1;static T__1=2;static T__2=3;static T__3=4;static T__4=5;static T__5=6;static T__6=7;static T__7=8;static T__8=9;static T__9=10;static T__10=11;static T__11=12;static T__12=13;static T__13=14;static T__14=15;static T__15=16;static T__16=17;static T__17=18;static T__18=19;static T__19=20;static T__20=21;static T__21=22;static T__22=23;static T__23=24;static T__24=25;static T__25=26;static T__26=27;static T__27=28;static T__28=29;static T__29=30;static T__30=31;static T__31=32;static QUESTION=33;static Identifier=34;static StringLiteral=35;static NumberLiteral=36;static BooleanLiteral=37;static SingleLineComment=38;static MultiLineComment=39;static WS=40;static channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"];static modeNames=["DEFAULT_MODE"];static ruleNames=["T__0","T__1","T__2","T__3","T__4","T__5","T__6","T__7","T__8","T__9","T__10","T__11","T__12","T__13","T__14","T__15","T__16","T__17","T__18","T__19","T__20","T__21","T__22","T__23","T__24","T__25","T__26","T__27","T__28","T__29","T__30","T__31","QUESTION","Identifier","StringLiteral","NumberLiteral","BooleanLiteral","SingleLineComment","MultiLineComment","WS"];static _LITERAL_NAMES=[void 0,"'type'","'='","';'","'let'","':'","'|'","'&'","'['","']'","'Array'","'string'","'boolean'","'null'","'integer'","'double'","'long'","'bytes'","'date'","'any'","'{'","'}'","'yorkie.Object'","'yorkie.Array'","'yorkie.Counter'","'yorkie.Text'","'yorkie.Tree'","'('","')'","'<'","','","'>'","'extends'","'?'"];static _SYMBOLIC_NAMES=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"QUESTION","Identifier","StringLiteral","NumberLiteral","BooleanLiteral","SingleLineComment","MultiLineComment","WS"];static VOCABULARY=new wh.VocabularyImpl(Be._LITERAL_NAMES,Be._SYMBOLIC_NAMES,[]);get vocabulary(){return Be.VOCABULARY}constructor(i){super(i),this._interp=new Cd.LexerATNSimulator(Be._ATN,this)}get grammarFileName(){return"YorkieSchema.g4"}get ruleNames(){return Be.ruleNames}get serializedATN(){return Be._serializedATN}get channelNames(){return Be.channelNames}get modeNames(){return Be.modeNames}static _serializedATN=`줝쪺֍꾺体؇쉁*ʼn\b \x07 \x07\b \b
|
|
555
88
|
|
|
556
89
|
\v \v\f \f\r \r \x1B \x1B ! !" "# #$ $% %& &' '( () )\x07\x07\b\b
|
|
557
90
|
|
|
@@ -568,7 +101,7 @@ $\f$$Ď\v$$$%%ē
|
|
|
568
101
|
\v\f\r\x1B!#%')+-/13\x1B579;= ?!A"C#E$G%I&K'M(O)Q*\bC\\aac|2;C\\aac|\f\f$$2;\f\f\v\f""ő\x07 \v\r\x1B!#%')+-/13579;=?ACEGIKMOQSX\x07Z \\\v\`\rbdfhjpw\x1B!#%'£)§+©-«/¹1Æ3Õ5á7í9ï;ñ=ó?õA÷CÿEāGĈIĒKħMĩOĴQŃST\x07vTU\x07{UV\x07rVW\x07gWXY\x07?YZ[\x07=[\b\\]\x07n]^\x07g^_\x07v_
|
|
569
102
|
\`a\x07<a\fbc\x07~cde\x07(efg\x07]ghi\x07_ijk\x07Ckl\x07tlm\x07tmn\x07cno\x07{opq\x07uqr\x07vrs\x07tst\x07ktu\x07puv\x07ivwx\x07dxy\x07qyz\x07qz{\x07n{|\x07g|}\x07c}~\x07p~\x07p\x07w\x07n\x07n
\x07k
\x07p\x07v\x07g\x07i\x07g\x07t\x07f\x07q\x07w\x07d\x07n\x07g \x07n\x07q\x07p\x07i"\x07d\x07{\x07v\x07g\x07u$\x07f \x07c ¡\x07v¡¢\x07g¢&£¤\x07c¤¥\x07p¥¦\x07{¦(§¨\x07}¨*©ª\x07ª,«¬\x07{¬\x07q®\x07t®¯\x07m¯°\x07k°±\x07g±²\x070²³\x07Q³´\x07d´µ\x07lµ¶\x07g¶·\x07e·¸\x07v¸.¹º\x07{º»\x07q»¼\x07t¼½\x07m½¾\x07k¾¿\x07g¿À\x070ÀÁ\x07CÁÂ\x07tÂÃ\x07tÃÄ\x07cÄÅ\x07{Å0ÆÇ\x07{ÇÈ\x07qÈÉ\x07tÉÊ\x07mÊË\x07kËÌ\x07gÌÍ\x070ÍÎ\x07EÎÏ\x07qÏÐ\x07wÐÑ\x07pÑÒ\x07vÒÓ\x07gÓÔ\x07tÔ2ÕÖ\x07{Ö×\x07qר\x07tØÙ\x07mÙÚ\x07kÚÛ\x07gÛÜ\x070ÜÝ\x07VÝÞ\x07gÞß\x07zßà\x07và4áâ\x07{âã\x07qãä\x07täå\x07måæ\x07kæç\x07gçè\x070èé\x07Véê\x07têë\x07gëì\x07gì6íî\x07*î8ïð\x07+ð:ñò\x07>ò<óô\x07.ô>õö\x07@ö@÷ø\x07gøù\x07zùú\x07vúû\x07gûü\x07püý\x07fýþ\x07uþBÿĀ\x07AĀDāą ĂĄ ăĂĄćąăąĆĆFćąĈČ\x07$ĉċ
|
|
570
103
|
ĊĉċĎČĊČččďĎČďĐ\x07$ĐHđē ĒđēĔĔĒĔĕĕĜĖĘ\x070ėę ĘėęĚĚĘĚěěĝĜĖĜĝĝJĞğ\x07vğĠ\x07tĠġ\x07wġĨ\x07gĢģ\x07hģĤ\x07cĤĥ\x07nĥĦ\x07uĦĨ\x07għĞħĢĨLĩĪ\x071Īī\x071īįĬĮ
|
|
571
|
-
ĭĬĮıįĭįİİIJıįIJij\b'ijNĴĵ\x071ĵĶ\x07,ĶĺķĹ\vĸķĹļĺĻĺĸĻĽļ弾\x07,ľĿ\x071ĿŀŀŁ\b(ŁPłń \x07ŃłńŅŅŃŅņņŇŇň\b)ňR\fąČĔĚĜħįĺŅ\b`),Y(le,"__ATN");let $i=le;var Od=Li(),gi=zi(),Rd=yi(),Pe=et(),Pd=ai(),De=pr(),su=Oe();const F=class F extends Rd.Parser{get vocabulary(){return F.VOCABULARY}get grammarFileName(){return"YorkieSchema.g4"}get ruleNames(){return F.ruleNames}get serializedATN(){return F._serializedATN}createFailedPredicateException(i,c){return new Od.FailedPredicateException(this,i,c)}constructor(i){super(i),this._interp=new Pd.ParserATNSimulator(F._ATN,this)}document(){let i=new Dd(this._ctx,this.state);this.enterRule(i,0,F.RULE_document);let c;try{this.enterOuterAlt(i,1);{for(this.state=47,this._errHandler.sync(this),c=this._input.LA(1);c===F.T__0||c===F.T__3;)this.state=44,this.declaration(),this.state=49,this._errHandler.sync(this),c=this._input.LA(1);this.state=50,this.match(F.EOF)}}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}declaration(){let i=new uu(this._ctx,this.state);this.enterRule(i,2,F.RULE_declaration);try{switch(this.state=54,this._errHandler.sync(this),this._input.LA(1)){case F.T__0:this.enterOuterAlt(i,1),this.state=52,this.typeAliasDeclaration();break;case F.T__3:this.enterOuterAlt(i,2),this.state=53,this.variableDeclaration();break;default:throw new gi.NoViableAltException(this)}}catch(c){if(c instanceof De.RecognitionException)i.exception=c,this._errHandler.reportError(this,c),this._errHandler.recover(this,c);else throw c}finally{this.exitRule()}return i}typeAliasDeclaration(){let i=new Bh(this._ctx,this.state);this.enterRule(i,4,F.RULE_typeAliasDeclaration);let c;try{this.enterOuterAlt(i,1),this.state=56,this.match(F.T__0),this.state=57,this.match(F.Identifier),this.state=59,this._errHandler.sync(this),c=this._input.LA(1),c===F.T__28&&(this.state=58,this.typeParameters()),this.state=61,this.match(F.T__1),this.state=62,this.type(),this.state=63,this.match(F.T__2)}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}variableDeclaration(){let i=new jh(this._ctx,this.state);this.enterRule(i,6,F.RULE_variableDeclaration);let c;try{this.enterOuterAlt(i,1),this.state=65,this.match(F.T__3),this.state=66,this.match(F.Identifier),this.state=68,this._errHandler.sync(this),c=this._input.LA(1),c===F.T__4&&(this.state=67,this.typeAnnotation()),this.state=72,this._errHandler.sync(this),c=this._input.LA(1),c===F.T__1&&(this.state=70,this.match(F.T__1),this.state=71,this.expression()),this.state=74,this.match(F.T__2)}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}typeAnnotation(){let i=new au(this._ctx,this.state);this.enterRule(i,8,F.RULE_typeAnnotation);try{this.enterOuterAlt(i,1),this.state=76,this.match(F.T__4),this.state=77,this.type()}catch(c){if(c instanceof De.RecognitionException)i.exception=c,this._errHandler.reportError(this,c),this._errHandler.recover(this,c);else throw c}finally{this.exitRule()}return i}type(){let i=new Rn(this._ctx,this.state);this.enterRule(i,10,F.RULE_type);try{this.enterOuterAlt(i,1),this.state=79,this.unionType()}catch(c){if(c instanceof De.RecognitionException)i.exception=c,this._errHandler.reportError(this,c),this._errHandler.recover(this,c);else throw c}finally{this.exitRule()}return i}unionType(){let i=new Mh(this._ctx,this.state);this.enterRule(i,12,F.RULE_unionType);let c;try{for(this.enterOuterAlt(i,1),this.state=81,this.intersectionType(),this.state=86,this._errHandler.sync(this),c=this._input.LA(1);c===F.T__5;)this.state=82,this.match(F.T__5),this.state=83,this.intersectionType(),this.state=88,this._errHandler.sync(this),c=this._input.LA(1)}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}intersectionType(){let i=new lu(this._ctx,this.state);this.enterRule(i,14,F.RULE_intersectionType);let c;try{for(this.enterOuterAlt(i,1),this.state=89,this.arrayType(),this.state=94,this._errHandler.sync(this),c=this._input.LA(1);c===F.T__6;)this.state=90,this.match(F.T__6),this.state=91,this.arrayType(),this.state=96,this._errHandler.sync(this),c=this._input.LA(1)}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}arrayType(){let i=new cu(this._ctx,this.state);this.enterRule(i,16,F.RULE_arrayType);let c;try{switch(this.state=107,this._errHandler.sync(this),this._input.LA(1)){case F.T__10:case F.T__11:case F.T__12:case F.T__13:case F.T__14:case F.T__15:case F.T__16:case F.T__17:case F.T__18:case F.T__19:case F.T__21:case F.T__22:case F.T__23:case F.T__24:case F.T__25:case F.T__26:case F.Identifier:case F.StringLiteral:case F.NumberLiteral:case F.BooleanLiteral:for(this.enterOuterAlt(i,1),this.state=97,this.primaryType(),this.state=102,this._errHandler.sync(this),c=this._input.LA(1);c===F.T__7;)this.state=98,this.match(F.T__7),this.state=99,this.match(F.T__8),this.state=104,this._errHandler.sync(this),c=this._input.LA(1);break;case F.T__9:this.enterOuterAlt(i,2),this.state=105,this.match(F.T__9),this.state=106,this.typeArguments();break;default:throw new gi.NoViableAltException(this)}}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}primaryType(){let i=new qh(this._ctx,this.state);this.enterRule(i,18,F.RULE_primaryType);try{switch(this.state=115,this._errHandler.sync(this),this._input.LA(1)){case F.T__26:this.enterOuterAlt(i,1),this.state=109,this.parenthesizedType();break;case F.T__10:case F.T__11:case F.T__12:case F.T__13:case F.T__14:case F.T__15:case F.T__16:case F.T__17:case F.T__18:this.enterOuterAlt(i,2),this.state=110,this.primitiveType();break;case F.T__19:this.enterOuterAlt(i,3),this.state=111,this.objectType();break;case F.T__21:case F.T__22:case F.T__23:case F.T__24:case F.T__25:this.enterOuterAlt(i,4),this.state=112,this.yorkieType();break;case F.Identifier:this.enterOuterAlt(i,5),this.state=113,this.typeReference();break;case F.StringLiteral:case F.NumberLiteral:case F.BooleanLiteral:this.enterOuterAlt(i,6),this.state=114,this.literal();break;default:throw new gi.NoViableAltException(this)}}catch(c){if(c instanceof De.RecognitionException)i.exception=c,this._errHandler.reportError(this,c),this._errHandler.recover(this,c);else throw c}finally{this.exitRule()}return i}primitiveType(){let i=new kh(this._ctx,this.state);this.enterRule(i,20,F.RULE_primitiveType);let c;try{this.enterOuterAlt(i,1),this.state=117,c=this._input.LA(1),(c&-32)===0&&(1<<c&(1<<F.T__10|1<<F.T__11|1<<F.T__12|1<<F.T__13|1<<F.T__14|1<<F.T__15|1<<F.T__16|1<<F.T__17|1<<F.T__18))!==0?(this._input.LA(1)===su.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}objectType(){let i=new Uh(this._ctx,this.state);this.enterRule(i,22,F.RULE_objectType);let c;try{this.enterOuterAlt(i,1);{for(this.state=119,this.match(F.T__19),this.state=123,this._errHandler.sync(this),c=this._input.LA(1);c===F.Identifier||c===F.StringLiteral;)this.state=120,this.propertySignature(),this.state=125,this._errHandler.sync(this),c=this._input.LA(1);this.state=126,this.match(F.T__20)}}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}propertySignature(){let i=new fu(this._ctx,this.state);this.enterRule(i,24,F.RULE_propertySignature);let c;try{this.enterOuterAlt(i,1),this.state=128,this.propertyName(),this.state=130,this._errHandler.sync(this),c=this._input.LA(1),c===F.QUESTION&&(this.state=129,this.match(F.QUESTION)),this.state=132,this.typeAnnotation(),this.state=133,this.match(F.T__2)}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}propertyName(){let i=new zh(this._ctx,this.state);this.enterRule(i,26,F.RULE_propertyName);let c;try{this.enterOuterAlt(i,1),this.state=135,c=this._input.LA(1),c===F.Identifier||c===F.StringLiteral?(this._input.LA(1)===su.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}yorkieType(){let i=new Hh(this._ctx,this.state);this.enterRule(i,28,F.RULE_yorkieType);let c;try{switch(this.state=153,this._errHandler.sync(this),this._input.LA(1)){case F.T__21:this.enterOuterAlt(i,1),this.state=137,this.match(F.T__21),this.state=138,this.typeArguments();break;case F.T__22:this.enterOuterAlt(i,2),this.state=139,this.match(F.T__22),this.state=140,this.typeArguments();break;case F.T__23:this.enterOuterAlt(i,3),this.state=141,this.match(F.T__23),this.state=143,this._errHandler.sync(this),c=this._input.LA(1),c===F.T__28&&(this.state=142,this.typeArguments());break;case F.T__24:this.enterOuterAlt(i,4),this.state=145,this.match(F.T__24),this.state=147,this._errHandler.sync(this),c=this._input.LA(1),c===F.T__28&&(this.state=146,this.typeArguments());break;case F.T__25:this.enterOuterAlt(i,5),this.state=149,this.match(F.T__25),this.state=151,this._errHandler.sync(this),c=this._input.LA(1),c===F.T__28&&(this.state=150,this.typeArguments());break;default:throw new gi.NoViableAltException(this)}}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}typeReference(){let i=new $h(this._ctx,this.state);this.enterRule(i,30,F.RULE_typeReference);let c;try{this.enterOuterAlt(i,1),this.state=155,this.match(F.Identifier),this.state=157,this._errHandler.sync(this),c=this._input.LA(1),c===F.T__28&&(this.state=156,this.typeArguments())}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}parenthesizedType(){let i=new Vh(this._ctx,this.state);this.enterRule(i,32,F.RULE_parenthesizedType);try{this.enterOuterAlt(i,1),this.state=159,this.match(F.T__26),this.state=160,this.type(),this.state=161,this.match(F.T__27)}catch(c){if(c instanceof De.RecognitionException)i.exception=c,this._errHandler.reportError(this,c),this._errHandler.recover(this,c);else throw c}finally{this.exitRule()}return i}typeParameters(){let i=new Wh(this._ctx,this.state);this.enterRule(i,34,F.RULE_typeParameters);let c;try{this.enterOuterAlt(i,1);{for(this.state=163,this.match(F.T__28),this.state=164,this.typeParameter(),this.state=169,this._errHandler.sync(this),c=this._input.LA(1);c===F.T__29;)this.state=165,this.match(F.T__29),this.state=166,this.typeParameter(),this.state=171,this._errHandler.sync(this),c=this._input.LA(1);this.state=172,this.match(F.T__30)}}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}typeParameter(){let i=new hu(this._ctx,this.state);this.enterRule(i,36,F.RULE_typeParameter);let c;try{this.enterOuterAlt(i,1),this.state=174,this.match(F.Identifier),this.state=177,this._errHandler.sync(this),c=this._input.LA(1),c===F.T__31&&(this.state=175,this.match(F.T__31),this.state=176,this.type())}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}typeArguments(){let i=new Vi(this._ctx,this.state);this.enterRule(i,38,F.RULE_typeArguments);let c;try{this.enterOuterAlt(i,1);{for(this.state=179,this.match(F.T__28),this.state=180,this.type(),this.state=185,this._errHandler.sync(this),c=this._input.LA(1);c===F.T__29;)this.state=181,this.match(F.T__29),this.state=182,this.type(),this.state=187,this._errHandler.sync(this),c=this._input.LA(1);this.state=188,this.match(F.T__30)}}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}expression(){let i=new Gh(this._ctx,this.state);this.enterRule(i,40,F.RULE_expression);try{switch(this.state=192,this._errHandler.sync(this),this._input.LA(1)){case F.Identifier:this.enterOuterAlt(i,1),this.state=190,this.match(F.Identifier);break;case F.StringLiteral:case F.NumberLiteral:case F.BooleanLiteral:this.enterOuterAlt(i,2),this.state=191,this.literal();break;default:throw new gi.NoViableAltException(this)}}catch(c){if(c instanceof De.RecognitionException)i.exception=c,this._errHandler.reportError(this,c),this._errHandler.recover(this,c);else throw c}finally{this.exitRule()}return i}literal(){let i=new pu(this._ctx,this.state);this.enterRule(i,42,F.RULE_literal);let c;try{this.enterOuterAlt(i,1),this.state=194,c=this._input.LA(1),(c-35&-32)===0&&(1<<c-35&(1<<F.StringLiteral-35|1<<F.NumberLiteral-35|1<<F.BooleanLiteral-35))!==0?(this._input.LA(1)===su.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(h){if(h instanceof De.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}static get _ATN(){return F.__ATN||(F.__ATN=new wh.ATNDeserializer().deserialize(Fh.toCharArray(F._serializedATN))),F.__ATN}};Y(F,"T__0",1),Y(F,"T__1",2),Y(F,"T__2",3),Y(F,"T__3",4),Y(F,"T__4",5),Y(F,"T__5",6),Y(F,"T__6",7),Y(F,"T__7",8),Y(F,"T__8",9),Y(F,"T__9",10),Y(F,"T__10",11),Y(F,"T__11",12),Y(F,"T__12",13),Y(F,"T__13",14),Y(F,"T__14",15),Y(F,"T__15",16),Y(F,"T__16",17),Y(F,"T__17",18),Y(F,"T__18",19),Y(F,"T__19",20),Y(F,"T__20",21),Y(F,"T__21",22),Y(F,"T__22",23),Y(F,"T__23",24),Y(F,"T__24",25),Y(F,"T__25",26),Y(F,"T__26",27),Y(F,"T__27",28),Y(F,"T__28",29),Y(F,"T__29",30),Y(F,"T__30",31),Y(F,"T__31",32),Y(F,"QUESTION",33),Y(F,"Identifier",34),Y(F,"StringLiteral",35),Y(F,"NumberLiteral",36),Y(F,"BooleanLiteral",37),Y(F,"SingleLineComment",38),Y(F,"MultiLineComment",39),Y(F,"WS",40),Y(F,"RULE_document",0),Y(F,"RULE_declaration",1),Y(F,"RULE_typeAliasDeclaration",2),Y(F,"RULE_variableDeclaration",3),Y(F,"RULE_typeAnnotation",4),Y(F,"RULE_type",5),Y(F,"RULE_unionType",6),Y(F,"RULE_intersectionType",7),Y(F,"RULE_arrayType",8),Y(F,"RULE_primaryType",9),Y(F,"RULE_primitiveType",10),Y(F,"RULE_objectType",11),Y(F,"RULE_propertySignature",12),Y(F,"RULE_propertyName",13),Y(F,"RULE_yorkieType",14),Y(F,"RULE_typeReference",15),Y(F,"RULE_parenthesizedType",16),Y(F,"RULE_typeParameters",17),Y(F,"RULE_typeParameter",18),Y(F,"RULE_typeArguments",19),Y(F,"RULE_expression",20),Y(F,"RULE_literal",21),Y(F,"ruleNames",["document","declaration","typeAliasDeclaration","variableDeclaration","typeAnnotation","type","unionType","intersectionType","arrayType","primaryType","primitiveType","objectType","propertySignature","propertyName","yorkieType","typeReference","parenthesizedType","typeParameters","typeParameter","typeArguments","expression","literal"]),Y(F,"_LITERAL_NAMES",[void 0,"'type'","'='","';'","'let'","':'","'|'","'&'","'['","']'","'Array'","'string'","'boolean'","'null'","'integer'","'double'","'long'","'bytes'","'date'","'any'","'{'","'}'","'yorkie.Object'","'yorkie.Array'","'yorkie.Counter'","'yorkie.Text'","'yorkie.Tree'","'('","')'","'<'","','","'>'","'extends'","'?'"]),Y(F,"_SYMBOLIC_NAMES",[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"QUESTION","Identifier","StringLiteral","NumberLiteral","BooleanLiteral","SingleLineComment","MultiLineComment","WS"]),Y(F,"VOCABULARY",new Lh.VocabularyImpl(F._LITERAL_NAMES,F._SYMBOLIC_NAMES,[])),Y(F,"_serializedATN",`줝쪺֍꾺体؇쉁*Ç \x07 \x07\b \b
|
|
104
|
+
ĭĬĮıįĭįİİIJıįIJij\b'ijNĴĵ\x071ĵĶ\x07,ĶĺķĹ\vĸķĹļĺĻĺĸĻĽļ弾\x07,ľĿ\x071ĿŀŀŁ\b(ŁPłń \x07ŃłńŅŅŃŅņņŇŇň\b)ňR\fąČĔĚĜħįĺŅ\b`;static __ATN;static get _ATN(){return Be.__ATN||(Be.__ATN=new Ih.ATNDeserializer().deserialize(Lh.toCharArray(Be._serializedATN))),Be.__ATN}}var Od=Ii(),_i=ki(),Rd=di(),Ce=Ke(),Pd=si(),Oe=ar(),iu=Ne();class j extends Rd.Parser{static T__0=1;static T__1=2;static T__2=3;static T__3=4;static T__4=5;static T__5=6;static T__6=7;static T__7=8;static T__8=9;static T__9=10;static T__10=11;static T__11=12;static T__12=13;static T__13=14;static T__14=15;static T__15=16;static T__16=17;static T__17=18;static T__18=19;static T__19=20;static T__20=21;static T__21=22;static T__22=23;static T__23=24;static T__24=25;static T__25=26;static T__26=27;static T__27=28;static T__28=29;static T__29=30;static T__30=31;static T__31=32;static QUESTION=33;static Identifier=34;static StringLiteral=35;static NumberLiteral=36;static BooleanLiteral=37;static SingleLineComment=38;static MultiLineComment=39;static WS=40;static RULE_document=0;static RULE_declaration=1;static RULE_typeAliasDeclaration=2;static RULE_variableDeclaration=3;static RULE_typeAnnotation=4;static RULE_type=5;static RULE_unionType=6;static RULE_intersectionType=7;static RULE_arrayType=8;static RULE_primaryType=9;static RULE_primitiveType=10;static RULE_objectType=11;static RULE_propertySignature=12;static RULE_propertyName=13;static RULE_yorkieType=14;static RULE_typeReference=15;static RULE_parenthesizedType=16;static RULE_typeParameters=17;static RULE_typeParameter=18;static RULE_typeArguments=19;static RULE_expression=20;static RULE_literal=21;static ruleNames=["document","declaration","typeAliasDeclaration","variableDeclaration","typeAnnotation","type","unionType","intersectionType","arrayType","primaryType","primitiveType","objectType","propertySignature","propertyName","yorkieType","typeReference","parenthesizedType","typeParameters","typeParameter","typeArguments","expression","literal"];static _LITERAL_NAMES=[void 0,"'type'","'='","';'","'let'","':'","'|'","'&'","'['","']'","'Array'","'string'","'boolean'","'null'","'integer'","'double'","'long'","'bytes'","'date'","'any'","'{'","'}'","'yorkie.Object'","'yorkie.Array'","'yorkie.Counter'","'yorkie.Text'","'yorkie.Tree'","'('","')'","'<'","','","'>'","'extends'","'?'"];static _SYMBOLIC_NAMES=[void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"QUESTION","Identifier","StringLiteral","NumberLiteral","BooleanLiteral","SingleLineComment","MultiLineComment","WS"];static VOCABULARY=new wh.VocabularyImpl(j._LITERAL_NAMES,j._SYMBOLIC_NAMES,[]);get vocabulary(){return j.VOCABULARY}get grammarFileName(){return"YorkieSchema.g4"}get ruleNames(){return j.ruleNames}get serializedATN(){return j._serializedATN}createFailedPredicateException(i,c){return new Od.FailedPredicateException(this,i,c)}constructor(i){super(i),this._interp=new Pd.ParserATNSimulator(j._ATN,this)}document(){let i=new Dd(this._ctx,this.state);this.enterRule(i,0,j.RULE_document);let c;try{this.enterOuterAlt(i,1);{for(this.state=47,this._errHandler.sync(this),c=this._input.LA(1);c===j.T__0||c===j.T__3;)this.state=44,this.declaration(),this.state=49,this._errHandler.sync(this),c=this._input.LA(1);this.state=50,this.match(j.EOF)}}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}declaration(){let i=new ou(this._ctx,this.state);this.enterRule(i,2,j.RULE_declaration);try{switch(this.state=54,this._errHandler.sync(this),this._input.LA(1)){case j.T__0:this.enterOuterAlt(i,1),this.state=52,this.typeAliasDeclaration();break;case j.T__3:this.enterOuterAlt(i,2),this.state=53,this.variableDeclaration();break;default:throw new _i.NoViableAltException(this)}}catch(c){if(c instanceof Oe.RecognitionException)i.exception=c,this._errHandler.reportError(this,c),this._errHandler.recover(this,c);else throw c}finally{this.exitRule()}return i}typeAliasDeclaration(){let i=new Fh(this._ctx,this.state);this.enterRule(i,4,j.RULE_typeAliasDeclaration);let c;try{this.enterOuterAlt(i,1),this.state=56,this.match(j.T__0),this.state=57,this.match(j.Identifier),this.state=59,this._errHandler.sync(this),c=this._input.LA(1),c===j.T__28&&(this.state=58,this.typeParameters()),this.state=61,this.match(j.T__1),this.state=62,this.type(),this.state=63,this.match(j.T__2)}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}variableDeclaration(){let i=new Bh(this._ctx,this.state);this.enterRule(i,6,j.RULE_variableDeclaration);let c;try{this.enterOuterAlt(i,1),this.state=65,this.match(j.T__3),this.state=66,this.match(j.Identifier),this.state=68,this._errHandler.sync(this),c=this._input.LA(1),c===j.T__4&&(this.state=67,this.typeAnnotation()),this.state=72,this._errHandler.sync(this),c=this._input.LA(1),c===j.T__1&&(this.state=70,this.match(j.T__1),this.state=71,this.expression()),this.state=74,this.match(j.T__2)}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}typeAnnotation(){let i=new su(this._ctx,this.state);this.enterRule(i,8,j.RULE_typeAnnotation);try{this.enterOuterAlt(i,1),this.state=76,this.match(j.T__4),this.state=77,this.type()}catch(c){if(c instanceof Oe.RecognitionException)i.exception=c,this._errHandler.reportError(this,c),this._errHandler.recover(this,c);else throw c}finally{this.exitRule()}return i}type(){let i=new bn(this._ctx,this.state);this.enterRule(i,10,j.RULE_type);try{this.enterOuterAlt(i,1),this.state=79,this.unionType()}catch(c){if(c instanceof Oe.RecognitionException)i.exception=c,this._errHandler.reportError(this,c),this._errHandler.recover(this,c);else throw c}finally{this.exitRule()}return i}unionType(){let i=new jh(this._ctx,this.state);this.enterRule(i,12,j.RULE_unionType);let c;try{for(this.enterOuterAlt(i,1),this.state=81,this.intersectionType(),this.state=86,this._errHandler.sync(this),c=this._input.LA(1);c===j.T__5;)this.state=82,this.match(j.T__5),this.state=83,this.intersectionType(),this.state=88,this._errHandler.sync(this),c=this._input.LA(1)}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}intersectionType(){let i=new uu(this._ctx,this.state);this.enterRule(i,14,j.RULE_intersectionType);let c;try{for(this.enterOuterAlt(i,1),this.state=89,this.arrayType(),this.state=94,this._errHandler.sync(this),c=this._input.LA(1);c===j.T__6;)this.state=90,this.match(j.T__6),this.state=91,this.arrayType(),this.state=96,this._errHandler.sync(this),c=this._input.LA(1)}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}arrayType(){let i=new au(this._ctx,this.state);this.enterRule(i,16,j.RULE_arrayType);let c;try{switch(this.state=107,this._errHandler.sync(this),this._input.LA(1)){case j.T__10:case j.T__11:case j.T__12:case j.T__13:case j.T__14:case j.T__15:case j.T__16:case j.T__17:case j.T__18:case j.T__19:case j.T__21:case j.T__22:case j.T__23:case j.T__24:case j.T__25:case j.T__26:case j.Identifier:case j.StringLiteral:case j.NumberLiteral:case j.BooleanLiteral:for(this.enterOuterAlt(i,1),this.state=97,this.primaryType(),this.state=102,this._errHandler.sync(this),c=this._input.LA(1);c===j.T__7;)this.state=98,this.match(j.T__7),this.state=99,this.match(j.T__8),this.state=104,this._errHandler.sync(this),c=this._input.LA(1);break;case j.T__9:this.enterOuterAlt(i,2),this.state=105,this.match(j.T__9),this.state=106,this.typeArguments();break;default:throw new _i.NoViableAltException(this)}}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}primaryType(){let i=new Mh(this._ctx,this.state);this.enterRule(i,18,j.RULE_primaryType);try{switch(this.state=115,this._errHandler.sync(this),this._input.LA(1)){case j.T__26:this.enterOuterAlt(i,1),this.state=109,this.parenthesizedType();break;case j.T__10:case j.T__11:case j.T__12:case j.T__13:case j.T__14:case j.T__15:case j.T__16:case j.T__17:case j.T__18:this.enterOuterAlt(i,2),this.state=110,this.primitiveType();break;case j.T__19:this.enterOuterAlt(i,3),this.state=111,this.objectType();break;case j.T__21:case j.T__22:case j.T__23:case j.T__24:case j.T__25:this.enterOuterAlt(i,4),this.state=112,this.yorkieType();break;case j.Identifier:this.enterOuterAlt(i,5),this.state=113,this.typeReference();break;case j.StringLiteral:case j.NumberLiteral:case j.BooleanLiteral:this.enterOuterAlt(i,6),this.state=114,this.literal();break;default:throw new _i.NoViableAltException(this)}}catch(c){if(c instanceof Oe.RecognitionException)i.exception=c,this._errHandler.reportError(this,c),this._errHandler.recover(this,c);else throw c}finally{this.exitRule()}return i}primitiveType(){let i=new qh(this._ctx,this.state);this.enterRule(i,20,j.RULE_primitiveType);let c;try{this.enterOuterAlt(i,1),this.state=117,c=this._input.LA(1),(c&-32)===0&&(1<<c&(1<<j.T__10|1<<j.T__11|1<<j.T__12|1<<j.T__13|1<<j.T__14|1<<j.T__15|1<<j.T__16|1<<j.T__17|1<<j.T__18))!==0?(this._input.LA(1)===iu.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}objectType(){let i=new kh(this._ctx,this.state);this.enterRule(i,22,j.RULE_objectType);let c;try{this.enterOuterAlt(i,1);{for(this.state=119,this.match(j.T__19),this.state=123,this._errHandler.sync(this),c=this._input.LA(1);c===j.Identifier||c===j.StringLiteral;)this.state=120,this.propertySignature(),this.state=125,this._errHandler.sync(this),c=this._input.LA(1);this.state=126,this.match(j.T__20)}}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}propertySignature(){let i=new lu(this._ctx,this.state);this.enterRule(i,24,j.RULE_propertySignature);let c;try{this.enterOuterAlt(i,1),this.state=128,this.propertyName(),this.state=130,this._errHandler.sync(this),c=this._input.LA(1),c===j.QUESTION&&(this.state=129,this.match(j.QUESTION)),this.state=132,this.typeAnnotation(),this.state=133,this.match(j.T__2)}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}propertyName(){let i=new Uh(this._ctx,this.state);this.enterRule(i,26,j.RULE_propertyName);let c;try{this.enterOuterAlt(i,1),this.state=135,c=this._input.LA(1),c===j.Identifier||c===j.StringLiteral?(this._input.LA(1)===iu.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}yorkieType(){let i=new zh(this._ctx,this.state);this.enterRule(i,28,j.RULE_yorkieType);let c;try{switch(this.state=153,this._errHandler.sync(this),this._input.LA(1)){case j.T__21:this.enterOuterAlt(i,1),this.state=137,this.match(j.T__21),this.state=138,this.typeArguments();break;case j.T__22:this.enterOuterAlt(i,2),this.state=139,this.match(j.T__22),this.state=140,this.typeArguments();break;case j.T__23:this.enterOuterAlt(i,3),this.state=141,this.match(j.T__23),this.state=143,this._errHandler.sync(this),c=this._input.LA(1),c===j.T__28&&(this.state=142,this.typeArguments());break;case j.T__24:this.enterOuterAlt(i,4),this.state=145,this.match(j.T__24),this.state=147,this._errHandler.sync(this),c=this._input.LA(1),c===j.T__28&&(this.state=146,this.typeArguments());break;case j.T__25:this.enterOuterAlt(i,5),this.state=149,this.match(j.T__25),this.state=151,this._errHandler.sync(this),c=this._input.LA(1),c===j.T__28&&(this.state=150,this.typeArguments());break;default:throw new _i.NoViableAltException(this)}}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}typeReference(){let i=new Hh(this._ctx,this.state);this.enterRule(i,30,j.RULE_typeReference);let c;try{this.enterOuterAlt(i,1),this.state=155,this.match(j.Identifier),this.state=157,this._errHandler.sync(this),c=this._input.LA(1),c===j.T__28&&(this.state=156,this.typeArguments())}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}parenthesizedType(){let i=new Vh(this._ctx,this.state);this.enterRule(i,32,j.RULE_parenthesizedType);try{this.enterOuterAlt(i,1),this.state=159,this.match(j.T__26),this.state=160,this.type(),this.state=161,this.match(j.T__27)}catch(c){if(c instanceof Oe.RecognitionException)i.exception=c,this._errHandler.reportError(this,c),this._errHandler.recover(this,c);else throw c}finally{this.exitRule()}return i}typeParameters(){let i=new Wh(this._ctx,this.state);this.enterRule(i,34,j.RULE_typeParameters);let c;try{this.enterOuterAlt(i,1);{for(this.state=163,this.match(j.T__28),this.state=164,this.typeParameter(),this.state=169,this._errHandler.sync(this),c=this._input.LA(1);c===j.T__29;)this.state=165,this.match(j.T__29),this.state=166,this.typeParameter(),this.state=171,this._errHandler.sync(this),c=this._input.LA(1);this.state=172,this.match(j.T__30)}}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}typeParameter(){let i=new cu(this._ctx,this.state);this.enterRule(i,36,j.RULE_typeParameter);let c;try{this.enterOuterAlt(i,1),this.state=174,this.match(j.Identifier),this.state=177,this._errHandler.sync(this),c=this._input.LA(1),c===j.T__31&&(this.state=175,this.match(j.T__31),this.state=176,this.type())}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}typeArguments(){let i=new zi(this._ctx,this.state);this.enterRule(i,38,j.RULE_typeArguments);let c;try{this.enterOuterAlt(i,1);{for(this.state=179,this.match(j.T__28),this.state=180,this.type(),this.state=185,this._errHandler.sync(this),c=this._input.LA(1);c===j.T__29;)this.state=181,this.match(j.T__29),this.state=182,this.type(),this.state=187,this._errHandler.sync(this),c=this._input.LA(1);this.state=188,this.match(j.T__30)}}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}expression(){let i=new Gh(this._ctx,this.state);this.enterRule(i,40,j.RULE_expression);try{switch(this.state=192,this._errHandler.sync(this),this._input.LA(1)){case j.Identifier:this.enterOuterAlt(i,1),this.state=190,this.match(j.Identifier);break;case j.StringLiteral:case j.NumberLiteral:case j.BooleanLiteral:this.enterOuterAlt(i,2),this.state=191,this.literal();break;default:throw new _i.NoViableAltException(this)}}catch(c){if(c instanceof Oe.RecognitionException)i.exception=c,this._errHandler.reportError(this,c),this._errHandler.recover(this,c);else throw c}finally{this.exitRule()}return i}literal(){let i=new fu(this._ctx,this.state);this.enterRule(i,42,j.RULE_literal);let c;try{this.enterOuterAlt(i,1),this.state=194,c=this._input.LA(1),(c-35&-32)===0&&(1<<c-35&(1<<j.StringLiteral-35|1<<j.NumberLiteral-35|1<<j.BooleanLiteral-35))!==0?(this._input.LA(1)===iu.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(h){if(h instanceof Oe.RecognitionException)i.exception=h,this._errHandler.reportError(this,h),this._errHandler.recover(this,h);else throw h}finally{this.exitRule()}return i}static _serializedATN=`줝쪺֍꾺体؇쉁*Ç \x07 \x07\b \b
|
|
572
105
|
|
|
573
106
|
\v \v\f \f\r \r \x070
|
|
574
107
|
\f3\v9
|
|
@@ -610,31 +143,4 @@ N\fQS[muwy "¡
|
|
|
610
143
|
\\]\x07 ]_
|
|
611
144
|
^\\_b\`^\`aab\`ch\vde\x07
|
|
612
145
|
eg\x07\vfdgjhfhiinjhkl\x07\fln(mcmknov"pv\fqv\rrvsv tv,uoupuqurusutvwx xy}\x07z|{z|}{}~~}\x07
\x07#
|
|
613
|
-
\x07\x1B \x07(\x07(\x07(\x07\x1B(\x07(\x07$ ( !¡¢\x07¢£\f\x07£¤\x07¤#¥¦\x07¦«&§¨\x07 ¨ª&©§ª«©«¬¬®«®¯\x07!¯%°³\x07$±²\x07"²´\f\x07³±³´´'µ¶\x07¶»\f\x07·¸\x07 ¸º\f\x07¹·º½»¹»¼¼¾½»¾¿\x07!¿)ÀÃ\x07$ÁÃ,ÂÀÂÁÃ+ÄÅ Å-18=FJX\`hmu}«³»Â`),Y(F,"__ATN");let Ae=F;class Dd extends Pe.ParserRuleContext{EOF(){return this.getToken(Ae.EOF,0)}declaration(i){return i===void 0?this.getRuleContexts(uu):this.getRuleContext(i,uu)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_document}enterRule(i){i.enterDocument&&i.enterDocument(this)}exitRule(i){i.exitDocument&&i.exitDocument(this)}accept(i){return i.visitDocument?i.visitDocument(this):i.visitChildren(this)}}class uu extends Pe.ParserRuleContext{typeAliasDeclaration(){return this.tryGetRuleContext(0,Bh)}variableDeclaration(){return this.tryGetRuleContext(0,jh)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_declaration}enterRule(i){i.enterDeclaration&&i.enterDeclaration(this)}exitRule(i){i.exitDeclaration&&i.exitDeclaration(this)}accept(i){return i.visitDeclaration?i.visitDeclaration(this):i.visitChildren(this)}}class Bh extends Pe.ParserRuleContext{Identifier(){return this.getToken(Ae.Identifier,0)}type(){return this.getRuleContext(0,Rn)}typeParameters(){return this.tryGetRuleContext(0,Wh)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_typeAliasDeclaration}enterRule(i){i.enterTypeAliasDeclaration&&i.enterTypeAliasDeclaration(this)}exitRule(i){i.exitTypeAliasDeclaration&&i.exitTypeAliasDeclaration(this)}accept(i){return i.visitTypeAliasDeclaration?i.visitTypeAliasDeclaration(this):i.visitChildren(this)}}class jh extends Pe.ParserRuleContext{Identifier(){return this.getToken(Ae.Identifier,0)}typeAnnotation(){return this.tryGetRuleContext(0,au)}expression(){return this.tryGetRuleContext(0,Gh)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_variableDeclaration}enterRule(i){i.enterVariableDeclaration&&i.enterVariableDeclaration(this)}exitRule(i){i.exitVariableDeclaration&&i.exitVariableDeclaration(this)}accept(i){return i.visitVariableDeclaration?i.visitVariableDeclaration(this):i.visitChildren(this)}}class au extends Pe.ParserRuleContext{type(){return this.getRuleContext(0,Rn)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_typeAnnotation}enterRule(i){i.enterTypeAnnotation&&i.enterTypeAnnotation(this)}exitRule(i){i.exitTypeAnnotation&&i.exitTypeAnnotation(this)}accept(i){return i.visitTypeAnnotation?i.visitTypeAnnotation(this):i.visitChildren(this)}}class Rn extends Pe.ParserRuleContext{unionType(){return this.getRuleContext(0,Mh)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_type}enterRule(i){i.enterType&&i.enterType(this)}exitRule(i){i.exitType&&i.exitType(this)}accept(i){return i.visitType?i.visitType(this):i.visitChildren(this)}}class Mh extends Pe.ParserRuleContext{intersectionType(i){return i===void 0?this.getRuleContexts(lu):this.getRuleContext(i,lu)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_unionType}enterRule(i){i.enterUnionType&&i.enterUnionType(this)}exitRule(i){i.exitUnionType&&i.exitUnionType(this)}accept(i){return i.visitUnionType?i.visitUnionType(this):i.visitChildren(this)}}class lu extends Pe.ParserRuleContext{arrayType(i){return i===void 0?this.getRuleContexts(cu):this.getRuleContext(i,cu)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_intersectionType}enterRule(i){i.enterIntersectionType&&i.enterIntersectionType(this)}exitRule(i){i.exitIntersectionType&&i.exitIntersectionType(this)}accept(i){return i.visitIntersectionType?i.visitIntersectionType(this):i.visitChildren(this)}}class cu extends Pe.ParserRuleContext{primaryType(){return this.tryGetRuleContext(0,qh)}typeArguments(){return this.tryGetRuleContext(0,Vi)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_arrayType}enterRule(i){i.enterArrayType&&i.enterArrayType(this)}exitRule(i){i.exitArrayType&&i.exitArrayType(this)}accept(i){return i.visitArrayType?i.visitArrayType(this):i.visitChildren(this)}}class qh extends Pe.ParserRuleContext{parenthesizedType(){return this.tryGetRuleContext(0,Vh)}primitiveType(){return this.tryGetRuleContext(0,kh)}objectType(){return this.tryGetRuleContext(0,Uh)}yorkieType(){return this.tryGetRuleContext(0,Hh)}typeReference(){return this.tryGetRuleContext(0,$h)}literal(){return this.tryGetRuleContext(0,pu)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_primaryType}enterRule(i){i.enterPrimaryType&&i.enterPrimaryType(this)}exitRule(i){i.exitPrimaryType&&i.exitPrimaryType(this)}accept(i){return i.visitPrimaryType?i.visitPrimaryType(this):i.visitChildren(this)}}class kh extends Pe.ParserRuleContext{constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_primitiveType}enterRule(i){i.enterPrimitiveType&&i.enterPrimitiveType(this)}exitRule(i){i.exitPrimitiveType&&i.exitPrimitiveType(this)}accept(i){return i.visitPrimitiveType?i.visitPrimitiveType(this):i.visitChildren(this)}}class Uh extends Pe.ParserRuleContext{propertySignature(i){return i===void 0?this.getRuleContexts(fu):this.getRuleContext(i,fu)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_objectType}enterRule(i){i.enterObjectType&&i.enterObjectType(this)}exitRule(i){i.exitObjectType&&i.exitObjectType(this)}accept(i){return i.visitObjectType?i.visitObjectType(this):i.visitChildren(this)}}class fu extends Pe.ParserRuleContext{propertyName(){return this.getRuleContext(0,zh)}typeAnnotation(){return this.getRuleContext(0,au)}QUESTION(){return this.tryGetToken(Ae.QUESTION,0)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_propertySignature}enterRule(i){i.enterPropertySignature&&i.enterPropertySignature(this)}exitRule(i){i.exitPropertySignature&&i.exitPropertySignature(this)}accept(i){return i.visitPropertySignature?i.visitPropertySignature(this):i.visitChildren(this)}}class zh extends Pe.ParserRuleContext{Identifier(){return this.tryGetToken(Ae.Identifier,0)}StringLiteral(){return this.tryGetToken(Ae.StringLiteral,0)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_propertyName}enterRule(i){i.enterPropertyName&&i.enterPropertyName(this)}exitRule(i){i.exitPropertyName&&i.exitPropertyName(this)}accept(i){return i.visitPropertyName?i.visitPropertyName(this):i.visitChildren(this)}}class Hh extends Pe.ParserRuleContext{typeArguments(){return this.tryGetRuleContext(0,Vi)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_yorkieType}enterRule(i){i.enterYorkieType&&i.enterYorkieType(this)}exitRule(i){i.exitYorkieType&&i.exitYorkieType(this)}accept(i){return i.visitYorkieType?i.visitYorkieType(this):i.visitChildren(this)}}class $h extends Pe.ParserRuleContext{Identifier(){return this.getToken(Ae.Identifier,0)}typeArguments(){return this.tryGetRuleContext(0,Vi)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_typeReference}enterRule(i){i.enterTypeReference&&i.enterTypeReference(this)}exitRule(i){i.exitTypeReference&&i.exitTypeReference(this)}accept(i){return i.visitTypeReference?i.visitTypeReference(this):i.visitChildren(this)}}class Vh extends Pe.ParserRuleContext{type(){return this.getRuleContext(0,Rn)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_parenthesizedType}enterRule(i){i.enterParenthesizedType&&i.enterParenthesizedType(this)}exitRule(i){i.exitParenthesizedType&&i.exitParenthesizedType(this)}accept(i){return i.visitParenthesizedType?i.visitParenthesizedType(this):i.visitChildren(this)}}class Wh extends Pe.ParserRuleContext{typeParameter(i){return i===void 0?this.getRuleContexts(hu):this.getRuleContext(i,hu)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_typeParameters}enterRule(i){i.enterTypeParameters&&i.enterTypeParameters(this)}exitRule(i){i.exitTypeParameters&&i.exitTypeParameters(this)}accept(i){return i.visitTypeParameters?i.visitTypeParameters(this):i.visitChildren(this)}}class hu extends Pe.ParserRuleContext{Identifier(){return this.getToken(Ae.Identifier,0)}type(){return this.tryGetRuleContext(0,Rn)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_typeParameter}enterRule(i){i.enterTypeParameter&&i.enterTypeParameter(this)}exitRule(i){i.exitTypeParameter&&i.exitTypeParameter(this)}accept(i){return i.visitTypeParameter?i.visitTypeParameter(this):i.visitChildren(this)}}class Vi extends Pe.ParserRuleContext{type(i){return i===void 0?this.getRuleContexts(Rn):this.getRuleContext(i,Rn)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_typeArguments}enterRule(i){i.enterTypeArguments&&i.enterTypeArguments(this)}exitRule(i){i.exitTypeArguments&&i.exitTypeArguments(this)}accept(i){return i.visitTypeArguments?i.visitTypeArguments(this):i.visitChildren(this)}}class Gh extends Pe.ParserRuleContext{Identifier(){return this.tryGetToken(Ae.Identifier,0)}literal(){return this.tryGetRuleContext(0,pu)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_expression}enterRule(i){i.enterExpression&&i.enterExpression(this)}exitRule(i){i.exitExpression&&i.exitExpression(this)}accept(i){return i.visitExpression?i.visitExpression(this):i.visitChildren(this)}}class pu extends Pe.ParserRuleContext{StringLiteral(){return this.tryGetToken(Ae.StringLiteral,0)}NumberLiteral(){return this.tryGetToken(Ae.NumberLiteral,0)}BooleanLiteral(){return this.tryGetToken(Ae.BooleanLiteral,0)}constructor(i,c){super(i,c)}get ruleIndex(){return Ae.RULE_literal}enterRule(i){i.enterLiteral&&i.enterLiteral(this)}exitRule(i){i.exitLiteral&&i.exitLiteral(this)}accept(i){return i.visitLiteral?i.visitLiteral(this):i.visitChildren(this)}}var Pn={},fr={},Xh;function Id(){if(Xh)return fr;Xh=1;/*!
|
|
614
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
615
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
616
|
-
*/var u=fr&&fr.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s},i=fr&&fr.__param||function(p,a){return function(r,n){a(r,n,p)}};Object.defineProperty(fr,"__esModule",{value:!0}),fr.AbstractParseTreeVisitor=void 0;const c=Q();let h=class{visit(a){return a.accept(this)}visitChildren(a){let r=this.defaultResult(),n=a.childCount;for(let t=0;t<n&&this.shouldVisitNextChild(a,r);t++){let e=a.getChild(t).accept(this);r=this.aggregateResult(r,e)}return r}visitTerminal(a){return this.defaultResult()}visitErrorNode(a){return this.defaultResult()}aggregateResult(a,r){return r}shouldVisitNextChild(a,r){return!0}};return u([c.Override,i(0,c.NotNull)],h.prototype,"visit",null),u([c.Override,i(0,c.NotNull)],h.prototype,"visitChildren",null),u([c.Override,i(0,c.NotNull)],h.prototype,"visitTerminal",null),u([c.Override,i(0,c.NotNull)],h.prototype,"visitErrorNode",null),u([i(0,c.NotNull)],h.prototype,"shouldVisitNextChild",null),fr.AbstractParseTreeVisitor=h,fr}var du={},Kh;function wd(){if(Kh)return du;Kh=1;/*!
|
|
617
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
618
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
619
|
-
*/return Object.defineProperty(du,"__esModule",{value:!0}),du}var xu={},Yh;function Ld(){if(Yh)return xu;Yh=1;/*!
|
|
620
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
621
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
622
|
-
*/return Object.defineProperty(xu,"__esModule",{value:!0}),xu}var vi={},Qh;function Fd(){if(Qh)return vi;Qh=1;/*!
|
|
623
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
624
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
625
|
-
*/Object.defineProperty(vi,"__esModule",{value:!0}),vi.ParseTreeProperty=void 0;let u=class{constructor(c="ParseTreeProperty"){this._symbol=Symbol(c)}get(c){return c[this._symbol]}set(c,h){c[this._symbol]=h}removeFrom(c){let h=c[this._symbol];return delete c[this._symbol],h}};return vi.ParseTreeProperty=u,vi}var yu={},Jh;function Bd(){if(Jh)return yu;Jh=1;/*!
|
|
626
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
627
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
628
|
-
*/return Object.defineProperty(yu,"__esModule",{value:!0}),yu}var _u={},Zh;function jd(){return Zh||(Zh=1,function(u){/*!
|
|
629
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
630
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
631
|
-
*/Object.defineProperty(u,"__esModule",{value:!0}),u.ParseTreeWalker=void 0;const i=ii(),c=mr(),h=si();class p{walk(r,n){let t=[],s=[],e=n,o=0;for(;e;){if(e instanceof i.ErrorNode?r.visitErrorNode&&r.visitErrorNode(e):e instanceof c.TerminalNode?r.visitTerminal&&r.visitTerminal(e):this.enterRule(r,e),e.childCount>0){t.push(e),s.push(o),o=0,e=e.getChild(0);continue}do{if(e instanceof h.RuleNode&&this.exitRule(r,e),t.length===0){e=void 0,o=0;break}let l=t[t.length-1];if(o++,e=o<l.childCount?l.getChild(o):void 0,e)break;e=t.pop(),o=s.pop()}while(e)}}enterRule(r,n){let t=n.ruleContext;r.enterEveryRule&&r.enterEveryRule(t),t.enterRule(r)}exitRule(r,n){let t=n.ruleContext;t.exitRule(r),r.exitEveryRule&&r.exitEveryRule(t)}}u.ParseTreeWalker=p,function(a){a.DEFAULT=new a}(p=u.ParseTreeWalker||(u.ParseTreeWalker={}))}(_u)),_u}var mu={},ep;function Md(){if(ep)return mu;ep=1;/*!
|
|
632
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
633
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
634
|
-
*/return Object.defineProperty(mu,"__esModule",{value:!0}),mu}var gu={},tp;function qd(){if(tp)return gu;tp=1;/*!
|
|
635
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
636
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
637
|
-
*/return Object.defineProperty(gu,"__esModule",{value:!0}),gu}var rp;function kd(){return rp||(rp=1,function(u){/*!
|
|
638
|
-
* Copyright 2016 The ANTLR Project. All rights reserved.
|
|
639
|
-
* Licensed under the BSD-3-Clause license. See LICENSE file in the project root for license information.
|
|
640
|
-
*/var i=Pn&&Pn.__createBinding||(Object.create?function(h,p,a,r){r===void 0&&(r=a),Object.defineProperty(h,r,{enumerable:!0,get:function(){return p[a]}})}:function(h,p,a,r){r===void 0&&(r=a),h[r]=p[a]}),c=Pn&&Pn.__exportStar||function(h,p){for(var a in h)a!=="default"&&!Object.prototype.hasOwnProperty.call(p,a)&&i(p,h,a)};Object.defineProperty(u,"__esModule",{value:!0}),c(Id(),u),c(ii(),u),c(wd(),u),c(Ld(),u),c(Fd(),u),c(Bd(),u),c(jd(),u),c(si(),u),c(Md(),u),c(mr(),u),c(qd(),u),c(gr(),u)}(Pn)),Pn}var np=kd();class Ud{constructor(){Y(this,"symbol");Y(this,"properties");Y(this,"symbolMap",new Map);Y(this,"referenceMap",new Map);Y(this,"errors",[])}enterTypeAliasDeclaration(i){const c=i.Identifier().text,{line:h,charPositionInLine:p}=i.Identifier().symbol;this.symbolMap.has(c)&&this.errors.push({message:`Duplicate type declaration: ${c}`,line:h,column:p}),this.symbolMap.set(c,{name:c,line:h,column:p}),this.symbol=c}enterObjectType(){this.properties=new Set}exitObjectType(){this.properties=void 0}enterPropertyName(i){var a,r;const c=i.Identifier().text,{line:h,charPositionInLine:p}=i.Identifier().symbol;(a=this.properties)!=null&&a.has(c)&&this.errors.push({message:`Duplicate property name: ${c}`,line:h,column:p}),(r=this.properties)==null||r.add(c)}enterTypeReference(i){const c=i.Identifier().text,{line:h,charPositionInLine:p}=i.Identifier().symbol;this.referenceMap.set(c,{name:c,parent:this.symbol,line:h,column:p})}}class zd{constructor(i){this.errorList=i}syntaxError(i,c,h,p,a){const r={severity:"error",message:a,range:{start:{column:p,line:h},end:{column:p+1,line:h}}};this.errorList.push(r)}}class Hd{constructor(i){this.errorList=i}syntaxError(i,c,h,p,a){let r=1;c&&c.stopIndex>=c.startIndex&&(r=c.stopIndex-c.startIndex+1);const n={severity:"error",message:a,range:{start:{column:p,line:h},end:{column:p+r,line:h}}};this.errorList.push(n)}}function $d(u){var e;const i=[],c=Hi.CharStreams.fromString(u),h=new $i(c);h.removeErrorListeners(),h.addErrorListener(new zd(i));const p=new Hi.CommonTokenStream(h),a=new Ae(p);a.removeErrorListeners(),a.addErrorListener(new Hd(i));const r=a.document(),n=new Ud;np.ParseTreeWalker.DEFAULT.walk(n,r);for(const[,o]of n.referenceMap)n.symbolMap.has(o.name)||n.errors.push({message:`Type '${o.name}' is not defined.`,line:o.line,column:o.column});for(const[,o]of n.symbolMap){const l=new Set;let f=o.name;for(;f;){if(l.has(f)){n.errors.push({message:`Circular reference detected: ${f} -> ${o.name}`,line:o.line,column:o.column});break}l.add(f),f=(e=n.referenceMap.get(f))==null?void 0:e.parent}l.has("Document")||n.errors.push({message:`Type '${o.name}' is not in the document.`,line:o.line,column:o.column})}const t=n.errors.map(o=>({severity:"error",message:o.message,range:{start:{column:o.column,line:o.line},end:{column:o.column+1,line:o.line}}}));return{errors:[...i,...t]}}class Vd{constructor(){Y(this,"typeDefinitions",new Map);Y(this,"currentTypeName");Y(this,"currentProperty");Y(this,"typeStack",[]);Y(this,"propertyStack",[]);Y(this,"currentProperties",[]);Y(this,"unionContext")}enterTypeAliasDeclaration(i){this.currentTypeName=i.Identifier().text,this.currentProperties=[],this.unionContext=void 0}exitArrayType(i){var p,a;const c=(p=i.children)==null?void 0:p.some(r=>r.text==="["||r.text==="]"),h=(a=i.children)==null?void 0:a.some(r=>r.text==="Array");if((c||h)&&this.typeStack.length>0){const r=this.typeStack.pop();this.typeStack.push({kind:"array",itemType:r})}}exitTypeAliasDeclaration(){if(this.currentTypeName&&this.typeStack.length>0){const i=this.typeStack.pop();this.typeDefinitions.set(this.currentTypeName,i)}this.currentTypeName=void 0}enterPrimitiveType(i){const c=i.text;this.typeStack.push({kind:"primitive",primitiveType:c})}enterYorkieType(i){const c=i.text;this.typeStack.push({kind:"yorkie",yorkieType:c})}enterTypeReference(i){const c=i.Identifier().text;this.typeStack.push({kind:"reference",typeName:c})}enterObjectType(){this.propertyStack.push(this.currentProperties),this.currentProperties=[]}exitObjectType(){const i=this.currentProperties;this.currentProperties=this.propertyStack.pop()||[],this.typeStack.push({kind:"object",properties:i})}enterPropertySignature(i){const c=i.propertyName().text,h=!!i.QUESTION();this.currentProperty={name:c,type:{kind:"primitive",primitiveType:"string"},optional:h}}exitPropertySignature(){this.currentProperty&&this.typeStack.length>0&&(this.currentProperty.type=this.typeStack.pop(),this.currentProperties.push(this.currentProperty)),this.currentProperty=void 0}enterUnionType(){this.unionContext={values:[]}}exitUnionType(){this.unionContext&&this.unionContext.values.length>0&&this.typeStack.push({kind:"union",values:this.unionContext.values}),this.unionContext=void 0}enterLiteral(i){const c=i.text;let h;if(c.startsWith('"')&&c.endsWith('"'))h=c.slice(1,-1);else if(!isNaN(Number(c)))h=Number(c);else if(c==="true"||c==="false")h=c==="true";else return;this.unionContext?this.unionContext.values.push(h):this.typeStack.push({kind:"union",values:[h]})}build(){const i=this.typeDefinitions.get("Document");if(!i)return[];const c=[],h=new Set;return this.expandType(i,"$",c,"Document",h),c}expandType(i,c,h,p,a=new Set){const r=`${c},${p}`;if(!a.has(r))switch(a.add(r),i.kind){case"primitive":h.push({path:c,type:i.primitiveType});break;case"yorkie":h.push({path:c,type:i.yorkieType});break;case"array":{const n={path:c,type:"array"};if(i.itemType.kind==="reference"){const s=this.typeDefinitions.get(i.itemType.typeName);s&&s.kind==="object"&&(n.items={type:"object",properties:s.properties.map(e=>e.name)})}else i.itemType.kind==="object"&&(n.items={type:"object",properties:i.itemType.properties.map(s=>s.name)});h.push(n);const t=`${c}[*]`;if(i.itemType.kind==="reference"){if(p===i.itemType.typeName&&c.includes("[*]"))return;const s=this.typeDefinitions.get(i.itemType.typeName);if(s&&s.kind==="object")for(const e of s.properties){const o=`${t}.${e.name}`;this.expandType(e.type,o,h,i.itemType.typeName,a)}}else if(i.itemType.kind==="object")for(const s of i.itemType.properties){const e=`${t}.${s.name}`;this.expandType(s.type,e,h,p,a)}else this.expandType(i.itemType,t,h,p,a);break}case"union":h.push({path:c,type:"enum",values:i.values});break;case"object":{const n={path:c,type:"object",properties:i.properties.map(s=>s.name)},t=i.properties.filter(s=>s.optional).map(s=>s.name);t.length>0&&(n.optional=t),h.push(n);for(const s of i.properties){const e=`${c}.${s.name}`;this.expandType(s.type,e,h,p,a)}break}case"reference":{const n=this.typeDefinitions.get(i.typeName);if(!n)return;if(p===i.typeName){if(c.includes("[*]")){if(n.kind==="object"){const t={path:c,type:"object",properties:n.properties.map(s=>s.name)};h.push(t)}return}if(n.kind==="object"){const t={path:c,type:"object",properties:n.properties.map(s=>s.name)};h.push(t);for(const s of n.properties){const e=`${c}[*].${s.name}`;this.expandType(s.type,e,h,i.typeName,a)}}return}this.expandType(n,c,h,i.typeName,a);break}}}}function Wd(u){const i=Hi.CharStreams.fromString(u),c=new $i(i),h=new Hi.CommonTokenStream(c),a=new Ae(h).document(),r=new Vd;return np.ParseTreeWalker.DEFAULT.walk(r,a),r.build()}ze.buildRuleset=Wd,ze.validate=$d,Object.defineProperty(ze,Symbol.toStringTag,{value:"Module"})});
|
|
146
|
+
\x07\x1B \x07(\x07(\x07(\x07\x1B(\x07(\x07$ ( !¡¢\x07¢£\f\x07£¤\x07¤#¥¦\x07¦«&§¨\x07 ¨ª&©§ª«©«¬¬®«®¯\x07!¯%°³\x07$±²\x07"²´\f\x07³±³´´'µ¶\x07¶»\f\x07·¸\x07 ¸º\f\x07¹·º½»¹»¼¼¾½»¾¿\x07!¿)ÀÃ\x07$ÁÃ,ÂÀÂÁÃ+ÄÅ Å-18=FJX\`hmu}«³»Â`;static __ATN;static get _ATN(){return j.__ATN||(j.__ATN=new Ih.ATNDeserializer().deserialize(Lh.toCharArray(j._serializedATN))),j.__ATN}}class Dd extends Ce.ParserRuleContext{EOF(){return this.getToken(j.EOF,0)}declaration(i){return i===void 0?this.getRuleContexts(ou):this.getRuleContext(i,ou)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_document}enterRule(i){i.enterDocument&&i.enterDocument(this)}exitRule(i){i.exitDocument&&i.exitDocument(this)}accept(i){return i.visitDocument?i.visitDocument(this):i.visitChildren(this)}}class ou extends Ce.ParserRuleContext{typeAliasDeclaration(){return this.tryGetRuleContext(0,Fh)}variableDeclaration(){return this.tryGetRuleContext(0,Bh)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_declaration}enterRule(i){i.enterDeclaration&&i.enterDeclaration(this)}exitRule(i){i.exitDeclaration&&i.exitDeclaration(this)}accept(i){return i.visitDeclaration?i.visitDeclaration(this):i.visitChildren(this)}}class Fh extends Ce.ParserRuleContext{Identifier(){return this.getToken(j.Identifier,0)}type(){return this.getRuleContext(0,bn)}typeParameters(){return this.tryGetRuleContext(0,Wh)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_typeAliasDeclaration}enterRule(i){i.enterTypeAliasDeclaration&&i.enterTypeAliasDeclaration(this)}exitRule(i){i.exitTypeAliasDeclaration&&i.exitTypeAliasDeclaration(this)}accept(i){return i.visitTypeAliasDeclaration?i.visitTypeAliasDeclaration(this):i.visitChildren(this)}}class Bh extends Ce.ParserRuleContext{Identifier(){return this.getToken(j.Identifier,0)}typeAnnotation(){return this.tryGetRuleContext(0,su)}expression(){return this.tryGetRuleContext(0,Gh)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_variableDeclaration}enterRule(i){i.enterVariableDeclaration&&i.enterVariableDeclaration(this)}exitRule(i){i.exitVariableDeclaration&&i.exitVariableDeclaration(this)}accept(i){return i.visitVariableDeclaration?i.visitVariableDeclaration(this):i.visitChildren(this)}}class su extends Ce.ParserRuleContext{type(){return this.getRuleContext(0,bn)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_typeAnnotation}enterRule(i){i.enterTypeAnnotation&&i.enterTypeAnnotation(this)}exitRule(i){i.exitTypeAnnotation&&i.exitTypeAnnotation(this)}accept(i){return i.visitTypeAnnotation?i.visitTypeAnnotation(this):i.visitChildren(this)}}class bn extends Ce.ParserRuleContext{unionType(){return this.getRuleContext(0,jh)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_type}enterRule(i){i.enterType&&i.enterType(this)}exitRule(i){i.exitType&&i.exitType(this)}accept(i){return i.visitType?i.visitType(this):i.visitChildren(this)}}class jh extends Ce.ParserRuleContext{intersectionType(i){return i===void 0?this.getRuleContexts(uu):this.getRuleContext(i,uu)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_unionType}enterRule(i){i.enterUnionType&&i.enterUnionType(this)}exitRule(i){i.exitUnionType&&i.exitUnionType(this)}accept(i){return i.visitUnionType?i.visitUnionType(this):i.visitChildren(this)}}class uu extends Ce.ParserRuleContext{arrayType(i){return i===void 0?this.getRuleContexts(au):this.getRuleContext(i,au)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_intersectionType}enterRule(i){i.enterIntersectionType&&i.enterIntersectionType(this)}exitRule(i){i.exitIntersectionType&&i.exitIntersectionType(this)}accept(i){return i.visitIntersectionType?i.visitIntersectionType(this):i.visitChildren(this)}}class au extends Ce.ParserRuleContext{primaryType(){return this.tryGetRuleContext(0,Mh)}typeArguments(){return this.tryGetRuleContext(0,zi)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_arrayType}enterRule(i){i.enterArrayType&&i.enterArrayType(this)}exitRule(i){i.exitArrayType&&i.exitArrayType(this)}accept(i){return i.visitArrayType?i.visitArrayType(this):i.visitChildren(this)}}class Mh extends Ce.ParserRuleContext{parenthesizedType(){return this.tryGetRuleContext(0,Vh)}primitiveType(){return this.tryGetRuleContext(0,qh)}objectType(){return this.tryGetRuleContext(0,kh)}yorkieType(){return this.tryGetRuleContext(0,zh)}typeReference(){return this.tryGetRuleContext(0,Hh)}literal(){return this.tryGetRuleContext(0,fu)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_primaryType}enterRule(i){i.enterPrimaryType&&i.enterPrimaryType(this)}exitRule(i){i.exitPrimaryType&&i.exitPrimaryType(this)}accept(i){return i.visitPrimaryType?i.visitPrimaryType(this):i.visitChildren(this)}}class qh extends Ce.ParserRuleContext{constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_primitiveType}enterRule(i){i.enterPrimitiveType&&i.enterPrimitiveType(this)}exitRule(i){i.exitPrimitiveType&&i.exitPrimitiveType(this)}accept(i){return i.visitPrimitiveType?i.visitPrimitiveType(this):i.visitChildren(this)}}class kh extends Ce.ParserRuleContext{propertySignature(i){return i===void 0?this.getRuleContexts(lu):this.getRuleContext(i,lu)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_objectType}enterRule(i){i.enterObjectType&&i.enterObjectType(this)}exitRule(i){i.exitObjectType&&i.exitObjectType(this)}accept(i){return i.visitObjectType?i.visitObjectType(this):i.visitChildren(this)}}class lu extends Ce.ParserRuleContext{propertyName(){return this.getRuleContext(0,Uh)}typeAnnotation(){return this.getRuleContext(0,su)}QUESTION(){return this.tryGetToken(j.QUESTION,0)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_propertySignature}enterRule(i){i.enterPropertySignature&&i.enterPropertySignature(this)}exitRule(i){i.exitPropertySignature&&i.exitPropertySignature(this)}accept(i){return i.visitPropertySignature?i.visitPropertySignature(this):i.visitChildren(this)}}class Uh extends Ce.ParserRuleContext{Identifier(){return this.tryGetToken(j.Identifier,0)}StringLiteral(){return this.tryGetToken(j.StringLiteral,0)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_propertyName}enterRule(i){i.enterPropertyName&&i.enterPropertyName(this)}exitRule(i){i.exitPropertyName&&i.exitPropertyName(this)}accept(i){return i.visitPropertyName?i.visitPropertyName(this):i.visitChildren(this)}}class zh extends Ce.ParserRuleContext{typeArguments(){return this.tryGetRuleContext(0,zi)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_yorkieType}enterRule(i){i.enterYorkieType&&i.enterYorkieType(this)}exitRule(i){i.exitYorkieType&&i.exitYorkieType(this)}accept(i){return i.visitYorkieType?i.visitYorkieType(this):i.visitChildren(this)}}class Hh extends Ce.ParserRuleContext{Identifier(){return this.getToken(j.Identifier,0)}typeArguments(){return this.tryGetRuleContext(0,zi)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_typeReference}enterRule(i){i.enterTypeReference&&i.enterTypeReference(this)}exitRule(i){i.exitTypeReference&&i.exitTypeReference(this)}accept(i){return i.visitTypeReference?i.visitTypeReference(this):i.visitChildren(this)}}class Vh extends Ce.ParserRuleContext{type(){return this.getRuleContext(0,bn)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_parenthesizedType}enterRule(i){i.enterParenthesizedType&&i.enterParenthesizedType(this)}exitRule(i){i.exitParenthesizedType&&i.exitParenthesizedType(this)}accept(i){return i.visitParenthesizedType?i.visitParenthesizedType(this):i.visitChildren(this)}}class Wh extends Ce.ParserRuleContext{typeParameter(i){return i===void 0?this.getRuleContexts(cu):this.getRuleContext(i,cu)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_typeParameters}enterRule(i){i.enterTypeParameters&&i.enterTypeParameters(this)}exitRule(i){i.exitTypeParameters&&i.exitTypeParameters(this)}accept(i){return i.visitTypeParameters?i.visitTypeParameters(this):i.visitChildren(this)}}class cu extends Ce.ParserRuleContext{Identifier(){return this.getToken(j.Identifier,0)}type(){return this.tryGetRuleContext(0,bn)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_typeParameter}enterRule(i){i.enterTypeParameter&&i.enterTypeParameter(this)}exitRule(i){i.exitTypeParameter&&i.exitTypeParameter(this)}accept(i){return i.visitTypeParameter?i.visitTypeParameter(this):i.visitChildren(this)}}class zi extends Ce.ParserRuleContext{type(i){return i===void 0?this.getRuleContexts(bn):this.getRuleContext(i,bn)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_typeArguments}enterRule(i){i.enterTypeArguments&&i.enterTypeArguments(this)}exitRule(i){i.exitTypeArguments&&i.exitTypeArguments(this)}accept(i){return i.visitTypeArguments?i.visitTypeArguments(this):i.visitChildren(this)}}class Gh extends Ce.ParserRuleContext{Identifier(){return this.tryGetToken(j.Identifier,0)}literal(){return this.tryGetRuleContext(0,fu)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_expression}enterRule(i){i.enterExpression&&i.enterExpression(this)}exitRule(i){i.exitExpression&&i.exitExpression(this)}accept(i){return i.visitExpression?i.visitExpression(this):i.visitChildren(this)}}class fu extends Ce.ParserRuleContext{StringLiteral(){return this.tryGetToken(j.StringLiteral,0)}NumberLiteral(){return this.tryGetToken(j.NumberLiteral,0)}BooleanLiteral(){return this.tryGetToken(j.BooleanLiteral,0)}constructor(i,c){super(i,c)}get ruleIndex(){return j.RULE_literal}enterRule(i){i.enterLiteral&&i.enterLiteral(this)}exitRule(i){i.exitLiteral&&i.exitLiteral(this)}accept(i){return i.visitLiteral?i.visitLiteral(this):i.visitChildren(this)}}var Cn={},sr={},Xh;function Id(){if(Xh)return sr;Xh=1;var u=sr&&sr.__decorate||function(p,a,r,n){var t=arguments.length,s=t<3?a:n===null?n=Object.getOwnPropertyDescriptor(a,r):n,e;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")s=Reflect.decorate(p,a,r,n);else for(var o=p.length-1;o>=0;o--)(e=p[o])&&(s=(t<3?e(s):t>3?e(a,r,s):e(a,r))||s);return t>3&&s&&Object.defineProperty(a,r,s),s},i=sr&&sr.__param||function(p,a){return function(r,n){a(r,n,p)}};Object.defineProperty(sr,"__esModule",{value:!0}),sr.AbstractParseTreeVisitor=void 0;const c=Q();let h=class{visit(a){return a.accept(this)}visitChildren(a){let r=this.defaultResult(),n=a.childCount;for(let t=0;t<n&&this.shouldVisitNextChild(a,r);t++){let e=a.getChild(t).accept(this);r=this.aggregateResult(r,e)}return r}visitTerminal(a){return this.defaultResult()}visitErrorNode(a){return this.defaultResult()}aggregateResult(a,r){return r}shouldVisitNextChild(a,r){return!0}};return u([c.Override,i(0,c.NotNull)],h.prototype,"visit",null),u([c.Override,i(0,c.NotNull)],h.prototype,"visitChildren",null),u([c.Override,i(0,c.NotNull)],h.prototype,"visitTerminal",null),u([c.Override,i(0,c.NotNull)],h.prototype,"visitErrorNode",null),u([i(0,c.NotNull)],h.prototype,"shouldVisitNextChild",null),sr.AbstractParseTreeVisitor=h,sr}var hu={},$h;function wd(){if($h)return hu;$h=1;return Object.defineProperty(hu,"__esModule",{value:!0}),hu}var pu={},Kh;function Ld(){if(Kh)return pu;Kh=1;return Object.defineProperty(pu,"__esModule",{value:!0}),pu}var mi={},Qh;function Fd(){if(Qh)return mi;Qh=1;Object.defineProperty(mi,"__esModule",{value:!0}),mi.ParseTreeProperty=void 0;let u=class{constructor(c="ParseTreeProperty"){this._symbol=Symbol(c)}get(c){return c[this._symbol]}set(c,h){c[this._symbol]=h}removeFrom(c){let h=c[this._symbol];return delete c[this._symbol],h}};return mi.ParseTreeProperty=u,mi}var du={},Jh;function Bd(){if(Jh)return du;Jh=1;return Object.defineProperty(du,"__esModule",{value:!0}),du}var xu={},Zh;function jd(){return Zh||(Zh=1,(function(u){Object.defineProperty(u,"__esModule",{value:!0}),u.ParseTreeWalker=void 0;const i=ri(),c=pr(),h=ii();class p{walk(r,n){let t=[],s=[],e=n,o=0;for(;e;){if(e instanceof i.ErrorNode?r.visitErrorNode&&r.visitErrorNode(e):e instanceof c.TerminalNode?r.visitTerminal&&r.visitTerminal(e):this.enterRule(r,e),e.childCount>0){t.push(e),s.push(o),o=0,e=e.getChild(0);continue}do{if(e instanceof h.RuleNode&&this.exitRule(r,e),t.length===0){e=void 0,o=0;break}let l=t[t.length-1];if(o++,e=o<l.childCount?l.getChild(o):void 0,e)break;e=t.pop(),o=s.pop()}while(e)}}enterRule(r,n){let t=n.ruleContext;r.enterEveryRule&&r.enterEveryRule(t),t.enterRule(r)}exitRule(r,n){let t=n.ruleContext;t.exitRule(r),r.exitEveryRule&&r.exitEveryRule(t)}}u.ParseTreeWalker=p,(function(a){a.DEFAULT=new a})(p=u.ParseTreeWalker||(u.ParseTreeWalker={}))})(xu)),xu}var yu={},Yh;function Md(){if(Yh)return yu;Yh=1;return Object.defineProperty(yu,"__esModule",{value:!0}),yu}var _u={},ep;function qd(){if(ep)return _u;ep=1;return Object.defineProperty(_u,"__esModule",{value:!0}),_u}var tp;function kd(){return tp||(tp=1,(function(u){var i=Cn&&Cn.__createBinding||(Object.create?(function(h,p,a,r){r===void 0&&(r=a),Object.defineProperty(h,r,{enumerable:!0,get:function(){return p[a]}})}):(function(h,p,a,r){r===void 0&&(r=a),h[r]=p[a]})),c=Cn&&Cn.__exportStar||function(h,p){for(var a in h)a!=="default"&&!Object.prototype.hasOwnProperty.call(p,a)&&i(p,h,a)};Object.defineProperty(u,"__esModule",{value:!0}),c(Id(),u),c(ri(),u),c(wd(),u),c(Ld(),u),c(Fd(),u),c(Bd(),u),c(jd(),u),c(ii(),u),c(Md(),u),c(pr(),u),c(qd(),u),c(dr(),u)})(Cn)),Cn}var rp=kd();class Ud{symbol=void 0;properties=void 0;symbolMap=new Map;referenceMap=new Map;errors=[];enterTypeAliasDeclaration(i){const c=i.Identifier().text,{line:h,charPositionInLine:p}=i.Identifier().symbol;this.symbolMap.has(c)&&this.errors.push({message:`Duplicate type declaration: ${c}`,line:h,column:p}),this.symbolMap.set(c,{name:c,line:h,column:p}),this.symbol=c}enterObjectType(){this.properties=new Set}exitObjectType(){this.properties=void 0}enterPropertyName(i){const c=i.Identifier().text,{line:h,charPositionInLine:p}=i.Identifier().symbol;this.properties?.has(c)&&this.errors.push({message:`Duplicate property name: ${c}`,line:h,column:p}),this.properties?.add(c)}enterTypeReference(i){const c=i.Identifier().text,{line:h,charPositionInLine:p}=i.Identifier().symbol;this.referenceMap.set(c,{name:c,parent:this.symbol,line:h,column:p})}}class zd{constructor(i){this.errorList=i}syntaxError(i,c,h,p,a){const r={severity:"error",message:a,range:{start:{column:p,line:h},end:{column:p+1,line:h}}};this.errorList.push(r)}}class Hd{constructor(i){this.errorList=i}syntaxError(i,c,h,p,a){let r=1;c&&c.stopIndex>=c.startIndex&&(r=c.stopIndex-c.startIndex+1);const n={severity:"error",message:a,range:{start:{column:p,line:h},end:{column:p+r,line:h}}};this.errorList.push(n)}}function Vd(u){const i=[],c=Ui.CharStreams.fromString(u),h=new Be(c);h.removeErrorListeners(),h.addErrorListener(new zd(i));const p=new Ui.CommonTokenStream(h),a=new j(p);a.removeErrorListeners(),a.addErrorListener(new Hd(i));const r=a.document(),n=new Ud;rp.ParseTreeWalker.DEFAULT.walk(n,r);for(const[,e]of n.referenceMap)n.symbolMap.has(e.name)||n.errors.push({message:`Type '${e.name}' is not defined.`,line:e.line,column:e.column});for(const[,e]of n.symbolMap){const o=new Set;let l=e.name;for(;l;){if(o.has(l)){n.errors.push({message:`Circular reference detected: ${l} -> ${e.name}`,line:e.line,column:e.column});break}o.add(l),l=n.referenceMap.get(l)?.parent}o.has("Document")||n.errors.push({message:`Type '${e.name}' is not in the document.`,line:e.line,column:e.column})}const t=n.errors.map(e=>({severity:"error",message:e.message,range:{start:{column:e.column,line:e.line},end:{column:e.column+1,line:e.line}}}));return{errors:[...i,...t]}}class Wd{typeDefinitions=new Map;currentTypeName=void 0;currentProperty=void 0;typeStack=[];propertyStack=[];currentProperties=[];unionContext=void 0;enterTypeAliasDeclaration(i){this.currentTypeName=i.Identifier().text,this.currentProperties=[],this.unionContext=void 0}exitArrayType(i){const c=i.children?.some(p=>p.text==="["||p.text==="]"),h=i.children?.some(p=>p.text==="Array");if((c||h)&&this.typeStack.length>0){const p=this.typeStack.pop();this.typeStack.push({kind:"array",itemType:p})}}exitTypeAliasDeclaration(){if(this.currentTypeName&&this.typeStack.length>0){const i=this.typeStack.pop();this.typeDefinitions.set(this.currentTypeName,i)}this.currentTypeName=void 0}enterPrimitiveType(i){const c=i.text;this.typeStack.push({kind:"primitive",primitiveType:c})}enterYorkieType(i){const c=i.text;this.typeStack.push({kind:"yorkie",yorkieType:c})}enterTypeReference(i){const c=i.Identifier().text;this.typeStack.push({kind:"reference",typeName:c})}enterObjectType(){this.propertyStack.push(this.currentProperties),this.currentProperties=[]}exitObjectType(){const i=this.currentProperties;this.currentProperties=this.propertyStack.pop()||[],this.typeStack.push({kind:"object",properties:i})}enterPropertySignature(i){const c=i.propertyName().text,h=!!i.QUESTION();this.currentProperty={name:c,type:{kind:"primitive",primitiveType:"string"},optional:h}}exitPropertySignature(){this.currentProperty&&this.typeStack.length>0&&(this.currentProperty.type=this.typeStack.pop(),this.currentProperties.push(this.currentProperty)),this.currentProperty=void 0}enterUnionType(){this.unionContext={values:[]}}exitUnionType(){this.unionContext&&this.unionContext.values.length>0&&this.typeStack.push({kind:"union",values:this.unionContext.values}),this.unionContext=void 0}enterLiteral(i){const c=i.text;let h;if(c.startsWith('"')&&c.endsWith('"'))h=c.slice(1,-1);else if(!isNaN(Number(c)))h=Number(c);else if(c==="true"||c==="false")h=c==="true";else return;this.unionContext?this.unionContext.values.push(h):this.typeStack.push({kind:"union",values:[h]})}build(){const i=this.typeDefinitions.get("Document");if(!i)return[];const c=[],h=new Set;return this.expandType(i,"$",c,"Document",h),c}expandType(i,c,h,p,a=new Set){const r=`${c},${p}`;if(!a.has(r))switch(a.add(r),i.kind){case"primitive":h.push({path:c,type:i.primitiveType});break;case"yorkie":h.push({path:c,type:i.yorkieType});break;case"array":{const n={path:c,type:"array"};if(i.itemType.kind==="reference"){const s=this.typeDefinitions.get(i.itemType.typeName);s&&s.kind==="object"&&(n.items={type:"object",properties:s.properties.map(e=>e.name)})}else i.itemType.kind==="object"&&(n.items={type:"object",properties:i.itemType.properties.map(s=>s.name)});h.push(n);const t=`${c}[*]`;if(i.itemType.kind==="reference"){if(p===i.itemType.typeName&&c.includes("[*]"))return;const s=this.typeDefinitions.get(i.itemType.typeName);if(s&&s.kind==="object")for(const e of s.properties){const o=`${t}.${e.name}`;this.expandType(e.type,o,h,i.itemType.typeName,a)}}else if(i.itemType.kind==="object")for(const s of i.itemType.properties){const e=`${t}.${s.name}`;this.expandType(s.type,e,h,p,a)}else this.expandType(i.itemType,t,h,p,a);break}case"union":h.push({path:c,type:"enum",values:i.values});break;case"object":{const n={path:c,type:"object",properties:i.properties.map(s=>s.name)},t=i.properties.filter(s=>s.optional).map(s=>s.name);t.length>0&&(n.optional=t),h.push(n);for(const s of i.properties){const e=`${c}.${s.name}`;this.expandType(s.type,e,h,p,a)}break}case"reference":{const n=this.typeDefinitions.get(i.typeName);if(!n)return;if(p===i.typeName){if(c.includes("[*]")){if(n.kind==="object"){const t={path:c,type:"object",properties:n.properties.map(s=>s.name)};h.push(t)}return}if(n.kind==="object"){const t={path:c,type:"object",properties:n.properties.map(s=>s.name)};h.push(t);for(const s of n.properties){const e=`${c}[*].${s.name}`;this.expandType(s.type,e,h,i.typeName,a)}}return}this.expandType(n,c,h,i.typeName,a);break}}}}function Gd(u){const i=Ui.CharStreams.fromString(u),c=new Be(i),h=new Ui.CommonTokenStream(c),a=new j(h).document(),r=new Wd;return rp.ParseTreeWalker.DEFAULT.walk(r,a),r.build()}_r.buildRuleset=Gd,_r.validate=Vd,Object.defineProperty(_r,Symbol.toStringTag,{value:"Module"})}));
|