@layerzerolabs/verify-contract 1.1.28 → 1.1.30

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/cli.js CHANGED
@@ -56,36 +56,36 @@ Expecting one of '${i.join("', '")}'`);let s=`${e}Help`;return this.on(s,n=>{let
56
56
  `)+r,s=i+1,i=t.indexOf(`
57
57
  `,s);}while(i!==-1);return n+=t.substr(s),n};ry.exports={stringReplaceAll:aO,stringEncaseCRLFWithFirstIndex:uO};});var uy=$((QK,ay)=>{var lO=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,ny=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,cO=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,hO=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,fO=new Map([["n",`
58
58
  `],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function oy(t){let e=t[0]==="u",r=t[1]==="{";return e&&!r&&t.length===5||t[0]==="x"&&t.length===3?String.fromCharCode(parseInt(t.slice(1),16)):e&&r?String.fromCodePoint(parseInt(t.slice(2,-1),16)):fO.get(t)||t}function dO(t,e){let r=[],i=e.trim().split(/\s*,\s*/g),s;for(let n of i){let o=Number(n);if(!Number.isNaN(o))r.push(o);else if(s=n.match(cO))r.push(s[2].replace(hO,(a,u,l)=>u?oy(u):l));else throw new Error(`Invalid Chalk template style argument: ${n} (in style '${t}')`)}return r}function pO(t){ny.lastIndex=0;let e=[],r;for(;(r=ny.exec(t))!==null;){let i=r[1];if(r[2]){let s=dO(i,r[2]);e.push([i].concat(s));}else e.push([i]);}return e}function sy(t,e){let r={};for(let s of e)for(let n of s.styles)r[n[0]]=s.inverse?null:n.slice(1);let i=t;for(let[s,n]of Object.entries(r))if(Array.isArray(n)){if(!(s in i))throw new Error(`Unknown Chalk style: ${s}`);i=n.length>0?i[s](...n):i[s];}return i}ay.exports=(t,e)=>{let r=[],i=[],s=[];if(e.replace(lO,(n,o,a,u,l,h)=>{if(o)s.push(oy(o));else if(u){let c=s.join("");s=[],i.push(r.length===0?c:sy(t,r)(c)),r.push({inverse:a,styles:pO(u)});}else if(l){if(r.length===0)throw new Error("Found extraneous } in Chalk template literal");i.push(sy(t,r)(s.join(""))),s=[],r.pop();}else s.push(h);}),i.push(s.join("")),r.length>0){let n=`Chalk template literal is missing ${r.length} closing bracket${r.length===1?"":"s"} (\`}\`)`;throw new Error(n)}return i.join("")};});var Ko=$((eG,py)=>{var zo=fd(),{stdout:gd,stderr:_d}=ty(),{stringReplaceAll:mO,stringEncaseCRLFWithFirstIndex:gO}=iy(),{isArray:qu}=Array,cy=["ansi","ansi","ansi256","ansi16m"],Is=Object.create(null),_O=(t,e={})=>{if(e.level&&!(Number.isInteger(e.level)&&e.level>=0&&e.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let r=gd?gd.level:0;t.level=e.level===void 0?r:e.level;},yd=class{constructor(e){return hy(e)}},hy=t=>{let e={};return _O(e,t),e.template=(...r)=>dy(e.template,...r),Object.setPrototypeOf(e,Hu.prototype),Object.setPrototypeOf(e.template,e),e.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},e.template.Instance=yd,e.template};function Hu(t){return hy(t)}for(let[t,e]of Object.entries(zo))Is[t]={get(){let r=Uu(this,vd(e.open,e.close,this._styler),this._isEmpty);return Object.defineProperty(this,t,{value:r}),r}};Is.visible={get(){let t=Uu(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:t}),t}};var fy=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let t of fy)Is[t]={get(){let{level:e}=this;return function(...r){let i=vd(zo.color[cy[e]][t](...r),zo.color.close,this._styler);return Uu(this,i,this._isEmpty)}}};for(let t of fy){let e="bg"+t[0].toUpperCase()+t.slice(1);Is[e]={get(){let{level:r}=this;return function(...i){let s=vd(zo.bgColor[cy[r]][t](...i),zo.bgColor.close,this._styler);return Uu(this,s,this._isEmpty)}}};}var yO=Object.defineProperties(()=>{},{...Is,level:{enumerable:!0,get(){return this._generator.level},set(t){this._generator.level=t;}}}),vd=(t,e,r)=>{let i,s;return r===void 0?(i=t,s=e):(i=r.openAll+t,s=e+r.closeAll),{open:t,close:e,openAll:i,closeAll:s,parent:r}},Uu=(t,e,r)=>{let i=(...s)=>qu(s[0])&&qu(s[0].raw)?ly(i,dy(i,...s)):ly(i,s.length===1?""+s[0]:s.join(" "));return Object.setPrototypeOf(i,yO),i._generator=t,i._styler=e,i._isEmpty=r,i},ly=(t,e)=>{if(t.level<=0||!e)return t._isEmpty?"":e;let r=t._styler;if(r===void 0)return e;let{openAll:i,closeAll:s}=r;if(e.indexOf("\x1B")!==-1)for(;r!==void 0;)e=mO(e,r.close,r.open),r=r.parent;let n=e.indexOf(`
59
- `);return n!==-1&&(e=gO(e,s,i,n)),i+e+s},md,dy=(t,...e)=>{let[r]=e;if(!qu(r)||!qu(r.raw))return e.join(" ");let i=e.slice(1),s=[r.raw[0]];for(let n=1;n<r.length;n++)s.push(String(i[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return md===void 0&&(md=uy()),md(t,s.join(""))};Object.defineProperties(Hu.prototype,Is);var Vu=Hu();Vu.supportsColor=gd;Vu.stderr=Hu({level:_d?_d.level:0});Vu.stderr.supportsColor=_d;py.exports=Vu;});var Ry=$((Ld,Pd)=>{Object.defineProperty(Ld,"__esModule",{value:!0});function MF(t){return t.encrypted}var Fd=(t,e)=>{let r;typeof e=="function"?r={connect:e}:r=e;let i=typeof r.connect=="function",s=typeof r.secureConnect=="function",n=typeof r.close=="function",o=()=>{i&&r.connect(),MF(t)&&s&&(t.authorized?r.secureConnect():t.authorizationError||t.once("secureConnect",r.secureConnect)),n&&t.once("close",r.close);};t.writable&&!t.connecting?o():t.connecting?t.once("connect",o):t.destroyed&&n&&r.close(t._hadError);};Ld.default=Fd;Pd.exports=Fd;Pd.exports.default=Fd;});var Ly=$((yG,Fy)=>{var{PassThrough:KF}=ge("stream");Fy.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,i=r==="buffer",s=!1;e?s=!(r||i):r=r||"utf8",i&&(r=null);let n=new KF({objectMode:s});r&&n.setEncoding(r);let o=0,a=[];return n.on("data",u=>{a.push(u),s?o=a.length:o+=u.length;}),n.getBufferedValue=()=>e?a:i?Buffer.concat(a,o):a.join(""),n.getBufferedLength=()=>o,n};});var Bd=$((vG,Qo)=>{var{constants:GF}=ge("buffer"),WF=ge("stream"),{promisify:YF}=ge("util"),JF=Ly(),ZF=YF(WF.pipeline),nl=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError";}};async function Md(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,i=JF(e);return await new Promise((s,n)=>{let o=a=>{a&&i.getBufferedLength()<=GF.MAX_LENGTH&&(a.bufferedData=i.getBufferedValue()),n(a);};(async()=>{try{await ZF(t,i),s();}catch(a){o(a);}})(),i.on("data",()=>{i.getBufferedLength()>r&&o(new nl);});}),i.getBufferedValue()}Qo.exports=Md;Qo.exports.buffer=(t,e)=>Md(t,{...e,encoding:"buffer"});Qo.exports.array=(t,e)=>Md(t,{...e,array:!0});Qo.exports.MaxBufferError=nl;});var Iy=$((bG,Py)=>{var XF=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),QF=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),eL=new Set([500,502,503,504]),tL={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},rL={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function Wn(t){let e=parseInt(t,10);return isFinite(e)?e:0}function iL(t){return t?eL.has(t.status):!0}function jd(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let i of r){let[s,n]=i.split(/=/,2);e[s.trim()]=n===void 0?!0:n.trim().replace(/^"|"$/g,"");}return e}function nL(t){let e=[];for(let r in t){let i=t[r];e.push(i===!0?r:r+"="+i);}if(e.length)return e.join(", ")}Py.exports=class{constructor(e,r,{shared:i,cacheHeuristic:s,immutableMinTimeToLive:n,ignoreCargoCult:o,_fromObject:a}={}){if(a){this._fromObject(a);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=i!==!1,this._cacheHeuristic=s!==void 0?s:.1,this._immutableMinTtl=n!==void 0?n:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=jd(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=jd(e.headers["cache-control"]),o&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":nL(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0);}now(){return Date.now()}storable(){return !!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&QF.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||XF.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=jd(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return (!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return !0;if(this._resHeaders.vary==="*")return !1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let i of r)if(e.headers[i]!==this._reqHeaders[i])return !1;return !0}_copyWithoutHopByHopHeaders(e){let r={};for(let i in e)tL[i]||(r[i]=e[i]);if(e.connection){let i=e.connection.trim().split(/\s*,\s*/);for(let s of i)delete r[s];}if(r.warning){let i=r.warning.split(/,/).filter(s=>!/^\s*1[0-9][0-9]/.test(s));i.length?r.warning=i.join(",").trim():delete r.warning;}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return Wn(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return Wn(this._rescc["s-maxage"])}if(this._rescc["max-age"])return Wn(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let i=Date.parse(this._resHeaders.expires);return Number.isNaN(i)||i<r?0:Math.max(e,(i-r)/1e3)}if(this._resHeaders["last-modified"]){let i=Date.parse(this._resHeaders["last-modified"]);if(isFinite(i)&&r>i)return Math.max(e,(r-i)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+Wn(this._rescc["stale-if-error"]),i=e+Wn(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,i)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+Wn(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+Wn(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc;}toObject(){return {v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let s=r["if-none-match"].split(/,/).filter(n=>!/^\s*W\//.test(n));s.length?r["if-none-match"]=s.join(",").trim():delete r["if-none-match"];}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&iL(r))return {modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let i=!1;if(r.status!==void 0&&r.status!=304?i=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?i=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?i=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?i=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(i=!0),!i)return {policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let s={};for(let o in this._resHeaders)s[o]=o in r.headers&&!rL[o]?r.headers[o]:this._resHeaders[o];let n=Object.assign({},r,{status:this._status,method:this._method,headers:s});return {policy:new this.constructor(e,n,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}};});var ky=$(qd=>{qd.stringify=function t(e){if(typeof e=="undefined")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",i=Array.isArray(e);r=i?"[":"{";var s=!0;for(var n in e){var o=typeof e[n]=="function"||!i&&typeof e[n]=="undefined";Object.hasOwnProperty.call(e,n)&&!o&&(s||(r+=","),s=!1,i?e[n]==null?r+="null":r+=t(e[n]):e[n]!==void 0&&(r+=t(n)+":"+t(e[n])));}return r+=i?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e=="undefined"?"null":JSON.stringify(e)};qd.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})};});var qy=$((SG,jy)=>{var oL=ge("events"),My=ky(),aL=t=>{let e={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(t.adapter||t.uri){let r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(ge(e[r]))(t)}return new Map},By=["sqlite","postgres","mysql","mongo","redis","tiered"],Hd=class extends oL{constructor(e,{emitErrors:r=!0,...i}={}){if(super(),this.opts={namespace:"keyv",serialize:My.stringify,deserialize:My.parse,...typeof e=="string"?{uri:e}:e,...i},!this.opts.store){let n={...this.opts};this.opts.store=aL(n);}if(this.opts.compression){let n=this.opts.compression;this.opts.serialize=n.serialize.bind(n),this.opts.deserialize=n.deserialize.bind(n);}typeof this.opts.store.on=="function"&&r&&this.opts.store.on("error",n=>this.emit("error",n)),this.opts.store.namespace=this.opts.namespace;let s=n=>async function*(){for await(let[o,a]of typeof n=="function"?n(this.opts.store.namespace):n){let u=await this.opts.deserialize(a);if(!(this.opts.store.namespace&&!o.includes(this.opts.store.namespace))){if(typeof u.expires=="number"&&Date.now()>u.expires){this.delete(o);continue}yield [this._getKeyUnprefix(o),u.value];}}};typeof this.opts.store[Symbol.iterator]=="function"&&this.opts.store instanceof Map?this.iterator=s(this.opts.store):typeof this.opts.store.iterator=="function"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=s(this.opts.store.iterator.bind(this.opts.store)));}_checkIterableAdaptar(){return By.includes(this.opts.store.opts.dialect)||By.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return `${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,r){let{store:i}=this.opts,s=Array.isArray(e),n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&i.getMany===void 0){let o=[];for(let a of n)o.push(Promise.resolve().then(()=>i.get(a)).then(u=>typeof u=="string"?this.opts.deserialize(u):this.opts.compression?this.opts.deserialize(u):u).then(u=>{if(u!=null)return typeof u.expires=="number"&&Date.now()>u.expires?this.delete(a).then(()=>{}):r&&r.raw?u:u.value}));return Promise.allSettled(o).then(a=>{let u=[];for(let l of a)u.push(l.value);return u})}return Promise.resolve().then(()=>s?i.getMany(n):i.get(n)).then(o=>typeof o=="string"?this.opts.deserialize(o):this.opts.compression?this.opts.deserialize(o):o).then(o=>{if(o!=null)return s?o.map((a,u)=>{if(typeof a=="string"&&(a=this.opts.deserialize(a)),a!=null){if(typeof a.expires=="number"&&Date.now()>a.expires){this.delete(e[u]).then(()=>{});return}return r&&r.raw?a:a.value}}):typeof o.expires=="number"&&Date.now()>o.expires?this.delete(e).then(()=>{}):r&&r.raw?o:o.value})}set(e,r,i){let s=this._getKeyPrefix(e);typeof i=="undefined"&&(i=this.opts.ttl),i===0&&(i=void 0);let{store:n}=this.opts;return Promise.resolve().then(()=>{let o=typeof i=="number"?Date.now()+i:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:o},this.opts.serialize(r)}).then(o=>n.set(s,o,i)).then(()=>!0)}delete(e){let{store:r}=this.opts;if(Array.isArray(e)){let s=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){let n=[];for(let o of s)n.push(r.delete(o));return Promise.allSettled(n).then(o=>o.every(a=>a.value===!0))}return Promise.resolve().then(()=>r.deleteMany(s))}let i=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(i))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let r=this._getKeyPrefix(e),{store:i}=this.opts;return Promise.resolve().then(async()=>typeof i.has=="function"?i.has(r):await i.get(r)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect=="function")return e.disconnect()}};jy.exports=Hd;});var zy=$((UG,$y)=>{var gL=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];$y.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(t).concat(gL)),i={};for(let s of r)s in e||(i[s]={get(){let n=t[s];return typeof n=="function"?n.bind(t):n},set(n){t[s]=n;},enumerable:!0,configurable:!1});return Object.defineProperties(e,i),t.once("aborted",()=>{e.destroy(),e.emit("aborted");}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close");}):e.emit("close");}),e};});var Gy=$((VG,Ky)=>{var{Transform:_L,PassThrough:yL}=ge("stream"),zd=ge("zlib"),vL=zy();Ky.exports=t=>{let e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;let r=e==="br";if(r&&typeof zd.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let i=!0,s=new _L({transform(a,u,l){i=!1,l(null,a);},flush(a){a();}}),n=new yL({autoDestroy:!1,destroy(a,u){t.destroy(),u(a);}}),o=r?zd.createBrotliDecompress():zd.createUnzip();return o.once("error",a=>{if(i&&!t.readable){n.end();return}n.destroy(a);}),vL(t,n),t.pipe(s).pipe(o).pipe(n),n};});var i0=$((OW,uv)=>{var r0=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0;}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[i,s]of this.oldCache.entries())this.onEviction(i,s);this.oldCache=this.cache,this.cache=new Map;}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0;}*keys(){for(let[e]of this)yield e;}*values(){for(let[,e]of this)yield e;}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e);}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};uv.exports=r0;});var n0=$((FW,lv)=>{lv.exports=t=>{if(t.listenerCount("error")!==0)return t;t.__destroy=t._destroy,t._destroy=(...r)=>{let i=r.pop();t.__destroy(...r,async s=>{await Promise.resolve(),i(s);});};let e=r=>{Promise.resolve().then(()=>{t.emit("error",r);});};return t.once("error",e),Promise.resolve().then(()=>{t.off("error",e);}),t};});var Jn=$((LW,mv)=>{var{URL:cv}=ge("url"),qL=ge("events"),HL=ge("tls"),UL=ge("http2"),VL=i0(),$L=n0(),or=Symbol("currentStreamCount"),hv=Symbol("request"),ar=Symbol("cachedOriginSet"),Ji=Symbol("gracefullyClosing"),dl=Symbol("length"),fv=["createConnection","maxDeflateDynamicTableSize","maxSettings","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","peerMaxConcurrentStreams","settings","family","localAddress","rejectUnauthorized","pskCallback","minDHSize","path","socket","ca","cert","sigalgs","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","honorCipherOrder","key","privateKeyEngine","privateKeyIdentifier","maxVersion","minVersion","pfx","secureOptions","secureProtocol","sessionIdContext","ticketKeys"],zL=(t,e,r)=>{let i=0,s=t.length;for(;i<s;){let n=i+s>>>1;r(t[n],e)?i=n+1:s=n;}return i},KL=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,s0=(t,e)=>{for(let r=0;r<t.length;r++){let i=t[r];i[ar].length>0&&i[ar].length<e[ar].length&&i[ar].every(s=>e[ar].includes(s))&&i[or]+e[or]<=e.remoteSettings.maxConcurrentStreams&&pv(i);}},dv=(t,e)=>{for(let r=0;r<t.length;r++){let i=t[r];if(e[ar].length>0&&e[ar].length<i[ar].length&&e[ar].every(s=>i[ar].includes(s))&&e[or]+i[or]<=i.remoteSettings.maxConcurrentStreams)return pv(e),!0}return !1},pv=t=>{t[Ji]=!0,t[or]===0&&t.close();},Zs=class t extends qL{constructor({timeout:e=0,maxSessions:r=Number.POSITIVE_INFINITY,maxEmptySessions:i=10,maxCachedTlsSessions:s=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxEmptySessions=i,this._emptySessionCount=0,this._sessionCount=0,this.settings={enablePush:!1,initialWindowSize:1024*1024*32},this.tlsSessionCache=new VL({maxSize:s});}get protocol(){return "https:"}normalizeOptions(e){let r="";for(let i=0;i<fv.length;i++){let s=fv[i];r+=":",e&&e[s]!==void 0&&(r+=e[s]);}return r}_processQueue(){if(this._sessionCount>=this.maxSessions){this.closeEmptySessions(this.maxSessions-this._sessionCount+1);return}for(let e in this.queue)for(let r in this.queue[e]){let i=this.queue[e][r];i.completed||(i.completed=!0,i());}}_isBetterSession(e,r){return e>r}_accept(e,r,i,s){let n=0;for(;n<r.length&&e[or]<e.remoteSettings.maxConcurrentStreams;)r[n].resolve(e),n++;r.splice(0,n),r.length>0&&(this.getSession(i,s,r),r.length=0);}getSession(e,r,i){return new Promise((s,n)=>{Array.isArray(i)&&i.length>0?(i=[...i],s()):i=[{resolve:s,reject:n}];try{if(typeof e=="string")e=new cv(e);else if(!(e instanceof cv))throw new TypeError("The `origin` argument needs to be a string or an URL object");if(r){let{servername:h}=r,{hostname:c}=e;if(h&&c!==h)throw new Error(`Origin ${c} differs from servername ${h}`)}}catch(h){for(let c=0;c<i.length;c++)i[c].reject(h);return}let o=this.normalizeOptions(r),a=e.origin;if(o in this.sessions){let h=this.sessions[o],c=-1,d=-1,f;for(let m=0;m<h.length;m++){let g=h[m],v=g.remoteSettings.maxConcurrentStreams;if(v<c)break;if(!g[ar].includes(a))continue;let x=g[or];x>=v||g[Ji]||g.destroyed||(f||(c=v),this._isBetterSession(x,d)&&(f=g,d=x));}if(f){this._accept(f,i,a,r);return}}if(o in this.queue){if(a in this.queue[o]){this.queue[o][a].listeners.push(...i);return}}else this.queue[o]={[dl]:0};let u=()=>{o in this.queue&&this.queue[o][a]===l&&(delete this.queue[o][a],--this.queue[o][dl]===0&&delete this.queue[o]);},l=async()=>{this._sessionCount++;let h=`${a}:${o}`,c=!1,d;try{let f={...r};f.settings===void 0&&(f.settings=this.settings),f.session===void 0&&(f.session=this.tlsSessionCache.get(h)),d=await(f.createConnection||this.createConnection).call(this,e,f),f.createConnection=()=>d;let g=UL.connect(e,f);g[or]=0,g[Ji]=!1;let v=()=>{let{socket:E}=g,b;return E.servername===!1?(E.servername=E.remoteAddress,b=g.originSet,E.servername=!1):b=g.originSet,b},x=()=>g[or]<g.remoteSettings.maxConcurrentStreams;g.socket.once("session",E=>{this.tlsSessionCache.set(h,E);}),g.once("error",E=>{for(let b=0;b<i.length;b++)i[b].reject(E);this.tlsSessionCache.delete(h);}),g.setTimeout(this.timeout,()=>{g.destroy();}),g.once("close",()=>{if(this._sessionCount--,c){this._emptySessionCount--;let E=this.sessions[o];E.length===1?delete this.sessions[o]:E.splice(E.indexOf(g),1);}else {u();let E=new Error("Session closed without receiving a SETTINGS frame");E.code="HTTP2WRAPPER_NOSETTINGS";for(let b=0;b<i.length;b++)i[b].reject(E);}this._processQueue();});let _=()=>{let E=this.queue[o];if(!E)return;let b=g[ar];for(let w=0;w<b.length;w++){let D=b[w];if(D in E){let{listeners:N,completed:F}=E[D],V=0;for(;V<N.length&&x();)N[V].resolve(g),V++;if(E[D].listeners.splice(0,V),E[D].listeners.length===0&&!F&&(delete E[D],--E[dl]===0)){delete this.queue[o];break}if(!x())break}}};g.on("origin",()=>{g[ar]=v()||[],g[Ji]=!1,dv(this.sessions[o],g),!(g[Ji]||!x())&&(_(),x()&&s0(this.sessions[o],g));}),g.once("remoteSettings",()=>{if(l.destroyed){let E=new Error("Agent has been destroyed");for(let b=0;b<i.length;b++)i[b].reject(E);g.destroy();return}if(g.setLocalWindowSize&&g.setLocalWindowSize(1024*1024*4),g[ar]=v()||[],g.socket.encrypted){let E=g[ar][0];if(E!==a){let b=new Error(`Requested origin ${a} does not match server ${E}`);for(let w=0;w<i.length;w++)i[w].reject(b);g.destroy();return}}u();{let E=this.sessions;if(o in E){let b=E[o];b.splice(zL(b,g,KL),0,g);}else E[o]=[g];}c=!0,this._emptySessionCount++,this.emit("session",g),this._accept(g,i,a,r),g[or]===0&&this._emptySessionCount>this.maxEmptySessions&&this.closeEmptySessions(this._emptySessionCount-this.maxEmptySessions),g.on("remoteSettings",()=>{x()&&(_(),x()&&s0(this.sessions[o],g));});}),g[hv]=g.request,g.request=(E,b)=>{if(g[Ji])throw new Error("The session is gracefully closing. No new streams are allowed.");let w=g[hv](E,b);return g.ref(),g[or]++===0&&this._emptySessionCount--,w.once("close",()=>{if(--g[or]===0&&(this._emptySessionCount++,g.unref(),this._emptySessionCount>this.maxEmptySessions||g[Ji])){g.close();return}g.destroyed||g.closed||x()&&!dv(this.sessions[o],g)&&(s0(this.sessions[o],g),_(),g[or]===0&&this._processQueue());}),w};}catch(f){u(),this._sessionCount--;for(let m=0;m<i.length;m++)i[m].reject(f);}};l.listeners=i,l.completed=!1,l.destroyed=!1,this.queue[o][a]=l,this.queue[o][dl]++,this._processQueue();})}request(e,r,i,s){return new Promise((n,o)=>{this.getSession(e,r,[{reject:o,resolve:a=>{try{let u=a.request(i,s);$L(u),n(u);}catch(u){o(u);}}}]);})}async createConnection(e,r){return t.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let i=e.port||443,s=e.hostname;typeof r.servername=="undefined"&&(r.servername=s);let n=HL.connect(i,s,r);return r.socket&&(n._peername={family:void 0,address:void 0,port:i}),n}closeEmptySessions(e=Number.POSITIVE_INFINITY){let r=0,{sessions:i}=this;for(let s in i){let n=i[s];for(let o=0;o<n.length;o++){let a=n[o];if(a[or]===0&&(r++,a.close(),r>=e))return r}}return r}destroy(e){let{sessions:r,queue:i}=this;for(let s in r){let n=r[s];for(let o=0;o<n.length;o++)n[o].destroy(e);}for(let s in i){let n=i[s];for(let o in n)n[o].destroyed=!0;}this.queue={},this.tlsSessionCache.clear();}get emptySessionCount(){return this._emptySessionCount}get pendingSessionCount(){return this._sessionCount-this._emptySessionCount}get sessionCount(){return this._sessionCount}};Zs.kCurrentStreamCount=or;Zs.kGracefullyClosing=Ji;mv.exports={Agent:Zs,globalAgent:new Zs};});var a0=$((PW,gv)=>{var{Readable:GL}=ge("stream"),o0=class extends GL{constructor(e,r){super({emitClose:!1,autoDestroy:!0,highWaterMark:r}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this._dumped=!1;}get connection(){return this.socket}set connection(e){this.socket=e;}_destroy(e,r){this.readableEnded||(this.aborted=!0),r(),this.req._request.destroy(e);}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume());}_read(){this.req&&this.req._request.resume();}};gv.exports=o0;});var yv=$((IW,_v)=>{_v.exports=(t,e,r)=>{for(let i of r)t.on(i,(...s)=>e.emit(i,...s));};});var fa=$((MW,vv)=>{var Zn=(t,e,r)=>{vv.exports[e]=class extends t{constructor(...s){super(typeof r=="string"?r:r(s)),this.name=`${super.name} [${e}]`,this.code=e;}};};Zn(TypeError,"ERR_INVALID_ARG_TYPE",t=>{let e=t[0].includes(".")?"property":"argument",r=t[1],i=Array.isArray(r);return i&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${t[0]}" ${e} must be ${i?"one of":"of"} type ${r}. Received ${typeof t[2]}`});Zn(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);Zn(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);Zn(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);Zn(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);Zn(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`);Zn(Error,"ERR_HTTP2_NO_SOCKET_MANIPULATION","HTTP/2 sockets should not be directly manipulated (e.g. read and written)");});var bv=$((BW,xv)=>{xv.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return !0;default:return !1}};});var u0=$((jW,Ev)=>{var{ERR_INVALID_HTTP_TOKEN:WL}=fa(),YL=bv(),JL=/^[\^`\-\w!#$%&*+.|~]+$/;Ev.exports=t=>{if(typeof t!="string"||!JL.test(t)&&!YL(t))throw new WL("Header name",t)};});var l0=$((qW,Cv)=>{var{ERR_HTTP_INVALID_HEADER_VALUE:ZL,ERR_INVALID_CHAR:XL}=fa(),QL=/[^\t\u0020-\u007E\u0080-\u00FF]/;Cv.exports=(t,e)=>{if(typeof e=="undefined")throw new ZL(e,t);if(QL.test(e))throw new XL("header content",t)};});var wv=$((HW,Av)=>{var{ERR_HTTP2_NO_SOCKET_MANIPULATION:Tv}=fa(),e5={has(t,e){let r=t.session===void 0?t:t.session.socket;return e in t||e in r},get(t,e){switch(e){case"on":case"once":case"end":case"emit":case"destroy":return t[e].bind(t);case"writable":case"destroyed":return t[e];case"readable":return t.destroyed?!1:t.readable;case"setTimeout":{let{session:r}=t;return r!==void 0?r.setTimeout.bind(r):t.setTimeout.bind(t)}case"write":case"read":case"pause":case"resume":throw new Tv;default:{let r=t.session===void 0?t:t.session.socket,i=r[e];return typeof i=="function"?i.bind(r):i}}},getPrototypeOf(t){return t.session!==void 0?Reflect.getPrototypeOf(t.session.socket):Reflect.getPrototypeOf(t)},set(t,e,r){switch(e){case"writable":case"readable":case"destroyed":case"on":case"once":case"end":case"emit":case"destroy":return t[e]=r,!0;case"setTimeout":{let{session:i}=t;return i===void 0?t.setTimeout=r:i.setTimeout=r,!0}case"write":case"read":case"pause":case"resume":throw new Tv;default:{let i=t.session===void 0?t:t.session.socket;return i[e]=r,!0}}}};Av.exports=e5;});var d0=$((UW,Fv)=>{var{URL:c0,urlToHttpOptions:Dv}=ge("url"),t5=ge("http2"),{Writable:r5}=ge("stream"),{Agent:i5,globalAgent:n5}=Jn(),s5=a0(),o5=yv(),{ERR_INVALID_ARG_TYPE:pl,ERR_INVALID_PROTOCOL:a5,ERR_HTTP_HEADERS_SENT:Sv}=fa(),u5=u0(),l5=l0(),c5=wv(),{HTTP2_HEADER_STATUS:Rv,HTTP2_HEADER_METHOD:Nv,HTTP2_HEADER_PATH:Ov,HTTP2_HEADER_AUTHORITY:da,HTTP2_METHOD_CONNECT:h5}=t5.constants,Zt=Symbol("headers"),Xs=Symbol("origin"),pa=Symbol("session"),h0=Symbol("options"),ml=Symbol("flushedHeaders"),Qs=Symbol("jobs"),ma=Symbol("pendingAgentPromise"),f0=class extends r5{constructor(e,r,i){if(super({autoDestroy:!1,emitClose:!1}),typeof e=="string"?e=Dv(new c0(e)):e instanceof c0?e=Dv(e):e={...e},typeof r=="function"||r===void 0?(i=r,r=e):r=Object.assign(e,r),r.h2session){if(this[pa]=r.h2session,this[pa].destroyed)throw new Error("The session has been closed already");this.protocol=this[pa].socket.encrypted?"https:":"http:";}else if(r.agent===!1)this.agent=new i5({maxEmptySessions:0});else if(typeof r.agent=="undefined"||r.agent===null)this.agent=n5;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new pl("options.agent",["http2wrapper.Agent-like Object","undefined","false"],r.agent);if(this.agent&&(this.protocol=this.agent.protocol),r.protocol&&r.protocol!==this.protocol)throw new a5(r.protocol,this.protocol);r.port||(r.port=r.defaultPort||this.agent&&this.agent.defaultPort||443),r.host=r.hostname||r.host||"localhost",delete r.hostname;let{timeout:s}=r;r.timeout=void 0,this[Zt]=Object.create(null),this[Qs]=[],this[ma]=void 0,this.socket=null,this.connection=null,this.method=r.method||"GET",this.method==="CONNECT"&&(r.path==="/"||r.path===void 0)||(this.path=r.path),this.res=null,this.aborted=!1,this.reusedSocket=!1;let{headers:n}=r;if(n)for(let a in n)this.setHeader(a,n[a]);r.auth&&!("authorization"in this[Zt])&&(this[Zt].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[h0]=r,this[Xs]=new c0(`${this.protocol}//${r.servername||r.host}:${r.port}`);let o=r._reuseSocket;o&&(r.createConnection=(...a)=>o.destroyed?this.agent.createConnection(...a):o,this.agent.getSession(this[Xs],this[h0]).catch(()=>{})),s&&this.setTimeout(s),i&&this.once("response",i),this[ml]=!1;}get method(){return this[Zt][Nv]}set method(e){e&&(this[Zt][Nv]=e.toUpperCase());}get path(){let e=this.method==="CONNECT"?da:Ov;return this[Zt][e]}set path(e){if(e){let r=this.method==="CONNECT"?da:Ov;this[Zt][r]=e;}}get host(){return this[Xs].hostname}set host(e){}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,i){if(this._mustNotHaveABody){i(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let s=()=>this._request.write(e,r,i);this._request?s():this[Qs].push(s);}_final(e){this.flushHeaders();let r=()=>{if(this._mustNotHaveABody||this.method==="CONNECT"){e();return}this._request.end(e);};this._request?r():this[Qs].push(r);}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy());}async _destroy(e,r){this.res&&this.res._dump(),this._request?this._request.destroy():process.nextTick(()=>{this.emit("close");});try{await this[ma];}catch(i){this.aborted&&(e=i);}r(e);}async flushHeaders(){if(this[ml]||this.destroyed)return;this[ml]=!0;let e=this.method===h5,r=i=>{if(this._request=i,this.destroyed){i.destroy();return}e||o5(i,this,["timeout","continue"]),i.once("error",n=>{this.destroy(n);}),i.once("aborted",()=>{let{res:n}=this;n?(n.aborted=!0,n.emit("aborted"),n.destroy()):this.destroy(new Error("The server aborted the HTTP/2 stream"));});let s=(n,o,a)=>{let u=new s5(this.socket,i.readableHighWaterMark);this.res=u,u.url=`${this[Xs].origin}${this.path}`,u.req=this,u.statusCode=n[Rv],u.headers=n,u.rawHeaders=a,u.once("end",()=>{u.complete=!0,u.socket=null,u.connection=null;}),e?(u.upgrade=!0,this.emit("connect",u,i,Buffer.alloc(0))?this.emit("close"):i.destroy()):(i.on("data",l=>{!u._dumped&&!u.push(l)&&i.pause();}),i.once("end",()=>{this.aborted||u.push(null);}),this.emit("response",u)||u._dump());};i.once("response",s),i.once("headers",n=>this.emit("information",{statusCode:n[Rv]})),i.once("trailers",(n,o,a)=>{let{res:u}=this;if(u===null){s(n,o,a);return}u.trailers=n,u.rawTrailers=a;}),i.once("close",()=>{let{aborted:n,res:o}=this;if(o){n&&(o.aborted=!0,o.emit("aborted"),o.destroy());let a=()=>{o.emit("close"),this.destroy(),this.emit("close");};o.readable?o.once("end",a):a();return}if(!this.destroyed){this.destroy(new Error("The HTTP/2 stream has been early terminated")),this.emit("close");return}this.destroy(),this.emit("close");}),this.socket=new Proxy(i,c5);for(let n of this[Qs])n();this[Qs].length=0,this.emit("socket",this.socket);};if(!(da in this[Zt])&&!e&&(this[Zt][da]=this[Xs].host),this[pa])try{r(this[pa].request(this[Zt]));}catch(i){this.destroy(i);}else {this.reusedSocket=!0;try{let i=this.agent.request(this[Xs],this[h0],this[Zt]);this[ma]=i,r(await i),this[ma]=!1;}catch(i){this[ma]=!1,this.destroy(i);}}}get connection(){return this.socket}set connection(e){this.socket=e;}getHeaderNames(){return Object.keys(this[Zt])}hasHeader(e){if(typeof e!="string")throw new pl("name","string",e);return !!this[Zt][e.toLowerCase()]}getHeader(e){if(typeof e!="string")throw new pl("name","string",e);return this[Zt][e.toLowerCase()]}get headersSent(){return this[ml]}removeHeader(e){if(typeof e!="string")throw new pl("name","string",e);if(this.headersSent)throw new Sv("remove");delete this[Zt][e.toLowerCase()];}setHeader(e,r){if(this.headersSent)throw new Sv("set");u5(e),l5(e,r);let i=e.toLowerCase();if(i==="connection"){if(r.toLowerCase()==="keep-alive")return;throw new Error(`Invalid 'connection' header: ${r}`)}i==="host"&&this.method==="CONNECT"?this[Zt][da]=r:this[Zt][i]=r;}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let i=()=>this._request.setTimeout(e,r);return this._request?i():this[Qs].push(i),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};Fv.exports=f0;});var Pv=$((VW,Lv)=>{var f5=ge("tls");Lv.exports=(t={},e=f5.connect)=>new Promise((r,i)=>{let s=!1,n,o=async()=>{await u,n.off("timeout",a),n.off("error",i),t.resolveSocket?(r({alpnProtocol:n.alpnProtocol,socket:n,timeout:s}),s&&(await Promise.resolve(),n.emit("timeout"))):(n.destroy(),r({alpnProtocol:n.alpnProtocol,timeout:s}));},a=async()=>{s=!0,o();},u=(async()=>{try{n=await e(t,o),n.on("error",i),n.once("timeout",a);}catch(l){i(l);}})();});});var kv=$(($W,Iv)=>{var{isIP:d5}=ge("net"),p5=ge("assert"),m5=t=>{if(t[0]==="["){let r=t.indexOf("]");return p5(r!==-1),t.slice(1,r)}let e=t.indexOf(":");return e===-1?t:t.slice(0,e)};Iv.exports=t=>{let e=m5(t);return d5(e)?"":e};});var $v=$((zW,ga)=>{var{URL:Mv,urlToHttpOptions:Bv}=ge("url"),jv=ge("http"),p0=ge("https"),g5=Pv(),_5=i0(),{Agent:y5,globalAgent:v5}=Jn(),x5=d0(),b5=kv(),qv=n0(),Hv=new _5({maxSize:100}),E5=new Map,C5=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let i=()=>{t.emit("free",e,r);};e.on("free",i);let s=()=>{t.removeSocket(e,r);};e.on("close",s);let n=()=>{let{freeSockets:a}=t;for(let u of Object.values(a))if(u.includes(e)){e.destroy();return}};e.on("timeout",n);let o=()=>{t.removeSocket(e,r),e.off("close",s),e.off("free",i),e.off("timeout",n),e.off("agentRemove",o);};e.on("agentRemove",o),t.emit("free",e,r);},Uv=(t,e=new Map,r=void 0)=>async i=>{let s=`${i.host}:${i.port}:${i.ALPNProtocols.sort()}`;if(!t.has(s)){if(e.has(s))return {alpnProtocol:(await e.get(s)).alpnProtocol};let{path:n}=i;i.path=i.socketPath;let o=g5(i,r);e.set(s,o);try{let a=await o;return t.set(s,a.alpnProtocol),e.delete(s),i.path=n,a}catch(a){throw e.delete(s),i.path=n,a}}return {alpnProtocol:t.get(s)}},Vv=Uv(Hv,E5);ga.exports=async(t,e,r)=>{if(typeof t=="string"?t=Bv(new Mv(t)):t instanceof Mv?t=Bv(t):t={...t},typeof e=="function"||e===void 0?(r=e,e=t):e=Object.assign(t,e),e.ALPNProtocols=e.ALPNProtocols||["h2","http/1.1"],!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";let i=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||b5(e.headers&&e.headers.host||e.host),e.port=e.port||(i?443:80),e._defaultAgent=i?p0.globalAgent:jv.globalAgent;let s=e.resolveProtocol||Vv,{agent:n}=e;if(n!==void 0&&n!==!1&&n.constructor.name!=="Object")throw new Error("The `options.agent` can be only an object `http`, `https` or `http2` properties");if(i){e.resolveSocket=!0;let{socket:o,alpnProtocol:a,timeout:u}=await s(e);if(u){o&&o.destroy();let h=new Error(`Timed out resolving ALPN: ${e.timeout} ms`);throw h.code="ETIMEDOUT",h.ms=e.timeout,h}o&&e.createConnection&&(o.destroy(),o=void 0),delete e.resolveSocket;let l=a==="h2";if(n&&(n=l?n.http2:n.https,e.agent=n),n===void 0&&(n=l?v5:p0.globalAgent),o)if(n===!1)o.destroy();else {let h=(l?y5:p0.Agent).prototype.createConnection;n.createConnection===h?l?e._reuseSocket=o:C5(n,o,e):o.destroy();}if(l)return qv(new x5(e,r))}else n&&(e.agent=n.http);return e.headers&&(e.headers={...e.headers},e.headers[":authority"]&&(e.headers.host||(e.headers.host=e.headers[":authority"]),delete e.headers[":authority"]),delete e.headers[":method"],delete e.headers[":scheme"],delete e.headers[":path"]),qv(jv.request(e,r))};ga.exports.protocolCache=Hv;ga.exports.resolveProtocol=Vv;ga.exports.createResolveProtocol=Uv;});var m0=$((KW,zv)=>{var T5=ge("stream"),A5=ge("tls"),w5=new A5.TLSSocket(new T5.PassThrough)._handle._parentWrap.constructor;zv.exports=w5;});var _0=$((GW,Kv)=>{var g0=class extends Error{constructor(e,r=""){super(`The proxy server rejected the request with status code ${e} (${r||"empty status message"})`),this.statusCode=e,this.statusMessage=r;}};Kv.exports=g0;});var Wv=$((WW,Gv)=>{var D5=(t,e,r)=>{if(!r.some(s=>typeof s==="string"?typeof e===s:e instanceof s)){let s=r.map(n=>typeof n=="string"?n:n.name);throw new TypeError(`Expected '${t}' to be a type of ${s.join(" or ")}, got ${typeof e}`)}};Gv.exports=D5;});var y0=$((YW,Jv)=>{var{URL:Yv}=ge("url"),gl=Wv();Jv.exports=(t,e)=>{gl("proxyOptions",e,["object"]),gl("proxyOptions.headers",e.headers,["object","undefined"]),gl("proxyOptions.raw",e.raw,["boolean","undefined"]),gl("proxyOptions.url",e.url,[Yv,"string"]);let r=new Yv(e.url);t.proxyOptions={raw:!0,...e,headers:{...e.headers},url:r};};});var _l=$((JW,Zv)=>{Zv.exports=t=>{let{username:e,password:r}=t.proxyOptions.url;if(e||r){let i=`${e}:${r}`,s=`Basic ${Buffer.from(i).toString("base64")}`;return {"proxy-authorization":s,authorization:s}}return {}};});var rx=$((ZW,tx)=>{var S5=ge("tls"),R5=ge("http"),Xv=ge("https"),N5=m0(),{globalAgent:O5}=Jn(),F5=_0(),Qv=y0(),L5=_l(),ex=(t,e,r)=>{(async()=>{try{let{proxyOptions:i}=t,{url:s,headers:n,raw:o}=i,a=await O5.request(s,i,{...L5(t),...n,":method":"CONNECT",":authority":`${e.host}:${e.port}`});a.once("error",r),a.once("response",u=>{let l=u[":status"];if(l!==200){r(new F5(l,""));return}let h=t instanceof Xv.Agent;if(o&&h){e.socket=a;let d=S5.connect(e);d.once("close",()=>{a.destroy();}),r(null,d);return}let c=new N5(a);c.encrypted=!1,c._handle.getpeername=d=>{d.family=void 0,d.address=void 0,d.port=void 0;},r(null,c);});}catch(i){r(i);}})();},v0=class extends R5.Agent{constructor(e){super(e),Qv(this,e.proxyOptions);}createConnection(e,r){ex(this,e,r);}},x0=class extends Xv.Agent{constructor(e){super(e),Qv(this,e.proxyOptions);}createConnection(e,r){ex(this,e,r);}};tx.exports={HttpOverHttp2:v0,HttpsOverHttp2:x0};});var E0=$((XW,ix)=>{var{Agent:P5}=Jn(),I5=m0(),k5=_0(),M5=y0(),b0=class extends P5{constructor(e){super(e),M5(this,e.proxyOptions);}async createConnection(e,r){let i=`${e.hostname}:${e.port||443}`,[s,n,o]=await this._getProxyStream(i);if(n!==200)throw new k5(n,o);if(this.proxyOptions.raw)r.socket=s;else {let a=new I5(s);return a.encrypted=!1,a._handle.getpeername=u=>{u.family=void 0,u.address=void 0,u.port=void 0;},a}return super.createConnection(e,r)}};ix.exports=b0;});var sx=$((QW,nx)=>{var{globalAgent:B5}=Jn(),j5=E0(),q5=_l(),H5=t=>new Promise((e,r)=>{t.once("error",r),t.once("response",i=>{t.off("error",r),e(i[":status"]);});}),C0=class extends j5{async _getProxyStream(e){let{proxyOptions:r}=this,i={...q5(this),...r.headers,":method":"CONNECT",":authority":e},s=await B5.request(r.url,r,i),n=await H5(s);return [s,n,""]}};nx.exports=C0;});var ax=$((eY,ox)=>{var U5=ge("http"),V5=ge("https"),$5=E0(),z5=_l(),K5=t=>new Promise((e,r)=>{let i=(s,n,o)=>{n.unshift(o),t.off("error",r),e([n,s.statusCode,s.statusMessage]);};t.once("error",r),t.once("connect",i);}),yl=class extends $5{async _getProxyStream(e){let{proxyOptions:r}=this,{url:i,headers:s}=this.proxyOptions,o=(i.protocol==="https:"?V5:U5).request({...r,hostname:i.hostname,port:i.port,path:e,headers:{...z5(this),...s,host:e},method:"CONNECT"}).end();return K5(o)}};ox.exports={Http2OverHttp:yl,Http2OverHttps:yl};});var lx=$((tY,ux)=>{var G5=ge("http2"),{Agent:W5,globalAgent:Y5}=Jn(),T0=d0(),J5=a0(),Z5=$v(),{HttpOverHttp2:X5,HttpsOverHttp2:Q5}=rx(),eP=sx(),{Http2OverHttp:tP,Http2OverHttps:rP}=ax(),iP=u0(),nP=l0(),sP=(t,e,r)=>new T0(t,e,r),oP=(t,e,r)=>{let i=new T0(t,e,r);return i.end(),i};ux.exports={...G5,ClientRequest:T0,IncomingMessage:J5,Agent:W5,globalAgent:Y5,request:sP,get:oP,auto:Z5,proxies:{HttpOverHttp2:X5,HttpsOverHttp2:Q5,Http2OverHttp2:eP,Http2OverHttp:tP,Http2OverHttps:rP},validateHeaderName:iP,validateHeaderValue:nP};});var Dx=$((wx,L0)=>{(function(t,e){function r(k,y){if(!k)throw new Error(y||"Assertion failed")}function i(k,y){k.super_=y;var C=function(){};C.prototype=y.prototype,k.prototype=new C,k.prototype.constructor=k;}function s(k,y,C){if(s.isBN(k))return k;this.negative=0,this.words=null,this.length=0,this.red=null,k!==null&&((y==="le"||y==="be")&&(C=y,y=10),this._init(k||0,y||10,C||"be"));}typeof t=="object"?t.exports=s:e.BN=s,s.BN=s,s.wordSize=26;var n;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?n=window.Buffer:n=ge("buffer").Buffer;}catch(k){}s.isBN=function(y){return y instanceof s?!0:y!==null&&typeof y=="object"&&y.constructor.wordSize===s.wordSize&&Array.isArray(y.words)},s.max=function(y,C){return y.cmp(C)>0?y:C},s.min=function(y,C){return y.cmp(C)<0?y:C},s.prototype._init=function(y,C,S){if(typeof y=="number")return this._initNumber(y,C,S);if(typeof y=="object")return this._initArray(y,C,S);C==="hex"&&(C=16),r(C===(C|0)&&C>=2&&C<=36),y=y.toString().replace(/\s+/g,"");var R=0;y[0]==="-"&&(R++,this.negative=1),R<y.length&&(C===16?this._parseHex(y,R,S):(this._parseBase(y,C,R),S==="le"&&this._initArray(this.toArray(),C,S)));},s.prototype._initNumber=function(y,C,S){y<0&&(this.negative=1,y=-y),y<67108864?(this.words=[y&67108863],this.length=1):y<4503599627370496?(this.words=[y&67108863,y/67108864&67108863],this.length=2):(r(y<9007199254740992),this.words=[y&67108863,y/67108864&67108863,1],this.length=3),S==="le"&&this._initArray(this.toArray(),C,S);},s.prototype._initArray=function(y,C,S){if(r(typeof y.length=="number"),y.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(y.length/3),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var L,I,K=0;if(S==="be")for(R=y.length-1,L=0;R>=0;R-=3)I=y[R]|y[R-1]<<8|y[R-2]<<16,this.words[L]|=I<<K&67108863,this.words[L+1]=I>>>26-K&67108863,K+=24,K>=26&&(K-=26,L++);else if(S==="le")for(R=0,L=0;R<y.length;R+=3)I=y[R]|y[R+1]<<8|y[R+2]<<16,this.words[L]|=I<<K&67108863,this.words[L+1]=I>>>26-K&67108863,K+=24,K>=26&&(K-=26,L++);return this._strip()};function o(k,y){var C=k.charCodeAt(y);if(C>=48&&C<=57)return C-48;if(C>=65&&C<=70)return C-55;if(C>=97&&C<=102)return C-87;r(!1,"Invalid character in "+k);}function a(k,y,C){var S=o(k,C);return C-1>=y&&(S|=o(k,C-1)<<4),S}s.prototype._parseHex=function(y,C,S){this.length=Math.ceil((y.length-C)/6),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var L=0,I=0,K;if(S==="be")for(R=y.length-1;R>=C;R-=2)K=a(y,C,R)<<L,this.words[I]|=K&67108863,L>=18?(L-=18,I+=1,this.words[I]|=K>>>26):L+=8;else {var j=y.length-C;for(R=j%2===0?C+1:C;R<y.length;R+=2)K=a(y,C,R)<<L,this.words[I]|=K&67108863,L>=18?(L-=18,I+=1,this.words[I]|=K>>>26):L+=8;}this._strip();};function u(k,y,C,S){for(var R=0,L=0,I=Math.min(k.length,C),K=y;K<I;K++){var j=k.charCodeAt(K)-48;R*=S,j>=49?L=j-49+10:j>=17?L=j-17+10:L=j,r(j>=0&&L<S,"Invalid character"),R+=L;}return R}s.prototype._parseBase=function(y,C,S){this.words=[0],this.length=1;for(var R=0,L=1;L<=67108863;L*=C)R++;R--,L=L/C|0;for(var I=y.length-S,K=I%R,j=Math.min(I,I-K)+S,A=0,q=S;q<j;q+=R)A=u(y,q,q+R,C),this.imuln(L),this.words[0]+A<67108864?this.words[0]+=A:this._iaddn(A);if(K!==0){var B=1;for(A=u(y,q,y.length,C),q=0;q<K;q++)B*=C;this.imuln(B),this.words[0]+A<67108864?this.words[0]+=A:this._iaddn(A);}this._strip();},s.prototype.copy=function(y){y.words=new Array(this.length);for(var C=0;C<this.length;C++)y.words[C]=this.words[C];y.length=this.length,y.negative=this.negative,y.red=this.red;};function l(k,y){k.words=y.words,k.length=y.length,k.negative=y.negative,k.red=y.red;}if(s.prototype._move=function(y){l(y,this);},s.prototype.clone=function(){var y=new s(null);return this.copy(y),y},s.prototype._expand=function(y){for(;this.length<y;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol!="undefined"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=h;}catch(k){s.prototype.inspect=h;}else s.prototype.inspect=h;function h(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(y,C){y=y||10,C=C|0||1;var S;if(y===16||y==="hex"){S="";for(var R=0,L=0,I=0;I<this.length;I++){var K=this.words[I],j=((K<<R|L)&16777215).toString(16);L=K>>>24-R&16777215,R+=2,R>=26&&(R-=26,I--),L!==0||I!==this.length-1?S=c[6-j.length]+j+S:S=j+S;}for(L!==0&&(S=L.toString(16)+S);S.length%C!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(y===(y|0)&&y>=2&&y<=36){var A=d[y],q=f[y];S="";var B=this.clone();for(B.negative=0;!B.isZero();){var T=B.modrn(q).toString(y);B=B.idivn(q),B.isZero()?S=T+S:S=c[A-T.length]+T+S;}for(this.isZero()&&(S="0"+S);S.length%C!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}r(!1,"Base should be between 2 and 36");},s.prototype.toNumber=function(){var y=this.words[0];return this.length===2?y+=this.words[1]*67108864:this.length===3&&this.words[2]===1?y+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-y:y},s.prototype.toJSON=function(){return this.toString(16,2)},n&&(s.prototype.toBuffer=function(y,C){return this.toArrayLike(n,y,C)}),s.prototype.toArray=function(y,C){return this.toArrayLike(Array,y,C)};var m=function(y,C){return y.allocUnsafe?y.allocUnsafe(C):new y(C)};s.prototype.toArrayLike=function(y,C,S){this._strip();var R=this.byteLength(),L=S||Math.max(1,R);r(R<=L,"byte array longer than desired length"),r(L>0,"Requested array length <= 0");var I=m(y,L),K=C==="le"?"LE":"BE";return this["_toArrayLike"+K](I,R),I},s.prototype._toArrayLikeLE=function(y,C){for(var S=0,R=0,L=0,I=0;L<this.length;L++){var K=this.words[L]<<I|R;y[S++]=K&255,S<y.length&&(y[S++]=K>>8&255),S<y.length&&(y[S++]=K>>16&255),I===6?(S<y.length&&(y[S++]=K>>24&255),R=0,I=0):(R=K>>>24,I+=2);}if(S<y.length)for(y[S++]=R;S<y.length;)y[S++]=0;},s.prototype._toArrayLikeBE=function(y,C){for(var S=y.length-1,R=0,L=0,I=0;L<this.length;L++){var K=this.words[L]<<I|R;y[S--]=K&255,S>=0&&(y[S--]=K>>8&255),S>=0&&(y[S--]=K>>16&255),I===6?(S>=0&&(y[S--]=K>>24&255),R=0,I=0):(R=K>>>24,I+=2);}if(S>=0)for(y[S--]=R;S>=0;)y[S--]=0;},Math.clz32?s.prototype._countBits=function(y){return 32-Math.clz32(y)}:s.prototype._countBits=function(y){var C=y,S=0;return C>=4096&&(S+=13,C>>>=13),C>=64&&(S+=7,C>>>=7),C>=8&&(S+=4,C>>>=4),C>=2&&(S+=2,C>>>=2),S+C},s.prototype._zeroBits=function(y){if(y===0)return 26;var C=y,S=0;return C&8191||(S+=13,C>>>=13),C&127||(S+=7,C>>>=7),C&15||(S+=4,C>>>=4),C&3||(S+=2,C>>>=2),C&1||S++,S},s.prototype.bitLength=function(){var y=this.words[this.length-1],C=this._countBits(y);return (this.length-1)*26+C};function g(k){for(var y=new Array(k.bitLength()),C=0;C<y.length;C++){var S=C/26|0,R=C%26;y[C]=k.words[S]>>>R&1;}return y}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var y=0,C=0;C<this.length;C++){var S=this._zeroBits(this.words[C]);if(y+=S,S!==26)break}return y},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(y){return this.negative!==0?this.abs().inotn(y).iaddn(1):this.clone()},s.prototype.fromTwos=function(y){return this.testn(y-1)?this.notn(y).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(y){for(;this.length<y.length;)this.words[this.length++]=0;for(var C=0;C<y.length;C++)this.words[C]=this.words[C]|y.words[C];return this._strip()},s.prototype.ior=function(y){return r((this.negative|y.negative)===0),this.iuor(y)},s.prototype.or=function(y){return this.length>y.length?this.clone().ior(y):y.clone().ior(this)},s.prototype.uor=function(y){return this.length>y.length?this.clone().iuor(y):y.clone().iuor(this)},s.prototype.iuand=function(y){var C;this.length>y.length?C=y:C=this;for(var S=0;S<C.length;S++)this.words[S]=this.words[S]&y.words[S];return this.length=C.length,this._strip()},s.prototype.iand=function(y){return r((this.negative|y.negative)===0),this.iuand(y)},s.prototype.and=function(y){return this.length>y.length?this.clone().iand(y):y.clone().iand(this)},s.prototype.uand=function(y){return this.length>y.length?this.clone().iuand(y):y.clone().iuand(this)},s.prototype.iuxor=function(y){var C,S;this.length>y.length?(C=this,S=y):(C=y,S=this);for(var R=0;R<S.length;R++)this.words[R]=C.words[R]^S.words[R];if(this!==C)for(;R<C.length;R++)this.words[R]=C.words[R];return this.length=C.length,this._strip()},s.prototype.ixor=function(y){return r((this.negative|y.negative)===0),this.iuxor(y)},s.prototype.xor=function(y){return this.length>y.length?this.clone().ixor(y):y.clone().ixor(this)},s.prototype.uxor=function(y){return this.length>y.length?this.clone().iuxor(y):y.clone().iuxor(this)},s.prototype.inotn=function(y){r(typeof y=="number"&&y>=0);var C=Math.ceil(y/26)|0,S=y%26;this._expand(C),S>0&&C--;for(var R=0;R<C;R++)this.words[R]=~this.words[R]&67108863;return S>0&&(this.words[R]=~this.words[R]&67108863>>26-S),this._strip()},s.prototype.notn=function(y){return this.clone().inotn(y)},s.prototype.setn=function(y,C){r(typeof y=="number"&&y>=0);var S=y/26|0,R=y%26;return this._expand(S+1),C?this.words[S]=this.words[S]|1<<R:this.words[S]=this.words[S]&~(1<<R),this._strip()},s.prototype.iadd=function(y){var C;if(this.negative!==0&&y.negative===0)return this.negative=0,C=this.isub(y),this.negative^=1,this._normSign();if(this.negative===0&&y.negative!==0)return y.negative=0,C=this.isub(y),y.negative=1,C._normSign();var S,R;this.length>y.length?(S=this,R=y):(S=y,R=this);for(var L=0,I=0;I<R.length;I++)C=(S.words[I]|0)+(R.words[I]|0)+L,this.words[I]=C&67108863,L=C>>>26;for(;L!==0&&I<S.length;I++)C=(S.words[I]|0)+L,this.words[I]=C&67108863,L=C>>>26;if(this.length=S.length,L!==0)this.words[this.length]=L,this.length++;else if(S!==this)for(;I<S.length;I++)this.words[I]=S.words[I];return this},s.prototype.add=function(y){var C;return y.negative!==0&&this.negative===0?(y.negative=0,C=this.sub(y),y.negative^=1,C):y.negative===0&&this.negative!==0?(this.negative=0,C=y.sub(this),this.negative=1,C):this.length>y.length?this.clone().iadd(y):y.clone().iadd(this)},s.prototype.isub=function(y){if(y.negative!==0){y.negative=0;var C=this.iadd(y);return y.negative=1,C._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(y),this.negative=1,this._normSign();var S=this.cmp(y);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var R,L;S>0?(R=this,L=y):(R=y,L=this);for(var I=0,K=0;K<L.length;K++)C=(R.words[K]|0)-(L.words[K]|0)+I,I=C>>26,this.words[K]=C&67108863;for(;I!==0&&K<R.length;K++)C=(R.words[K]|0)+I,I=C>>26,this.words[K]=C&67108863;if(I===0&&K<R.length&&R!==this)for(;K<R.length;K++)this.words[K]=R.words[K];return this.length=Math.max(this.length,K),R!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(y){return this.clone().isub(y)};function v(k,y,C){C.negative=y.negative^k.negative;var S=k.length+y.length|0;C.length=S,S=S-1|0;var R=k.words[0]|0,L=y.words[0]|0,I=R*L,K=I&67108863,j=I/67108864|0;C.words[0]=K;for(var A=1;A<S;A++){for(var q=j>>>26,B=j&67108863,T=Math.min(A,y.length-1),P=Math.max(0,A-k.length+1);P<=T;P++){var H=A-P|0;R=k.words[H]|0,L=y.words[P]|0,I=R*L+B,q+=I/67108864|0,B=I&67108863;}C.words[A]=B|0,j=q|0;}return j!==0?C.words[A]=j|0:C.length--,C._strip()}var x=function(y,C,S){var R=y.words,L=C.words,I=S.words,K=0,j,A,q,B=R[0]|0,T=B&8191,P=B>>>13,H=R[1]|0,z=H&8191,G=H>>>13,oe=R[2]|0,se=oe&8191,X=oe>>>13,ee=R[3]|0,U=ee&8191,M=ee>>>13,J=R[4]|0,W=J&8191,ne=J>>>13,le=R[5]|0,Q=le&8191,_e=le>>>13,Se=R[6]|0,ye=Se&8191,Ce=Se>>>13,tt=R[7]|0,Fe=tt&8191,He=tt>>>13,Yt=R[8]|0,Xe=Yt&8191,ot=Yt>>>13,pi=R[9]|0,nt=pi&8191,rt=pi>>>13,ce=L[0]|0,be=ce&8191,Ae=ce>>>13,Le=L[1]|0,Ne=Le&8191,We=Le>>>13,lt=L[2]|0,Ve=lt&8191,Qe=lt>>>13,Dn=L[3]|0,ct=Dn&8191,ht=Dn>>>13,Sn=L[4]|0,ft=Sn&8191,dt=Sn>>>13,Rn=L[5]|0,pt=Rn&8191,mt=Rn>>>13,Nn=L[6]|0,gt=Nn&8191,_t=Nn>>>13,On=L[7]|0,yt=On&8191,vt=On>>>13,Fn=L[8]|0,xt=Fn&8191,bt=Fn>>>13,Ln=L[9]|0,Et=Ln&8191,Ct=Ln>>>13;S.negative=y.negative^C.negative,S.length=19,j=Math.imul(T,be),A=Math.imul(T,Ae),A=A+Math.imul(P,be)|0,q=Math.imul(P,Ae);var Mi=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,j=Math.imul(z,be),A=Math.imul(z,Ae),A=A+Math.imul(G,be)|0,q=Math.imul(G,Ae),j=j+Math.imul(T,Ne)|0,A=A+Math.imul(T,We)|0,A=A+Math.imul(P,Ne)|0,q=q+Math.imul(P,We)|0;var Bi=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,j=Math.imul(se,be),A=Math.imul(se,Ae),A=A+Math.imul(X,be)|0,q=Math.imul(X,Ae),j=j+Math.imul(z,Ne)|0,A=A+Math.imul(z,We)|0,A=A+Math.imul(G,Ne)|0,q=q+Math.imul(G,We)|0,j=j+Math.imul(T,Ve)|0,A=A+Math.imul(T,Qe)|0,A=A+Math.imul(P,Ve)|0,q=q+Math.imul(P,Qe)|0;var ji=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(ji>>>26)|0,ji&=67108863,j=Math.imul(U,be),A=Math.imul(U,Ae),A=A+Math.imul(M,be)|0,q=Math.imul(M,Ae),j=j+Math.imul(se,Ne)|0,A=A+Math.imul(se,We)|0,A=A+Math.imul(X,Ne)|0,q=q+Math.imul(X,We)|0,j=j+Math.imul(z,Ve)|0,A=A+Math.imul(z,Qe)|0,A=A+Math.imul(G,Ve)|0,q=q+Math.imul(G,Qe)|0,j=j+Math.imul(T,ct)|0,A=A+Math.imul(T,ht)|0,A=A+Math.imul(P,ct)|0,q=q+Math.imul(P,ht)|0;var qi=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(qi>>>26)|0,qi&=67108863,j=Math.imul(W,be),A=Math.imul(W,Ae),A=A+Math.imul(ne,be)|0,q=Math.imul(ne,Ae),j=j+Math.imul(U,Ne)|0,A=A+Math.imul(U,We)|0,A=A+Math.imul(M,Ne)|0,q=q+Math.imul(M,We)|0,j=j+Math.imul(se,Ve)|0,A=A+Math.imul(se,Qe)|0,A=A+Math.imul(X,Ve)|0,q=q+Math.imul(X,Qe)|0,j=j+Math.imul(z,ct)|0,A=A+Math.imul(z,ht)|0,A=A+Math.imul(G,ct)|0,q=q+Math.imul(G,ht)|0,j=j+Math.imul(T,ft)|0,A=A+Math.imul(T,dt)|0,A=A+Math.imul(P,ft)|0,q=q+Math.imul(P,dt)|0;var Hi=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,j=Math.imul(Q,be),A=Math.imul(Q,Ae),A=A+Math.imul(_e,be)|0,q=Math.imul(_e,Ae),j=j+Math.imul(W,Ne)|0,A=A+Math.imul(W,We)|0,A=A+Math.imul(ne,Ne)|0,q=q+Math.imul(ne,We)|0,j=j+Math.imul(U,Ve)|0,A=A+Math.imul(U,Qe)|0,A=A+Math.imul(M,Ve)|0,q=q+Math.imul(M,Qe)|0,j=j+Math.imul(se,ct)|0,A=A+Math.imul(se,ht)|0,A=A+Math.imul(X,ct)|0,q=q+Math.imul(X,ht)|0,j=j+Math.imul(z,ft)|0,A=A+Math.imul(z,dt)|0,A=A+Math.imul(G,ft)|0,q=q+Math.imul(G,dt)|0,j=j+Math.imul(T,pt)|0,A=A+Math.imul(T,mt)|0,A=A+Math.imul(P,pt)|0,q=q+Math.imul(P,mt)|0;var If=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(If>>>26)|0,If&=67108863,j=Math.imul(ye,be),A=Math.imul(ye,Ae),A=A+Math.imul(Ce,be)|0,q=Math.imul(Ce,Ae),j=j+Math.imul(Q,Ne)|0,A=A+Math.imul(Q,We)|0,A=A+Math.imul(_e,Ne)|0,q=q+Math.imul(_e,We)|0,j=j+Math.imul(W,Ve)|0,A=A+Math.imul(W,Qe)|0,A=A+Math.imul(ne,Ve)|0,q=q+Math.imul(ne,Qe)|0,j=j+Math.imul(U,ct)|0,A=A+Math.imul(U,ht)|0,A=A+Math.imul(M,ct)|0,q=q+Math.imul(M,ht)|0,j=j+Math.imul(se,ft)|0,A=A+Math.imul(se,dt)|0,A=A+Math.imul(X,ft)|0,q=q+Math.imul(X,dt)|0,j=j+Math.imul(z,pt)|0,A=A+Math.imul(z,mt)|0,A=A+Math.imul(G,pt)|0,q=q+Math.imul(G,mt)|0,j=j+Math.imul(T,gt)|0,A=A+Math.imul(T,_t)|0,A=A+Math.imul(P,gt)|0,q=q+Math.imul(P,_t)|0;var kf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(kf>>>26)|0,kf&=67108863,j=Math.imul(Fe,be),A=Math.imul(Fe,Ae),A=A+Math.imul(He,be)|0,q=Math.imul(He,Ae),j=j+Math.imul(ye,Ne)|0,A=A+Math.imul(ye,We)|0,A=A+Math.imul(Ce,Ne)|0,q=q+Math.imul(Ce,We)|0,j=j+Math.imul(Q,Ve)|0,A=A+Math.imul(Q,Qe)|0,A=A+Math.imul(_e,Ve)|0,q=q+Math.imul(_e,Qe)|0,j=j+Math.imul(W,ct)|0,A=A+Math.imul(W,ht)|0,A=A+Math.imul(ne,ct)|0,q=q+Math.imul(ne,ht)|0,j=j+Math.imul(U,ft)|0,A=A+Math.imul(U,dt)|0,A=A+Math.imul(M,ft)|0,q=q+Math.imul(M,dt)|0,j=j+Math.imul(se,pt)|0,A=A+Math.imul(se,mt)|0,A=A+Math.imul(X,pt)|0,q=q+Math.imul(X,mt)|0,j=j+Math.imul(z,gt)|0,A=A+Math.imul(z,_t)|0,A=A+Math.imul(G,gt)|0,q=q+Math.imul(G,_t)|0,j=j+Math.imul(T,yt)|0,A=A+Math.imul(T,vt)|0,A=A+Math.imul(P,yt)|0,q=q+Math.imul(P,vt)|0;var Mf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Mf>>>26)|0,Mf&=67108863,j=Math.imul(Xe,be),A=Math.imul(Xe,Ae),A=A+Math.imul(ot,be)|0,q=Math.imul(ot,Ae),j=j+Math.imul(Fe,Ne)|0,A=A+Math.imul(Fe,We)|0,A=A+Math.imul(He,Ne)|0,q=q+Math.imul(He,We)|0,j=j+Math.imul(ye,Ve)|0,A=A+Math.imul(ye,Qe)|0,A=A+Math.imul(Ce,Ve)|0,q=q+Math.imul(Ce,Qe)|0,j=j+Math.imul(Q,ct)|0,A=A+Math.imul(Q,ht)|0,A=A+Math.imul(_e,ct)|0,q=q+Math.imul(_e,ht)|0,j=j+Math.imul(W,ft)|0,A=A+Math.imul(W,dt)|0,A=A+Math.imul(ne,ft)|0,q=q+Math.imul(ne,dt)|0,j=j+Math.imul(U,pt)|0,A=A+Math.imul(U,mt)|0,A=A+Math.imul(M,pt)|0,q=q+Math.imul(M,mt)|0,j=j+Math.imul(se,gt)|0,A=A+Math.imul(se,_t)|0,A=A+Math.imul(X,gt)|0,q=q+Math.imul(X,_t)|0,j=j+Math.imul(z,yt)|0,A=A+Math.imul(z,vt)|0,A=A+Math.imul(G,yt)|0,q=q+Math.imul(G,vt)|0,j=j+Math.imul(T,xt)|0,A=A+Math.imul(T,bt)|0,A=A+Math.imul(P,xt)|0,q=q+Math.imul(P,bt)|0;var Bf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Bf>>>26)|0,Bf&=67108863,j=Math.imul(nt,be),A=Math.imul(nt,Ae),A=A+Math.imul(rt,be)|0,q=Math.imul(rt,Ae),j=j+Math.imul(Xe,Ne)|0,A=A+Math.imul(Xe,We)|0,A=A+Math.imul(ot,Ne)|0,q=q+Math.imul(ot,We)|0,j=j+Math.imul(Fe,Ve)|0,A=A+Math.imul(Fe,Qe)|0,A=A+Math.imul(He,Ve)|0,q=q+Math.imul(He,Qe)|0,j=j+Math.imul(ye,ct)|0,A=A+Math.imul(ye,ht)|0,A=A+Math.imul(Ce,ct)|0,q=q+Math.imul(Ce,ht)|0,j=j+Math.imul(Q,ft)|0,A=A+Math.imul(Q,dt)|0,A=A+Math.imul(_e,ft)|0,q=q+Math.imul(_e,dt)|0,j=j+Math.imul(W,pt)|0,A=A+Math.imul(W,mt)|0,A=A+Math.imul(ne,pt)|0,q=q+Math.imul(ne,mt)|0,j=j+Math.imul(U,gt)|0,A=A+Math.imul(U,_t)|0,A=A+Math.imul(M,gt)|0,q=q+Math.imul(M,_t)|0,j=j+Math.imul(se,yt)|0,A=A+Math.imul(se,vt)|0,A=A+Math.imul(X,yt)|0,q=q+Math.imul(X,vt)|0,j=j+Math.imul(z,xt)|0,A=A+Math.imul(z,bt)|0,A=A+Math.imul(G,xt)|0,q=q+Math.imul(G,bt)|0,j=j+Math.imul(T,Et)|0,A=A+Math.imul(T,Ct)|0,A=A+Math.imul(P,Et)|0,q=q+Math.imul(P,Ct)|0;var jf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(jf>>>26)|0,jf&=67108863,j=Math.imul(nt,Ne),A=Math.imul(nt,We),A=A+Math.imul(rt,Ne)|0,q=Math.imul(rt,We),j=j+Math.imul(Xe,Ve)|0,A=A+Math.imul(Xe,Qe)|0,A=A+Math.imul(ot,Ve)|0,q=q+Math.imul(ot,Qe)|0,j=j+Math.imul(Fe,ct)|0,A=A+Math.imul(Fe,ht)|0,A=A+Math.imul(He,ct)|0,q=q+Math.imul(He,ht)|0,j=j+Math.imul(ye,ft)|0,A=A+Math.imul(ye,dt)|0,A=A+Math.imul(Ce,ft)|0,q=q+Math.imul(Ce,dt)|0,j=j+Math.imul(Q,pt)|0,A=A+Math.imul(Q,mt)|0,A=A+Math.imul(_e,pt)|0,q=q+Math.imul(_e,mt)|0,j=j+Math.imul(W,gt)|0,A=A+Math.imul(W,_t)|0,A=A+Math.imul(ne,gt)|0,q=q+Math.imul(ne,_t)|0,j=j+Math.imul(U,yt)|0,A=A+Math.imul(U,vt)|0,A=A+Math.imul(M,yt)|0,q=q+Math.imul(M,vt)|0,j=j+Math.imul(se,xt)|0,A=A+Math.imul(se,bt)|0,A=A+Math.imul(X,xt)|0,q=q+Math.imul(X,bt)|0,j=j+Math.imul(z,Et)|0,A=A+Math.imul(z,Ct)|0,A=A+Math.imul(G,Et)|0,q=q+Math.imul(G,Ct)|0;var qf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(qf>>>26)|0,qf&=67108863,j=Math.imul(nt,Ve),A=Math.imul(nt,Qe),A=A+Math.imul(rt,Ve)|0,q=Math.imul(rt,Qe),j=j+Math.imul(Xe,ct)|0,A=A+Math.imul(Xe,ht)|0,A=A+Math.imul(ot,ct)|0,q=q+Math.imul(ot,ht)|0,j=j+Math.imul(Fe,ft)|0,A=A+Math.imul(Fe,dt)|0,A=A+Math.imul(He,ft)|0,q=q+Math.imul(He,dt)|0,j=j+Math.imul(ye,pt)|0,A=A+Math.imul(ye,mt)|0,A=A+Math.imul(Ce,pt)|0,q=q+Math.imul(Ce,mt)|0,j=j+Math.imul(Q,gt)|0,A=A+Math.imul(Q,_t)|0,A=A+Math.imul(_e,gt)|0,q=q+Math.imul(_e,_t)|0,j=j+Math.imul(W,yt)|0,A=A+Math.imul(W,vt)|0,A=A+Math.imul(ne,yt)|0,q=q+Math.imul(ne,vt)|0,j=j+Math.imul(U,xt)|0,A=A+Math.imul(U,bt)|0,A=A+Math.imul(M,xt)|0,q=q+Math.imul(M,bt)|0,j=j+Math.imul(se,Et)|0,A=A+Math.imul(se,Ct)|0,A=A+Math.imul(X,Et)|0,q=q+Math.imul(X,Ct)|0;var Hf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Hf>>>26)|0,Hf&=67108863,j=Math.imul(nt,ct),A=Math.imul(nt,ht),A=A+Math.imul(rt,ct)|0,q=Math.imul(rt,ht),j=j+Math.imul(Xe,ft)|0,A=A+Math.imul(Xe,dt)|0,A=A+Math.imul(ot,ft)|0,q=q+Math.imul(ot,dt)|0,j=j+Math.imul(Fe,pt)|0,A=A+Math.imul(Fe,mt)|0,A=A+Math.imul(He,pt)|0,q=q+Math.imul(He,mt)|0,j=j+Math.imul(ye,gt)|0,A=A+Math.imul(ye,_t)|0,A=A+Math.imul(Ce,gt)|0,q=q+Math.imul(Ce,_t)|0,j=j+Math.imul(Q,yt)|0,A=A+Math.imul(Q,vt)|0,A=A+Math.imul(_e,yt)|0,q=q+Math.imul(_e,vt)|0,j=j+Math.imul(W,xt)|0,A=A+Math.imul(W,bt)|0,A=A+Math.imul(ne,xt)|0,q=q+Math.imul(ne,bt)|0,j=j+Math.imul(U,Et)|0,A=A+Math.imul(U,Ct)|0,A=A+Math.imul(M,Et)|0,q=q+Math.imul(M,Ct)|0;var Uf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Uf>>>26)|0,Uf&=67108863,j=Math.imul(nt,ft),A=Math.imul(nt,dt),A=A+Math.imul(rt,ft)|0,q=Math.imul(rt,dt),j=j+Math.imul(Xe,pt)|0,A=A+Math.imul(Xe,mt)|0,A=A+Math.imul(ot,pt)|0,q=q+Math.imul(ot,mt)|0,j=j+Math.imul(Fe,gt)|0,A=A+Math.imul(Fe,_t)|0,A=A+Math.imul(He,gt)|0,q=q+Math.imul(He,_t)|0,j=j+Math.imul(ye,yt)|0,A=A+Math.imul(ye,vt)|0,A=A+Math.imul(Ce,yt)|0,q=q+Math.imul(Ce,vt)|0,j=j+Math.imul(Q,xt)|0,A=A+Math.imul(Q,bt)|0,A=A+Math.imul(_e,xt)|0,q=q+Math.imul(_e,bt)|0,j=j+Math.imul(W,Et)|0,A=A+Math.imul(W,Ct)|0,A=A+Math.imul(ne,Et)|0,q=q+Math.imul(ne,Ct)|0;var Vf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Vf>>>26)|0,Vf&=67108863,j=Math.imul(nt,pt),A=Math.imul(nt,mt),A=A+Math.imul(rt,pt)|0,q=Math.imul(rt,mt),j=j+Math.imul(Xe,gt)|0,A=A+Math.imul(Xe,_t)|0,A=A+Math.imul(ot,gt)|0,q=q+Math.imul(ot,_t)|0,j=j+Math.imul(Fe,yt)|0,A=A+Math.imul(Fe,vt)|0,A=A+Math.imul(He,yt)|0,q=q+Math.imul(He,vt)|0,j=j+Math.imul(ye,xt)|0,A=A+Math.imul(ye,bt)|0,A=A+Math.imul(Ce,xt)|0,q=q+Math.imul(Ce,bt)|0,j=j+Math.imul(Q,Et)|0,A=A+Math.imul(Q,Ct)|0,A=A+Math.imul(_e,Et)|0,q=q+Math.imul(_e,Ct)|0;var $f=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+($f>>>26)|0,$f&=67108863,j=Math.imul(nt,gt),A=Math.imul(nt,_t),A=A+Math.imul(rt,gt)|0,q=Math.imul(rt,_t),j=j+Math.imul(Xe,yt)|0,A=A+Math.imul(Xe,vt)|0,A=A+Math.imul(ot,yt)|0,q=q+Math.imul(ot,vt)|0,j=j+Math.imul(Fe,xt)|0,A=A+Math.imul(Fe,bt)|0,A=A+Math.imul(He,xt)|0,q=q+Math.imul(He,bt)|0,j=j+Math.imul(ye,Et)|0,A=A+Math.imul(ye,Ct)|0,A=A+Math.imul(Ce,Et)|0,q=q+Math.imul(Ce,Ct)|0;var zf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(zf>>>26)|0,zf&=67108863,j=Math.imul(nt,yt),A=Math.imul(nt,vt),A=A+Math.imul(rt,yt)|0,q=Math.imul(rt,vt),j=j+Math.imul(Xe,xt)|0,A=A+Math.imul(Xe,bt)|0,A=A+Math.imul(ot,xt)|0,q=q+Math.imul(ot,bt)|0,j=j+Math.imul(Fe,Et)|0,A=A+Math.imul(Fe,Ct)|0,A=A+Math.imul(He,Et)|0,q=q+Math.imul(He,Ct)|0;var Kf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Kf>>>26)|0,Kf&=67108863,j=Math.imul(nt,xt),A=Math.imul(nt,bt),A=A+Math.imul(rt,xt)|0,q=Math.imul(rt,bt),j=j+Math.imul(Xe,Et)|0,A=A+Math.imul(Xe,Ct)|0,A=A+Math.imul(ot,Et)|0,q=q+Math.imul(ot,Ct)|0;var Gf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Gf>>>26)|0,Gf&=67108863,j=Math.imul(nt,Et),A=Math.imul(nt,Ct),A=A+Math.imul(rt,Et)|0,q=Math.imul(rt,Ct);var Wf=(K+j|0)+((A&8191)<<13)|0;return K=(q+(A>>>13)|0)+(Wf>>>26)|0,Wf&=67108863,I[0]=Mi,I[1]=Bi,I[2]=ji,I[3]=qi,I[4]=Hi,I[5]=If,I[6]=kf,I[7]=Mf,I[8]=Bf,I[9]=jf,I[10]=qf,I[11]=Hf,I[12]=Uf,I[13]=Vf,I[14]=$f,I[15]=zf,I[16]=Kf,I[17]=Gf,I[18]=Wf,K!==0&&(I[19]=K,S.length++),S};Math.imul||(x=v);function _(k,y,C){C.negative=y.negative^k.negative,C.length=k.length+y.length;for(var S=0,R=0,L=0;L<C.length-1;L++){var I=R;R=0;for(var K=S&67108863,j=Math.min(L,y.length-1),A=Math.max(0,L-k.length+1);A<=j;A++){var q=L-A,B=k.words[q]|0,T=y.words[A]|0,P=B*T,H=P&67108863;I=I+(P/67108864|0)|0,H=H+K|0,K=H&67108863,I=I+(H>>>26)|0,R+=I>>>26,I&=67108863;}C.words[L]=K,S=I,I=R;}return S!==0?C.words[L]=S:C.length--,C._strip()}function E(k,y,C){return _(k,y,C)}s.prototype.mulTo=function(y,C){var S,R=this.length+y.length;return this.length===10&&y.length===10?S=x(this,y,C):R<63?S=v(this,y,C):R<1024?S=_(this,y,C):S=E(this,y,C),S};s.prototype.mul=function(y){var C=new s(null);return C.words=new Array(this.length+y.length),this.mulTo(y,C)},s.prototype.mulf=function(y){var C=new s(null);return C.words=new Array(this.length+y.length),E(this,y,C)},s.prototype.imul=function(y){return this.clone().mulTo(y,this)},s.prototype.imuln=function(y){var C=y<0;C&&(y=-y),r(typeof y=="number"),r(y<67108864);for(var S=0,R=0;R<this.length;R++){var L=(this.words[R]|0)*y,I=(L&67108863)+(S&67108863);S>>=26,S+=L/67108864|0,S+=I>>>26,this.words[R]=I&67108863;}return S!==0&&(this.words[R]=S,this.length++),C?this.ineg():this},s.prototype.muln=function(y){return this.clone().imuln(y)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(y){var C=g(y);if(C.length===0)return new s(1);for(var S=this,R=0;R<C.length&&C[R]===0;R++,S=S.sqr());if(++R<C.length)for(var L=S.sqr();R<C.length;R++,L=L.sqr())C[R]!==0&&(S=S.mul(L));return S},s.prototype.iushln=function(y){r(typeof y=="number"&&y>=0);var C=y%26,S=(y-C)/26,R=67108863>>>26-C<<26-C,L;if(C!==0){var I=0;for(L=0;L<this.length;L++){var K=this.words[L]&R,j=(this.words[L]|0)-K<<C;this.words[L]=j|I,I=K>>>26-C;}I&&(this.words[L]=I,this.length++);}if(S!==0){for(L=this.length-1;L>=0;L--)this.words[L+S]=this.words[L];for(L=0;L<S;L++)this.words[L]=0;this.length+=S;}return this._strip()},s.prototype.ishln=function(y){return r(this.negative===0),this.iushln(y)},s.prototype.iushrn=function(y,C,S){r(typeof y=="number"&&y>=0);var R;C?R=(C-C%26)/26:R=0;var L=y%26,I=Math.min((y-L)/26,this.length),K=67108863^67108863>>>L<<L,j=S;if(R-=I,R=Math.max(0,R),j){for(var A=0;A<I;A++)j.words[A]=this.words[A];j.length=I;}if(I!==0)if(this.length>I)for(this.length-=I,A=0;A<this.length;A++)this.words[A]=this.words[A+I];else this.words[0]=0,this.length=1;var q=0;for(A=this.length-1;A>=0&&(q!==0||A>=R);A--){var B=this.words[A]|0;this.words[A]=q<<26-L|B>>>L,q=B&K;}return j&&q!==0&&(j.words[j.length++]=q),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(y,C,S){return r(this.negative===0),this.iushrn(y,C,S)},s.prototype.shln=function(y){return this.clone().ishln(y)},s.prototype.ushln=function(y){return this.clone().iushln(y)},s.prototype.shrn=function(y){return this.clone().ishrn(y)},s.prototype.ushrn=function(y){return this.clone().iushrn(y)},s.prototype.testn=function(y){r(typeof y=="number"&&y>=0);var C=y%26,S=(y-C)/26,R=1<<C;if(this.length<=S)return !1;var L=this.words[S];return !!(L&R)},s.prototype.imaskn=function(y){r(typeof y=="number"&&y>=0);var C=y%26,S=(y-C)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(C!==0&&S++,this.length=Math.min(S,this.length),C!==0){var R=67108863^67108863>>>C<<C;this.words[this.length-1]&=R;}return this._strip()},s.prototype.maskn=function(y){return this.clone().imaskn(y)},s.prototype.iaddn=function(y){return r(typeof y=="number"),r(y<67108864),y<0?this.isubn(-y):this.negative!==0?this.length===1&&(this.words[0]|0)<=y?(this.words[0]=y-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(y),this.negative=1,this):this._iaddn(y)},s.prototype._iaddn=function(y){this.words[0]+=y;for(var C=0;C<this.length&&this.words[C]>=67108864;C++)this.words[C]-=67108864,C===this.length-1?this.words[C+1]=1:this.words[C+1]++;return this.length=Math.max(this.length,C+1),this},s.prototype.isubn=function(y){if(r(typeof y=="number"),r(y<67108864),y<0)return this.iaddn(-y);if(this.negative!==0)return this.negative=0,this.iaddn(y),this.negative=1,this;if(this.words[0]-=y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var C=0;C<this.length&&this.words[C]<0;C++)this.words[C]+=67108864,this.words[C+1]-=1;return this._strip()},s.prototype.addn=function(y){return this.clone().iaddn(y)},s.prototype.subn=function(y){return this.clone().isubn(y)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(y,C,S){var R=y.length+S,L;this._expand(R);var I,K=0;for(L=0;L<y.length;L++){I=(this.words[L+S]|0)+K;var j=(y.words[L]|0)*C;I-=j&67108863,K=(I>>26)-(j/67108864|0),this.words[L+S]=I&67108863;}for(;L<this.length-S;L++)I=(this.words[L+S]|0)+K,K=I>>26,this.words[L+S]=I&67108863;if(K===0)return this._strip();for(r(K===-1),K=0,L=0;L<this.length;L++)I=-(this.words[L]|0)+K,K=I>>26,this.words[L]=I&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(y,C){var S=this.length-y.length,R=this.clone(),L=y,I=L.words[L.length-1]|0,K=this._countBits(I);S=26-K,S!==0&&(L=L.ushln(S),R.iushln(S),I=L.words[L.length-1]|0);var j=R.length-L.length,A;if(C!=="mod"){A=new s(null),A.length=j+1,A.words=new Array(A.length);for(var q=0;q<A.length;q++)A.words[q]=0;}var B=R.clone()._ishlnsubmul(L,1,j);B.negative===0&&(R=B,A&&(A.words[j]=1));for(var T=j-1;T>=0;T--){var P=(R.words[L.length+T]|0)*67108864+(R.words[L.length+T-1]|0);for(P=Math.min(P/I|0,67108863),R._ishlnsubmul(L,P,T);R.negative!==0;)P--,R.negative=0,R._ishlnsubmul(L,1,T),R.isZero()||(R.negative^=1);A&&(A.words[T]=P);}return A&&A._strip(),R._strip(),C!=="div"&&S!==0&&R.iushrn(S),{div:A||null,mod:R}},s.prototype.divmod=function(y,C,S){if(r(!y.isZero()),this.isZero())return {div:new s(0),mod:new s(0)};var R,L,I;return this.negative!==0&&y.negative===0?(I=this.neg().divmod(y,C),C!=="mod"&&(R=I.div.neg()),C!=="div"&&(L=I.mod.neg(),S&&L.negative!==0&&L.iadd(y)),{div:R,mod:L}):this.negative===0&&y.negative!==0?(I=this.divmod(y.neg(),C),C!=="mod"&&(R=I.div.neg()),{div:R,mod:I.mod}):this.negative&y.negative?(I=this.neg().divmod(y.neg(),C),C!=="div"&&(L=I.mod.neg(),S&&L.negative!==0&&L.isub(y)),{div:I.div,mod:L}):y.length>this.length||this.cmp(y)<0?{div:new s(0),mod:this}:y.length===1?C==="div"?{div:this.divn(y.words[0]),mod:null}:C==="mod"?{div:null,mod:new s(this.modrn(y.words[0]))}:{div:this.divn(y.words[0]),mod:new s(this.modrn(y.words[0]))}:this._wordDiv(y,C)},s.prototype.div=function(y){return this.divmod(y,"div",!1).div},s.prototype.mod=function(y){return this.divmod(y,"mod",!1).mod},s.prototype.umod=function(y){return this.divmod(y,"mod",!0).mod},s.prototype.divRound=function(y){var C=this.divmod(y);if(C.mod.isZero())return C.div;var S=C.div.negative!==0?C.mod.isub(y):C.mod,R=y.ushrn(1),L=y.andln(1),I=S.cmp(R);return I<0||L===1&&I===0?C.div:C.div.negative!==0?C.div.isubn(1):C.div.iaddn(1)},s.prototype.modrn=function(y){var C=y<0;C&&(y=-y),r(y<=67108863);for(var S=(1<<26)%y,R=0,L=this.length-1;L>=0;L--)R=(S*R+(this.words[L]|0))%y;return C?-R:R},s.prototype.modn=function(y){return this.modrn(y)},s.prototype.idivn=function(y){var C=y<0;C&&(y=-y),r(y<=67108863);for(var S=0,R=this.length-1;R>=0;R--){var L=(this.words[R]|0)+S*67108864;this.words[R]=L/y|0,S=L%y;}return this._strip(),C?this.ineg():this},s.prototype.divn=function(y){return this.clone().idivn(y)},s.prototype.egcd=function(y){r(y.negative===0),r(!y.isZero());var C=this,S=y.clone();C.negative!==0?C=C.umod(y):C=C.clone();for(var R=new s(1),L=new s(0),I=new s(0),K=new s(1),j=0;C.isEven()&&S.isEven();)C.iushrn(1),S.iushrn(1),++j;for(var A=S.clone(),q=C.clone();!C.isZero();){for(var B=0,T=1;!(C.words[0]&T)&&B<26;++B,T<<=1);if(B>0)for(C.iushrn(B);B-- >0;)(R.isOdd()||L.isOdd())&&(R.iadd(A),L.isub(q)),R.iushrn(1),L.iushrn(1);for(var P=0,H=1;!(S.words[0]&H)&&P<26;++P,H<<=1);if(P>0)for(S.iushrn(P);P-- >0;)(I.isOdd()||K.isOdd())&&(I.iadd(A),K.isub(q)),I.iushrn(1),K.iushrn(1);C.cmp(S)>=0?(C.isub(S),R.isub(I),L.isub(K)):(S.isub(C),I.isub(R),K.isub(L));}return {a:I,b:K,gcd:S.iushln(j)}},s.prototype._invmp=function(y){r(y.negative===0),r(!y.isZero());var C=this,S=y.clone();C.negative!==0?C=C.umod(y):C=C.clone();for(var R=new s(1),L=new s(0),I=S.clone();C.cmpn(1)>0&&S.cmpn(1)>0;){for(var K=0,j=1;!(C.words[0]&j)&&K<26;++K,j<<=1);if(K>0)for(C.iushrn(K);K-- >0;)R.isOdd()&&R.iadd(I),R.iushrn(1);for(var A=0,q=1;!(S.words[0]&q)&&A<26;++A,q<<=1);if(A>0)for(S.iushrn(A);A-- >0;)L.isOdd()&&L.iadd(I),L.iushrn(1);C.cmp(S)>=0?(C.isub(S),R.isub(L)):(S.isub(C),L.isub(R));}var B;return C.cmpn(1)===0?B=R:B=L,B.cmpn(0)<0&&B.iadd(y),B},s.prototype.gcd=function(y){if(this.isZero())return y.abs();if(y.isZero())return this.abs();var C=this.clone(),S=y.clone();C.negative=0,S.negative=0;for(var R=0;C.isEven()&&S.isEven();R++)C.iushrn(1),S.iushrn(1);do{for(;C.isEven();)C.iushrn(1);for(;S.isEven();)S.iushrn(1);var L=C.cmp(S);if(L<0){var I=C;C=S,S=I;}else if(L===0||S.cmpn(1)===0)break;C.isub(S);}while(!0);return S.iushln(R)},s.prototype.invm=function(y){return this.egcd(y).a.umod(y)},s.prototype.isEven=function(){return (this.words[0]&1)===0},s.prototype.isOdd=function(){return (this.words[0]&1)===1},s.prototype.andln=function(y){return this.words[0]&y},s.prototype.bincn=function(y){r(typeof y=="number");var C=y%26,S=(y-C)/26,R=1<<C;if(this.length<=S)return this._expand(S+1),this.words[S]|=R,this;for(var L=R,I=S;L!==0&&I<this.length;I++){var K=this.words[I]|0;K+=L,L=K>>>26,K&=67108863,this.words[I]=K;}return L!==0&&(this.words[I]=L,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(y){var C=y<0;if(this.negative!==0&&!C)return -1;if(this.negative===0&&C)return 1;this._strip();var S;if(this.length>1)S=1;else {C&&(y=-y),r(y<=67108863,"Number is too big");var R=this.words[0]|0;S=R===y?0:R<y?-1:1;}return this.negative!==0?-S|0:S},s.prototype.cmp=function(y){if(this.negative!==0&&y.negative===0)return -1;if(this.negative===0&&y.negative!==0)return 1;var C=this.ucmp(y);return this.negative!==0?-C|0:C},s.prototype.ucmp=function(y){if(this.length>y.length)return 1;if(this.length<y.length)return -1;for(var C=0,S=this.length-1;S>=0;S--){var R=this.words[S]|0,L=y.words[S]|0;if(R!==L){R<L?C=-1:R>L&&(C=1);break}}return C},s.prototype.gtn=function(y){return this.cmpn(y)===1},s.prototype.gt=function(y){return this.cmp(y)===1},s.prototype.gten=function(y){return this.cmpn(y)>=0},s.prototype.gte=function(y){return this.cmp(y)>=0},s.prototype.ltn=function(y){return this.cmpn(y)===-1},s.prototype.lt=function(y){return this.cmp(y)===-1},s.prototype.lten=function(y){return this.cmpn(y)<=0},s.prototype.lte=function(y){return this.cmp(y)<=0},s.prototype.eqn=function(y){return this.cmpn(y)===0},s.prototype.eq=function(y){return this.cmp(y)===0},s.red=function(y){return new te(y)},s.prototype.toRed=function(y){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),y.convertTo(this)._forceRed(y)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(y){return this.red=y,this},s.prototype.forceRed=function(y){return r(!this.red,"Already a number in reduction context"),this._forceRed(y)},s.prototype.redAdd=function(y){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,y)},s.prototype.redIAdd=function(y){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,y)},s.prototype.redSub=function(y){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,y)},s.prototype.redISub=function(y){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,y)},s.prototype.redShl=function(y){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,y)},s.prototype.redMul=function(y){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.mul(this,y)},s.prototype.redIMul=function(y){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.imul(this,y)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(y){return r(this.red&&!y.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,y)};var w={k256:null,p224:null,p192:null,p25519:null};function D(k,y){this.name=k,this.p=new s(y,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}D.prototype._tmp=function(){var y=new s(null);return y.words=new Array(Math.ceil(this.n/13)),y},D.prototype.ireduce=function(y){var C=y,S;do this.split(C,this.tmp),C=this.imulK(C),C=C.iadd(this.tmp),S=C.bitLength();while(S>this.n);var R=S<this.n?-1:C.ucmp(this.p);return R===0?(C.words[0]=0,C.length=1):R>0?C.isub(this.p):C.strip!==void 0?C.strip():C._strip(),C},D.prototype.split=function(y,C){y.iushrn(this.n,0,C);},D.prototype.imulK=function(y){return y.imul(this.k)};function N(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}i(N,D),N.prototype.split=function(y,C){for(var S=4194303,R=Math.min(y.length,9),L=0;L<R;L++)C.words[L]=y.words[L];if(C.length=R,y.length<=9){y.words[0]=0,y.length=1;return}var I=y.words[9];for(C.words[C.length++]=I&S,L=10;L<y.length;L++){var K=y.words[L]|0;y.words[L-10]=(K&S)<<4|I>>>22,I=K;}I>>>=22,y.words[L-10]=I,I===0&&y.length>10?y.length-=10:y.length-=9;},N.prototype.imulK=function(y){y.words[y.length]=0,y.words[y.length+1]=0,y.length+=2;for(var C=0,S=0;S<y.length;S++){var R=y.words[S]|0;C+=R*977,y.words[S]=C&67108863,C=R*64+(C/67108864|0);}return y.words[y.length-1]===0&&(y.length--,y.words[y.length-1]===0&&y.length--),y};function F(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}i(F,D);function V(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}i(V,D);function Z(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}i(Z,D),Z.prototype.imulK=function(y){for(var C=0,S=0;S<y.length;S++){var R=(y.words[S]|0)*19+C,L=R&67108863;R>>>=26,y.words[S]=L,C=R;}return C!==0&&(y.words[y.length++]=C),y},s._prime=function(y){if(w[y])return w[y];var C;if(y==="k256")C=new N;else if(y==="p224")C=new F;else if(y==="p192")C=new V;else if(y==="p25519")C=new Z;else throw new Error("Unknown prime "+y);return w[y]=C,C};function te(k){if(typeof k=="string"){var y=s._prime(k);this.m=y.p,this.prime=y;}else r(k.gtn(1),"modulus must be greater than 1"),this.m=k,this.prime=null;}te.prototype._verify1=function(y){r(y.negative===0,"red works only with positives"),r(y.red,"red works only with red numbers");},te.prototype._verify2=function(y,C){r((y.negative|C.negative)===0,"red works only with positives"),r(y.red&&y.red===C.red,"red works only with red numbers");},te.prototype.imod=function(y){return this.prime?this.prime.ireduce(y)._forceRed(this):(l(y,y.umod(this.m)._forceRed(this)),y)},te.prototype.neg=function(y){return y.isZero()?y.clone():this.m.sub(y)._forceRed(this)},te.prototype.add=function(y,C){this._verify2(y,C);var S=y.add(C);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},te.prototype.iadd=function(y,C){this._verify2(y,C);var S=y.iadd(C);return S.cmp(this.m)>=0&&S.isub(this.m),S},te.prototype.sub=function(y,C){this._verify2(y,C);var S=y.sub(C);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},te.prototype.isub=function(y,C){this._verify2(y,C);var S=y.isub(C);return S.cmpn(0)<0&&S.iadd(this.m),S},te.prototype.shl=function(y,C){return this._verify1(y),this.imod(y.ushln(C))},te.prototype.imul=function(y,C){return this._verify2(y,C),this.imod(y.imul(C))},te.prototype.mul=function(y,C){return this._verify2(y,C),this.imod(y.mul(C))},te.prototype.isqr=function(y){return this.imul(y,y.clone())},te.prototype.sqr=function(y){return this.mul(y,y)},te.prototype.sqrt=function(y){if(y.isZero())return y.clone();var C=this.m.andln(3);if(r(C%2===1),C===3){var S=this.m.add(new s(1)).iushrn(2);return this.pow(y,S)}for(var R=this.m.subn(1),L=0;!R.isZero()&&R.andln(1)===0;)L++,R.iushrn(1);r(!R.isZero());var I=new s(1).toRed(this),K=I.redNeg(),j=this.m.subn(1).iushrn(1),A=this.m.bitLength();for(A=new s(2*A*A).toRed(this);this.pow(A,j).cmp(K)!==0;)A.redIAdd(K);for(var q=this.pow(A,R),B=this.pow(y,R.addn(1).iushrn(1)),T=this.pow(y,R),P=L;T.cmp(I)!==0;){for(var H=T,z=0;H.cmp(I)!==0;z++)H=H.redSqr();r(z<P);var G=this.pow(q,new s(1).iushln(P-z-1));B=B.redMul(G),q=G.redSqr(),T=T.redMul(q),P=z;}return B},te.prototype.invm=function(y){var C=y._invmp(this.m);return C.negative!==0?(C.negative=0,this.imod(C).redNeg()):this.imod(C)},te.prototype.pow=function(y,C){if(C.isZero())return new s(1).toRed(this);if(C.cmpn(1)===0)return y.clone();var S=4,R=new Array(1<<S);R[0]=new s(1).toRed(this),R[1]=y;for(var L=2;L<R.length;L++)R[L]=this.mul(R[L-1],y);var I=R[0],K=0,j=0,A=C.bitLength()%26;for(A===0&&(A=26),L=C.length-1;L>=0;L--){for(var q=C.words[L],B=A-1;B>=0;B--){var T=q>>B&1;if(I!==R[0]&&(I=this.sqr(I)),T===0&&K===0){j=0;continue}K<<=1,K|=T,j++,!(j!==S&&(L!==0||B!==0))&&(I=this.mul(I,R[K]),j=0,K=0);}A=26;}return I},te.prototype.convertTo=function(y){var C=y.umod(this.m);return C===y?C.clone():C},te.prototype.convertFrom=function(y){var C=y.clone();return C.red=null,C},s.mont=function(y){return new ae(y)};function ae(k){te.call(this,k),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv);}i(ae,te),ae.prototype.convertTo=function(y){return this.imod(y.ushln(this.shift))},ae.prototype.convertFrom=function(y){var C=this.imod(y.mul(this.rinv));return C.red=null,C},ae.prototype.imul=function(y,C){if(y.isZero()||C.isZero())return y.words[0]=0,y.length=1,y;var S=y.imul(C),R=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=S.isub(R).iushrn(this.shift),I=L;return L.cmp(this.m)>=0?I=L.isub(this.m):L.cmpn(0)<0&&(I=L.iadd(this.m)),I._forceRed(this)},ae.prototype.mul=function(y,C){if(y.isZero()||C.isZero())return new s(0)._forceRed(this);var S=y.mul(C),R=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=S.isub(R).iushrn(this.shift),I=L;return L.cmp(this.m)>=0?I=L.isub(this.m):L.cmpn(0)<0&&(I=L.iadd(this.m)),I._forceRed(this)},ae.prototype.invm=function(y){var C=this.imod(y._invmp(this.m).mul(this.r2));return C._forceRed(this)};})(typeof L0=="undefined"||L0,wx);});var Jx=$((QJ,Ll)=>{(function(){var t="input is invalid type",e="finalize already called",r=typeof window=="object",i=r?window:{};i.JS_SHA3_NO_WINDOW&&(r=!1);var s=!r&&typeof self=="object",n=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;n?i=global:s&&(i=self);var o=!i.JS_SHA3_NO_COMMON_JS&&typeof Ll=="object"&&Ll.exports,a=typeof define=="function"&&define.amd,u=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",l="0123456789abcdef".split(""),h=[31,7936,2031616,520093696],c=[4,1024,262144,67108864],d=[1,256,65536,16777216],f=[6,1536,393216,100663296],m=[0,8,16,24],g=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],v=[224,256,384,512],x=[128,256],_=["hex","buffer","arrayBuffer","array","digest"],E={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(T){return Object.prototype.toString.call(T)==="[object Array]"}),u&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(T){return typeof T=="object"&&T.buffer&&T.buffer.constructor===ArrayBuffer});for(var b=function(T,P,H){return function(z){return new A(T,P,T).update(z)[H]()}},w=function(T,P,H){return function(z,G){return new A(T,P,G).update(z)[H]()}},D=function(T,P,H){return function(z,G,oe,se){return y["cshake"+T].update(z,G,oe,se)[H]()}},N=function(T,P,H){return function(z,G,oe,se){return y["kmac"+T].update(z,G,oe,se)[H]()}},F=function(T,P,H,z){for(var G=0;G<_.length;++G){var oe=_[G];T[oe]=P(H,z,oe);}return T},V=function(T,P){var H=b(T,P,"hex");return H.create=function(){return new A(T,P,T)},H.update=function(z){return H.create().update(z)},F(H,b,T,P)},Z=function(T,P){var H=w(T,P,"hex");return H.create=function(z){return new A(T,P,z)},H.update=function(z,G){return H.create(G).update(z)},F(H,w,T,P)},te=function(T,P){var H=E[T],z=D(T,P,"hex");return z.create=function(G,oe,se){return !oe&&!se?y["shake"+T].create(G):new A(T,P,G).bytepad([oe,se],H)},z.update=function(G,oe,se,X){return z.create(oe,se,X).update(G)},F(z,D,T,P)},ae=function(T,P){var H=E[T],z=N(T,P,"hex");return z.create=function(G,oe,se){return new q(T,P,oe).bytepad(["KMAC",se],H).bytepad([G],H)},z.update=function(G,oe,se,X){return z.create(G,se,X).update(oe)},F(z,N,T,P)},k=[{name:"keccak",padding:d,bits:v,createMethod:V},{name:"sha3",padding:f,bits:v,createMethod:V},{name:"shake",padding:h,bits:x,createMethod:Z},{name:"cshake",padding:c,bits:x,createMethod:te},{name:"kmac",padding:c,bits:x,createMethod:ae}],y={},C=[],S=0;S<k.length;++S)for(var R=k[S],L=R.bits,I=0;I<L.length;++I){var K=R.name+"_"+L[I];if(C.push(K),y[K]=R.createMethod(L[I],R.padding),R.name!=="sha3"){var j=R.name+L[I];C.push(j),y[j]=y[K];}}function A(T,P,H){this.blocks=[],this.s=[],this.padding=P,this.outputBits=H,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(T<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=H>>5,this.extraBytes=(H&31)>>3;for(var z=0;z<50;++z)this.s[z]=0;}A.prototype.update=function(T){if(this.finalized)throw new Error(e);var P,H=typeof T;if(H!=="string"){if(H==="object"){if(T===null)throw new Error(t);if(u&&T.constructor===ArrayBuffer)T=new Uint8Array(T);else if(!Array.isArray(T)&&(!u||!ArrayBuffer.isView(T)))throw new Error(t)}else throw new Error(t);P=!0;}for(var z=this.blocks,G=this.byteCount,oe=T.length,se=this.blockCount,X=0,ee=this.s,U,M;X<oe;){if(this.reset)for(this.reset=!1,z[0]=this.block,U=1;U<se+1;++U)z[U]=0;if(P)for(U=this.start;X<oe&&U<G;++X)z[U>>2]|=T[X]<<m[U++&3];else for(U=this.start;X<oe&&U<G;++X)M=T.charCodeAt(X),M<128?z[U>>2]|=M<<m[U++&3]:M<2048?(z[U>>2]|=(192|M>>6)<<m[U++&3],z[U>>2]|=(128|M&63)<<m[U++&3]):M<55296||M>=57344?(z[U>>2]|=(224|M>>12)<<m[U++&3],z[U>>2]|=(128|M>>6&63)<<m[U++&3],z[U>>2]|=(128|M&63)<<m[U++&3]):(M=65536+((M&1023)<<10|T.charCodeAt(++X)&1023),z[U>>2]|=(240|M>>18)<<m[U++&3],z[U>>2]|=(128|M>>12&63)<<m[U++&3],z[U>>2]|=(128|M>>6&63)<<m[U++&3],z[U>>2]|=(128|M&63)<<m[U++&3]);if(this.lastByteIndex=U,U>=G){for(this.start=U-G,this.block=z[se],U=0;U<se;++U)ee[U]^=z[U];B(ee),this.reset=!0;}else this.start=U;}return this},A.prototype.encode=function(T,P){var H=T&255,z=1,G=[H];for(T=T>>8,H=T&255;H>0;)G.unshift(H),T=T>>8,H=T&255,++z;return P?G.push(z):G.unshift(z),this.update(G),G.length},A.prototype.encodeString=function(T){var P,H=typeof T;if(H!=="string"){if(H==="object"){if(T===null)throw new Error(t);if(u&&T.constructor===ArrayBuffer)T=new Uint8Array(T);else if(!Array.isArray(T)&&(!u||!ArrayBuffer.isView(T)))throw new Error(t)}else throw new Error(t);P=!0;}var z=0,G=T.length;if(P)z=G;else for(var oe=0;oe<T.length;++oe){var se=T.charCodeAt(oe);se<128?z+=1:se<2048?z+=2:se<55296||se>=57344?z+=3:(se=65536+((se&1023)<<10|T.charCodeAt(++oe)&1023),z+=4);}return z+=this.encode(z*8),this.update(T),z},A.prototype.bytepad=function(T,P){for(var H=this.encode(P),z=0;z<T.length;++z)H+=this.encodeString(T[z]);var G=P-H%P,oe=[];return oe.length=G,this.update(oe),this},A.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var T=this.blocks,P=this.lastByteIndex,H=this.blockCount,z=this.s;if(T[P>>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(T[0]=T[H],P=1;P<H+1;++P)T[P]=0;for(T[H-1]|=2147483648,P=0;P<H;++P)z[P]^=T[P];B(z);}},A.prototype.toString=A.prototype.hex=function(){this.finalize();for(var T=this.blockCount,P=this.s,H=this.outputBlocks,z=this.extraBytes,G=0,oe=0,se="",X;oe<H;){for(G=0;G<T&&oe<H;++G,++oe)X=P[G],se+=l[X>>4&15]+l[X&15]+l[X>>12&15]+l[X>>8&15]+l[X>>20&15]+l[X>>16&15]+l[X>>28&15]+l[X>>24&15];oe%T===0&&(B(P),G=0);}return z&&(X=P[G],se+=l[X>>4&15]+l[X&15],z>1&&(se+=l[X>>12&15]+l[X>>8&15]),z>2&&(se+=l[X>>20&15]+l[X>>16&15])),se},A.prototype.arrayBuffer=function(){this.finalize();var T=this.blockCount,P=this.s,H=this.outputBlocks,z=this.extraBytes,G=0,oe=0,se=this.outputBits>>3,X;z?X=new ArrayBuffer(H+1<<2):X=new ArrayBuffer(se);for(var ee=new Uint32Array(X);oe<H;){for(G=0;G<T&&oe<H;++G,++oe)ee[oe]=P[G];oe%T===0&&B(P);}return z&&(ee[G]=P[G],X=X.slice(0,se)),X},A.prototype.buffer=A.prototype.arrayBuffer,A.prototype.digest=A.prototype.array=function(){this.finalize();for(var T=this.blockCount,P=this.s,H=this.outputBlocks,z=this.extraBytes,G=0,oe=0,se=[],X,ee;oe<H;){for(G=0;G<T&&oe<H;++G,++oe)X=oe<<2,ee=P[G],se[X]=ee&255,se[X+1]=ee>>8&255,se[X+2]=ee>>16&255,se[X+3]=ee>>24&255;oe%T===0&&B(P);}return z&&(X=oe<<2,ee=P[G],se[X]=ee&255,z>1&&(se[X+1]=ee>>8&255),z>2&&(se[X+2]=ee>>16&255)),se};function q(T,P,H){A.call(this,T,P,H);}q.prototype=new A,q.prototype.finalize=function(){return this.encode(this.outputBits,!0),A.prototype.finalize.call(this)};var B=function(T){var P,H,z,G,oe,se,X,ee,U,M,J,W,ne,le,Q,_e,Se,ye,Ce,tt,Fe,He,Yt,Xe,ot,pi,nt,rt,ce,be,Ae,Le,Ne,We,lt,Ve,Qe,Dn,ct,ht,Sn,ft,dt,Rn,pt,mt,Nn,gt,_t,On,yt,vt,Fn,xt,bt,Ln,Et,Ct,Mi,Bi,ji,qi,Hi;for(z=0;z<48;z+=2)G=T[0]^T[10]^T[20]^T[30]^T[40],oe=T[1]^T[11]^T[21]^T[31]^T[41],se=T[2]^T[12]^T[22]^T[32]^T[42],X=T[3]^T[13]^T[23]^T[33]^T[43],ee=T[4]^T[14]^T[24]^T[34]^T[44],U=T[5]^T[15]^T[25]^T[35]^T[45],M=T[6]^T[16]^T[26]^T[36]^T[46],J=T[7]^T[17]^T[27]^T[37]^T[47],W=T[8]^T[18]^T[28]^T[38]^T[48],ne=T[9]^T[19]^T[29]^T[39]^T[49],P=W^(se<<1|X>>>31),H=ne^(X<<1|se>>>31),T[0]^=P,T[1]^=H,T[10]^=P,T[11]^=H,T[20]^=P,T[21]^=H,T[30]^=P,T[31]^=H,T[40]^=P,T[41]^=H,P=G^(ee<<1|U>>>31),H=oe^(U<<1|ee>>>31),T[2]^=P,T[3]^=H,T[12]^=P,T[13]^=H,T[22]^=P,T[23]^=H,T[32]^=P,T[33]^=H,T[42]^=P,T[43]^=H,P=se^(M<<1|J>>>31),H=X^(J<<1|M>>>31),T[4]^=P,T[5]^=H,T[14]^=P,T[15]^=H,T[24]^=P,T[25]^=H,T[34]^=P,T[35]^=H,T[44]^=P,T[45]^=H,P=ee^(W<<1|ne>>>31),H=U^(ne<<1|W>>>31),T[6]^=P,T[7]^=H,T[16]^=P,T[17]^=H,T[26]^=P,T[27]^=H,T[36]^=P,T[37]^=H,T[46]^=P,T[47]^=H,P=M^(G<<1|oe>>>31),H=J^(oe<<1|G>>>31),T[8]^=P,T[9]^=H,T[18]^=P,T[19]^=H,T[28]^=P,T[29]^=H,T[38]^=P,T[39]^=H,T[48]^=P,T[49]^=H,le=T[0],Q=T[1],mt=T[11]<<4|T[10]>>>28,Nn=T[10]<<4|T[11]>>>28,rt=T[20]<<3|T[21]>>>29,ce=T[21]<<3|T[20]>>>29,Bi=T[31]<<9|T[30]>>>23,ji=T[30]<<9|T[31]>>>23,ft=T[40]<<18|T[41]>>>14,dt=T[41]<<18|T[40]>>>14,We=T[2]<<1|T[3]>>>31,lt=T[3]<<1|T[2]>>>31,_e=T[13]<<12|T[12]>>>20,Se=T[12]<<12|T[13]>>>20,gt=T[22]<<10|T[23]>>>22,_t=T[23]<<10|T[22]>>>22,be=T[33]<<13|T[32]>>>19,Ae=T[32]<<13|T[33]>>>19,qi=T[42]<<2|T[43]>>>30,Hi=T[43]<<2|T[42]>>>30,xt=T[5]<<30|T[4]>>>2,bt=T[4]<<30|T[5]>>>2,Ve=T[14]<<6|T[15]>>>26,Qe=T[15]<<6|T[14]>>>26,ye=T[25]<<11|T[24]>>>21,Ce=T[24]<<11|T[25]>>>21,On=T[34]<<15|T[35]>>>17,yt=T[35]<<15|T[34]>>>17,Le=T[45]<<29|T[44]>>>3,Ne=T[44]<<29|T[45]>>>3,Xe=T[6]<<28|T[7]>>>4,ot=T[7]<<28|T[6]>>>4,Ln=T[17]<<23|T[16]>>>9,Et=T[16]<<23|T[17]>>>9,Dn=T[26]<<25|T[27]>>>7,ct=T[27]<<25|T[26]>>>7,tt=T[36]<<21|T[37]>>>11,Fe=T[37]<<21|T[36]>>>11,vt=T[47]<<24|T[46]>>>8,Fn=T[46]<<24|T[47]>>>8,Rn=T[8]<<27|T[9]>>>5,pt=T[9]<<27|T[8]>>>5,pi=T[18]<<20|T[19]>>>12,nt=T[19]<<20|T[18]>>>12,Ct=T[29]<<7|T[28]>>>25,Mi=T[28]<<7|T[29]>>>25,ht=T[38]<<8|T[39]>>>24,Sn=T[39]<<8|T[38]>>>24,He=T[48]<<14|T[49]>>>18,Yt=T[49]<<14|T[48]>>>18,T[0]=le^~_e&ye,T[1]=Q^~Se&Ce,T[10]=Xe^~pi&rt,T[11]=ot^~nt&ce,T[20]=We^~Ve&Dn,T[21]=lt^~Qe&ct,T[30]=Rn^~mt&gt,T[31]=pt^~Nn&_t,T[40]=xt^~Ln&Ct,T[41]=bt^~Et&Mi,T[2]=_e^~ye&tt,T[3]=Se^~Ce&Fe,T[12]=pi^~rt&be,T[13]=nt^~ce&Ae,T[22]=Ve^~Dn&ht,T[23]=Qe^~ct&Sn,T[32]=mt^~gt&On,T[33]=Nn^~_t&yt,T[42]=Ln^~Ct&Bi,T[43]=Et^~Mi&ji,T[4]=ye^~tt&He,T[5]=Ce^~Fe&Yt,T[14]=rt^~be&Le,T[15]=ce^~Ae&Ne,T[24]=Dn^~ht&ft,T[25]=ct^~Sn&dt,T[34]=gt^~On&vt,T[35]=_t^~yt&Fn,T[44]=Ct^~Bi&qi,T[45]=Mi^~ji&Hi,T[6]=tt^~He&le,T[7]=Fe^~Yt&Q,T[16]=be^~Le&Xe,T[17]=Ae^~Ne&ot,T[26]=ht^~ft&We,T[27]=Sn^~dt&lt,T[36]=On^~vt&Rn,T[37]=yt^~Fn&pt,T[46]=Bi^~qi&xt,T[47]=ji^~Hi&bt,T[8]=He^~le&_e,T[9]=Yt^~Q&Se,T[18]=Le^~Xe&pi,T[19]=Ne^~ot&nt,T[28]=ft^~We&Ve,T[29]=dt^~lt&Qe,T[38]=vt^~Rn&mt,T[39]=Fn^~pt&Nn,T[48]=qi^~xt&Ln,T[49]=Hi^~bt&Et,T[0]^=g[z],T[1]^=g[z+1];};if(o)Ll.exports=y;else {for(S=0;S<C.length;++S)i[C[S]]=y[C[S]];a&&define(function(){return y});}})();});var KE=$(Jp=>{var l7=Object.create,ka=Object.defineProperty,c7=Object.getPrototypeOf,cb=Object.prototype.hasOwnProperty,h7=Object.getOwnPropertyNames,f7=Object.getOwnPropertyDescriptor,ab=Object.getOwnPropertySymbols,d7=Object.prototype.propertyIsEnumerable,ub=(t,e,r)=>e in t?ka(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Wl=(t,e)=>{for(var r in e||(e={}))cb.call(e,r)&&ub(t,r,e[r]);if(ab)for(var r of ab(e))d7.call(e,r)&&ub(t,r,e[r]);return t},hb=t=>ka(t,"__esModule",{value:!0}),re=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),p7=(t,e)=>{for(var r in e)ka(t,r,{get:e[r],enumerable:!0});},m7=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of h7(e))!cb.call(t,i)&&i!=="default"&&ka(t,i,{get:()=>e[i],enumerable:!(r=f7(e,i))||r.enumerable});return t},jt=t=>m7(hb(ka(t!=null?l7(c7(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),g7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),_7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),fe=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SuppressWarnings=t.Override=t.Nullable=t.NotNull=void 0;function e(n,o,a){}t.NotNull=e;function r(n,o,a){}t.Nullable=r;function i(n,o,a){}t.Override=i;function s(n){return (o,a,u)=>{}}t.SuppressWarnings=s;}),rn=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IntStream=void 0;(function(r){r.EOF=-1,r.UNKNOWN_SOURCE_NAME="<unknown>";})(t.IntStream||(t.IntStream={}));}),y7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.ANTLRInputStream=void 0;var r=ge("assert"),i=fe(),s=rn(),n=class{constructor(o){this.p=0,this.data=o,this.n=o.length;}reset(){this.p=0;}consume(){if(this.p>=this.n)throw r(this.LA(1)===s.IntStream.EOF),new Error("cannot consume EOF");this.p<this.n&&this.p++;}LA(o){return o===0?0:o<0&&(o++,this.p+o-1<0)||this.p+o-1>=this.n?s.IntStream.EOF:this.data.charCodeAt(this.p+o-1)}LT(o){return this.LA(o)}get index(){return this.p}get size(){return this.n}mark(){return -1}release(o){}seek(o){if(o<=this.p){this.p=o;return}for(o=Math.min(o,this.n);this.p<o;)this.consume();}getText(o){let a=o.a,u=o.b;u>=this.n&&(u=this.n-1);let l=u-a+1;return a>=this.n?"":this.data.substr(a,l)}get sourceName(){return this.name?this.name:s.IntStream.UNKNOWN_SOURCE_NAME}toString(){return this.data}};e([i.Override],n.prototype,"consume",null),e([i.Override],n.prototype,"LA",null),e([i.Override],n.prototype,"index",null),e([i.Override],n.prototype,"size",null),e([i.Override],n.prototype,"mark",null),e([i.Override],n.prototype,"release",null),e([i.Override],n.prototype,"seek",null),e([i.Override],n.prototype,"getText",null),e([i.Override],n.prototype,"sourceName",null),e([i.Override],n.prototype,"toString",null),t.ANTLRInputStream=n;}),Ci=re(t=>{var e=t&&t.__decorate||function(s,n,o,a){var u=arguments.length,l=u<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,o):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(s,n,o,a);else for(var c=s.length-1;c>=0;c--)(h=s[c])&&(l=(u<3?h(l):u>3?h(n,o,l):h(n,o))||l);return u>3&&l&&Object.defineProperty(n,o,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNState=void 0;var r=fe(),i=class{constructor(){this.stateNumber=i.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(s){return s instanceof i?this.stateNumber===s.stateNumber:!1}get isNonGreedyExitState(){return !1}toString(){return String(this.stateNumber)}getTransitions(){return this.transitions.slice(0)}get numberOfTransitions(){return this.transitions.length}addTransition(s,n){if(this.transitions.length===0)this.epsilonOnlyTransitions=s.isEpsilon;else if(this.epsilonOnlyTransitions!==s.isEpsilon)throw this.epsilonOnlyTransitions=!1,new Error("ATN state "+this.stateNumber+" has both epsilon and non-epsilon transitions.");this.transitions.splice(n!==void 0?n:this.transitions.length,0,s);}transition(s){return this.transitions[s]}setTransition(s,n){this.transitions[s]=n;}removeTransition(s){return this.transitions.splice(s,1)[0]}get onlyHasEpsilonTransitions(){return this.epsilonOnlyTransitions}setRuleIndex(s){this.ruleIndex=s;}get isOptimized(){return this.optimizedTransitions!==this.transitions}get numberOfOptimizedTransitions(){return this.optimizedTransitions.length}getOptimizedTransition(s){return this.optimizedTransitions[s]}addOptimizedTransition(s){this.isOptimized||(this.optimizedTransitions=new Array),this.optimizedTransitions.push(s);}setOptimizedTransition(s,n){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions[s]=n;}removeOptimizedTransition(s){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions.splice(s,1);}};e([r.Override],i.prototype,"hashCode",null),e([r.Override],i.prototype,"equals",null),e([r.Override],i.prototype,"toString",null),t.ATNState=i,function(s){s.INVALID_STATE_NUMBER=-1;}(i=t.ATNState||(t.ATNState={}));}),Qt=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ATNStateType=void 0;(function(r){r[r.INVALID_TYPE=0]="INVALID_TYPE",r[r.BASIC=1]="BASIC",r[r.RULE_START=2]="RULE_START",r[r.BLOCK_START=3]="BLOCK_START",r[r.PLUS_BLOCK_START=4]="PLUS_BLOCK_START",r[r.STAR_BLOCK_START=5]="STAR_BLOCK_START",r[r.TOKEN_START=6]="TOKEN_START",r[r.RULE_STOP=7]="RULE_STOP",r[r.BLOCK_END=8]="BLOCK_END",r[r.STAR_LOOP_BACK=9]="STAR_LOOP_BACK",r[r.STAR_LOOP_ENTRY=10]="STAR_LOOP_ENTRY",r[r.PLUS_LOOP_BACK=11]="PLUS_LOOP_BACK",r[r.LOOP_END=12]="LOOP_END";})(t.ATNStateType||(t.ATNStateType={}));}),nn=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RecognitionException=void 0;var e=class extends Error{constructor(r,i,s,n){super(n),this._offendingState=-1,this._recognizer=r,this.input=i,this.ctx=s,r&&(this._offendingState=r.state);}get offendingState(){return this._offendingState}setOffendingState(r){this._offendingState=r;}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(r){if(!(r&&r!==this._recognizer))return this.offendingToken}setOffendingToken(r,i){r===this._recognizer&&(this.offendingToken=i);}get recognizer(){return this._recognizer}};t.RecognitionException=e;}),sn=re(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h},r=t&&t.__param||function(n,o){return function(a,u){o(a,u,n);}};Object.defineProperty(t,"__esModule",{value:!0}),t.Transition=void 0;var i=fe(),s=class{constructor(o){if(o==null)throw new Error("target cannot be null.");this.target=o;}get isEpsilon(){return !1}get label(){}};s.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],e([i.NotNull],s.prototype,"target",void 0),s=e([r(0,i.NotNull)],s),t.Transition=s;}),Ep=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractPredicateTransition=void 0;var e=sn(),r=class extends e.Transition{constructor(i){super(i);}};t.AbstractPredicateTransition=r;}),qt=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash=void 0;(function(r){function s(l=0){return l}r.initialize=s;function n(l,h){h==null?h=0:typeof h=="string"?h=u(h):typeof h=="object"&&(h=h.hashCode());let x=h;return x=Math.imul(x,3432918353),x=x<<15|x>>>17,x=Math.imul(x,461845907),l=l^x,l=l<<13|l>>>19,l=Math.imul(l,5)+3864292196,l&4294967295}r.update=n;function o(l,h){return l=l^h*4,l=l^l>>>16,l=Math.imul(l,2246822507),l=l^l>>>13,l=Math.imul(l,3266489909),l=l^l>>>16,l}r.finish=o;function a(l,h=0){let c=s(h),d=0;for(let f of l)c=n(c,f),d++;return c=o(c,d),c}r.hashCode=a;function u(l){let h=l.length;if(h===0)return 0;let c=0;for(let d=0;d<h;d++){let f=l.charCodeAt(d);c=(c<<5>>>0)-c+f,c|=0;}return c}})(t.MurmurHash||(t.MurmurHash={}));}),Qr=re(t=>{var e=t&&t.__decorate||function(s,n,o,a){var u=arguments.length,l=u<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,o):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(s,n,o,a);else for(var c=s.length-1;c>=0;c--)(h=s[c])&&(l=(u<3?h(l):u>3?h(n,o,l):h(n,o))||l);return u>3&&l&&Object.defineProperty(n,o,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectEqualityComparator=void 0;var r=fe(),i=class{hashCode(s){return s==null?0:s.hashCode()}equals(s,n){return s==null?n==null:s.equals(n)}};i.INSTANCE=new i,e([r.Override],i.prototype,"hashCode",null),e([r.Override],i.prototype,"equals",null),t.ObjectEqualityComparator=i;}),v7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultEqualityComparator=void 0;var r=fe(),i=qt(),s=Qr(),n=class{hashCode(o){return o==null?0:typeof o=="string"||typeof o=="number"?i.MurmurHash.hashCode([o]):s.ObjectEqualityComparator.INSTANCE.hashCode(o)}equals(o,a){return o==null?a==null:typeof o=="string"||typeof o=="number"?o===a:s.ObjectEqualityComparator.INSTANCE.equals(o,a)}};n.INSTANCE=new n,e([r.Override],n.prototype,"hashCode",null),e([r.Override],n.prototype,"equals",null),t.DefaultEqualityComparator=n;}),on=re(t=>{var e=t&&t.__decorate||function(h,c,d,f){var m=arguments.length,g=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,d):f,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(h,c,d,f);else for(var x=h.length-1;x>=0;x--)(v=h[x])&&(g=(m<3?v(g):m>3?v(c,d,g):v(c,d))||g);return m>3&&g&&Object.defineProperty(c,d,g),g},r=t&&t.__param||function(h,c){return function(d,f){c(d,f,h);}};Object.defineProperty(t,"__esModule",{value:!0}),t.Array2DHashSet=void 0;var i=ge("assert"),s=v7(),n=fe(),o=qt(),a=16,u=.75,l=class{constructor(h,c=a){if(this.n=0,this.threshold=Math.floor(a*u),h instanceof l){this.comparator=h.comparator,this.buckets=h.buckets.slice(0);for(let d=0;d<this.buckets.length;d++){let f=this.buckets[d];f&&(this.buckets[d]=f.slice(0));}this.n=h.n,this.threshold=h.threshold;}else this.comparator=h||s.DefaultEqualityComparator.INSTANCE,this.buckets=this.createBuckets(c);}getOrAdd(h){return this.n>this.threshold&&this.expand(),this.getOrAddImpl(h)}getOrAddImpl(h){let c=this.getBucket(h),d=this.buckets[c];if(!d)return d=[h],this.buckets[c]=d,this.n++,h;for(let f of d)if(this.comparator.equals(f,h))return f;return d.push(h),this.n++,h}get(h){if(h==null)return h;let c=this.getBucket(h),d=this.buckets[c];if(d){for(let f of d)if(this.comparator.equals(f,h))return f}}getBucket(h){return this.comparator.hashCode(h)&this.buckets.length-1}hashCode(){let h=o.MurmurHash.initialize();for(let c of this.buckets)if(c!=null)for(let d of c){if(d==null)break;h=o.MurmurHash.update(h,this.comparator.hashCode(d));}return h=o.MurmurHash.finish(h,this.size),h}equals(h){return h===this?!0:!(h instanceof l)||h.size!==this.size?!1:this.containsAll(h)}expand(){let h=this.buckets,c=this.buckets.length*2,d=this.createBuckets(c);this.buckets=d,this.threshold=Math.floor(c*u);let f=this.size;for(let m of h)if(m)for(let g of m){let v=this.getBucket(g),x=this.buckets[v];x||(x=[],this.buckets[v]=x),x.push(g);}i(this.n===f);}add(h){return this.getOrAdd(h)===h}get size(){return this.n}get isEmpty(){return this.n===0}contains(h){return this.containsFast(this.asElementType(h))}containsFast(h){return h==null?!1:this.get(h)!=null}*[Symbol.iterator](){yield*this.toArray();}toArray(){let h=new Array(this.size),c=0;for(let d of this.buckets)if(d!=null)for(let f of d){if(f==null)break;h[c++]=f;}return h}containsAll(h){if(h instanceof l){let c=h;for(let d of c.buckets)if(d!=null)for(let f of d){if(f==null)break;if(!this.containsFast(this.asElementType(f)))return !1}}else for(let c of h)if(!this.containsFast(this.asElementType(c)))return !1;return !0}addAll(h){let c=!1;for(let d of h)this.getOrAdd(d)!==d&&(c=!0);return c}clear(){this.buckets=this.createBuckets(a),this.n=0,this.threshold=Math.floor(a*u);}toString(){if(this.size===0)return "{}";let h="{",c=!0;for(let d of this.buckets)if(d!=null)for(let f of d){if(f==null)break;c?c=!1:h+=", ",h+=f.toString();}return h+="}",h}toTableString(){let h="";for(let c of this.buckets){if(c==null){h+=`null
59
+ `);return n!==-1&&(e=gO(e,s,i,n)),i+e+s},md,dy=(t,...e)=>{let[r]=e;if(!qu(r)||!qu(r.raw))return e.join(" ");let i=e.slice(1),s=[r.raw[0]];for(let n=1;n<r.length;n++)s.push(String(i[n-1]).replace(/[{}\\]/g,"\\$&"),String(r.raw[n]));return md===void 0&&(md=uy()),md(t,s.join(""))};Object.defineProperties(Hu.prototype,Is);var Vu=Hu();Vu.supportsColor=gd;Vu.stderr=Hu({level:_d?_d.level:0});Vu.stderr.supportsColor=_d;py.exports=Vu;});var Ry=$((Ld,Pd)=>{Object.defineProperty(Ld,"__esModule",{value:!0});function MF(t){return t.encrypted}var Fd=(t,e)=>{let r;typeof e=="function"?r={connect:e}:r=e;let i=typeof r.connect=="function",s=typeof r.secureConnect=="function",n=typeof r.close=="function",o=()=>{i&&r.connect(),MF(t)&&s&&(t.authorized?r.secureConnect():t.authorizationError||t.once("secureConnect",r.secureConnect)),n&&t.once("close",r.close);};t.writable&&!t.connecting?o():t.connecting?t.once("connect",o):t.destroyed&&n&&r.close(t._hadError);};Ld.default=Fd;Pd.exports=Fd;Pd.exports.default=Fd;});var Ly=$((yG,Fy)=>{var{PassThrough:KF}=ge("stream");Fy.exports=t=>{t={...t};let{array:e}=t,{encoding:r}=t,i=r==="buffer",s=!1;e?s=!(r||i):r=r||"utf8",i&&(r=null);let n=new KF({objectMode:s});r&&n.setEncoding(r);let o=0,a=[];return n.on("data",u=>{a.push(u),s?o=a.length:o+=u.length;}),n.getBufferedValue=()=>e?a:i?Buffer.concat(a,o):a.join(""),n.getBufferedLength=()=>o,n};});var Bd=$((vG,Qo)=>{var{constants:GF}=ge("buffer"),WF=ge("stream"),{promisify:YF}=ge("util"),JF=Ly(),ZF=YF(WF.pipeline),nl=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError";}};async function Md(t,e){if(!t)throw new Error("Expected a stream");e={maxBuffer:1/0,...e};let{maxBuffer:r}=e,i=JF(e);return await new Promise((s,n)=>{let o=a=>{a&&i.getBufferedLength()<=GF.MAX_LENGTH&&(a.bufferedData=i.getBufferedValue()),n(a);};(async()=>{try{await ZF(t,i),s();}catch(a){o(a);}})(),i.on("data",()=>{i.getBufferedLength()>r&&o(new nl);});}),i.getBufferedValue()}Qo.exports=Md;Qo.exports.buffer=(t,e)=>Md(t,{...e,encoding:"buffer"});Qo.exports.array=(t,e)=>Md(t,{...e,array:!0});Qo.exports.MaxBufferError=nl;});var Iy=$((bG,Py)=>{var XF=new Set([200,203,204,206,300,301,308,404,405,410,414,501]),QF=new Set([200,203,204,300,301,302,303,307,308,404,405,410,414,501]),eL=new Set([500,502,503,504]),tL={date:!0,connection:!0,"keep-alive":!0,"proxy-authenticate":!0,"proxy-authorization":!0,te:!0,trailer:!0,"transfer-encoding":!0,upgrade:!0},rL={"content-length":!0,"content-encoding":!0,"transfer-encoding":!0,"content-range":!0};function Wn(t){let e=parseInt(t,10);return isFinite(e)?e:0}function iL(t){return t?eL.has(t.status):!0}function jd(t){let e={};if(!t)return e;let r=t.trim().split(/,/);for(let i of r){let[s,n]=i.split(/=/,2);e[s.trim()]=n===void 0?!0:n.trim().replace(/^"|"$/g,"");}return e}function nL(t){let e=[];for(let r in t){let i=t[r];e.push(i===!0?r:r+"="+i);}if(e.length)return e.join(", ")}Py.exports=class{constructor(e,r,{shared:i,cacheHeuristic:s,immutableMinTimeToLive:n,ignoreCargoCult:o,_fromObject:a}={}){if(a){this._fromObject(a);return}if(!r||!r.headers)throw Error("Response headers missing");this._assertRequestHasHeaders(e),this._responseTime=this.now(),this._isShared=i!==!1,this._cacheHeuristic=s!==void 0?s:.1,this._immutableMinTtl=n!==void 0?n:24*3600*1e3,this._status="status"in r?r.status:200,this._resHeaders=r.headers,this._rescc=jd(r.headers["cache-control"]),this._method="method"in e?e.method:"GET",this._url=e.url,this._host=e.headers.host,this._noAuthorization=!e.headers.authorization,this._reqHeaders=r.headers.vary?e.headers:null,this._reqcc=jd(e.headers["cache-control"]),o&&"pre-check"in this._rescc&&"post-check"in this._rescc&&(delete this._rescc["pre-check"],delete this._rescc["post-check"],delete this._rescc["no-cache"],delete this._rescc["no-store"],delete this._rescc["must-revalidate"],this._resHeaders=Object.assign({},this._resHeaders,{"cache-control":nL(this._rescc)}),delete this._resHeaders.expires,delete this._resHeaders.pragma),r.headers["cache-control"]==null&&/no-cache/.test(r.headers.pragma)&&(this._rescc["no-cache"]=!0);}now(){return Date.now()}storable(){return !!(!this._reqcc["no-store"]&&(this._method==="GET"||this._method==="HEAD"||this._method==="POST"&&this._hasExplicitExpiration())&&QF.has(this._status)&&!this._rescc["no-store"]&&(!this._isShared||!this._rescc.private)&&(!this._isShared||this._noAuthorization||this._allowsStoringAuthenticated())&&(this._resHeaders.expires||this._rescc["max-age"]||this._isShared&&this._rescc["s-maxage"]||this._rescc.public||XF.has(this._status)))}_hasExplicitExpiration(){return this._isShared&&this._rescc["s-maxage"]||this._rescc["max-age"]||this._resHeaders.expires}_assertRequestHasHeaders(e){if(!e||!e.headers)throw Error("Request headers missing")}satisfiesWithoutRevalidation(e){this._assertRequestHasHeaders(e);let r=jd(e.headers["cache-control"]);return r["no-cache"]||/no-cache/.test(e.headers.pragma)||r["max-age"]&&this.age()>r["max-age"]||r["min-fresh"]&&this.timeToLive()<1e3*r["min-fresh"]||this.stale()&&!(r["max-stale"]&&!this._rescc["must-revalidate"]&&(r["max-stale"]===!0||r["max-stale"]>this.age()-this.maxAge()))?!1:this._requestMatches(e,!1)}_requestMatches(e,r){return (!this._url||this._url===e.url)&&this._host===e.headers.host&&(!e.method||this._method===e.method||r&&e.method==="HEAD")&&this._varyMatches(e)}_allowsStoringAuthenticated(){return this._rescc["must-revalidate"]||this._rescc.public||this._rescc["s-maxage"]}_varyMatches(e){if(!this._resHeaders.vary)return !0;if(this._resHeaders.vary==="*")return !1;let r=this._resHeaders.vary.trim().toLowerCase().split(/\s*,\s*/);for(let i of r)if(e.headers[i]!==this._reqHeaders[i])return !1;return !0}_copyWithoutHopByHopHeaders(e){let r={};for(let i in e)tL[i]||(r[i]=e[i]);if(e.connection){let i=e.connection.trim().split(/\s*,\s*/);for(let s of i)delete r[s];}if(r.warning){let i=r.warning.split(/,/).filter(s=>!/^\s*1[0-9][0-9]/.test(s));i.length?r.warning=i.join(",").trim():delete r.warning;}return r}responseHeaders(){let e=this._copyWithoutHopByHopHeaders(this._resHeaders),r=this.age();return r>3600*24&&!this._hasExplicitExpiration()&&this.maxAge()>3600*24&&(e.warning=(e.warning?`${e.warning}, `:"")+'113 - "rfc7234 5.5.4"'),e.age=`${Math.round(r)}`,e.date=new Date(this.now()).toUTCString(),e}date(){let e=Date.parse(this._resHeaders.date);return isFinite(e)?e:this._responseTime}age(){let e=this._ageValue(),r=(this.now()-this._responseTime)/1e3;return e+r}_ageValue(){return Wn(this._resHeaders.age)}maxAge(){if(!this.storable()||this._rescc["no-cache"]||this._isShared&&this._resHeaders["set-cookie"]&&!this._rescc.public&&!this._rescc.immutable||this._resHeaders.vary==="*")return 0;if(this._isShared){if(this._rescc["proxy-revalidate"])return 0;if(this._rescc["s-maxage"])return Wn(this._rescc["s-maxage"])}if(this._rescc["max-age"])return Wn(this._rescc["max-age"]);let e=this._rescc.immutable?this._immutableMinTtl:0,r=this.date();if(this._resHeaders.expires){let i=Date.parse(this._resHeaders.expires);return Number.isNaN(i)||i<r?0:Math.max(e,(i-r)/1e3)}if(this._resHeaders["last-modified"]){let i=Date.parse(this._resHeaders["last-modified"]);if(isFinite(i)&&r>i)return Math.max(e,(r-i)/1e3*this._cacheHeuristic)}return e}timeToLive(){let e=this.maxAge()-this.age(),r=e+Wn(this._rescc["stale-if-error"]),i=e+Wn(this._rescc["stale-while-revalidate"]);return Math.max(0,e,r,i)*1e3}stale(){return this.maxAge()<=this.age()}_useStaleIfError(){return this.maxAge()+Wn(this._rescc["stale-if-error"])>this.age()}useStaleWhileRevalidate(){return this.maxAge()+Wn(this._rescc["stale-while-revalidate"])>this.age()}static fromObject(e){return new this(void 0,void 0,{_fromObject:e})}_fromObject(e){if(this._responseTime)throw Error("Reinitialized");if(!e||e.v!==1)throw Error("Invalid serialization");this._responseTime=e.t,this._isShared=e.sh,this._cacheHeuristic=e.ch,this._immutableMinTtl=e.imm!==void 0?e.imm:24*3600*1e3,this._status=e.st,this._resHeaders=e.resh,this._rescc=e.rescc,this._method=e.m,this._url=e.u,this._host=e.h,this._noAuthorization=e.a,this._reqHeaders=e.reqh,this._reqcc=e.reqcc;}toObject(){return {v:1,t:this._responseTime,sh:this._isShared,ch:this._cacheHeuristic,imm:this._immutableMinTtl,st:this._status,resh:this._resHeaders,rescc:this._rescc,m:this._method,u:this._url,h:this._host,a:this._noAuthorization,reqh:this._reqHeaders,reqcc:this._reqcc}}revalidationHeaders(e){this._assertRequestHasHeaders(e);let r=this._copyWithoutHopByHopHeaders(e.headers);if(delete r["if-range"],!this._requestMatches(e,!0)||!this.storable())return delete r["if-none-match"],delete r["if-modified-since"],r;if(this._resHeaders.etag&&(r["if-none-match"]=r["if-none-match"]?`${r["if-none-match"]}, ${this._resHeaders.etag}`:this._resHeaders.etag),r["accept-ranges"]||r["if-match"]||r["if-unmodified-since"]||this._method&&this._method!="GET"){if(delete r["if-modified-since"],r["if-none-match"]){let s=r["if-none-match"].split(/,/).filter(n=>!/^\s*W\//.test(n));s.length?r["if-none-match"]=s.join(",").trim():delete r["if-none-match"];}}else this._resHeaders["last-modified"]&&!r["if-modified-since"]&&(r["if-modified-since"]=this._resHeaders["last-modified"]);return r}revalidatedPolicy(e,r){if(this._assertRequestHasHeaders(e),this._useStaleIfError()&&iL(r))return {modified:!1,matches:!1,policy:this};if(!r||!r.headers)throw Error("Response headers missing");let i=!1;if(r.status!==void 0&&r.status!=304?i=!1:r.headers.etag&&!/^\s*W\//.test(r.headers.etag)?i=this._resHeaders.etag&&this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag:this._resHeaders.etag&&r.headers.etag?i=this._resHeaders.etag.replace(/^\s*W\//,"")===r.headers.etag.replace(/^\s*W\//,""):this._resHeaders["last-modified"]?i=this._resHeaders["last-modified"]===r.headers["last-modified"]:!this._resHeaders.etag&&!this._resHeaders["last-modified"]&&!r.headers.etag&&!r.headers["last-modified"]&&(i=!0),!i)return {policy:new this.constructor(e,r),modified:r.status!=304,matches:!1};let s={};for(let o in this._resHeaders)s[o]=o in r.headers&&!rL[o]?r.headers[o]:this._resHeaders[o];let n=Object.assign({},r,{status:this._status,method:this._method,headers:s});return {policy:new this.constructor(e,n,{shared:this._isShared,cacheHeuristic:this._cacheHeuristic,immutableMinTimeToLive:this._immutableMinTtl}),modified:!1,matches:!0}}};});var ky=$(qd=>{qd.stringify=function t(e){if(typeof e=="undefined")return e;if(e&&Buffer.isBuffer(e))return JSON.stringify(":base64:"+e.toString("base64"));if(e&&e.toJSON&&(e=e.toJSON()),e&&typeof e=="object"){var r="",i=Array.isArray(e);r=i?"[":"{";var s=!0;for(var n in e){var o=typeof e[n]=="function"||!i&&typeof e[n]=="undefined";Object.hasOwnProperty.call(e,n)&&!o&&(s||(r+=","),s=!1,i?e[n]==null?r+="null":r+=t(e[n]):e[n]!==void 0&&(r+=t(n)+":"+t(e[n])));}return r+=i?"]":"}",r}else return typeof e=="string"?JSON.stringify(/^:/.test(e)?":"+e:e):typeof e=="undefined"?"null":JSON.stringify(e)};qd.parse=function(t){return JSON.parse(t,function(e,r){return typeof r=="string"?/^:base64:/.test(r)?Buffer.from(r.substring(8),"base64"):/^:/.test(r)?r.substring(1):r:r})};});var qy=$((SG,jy)=>{var oL=ge("events"),My=ky(),aL=t=>{let e={redis:"@keyv/redis",rediss:"@keyv/redis",mongodb:"@keyv/mongo",mongo:"@keyv/mongo",sqlite:"@keyv/sqlite",postgresql:"@keyv/postgres",postgres:"@keyv/postgres",mysql:"@keyv/mysql",etcd:"@keyv/etcd",offline:"@keyv/offline",tiered:"@keyv/tiered"};if(t.adapter||t.uri){let r=t.adapter||/^[^:+]*/.exec(t.uri)[0];return new(ge(e[r]))(t)}return new Map},By=["sqlite","postgres","mysql","mongo","redis","tiered"],Hd=class extends oL{constructor(e,{emitErrors:r=!0,...i}={}){if(super(),this.opts={namespace:"keyv",serialize:My.stringify,deserialize:My.parse,...typeof e=="string"?{uri:e}:e,...i},!this.opts.store){let n={...this.opts};this.opts.store=aL(n);}if(this.opts.compression){let n=this.opts.compression;this.opts.serialize=n.serialize.bind(n),this.opts.deserialize=n.deserialize.bind(n);}typeof this.opts.store.on=="function"&&r&&this.opts.store.on("error",n=>this.emit("error",n)),this.opts.store.namespace=this.opts.namespace;let s=n=>async function*(){for await(let[o,a]of typeof n=="function"?n(this.opts.store.namespace):n){let u=await this.opts.deserialize(a);if(!(this.opts.store.namespace&&!o.includes(this.opts.store.namespace))){if(typeof u.expires=="number"&&Date.now()>u.expires){this.delete(o);continue}yield [this._getKeyUnprefix(o),u.value];}}};typeof this.opts.store[Symbol.iterator]=="function"&&this.opts.store instanceof Map?this.iterator=s(this.opts.store):typeof this.opts.store.iterator=="function"&&this.opts.store.opts&&this._checkIterableAdaptar()&&(this.iterator=s(this.opts.store.iterator.bind(this.opts.store)));}_checkIterableAdaptar(){return By.includes(this.opts.store.opts.dialect)||By.findIndex(e=>this.opts.store.opts.url.includes(e))>=0}_getKeyPrefix(e){return `${this.opts.namespace}:${e}`}_getKeyPrefixArray(e){return e.map(r=>`${this.opts.namespace}:${r}`)}_getKeyUnprefix(e){return e.split(":").splice(1).join(":")}get(e,r){let{store:i}=this.opts,s=Array.isArray(e),n=s?this._getKeyPrefixArray(e):this._getKeyPrefix(e);if(s&&i.getMany===void 0){let o=[];for(let a of n)o.push(Promise.resolve().then(()=>i.get(a)).then(u=>typeof u=="string"?this.opts.deserialize(u):this.opts.compression?this.opts.deserialize(u):u).then(u=>{if(u!=null)return typeof u.expires=="number"&&Date.now()>u.expires?this.delete(a).then(()=>{}):r&&r.raw?u:u.value}));return Promise.allSettled(o).then(a=>{let u=[];for(let l of a)u.push(l.value);return u})}return Promise.resolve().then(()=>s?i.getMany(n):i.get(n)).then(o=>typeof o=="string"?this.opts.deserialize(o):this.opts.compression?this.opts.deserialize(o):o).then(o=>{if(o!=null)return s?o.map((a,u)=>{if(typeof a=="string"&&(a=this.opts.deserialize(a)),a!=null){if(typeof a.expires=="number"&&Date.now()>a.expires){this.delete(e[u]).then(()=>{});return}return r&&r.raw?a:a.value}}):typeof o.expires=="number"&&Date.now()>o.expires?this.delete(e).then(()=>{}):r&&r.raw?o:o.value})}set(e,r,i){let s=this._getKeyPrefix(e);typeof i=="undefined"&&(i=this.opts.ttl),i===0&&(i=void 0);let{store:n}=this.opts;return Promise.resolve().then(()=>{let o=typeof i=="number"?Date.now()+i:null;return typeof r=="symbol"&&this.emit("error","symbol cannot be serialized"),r={value:r,expires:o},this.opts.serialize(r)}).then(o=>n.set(s,o,i)).then(()=>!0)}delete(e){let{store:r}=this.opts;if(Array.isArray(e)){let s=this._getKeyPrefixArray(e);if(r.deleteMany===void 0){let n=[];for(let o of s)n.push(r.delete(o));return Promise.allSettled(n).then(o=>o.every(a=>a.value===!0))}return Promise.resolve().then(()=>r.deleteMany(s))}let i=this._getKeyPrefix(e);return Promise.resolve().then(()=>r.delete(i))}clear(){let{store:e}=this.opts;return Promise.resolve().then(()=>e.clear())}has(e){let r=this._getKeyPrefix(e),{store:i}=this.opts;return Promise.resolve().then(async()=>typeof i.has=="function"?i.has(r):await i.get(r)!==void 0)}disconnect(){let{store:e}=this.opts;if(typeof e.disconnect=="function")return e.disconnect()}};jy.exports=Hd;});var zy=$((UG,$y)=>{var gL=["aborted","complete","headers","httpVersion","httpVersionMinor","httpVersionMajor","method","rawHeaders","rawTrailers","setTimeout","socket","statusCode","statusMessage","trailers","url"];$y.exports=(t,e)=>{if(e._readableState.autoDestroy)throw new Error("The second stream must have the `autoDestroy` option set to `false`");let r=new Set(Object.keys(t).concat(gL)),i={};for(let s of r)s in e||(i[s]={get(){let n=t[s];return typeof n=="function"?n.bind(t):n},set(n){t[s]=n;},enumerable:!0,configurable:!1});return Object.defineProperties(e,i),t.once("aborted",()=>{e.destroy(),e.emit("aborted");}),t.once("close",()=>{t.complete&&e.readable?e.once("end",()=>{e.emit("close");}):e.emit("close");}),e};});var Gy=$((VG,Ky)=>{var{Transform:_L,PassThrough:yL}=ge("stream"),zd=ge("zlib"),vL=zy();Ky.exports=t=>{let e=(t.headers["content-encoding"]||"").toLowerCase();if(!["gzip","deflate","br"].includes(e))return t;let r=e==="br";if(r&&typeof zd.createBrotliDecompress!="function")return t.destroy(new Error("Brotli is not supported on Node.js < 12")),t;let i=!0,s=new _L({transform(a,u,l){i=!1,l(null,a);},flush(a){a();}}),n=new yL({autoDestroy:!1,destroy(a,u){t.destroy(),u(a);}}),o=r?zd.createBrotliDecompress():zd.createUnzip();return o.once("error",a=>{if(i&&!t.readable){n.end();return}n.destroy(a);}),vL(t,n),t.pipe(s).pipe(o).pipe(n),n};});var i0=$((OW,uv)=>{var r0=class{constructor(e={}){if(!(e.maxSize&&e.maxSize>0))throw new TypeError("`maxSize` must be a number greater than 0");this.maxSize=e.maxSize,this.onEviction=e.onEviction,this.cache=new Map,this.oldCache=new Map,this._size=0;}_set(e,r){if(this.cache.set(e,r),this._size++,this._size>=this.maxSize){if(this._size=0,typeof this.onEviction=="function")for(let[i,s]of this.oldCache.entries())this.onEviction(i,s);this.oldCache=this.cache,this.cache=new Map;}}get(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e)){let r=this.oldCache.get(e);return this.oldCache.delete(e),this._set(e,r),r}}set(e,r){return this.cache.has(e)?this.cache.set(e,r):this._set(e,r),this}has(e){return this.cache.has(e)||this.oldCache.has(e)}peek(e){if(this.cache.has(e))return this.cache.get(e);if(this.oldCache.has(e))return this.oldCache.get(e)}delete(e){let r=this.cache.delete(e);return r&&this._size--,this.oldCache.delete(e)||r}clear(){this.cache.clear(),this.oldCache.clear(),this._size=0;}*keys(){for(let[e]of this)yield e;}*values(){for(let[,e]of this)yield e;}*[Symbol.iterator](){for(let e of this.cache)yield e;for(let e of this.oldCache){let[r]=e;this.cache.has(r)||(yield e);}}get size(){let e=0;for(let r of this.oldCache.keys())this.cache.has(r)||e++;return Math.min(this._size+e,this.maxSize)}};uv.exports=r0;});var n0=$((FW,lv)=>{lv.exports=t=>{if(t.listenerCount("error")!==0)return t;t.__destroy=t._destroy,t._destroy=(...r)=>{let i=r.pop();t.__destroy(...r,async s=>{await Promise.resolve(),i(s);});};let e=r=>{Promise.resolve().then(()=>{t.emit("error",r);});};return t.once("error",e),Promise.resolve().then(()=>{t.off("error",e);}),t};});var Jn=$((LW,mv)=>{var{URL:cv}=ge("url"),qL=ge("events"),HL=ge("tls"),UL=ge("http2"),VL=i0(),$L=n0(),or=Symbol("currentStreamCount"),hv=Symbol("request"),ar=Symbol("cachedOriginSet"),Ji=Symbol("gracefullyClosing"),dl=Symbol("length"),fv=["createConnection","maxDeflateDynamicTableSize","maxSettings","maxSessionMemory","maxHeaderListPairs","maxOutstandingPings","maxReservedRemoteStreams","maxSendHeaderBlockLength","paddingStrategy","peerMaxConcurrentStreams","settings","family","localAddress","rejectUnauthorized","pskCallback","minDHSize","path","socket","ca","cert","sigalgs","ciphers","clientCertEngine","crl","dhparam","ecdhCurve","honorCipherOrder","key","privateKeyEngine","privateKeyIdentifier","maxVersion","minVersion","pfx","secureOptions","secureProtocol","sessionIdContext","ticketKeys"],zL=(t,e,r)=>{let i=0,s=t.length;for(;i<s;){let n=i+s>>>1;r(t[n],e)?i=n+1:s=n;}return i},KL=(t,e)=>t.remoteSettings.maxConcurrentStreams>e.remoteSettings.maxConcurrentStreams,s0=(t,e)=>{for(let r=0;r<t.length;r++){let i=t[r];i[ar].length>0&&i[ar].length<e[ar].length&&i[ar].every(s=>e[ar].includes(s))&&i[or]+e[or]<=e.remoteSettings.maxConcurrentStreams&&pv(i);}},dv=(t,e)=>{for(let r=0;r<t.length;r++){let i=t[r];if(e[ar].length>0&&e[ar].length<i[ar].length&&e[ar].every(s=>i[ar].includes(s))&&e[or]+i[or]<=i.remoteSettings.maxConcurrentStreams)return pv(e),!0}return !1},pv=t=>{t[Ji]=!0,t[or]===0&&t.close();},Zs=class t extends qL{constructor({timeout:e=0,maxSessions:r=Number.POSITIVE_INFINITY,maxEmptySessions:i=10,maxCachedTlsSessions:s=100}={}){super(),this.sessions={},this.queue={},this.timeout=e,this.maxSessions=r,this.maxEmptySessions=i,this._emptySessionCount=0,this._sessionCount=0,this.settings={enablePush:!1,initialWindowSize:1024*1024*32},this.tlsSessionCache=new VL({maxSize:s});}get protocol(){return "https:"}normalizeOptions(e){let r="";for(let i=0;i<fv.length;i++){let s=fv[i];r+=":",e&&e[s]!==void 0&&(r+=e[s]);}return r}_processQueue(){if(this._sessionCount>=this.maxSessions){this.closeEmptySessions(this.maxSessions-this._sessionCount+1);return}for(let e in this.queue)for(let r in this.queue[e]){let i=this.queue[e][r];i.completed||(i.completed=!0,i());}}_isBetterSession(e,r){return e>r}_accept(e,r,i,s){let n=0;for(;n<r.length&&e[or]<e.remoteSettings.maxConcurrentStreams;)r[n].resolve(e),n++;r.splice(0,n),r.length>0&&(this.getSession(i,s,r),r.length=0);}getSession(e,r,i){return new Promise((s,n)=>{Array.isArray(i)&&i.length>0?(i=[...i],s()):i=[{resolve:s,reject:n}];try{if(typeof e=="string")e=new cv(e);else if(!(e instanceof cv))throw new TypeError("The `origin` argument needs to be a string or an URL object");if(r){let{servername:h}=r,{hostname:c}=e;if(h&&c!==h)throw new Error(`Origin ${c} differs from servername ${h}`)}}catch(h){for(let c=0;c<i.length;c++)i[c].reject(h);return}let o=this.normalizeOptions(r),a=e.origin;if(o in this.sessions){let h=this.sessions[o],c=-1,d=-1,f;for(let m=0;m<h.length;m++){let g=h[m],v=g.remoteSettings.maxConcurrentStreams;if(v<c)break;if(!g[ar].includes(a))continue;let x=g[or];x>=v||g[Ji]||g.destroyed||(f||(c=v),this._isBetterSession(x,d)&&(f=g,d=x));}if(f){this._accept(f,i,a,r);return}}if(o in this.queue){if(a in this.queue[o]){this.queue[o][a].listeners.push(...i);return}}else this.queue[o]={[dl]:0};let u=()=>{o in this.queue&&this.queue[o][a]===l&&(delete this.queue[o][a],--this.queue[o][dl]===0&&delete this.queue[o]);},l=async()=>{this._sessionCount++;let h=`${a}:${o}`,c=!1,d;try{let f={...r};f.settings===void 0&&(f.settings=this.settings),f.session===void 0&&(f.session=this.tlsSessionCache.get(h)),d=await(f.createConnection||this.createConnection).call(this,e,f),f.createConnection=()=>d;let g=UL.connect(e,f);g[or]=0,g[Ji]=!1;let v=()=>{let{socket:E}=g,b;return E.servername===!1?(E.servername=E.remoteAddress,b=g.originSet,E.servername=!1):b=g.originSet,b},x=()=>g[or]<g.remoteSettings.maxConcurrentStreams;g.socket.once("session",E=>{this.tlsSessionCache.set(h,E);}),g.once("error",E=>{for(let b=0;b<i.length;b++)i[b].reject(E);this.tlsSessionCache.delete(h);}),g.setTimeout(this.timeout,()=>{g.destroy();}),g.once("close",()=>{if(this._sessionCount--,c){this._emptySessionCount--;let E=this.sessions[o];E.length===1?delete this.sessions[o]:E.splice(E.indexOf(g),1);}else {u();let E=new Error("Session closed without receiving a SETTINGS frame");E.code="HTTP2WRAPPER_NOSETTINGS";for(let b=0;b<i.length;b++)i[b].reject(E);}this._processQueue();});let _=()=>{let E=this.queue[o];if(!E)return;let b=g[ar];for(let w=0;w<b.length;w++){let D=b[w];if(D in E){let{listeners:N,completed:F}=E[D],U=0;for(;U<N.length&&x();)N[U].resolve(g),U++;if(E[D].listeners.splice(0,U),E[D].listeners.length===0&&!F&&(delete E[D],--E[dl]===0)){delete this.queue[o];break}if(!x())break}}};g.on("origin",()=>{g[ar]=v()||[],g[Ji]=!1,dv(this.sessions[o],g),!(g[Ji]||!x())&&(_(),x()&&s0(this.sessions[o],g));}),g.once("remoteSettings",()=>{if(l.destroyed){let E=new Error("Agent has been destroyed");for(let b=0;b<i.length;b++)i[b].reject(E);g.destroy();return}if(g.setLocalWindowSize&&g.setLocalWindowSize(1024*1024*4),g[ar]=v()||[],g.socket.encrypted){let E=g[ar][0];if(E!==a){let b=new Error(`Requested origin ${a} does not match server ${E}`);for(let w=0;w<i.length;w++)i[w].reject(b);g.destroy();return}}u();{let E=this.sessions;if(o in E){let b=E[o];b.splice(zL(b,g,KL),0,g);}else E[o]=[g];}c=!0,this._emptySessionCount++,this.emit("session",g),this._accept(g,i,a,r),g[or]===0&&this._emptySessionCount>this.maxEmptySessions&&this.closeEmptySessions(this._emptySessionCount-this.maxEmptySessions),g.on("remoteSettings",()=>{x()&&(_(),x()&&s0(this.sessions[o],g));});}),g[hv]=g.request,g.request=(E,b)=>{if(g[Ji])throw new Error("The session is gracefully closing. No new streams are allowed.");let w=g[hv](E,b);return g.ref(),g[or]++===0&&this._emptySessionCount--,w.once("close",()=>{if(--g[or]===0&&(this._emptySessionCount++,g.unref(),this._emptySessionCount>this.maxEmptySessions||g[Ji])){g.close();return}g.destroyed||g.closed||x()&&!dv(this.sessions[o],g)&&(s0(this.sessions[o],g),_(),g[or]===0&&this._processQueue());}),w};}catch(f){u(),this._sessionCount--;for(let m=0;m<i.length;m++)i[m].reject(f);}};l.listeners=i,l.completed=!1,l.destroyed=!1,this.queue[o][a]=l,this.queue[o][dl]++,this._processQueue();})}request(e,r,i,s){return new Promise((n,o)=>{this.getSession(e,r,[{reject:o,resolve:a=>{try{let u=a.request(i,s);$L(u),n(u);}catch(u){o(u);}}}]);})}async createConnection(e,r){return t.connect(e,r)}static connect(e,r){r.ALPNProtocols=["h2"];let i=e.port||443,s=e.hostname;typeof r.servername=="undefined"&&(r.servername=s);let n=HL.connect(i,s,r);return r.socket&&(n._peername={family:void 0,address:void 0,port:i}),n}closeEmptySessions(e=Number.POSITIVE_INFINITY){let r=0,{sessions:i}=this;for(let s in i){let n=i[s];for(let o=0;o<n.length;o++){let a=n[o];if(a[or]===0&&(r++,a.close(),r>=e))return r}}return r}destroy(e){let{sessions:r,queue:i}=this;for(let s in r){let n=r[s];for(let o=0;o<n.length;o++)n[o].destroy(e);}for(let s in i){let n=i[s];for(let o in n)n[o].destroyed=!0;}this.queue={},this.tlsSessionCache.clear();}get emptySessionCount(){return this._emptySessionCount}get pendingSessionCount(){return this._sessionCount-this._emptySessionCount}get sessionCount(){return this._sessionCount}};Zs.kCurrentStreamCount=or;Zs.kGracefullyClosing=Ji;mv.exports={Agent:Zs,globalAgent:new Zs};});var a0=$((PW,gv)=>{var{Readable:GL}=ge("stream"),o0=class extends GL{constructor(e,r){super({emitClose:!1,autoDestroy:!0,highWaterMark:r}),this.statusCode=null,this.statusMessage="",this.httpVersion="2.0",this.httpVersionMajor=2,this.httpVersionMinor=0,this.headers={},this.trailers={},this.req=null,this.aborted=!1,this.complete=!1,this.upgrade=null,this.rawHeaders=[],this.rawTrailers=[],this.socket=e,this._dumped=!1;}get connection(){return this.socket}set connection(e){this.socket=e;}_destroy(e,r){this.readableEnded||(this.aborted=!0),r(),this.req._request.destroy(e);}setTimeout(e,r){return this.req.setTimeout(e,r),this}_dump(){this._dumped||(this._dumped=!0,this.removeAllListeners("data"),this.resume());}_read(){this.req&&this.req._request.resume();}};gv.exports=o0;});var yv=$((IW,_v)=>{_v.exports=(t,e,r)=>{for(let i of r)t.on(i,(...s)=>e.emit(i,...s));};});var fa=$((MW,vv)=>{var Zn=(t,e,r)=>{vv.exports[e]=class extends t{constructor(...s){super(typeof r=="string"?r:r(s)),this.name=`${super.name} [${e}]`,this.code=e;}};};Zn(TypeError,"ERR_INVALID_ARG_TYPE",t=>{let e=t[0].includes(".")?"property":"argument",r=t[1],i=Array.isArray(r);return i&&(r=`${r.slice(0,-1).join(", ")} or ${r.slice(-1)}`),`The "${t[0]}" ${e} must be ${i?"one of":"of"} type ${r}. Received ${typeof t[2]}`});Zn(TypeError,"ERR_INVALID_PROTOCOL",t=>`Protocol "${t[0]}" not supported. Expected "${t[1]}"`);Zn(Error,"ERR_HTTP_HEADERS_SENT",t=>`Cannot ${t[0]} headers after they are sent to the client`);Zn(TypeError,"ERR_INVALID_HTTP_TOKEN",t=>`${t[0]} must be a valid HTTP token [${t[1]}]`);Zn(TypeError,"ERR_HTTP_INVALID_HEADER_VALUE",t=>`Invalid value "${t[0]} for header "${t[1]}"`);Zn(TypeError,"ERR_INVALID_CHAR",t=>`Invalid character in ${t[0]} [${t[1]}]`);Zn(Error,"ERR_HTTP2_NO_SOCKET_MANIPULATION","HTTP/2 sockets should not be directly manipulated (e.g. read and written)");});var bv=$((BW,xv)=>{xv.exports=t=>{switch(t){case":method":case":scheme":case":authority":case":path":return !0;default:return !1}};});var u0=$((jW,Ev)=>{var{ERR_INVALID_HTTP_TOKEN:WL}=fa(),YL=bv(),JL=/^[\^`\-\w!#$%&*+.|~]+$/;Ev.exports=t=>{if(typeof t!="string"||!JL.test(t)&&!YL(t))throw new WL("Header name",t)};});var l0=$((qW,Cv)=>{var{ERR_HTTP_INVALID_HEADER_VALUE:ZL,ERR_INVALID_CHAR:XL}=fa(),QL=/[^\t\u0020-\u007E\u0080-\u00FF]/;Cv.exports=(t,e)=>{if(typeof e=="undefined")throw new ZL(e,t);if(QL.test(e))throw new XL("header content",t)};});var wv=$((HW,Av)=>{var{ERR_HTTP2_NO_SOCKET_MANIPULATION:Tv}=fa(),e5={has(t,e){let r=t.session===void 0?t:t.session.socket;return e in t||e in r},get(t,e){switch(e){case"on":case"once":case"end":case"emit":case"destroy":return t[e].bind(t);case"writable":case"destroyed":return t[e];case"readable":return t.destroyed?!1:t.readable;case"setTimeout":{let{session:r}=t;return r!==void 0?r.setTimeout.bind(r):t.setTimeout.bind(t)}case"write":case"read":case"pause":case"resume":throw new Tv;default:{let r=t.session===void 0?t:t.session.socket,i=r[e];return typeof i=="function"?i.bind(r):i}}},getPrototypeOf(t){return t.session!==void 0?Reflect.getPrototypeOf(t.session.socket):Reflect.getPrototypeOf(t)},set(t,e,r){switch(e){case"writable":case"readable":case"destroyed":case"on":case"once":case"end":case"emit":case"destroy":return t[e]=r,!0;case"setTimeout":{let{session:i}=t;return i===void 0?t.setTimeout=r:i.setTimeout=r,!0}case"write":case"read":case"pause":case"resume":throw new Tv;default:{let i=t.session===void 0?t:t.session.socket;return i[e]=r,!0}}}};Av.exports=e5;});var d0=$((UW,Fv)=>{var{URL:c0,urlToHttpOptions:Dv}=ge("url"),t5=ge("http2"),{Writable:r5}=ge("stream"),{Agent:i5,globalAgent:n5}=Jn(),s5=a0(),o5=yv(),{ERR_INVALID_ARG_TYPE:pl,ERR_INVALID_PROTOCOL:a5,ERR_HTTP_HEADERS_SENT:Sv}=fa(),u5=u0(),l5=l0(),c5=wv(),{HTTP2_HEADER_STATUS:Rv,HTTP2_HEADER_METHOD:Nv,HTTP2_HEADER_PATH:Ov,HTTP2_HEADER_AUTHORITY:da,HTTP2_METHOD_CONNECT:h5}=t5.constants,Zt=Symbol("headers"),Xs=Symbol("origin"),pa=Symbol("session"),h0=Symbol("options"),ml=Symbol("flushedHeaders"),Qs=Symbol("jobs"),ma=Symbol("pendingAgentPromise"),f0=class extends r5{constructor(e,r,i){if(super({autoDestroy:!1,emitClose:!1}),typeof e=="string"?e=Dv(new c0(e)):e instanceof c0?e=Dv(e):e={...e},typeof r=="function"||r===void 0?(i=r,r=e):r=Object.assign(e,r),r.h2session){if(this[pa]=r.h2session,this[pa].destroyed)throw new Error("The session has been closed already");this.protocol=this[pa].socket.encrypted?"https:":"http:";}else if(r.agent===!1)this.agent=new i5({maxEmptySessions:0});else if(typeof r.agent=="undefined"||r.agent===null)this.agent=n5;else if(typeof r.agent.request=="function")this.agent=r.agent;else throw new pl("options.agent",["http2wrapper.Agent-like Object","undefined","false"],r.agent);if(this.agent&&(this.protocol=this.agent.protocol),r.protocol&&r.protocol!==this.protocol)throw new a5(r.protocol,this.protocol);r.port||(r.port=r.defaultPort||this.agent&&this.agent.defaultPort||443),r.host=r.hostname||r.host||"localhost",delete r.hostname;let{timeout:s}=r;r.timeout=void 0,this[Zt]=Object.create(null),this[Qs]=[],this[ma]=void 0,this.socket=null,this.connection=null,this.method=r.method||"GET",this.method==="CONNECT"&&(r.path==="/"||r.path===void 0)||(this.path=r.path),this.res=null,this.aborted=!1,this.reusedSocket=!1;let{headers:n}=r;if(n)for(let a in n)this.setHeader(a,n[a]);r.auth&&!("authorization"in this[Zt])&&(this[Zt].authorization="Basic "+Buffer.from(r.auth).toString("base64")),r.session=r.tlsSession,r.path=r.socketPath,this[h0]=r,this[Xs]=new c0(`${this.protocol}//${r.servername||r.host}:${r.port}`);let o=r._reuseSocket;o&&(r.createConnection=(...a)=>o.destroyed?this.agent.createConnection(...a):o,this.agent.getSession(this[Xs],this[h0]).catch(()=>{})),s&&this.setTimeout(s),i&&this.once("response",i),this[ml]=!1;}get method(){return this[Zt][Nv]}set method(e){e&&(this[Zt][Nv]=e.toUpperCase());}get path(){let e=this.method==="CONNECT"?da:Ov;return this[Zt][e]}set path(e){if(e){let r=this.method==="CONNECT"?da:Ov;this[Zt][r]=e;}}get host(){return this[Xs].hostname}set host(e){}get _mustNotHaveABody(){return this.method==="GET"||this.method==="HEAD"||this.method==="DELETE"}_write(e,r,i){if(this._mustNotHaveABody){i(new Error("The GET, HEAD and DELETE methods must NOT have a body"));return}this.flushHeaders();let s=()=>this._request.write(e,r,i);this._request?s():this[Qs].push(s);}_final(e){this.flushHeaders();let r=()=>{if(this._mustNotHaveABody||this.method==="CONNECT"){e();return}this._request.end(e);};this._request?r():this[Qs].push(r);}abort(){this.res&&this.res.complete||(this.aborted||process.nextTick(()=>this.emit("abort")),this.aborted=!0,this.destroy());}async _destroy(e,r){this.res&&this.res._dump(),this._request?this._request.destroy():process.nextTick(()=>{this.emit("close");});try{await this[ma];}catch(i){this.aborted&&(e=i);}r(e);}async flushHeaders(){if(this[ml]||this.destroyed)return;this[ml]=!0;let e=this.method===h5,r=i=>{if(this._request=i,this.destroyed){i.destroy();return}e||o5(i,this,["timeout","continue"]),i.once("error",n=>{this.destroy(n);}),i.once("aborted",()=>{let{res:n}=this;n?(n.aborted=!0,n.emit("aborted"),n.destroy()):this.destroy(new Error("The server aborted the HTTP/2 stream"));});let s=(n,o,a)=>{let u=new s5(this.socket,i.readableHighWaterMark);this.res=u,u.url=`${this[Xs].origin}${this.path}`,u.req=this,u.statusCode=n[Rv],u.headers=n,u.rawHeaders=a,u.once("end",()=>{u.complete=!0,u.socket=null,u.connection=null;}),e?(u.upgrade=!0,this.emit("connect",u,i,Buffer.alloc(0))?this.emit("close"):i.destroy()):(i.on("data",l=>{!u._dumped&&!u.push(l)&&i.pause();}),i.once("end",()=>{this.aborted||u.push(null);}),this.emit("response",u)||u._dump());};i.once("response",s),i.once("headers",n=>this.emit("information",{statusCode:n[Rv]})),i.once("trailers",(n,o,a)=>{let{res:u}=this;if(u===null){s(n,o,a);return}u.trailers=n,u.rawTrailers=a;}),i.once("close",()=>{let{aborted:n,res:o}=this;if(o){n&&(o.aborted=!0,o.emit("aborted"),o.destroy());let a=()=>{o.emit("close"),this.destroy(),this.emit("close");};o.readable?o.once("end",a):a();return}if(!this.destroyed){this.destroy(new Error("The HTTP/2 stream has been early terminated")),this.emit("close");return}this.destroy(),this.emit("close");}),this.socket=new Proxy(i,c5);for(let n of this[Qs])n();this[Qs].length=0,this.emit("socket",this.socket);};if(!(da in this[Zt])&&!e&&(this[Zt][da]=this[Xs].host),this[pa])try{r(this[pa].request(this[Zt]));}catch(i){this.destroy(i);}else {this.reusedSocket=!0;try{let i=this.agent.request(this[Xs],this[h0],this[Zt]);this[ma]=i,r(await i),this[ma]=!1;}catch(i){this[ma]=!1,this.destroy(i);}}}get connection(){return this.socket}set connection(e){this.socket=e;}getHeaderNames(){return Object.keys(this[Zt])}hasHeader(e){if(typeof e!="string")throw new pl("name","string",e);return !!this[Zt][e.toLowerCase()]}getHeader(e){if(typeof e!="string")throw new pl("name","string",e);return this[Zt][e.toLowerCase()]}get headersSent(){return this[ml]}removeHeader(e){if(typeof e!="string")throw new pl("name","string",e);if(this.headersSent)throw new Sv("remove");delete this[Zt][e.toLowerCase()];}setHeader(e,r){if(this.headersSent)throw new Sv("set");u5(e),l5(e,r);let i=e.toLowerCase();if(i==="connection"){if(r.toLowerCase()==="keep-alive")return;throw new Error(`Invalid 'connection' header: ${r}`)}i==="host"&&this.method==="CONNECT"?this[Zt][da]=r:this[Zt][i]=r;}setNoDelay(){}setSocketKeepAlive(){}setTimeout(e,r){let i=()=>this._request.setTimeout(e,r);return this._request?i():this[Qs].push(i),this}get maxHeadersCount(){if(!this.destroyed&&this._request)return this._request.session.localSettings.maxHeaderListSize}set maxHeadersCount(e){}};Fv.exports=f0;});var Pv=$((VW,Lv)=>{var f5=ge("tls");Lv.exports=(t={},e=f5.connect)=>new Promise((r,i)=>{let s=!1,n,o=async()=>{await u,n.off("timeout",a),n.off("error",i),t.resolveSocket?(r({alpnProtocol:n.alpnProtocol,socket:n,timeout:s}),s&&(await Promise.resolve(),n.emit("timeout"))):(n.destroy(),r({alpnProtocol:n.alpnProtocol,timeout:s}));},a=async()=>{s=!0,o();},u=(async()=>{try{n=await e(t,o),n.on("error",i),n.once("timeout",a);}catch(l){i(l);}})();});});var kv=$(($W,Iv)=>{var{isIP:d5}=ge("net"),p5=ge("assert"),m5=t=>{if(t[0]==="["){let r=t.indexOf("]");return p5(r!==-1),t.slice(1,r)}let e=t.indexOf(":");return e===-1?t:t.slice(0,e)};Iv.exports=t=>{let e=m5(t);return d5(e)?"":e};});var $v=$((zW,ga)=>{var{URL:Mv,urlToHttpOptions:Bv}=ge("url"),jv=ge("http"),p0=ge("https"),g5=Pv(),_5=i0(),{Agent:y5,globalAgent:v5}=Jn(),x5=d0(),b5=kv(),qv=n0(),Hv=new _5({maxSize:100}),E5=new Map,C5=(t,e,r)=>{e._httpMessage={shouldKeepAlive:!0};let i=()=>{t.emit("free",e,r);};e.on("free",i);let s=()=>{t.removeSocket(e,r);};e.on("close",s);let n=()=>{let{freeSockets:a}=t;for(let u of Object.values(a))if(u.includes(e)){e.destroy();return}};e.on("timeout",n);let o=()=>{t.removeSocket(e,r),e.off("close",s),e.off("free",i),e.off("timeout",n),e.off("agentRemove",o);};e.on("agentRemove",o),t.emit("free",e,r);},Uv=(t,e=new Map,r=void 0)=>async i=>{let s=`${i.host}:${i.port}:${i.ALPNProtocols.sort()}`;if(!t.has(s)){if(e.has(s))return {alpnProtocol:(await e.get(s)).alpnProtocol};let{path:n}=i;i.path=i.socketPath;let o=g5(i,r);e.set(s,o);try{let a=await o;return t.set(s,a.alpnProtocol),e.delete(s),i.path=n,a}catch(a){throw e.delete(s),i.path=n,a}}return {alpnProtocol:t.get(s)}},Vv=Uv(Hv,E5);ga.exports=async(t,e,r)=>{if(typeof t=="string"?t=Bv(new Mv(t)):t instanceof Mv?t=Bv(t):t={...t},typeof e=="function"||e===void 0?(r=e,e=t):e=Object.assign(t,e),e.ALPNProtocols=e.ALPNProtocols||["h2","http/1.1"],!Array.isArray(e.ALPNProtocols)||e.ALPNProtocols.length===0)throw new Error("The `ALPNProtocols` option must be an Array with at least one entry");e.protocol=e.protocol||"https:";let i=e.protocol==="https:";e.host=e.hostname||e.host||"localhost",e.session=e.tlsSession,e.servername=e.servername||b5(e.headers&&e.headers.host||e.host),e.port=e.port||(i?443:80),e._defaultAgent=i?p0.globalAgent:jv.globalAgent;let s=e.resolveProtocol||Vv,{agent:n}=e;if(n!==void 0&&n!==!1&&n.constructor.name!=="Object")throw new Error("The `options.agent` can be only an object `http`, `https` or `http2` properties");if(i){e.resolveSocket=!0;let{socket:o,alpnProtocol:a,timeout:u}=await s(e);if(u){o&&o.destroy();let h=new Error(`Timed out resolving ALPN: ${e.timeout} ms`);throw h.code="ETIMEDOUT",h.ms=e.timeout,h}o&&e.createConnection&&(o.destroy(),o=void 0),delete e.resolveSocket;let l=a==="h2";if(n&&(n=l?n.http2:n.https,e.agent=n),n===void 0&&(n=l?v5:p0.globalAgent),o)if(n===!1)o.destroy();else {let h=(l?y5:p0.Agent).prototype.createConnection;n.createConnection===h?l?e._reuseSocket=o:C5(n,o,e):o.destroy();}if(l)return qv(new x5(e,r))}else n&&(e.agent=n.http);return e.headers&&(e.headers={...e.headers},e.headers[":authority"]&&(e.headers.host||(e.headers.host=e.headers[":authority"]),delete e.headers[":authority"]),delete e.headers[":method"],delete e.headers[":scheme"],delete e.headers[":path"]),qv(jv.request(e,r))};ga.exports.protocolCache=Hv;ga.exports.resolveProtocol=Vv;ga.exports.createResolveProtocol=Uv;});var m0=$((KW,zv)=>{var T5=ge("stream"),A5=ge("tls"),w5=new A5.TLSSocket(new T5.PassThrough)._handle._parentWrap.constructor;zv.exports=w5;});var _0=$((GW,Kv)=>{var g0=class extends Error{constructor(e,r=""){super(`The proxy server rejected the request with status code ${e} (${r||"empty status message"})`),this.statusCode=e,this.statusMessage=r;}};Kv.exports=g0;});var Wv=$((WW,Gv)=>{var D5=(t,e,r)=>{if(!r.some(s=>typeof s==="string"?typeof e===s:e instanceof s)){let s=r.map(n=>typeof n=="string"?n:n.name);throw new TypeError(`Expected '${t}' to be a type of ${s.join(" or ")}, got ${typeof e}`)}};Gv.exports=D5;});var y0=$((YW,Jv)=>{var{URL:Yv}=ge("url"),gl=Wv();Jv.exports=(t,e)=>{gl("proxyOptions",e,["object"]),gl("proxyOptions.headers",e.headers,["object","undefined"]),gl("proxyOptions.raw",e.raw,["boolean","undefined"]),gl("proxyOptions.url",e.url,[Yv,"string"]);let r=new Yv(e.url);t.proxyOptions={raw:!0,...e,headers:{...e.headers},url:r};};});var _l=$((JW,Zv)=>{Zv.exports=t=>{let{username:e,password:r}=t.proxyOptions.url;if(e||r){let i=`${e}:${r}`,s=`Basic ${Buffer.from(i).toString("base64")}`;return {"proxy-authorization":s,authorization:s}}return {}};});var rx=$((ZW,tx)=>{var S5=ge("tls"),R5=ge("http"),Xv=ge("https"),N5=m0(),{globalAgent:O5}=Jn(),F5=_0(),Qv=y0(),L5=_l(),ex=(t,e,r)=>{(async()=>{try{let{proxyOptions:i}=t,{url:s,headers:n,raw:o}=i,a=await O5.request(s,i,{...L5(t),...n,":method":"CONNECT",":authority":`${e.host}:${e.port}`});a.once("error",r),a.once("response",u=>{let l=u[":status"];if(l!==200){r(new F5(l,""));return}let h=t instanceof Xv.Agent;if(o&&h){e.socket=a;let d=S5.connect(e);d.once("close",()=>{a.destroy();}),r(null,d);return}let c=new N5(a);c.encrypted=!1,c._handle.getpeername=d=>{d.family=void 0,d.address=void 0,d.port=void 0;},r(null,c);});}catch(i){r(i);}})();},v0=class extends R5.Agent{constructor(e){super(e),Qv(this,e.proxyOptions);}createConnection(e,r){ex(this,e,r);}},x0=class extends Xv.Agent{constructor(e){super(e),Qv(this,e.proxyOptions);}createConnection(e,r){ex(this,e,r);}};tx.exports={HttpOverHttp2:v0,HttpsOverHttp2:x0};});var E0=$((XW,ix)=>{var{Agent:P5}=Jn(),I5=m0(),k5=_0(),M5=y0(),b0=class extends P5{constructor(e){super(e),M5(this,e.proxyOptions);}async createConnection(e,r){let i=`${e.hostname}:${e.port||443}`,[s,n,o]=await this._getProxyStream(i);if(n!==200)throw new k5(n,o);if(this.proxyOptions.raw)r.socket=s;else {let a=new I5(s);return a.encrypted=!1,a._handle.getpeername=u=>{u.family=void 0,u.address=void 0,u.port=void 0;},a}return super.createConnection(e,r)}};ix.exports=b0;});var sx=$((QW,nx)=>{var{globalAgent:B5}=Jn(),j5=E0(),q5=_l(),H5=t=>new Promise((e,r)=>{t.once("error",r),t.once("response",i=>{t.off("error",r),e(i[":status"]);});}),C0=class extends j5{async _getProxyStream(e){let{proxyOptions:r}=this,i={...q5(this),...r.headers,":method":"CONNECT",":authority":e},s=await B5.request(r.url,r,i),n=await H5(s);return [s,n,""]}};nx.exports=C0;});var ax=$((eY,ox)=>{var U5=ge("http"),V5=ge("https"),$5=E0(),z5=_l(),K5=t=>new Promise((e,r)=>{let i=(s,n,o)=>{n.unshift(o),t.off("error",r),e([n,s.statusCode,s.statusMessage]);};t.once("error",r),t.once("connect",i);}),yl=class extends $5{async _getProxyStream(e){let{proxyOptions:r}=this,{url:i,headers:s}=this.proxyOptions,o=(i.protocol==="https:"?V5:U5).request({...r,hostname:i.hostname,port:i.port,path:e,headers:{...z5(this),...s,host:e},method:"CONNECT"}).end();return K5(o)}};ox.exports={Http2OverHttp:yl,Http2OverHttps:yl};});var lx=$((tY,ux)=>{var G5=ge("http2"),{Agent:W5,globalAgent:Y5}=Jn(),T0=d0(),J5=a0(),Z5=$v(),{HttpOverHttp2:X5,HttpsOverHttp2:Q5}=rx(),eP=sx(),{Http2OverHttp:tP,Http2OverHttps:rP}=ax(),iP=u0(),nP=l0(),sP=(t,e,r)=>new T0(t,e,r),oP=(t,e,r)=>{let i=new T0(t,e,r);return i.end(),i};ux.exports={...G5,ClientRequest:T0,IncomingMessage:J5,Agent:W5,globalAgent:Y5,request:sP,get:oP,auto:Z5,proxies:{HttpOverHttp2:X5,HttpsOverHttp2:Q5,Http2OverHttp2:eP,Http2OverHttp:tP,Http2OverHttps:rP},validateHeaderName:iP,validateHeaderValue:nP};});var Dx=$((wx,L0)=>{(function(t,e){function r(k,y){if(!k)throw new Error(y||"Assertion failed")}function i(k,y){k.super_=y;var C=function(){};C.prototype=y.prototype,k.prototype=new C,k.prototype.constructor=k;}function s(k,y,C){if(s.isBN(k))return k;this.negative=0,this.words=null,this.length=0,this.red=null,k!==null&&((y==="le"||y==="be")&&(C=y,y=10),this._init(k||0,y||10,C||"be"));}typeof t=="object"?t.exports=s:e.BN=s,s.BN=s,s.wordSize=26;var n;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?n=window.Buffer:n=ge("buffer").Buffer;}catch(k){}s.isBN=function(y){return y instanceof s?!0:y!==null&&typeof y=="object"&&y.constructor.wordSize===s.wordSize&&Array.isArray(y.words)},s.max=function(y,C){return y.cmp(C)>0?y:C},s.min=function(y,C){return y.cmp(C)<0?y:C},s.prototype._init=function(y,C,S){if(typeof y=="number")return this._initNumber(y,C,S);if(typeof y=="object")return this._initArray(y,C,S);C==="hex"&&(C=16),r(C===(C|0)&&C>=2&&C<=36),y=y.toString().replace(/\s+/g,"");var R=0;y[0]==="-"&&(R++,this.negative=1),R<y.length&&(C===16?this._parseHex(y,R,S):(this._parseBase(y,C,R),S==="le"&&this._initArray(this.toArray(),C,S)));},s.prototype._initNumber=function(y,C,S){y<0&&(this.negative=1,y=-y),y<67108864?(this.words=[y&67108863],this.length=1):y<4503599627370496?(this.words=[y&67108863,y/67108864&67108863],this.length=2):(r(y<9007199254740992),this.words=[y&67108863,y/67108864&67108863,1],this.length=3),S==="le"&&this._initArray(this.toArray(),C,S);},s.prototype._initArray=function(y,C,S){if(r(typeof y.length=="number"),y.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(y.length/3),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var L,I,K=0;if(S==="be")for(R=y.length-1,L=0;R>=0;R-=3)I=y[R]|y[R-1]<<8|y[R-2]<<16,this.words[L]|=I<<K&67108863,this.words[L+1]=I>>>26-K&67108863,K+=24,K>=26&&(K-=26,L++);else if(S==="le")for(R=0,L=0;R<y.length;R+=3)I=y[R]|y[R+1]<<8|y[R+2]<<16,this.words[L]|=I<<K&67108863,this.words[L+1]=I>>>26-K&67108863,K+=24,K>=26&&(K-=26,L++);return this._strip()};function o(k,y){var C=k.charCodeAt(y);if(C>=48&&C<=57)return C-48;if(C>=65&&C<=70)return C-55;if(C>=97&&C<=102)return C-87;r(!1,"Invalid character in "+k);}function a(k,y,C){var S=o(k,C);return C-1>=y&&(S|=o(k,C-1)<<4),S}s.prototype._parseHex=function(y,C,S){this.length=Math.ceil((y.length-C)/6),this.words=new Array(this.length);for(var R=0;R<this.length;R++)this.words[R]=0;var L=0,I=0,K;if(S==="be")for(R=y.length-1;R>=C;R-=2)K=a(y,C,R)<<L,this.words[I]|=K&67108863,L>=18?(L-=18,I+=1,this.words[I]|=K>>>26):L+=8;else {var j=y.length-C;for(R=j%2===0?C+1:C;R<y.length;R+=2)K=a(y,C,R)<<L,this.words[I]|=K&67108863,L>=18?(L-=18,I+=1,this.words[I]|=K>>>26):L+=8;}this._strip();};function u(k,y,C,S){for(var R=0,L=0,I=Math.min(k.length,C),K=y;K<I;K++){var j=k.charCodeAt(K)-48;R*=S,j>=49?L=j-49+10:j>=17?L=j-17+10:L=j,r(j>=0&&L<S,"Invalid character"),R+=L;}return R}s.prototype._parseBase=function(y,C,S){this.words=[0],this.length=1;for(var R=0,L=1;L<=67108863;L*=C)R++;R--,L=L/C|0;for(var I=y.length-S,K=I%R,j=Math.min(I,I-K)+S,A=0,q=S;q<j;q+=R)A=u(y,q,q+R,C),this.imuln(L),this.words[0]+A<67108864?this.words[0]+=A:this._iaddn(A);if(K!==0){var B=1;for(A=u(y,q,y.length,C),q=0;q<K;q++)B*=C;this.imuln(B),this.words[0]+A<67108864?this.words[0]+=A:this._iaddn(A);}this._strip();},s.prototype.copy=function(y){y.words=new Array(this.length);for(var C=0;C<this.length;C++)y.words[C]=this.words[C];y.length=this.length,y.negative=this.negative,y.red=this.red;};function l(k,y){k.words=y.words,k.length=y.length,k.negative=y.negative,k.red=y.red;}if(s.prototype._move=function(y){l(y,this);},s.prototype.clone=function(){var y=new s(null);return this.copy(y),y},s.prototype._expand=function(y){for(;this.length<y;)this.words[this.length++]=0;return this},s.prototype._strip=function(){for(;this.length>1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},s.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},typeof Symbol!="undefined"&&typeof Symbol.for=="function")try{s.prototype[Symbol.for("nodejs.util.inspect.custom")]=h;}catch(k){s.prototype.inspect=h;}else s.prototype.inspect=h;function h(){return (this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var c=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];s.prototype.toString=function(y,C){y=y||10,C=C|0||1;var S;if(y===16||y==="hex"){S="";for(var R=0,L=0,I=0;I<this.length;I++){var K=this.words[I],j=((K<<R|L)&16777215).toString(16);L=K>>>24-R&16777215,R+=2,R>=26&&(R-=26,I--),L!==0||I!==this.length-1?S=c[6-j.length]+j+S:S=j+S;}for(L!==0&&(S=L.toString(16)+S);S.length%C!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}if(y===(y|0)&&y>=2&&y<=36){var A=d[y],q=f[y];S="";var B=this.clone();for(B.negative=0;!B.isZero();){var T=B.modrn(q).toString(y);B=B.idivn(q),B.isZero()?S=T+S:S=c[A-T.length]+T+S;}for(this.isZero()&&(S="0"+S);S.length%C!==0;)S="0"+S;return this.negative!==0&&(S="-"+S),S}r(!1,"Base should be between 2 and 36");},s.prototype.toNumber=function(){var y=this.words[0];return this.length===2?y+=this.words[1]*67108864:this.length===3&&this.words[2]===1?y+=4503599627370496+this.words[1]*67108864:this.length>2&&r(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-y:y},s.prototype.toJSON=function(){return this.toString(16,2)},n&&(s.prototype.toBuffer=function(y,C){return this.toArrayLike(n,y,C)}),s.prototype.toArray=function(y,C){return this.toArrayLike(Array,y,C)};var m=function(y,C){return y.allocUnsafe?y.allocUnsafe(C):new y(C)};s.prototype.toArrayLike=function(y,C,S){this._strip();var R=this.byteLength(),L=S||Math.max(1,R);r(R<=L,"byte array longer than desired length"),r(L>0,"Requested array length <= 0");var I=m(y,L),K=C==="le"?"LE":"BE";return this["_toArrayLike"+K](I,R),I},s.prototype._toArrayLikeLE=function(y,C){for(var S=0,R=0,L=0,I=0;L<this.length;L++){var K=this.words[L]<<I|R;y[S++]=K&255,S<y.length&&(y[S++]=K>>8&255),S<y.length&&(y[S++]=K>>16&255),I===6?(S<y.length&&(y[S++]=K>>24&255),R=0,I=0):(R=K>>>24,I+=2);}if(S<y.length)for(y[S++]=R;S<y.length;)y[S++]=0;},s.prototype._toArrayLikeBE=function(y,C){for(var S=y.length-1,R=0,L=0,I=0;L<this.length;L++){var K=this.words[L]<<I|R;y[S--]=K&255,S>=0&&(y[S--]=K>>8&255),S>=0&&(y[S--]=K>>16&255),I===6?(S>=0&&(y[S--]=K>>24&255),R=0,I=0):(R=K>>>24,I+=2);}if(S>=0)for(y[S--]=R;S>=0;)y[S--]=0;},Math.clz32?s.prototype._countBits=function(y){return 32-Math.clz32(y)}:s.prototype._countBits=function(y){var C=y,S=0;return C>=4096&&(S+=13,C>>>=13),C>=64&&(S+=7,C>>>=7),C>=8&&(S+=4,C>>>=4),C>=2&&(S+=2,C>>>=2),S+C},s.prototype._zeroBits=function(y){if(y===0)return 26;var C=y,S=0;return C&8191||(S+=13,C>>>=13),C&127||(S+=7,C>>>=7),C&15||(S+=4,C>>>=4),C&3||(S+=2,C>>>=2),C&1||S++,S},s.prototype.bitLength=function(){var y=this.words[this.length-1],C=this._countBits(y);return (this.length-1)*26+C};function g(k){for(var y=new Array(k.bitLength()),C=0;C<y.length;C++){var S=C/26|0,R=C%26;y[C]=k.words[S]>>>R&1;}return y}s.prototype.zeroBits=function(){if(this.isZero())return 0;for(var y=0,C=0;C<this.length;C++){var S=this._zeroBits(this.words[C]);if(y+=S,S!==26)break}return y},s.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},s.prototype.toTwos=function(y){return this.negative!==0?this.abs().inotn(y).iaddn(1):this.clone()},s.prototype.fromTwos=function(y){return this.testn(y-1)?this.notn(y).iaddn(1).ineg():this.clone()},s.prototype.isNeg=function(){return this.negative!==0},s.prototype.neg=function(){return this.clone().ineg()},s.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},s.prototype.iuor=function(y){for(;this.length<y.length;)this.words[this.length++]=0;for(var C=0;C<y.length;C++)this.words[C]=this.words[C]|y.words[C];return this._strip()},s.prototype.ior=function(y){return r((this.negative|y.negative)===0),this.iuor(y)},s.prototype.or=function(y){return this.length>y.length?this.clone().ior(y):y.clone().ior(this)},s.prototype.uor=function(y){return this.length>y.length?this.clone().iuor(y):y.clone().iuor(this)},s.prototype.iuand=function(y){var C;this.length>y.length?C=y:C=this;for(var S=0;S<C.length;S++)this.words[S]=this.words[S]&y.words[S];return this.length=C.length,this._strip()},s.prototype.iand=function(y){return r((this.negative|y.negative)===0),this.iuand(y)},s.prototype.and=function(y){return this.length>y.length?this.clone().iand(y):y.clone().iand(this)},s.prototype.uand=function(y){return this.length>y.length?this.clone().iuand(y):y.clone().iuand(this)},s.prototype.iuxor=function(y){var C,S;this.length>y.length?(C=this,S=y):(C=y,S=this);for(var R=0;R<S.length;R++)this.words[R]=C.words[R]^S.words[R];if(this!==C)for(;R<C.length;R++)this.words[R]=C.words[R];return this.length=C.length,this._strip()},s.prototype.ixor=function(y){return r((this.negative|y.negative)===0),this.iuxor(y)},s.prototype.xor=function(y){return this.length>y.length?this.clone().ixor(y):y.clone().ixor(this)},s.prototype.uxor=function(y){return this.length>y.length?this.clone().iuxor(y):y.clone().iuxor(this)},s.prototype.inotn=function(y){r(typeof y=="number"&&y>=0);var C=Math.ceil(y/26)|0,S=y%26;this._expand(C),S>0&&C--;for(var R=0;R<C;R++)this.words[R]=~this.words[R]&67108863;return S>0&&(this.words[R]=~this.words[R]&67108863>>26-S),this._strip()},s.prototype.notn=function(y){return this.clone().inotn(y)},s.prototype.setn=function(y,C){r(typeof y=="number"&&y>=0);var S=y/26|0,R=y%26;return this._expand(S+1),C?this.words[S]=this.words[S]|1<<R:this.words[S]=this.words[S]&~(1<<R),this._strip()},s.prototype.iadd=function(y){var C;if(this.negative!==0&&y.negative===0)return this.negative=0,C=this.isub(y),this.negative^=1,this._normSign();if(this.negative===0&&y.negative!==0)return y.negative=0,C=this.isub(y),y.negative=1,C._normSign();var S,R;this.length>y.length?(S=this,R=y):(S=y,R=this);for(var L=0,I=0;I<R.length;I++)C=(S.words[I]|0)+(R.words[I]|0)+L,this.words[I]=C&67108863,L=C>>>26;for(;L!==0&&I<S.length;I++)C=(S.words[I]|0)+L,this.words[I]=C&67108863,L=C>>>26;if(this.length=S.length,L!==0)this.words[this.length]=L,this.length++;else if(S!==this)for(;I<S.length;I++)this.words[I]=S.words[I];return this},s.prototype.add=function(y){var C;return y.negative!==0&&this.negative===0?(y.negative=0,C=this.sub(y),y.negative^=1,C):y.negative===0&&this.negative!==0?(this.negative=0,C=y.sub(this),this.negative=1,C):this.length>y.length?this.clone().iadd(y):y.clone().iadd(this)},s.prototype.isub=function(y){if(y.negative!==0){y.negative=0;var C=this.iadd(y);return y.negative=1,C._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(y),this.negative=1,this._normSign();var S=this.cmp(y);if(S===0)return this.negative=0,this.length=1,this.words[0]=0,this;var R,L;S>0?(R=this,L=y):(R=y,L=this);for(var I=0,K=0;K<L.length;K++)C=(R.words[K]|0)-(L.words[K]|0)+I,I=C>>26,this.words[K]=C&67108863;for(;I!==0&&K<R.length;K++)C=(R.words[K]|0)+I,I=C>>26,this.words[K]=C&67108863;if(I===0&&K<R.length&&R!==this)for(;K<R.length;K++)this.words[K]=R.words[K];return this.length=Math.max(this.length,K),R!==this&&(this.negative=1),this._strip()},s.prototype.sub=function(y){return this.clone().isub(y)};function v(k,y,C){C.negative=y.negative^k.negative;var S=k.length+y.length|0;C.length=S,S=S-1|0;var R=k.words[0]|0,L=y.words[0]|0,I=R*L,K=I&67108863,j=I/67108864|0;C.words[0]=K;for(var A=1;A<S;A++){for(var q=j>>>26,B=j&67108863,T=Math.min(A,y.length-1),P=Math.max(0,A-k.length+1);P<=T;P++){var H=A-P|0;R=k.words[H]|0,L=y.words[P]|0,I=R*L+B,q+=I/67108864|0,B=I&67108863;}C.words[A]=B|0,j=q|0;}return j!==0?C.words[A]=j|0:C.length--,C._strip()}var x=function(y,C,S){var R=y.words,L=C.words,I=S.words,K=0,j,A,q,B=R[0]|0,T=B&8191,P=B>>>13,H=R[1]|0,z=H&8191,G=H>>>13,oe=R[2]|0,se=oe&8191,X=oe>>>13,ee=R[3]|0,V=ee&8191,M=ee>>>13,J=R[4]|0,W=J&8191,ne=J>>>13,le=R[5]|0,Q=le&8191,_e=le>>>13,Se=R[6]|0,ye=Se&8191,Ce=Se>>>13,tt=R[7]|0,Fe=tt&8191,He=tt>>>13,Yt=R[8]|0,Xe=Yt&8191,ot=Yt>>>13,pi=R[9]|0,nt=pi&8191,rt=pi>>>13,ce=L[0]|0,be=ce&8191,Ae=ce>>>13,Le=L[1]|0,Ne=Le&8191,We=Le>>>13,lt=L[2]|0,Ve=lt&8191,Qe=lt>>>13,Dn=L[3]|0,ct=Dn&8191,ht=Dn>>>13,Sn=L[4]|0,ft=Sn&8191,dt=Sn>>>13,Rn=L[5]|0,pt=Rn&8191,mt=Rn>>>13,Nn=L[6]|0,gt=Nn&8191,_t=Nn>>>13,On=L[7]|0,yt=On&8191,vt=On>>>13,Fn=L[8]|0,xt=Fn&8191,bt=Fn>>>13,Ln=L[9]|0,Et=Ln&8191,Ct=Ln>>>13;S.negative=y.negative^C.negative,S.length=19,j=Math.imul(T,be),A=Math.imul(T,Ae),A=A+Math.imul(P,be)|0,q=Math.imul(P,Ae);var Mi=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Mi>>>26)|0,Mi&=67108863,j=Math.imul(z,be),A=Math.imul(z,Ae),A=A+Math.imul(G,be)|0,q=Math.imul(G,Ae),j=j+Math.imul(T,Ne)|0,A=A+Math.imul(T,We)|0,A=A+Math.imul(P,Ne)|0,q=q+Math.imul(P,We)|0;var Bi=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Bi>>>26)|0,Bi&=67108863,j=Math.imul(se,be),A=Math.imul(se,Ae),A=A+Math.imul(X,be)|0,q=Math.imul(X,Ae),j=j+Math.imul(z,Ne)|0,A=A+Math.imul(z,We)|0,A=A+Math.imul(G,Ne)|0,q=q+Math.imul(G,We)|0,j=j+Math.imul(T,Ve)|0,A=A+Math.imul(T,Qe)|0,A=A+Math.imul(P,Ve)|0,q=q+Math.imul(P,Qe)|0;var ji=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(ji>>>26)|0,ji&=67108863,j=Math.imul(V,be),A=Math.imul(V,Ae),A=A+Math.imul(M,be)|0,q=Math.imul(M,Ae),j=j+Math.imul(se,Ne)|0,A=A+Math.imul(se,We)|0,A=A+Math.imul(X,Ne)|0,q=q+Math.imul(X,We)|0,j=j+Math.imul(z,Ve)|0,A=A+Math.imul(z,Qe)|0,A=A+Math.imul(G,Ve)|0,q=q+Math.imul(G,Qe)|0,j=j+Math.imul(T,ct)|0,A=A+Math.imul(T,ht)|0,A=A+Math.imul(P,ct)|0,q=q+Math.imul(P,ht)|0;var qi=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(qi>>>26)|0,qi&=67108863,j=Math.imul(W,be),A=Math.imul(W,Ae),A=A+Math.imul(ne,be)|0,q=Math.imul(ne,Ae),j=j+Math.imul(V,Ne)|0,A=A+Math.imul(V,We)|0,A=A+Math.imul(M,Ne)|0,q=q+Math.imul(M,We)|0,j=j+Math.imul(se,Ve)|0,A=A+Math.imul(se,Qe)|0,A=A+Math.imul(X,Ve)|0,q=q+Math.imul(X,Qe)|0,j=j+Math.imul(z,ct)|0,A=A+Math.imul(z,ht)|0,A=A+Math.imul(G,ct)|0,q=q+Math.imul(G,ht)|0,j=j+Math.imul(T,ft)|0,A=A+Math.imul(T,dt)|0,A=A+Math.imul(P,ft)|0,q=q+Math.imul(P,dt)|0;var Hi=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Hi>>>26)|0,Hi&=67108863,j=Math.imul(Q,be),A=Math.imul(Q,Ae),A=A+Math.imul(_e,be)|0,q=Math.imul(_e,Ae),j=j+Math.imul(W,Ne)|0,A=A+Math.imul(W,We)|0,A=A+Math.imul(ne,Ne)|0,q=q+Math.imul(ne,We)|0,j=j+Math.imul(V,Ve)|0,A=A+Math.imul(V,Qe)|0,A=A+Math.imul(M,Ve)|0,q=q+Math.imul(M,Qe)|0,j=j+Math.imul(se,ct)|0,A=A+Math.imul(se,ht)|0,A=A+Math.imul(X,ct)|0,q=q+Math.imul(X,ht)|0,j=j+Math.imul(z,ft)|0,A=A+Math.imul(z,dt)|0,A=A+Math.imul(G,ft)|0,q=q+Math.imul(G,dt)|0,j=j+Math.imul(T,pt)|0,A=A+Math.imul(T,mt)|0,A=A+Math.imul(P,pt)|0,q=q+Math.imul(P,mt)|0;var If=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(If>>>26)|0,If&=67108863,j=Math.imul(ye,be),A=Math.imul(ye,Ae),A=A+Math.imul(Ce,be)|0,q=Math.imul(Ce,Ae),j=j+Math.imul(Q,Ne)|0,A=A+Math.imul(Q,We)|0,A=A+Math.imul(_e,Ne)|0,q=q+Math.imul(_e,We)|0,j=j+Math.imul(W,Ve)|0,A=A+Math.imul(W,Qe)|0,A=A+Math.imul(ne,Ve)|0,q=q+Math.imul(ne,Qe)|0,j=j+Math.imul(V,ct)|0,A=A+Math.imul(V,ht)|0,A=A+Math.imul(M,ct)|0,q=q+Math.imul(M,ht)|0,j=j+Math.imul(se,ft)|0,A=A+Math.imul(se,dt)|0,A=A+Math.imul(X,ft)|0,q=q+Math.imul(X,dt)|0,j=j+Math.imul(z,pt)|0,A=A+Math.imul(z,mt)|0,A=A+Math.imul(G,pt)|0,q=q+Math.imul(G,mt)|0,j=j+Math.imul(T,gt)|0,A=A+Math.imul(T,_t)|0,A=A+Math.imul(P,gt)|0,q=q+Math.imul(P,_t)|0;var kf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(kf>>>26)|0,kf&=67108863,j=Math.imul(Fe,be),A=Math.imul(Fe,Ae),A=A+Math.imul(He,be)|0,q=Math.imul(He,Ae),j=j+Math.imul(ye,Ne)|0,A=A+Math.imul(ye,We)|0,A=A+Math.imul(Ce,Ne)|0,q=q+Math.imul(Ce,We)|0,j=j+Math.imul(Q,Ve)|0,A=A+Math.imul(Q,Qe)|0,A=A+Math.imul(_e,Ve)|0,q=q+Math.imul(_e,Qe)|0,j=j+Math.imul(W,ct)|0,A=A+Math.imul(W,ht)|0,A=A+Math.imul(ne,ct)|0,q=q+Math.imul(ne,ht)|0,j=j+Math.imul(V,ft)|0,A=A+Math.imul(V,dt)|0,A=A+Math.imul(M,ft)|0,q=q+Math.imul(M,dt)|0,j=j+Math.imul(se,pt)|0,A=A+Math.imul(se,mt)|0,A=A+Math.imul(X,pt)|0,q=q+Math.imul(X,mt)|0,j=j+Math.imul(z,gt)|0,A=A+Math.imul(z,_t)|0,A=A+Math.imul(G,gt)|0,q=q+Math.imul(G,_t)|0,j=j+Math.imul(T,yt)|0,A=A+Math.imul(T,vt)|0,A=A+Math.imul(P,yt)|0,q=q+Math.imul(P,vt)|0;var Mf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Mf>>>26)|0,Mf&=67108863,j=Math.imul(Xe,be),A=Math.imul(Xe,Ae),A=A+Math.imul(ot,be)|0,q=Math.imul(ot,Ae),j=j+Math.imul(Fe,Ne)|0,A=A+Math.imul(Fe,We)|0,A=A+Math.imul(He,Ne)|0,q=q+Math.imul(He,We)|0,j=j+Math.imul(ye,Ve)|0,A=A+Math.imul(ye,Qe)|0,A=A+Math.imul(Ce,Ve)|0,q=q+Math.imul(Ce,Qe)|0,j=j+Math.imul(Q,ct)|0,A=A+Math.imul(Q,ht)|0,A=A+Math.imul(_e,ct)|0,q=q+Math.imul(_e,ht)|0,j=j+Math.imul(W,ft)|0,A=A+Math.imul(W,dt)|0,A=A+Math.imul(ne,ft)|0,q=q+Math.imul(ne,dt)|0,j=j+Math.imul(V,pt)|0,A=A+Math.imul(V,mt)|0,A=A+Math.imul(M,pt)|0,q=q+Math.imul(M,mt)|0,j=j+Math.imul(se,gt)|0,A=A+Math.imul(se,_t)|0,A=A+Math.imul(X,gt)|0,q=q+Math.imul(X,_t)|0,j=j+Math.imul(z,yt)|0,A=A+Math.imul(z,vt)|0,A=A+Math.imul(G,yt)|0,q=q+Math.imul(G,vt)|0,j=j+Math.imul(T,xt)|0,A=A+Math.imul(T,bt)|0,A=A+Math.imul(P,xt)|0,q=q+Math.imul(P,bt)|0;var Bf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Bf>>>26)|0,Bf&=67108863,j=Math.imul(nt,be),A=Math.imul(nt,Ae),A=A+Math.imul(rt,be)|0,q=Math.imul(rt,Ae),j=j+Math.imul(Xe,Ne)|0,A=A+Math.imul(Xe,We)|0,A=A+Math.imul(ot,Ne)|0,q=q+Math.imul(ot,We)|0,j=j+Math.imul(Fe,Ve)|0,A=A+Math.imul(Fe,Qe)|0,A=A+Math.imul(He,Ve)|0,q=q+Math.imul(He,Qe)|0,j=j+Math.imul(ye,ct)|0,A=A+Math.imul(ye,ht)|0,A=A+Math.imul(Ce,ct)|0,q=q+Math.imul(Ce,ht)|0,j=j+Math.imul(Q,ft)|0,A=A+Math.imul(Q,dt)|0,A=A+Math.imul(_e,ft)|0,q=q+Math.imul(_e,dt)|0,j=j+Math.imul(W,pt)|0,A=A+Math.imul(W,mt)|0,A=A+Math.imul(ne,pt)|0,q=q+Math.imul(ne,mt)|0,j=j+Math.imul(V,gt)|0,A=A+Math.imul(V,_t)|0,A=A+Math.imul(M,gt)|0,q=q+Math.imul(M,_t)|0,j=j+Math.imul(se,yt)|0,A=A+Math.imul(se,vt)|0,A=A+Math.imul(X,yt)|0,q=q+Math.imul(X,vt)|0,j=j+Math.imul(z,xt)|0,A=A+Math.imul(z,bt)|0,A=A+Math.imul(G,xt)|0,q=q+Math.imul(G,bt)|0,j=j+Math.imul(T,Et)|0,A=A+Math.imul(T,Ct)|0,A=A+Math.imul(P,Et)|0,q=q+Math.imul(P,Ct)|0;var jf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(jf>>>26)|0,jf&=67108863,j=Math.imul(nt,Ne),A=Math.imul(nt,We),A=A+Math.imul(rt,Ne)|0,q=Math.imul(rt,We),j=j+Math.imul(Xe,Ve)|0,A=A+Math.imul(Xe,Qe)|0,A=A+Math.imul(ot,Ve)|0,q=q+Math.imul(ot,Qe)|0,j=j+Math.imul(Fe,ct)|0,A=A+Math.imul(Fe,ht)|0,A=A+Math.imul(He,ct)|0,q=q+Math.imul(He,ht)|0,j=j+Math.imul(ye,ft)|0,A=A+Math.imul(ye,dt)|0,A=A+Math.imul(Ce,ft)|0,q=q+Math.imul(Ce,dt)|0,j=j+Math.imul(Q,pt)|0,A=A+Math.imul(Q,mt)|0,A=A+Math.imul(_e,pt)|0,q=q+Math.imul(_e,mt)|0,j=j+Math.imul(W,gt)|0,A=A+Math.imul(W,_t)|0,A=A+Math.imul(ne,gt)|0,q=q+Math.imul(ne,_t)|0,j=j+Math.imul(V,yt)|0,A=A+Math.imul(V,vt)|0,A=A+Math.imul(M,yt)|0,q=q+Math.imul(M,vt)|0,j=j+Math.imul(se,xt)|0,A=A+Math.imul(se,bt)|0,A=A+Math.imul(X,xt)|0,q=q+Math.imul(X,bt)|0,j=j+Math.imul(z,Et)|0,A=A+Math.imul(z,Ct)|0,A=A+Math.imul(G,Et)|0,q=q+Math.imul(G,Ct)|0;var qf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(qf>>>26)|0,qf&=67108863,j=Math.imul(nt,Ve),A=Math.imul(nt,Qe),A=A+Math.imul(rt,Ve)|0,q=Math.imul(rt,Qe),j=j+Math.imul(Xe,ct)|0,A=A+Math.imul(Xe,ht)|0,A=A+Math.imul(ot,ct)|0,q=q+Math.imul(ot,ht)|0,j=j+Math.imul(Fe,ft)|0,A=A+Math.imul(Fe,dt)|0,A=A+Math.imul(He,ft)|0,q=q+Math.imul(He,dt)|0,j=j+Math.imul(ye,pt)|0,A=A+Math.imul(ye,mt)|0,A=A+Math.imul(Ce,pt)|0,q=q+Math.imul(Ce,mt)|0,j=j+Math.imul(Q,gt)|0,A=A+Math.imul(Q,_t)|0,A=A+Math.imul(_e,gt)|0,q=q+Math.imul(_e,_t)|0,j=j+Math.imul(W,yt)|0,A=A+Math.imul(W,vt)|0,A=A+Math.imul(ne,yt)|0,q=q+Math.imul(ne,vt)|0,j=j+Math.imul(V,xt)|0,A=A+Math.imul(V,bt)|0,A=A+Math.imul(M,xt)|0,q=q+Math.imul(M,bt)|0,j=j+Math.imul(se,Et)|0,A=A+Math.imul(se,Ct)|0,A=A+Math.imul(X,Et)|0,q=q+Math.imul(X,Ct)|0;var Hf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Hf>>>26)|0,Hf&=67108863,j=Math.imul(nt,ct),A=Math.imul(nt,ht),A=A+Math.imul(rt,ct)|0,q=Math.imul(rt,ht),j=j+Math.imul(Xe,ft)|0,A=A+Math.imul(Xe,dt)|0,A=A+Math.imul(ot,ft)|0,q=q+Math.imul(ot,dt)|0,j=j+Math.imul(Fe,pt)|0,A=A+Math.imul(Fe,mt)|0,A=A+Math.imul(He,pt)|0,q=q+Math.imul(He,mt)|0,j=j+Math.imul(ye,gt)|0,A=A+Math.imul(ye,_t)|0,A=A+Math.imul(Ce,gt)|0,q=q+Math.imul(Ce,_t)|0,j=j+Math.imul(Q,yt)|0,A=A+Math.imul(Q,vt)|0,A=A+Math.imul(_e,yt)|0,q=q+Math.imul(_e,vt)|0,j=j+Math.imul(W,xt)|0,A=A+Math.imul(W,bt)|0,A=A+Math.imul(ne,xt)|0,q=q+Math.imul(ne,bt)|0,j=j+Math.imul(V,Et)|0,A=A+Math.imul(V,Ct)|0,A=A+Math.imul(M,Et)|0,q=q+Math.imul(M,Ct)|0;var Uf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Uf>>>26)|0,Uf&=67108863,j=Math.imul(nt,ft),A=Math.imul(nt,dt),A=A+Math.imul(rt,ft)|0,q=Math.imul(rt,dt),j=j+Math.imul(Xe,pt)|0,A=A+Math.imul(Xe,mt)|0,A=A+Math.imul(ot,pt)|0,q=q+Math.imul(ot,mt)|0,j=j+Math.imul(Fe,gt)|0,A=A+Math.imul(Fe,_t)|0,A=A+Math.imul(He,gt)|0,q=q+Math.imul(He,_t)|0,j=j+Math.imul(ye,yt)|0,A=A+Math.imul(ye,vt)|0,A=A+Math.imul(Ce,yt)|0,q=q+Math.imul(Ce,vt)|0,j=j+Math.imul(Q,xt)|0,A=A+Math.imul(Q,bt)|0,A=A+Math.imul(_e,xt)|0,q=q+Math.imul(_e,bt)|0,j=j+Math.imul(W,Et)|0,A=A+Math.imul(W,Ct)|0,A=A+Math.imul(ne,Et)|0,q=q+Math.imul(ne,Ct)|0;var Vf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Vf>>>26)|0,Vf&=67108863,j=Math.imul(nt,pt),A=Math.imul(nt,mt),A=A+Math.imul(rt,pt)|0,q=Math.imul(rt,mt),j=j+Math.imul(Xe,gt)|0,A=A+Math.imul(Xe,_t)|0,A=A+Math.imul(ot,gt)|0,q=q+Math.imul(ot,_t)|0,j=j+Math.imul(Fe,yt)|0,A=A+Math.imul(Fe,vt)|0,A=A+Math.imul(He,yt)|0,q=q+Math.imul(He,vt)|0,j=j+Math.imul(ye,xt)|0,A=A+Math.imul(ye,bt)|0,A=A+Math.imul(Ce,xt)|0,q=q+Math.imul(Ce,bt)|0,j=j+Math.imul(Q,Et)|0,A=A+Math.imul(Q,Ct)|0,A=A+Math.imul(_e,Et)|0,q=q+Math.imul(_e,Ct)|0;var $f=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+($f>>>26)|0,$f&=67108863,j=Math.imul(nt,gt),A=Math.imul(nt,_t),A=A+Math.imul(rt,gt)|0,q=Math.imul(rt,_t),j=j+Math.imul(Xe,yt)|0,A=A+Math.imul(Xe,vt)|0,A=A+Math.imul(ot,yt)|0,q=q+Math.imul(ot,vt)|0,j=j+Math.imul(Fe,xt)|0,A=A+Math.imul(Fe,bt)|0,A=A+Math.imul(He,xt)|0,q=q+Math.imul(He,bt)|0,j=j+Math.imul(ye,Et)|0,A=A+Math.imul(ye,Ct)|0,A=A+Math.imul(Ce,Et)|0,q=q+Math.imul(Ce,Ct)|0;var zf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(zf>>>26)|0,zf&=67108863,j=Math.imul(nt,yt),A=Math.imul(nt,vt),A=A+Math.imul(rt,yt)|0,q=Math.imul(rt,vt),j=j+Math.imul(Xe,xt)|0,A=A+Math.imul(Xe,bt)|0,A=A+Math.imul(ot,xt)|0,q=q+Math.imul(ot,bt)|0,j=j+Math.imul(Fe,Et)|0,A=A+Math.imul(Fe,Ct)|0,A=A+Math.imul(He,Et)|0,q=q+Math.imul(He,Ct)|0;var Kf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Kf>>>26)|0,Kf&=67108863,j=Math.imul(nt,xt),A=Math.imul(nt,bt),A=A+Math.imul(rt,xt)|0,q=Math.imul(rt,bt),j=j+Math.imul(Xe,Et)|0,A=A+Math.imul(Xe,Ct)|0,A=A+Math.imul(ot,Et)|0,q=q+Math.imul(ot,Ct)|0;var Gf=(K+j|0)+((A&8191)<<13)|0;K=(q+(A>>>13)|0)+(Gf>>>26)|0,Gf&=67108863,j=Math.imul(nt,Et),A=Math.imul(nt,Ct),A=A+Math.imul(rt,Et)|0,q=Math.imul(rt,Ct);var Wf=(K+j|0)+((A&8191)<<13)|0;return K=(q+(A>>>13)|0)+(Wf>>>26)|0,Wf&=67108863,I[0]=Mi,I[1]=Bi,I[2]=ji,I[3]=qi,I[4]=Hi,I[5]=If,I[6]=kf,I[7]=Mf,I[8]=Bf,I[9]=jf,I[10]=qf,I[11]=Hf,I[12]=Uf,I[13]=Vf,I[14]=$f,I[15]=zf,I[16]=Kf,I[17]=Gf,I[18]=Wf,K!==0&&(I[19]=K,S.length++),S};Math.imul||(x=v);function _(k,y,C){C.negative=y.negative^k.negative,C.length=k.length+y.length;for(var S=0,R=0,L=0;L<C.length-1;L++){var I=R;R=0;for(var K=S&67108863,j=Math.min(L,y.length-1),A=Math.max(0,L-k.length+1);A<=j;A++){var q=L-A,B=k.words[q]|0,T=y.words[A]|0,P=B*T,H=P&67108863;I=I+(P/67108864|0)|0,H=H+K|0,K=H&67108863,I=I+(H>>>26)|0,R+=I>>>26,I&=67108863;}C.words[L]=K,S=I,I=R;}return S!==0?C.words[L]=S:C.length--,C._strip()}function E(k,y,C){return _(k,y,C)}s.prototype.mulTo=function(y,C){var S,R=this.length+y.length;return this.length===10&&y.length===10?S=x(this,y,C):R<63?S=v(this,y,C):R<1024?S=_(this,y,C):S=E(this,y,C),S};s.prototype.mul=function(y){var C=new s(null);return C.words=new Array(this.length+y.length),this.mulTo(y,C)},s.prototype.mulf=function(y){var C=new s(null);return C.words=new Array(this.length+y.length),E(this,y,C)},s.prototype.imul=function(y){return this.clone().mulTo(y,this)},s.prototype.imuln=function(y){var C=y<0;C&&(y=-y),r(typeof y=="number"),r(y<67108864);for(var S=0,R=0;R<this.length;R++){var L=(this.words[R]|0)*y,I=(L&67108863)+(S&67108863);S>>=26,S+=L/67108864|0,S+=I>>>26,this.words[R]=I&67108863;}return S!==0&&(this.words[R]=S,this.length++),C?this.ineg():this},s.prototype.muln=function(y){return this.clone().imuln(y)},s.prototype.sqr=function(){return this.mul(this)},s.prototype.isqr=function(){return this.imul(this.clone())},s.prototype.pow=function(y){var C=g(y);if(C.length===0)return new s(1);for(var S=this,R=0;R<C.length&&C[R]===0;R++,S=S.sqr());if(++R<C.length)for(var L=S.sqr();R<C.length;R++,L=L.sqr())C[R]!==0&&(S=S.mul(L));return S},s.prototype.iushln=function(y){r(typeof y=="number"&&y>=0);var C=y%26,S=(y-C)/26,R=67108863>>>26-C<<26-C,L;if(C!==0){var I=0;for(L=0;L<this.length;L++){var K=this.words[L]&R,j=(this.words[L]|0)-K<<C;this.words[L]=j|I,I=K>>>26-C;}I&&(this.words[L]=I,this.length++);}if(S!==0){for(L=this.length-1;L>=0;L--)this.words[L+S]=this.words[L];for(L=0;L<S;L++)this.words[L]=0;this.length+=S;}return this._strip()},s.prototype.ishln=function(y){return r(this.negative===0),this.iushln(y)},s.prototype.iushrn=function(y,C,S){r(typeof y=="number"&&y>=0);var R;C?R=(C-C%26)/26:R=0;var L=y%26,I=Math.min((y-L)/26,this.length),K=67108863^67108863>>>L<<L,j=S;if(R-=I,R=Math.max(0,R),j){for(var A=0;A<I;A++)j.words[A]=this.words[A];j.length=I;}if(I!==0)if(this.length>I)for(this.length-=I,A=0;A<this.length;A++)this.words[A]=this.words[A+I];else this.words[0]=0,this.length=1;var q=0;for(A=this.length-1;A>=0&&(q!==0||A>=R);A--){var B=this.words[A]|0;this.words[A]=q<<26-L|B>>>L,q=B&K;}return j&&q!==0&&(j.words[j.length++]=q),this.length===0&&(this.words[0]=0,this.length=1),this._strip()},s.prototype.ishrn=function(y,C,S){return r(this.negative===0),this.iushrn(y,C,S)},s.prototype.shln=function(y){return this.clone().ishln(y)},s.prototype.ushln=function(y){return this.clone().iushln(y)},s.prototype.shrn=function(y){return this.clone().ishrn(y)},s.prototype.ushrn=function(y){return this.clone().iushrn(y)},s.prototype.testn=function(y){r(typeof y=="number"&&y>=0);var C=y%26,S=(y-C)/26,R=1<<C;if(this.length<=S)return !1;var L=this.words[S];return !!(L&R)},s.prototype.imaskn=function(y){r(typeof y=="number"&&y>=0);var C=y%26,S=(y-C)/26;if(r(this.negative===0,"imaskn works only with positive numbers"),this.length<=S)return this;if(C!==0&&S++,this.length=Math.min(S,this.length),C!==0){var R=67108863^67108863>>>C<<C;this.words[this.length-1]&=R;}return this._strip()},s.prototype.maskn=function(y){return this.clone().imaskn(y)},s.prototype.iaddn=function(y){return r(typeof y=="number"),r(y<67108864),y<0?this.isubn(-y):this.negative!==0?this.length===1&&(this.words[0]|0)<=y?(this.words[0]=y-(this.words[0]|0),this.negative=0,this):(this.negative=0,this.isubn(y),this.negative=1,this):this._iaddn(y)},s.prototype._iaddn=function(y){this.words[0]+=y;for(var C=0;C<this.length&&this.words[C]>=67108864;C++)this.words[C]-=67108864,C===this.length-1?this.words[C+1]=1:this.words[C+1]++;return this.length=Math.max(this.length,C+1),this},s.prototype.isubn=function(y){if(r(typeof y=="number"),r(y<67108864),y<0)return this.iaddn(-y);if(this.negative!==0)return this.negative=0,this.iaddn(y),this.negative=1,this;if(this.words[0]-=y,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var C=0;C<this.length&&this.words[C]<0;C++)this.words[C]+=67108864,this.words[C+1]-=1;return this._strip()},s.prototype.addn=function(y){return this.clone().iaddn(y)},s.prototype.subn=function(y){return this.clone().isubn(y)},s.prototype.iabs=function(){return this.negative=0,this},s.prototype.abs=function(){return this.clone().iabs()},s.prototype._ishlnsubmul=function(y,C,S){var R=y.length+S,L;this._expand(R);var I,K=0;for(L=0;L<y.length;L++){I=(this.words[L+S]|0)+K;var j=(y.words[L]|0)*C;I-=j&67108863,K=(I>>26)-(j/67108864|0),this.words[L+S]=I&67108863;}for(;L<this.length-S;L++)I=(this.words[L+S]|0)+K,K=I>>26,this.words[L+S]=I&67108863;if(K===0)return this._strip();for(r(K===-1),K=0,L=0;L<this.length;L++)I=-(this.words[L]|0)+K,K=I>>26,this.words[L]=I&67108863;return this.negative=1,this._strip()},s.prototype._wordDiv=function(y,C){var S=this.length-y.length,R=this.clone(),L=y,I=L.words[L.length-1]|0,K=this._countBits(I);S=26-K,S!==0&&(L=L.ushln(S),R.iushln(S),I=L.words[L.length-1]|0);var j=R.length-L.length,A;if(C!=="mod"){A=new s(null),A.length=j+1,A.words=new Array(A.length);for(var q=0;q<A.length;q++)A.words[q]=0;}var B=R.clone()._ishlnsubmul(L,1,j);B.negative===0&&(R=B,A&&(A.words[j]=1));for(var T=j-1;T>=0;T--){var P=(R.words[L.length+T]|0)*67108864+(R.words[L.length+T-1]|0);for(P=Math.min(P/I|0,67108863),R._ishlnsubmul(L,P,T);R.negative!==0;)P--,R.negative=0,R._ishlnsubmul(L,1,T),R.isZero()||(R.negative^=1);A&&(A.words[T]=P);}return A&&A._strip(),R._strip(),C!=="div"&&S!==0&&R.iushrn(S),{div:A||null,mod:R}},s.prototype.divmod=function(y,C,S){if(r(!y.isZero()),this.isZero())return {div:new s(0),mod:new s(0)};var R,L,I;return this.negative!==0&&y.negative===0?(I=this.neg().divmod(y,C),C!=="mod"&&(R=I.div.neg()),C!=="div"&&(L=I.mod.neg(),S&&L.negative!==0&&L.iadd(y)),{div:R,mod:L}):this.negative===0&&y.negative!==0?(I=this.divmod(y.neg(),C),C!=="mod"&&(R=I.div.neg()),{div:R,mod:I.mod}):this.negative&y.negative?(I=this.neg().divmod(y.neg(),C),C!=="div"&&(L=I.mod.neg(),S&&L.negative!==0&&L.isub(y)),{div:I.div,mod:L}):y.length>this.length||this.cmp(y)<0?{div:new s(0),mod:this}:y.length===1?C==="div"?{div:this.divn(y.words[0]),mod:null}:C==="mod"?{div:null,mod:new s(this.modrn(y.words[0]))}:{div:this.divn(y.words[0]),mod:new s(this.modrn(y.words[0]))}:this._wordDiv(y,C)},s.prototype.div=function(y){return this.divmod(y,"div",!1).div},s.prototype.mod=function(y){return this.divmod(y,"mod",!1).mod},s.prototype.umod=function(y){return this.divmod(y,"mod",!0).mod},s.prototype.divRound=function(y){var C=this.divmod(y);if(C.mod.isZero())return C.div;var S=C.div.negative!==0?C.mod.isub(y):C.mod,R=y.ushrn(1),L=y.andln(1),I=S.cmp(R);return I<0||L===1&&I===0?C.div:C.div.negative!==0?C.div.isubn(1):C.div.iaddn(1)},s.prototype.modrn=function(y){var C=y<0;C&&(y=-y),r(y<=67108863);for(var S=(1<<26)%y,R=0,L=this.length-1;L>=0;L--)R=(S*R+(this.words[L]|0))%y;return C?-R:R},s.prototype.modn=function(y){return this.modrn(y)},s.prototype.idivn=function(y){var C=y<0;C&&(y=-y),r(y<=67108863);for(var S=0,R=this.length-1;R>=0;R--){var L=(this.words[R]|0)+S*67108864;this.words[R]=L/y|0,S=L%y;}return this._strip(),C?this.ineg():this},s.prototype.divn=function(y){return this.clone().idivn(y)},s.prototype.egcd=function(y){r(y.negative===0),r(!y.isZero());var C=this,S=y.clone();C.negative!==0?C=C.umod(y):C=C.clone();for(var R=new s(1),L=new s(0),I=new s(0),K=new s(1),j=0;C.isEven()&&S.isEven();)C.iushrn(1),S.iushrn(1),++j;for(var A=S.clone(),q=C.clone();!C.isZero();){for(var B=0,T=1;!(C.words[0]&T)&&B<26;++B,T<<=1);if(B>0)for(C.iushrn(B);B-- >0;)(R.isOdd()||L.isOdd())&&(R.iadd(A),L.isub(q)),R.iushrn(1),L.iushrn(1);for(var P=0,H=1;!(S.words[0]&H)&&P<26;++P,H<<=1);if(P>0)for(S.iushrn(P);P-- >0;)(I.isOdd()||K.isOdd())&&(I.iadd(A),K.isub(q)),I.iushrn(1),K.iushrn(1);C.cmp(S)>=0?(C.isub(S),R.isub(I),L.isub(K)):(S.isub(C),I.isub(R),K.isub(L));}return {a:I,b:K,gcd:S.iushln(j)}},s.prototype._invmp=function(y){r(y.negative===0),r(!y.isZero());var C=this,S=y.clone();C.negative!==0?C=C.umod(y):C=C.clone();for(var R=new s(1),L=new s(0),I=S.clone();C.cmpn(1)>0&&S.cmpn(1)>0;){for(var K=0,j=1;!(C.words[0]&j)&&K<26;++K,j<<=1);if(K>0)for(C.iushrn(K);K-- >0;)R.isOdd()&&R.iadd(I),R.iushrn(1);for(var A=0,q=1;!(S.words[0]&q)&&A<26;++A,q<<=1);if(A>0)for(S.iushrn(A);A-- >0;)L.isOdd()&&L.iadd(I),L.iushrn(1);C.cmp(S)>=0?(C.isub(S),R.isub(L)):(S.isub(C),L.isub(R));}var B;return C.cmpn(1)===0?B=R:B=L,B.cmpn(0)<0&&B.iadd(y),B},s.prototype.gcd=function(y){if(this.isZero())return y.abs();if(y.isZero())return this.abs();var C=this.clone(),S=y.clone();C.negative=0,S.negative=0;for(var R=0;C.isEven()&&S.isEven();R++)C.iushrn(1),S.iushrn(1);do{for(;C.isEven();)C.iushrn(1);for(;S.isEven();)S.iushrn(1);var L=C.cmp(S);if(L<0){var I=C;C=S,S=I;}else if(L===0||S.cmpn(1)===0)break;C.isub(S);}while(!0);return S.iushln(R)},s.prototype.invm=function(y){return this.egcd(y).a.umod(y)},s.prototype.isEven=function(){return (this.words[0]&1)===0},s.prototype.isOdd=function(){return (this.words[0]&1)===1},s.prototype.andln=function(y){return this.words[0]&y},s.prototype.bincn=function(y){r(typeof y=="number");var C=y%26,S=(y-C)/26,R=1<<C;if(this.length<=S)return this._expand(S+1),this.words[S]|=R,this;for(var L=R,I=S;L!==0&&I<this.length;I++){var K=this.words[I]|0;K+=L,L=K>>>26,K&=67108863,this.words[I]=K;}return L!==0&&(this.words[I]=L,this.length++),this},s.prototype.isZero=function(){return this.length===1&&this.words[0]===0},s.prototype.cmpn=function(y){var C=y<0;if(this.negative!==0&&!C)return -1;if(this.negative===0&&C)return 1;this._strip();var S;if(this.length>1)S=1;else {C&&(y=-y),r(y<=67108863,"Number is too big");var R=this.words[0]|0;S=R===y?0:R<y?-1:1;}return this.negative!==0?-S|0:S},s.prototype.cmp=function(y){if(this.negative!==0&&y.negative===0)return -1;if(this.negative===0&&y.negative!==0)return 1;var C=this.ucmp(y);return this.negative!==0?-C|0:C},s.prototype.ucmp=function(y){if(this.length>y.length)return 1;if(this.length<y.length)return -1;for(var C=0,S=this.length-1;S>=0;S--){var R=this.words[S]|0,L=y.words[S]|0;if(R!==L){R<L?C=-1:R>L&&(C=1);break}}return C},s.prototype.gtn=function(y){return this.cmpn(y)===1},s.prototype.gt=function(y){return this.cmp(y)===1},s.prototype.gten=function(y){return this.cmpn(y)>=0},s.prototype.gte=function(y){return this.cmp(y)>=0},s.prototype.ltn=function(y){return this.cmpn(y)===-1},s.prototype.lt=function(y){return this.cmp(y)===-1},s.prototype.lten=function(y){return this.cmpn(y)<=0},s.prototype.lte=function(y){return this.cmp(y)<=0},s.prototype.eqn=function(y){return this.cmpn(y)===0},s.prototype.eq=function(y){return this.cmp(y)===0},s.red=function(y){return new re(y)},s.prototype.toRed=function(y){return r(!this.red,"Already a number in reduction context"),r(this.negative===0,"red works only with positives"),y.convertTo(this)._forceRed(y)},s.prototype.fromRed=function(){return r(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},s.prototype._forceRed=function(y){return this.red=y,this},s.prototype.forceRed=function(y){return r(!this.red,"Already a number in reduction context"),this._forceRed(y)},s.prototype.redAdd=function(y){return r(this.red,"redAdd works only with red numbers"),this.red.add(this,y)},s.prototype.redIAdd=function(y){return r(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,y)},s.prototype.redSub=function(y){return r(this.red,"redSub works only with red numbers"),this.red.sub(this,y)},s.prototype.redISub=function(y){return r(this.red,"redISub works only with red numbers"),this.red.isub(this,y)},s.prototype.redShl=function(y){return r(this.red,"redShl works only with red numbers"),this.red.shl(this,y)},s.prototype.redMul=function(y){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.mul(this,y)},s.prototype.redIMul=function(y){return r(this.red,"redMul works only with red numbers"),this.red._verify2(this,y),this.red.imul(this,y)},s.prototype.redSqr=function(){return r(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},s.prototype.redISqr=function(){return r(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},s.prototype.redSqrt=function(){return r(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},s.prototype.redInvm=function(){return r(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},s.prototype.redNeg=function(){return r(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},s.prototype.redPow=function(y){return r(this.red&&!y.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,y)};var w={k256:null,p224:null,p192:null,p25519:null};function D(k,y){this.name=k,this.p=new s(y,16),this.n=this.p.bitLength(),this.k=new s(1).iushln(this.n).isub(this.p),this.tmp=this._tmp();}D.prototype._tmp=function(){var y=new s(null);return y.words=new Array(Math.ceil(this.n/13)),y},D.prototype.ireduce=function(y){var C=y,S;do this.split(C,this.tmp),C=this.imulK(C),C=C.iadd(this.tmp),S=C.bitLength();while(S>this.n);var R=S<this.n?-1:C.ucmp(this.p);return R===0?(C.words[0]=0,C.length=1):R>0?C.isub(this.p):C.strip!==void 0?C.strip():C._strip(),C},D.prototype.split=function(y,C){y.iushrn(this.n,0,C);},D.prototype.imulK=function(y){return y.imul(this.k)};function N(){D.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f");}i(N,D),N.prototype.split=function(y,C){for(var S=4194303,R=Math.min(y.length,9),L=0;L<R;L++)C.words[L]=y.words[L];if(C.length=R,y.length<=9){y.words[0]=0,y.length=1;return}var I=y.words[9];for(C.words[C.length++]=I&S,L=10;L<y.length;L++){var K=y.words[L]|0;y.words[L-10]=(K&S)<<4|I>>>22,I=K;}I>>>=22,y.words[L-10]=I,I===0&&y.length>10?y.length-=10:y.length-=9;},N.prototype.imulK=function(y){y.words[y.length]=0,y.words[y.length+1]=0,y.length+=2;for(var C=0,S=0;S<y.length;S++){var R=y.words[S]|0;C+=R*977,y.words[S]=C&67108863,C=R*64+(C/67108864|0);}return y.words[y.length-1]===0&&(y.length--,y.words[y.length-1]===0&&y.length--),y};function F(){D.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001");}i(F,D);function U(){D.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff");}i(U,D);function Z(){D.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed");}i(Z,D),Z.prototype.imulK=function(y){for(var C=0,S=0;S<y.length;S++){var R=(y.words[S]|0)*19+C,L=R&67108863;R>>>=26,y.words[S]=L,C=R;}return C!==0&&(y.words[y.length++]=C),y},s._prime=function(y){if(w[y])return w[y];var C;if(y==="k256")C=new N;else if(y==="p224")C=new F;else if(y==="p192")C=new U;else if(y==="p25519")C=new Z;else throw new Error("Unknown prime "+y);return w[y]=C,C};function re(k){if(typeof k=="string"){var y=s._prime(k);this.m=y.p,this.prime=y;}else r(k.gtn(1),"modulus must be greater than 1"),this.m=k,this.prime=null;}re.prototype._verify1=function(y){r(y.negative===0,"red works only with positives"),r(y.red,"red works only with red numbers");},re.prototype._verify2=function(y,C){r((y.negative|C.negative)===0,"red works only with positives"),r(y.red&&y.red===C.red,"red works only with red numbers");},re.prototype.imod=function(y){return this.prime?this.prime.ireduce(y)._forceRed(this):(l(y,y.umod(this.m)._forceRed(this)),y)},re.prototype.neg=function(y){return y.isZero()?y.clone():this.m.sub(y)._forceRed(this)},re.prototype.add=function(y,C){this._verify2(y,C);var S=y.add(C);return S.cmp(this.m)>=0&&S.isub(this.m),S._forceRed(this)},re.prototype.iadd=function(y,C){this._verify2(y,C);var S=y.iadd(C);return S.cmp(this.m)>=0&&S.isub(this.m),S},re.prototype.sub=function(y,C){this._verify2(y,C);var S=y.sub(C);return S.cmpn(0)<0&&S.iadd(this.m),S._forceRed(this)},re.prototype.isub=function(y,C){this._verify2(y,C);var S=y.isub(C);return S.cmpn(0)<0&&S.iadd(this.m),S},re.prototype.shl=function(y,C){return this._verify1(y),this.imod(y.ushln(C))},re.prototype.imul=function(y,C){return this._verify2(y,C),this.imod(y.imul(C))},re.prototype.mul=function(y,C){return this._verify2(y,C),this.imod(y.mul(C))},re.prototype.isqr=function(y){return this.imul(y,y.clone())},re.prototype.sqr=function(y){return this.mul(y,y)},re.prototype.sqrt=function(y){if(y.isZero())return y.clone();var C=this.m.andln(3);if(r(C%2===1),C===3){var S=this.m.add(new s(1)).iushrn(2);return this.pow(y,S)}for(var R=this.m.subn(1),L=0;!R.isZero()&&R.andln(1)===0;)L++,R.iushrn(1);r(!R.isZero());var I=new s(1).toRed(this),K=I.redNeg(),j=this.m.subn(1).iushrn(1),A=this.m.bitLength();for(A=new s(2*A*A).toRed(this);this.pow(A,j).cmp(K)!==0;)A.redIAdd(K);for(var q=this.pow(A,R),B=this.pow(y,R.addn(1).iushrn(1)),T=this.pow(y,R),P=L;T.cmp(I)!==0;){for(var H=T,z=0;H.cmp(I)!==0;z++)H=H.redSqr();r(z<P);var G=this.pow(q,new s(1).iushln(P-z-1));B=B.redMul(G),q=G.redSqr(),T=T.redMul(q),P=z;}return B},re.prototype.invm=function(y){var C=y._invmp(this.m);return C.negative!==0?(C.negative=0,this.imod(C).redNeg()):this.imod(C)},re.prototype.pow=function(y,C){if(C.isZero())return new s(1).toRed(this);if(C.cmpn(1)===0)return y.clone();var S=4,R=new Array(1<<S);R[0]=new s(1).toRed(this),R[1]=y;for(var L=2;L<R.length;L++)R[L]=this.mul(R[L-1],y);var I=R[0],K=0,j=0,A=C.bitLength()%26;for(A===0&&(A=26),L=C.length-1;L>=0;L--){for(var q=C.words[L],B=A-1;B>=0;B--){var T=q>>B&1;if(I!==R[0]&&(I=this.sqr(I)),T===0&&K===0){j=0;continue}K<<=1,K|=T,j++,!(j!==S&&(L!==0||B!==0))&&(I=this.mul(I,R[K]),j=0,K=0);}A=26;}return I},re.prototype.convertTo=function(y){var C=y.umod(this.m);return C===y?C.clone():C},re.prototype.convertFrom=function(y){var C=y.clone();return C.red=null,C},s.mont=function(y){return new ae(y)};function ae(k){re.call(this,k),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new s(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv);}i(ae,re),ae.prototype.convertTo=function(y){return this.imod(y.ushln(this.shift))},ae.prototype.convertFrom=function(y){var C=this.imod(y.mul(this.rinv));return C.red=null,C},ae.prototype.imul=function(y,C){if(y.isZero()||C.isZero())return y.words[0]=0,y.length=1,y;var S=y.imul(C),R=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=S.isub(R).iushrn(this.shift),I=L;return L.cmp(this.m)>=0?I=L.isub(this.m):L.cmpn(0)<0&&(I=L.iadd(this.m)),I._forceRed(this)},ae.prototype.mul=function(y,C){if(y.isZero()||C.isZero())return new s(0)._forceRed(this);var S=y.mul(C),R=S.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),L=S.isub(R).iushrn(this.shift),I=L;return L.cmp(this.m)>=0?I=L.isub(this.m):L.cmpn(0)<0&&(I=L.iadd(this.m)),I._forceRed(this)},ae.prototype.invm=function(y){var C=this.imod(y._invmp(this.m).mul(this.r2));return C._forceRed(this)};})(typeof L0=="undefined"||L0,wx);});var Jx=$((QJ,Ll)=>{(function(){var t="input is invalid type",e="finalize already called",r=typeof window=="object",i=r?window:{};i.JS_SHA3_NO_WINDOW&&(r=!1);var s=!r&&typeof self=="object",n=!i.JS_SHA3_NO_NODE_JS&&typeof process=="object"&&process.versions&&process.versions.node;n?i=global:s&&(i=self);var o=!i.JS_SHA3_NO_COMMON_JS&&typeof Ll=="object"&&Ll.exports,a=typeof define=="function"&&define.amd,u=!i.JS_SHA3_NO_ARRAY_BUFFER&&typeof ArrayBuffer!="undefined",l="0123456789abcdef".split(""),h=[31,7936,2031616,520093696],c=[4,1024,262144,67108864],d=[1,256,65536,16777216],f=[6,1536,393216,100663296],m=[0,8,16,24],g=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],v=[224,256,384,512],x=[128,256],_=["hex","buffer","arrayBuffer","array","digest"],E={128:168,256:136};(i.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(T){return Object.prototype.toString.call(T)==="[object Array]"}),u&&(i.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(T){return typeof T=="object"&&T.buffer&&T.buffer.constructor===ArrayBuffer});for(var b=function(T,P,H){return function(z){return new A(T,P,T).update(z)[H]()}},w=function(T,P,H){return function(z,G){return new A(T,P,G).update(z)[H]()}},D=function(T,P,H){return function(z,G,oe,se){return y["cshake"+T].update(z,G,oe,se)[H]()}},N=function(T,P,H){return function(z,G,oe,se){return y["kmac"+T].update(z,G,oe,se)[H]()}},F=function(T,P,H,z){for(var G=0;G<_.length;++G){var oe=_[G];T[oe]=P(H,z,oe);}return T},U=function(T,P){var H=b(T,P,"hex");return H.create=function(){return new A(T,P,T)},H.update=function(z){return H.create().update(z)},F(H,b,T,P)},Z=function(T,P){var H=w(T,P,"hex");return H.create=function(z){return new A(T,P,z)},H.update=function(z,G){return H.create(G).update(z)},F(H,w,T,P)},re=function(T,P){var H=E[T],z=D(T,P,"hex");return z.create=function(G,oe,se){return !oe&&!se?y["shake"+T].create(G):new A(T,P,G).bytepad([oe,se],H)},z.update=function(G,oe,se,X){return z.create(oe,se,X).update(G)},F(z,D,T,P)},ae=function(T,P){var H=E[T],z=N(T,P,"hex");return z.create=function(G,oe,se){return new q(T,P,oe).bytepad(["KMAC",se],H).bytepad([G],H)},z.update=function(G,oe,se,X){return z.create(G,se,X).update(oe)},F(z,N,T,P)},k=[{name:"keccak",padding:d,bits:v,createMethod:U},{name:"sha3",padding:f,bits:v,createMethod:U},{name:"shake",padding:h,bits:x,createMethod:Z},{name:"cshake",padding:c,bits:x,createMethod:re},{name:"kmac",padding:c,bits:x,createMethod:ae}],y={},C=[],S=0;S<k.length;++S)for(var R=k[S],L=R.bits,I=0;I<L.length;++I){var K=R.name+"_"+L[I];if(C.push(K),y[K]=R.createMethod(L[I],R.padding),R.name!=="sha3"){var j=R.name+L[I];C.push(j),y[j]=y[K];}}function A(T,P,H){this.blocks=[],this.s=[],this.padding=P,this.outputBits=H,this.reset=!0,this.finalized=!1,this.block=0,this.start=0,this.blockCount=1600-(T<<1)>>5,this.byteCount=this.blockCount<<2,this.outputBlocks=H>>5,this.extraBytes=(H&31)>>3;for(var z=0;z<50;++z)this.s[z]=0;}A.prototype.update=function(T){if(this.finalized)throw new Error(e);var P,H=typeof T;if(H!=="string"){if(H==="object"){if(T===null)throw new Error(t);if(u&&T.constructor===ArrayBuffer)T=new Uint8Array(T);else if(!Array.isArray(T)&&(!u||!ArrayBuffer.isView(T)))throw new Error(t)}else throw new Error(t);P=!0;}for(var z=this.blocks,G=this.byteCount,oe=T.length,se=this.blockCount,X=0,ee=this.s,V,M;X<oe;){if(this.reset)for(this.reset=!1,z[0]=this.block,V=1;V<se+1;++V)z[V]=0;if(P)for(V=this.start;X<oe&&V<G;++X)z[V>>2]|=T[X]<<m[V++&3];else for(V=this.start;X<oe&&V<G;++X)M=T.charCodeAt(X),M<128?z[V>>2]|=M<<m[V++&3]:M<2048?(z[V>>2]|=(192|M>>6)<<m[V++&3],z[V>>2]|=(128|M&63)<<m[V++&3]):M<55296||M>=57344?(z[V>>2]|=(224|M>>12)<<m[V++&3],z[V>>2]|=(128|M>>6&63)<<m[V++&3],z[V>>2]|=(128|M&63)<<m[V++&3]):(M=65536+((M&1023)<<10|T.charCodeAt(++X)&1023),z[V>>2]|=(240|M>>18)<<m[V++&3],z[V>>2]|=(128|M>>12&63)<<m[V++&3],z[V>>2]|=(128|M>>6&63)<<m[V++&3],z[V>>2]|=(128|M&63)<<m[V++&3]);if(this.lastByteIndex=V,V>=G){for(this.start=V-G,this.block=z[se],V=0;V<se;++V)ee[V]^=z[V];B(ee),this.reset=!0;}else this.start=V;}return this},A.prototype.encode=function(T,P){var H=T&255,z=1,G=[H];for(T=T>>8,H=T&255;H>0;)G.unshift(H),T=T>>8,H=T&255,++z;return P?G.push(z):G.unshift(z),this.update(G),G.length},A.prototype.encodeString=function(T){var P,H=typeof T;if(H!=="string"){if(H==="object"){if(T===null)throw new Error(t);if(u&&T.constructor===ArrayBuffer)T=new Uint8Array(T);else if(!Array.isArray(T)&&(!u||!ArrayBuffer.isView(T)))throw new Error(t)}else throw new Error(t);P=!0;}var z=0,G=T.length;if(P)z=G;else for(var oe=0;oe<T.length;++oe){var se=T.charCodeAt(oe);se<128?z+=1:se<2048?z+=2:se<55296||se>=57344?z+=3:(se=65536+((se&1023)<<10|T.charCodeAt(++oe)&1023),z+=4);}return z+=this.encode(z*8),this.update(T),z},A.prototype.bytepad=function(T,P){for(var H=this.encode(P),z=0;z<T.length;++z)H+=this.encodeString(T[z]);var G=P-H%P,oe=[];return oe.length=G,this.update(oe),this},A.prototype.finalize=function(){if(!this.finalized){this.finalized=!0;var T=this.blocks,P=this.lastByteIndex,H=this.blockCount,z=this.s;if(T[P>>2]|=this.padding[P&3],this.lastByteIndex===this.byteCount)for(T[0]=T[H],P=1;P<H+1;++P)T[P]=0;for(T[H-1]|=2147483648,P=0;P<H;++P)z[P]^=T[P];B(z);}},A.prototype.toString=A.prototype.hex=function(){this.finalize();for(var T=this.blockCount,P=this.s,H=this.outputBlocks,z=this.extraBytes,G=0,oe=0,se="",X;oe<H;){for(G=0;G<T&&oe<H;++G,++oe)X=P[G],se+=l[X>>4&15]+l[X&15]+l[X>>12&15]+l[X>>8&15]+l[X>>20&15]+l[X>>16&15]+l[X>>28&15]+l[X>>24&15];oe%T===0&&(B(P),G=0);}return z&&(X=P[G],se+=l[X>>4&15]+l[X&15],z>1&&(se+=l[X>>12&15]+l[X>>8&15]),z>2&&(se+=l[X>>20&15]+l[X>>16&15])),se},A.prototype.arrayBuffer=function(){this.finalize();var T=this.blockCount,P=this.s,H=this.outputBlocks,z=this.extraBytes,G=0,oe=0,se=this.outputBits>>3,X;z?X=new ArrayBuffer(H+1<<2):X=new ArrayBuffer(se);for(var ee=new Uint32Array(X);oe<H;){for(G=0;G<T&&oe<H;++G,++oe)ee[oe]=P[G];oe%T===0&&B(P);}return z&&(ee[G]=P[G],X=X.slice(0,se)),X},A.prototype.buffer=A.prototype.arrayBuffer,A.prototype.digest=A.prototype.array=function(){this.finalize();for(var T=this.blockCount,P=this.s,H=this.outputBlocks,z=this.extraBytes,G=0,oe=0,se=[],X,ee;oe<H;){for(G=0;G<T&&oe<H;++G,++oe)X=oe<<2,ee=P[G],se[X]=ee&255,se[X+1]=ee>>8&255,se[X+2]=ee>>16&255,se[X+3]=ee>>24&255;oe%T===0&&B(P);}return z&&(X=oe<<2,ee=P[G],se[X]=ee&255,z>1&&(se[X+1]=ee>>8&255),z>2&&(se[X+2]=ee>>16&255)),se};function q(T,P,H){A.call(this,T,P,H);}q.prototype=new A,q.prototype.finalize=function(){return this.encode(this.outputBits,!0),A.prototype.finalize.call(this)};var B=function(T){var P,H,z,G,oe,se,X,ee,V,M,J,W,ne,le,Q,_e,Se,ye,Ce,tt,Fe,He,Yt,Xe,ot,pi,nt,rt,ce,be,Ae,Le,Ne,We,lt,Ve,Qe,Dn,ct,ht,Sn,ft,dt,Rn,pt,mt,Nn,gt,_t,On,yt,vt,Fn,xt,bt,Ln,Et,Ct,Mi,Bi,ji,qi,Hi;for(z=0;z<48;z+=2)G=T[0]^T[10]^T[20]^T[30]^T[40],oe=T[1]^T[11]^T[21]^T[31]^T[41],se=T[2]^T[12]^T[22]^T[32]^T[42],X=T[3]^T[13]^T[23]^T[33]^T[43],ee=T[4]^T[14]^T[24]^T[34]^T[44],V=T[5]^T[15]^T[25]^T[35]^T[45],M=T[6]^T[16]^T[26]^T[36]^T[46],J=T[7]^T[17]^T[27]^T[37]^T[47],W=T[8]^T[18]^T[28]^T[38]^T[48],ne=T[9]^T[19]^T[29]^T[39]^T[49],P=W^(se<<1|X>>>31),H=ne^(X<<1|se>>>31),T[0]^=P,T[1]^=H,T[10]^=P,T[11]^=H,T[20]^=P,T[21]^=H,T[30]^=P,T[31]^=H,T[40]^=P,T[41]^=H,P=G^(ee<<1|V>>>31),H=oe^(V<<1|ee>>>31),T[2]^=P,T[3]^=H,T[12]^=P,T[13]^=H,T[22]^=P,T[23]^=H,T[32]^=P,T[33]^=H,T[42]^=P,T[43]^=H,P=se^(M<<1|J>>>31),H=X^(J<<1|M>>>31),T[4]^=P,T[5]^=H,T[14]^=P,T[15]^=H,T[24]^=P,T[25]^=H,T[34]^=P,T[35]^=H,T[44]^=P,T[45]^=H,P=ee^(W<<1|ne>>>31),H=V^(ne<<1|W>>>31),T[6]^=P,T[7]^=H,T[16]^=P,T[17]^=H,T[26]^=P,T[27]^=H,T[36]^=P,T[37]^=H,T[46]^=P,T[47]^=H,P=M^(G<<1|oe>>>31),H=J^(oe<<1|G>>>31),T[8]^=P,T[9]^=H,T[18]^=P,T[19]^=H,T[28]^=P,T[29]^=H,T[38]^=P,T[39]^=H,T[48]^=P,T[49]^=H,le=T[0],Q=T[1],mt=T[11]<<4|T[10]>>>28,Nn=T[10]<<4|T[11]>>>28,rt=T[20]<<3|T[21]>>>29,ce=T[21]<<3|T[20]>>>29,Bi=T[31]<<9|T[30]>>>23,ji=T[30]<<9|T[31]>>>23,ft=T[40]<<18|T[41]>>>14,dt=T[41]<<18|T[40]>>>14,We=T[2]<<1|T[3]>>>31,lt=T[3]<<1|T[2]>>>31,_e=T[13]<<12|T[12]>>>20,Se=T[12]<<12|T[13]>>>20,gt=T[22]<<10|T[23]>>>22,_t=T[23]<<10|T[22]>>>22,be=T[33]<<13|T[32]>>>19,Ae=T[32]<<13|T[33]>>>19,qi=T[42]<<2|T[43]>>>30,Hi=T[43]<<2|T[42]>>>30,xt=T[5]<<30|T[4]>>>2,bt=T[4]<<30|T[5]>>>2,Ve=T[14]<<6|T[15]>>>26,Qe=T[15]<<6|T[14]>>>26,ye=T[25]<<11|T[24]>>>21,Ce=T[24]<<11|T[25]>>>21,On=T[34]<<15|T[35]>>>17,yt=T[35]<<15|T[34]>>>17,Le=T[45]<<29|T[44]>>>3,Ne=T[44]<<29|T[45]>>>3,Xe=T[6]<<28|T[7]>>>4,ot=T[7]<<28|T[6]>>>4,Ln=T[17]<<23|T[16]>>>9,Et=T[16]<<23|T[17]>>>9,Dn=T[26]<<25|T[27]>>>7,ct=T[27]<<25|T[26]>>>7,tt=T[36]<<21|T[37]>>>11,Fe=T[37]<<21|T[36]>>>11,vt=T[47]<<24|T[46]>>>8,Fn=T[46]<<24|T[47]>>>8,Rn=T[8]<<27|T[9]>>>5,pt=T[9]<<27|T[8]>>>5,pi=T[18]<<20|T[19]>>>12,nt=T[19]<<20|T[18]>>>12,Ct=T[29]<<7|T[28]>>>25,Mi=T[28]<<7|T[29]>>>25,ht=T[38]<<8|T[39]>>>24,Sn=T[39]<<8|T[38]>>>24,He=T[48]<<14|T[49]>>>18,Yt=T[49]<<14|T[48]>>>18,T[0]=le^~_e&ye,T[1]=Q^~Se&Ce,T[10]=Xe^~pi&rt,T[11]=ot^~nt&ce,T[20]=We^~Ve&Dn,T[21]=lt^~Qe&ct,T[30]=Rn^~mt&gt,T[31]=pt^~Nn&_t,T[40]=xt^~Ln&Ct,T[41]=bt^~Et&Mi,T[2]=_e^~ye&tt,T[3]=Se^~Ce&Fe,T[12]=pi^~rt&be,T[13]=nt^~ce&Ae,T[22]=Ve^~Dn&ht,T[23]=Qe^~ct&Sn,T[32]=mt^~gt&On,T[33]=Nn^~_t&yt,T[42]=Ln^~Ct&Bi,T[43]=Et^~Mi&ji,T[4]=ye^~tt&He,T[5]=Ce^~Fe&Yt,T[14]=rt^~be&Le,T[15]=ce^~Ae&Ne,T[24]=Dn^~ht&ft,T[25]=ct^~Sn&dt,T[34]=gt^~On&vt,T[35]=_t^~yt&Fn,T[44]=Ct^~Bi&qi,T[45]=Mi^~ji&Hi,T[6]=tt^~He&le,T[7]=Fe^~Yt&Q,T[16]=be^~Le&Xe,T[17]=Ae^~Ne&ot,T[26]=ht^~ft&We,T[27]=Sn^~dt&lt,T[36]=On^~vt&Rn,T[37]=yt^~Fn&pt,T[46]=Bi^~qi&xt,T[47]=ji^~Hi&bt,T[8]=He^~le&_e,T[9]=Yt^~Q&Se,T[18]=Le^~Xe&pi,T[19]=Ne^~ot&nt,T[28]=ft^~We&Ve,T[29]=dt^~lt&Qe,T[38]=vt^~Rn&mt,T[39]=Fn^~pt&Nn,T[48]=qi^~xt&Ln,T[49]=Hi^~bt&Et,T[0]^=g[z],T[1]^=g[z+1];};if(o)Ll.exports=y;else {for(S=0;S<C.length;++S)i[C[S]]=y[C[S]];a&&define(function(){return y});}})();});var KE=$(Jp=>{var l7=Object.create,ka=Object.defineProperty,c7=Object.getPrototypeOf,cb=Object.prototype.hasOwnProperty,h7=Object.getOwnPropertyNames,f7=Object.getOwnPropertyDescriptor,ab=Object.getOwnPropertySymbols,d7=Object.prototype.propertyIsEnumerable,ub=(t,e,r)=>e in t?ka(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,Wl=(t,e)=>{for(var r in e||(e={}))cb.call(e,r)&&ub(t,r,e[r]);if(ab)for(var r of ab(e))d7.call(e,r)&&ub(t,r,e[r]);return t},hb=t=>ka(t,"__esModule",{value:!0}),te=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),p7=(t,e)=>{for(var r in e)ka(t,r,{get:e[r],enumerable:!0});},m7=(t,e,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let i of h7(e))!cb.call(t,i)&&i!=="default"&&ka(t,i,{get:()=>e[i],enumerable:!(r=f7(e,i))||r.enumerable});return t},jt=t=>m7(hb(ka(t!=null?l7(c7(t)):{},"default",t&&t.__esModule&&"default"in t?{get:()=>t.default,enumerable:!0}:{value:t,enumerable:!0})),t),g7=te(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),_7=te(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),fe=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SuppressWarnings=t.Override=t.Nullable=t.NotNull=void 0;function e(n,o,a){}t.NotNull=e;function r(n,o,a){}t.Nullable=r;function i(n,o,a){}t.Override=i;function s(n){return (o,a,u)=>{}}t.SuppressWarnings=s;}),rn=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IntStream=void 0;(function(r){r.EOF=-1,r.UNKNOWN_SOURCE_NAME="<unknown>";})(t.IntStream||(t.IntStream={}));}),y7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.ANTLRInputStream=void 0;var r=ge("assert"),i=fe(),s=rn(),n=class{constructor(o){this.p=0,this.data=o,this.n=o.length;}reset(){this.p=0;}consume(){if(this.p>=this.n)throw r(this.LA(1)===s.IntStream.EOF),new Error("cannot consume EOF");this.p<this.n&&this.p++;}LA(o){return o===0?0:o<0&&(o++,this.p+o-1<0)||this.p+o-1>=this.n?s.IntStream.EOF:this.data.charCodeAt(this.p+o-1)}LT(o){return this.LA(o)}get index(){return this.p}get size(){return this.n}mark(){return -1}release(o){}seek(o){if(o<=this.p){this.p=o;return}for(o=Math.min(o,this.n);this.p<o;)this.consume();}getText(o){let a=o.a,u=o.b;u>=this.n&&(u=this.n-1);let l=u-a+1;return a>=this.n?"":this.data.substr(a,l)}get sourceName(){return this.name?this.name:s.IntStream.UNKNOWN_SOURCE_NAME}toString(){return this.data}};e([i.Override],n.prototype,"consume",null),e([i.Override],n.prototype,"LA",null),e([i.Override],n.prototype,"index",null),e([i.Override],n.prototype,"size",null),e([i.Override],n.prototype,"mark",null),e([i.Override],n.prototype,"release",null),e([i.Override],n.prototype,"seek",null),e([i.Override],n.prototype,"getText",null),e([i.Override],n.prototype,"sourceName",null),e([i.Override],n.prototype,"toString",null),t.ANTLRInputStream=n;}),Ci=te(t=>{var e=t&&t.__decorate||function(s,n,o,a){var u=arguments.length,l=u<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,o):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(s,n,o,a);else for(var c=s.length-1;c>=0;c--)(h=s[c])&&(l=(u<3?h(l):u>3?h(n,o,l):h(n,o))||l);return u>3&&l&&Object.defineProperty(n,o,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNState=void 0;var r=fe(),i=class{constructor(){this.stateNumber=i.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(s){return s instanceof i?this.stateNumber===s.stateNumber:!1}get isNonGreedyExitState(){return !1}toString(){return String(this.stateNumber)}getTransitions(){return this.transitions.slice(0)}get numberOfTransitions(){return this.transitions.length}addTransition(s,n){if(this.transitions.length===0)this.epsilonOnlyTransitions=s.isEpsilon;else if(this.epsilonOnlyTransitions!==s.isEpsilon)throw this.epsilonOnlyTransitions=!1,new Error("ATN state "+this.stateNumber+" has both epsilon and non-epsilon transitions.");this.transitions.splice(n!==void 0?n:this.transitions.length,0,s);}transition(s){return this.transitions[s]}setTransition(s,n){this.transitions[s]=n;}removeTransition(s){return this.transitions.splice(s,1)[0]}get onlyHasEpsilonTransitions(){return this.epsilonOnlyTransitions}setRuleIndex(s){this.ruleIndex=s;}get isOptimized(){return this.optimizedTransitions!==this.transitions}get numberOfOptimizedTransitions(){return this.optimizedTransitions.length}getOptimizedTransition(s){return this.optimizedTransitions[s]}addOptimizedTransition(s){this.isOptimized||(this.optimizedTransitions=new Array),this.optimizedTransitions.push(s);}setOptimizedTransition(s,n){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions[s]=n;}removeOptimizedTransition(s){if(!this.isOptimized)throw new Error("This ATNState is not optimized.");this.optimizedTransitions.splice(s,1);}};e([r.Override],i.prototype,"hashCode",null),e([r.Override],i.prototype,"equals",null),e([r.Override],i.prototype,"toString",null),t.ATNState=i,function(s){s.INVALID_STATE_NUMBER=-1;}(i=t.ATNState||(t.ATNState={}));}),Qt=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ATNStateType=void 0;(function(r){r[r.INVALID_TYPE=0]="INVALID_TYPE",r[r.BASIC=1]="BASIC",r[r.RULE_START=2]="RULE_START",r[r.BLOCK_START=3]="BLOCK_START",r[r.PLUS_BLOCK_START=4]="PLUS_BLOCK_START",r[r.STAR_BLOCK_START=5]="STAR_BLOCK_START",r[r.TOKEN_START=6]="TOKEN_START",r[r.RULE_STOP=7]="RULE_STOP",r[r.BLOCK_END=8]="BLOCK_END",r[r.STAR_LOOP_BACK=9]="STAR_LOOP_BACK",r[r.STAR_LOOP_ENTRY=10]="STAR_LOOP_ENTRY",r[r.PLUS_LOOP_BACK=11]="PLUS_LOOP_BACK",r[r.LOOP_END=12]="LOOP_END";})(t.ATNStateType||(t.ATNStateType={}));}),nn=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RecognitionException=void 0;var e=class extends Error{constructor(r,i,s,n){super(n),this._offendingState=-1,this._recognizer=r,this.input=i,this.ctx=s,r&&(this._offendingState=r.state);}get offendingState(){return this._offendingState}setOffendingState(r){this._offendingState=r;}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(r){if(!(r&&r!==this._recognizer))return this.offendingToken}setOffendingToken(r,i){r===this._recognizer&&(this.offendingToken=i);}get recognizer(){return this._recognizer}};t.RecognitionException=e;}),sn=te(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h},r=t&&t.__param||function(n,o){return function(a,u){o(a,u,n);}};Object.defineProperty(t,"__esModule",{value:!0}),t.Transition=void 0;var i=fe(),s=class{constructor(o){if(o==null)throw new Error("target cannot be null.");this.target=o;}get isEpsilon(){return !1}get label(){}};s.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],e([i.NotNull],s.prototype,"target",void 0),s=e([r(0,i.NotNull)],s),t.Transition=s;}),Ep=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractPredicateTransition=void 0;var e=sn(),r=class extends e.Transition{constructor(i){super(i);}};t.AbstractPredicateTransition=r;}),qt=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MurmurHash=void 0;(function(r){function s(l=0){return l}r.initialize=s;function n(l,h){h==null?h=0:typeof h=="string"?h=u(h):typeof h=="object"&&(h=h.hashCode());let x=h;return x=Math.imul(x,3432918353),x=x<<15|x>>>17,x=Math.imul(x,461845907),l=l^x,l=l<<13|l>>>19,l=Math.imul(l,5)+3864292196,l&4294967295}r.update=n;function o(l,h){return l=l^h*4,l=l^l>>>16,l=Math.imul(l,2246822507),l=l^l>>>13,l=Math.imul(l,3266489909),l=l^l>>>16,l}r.finish=o;function a(l,h=0){let c=s(h),d=0;for(let f of l)c=n(c,f),d++;return c=o(c,d),c}r.hashCode=a;function u(l){let h=l.length;if(h===0)return 0;let c=0;for(let d=0;d<h;d++){let f=l.charCodeAt(d);c=(c<<5>>>0)-c+f,c|=0;}return c}})(t.MurmurHash||(t.MurmurHash={}));}),Qr=te(t=>{var e=t&&t.__decorate||function(s,n,o,a){var u=arguments.length,l=u<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,o):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(s,n,o,a);else for(var c=s.length-1;c>=0;c--)(h=s[c])&&(l=(u<3?h(l):u>3?h(n,o,l):h(n,o))||l);return u>3&&l&&Object.defineProperty(n,o,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectEqualityComparator=void 0;var r=fe(),i=class{hashCode(s){return s==null?0:s.hashCode()}equals(s,n){return s==null?n==null:s.equals(n)}};i.INSTANCE=new i,e([r.Override],i.prototype,"hashCode",null),e([r.Override],i.prototype,"equals",null),t.ObjectEqualityComparator=i;}),v7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultEqualityComparator=void 0;var r=fe(),i=qt(),s=Qr(),n=class{hashCode(o){return o==null?0:typeof o=="string"||typeof o=="number"?i.MurmurHash.hashCode([o]):s.ObjectEqualityComparator.INSTANCE.hashCode(o)}equals(o,a){return o==null?a==null:typeof o=="string"||typeof o=="number"?o===a:s.ObjectEqualityComparator.INSTANCE.equals(o,a)}};n.INSTANCE=new n,e([r.Override],n.prototype,"hashCode",null),e([r.Override],n.prototype,"equals",null),t.DefaultEqualityComparator=n;}),on=te(t=>{var e=t&&t.__decorate||function(h,c,d,f){var m=arguments.length,g=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,d):f,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(h,c,d,f);else for(var x=h.length-1;x>=0;x--)(v=h[x])&&(g=(m<3?v(g):m>3?v(c,d,g):v(c,d))||g);return m>3&&g&&Object.defineProperty(c,d,g),g},r=t&&t.__param||function(h,c){return function(d,f){c(d,f,h);}};Object.defineProperty(t,"__esModule",{value:!0}),t.Array2DHashSet=void 0;var i=ge("assert"),s=v7(),n=fe(),o=qt(),a=16,u=.75,l=class{constructor(h,c=a){if(this.n=0,this.threshold=Math.floor(a*u),h instanceof l){this.comparator=h.comparator,this.buckets=h.buckets.slice(0);for(let d=0;d<this.buckets.length;d++){let f=this.buckets[d];f&&(this.buckets[d]=f.slice(0));}this.n=h.n,this.threshold=h.threshold;}else this.comparator=h||s.DefaultEqualityComparator.INSTANCE,this.buckets=this.createBuckets(c);}getOrAdd(h){return this.n>this.threshold&&this.expand(),this.getOrAddImpl(h)}getOrAddImpl(h){let c=this.getBucket(h),d=this.buckets[c];if(!d)return d=[h],this.buckets[c]=d,this.n++,h;for(let f of d)if(this.comparator.equals(f,h))return f;return d.push(h),this.n++,h}get(h){if(h==null)return h;let c=this.getBucket(h),d=this.buckets[c];if(d){for(let f of d)if(this.comparator.equals(f,h))return f}}getBucket(h){return this.comparator.hashCode(h)&this.buckets.length-1}hashCode(){let h=o.MurmurHash.initialize();for(let c of this.buckets)if(c!=null)for(let d of c){if(d==null)break;h=o.MurmurHash.update(h,this.comparator.hashCode(d));}return h=o.MurmurHash.finish(h,this.size),h}equals(h){return h===this?!0:!(h instanceof l)||h.size!==this.size?!1:this.containsAll(h)}expand(){let h=this.buckets,c=this.buckets.length*2,d=this.createBuckets(c);this.buckets=d,this.threshold=Math.floor(c*u);let f=this.size;for(let m of h)if(m)for(let g of m){let v=this.getBucket(g),x=this.buckets[v];x||(x=[],this.buckets[v]=x),x.push(g);}i(this.n===f);}add(h){return this.getOrAdd(h)===h}get size(){return this.n}get isEmpty(){return this.n===0}contains(h){return this.containsFast(this.asElementType(h))}containsFast(h){return h==null?!1:this.get(h)!=null}*[Symbol.iterator](){yield*this.toArray();}toArray(){let h=new Array(this.size),c=0;for(let d of this.buckets)if(d!=null)for(let f of d){if(f==null)break;h[c++]=f;}return h}containsAll(h){if(h instanceof l){let c=h;for(let d of c.buckets)if(d!=null)for(let f of d){if(f==null)break;if(!this.containsFast(this.asElementType(f)))return !1}}else for(let c of h)if(!this.containsFast(this.asElementType(c)))return !1;return !0}addAll(h){let c=!1;for(let d of h)this.getOrAdd(d)!==d&&(c=!0);return c}clear(){this.buckets=this.createBuckets(a),this.n=0,this.threshold=Math.floor(a*u);}toString(){if(this.size===0)return "{}";let h="{",c=!0;for(let d of this.buckets)if(d!=null)for(let f of d){if(f==null)break;c?c=!1:h+=", ",h+=f.toString();}return h+="}",h}toTableString(){let h="";for(let c of this.buckets){if(c==null){h+=`null
60
60
  `;continue}h+="[";let d=!0;for(let f of c)d?d=!1:h+=" ",f==null?h+="_":h+=f.toString();h+=`]
61
- `;}return h}asElementType(h){return h}createBuckets(h){return new Array(h)}};e([n.NotNull],l.prototype,"comparator",void 0),e([n.Override],l.prototype,"hashCode",null),e([n.Override],l.prototype,"equals",null),e([n.Override],l.prototype,"add",null),e([n.Override],l.prototype,"size",null),e([n.Override],l.prototype,"isEmpty",null),e([n.Override],l.prototype,"contains",null),e([r(0,n.Nullable)],l.prototype,"containsFast",null),e([n.Override],l.prototype,Symbol.iterator,null),e([n.Override],l.prototype,"toArray",null),e([n.Override],l.prototype,"containsAll",null),e([n.Override],l.prototype,"addAll",null),e([n.Override],l.prototype,"clear",null),e([n.Override],l.prototype,"toString",null),e([n.SuppressWarnings("unchecked")],l.prototype,"asElementType",null),e([n.SuppressWarnings("unchecked")],l.prototype,"createBuckets",null),t.Array2DHashSet=l;}),nc=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayEqualityComparator=void 0;var r=fe(),i=qt(),s=Qr(),n=class{hashCode(o){return o==null?0:i.MurmurHash.hashCode(o,0)}equals(o,a){if(o==null)return a==null;if(a==null||o.length!==a.length)return !1;for(let u=0;u<o.length;u++)if(!s.ObjectEqualityComparator.INSTANCE.equals(o[u],a[u]))return !1;return !0}};n.INSTANCE=new n,e([r.Override],n.prototype,"hashCode",null),e([r.Override],n.prototype,"equals",null),t.ArrayEqualityComparator=n;}),ei=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toCharArray=t.toMap=t.equals=t.join=t.escapeWhitespace=void 0;function e(o,a){return a?o.replace(/ /,"\xB7"):o.replace(/\t/,"\\t").replace(/\n/,"\\n").replace(/\r/,"\\r")}t.escapeWhitespace=e;function r(o,a){let u="",l=!0;for(let h of o)l?l=!1:u+=a,u+=h;return u}t.join=r;function i(o,a){return o===a?!0:o===void 0||a===void 0?!1:o.equals(a)}t.equals=i;function s(o){let a=new Map;for(let u=0;u<o.length;u++)a.set(o[u],u);return a}t.toMap=s;function n(o){if(typeof o=="string"){let a=new Uint16Array(o.length);for(let u=0;u<o.length;u++)a[u]=o.charCodeAt(u);return a}else return o.toCharArray()}t.toCharArray=n;}),ao=re(t=>{var e=t&&t.__decorate||function(d,f,m,g){var v=arguments.length,x=v<3?f:g===null?g=Object.getOwnPropertyDescriptor(f,m):g,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(d,f,m,g);else for(var E=d.length-1;E>=0;E--)(_=d[E])&&(x=(v<3?_(x):v>3?_(f,m,x):_(f,m))||x);return v>3&&x&&Object.defineProperty(f,m,x),x},r=t&&t.__param||function(d,f){return function(m,g){f(m,g,d);}};Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticContext=void 0;var i=on(),s=nc(),n=qt(),o=fe(),a=Qr(),u=ei();function l(d){let f;for(let m of d){if(f===void 0){f=m;continue}f.compareTo(m)<0&&(f=m);}return f}function h(d){let f;for(let m of d){if(f===void 0){f=m;continue}f.compareTo(m)>0&&(f=m);}return f}var c=class{static get NONE(){return c._NONE===void 0&&(c._NONE=new c.Predicate),c._NONE}evalPrecedence(d,f){return this}static and(d,f){if(!d||d===c.NONE)return f;if(f===c.NONE)return d;let m=new c.AND(d,f);return m.opnds.length===1?m.opnds[0]:m}static or(d,f){if(!d)return f;if(d===c.NONE||f===c.NONE)return c.NONE;let m=new c.OR(d,f);return m.opnds.length===1?m.opnds[0]:m}};t.SemanticContext=c,function(d){function g(w){let D=[];for(let N=0;N<w.length;N++){let F=w[N];F instanceof d.PrecedencePredicate&&(D.push(F),w.splice(N,1),N--);}return D}class v extends d{constructor(D=-1,N=-1,F=!1){super(),this.ruleIndex=D,this.predIndex=N,this.isCtxDependent=F;}eval(D,N){let F=this.isCtxDependent?N:void 0;return D.sempred(F,this.ruleIndex,this.predIndex)}hashCode(){let D=n.MurmurHash.initialize();return D=n.MurmurHash.update(D,this.ruleIndex),D=n.MurmurHash.update(D,this.predIndex),D=n.MurmurHash.update(D,this.isCtxDependent?1:0),D=n.MurmurHash.finish(D,3),D}equals(D){return D instanceof v?this===D?!0:this.ruleIndex===D.ruleIndex&&this.predIndex===D.predIndex&&this.isCtxDependent===D.isCtxDependent:!1}toString(){return "{"+this.ruleIndex+":"+this.predIndex+"}?"}}e([o.Override],v.prototype,"eval",null),e([o.Override],v.prototype,"hashCode",null),e([o.Override],v.prototype,"equals",null),e([o.Override],v.prototype,"toString",null),d.Predicate=v;class x extends d{constructor(D){super(),this.precedence=D;}eval(D,N){return D.precpred(N,this.precedence)}evalPrecedence(D,N){if(D.precpred(N,this.precedence))return d.NONE}compareTo(D){return this.precedence-D.precedence}hashCode(){let D=1;return D=31*D+this.precedence,D}equals(D){return D instanceof x?this===D?!0:this.precedence===D.precedence:!1}toString(){return "{"+this.precedence+">=prec}?"}}e([o.Override],x.prototype,"eval",null),e([o.Override],x.prototype,"evalPrecedence",null),e([o.Override],x.prototype,"compareTo",null),e([o.Override],x.prototype,"hashCode",null),e([o.Override],x.prototype,"equals",null),e([o.Override],x.prototype,"toString",null),d.PrecedencePredicate=x;class _ extends d{}d.Operator=_;let E=class Kl extends _{constructor(D,N){super();let F=new i.Array2DHashSet(a.ObjectEqualityComparator.INSTANCE);D instanceof Kl?F.addAll(D.opnds):F.add(D),N instanceof Kl?F.addAll(N.opnds):F.add(N),this.opnds=F.toArray();let V=g(this.opnds),Z=h(V);Z&&this.opnds.push(Z);}get operands(){return this.opnds}equals(D){return this===D?!0:D instanceof Kl?s.ArrayEqualityComparator.INSTANCE.equals(this.opnds,D.opnds):!1}hashCode(){return n.MurmurHash.hashCode(this.opnds,40363613)}eval(D,N){for(let F of this.opnds)if(!F.eval(D,N))return !1;return !0}evalPrecedence(D,N){let F=!1,V=[];for(let te of this.opnds){let ae=te.evalPrecedence(D,N);if(F=F||ae!==te,ae==null)return;ae!==d.NONE&&V.push(ae);}if(!F)return this;if(V.length===0)return d.NONE;let Z=V[0];for(let te=1;te<V.length;te++)Z=d.and(Z,V[te]);return Z}toString(){return u.join(this.opnds,"&&")}};e([o.Override],E.prototype,"operands",null),e([o.Override],E.prototype,"equals",null),e([o.Override],E.prototype,"hashCode",null),e([o.Override],E.prototype,"eval",null),e([o.Override],E.prototype,"evalPrecedence",null),e([o.Override],E.prototype,"toString",null),E=e([r(0,o.NotNull),r(1,o.NotNull)],E),d.AND=E;let b=class Gl extends _{constructor(D,N){super();let F=new i.Array2DHashSet(a.ObjectEqualityComparator.INSTANCE);D instanceof Gl?F.addAll(D.opnds):F.add(D),N instanceof Gl?F.addAll(N.opnds):F.add(N),this.opnds=F.toArray();let V=g(this.opnds),Z=l(V);Z&&this.opnds.push(Z);}get operands(){return this.opnds}equals(D){return this===D?!0:D instanceof Gl?s.ArrayEqualityComparator.INSTANCE.equals(this.opnds,D.opnds):!1}hashCode(){return n.MurmurHash.hashCode(this.opnds,486279973)}eval(D,N){for(let F of this.opnds)if(F.eval(D,N))return !0;return !1}evalPrecedence(D,N){let F=!1,V=[];for(let te of this.opnds){let ae=te.evalPrecedence(D,N);if(F=F||ae!==te,ae===d.NONE)return d.NONE;ae&&V.push(ae);}if(!F)return this;if(V.length===0)return;let Z=V[0];for(let te=1;te<V.length;te++)Z=d.or(Z,V[te]);return Z}toString(){return u.join(this.opnds,"||")}};e([o.Override],b.prototype,"operands",null),e([o.Override],b.prototype,"equals",null),e([o.Override],b.prototype,"hashCode",null),e([o.Override],b.prototype,"eval",null),e([o.Override],b.prototype,"evalPrecedence",null),e([o.Override],b.prototype,"toString",null),b=e([r(0,o.NotNull),r(1,o.NotNull)],b),d.OR=b;}(c=t.SemanticContext||(t.SemanticContext={}));}),fb=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.PredicateTransition=void 0;var i=Ep(),s=fe(),n=ao(),o=class extends i.AbstractPredicateTransition{constructor(u,l,h,c){super(u),this.ruleIndex=l,this.predIndex=h,this.isCtxDependent=c;}get serializationType(){return 4}get isEpsilon(){return !0}matches(u,l,h){return !1}get predicate(){return new n.SemanticContext.Predicate(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return "pred_"+this.ruleIndex+":"+this.predIndex}};e([s.Override],o.prototype,"serializationType",null),e([s.Override],o.prototype,"isEpsilon",null),e([s.Override],o.prototype,"matches",null),e([s.Override,s.NotNull],o.prototype,"toString",null),o=e([r(0,s.NotNull)],o),t.PredicateTransition=o;}),sc=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.FailedPredicateException=void 0;var i=nn(),s=fe(),n=fb(),o=class db extends i.RecognitionException{constructor(u,l,h){super(u,u.inputStream,u.context,db.formatMessage(l,h));let d=u.interpreter.atn.states[u.state].transition(0);d instanceof n.PredicateTransition?(this._ruleIndex=d.ruleIndex,this._predicateIndex=d.predIndex):(this._ruleIndex=0,this._predicateIndex=0),this._predicate=l,super.setOffendingToken(u,u.currentToken);}get ruleIndex(){return this._ruleIndex}get predicateIndex(){return this._predicateIndex}get predicate(){return this._predicate}static formatMessage(u,l){return l||`failed predicate: {${u}}?`}};e([s.NotNull],o,"formatMessage",null),o=e([r(0,s.NotNull)],o),t.FailedPredicateException=o;}),oc=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.InputMismatchException=void 0;var i=nn(),s=fe(),n=class extends i.RecognitionException{constructor(a,u,l){l===void 0&&(l=a.context),super(a,a.inputStream,l),u!==void 0&&this.setOffendingState(u),this.setOffendingToken(a,a.currentToken);}};n=e([r(0,s.NotNull)],n),t.InputMismatchException=n;}),Cp=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Arrays=void 0;(function(r){function i(o,a,u,l){return s(o,u!==void 0?u:0,l!==void 0?l:o.length,a)}r.binarySearch=i;function s(o,a,u,l){let h=a,c=u-1;for(;h<=c;){let d=h+c>>>1,f=o[d];if(f<l)h=d+1;else if(f>l)c=d-1;else return d}return -(h+1)}function n(o){let a="[",u=!0;for(let l of o)u?u=!1:a+=", ",l===null?a+="null":l===void 0?a+="undefined":a+=l;return a+="]",a}r.toString=n;})(t.Arrays||(t.Arrays={}));}),Tp=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.IntegerList=void 0;var r=Cp(),i=fe(),s=new Int32Array(0),n=4,o=(1<<31>>>0)-1-8,a=class{constructor(u){if(!u)this._data=s,this._size=0;else if(u instanceof a)this._data=u._data.slice(0),this._size=u._size;else if(typeof u=="number")u===0?(this._data=s,this._size=0):(this._data=new Int32Array(u),this._size=0);else {this._data=s,this._size=0;for(let l of u)this.add(l);}}add(u){this._data.length===this._size&&this.ensureCapacity(this._size+1),this._data[this._size]=u,this._size++;}addAll(u){if(Array.isArray(u))this.ensureCapacity(this._size+u.length),this._data.subarray(this._size,this._size+u.length).set(u),this._size+=u.length;else if(u instanceof a)this.ensureCapacity(this._size+u._size),this._data.subarray(this._size,this._size+u.size).set(u._data),this._size+=u._size;else {this.ensureCapacity(this._size+u.size);let l=0;for(let h of u)this._data[this._size+l]=h,l++;this._size+=u.size;}}get(u){if(u<0||u>=this._size)throw RangeError();return this._data[u]}contains(u){for(let l=0;l<this._size;l++)if(this._data[l]===u)return !0;return !1}set(u,l){if(u<0||u>=this._size)throw RangeError();let h=this._data[u];return this._data[u]=l,h}removeAt(u){let l=this.get(u);return this._data.copyWithin(u,u+1,this._size),this._data[this._size-1]=0,this._size--,l}removeRange(u,l){if(u<0||l<0||u>this._size||l>this._size||u>l)throw RangeError();this._data.copyWithin(l,u,this._size),this._data.fill(0,this._size-(l-u),this._size),this._size-=l-u;}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(u){if(u===this)return !0;if(!(u instanceof a)||this._size!==u._size)return !1;for(let l=0;l<this._size;l++)if(this._data[l]!==u._data[l])return !1;return !0}hashCode(){let u=1;for(let l=0;l<this._size;l++)u=31*u+this._data[l];return u}toString(){return this._data.toString()}binarySearch(u,l,h){if(l===void 0&&(l=0),h===void 0&&(h=this._size),l<0||h<0||l>this._size||h>this._size)throw new RangeError;if(l>h)throw new RangeError;return r.Arrays.binarySearch(this._data,u,l,h)}ensureCapacity(u){if(u<0||u>o)throw new RangeError;let l;for(this._data.length===0?l=n:l=this._data.length;l<u;)l=l*2,(l<0||l>o)&&(l=o);let h=new Int32Array(l);h.set(this._data),this._data=h;}toCharArray(){let u=new Uint16Array(this._size),l=0,h=!1;for(let c=0;c<this._size;c++){let d=this._data[c];if(d>=0&&d<65536){u[l]=d,l++;continue}if(!h){let m=new Uint16Array(this.charArraySize());m.set(u,0),u=m,h=!0;}let f=String.fromCodePoint(d);u[l]=f.charCodeAt(0),u[l+1]=f.charCodeAt(1),l+=2;}return u}charArraySize(){let u=0;for(let l=0;l<this._size;l++)u+=this._data[l]>=65536?2:1;return u}};e([i.NotNull],a.prototype,"_data",void 0),e([i.Override],a.prototype,"equals",null),e([i.Override],a.prototype,"hashCode",null),e([i.Override],a.prototype,"toString",null),t.IntegerList=a;}),mr=re(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.Interval=void 0;var r=fe(),i=1e3,s=class{constructor(n,o){this.a=n,this.b=o;}static get INVALID(){return s._INVALID}static of(n,o){return n!==o||n<0||n>i?new s(n,o):(s.cache[n]==null&&(s.cache[n]=new s(n,n)),s.cache[n])}get length(){return this.b<this.a?0:this.b-this.a+1}equals(n){return n===this?!0:n instanceof s?this.a===n.a&&this.b===n.b:!1}hashCode(){let n=23;return n=n*31+this.a,n=n*31+this.b,n}startsBeforeDisjoint(n){return this.a<n.a&&this.b<n.a}startsBeforeNonDisjoint(n){return this.a<=n.a&&this.b>=n.a}startsAfter(n){return this.a>n.a}startsAfterDisjoint(n){return this.a>n.b}startsAfterNonDisjoint(n){return this.a>n.a&&this.a<=n.b}disjoint(n){return this.startsBeforeDisjoint(n)||this.startsAfterDisjoint(n)}adjacent(n){return this.a===n.b+1||this.b===n.a-1}properlyContains(n){return n.a>=this.a&&n.b<=this.b}union(n){return s.of(Math.min(this.a,n.a),Math.max(this.b,n.b))}intersection(n){return s.of(Math.max(this.a,n.a),Math.min(this.b,n.b))}differenceNotProperlyContained(n){let o;return n.startsBeforeNonDisjoint(this)?o=s.of(Math.max(this.a,n.b+1),this.b):n.startsAfterNonDisjoint(this)&&(o=s.of(this.a,n.a-1)),o}toString(){return this.a+".."+this.b}};s._INVALID=new s(-1,-2),s.cache=new Array(i+1),e([r.Override],s.prototype,"equals",null),e([r.Override],s.prototype,"hashCode",null),e([r.Override],s.prototype,"toString",null),t.Interval=s;}),At=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Token=void 0;var e=rn();(function(i){i.INVALID_TYPE=0,i.EPSILON=-2,i.MIN_USER_TOKEN_TYPE=1,i.EOF=e.IntStream.EOF,i.DEFAULT_CHANNEL=0,i.HIDDEN_CHANNEL=1,i.MIN_USER_CHANNEL_VALUE=2;})(t.Token||(t.Token={}));}),Ma=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommonToken=void 0;var i=mr(),s=fe(),n=At(),o=class Oa{constructor(u,l,h=Oa.EMPTY_SOURCE,c=n.Token.DEFAULT_CHANNEL,d=0,f=0){this._line=0,this._charPositionInLine=-1,this._channel=n.Token.DEFAULT_CHANNEL,this.index=-1,this._text=l,this._type=u,this.source=h,this._channel=c,this.start=d,this.stop=f,h.source!=null&&(this._line=h.source.line,this._charPositionInLine=h.source.charPositionInLine);}static fromToken(u){let l=new Oa(u.type,void 0,Oa.EMPTY_SOURCE,u.channel,u.startIndex,u.stopIndex);return l._line=u.line,l.index=u.tokenIndex,l._charPositionInLine=u.charPositionInLine,u instanceof Oa?(l._text=u._text,l.source=u.source):(l._text=u.text,l.source={source:u.tokenSource,stream:u.inputStream}),l}get type(){return this._type}set type(u){this._type=u;}get line(){return this._line}set line(u){this._line=u;}get text(){if(this._text!=null)return this._text;let u=this.inputStream;if(u==null)return;let l=u.size;return this.start<l&&this.stop<l?u.getText(i.Interval.of(this.start,this.stop)):"<EOF>"}set text(u){this._text=u;}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(u){this._charPositionInLine=u;}get channel(){return this._channel}set channel(u){this._channel=u;}get startIndex(){return this.start}set startIndex(u){this.start=u;}get stopIndex(){return this.stop}set stopIndex(u){this.stop=u;}get tokenIndex(){return this.index}set tokenIndex(u){this.index=u;}get tokenSource(){return this.source.source}get inputStream(){return this.source.stream}toString(u){let l="";this._channel>0&&(l=",channel="+this._channel);let h=this.text;h!=null?(h=h.replace(/\n/g,"\\n"),h=h.replace(/\r/g,"\\r"),h=h.replace(/\t/g,"\\t")):h="<no text>";let c=String(this._type);return u&&(c=u.vocabulary.getDisplayName(this._type)),"[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+h+"',<"+c+">"+l+","+this._line+":"+this.charPositionInLine+"]"}};o.EMPTY_SOURCE={source:void 0,stream:void 0},e([s.NotNull],o.prototype,"source",void 0),e([s.Override],o.prototype,"type",null),e([s.Override],o.prototype,"line",null),e([s.Override],o.prototype,"text",null),e([s.Override],o.prototype,"charPositionInLine",null),e([s.Override],o.prototype,"channel",null),e([s.Override],o.prototype,"startIndex",null),e([s.Override],o.prototype,"stopIndex",null),e([s.Override],o.prototype,"tokenIndex",null),e([s.Override],o.prototype,"tokenSource",null),e([s.Override],o.prototype,"inputStream",null),e([s.Override],o.prototype,"toString",null),e([r(0,s.NotNull)],o,"fromToken",null),o=e([r(2,s.NotNull)],o),t.CommonToken=o;}),Ap=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.CommonTokenFactory=void 0;var r=Ma(),i=mr(),s=fe(),n=class{constructor(o=!1){this.copyText=o;}create(o,a,u,l,h,c,d,f){let m=new r.CommonToken(a,u,o,l,h,c);return m.line=d,m.charPositionInLine=f,u==null&&this.copyText&&o.stream!=null&&(m.text=o.stream.getText(i.Interval.of(h,c))),m}createSimple(o,a){return new r.CommonToken(o,a)}};e([s.Override],n.prototype,"create",null),e([s.Override],n.prototype,"createSimple",null),t.CommonTokenFactory=n,function(o){o.DEFAULT=new o;}(n=t.CommonTokenFactory||(t.CommonTokenFactory={}));}),pb=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IntegerStack=void 0;var e=Tp(),r=class extends e.IntegerList{constructor(i){super(i);}push(i){this.add(i);}pop(){return this.removeAt(this.size-1)}peek(){return this.get(this.size-1)}};t.IntegerStack=r;}),mb=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptStateInfo=void 0;var e=class{constructor(r,i){this._prediction=r,this._lexerActionExecutor=i;}get prediction(){return this._prediction}get lexerActionExecutor(){return this._lexerActionExecutor}};t.AcceptStateInfo=e;}),uo=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Array2DHashMap=void 0;var e=on(),r=class{constructor(s){this.keyComparator=s;}hashCode(s){return this.keyComparator.hashCode(s.key)}equals(s,n){return this.keyComparator.equals(s.key,n.key)}},i=class{constructor(s){s instanceof i?this.backingStore=new e.Array2DHashSet(s.backingStore):this.backingStore=new e.Array2DHashSet(new r(s));}clear(){this.backingStore.clear();}containsKey(s){return this.backingStore.contains({key:s})}get(s){let n=this.backingStore.get({key:s});if(n)return n.value}get isEmpty(){return this.backingStore.isEmpty}put(s,n){let o=this.backingStore.get({key:s,value:n}),a;return o?(a=o.value,o.value=n):this.backingStore.add({key:s,value:n}),a}putIfAbsent(s,n){let o=this.backingStore.get({key:s,value:n}),a;return o?a=o.value:this.backingStore.add({key:s,value:n}),a}get size(){return this.backingStore.size}hashCode(){return this.backingStore.hashCode()}equals(s){return s instanceof i?this.backingStore.equals(s.backingStore):!1}};t.Array2DHashMap=i;}),ls=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DecisionState=void 0;var e=Ci(),r=class extends e.ATNState{constructor(){super(...arguments),this.decision=-1,this.nonGreedy=!1,this.sll=!1;}};t.DecisionState=r;}),wp=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.PredictionContextCache=void 0;var r=uo(),i=fe(),s=Qr(),n=Vr(),o=ge("assert"),a=class{constructor(u=!0){this.contexts=new r.Array2DHashMap(s.ObjectEqualityComparator.INSTANCE),this.childContexts=new r.Array2DHashMap(s.ObjectEqualityComparator.INSTANCE),this.joinContexts=new r.Array2DHashMap(s.ObjectEqualityComparator.INSTANCE),this.enableCache=u;}getAsCached(u){if(!this.enableCache)return u;let l=this.contexts.get(u);return l||(l=u,this.contexts.put(u,u)),l}getChild(u,l){if(!this.enableCache)return u.getChild(l);let h=new a.PredictionContextAndInt(u,l),c=this.childContexts.get(h);return c||(c=u.getChild(l),c=this.getAsCached(c),this.childContexts.put(h,c)),c}join(u,l){if(!this.enableCache)return n.PredictionContext.join(u,l,this);let h=new a.IdentityCommutativePredictionContextOperands(u,l),c=this.joinContexts.get(h);return c||(c=n.PredictionContext.join(u,l,this),c=this.getAsCached(c),this.joinContexts.put(h,c),c)}};t.PredictionContextCache=a,a.UNCACHED=new a(!1),function(u){class l{constructor(d,f){this.obj=d,this.value=f;}equals(d){if(d instanceof l){if(d===this)return !0}else return !1;let f=d;return this.value===f.value&&(this.obj===f.obj||this.obj!=null&&this.obj.equals(f.obj))}hashCode(){let d=5;return d=7*d+(this.obj!=null?this.obj.hashCode():0),d=7*d+this.value,d}}e([i.Override],l.prototype,"equals",null),e([i.Override],l.prototype,"hashCode",null),u.PredictionContextAndInt=l;class h{constructor(d,f){o(d!=null),o(f!=null),this._x=d,this._y=f;}get x(){return this._x}get y(){return this._y}equals(d){if(d instanceof h){if(this===d)return !0}else return !1;let f=d;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()}}e([i.Override],h.prototype,"equals",null),e([i.Override],h.prototype,"hashCode",null),u.IdentityCommutativePredictionContextOperands=h;}(a=t.PredictionContextCache||(t.PredictionContextCache={}));}),Vr=re(t=>{var e=t&&t.__decorate||function(g,v,x,_){var E=arguments.length,b=E<3?v:_===null?_=Object.getOwnPropertyDescriptor(v,x):_,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(g,v,x,_);else for(var D=g.length-1;D>=0;D--)(w=g[D])&&(b=(E<3?w(b):E>3?w(v,x,b):w(v,x))||b);return E>3&&b&&Object.defineProperty(v,x,b),b},r=t&&t.__param||function(g,v){return function(x,_){v(x,_,g);}};Object.defineProperty(t,"__esModule",{value:!0}),t.SingletonPredictionContext=t.PredictionContext=void 0;var i=uo(),s=on(),n=Cp(),o=qt(),a=fe(),u=wp(),l=ge("assert"),h=1,c=class{constructor(g){this.cachedHashCode=g;}static calculateEmptyHashCode(){let g=o.MurmurHash.initialize(h);return g=o.MurmurHash.finish(g,0),g}static calculateSingleHashCode(g,v){let x=o.MurmurHash.initialize(h);return x=o.MurmurHash.update(x,g),x=o.MurmurHash.update(x,v),x=o.MurmurHash.finish(x,2),x}static calculateHashCode(g,v){let x=o.MurmurHash.initialize(h);for(let _ of g)x=o.MurmurHash.update(x,_);for(let _ of v)x=o.MurmurHash.update(x,_);return x=o.MurmurHash.finish(x,2*g.length),x}static fromRuleContext(g,v,x=!0){if(v.isEmpty)return x?c.EMPTY_FULL:c.EMPTY_LOCAL;let _;v._parent?_=c.fromRuleContext(g,v._parent,x):_=x?c.EMPTY_FULL:c.EMPTY_LOCAL;let b=g.states[v.invokingState].transition(0);return _.getChild(b.followState.stateNumber)}static addEmptyContext(g){return g.addEmptyContext()}static removeEmptyContext(g){return g.removeEmptyContext()}static join(g,v,x=u.PredictionContextCache.UNCACHED){if(g===v)return g;if(g.isEmpty)return c.isEmptyLocal(g)?g:c.addEmptyContext(v);if(v.isEmpty)return c.isEmptyLocal(v)?v:c.addEmptyContext(g);let _=g.size,E=v.size;if(_===1&&E===1&&g.getReturnState(0)===v.getReturnState(0)){let te=x.join(g.getParent(0),v.getParent(0));return te===g.getParent(0)?g:te===v.getParent(0)?v:te.getChild(g.getReturnState(0))}let b=0,w=new Array(_+E),D=new Array(w.length),N=0,F=0,V=!0,Z=!0;for(;N<_&&F<E;)g.getReturnState(N)===v.getReturnState(F)?(w[b]=x.join(g.getParent(N),v.getParent(F)),D[b]=g.getReturnState(N),V=V&&w[b]===g.getParent(N),Z=Z&&w[b]===v.getParent(F),N++,F++):g.getReturnState(N)<v.getReturnState(F)?(w[b]=g.getParent(N),D[b]=g.getReturnState(N),Z=!1,N++):(l(v.getReturnState(F)<g.getReturnState(N)),w[b]=v.getParent(F),D[b]=v.getReturnState(F),V=!1,F++),b++;for(;N<_;)w[b]=g.getParent(N),D[b]=g.getReturnState(N),N++,Z=!1,b++;for(;F<E;)w[b]=v.getParent(F),D[b]=v.getReturnState(F),F++,V=!1,b++;return V?g:Z?v:(b<w.length&&(w=w.slice(0,b),D=D.slice(0,b)),w.length===0?c.EMPTY_FULL:w.length===1?new m(w[0],D[0]):new f(w,D))}static isEmptyLocal(g){return g===c.EMPTY_LOCAL}static getCachedContext(g,v,x){if(g.isEmpty)return g;let _=x.get(g);if(_)return _;if(_=v.get(g),_)return x.put(g,_),_;let E=!1,b=new Array(g.size);for(let D=0;D<b.length;D++){let N=c.getCachedContext(g.getParent(D),v,x);if(E||N!==g.getParent(D)){if(!E){b=new Array(g.size);for(let F=0;F<g.size;F++)b[F]=g.getParent(F);E=!0;}b[D]=N;}}if(!E)return _=v.putIfAbsent(g,g),x.put(g,_!=null?_:g),g;let w;if(b.length===1)w=new m(b[0],g.getReturnState(0));else {let D=new Array(g.size);for(let N=0;N<g.size;N++)D[N]=g.getReturnState(N);w=new f(b,D,g.hashCode());}return _=v.putIfAbsent(w,w),x.put(w,_||w),x.put(g,_||w),w}appendSingleContext(g,v){return this.appendContext(c.EMPTY_FULL.getChild(g),v)}getChild(g){return new m(this,g)}hashCode(){return this.cachedHashCode}toStrings(g,v,x=c.EMPTY_FULL){let _=[];e:for(let E=0;;E++){let b=0,w=!0,D=this,N=v,F="";for(F+="[";!D.isEmpty&&D!==x;){let V=0;if(D.size>0){let Z=1;for(;1<<Z>>>0<D.size;)Z++;let te=(1<<Z>>>0)-1;if(V=E>>b&te,w=w&&V>=D.size-1,V>=D.size)continue e;b+=Z;}if(g){F.length>1&&(F+=" ");let te=g.atn.states[N],ae=g.ruleNames[te.ruleIndex];F+=ae;}else D.getReturnState(V)!==c.EMPTY_FULL_STATE_KEY&&(D.isEmpty||(F.length>1&&(F+=" "),F+=D.getReturnState(V)));N=D.getReturnState(V),D=D.getParent(V);}if(F+="]",_.push(F),w)break}return _}};e([a.Override],c.prototype,"hashCode",null),e([r(0,a.NotNull),r(1,a.NotNull),r(2,a.NotNull)],c,"join",null),e([r(0,a.NotNull),r(1,a.NotNull),r(2,a.NotNull)],c,"getCachedContext",null),t.PredictionContext=c;var d=class extends c{constructor(g){super(c.calculateEmptyHashCode()),this.fullContext=g;}get isFullContext(){return this.fullContext}addEmptyContext(){return this}removeEmptyContext(){throw new Error("Cannot remove the empty context from itself.")}getParent(g){throw new Error("index out of bounds")}getReturnState(g){throw new Error("index out of bounds")}findReturnState(g){return -1}get size(){return 0}appendSingleContext(g,v){return v.getChild(this,g)}appendContext(g,v){return g}get isEmpty(){return !0}get hasEmpty(){return !0}equals(g){return this===g}toStrings(g,v,x){return ["[]"]}};e([a.Override],d.prototype,"addEmptyContext",null),e([a.Override],d.prototype,"removeEmptyContext",null),e([a.Override],d.prototype,"getParent",null),e([a.Override],d.prototype,"getReturnState",null),e([a.Override],d.prototype,"findReturnState",null),e([a.Override],d.prototype,"size",null),e([a.Override],d.prototype,"appendSingleContext",null),e([a.Override],d.prototype,"appendContext",null),e([a.Override],d.prototype,"isEmpty",null),e([a.Override],d.prototype,"hasEmpty",null),e([a.Override],d.prototype,"equals",null),e([a.Override],d.prototype,"toStrings",null);var f=class as extends c{constructor(v,x,_){super(_||c.calculateHashCode(v,x)),l(v.length===x.length),l(x.length>1||x[0]!==c.EMPTY_FULL_STATE_KEY,"Should be using PredictionContext.EMPTY instead."),this.parents=v,this.returnStates=x;}getParent(v){return this.parents[v]}getReturnState(v){return this.returnStates[v]}findReturnState(v){return n.Arrays.binarySearch(this.returnStates,v)}get size(){return this.returnStates.length}get isEmpty(){return !1}get hasEmpty(){return this.returnStates[this.returnStates.length-1]===c.EMPTY_FULL_STATE_KEY}addEmptyContext(){if(this.hasEmpty)return this;let v=this.parents.slice(0),x=this.returnStates.slice(0);return v.push(c.EMPTY_FULL),x.push(c.EMPTY_FULL_STATE_KEY),new as(v,x)}removeEmptyContext(){if(!this.hasEmpty)return this;if(this.returnStates.length===2)return new m(this.parents[0],this.returnStates[0]);{let v=this.parents.slice(0,this.parents.length-1),x=this.returnStates.slice(0,this.returnStates.length-1);return new as(v,x)}}appendContext(v,x){return as.appendContextImpl(this,v,new c.IdentityHashMap)}static appendContextImpl(v,x,_){if(x.isEmpty){if(c.isEmptyLocal(x)){if(v.hasEmpty)return c.EMPTY_LOCAL;throw new Error("what to do here?")}return v}if(x.size!==1)throw new Error("Appending a tree suffix is not yet supported.");let E=_.get(v);if(!E){if(v.isEmpty)E=x;else {let b=v.size;v.hasEmpty&&b--;let w=new Array(b),D=new Array(b);for(let N=0;N<b;N++)D[N]=v.getReturnState(N);for(let N=0;N<b;N++)w[N]=as.appendContextImpl(v.getParent(N),x,_);w.length===1?E=new m(w[0],D[0]):(l(w.length>1),E=new as(w,D)),v.hasEmpty&&(E=c.join(E,x));}_.put(v,E);}return E}equals(v){if(this===v)return !0;if(!(v instanceof as)||this.hashCode()!==v.hashCode())return !1;let x=v;return this.equalsImpl(x,new s.Array2DHashSet)}equalsImpl(v,x){let _=[],E=[];for(_.push(this),E.push(v);;){let b=_.pop(),w=E.pop();if(!b||!w)break;let D=new u.PredictionContextCache.IdentityCommutativePredictionContextOperands(b,w);if(!x.add(D))continue;let N=D.x.size;if(N===0){if(!D.x.equals(D.y))return !1;continue}let F=D.y.size;if(N!==F)return !1;for(let V=0;V<N;V++){if(D.x.getReturnState(V)!==D.y.getReturnState(V))return !1;let Z=D.x.getParent(V),te=D.y.getParent(V);if(Z.hashCode()!==te.hashCode())return !1;Z!==te&&(_.push(Z),E.push(te));}}return !0}};e([a.NotNull],f.prototype,"parents",void 0),e([a.NotNull],f.prototype,"returnStates",void 0),e([a.Override],f.prototype,"getParent",null),e([a.Override],f.prototype,"getReturnState",null),e([a.Override],f.prototype,"findReturnState",null),e([a.Override],f.prototype,"size",null),e([a.Override],f.prototype,"isEmpty",null),e([a.Override],f.prototype,"hasEmpty",null),e([a.Override],f.prototype,"addEmptyContext",null),e([a.Override],f.prototype,"removeEmptyContext",null),e([a.Override],f.prototype,"appendContext",null),e([a.Override],f.prototype,"equals",null),f=e([r(0,a.NotNull)],f);var m=class gb extends c{constructor(v,x){super(c.calculateSingleHashCode(v,x)),this.parent=v,this.returnState=x;}getParent(v){return this.parent}getReturnState(v){return this.returnState}findReturnState(v){return this.returnState===v?0:-1}get size(){return 1}get isEmpty(){return !1}get hasEmpty(){return !1}appendContext(v,x){return x.getChild(this.parent.appendContext(v,x),this.returnState)}addEmptyContext(){let v=[this.parent,c.EMPTY_FULL],x=[this.returnState,c.EMPTY_FULL_STATE_KEY];return new f(v,x)}removeEmptyContext(){return this}equals(v){if(v===this)return !0;if(!(v instanceof gb))return !1;let x=v;return this.hashCode()!==x.hashCode()?!1:this.returnState===x.returnState&&this.parent.equals(x.parent)}};e([a.NotNull],m.prototype,"parent",void 0),e([a.Override],m.prototype,"getParent",null),e([a.Override],m.prototype,"getReturnState",null),e([a.Override],m.prototype,"findReturnState",null),e([a.Override],m.prototype,"size",null),e([a.Override],m.prototype,"isEmpty",null),e([a.Override],m.prototype,"hasEmpty",null),e([a.Override],m.prototype,"appendContext",null),e([a.Override],m.prototype,"addEmptyContext",null),e([a.Override],m.prototype,"removeEmptyContext",null),e([a.Override],m.prototype,"equals",null),m=e([r(0,a.NotNull)],m),t.SingletonPredictionContext=m,function(g){g.EMPTY_LOCAL=new d(!1),g.EMPTY_FULL=new d(!0),g.EMPTY_LOCAL_STATE_KEY=-(1<<31>>>0),g.EMPTY_FULL_STATE_KEY=(1<<31>>>0)-1;class v extends i.Array2DHashMap{constructor(){super(x.INSTANCE);}}g.IdentityHashMap=v;class x{IdentityEqualityComparator(){}hashCode(E){return E.hashCode()}equals(E,b){return E===b}}x.INSTANCE=new x,e([a.Override],x.prototype,"hashCode",null),e([a.Override],x.prototype,"equals",null),g.IdentityEqualityComparator=x;}(c=t.PredictionContext||(t.PredictionContext={}));}),ac=re(t=>{var e=t&&t.__decorate||function(v,x,_,E){var b=arguments.length,w=b<3?x:E===null?E=Object.getOwnPropertyDescriptor(x,_):E,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(v,x,_,E);else for(var N=v.length-1;N>=0;N--)(D=v[N])&&(w=(b<3?D(w):b>3?D(x,_,w):D(x,_))||w);return b>3&&w&&Object.defineProperty(x,_,w),w},r=t&&t.__param||function(v,x){return function(_,E){x(_,E,v);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNConfig=void 0;var i=uo(),s=ls(),n=qt(),o=fe(),a=Qr(),u=Vr(),l=ao(),h=ge("assert"),c=2147483648,d=class Fa{constructor(x,_,E){typeof _=="number"?(h((_&16777215)===_),this._state=x,this.altAndOuterContextDepth=_,this._context=E):(this._state=x,this.altAndOuterContextDepth=_.altAndOuterContextDepth,this._context=E);}static create(x,_,E,b=l.SemanticContext.NONE,w){return b!==l.SemanticContext.NONE?w!=null?new g(w,b,x,_,E,!1):new f(b,x,_,E):w!=null?new m(w,x,_,E,!1):new Fa(x,_,E)}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){h(x>=0),x=Math.min(x,127),this.altAndOuterContextDepth=x<<24|(this.altAndOuterContextDepth&-2130706433)>>>0;}get lexerActionExecutor(){}get semanticContext(){return l.SemanticContext.NONE}get hasPassedThroughNonGreedyDecision(){return !1}clone(){return this.transform(this.state,!1)}transform(x,_,E){return E==null?this.transformImpl(x,this._context,this.semanticContext,_,this.lexerActionExecutor):E instanceof u.PredictionContext?this.transformImpl(x,E,this.semanticContext,_,this.lexerActionExecutor):E instanceof l.SemanticContext?this.transformImpl(x,this._context,E,_,this.lexerActionExecutor):this.transformImpl(x,this._context,this.semanticContext,_,E)}transformImpl(x,_,E,b,w){let D=b&&Fa.checkNonGreedyDecision(this,x);return E!==l.SemanticContext.NONE?w!=null||D?new g(w,E,x,this,_,D):new f(E,x,this,_):w!=null||D?new m(w,x,this,_,D):new Fa(x,this,_)}static checkNonGreedyDecision(x,_){return x.hasPassedThroughNonGreedyDecision||_ instanceof s.DecisionState&&_.nonGreedy}appendContext(x,_){if(typeof x=="number"){let E=this.context.appendSingleContext(x,_);return this.transform(this.state,!1,E)}else {let E=this.context.appendContext(x,_);return this.transform(this.state,!1,E)}}contains(x){if(this.state.stateNumber!==x.state.stateNumber||this.alt!==x.alt||!this.semanticContext.equals(x.semanticContext))return !1;let _=[],E=[];for(_.push(this.context),E.push(x.context);;){let b=_.pop(),w=E.pop();if(!b||!w)break;if(b===w)return !0;if(b.size<w.size)return !1;if(w.isEmpty)return b.hasEmpty;for(let D=0;D<w.size;D++){let N=b.findReturnState(w.getReturnState(D));if(N<0)return !1;_.push(b.getParent(N)),E.push(w.getParent(D));}}return !1}get isPrecedenceFilterSuppressed(){return (this.altAndOuterContextDepth&c)!==0}set isPrecedenceFilterSuppressed(x){x?this.altAndOuterContextDepth|=c:this.altAndOuterContextDepth&=~c;}equals(x){return this===x?!0:x instanceof Fa?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&&a.ObjectEqualityComparator.INSTANCE.equals(this.lexerActionExecutor,x.lexerActionExecutor):!1}hashCode(){let x=n.MurmurHash.initialize(7);return x=n.MurmurHash.update(x,this.state.stateNumber),x=n.MurmurHash.update(x,this.alt),x=n.MurmurHash.update(x,this.reachesIntoOuterContext?1:0),x=n.MurmurHash.update(x,this.context),x=n.MurmurHash.update(x,this.semanticContext),x=n.MurmurHash.update(x,this.hasPassedThroughNonGreedyDecision?1:0),x=n.MurmurHash.update(x,this.lexerActionExecutor),x=n.MurmurHash.finish(x,7),x}toDotString(){let x="";x+=`digraph G {
61
+ `;}return h}asElementType(h){return h}createBuckets(h){return new Array(h)}};e([n.NotNull],l.prototype,"comparator",void 0),e([n.Override],l.prototype,"hashCode",null),e([n.Override],l.prototype,"equals",null),e([n.Override],l.prototype,"add",null),e([n.Override],l.prototype,"size",null),e([n.Override],l.prototype,"isEmpty",null),e([n.Override],l.prototype,"contains",null),e([r(0,n.Nullable)],l.prototype,"containsFast",null),e([n.Override],l.prototype,Symbol.iterator,null),e([n.Override],l.prototype,"toArray",null),e([n.Override],l.prototype,"containsAll",null),e([n.Override],l.prototype,"addAll",null),e([n.Override],l.prototype,"clear",null),e([n.Override],l.prototype,"toString",null),e([n.SuppressWarnings("unchecked")],l.prototype,"asElementType",null),e([n.SuppressWarnings("unchecked")],l.prototype,"createBuckets",null),t.Array2DHashSet=l;}),nc=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayEqualityComparator=void 0;var r=fe(),i=qt(),s=Qr(),n=class{hashCode(o){return o==null?0:i.MurmurHash.hashCode(o,0)}equals(o,a){if(o==null)return a==null;if(a==null||o.length!==a.length)return !1;for(let u=0;u<o.length;u++)if(!s.ObjectEqualityComparator.INSTANCE.equals(o[u],a[u]))return !1;return !0}};n.INSTANCE=new n,e([r.Override],n.prototype,"hashCode",null),e([r.Override],n.prototype,"equals",null),t.ArrayEqualityComparator=n;}),ei=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.toCharArray=t.toMap=t.equals=t.join=t.escapeWhitespace=void 0;function e(o,a){return a?o.replace(/ /,"\xB7"):o.replace(/\t/,"\\t").replace(/\n/,"\\n").replace(/\r/,"\\r")}t.escapeWhitespace=e;function r(o,a){let u="",l=!0;for(let h of o)l?l=!1:u+=a,u+=h;return u}t.join=r;function i(o,a){return o===a?!0:o===void 0||a===void 0?!1:o.equals(a)}t.equals=i;function s(o){let a=new Map;for(let u=0;u<o.length;u++)a.set(o[u],u);return a}t.toMap=s;function n(o){if(typeof o=="string"){let a=new Uint16Array(o.length);for(let u=0;u<o.length;u++)a[u]=o.charCodeAt(u);return a}else return o.toCharArray()}t.toCharArray=n;}),ao=te(t=>{var e=t&&t.__decorate||function(d,f,m,g){var v=arguments.length,x=v<3?f:g===null?g=Object.getOwnPropertyDescriptor(f,m):g,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(d,f,m,g);else for(var E=d.length-1;E>=0;E--)(_=d[E])&&(x=(v<3?_(x):v>3?_(f,m,x):_(f,m))||x);return v>3&&x&&Object.defineProperty(f,m,x),x},r=t&&t.__param||function(d,f){return function(m,g){f(m,g,d);}};Object.defineProperty(t,"__esModule",{value:!0}),t.SemanticContext=void 0;var i=on(),s=nc(),n=qt(),o=fe(),a=Qr(),u=ei();function l(d){let f;for(let m of d){if(f===void 0){f=m;continue}f.compareTo(m)<0&&(f=m);}return f}function h(d){let f;for(let m of d){if(f===void 0){f=m;continue}f.compareTo(m)>0&&(f=m);}return f}var c=class{static get NONE(){return c._NONE===void 0&&(c._NONE=new c.Predicate),c._NONE}evalPrecedence(d,f){return this}static and(d,f){if(!d||d===c.NONE)return f;if(f===c.NONE)return d;let m=new c.AND(d,f);return m.opnds.length===1?m.opnds[0]:m}static or(d,f){if(!d)return f;if(d===c.NONE||f===c.NONE)return c.NONE;let m=new c.OR(d,f);return m.opnds.length===1?m.opnds[0]:m}};t.SemanticContext=c,function(d){function g(w){let D=[];for(let N=0;N<w.length;N++){let F=w[N];F instanceof d.PrecedencePredicate&&(D.push(F),w.splice(N,1),N--);}return D}class v extends d{constructor(D=-1,N=-1,F=!1){super(),this.ruleIndex=D,this.predIndex=N,this.isCtxDependent=F;}eval(D,N){let F=this.isCtxDependent?N:void 0;return D.sempred(F,this.ruleIndex,this.predIndex)}hashCode(){let D=n.MurmurHash.initialize();return D=n.MurmurHash.update(D,this.ruleIndex),D=n.MurmurHash.update(D,this.predIndex),D=n.MurmurHash.update(D,this.isCtxDependent?1:0),D=n.MurmurHash.finish(D,3),D}equals(D){return D instanceof v?this===D?!0:this.ruleIndex===D.ruleIndex&&this.predIndex===D.predIndex&&this.isCtxDependent===D.isCtxDependent:!1}toString(){return "{"+this.ruleIndex+":"+this.predIndex+"}?"}}e([o.Override],v.prototype,"eval",null),e([o.Override],v.prototype,"hashCode",null),e([o.Override],v.prototype,"equals",null),e([o.Override],v.prototype,"toString",null),d.Predicate=v;class x extends d{constructor(D){super(),this.precedence=D;}eval(D,N){return D.precpred(N,this.precedence)}evalPrecedence(D,N){if(D.precpred(N,this.precedence))return d.NONE}compareTo(D){return this.precedence-D.precedence}hashCode(){let D=1;return D=31*D+this.precedence,D}equals(D){return D instanceof x?this===D?!0:this.precedence===D.precedence:!1}toString(){return "{"+this.precedence+">=prec}?"}}e([o.Override],x.prototype,"eval",null),e([o.Override],x.prototype,"evalPrecedence",null),e([o.Override],x.prototype,"compareTo",null),e([o.Override],x.prototype,"hashCode",null),e([o.Override],x.prototype,"equals",null),e([o.Override],x.prototype,"toString",null),d.PrecedencePredicate=x;class _ extends d{}d.Operator=_;let E=class Kl extends _{constructor(D,N){super();let F=new i.Array2DHashSet(a.ObjectEqualityComparator.INSTANCE);D instanceof Kl?F.addAll(D.opnds):F.add(D),N instanceof Kl?F.addAll(N.opnds):F.add(N),this.opnds=F.toArray();let U=g(this.opnds),Z=h(U);Z&&this.opnds.push(Z);}get operands(){return this.opnds}equals(D){return this===D?!0:D instanceof Kl?s.ArrayEqualityComparator.INSTANCE.equals(this.opnds,D.opnds):!1}hashCode(){return n.MurmurHash.hashCode(this.opnds,40363613)}eval(D,N){for(let F of this.opnds)if(!F.eval(D,N))return !1;return !0}evalPrecedence(D,N){let F=!1,U=[];for(let re of this.opnds){let ae=re.evalPrecedence(D,N);if(F=F||ae!==re,ae==null)return;ae!==d.NONE&&U.push(ae);}if(!F)return this;if(U.length===0)return d.NONE;let Z=U[0];for(let re=1;re<U.length;re++)Z=d.and(Z,U[re]);return Z}toString(){return u.join(this.opnds,"&&")}};e([o.Override],E.prototype,"operands",null),e([o.Override],E.prototype,"equals",null),e([o.Override],E.prototype,"hashCode",null),e([o.Override],E.prototype,"eval",null),e([o.Override],E.prototype,"evalPrecedence",null),e([o.Override],E.prototype,"toString",null),E=e([r(0,o.NotNull),r(1,o.NotNull)],E),d.AND=E;let b=class Gl extends _{constructor(D,N){super();let F=new i.Array2DHashSet(a.ObjectEqualityComparator.INSTANCE);D instanceof Gl?F.addAll(D.opnds):F.add(D),N instanceof Gl?F.addAll(N.opnds):F.add(N),this.opnds=F.toArray();let U=g(this.opnds),Z=l(U);Z&&this.opnds.push(Z);}get operands(){return this.opnds}equals(D){return this===D?!0:D instanceof Gl?s.ArrayEqualityComparator.INSTANCE.equals(this.opnds,D.opnds):!1}hashCode(){return n.MurmurHash.hashCode(this.opnds,486279973)}eval(D,N){for(let F of this.opnds)if(F.eval(D,N))return !0;return !1}evalPrecedence(D,N){let F=!1,U=[];for(let re of this.opnds){let ae=re.evalPrecedence(D,N);if(F=F||ae!==re,ae===d.NONE)return d.NONE;ae&&U.push(ae);}if(!F)return this;if(U.length===0)return;let Z=U[0];for(let re=1;re<U.length;re++)Z=d.or(Z,U[re]);return Z}toString(){return u.join(this.opnds,"||")}};e([o.Override],b.prototype,"operands",null),e([o.Override],b.prototype,"equals",null),e([o.Override],b.prototype,"hashCode",null),e([o.Override],b.prototype,"eval",null),e([o.Override],b.prototype,"evalPrecedence",null),e([o.Override],b.prototype,"toString",null),b=e([r(0,o.NotNull),r(1,o.NotNull)],b),d.OR=b;}(c=t.SemanticContext||(t.SemanticContext={}));}),fb=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.PredicateTransition=void 0;var i=Ep(),s=fe(),n=ao(),o=class extends i.AbstractPredicateTransition{constructor(u,l,h,c){super(u),this.ruleIndex=l,this.predIndex=h,this.isCtxDependent=c;}get serializationType(){return 4}get isEpsilon(){return !0}matches(u,l,h){return !1}get predicate(){return new n.SemanticContext.Predicate(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return "pred_"+this.ruleIndex+":"+this.predIndex}};e([s.Override],o.prototype,"serializationType",null),e([s.Override],o.prototype,"isEpsilon",null),e([s.Override],o.prototype,"matches",null),e([s.Override,s.NotNull],o.prototype,"toString",null),o=e([r(0,s.NotNull)],o),t.PredicateTransition=o;}),sc=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.FailedPredicateException=void 0;var i=nn(),s=fe(),n=fb(),o=class db extends i.RecognitionException{constructor(u,l,h){super(u,u.inputStream,u.context,db.formatMessage(l,h));let d=u.interpreter.atn.states[u.state].transition(0);d instanceof n.PredicateTransition?(this._ruleIndex=d.ruleIndex,this._predicateIndex=d.predIndex):(this._ruleIndex=0,this._predicateIndex=0),this._predicate=l,super.setOffendingToken(u,u.currentToken);}get ruleIndex(){return this._ruleIndex}get predicateIndex(){return this._predicateIndex}get predicate(){return this._predicate}static formatMessage(u,l){return l||`failed predicate: {${u}}?`}};e([s.NotNull],o,"formatMessage",null),o=e([r(0,s.NotNull)],o),t.FailedPredicateException=o;}),oc=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.InputMismatchException=void 0;var i=nn(),s=fe(),n=class extends i.RecognitionException{constructor(a,u,l){l===void 0&&(l=a.context),super(a,a.inputStream,l),u!==void 0&&this.setOffendingState(u),this.setOffendingToken(a,a.currentToken);}};n=e([r(0,s.NotNull)],n),t.InputMismatchException=n;}),Cp=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Arrays=void 0;(function(r){function i(o,a,u,l){return s(o,u!==void 0?u:0,l!==void 0?l:o.length,a)}r.binarySearch=i;function s(o,a,u,l){let h=a,c=u-1;for(;h<=c;){let d=h+c>>>1,f=o[d];if(f<l)h=d+1;else if(f>l)c=d-1;else return d}return -(h+1)}function n(o){let a="[",u=!0;for(let l of o)u?u=!1:a+=", ",l===null?a+="null":l===void 0?a+="undefined":a+=l;return a+="]",a}r.toString=n;})(t.Arrays||(t.Arrays={}));}),Tp=te(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.IntegerList=void 0;var r=Cp(),i=fe(),s=new Int32Array(0),n=4,o=(1<<31>>>0)-1-8,a=class{constructor(u){if(!u)this._data=s,this._size=0;else if(u instanceof a)this._data=u._data.slice(0),this._size=u._size;else if(typeof u=="number")u===0?(this._data=s,this._size=0):(this._data=new Int32Array(u),this._size=0);else {this._data=s,this._size=0;for(let l of u)this.add(l);}}add(u){this._data.length===this._size&&this.ensureCapacity(this._size+1),this._data[this._size]=u,this._size++;}addAll(u){if(Array.isArray(u))this.ensureCapacity(this._size+u.length),this._data.subarray(this._size,this._size+u.length).set(u),this._size+=u.length;else if(u instanceof a)this.ensureCapacity(this._size+u._size),this._data.subarray(this._size,this._size+u.size).set(u._data),this._size+=u._size;else {this.ensureCapacity(this._size+u.size);let l=0;for(let h of u)this._data[this._size+l]=h,l++;this._size+=u.size;}}get(u){if(u<0||u>=this._size)throw RangeError();return this._data[u]}contains(u){for(let l=0;l<this._size;l++)if(this._data[l]===u)return !0;return !1}set(u,l){if(u<0||u>=this._size)throw RangeError();let h=this._data[u];return this._data[u]=l,h}removeAt(u){let l=this.get(u);return this._data.copyWithin(u,u+1,this._size),this._data[this._size-1]=0,this._size--,l}removeRange(u,l){if(u<0||l<0||u>this._size||l>this._size||u>l)throw RangeError();this._data.copyWithin(l,u,this._size),this._data.fill(0,this._size-(l-u),this._size),this._size-=l-u;}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(u){if(u===this)return !0;if(!(u instanceof a)||this._size!==u._size)return !1;for(let l=0;l<this._size;l++)if(this._data[l]!==u._data[l])return !1;return !0}hashCode(){let u=1;for(let l=0;l<this._size;l++)u=31*u+this._data[l];return u}toString(){return this._data.toString()}binarySearch(u,l,h){if(l===void 0&&(l=0),h===void 0&&(h=this._size),l<0||h<0||l>this._size||h>this._size)throw new RangeError;if(l>h)throw new RangeError;return r.Arrays.binarySearch(this._data,u,l,h)}ensureCapacity(u){if(u<0||u>o)throw new RangeError;let l;for(this._data.length===0?l=n:l=this._data.length;l<u;)l=l*2,(l<0||l>o)&&(l=o);let h=new Int32Array(l);h.set(this._data),this._data=h;}toCharArray(){let u=new Uint16Array(this._size),l=0,h=!1;for(let c=0;c<this._size;c++){let d=this._data[c];if(d>=0&&d<65536){u[l]=d,l++;continue}if(!h){let m=new Uint16Array(this.charArraySize());m.set(u,0),u=m,h=!0;}let f=String.fromCodePoint(d);u[l]=f.charCodeAt(0),u[l+1]=f.charCodeAt(1),l+=2;}return u}charArraySize(){let u=0;for(let l=0;l<this._size;l++)u+=this._data[l]>=65536?2:1;return u}};e([i.NotNull],a.prototype,"_data",void 0),e([i.Override],a.prototype,"equals",null),e([i.Override],a.prototype,"hashCode",null),e([i.Override],a.prototype,"toString",null),t.IntegerList=a;}),mr=te(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.Interval=void 0;var r=fe(),i=1e3,s=class{constructor(n,o){this.a=n,this.b=o;}static get INVALID(){return s._INVALID}static of(n,o){return n!==o||n<0||n>i?new s(n,o):(s.cache[n]==null&&(s.cache[n]=new s(n,n)),s.cache[n])}get length(){return this.b<this.a?0:this.b-this.a+1}equals(n){return n===this?!0:n instanceof s?this.a===n.a&&this.b===n.b:!1}hashCode(){let n=23;return n=n*31+this.a,n=n*31+this.b,n}startsBeforeDisjoint(n){return this.a<n.a&&this.b<n.a}startsBeforeNonDisjoint(n){return this.a<=n.a&&this.b>=n.a}startsAfter(n){return this.a>n.a}startsAfterDisjoint(n){return this.a>n.b}startsAfterNonDisjoint(n){return this.a>n.a&&this.a<=n.b}disjoint(n){return this.startsBeforeDisjoint(n)||this.startsAfterDisjoint(n)}adjacent(n){return this.a===n.b+1||this.b===n.a-1}properlyContains(n){return n.a>=this.a&&n.b<=this.b}union(n){return s.of(Math.min(this.a,n.a),Math.max(this.b,n.b))}intersection(n){return s.of(Math.max(this.a,n.a),Math.min(this.b,n.b))}differenceNotProperlyContained(n){let o;return n.startsBeforeNonDisjoint(this)?o=s.of(Math.max(this.a,n.b+1),this.b):n.startsAfterNonDisjoint(this)&&(o=s.of(this.a,n.a-1)),o}toString(){return this.a+".."+this.b}};s._INVALID=new s(-1,-2),s.cache=new Array(i+1),e([r.Override],s.prototype,"equals",null),e([r.Override],s.prototype,"hashCode",null),e([r.Override],s.prototype,"toString",null),t.Interval=s;}),At=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Token=void 0;var e=rn();(function(i){i.INVALID_TYPE=0,i.EPSILON=-2,i.MIN_USER_TOKEN_TYPE=1,i.EOF=e.IntStream.EOF,i.DEFAULT_CHANNEL=0,i.HIDDEN_CHANNEL=1,i.MIN_USER_CHANNEL_VALUE=2;})(t.Token||(t.Token={}));}),Ma=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommonToken=void 0;var i=mr(),s=fe(),n=At(),o=class Oa{constructor(u,l,h=Oa.EMPTY_SOURCE,c=n.Token.DEFAULT_CHANNEL,d=0,f=0){this._line=0,this._charPositionInLine=-1,this._channel=n.Token.DEFAULT_CHANNEL,this.index=-1,this._text=l,this._type=u,this.source=h,this._channel=c,this.start=d,this.stop=f,h.source!=null&&(this._line=h.source.line,this._charPositionInLine=h.source.charPositionInLine);}static fromToken(u){let l=new Oa(u.type,void 0,Oa.EMPTY_SOURCE,u.channel,u.startIndex,u.stopIndex);return l._line=u.line,l.index=u.tokenIndex,l._charPositionInLine=u.charPositionInLine,u instanceof Oa?(l._text=u._text,l.source=u.source):(l._text=u.text,l.source={source:u.tokenSource,stream:u.inputStream}),l}get type(){return this._type}set type(u){this._type=u;}get line(){return this._line}set line(u){this._line=u;}get text(){if(this._text!=null)return this._text;let u=this.inputStream;if(u==null)return;let l=u.size;return this.start<l&&this.stop<l?u.getText(i.Interval.of(this.start,this.stop)):"<EOF>"}set text(u){this._text=u;}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(u){this._charPositionInLine=u;}get channel(){return this._channel}set channel(u){this._channel=u;}get startIndex(){return this.start}set startIndex(u){this.start=u;}get stopIndex(){return this.stop}set stopIndex(u){this.stop=u;}get tokenIndex(){return this.index}set tokenIndex(u){this.index=u;}get tokenSource(){return this.source.source}get inputStream(){return this.source.stream}toString(u){let l="";this._channel>0&&(l=",channel="+this._channel);let h=this.text;h!=null?(h=h.replace(/\n/g,"\\n"),h=h.replace(/\r/g,"\\r"),h=h.replace(/\t/g,"\\t")):h="<no text>";let c=String(this._type);return u&&(c=u.vocabulary.getDisplayName(this._type)),"[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+h+"',<"+c+">"+l+","+this._line+":"+this.charPositionInLine+"]"}};o.EMPTY_SOURCE={source:void 0,stream:void 0},e([s.NotNull],o.prototype,"source",void 0),e([s.Override],o.prototype,"type",null),e([s.Override],o.prototype,"line",null),e([s.Override],o.prototype,"text",null),e([s.Override],o.prototype,"charPositionInLine",null),e([s.Override],o.prototype,"channel",null),e([s.Override],o.prototype,"startIndex",null),e([s.Override],o.prototype,"stopIndex",null),e([s.Override],o.prototype,"tokenIndex",null),e([s.Override],o.prototype,"tokenSource",null),e([s.Override],o.prototype,"inputStream",null),e([s.Override],o.prototype,"toString",null),e([r(0,s.NotNull)],o,"fromToken",null),o=e([r(2,s.NotNull)],o),t.CommonToken=o;}),Ap=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.CommonTokenFactory=void 0;var r=Ma(),i=mr(),s=fe(),n=class{constructor(o=!1){this.copyText=o;}create(o,a,u,l,h,c,d,f){let m=new r.CommonToken(a,u,o,l,h,c);return m.line=d,m.charPositionInLine=f,u==null&&this.copyText&&o.stream!=null&&(m.text=o.stream.getText(i.Interval.of(h,c))),m}createSimple(o,a){return new r.CommonToken(o,a)}};e([s.Override],n.prototype,"create",null),e([s.Override],n.prototype,"createSimple",null),t.CommonTokenFactory=n,function(o){o.DEFAULT=new o;}(n=t.CommonTokenFactory||(t.CommonTokenFactory={}));}),pb=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.IntegerStack=void 0;var e=Tp(),r=class extends e.IntegerList{constructor(i){super(i);}push(i){this.add(i);}pop(){return this.removeAt(this.size-1)}peek(){return this.get(this.size-1)}};t.IntegerStack=r;}),mb=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AcceptStateInfo=void 0;var e=class{constructor(r,i){this._prediction=r,this._lexerActionExecutor=i;}get prediction(){return this._prediction}get lexerActionExecutor(){return this._lexerActionExecutor}};t.AcceptStateInfo=e;}),uo=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Array2DHashMap=void 0;var e=on(),r=class{constructor(s){this.keyComparator=s;}hashCode(s){return this.keyComparator.hashCode(s.key)}equals(s,n){return this.keyComparator.equals(s.key,n.key)}},i=class{constructor(s){s instanceof i?this.backingStore=new e.Array2DHashSet(s.backingStore):this.backingStore=new e.Array2DHashSet(new r(s));}clear(){this.backingStore.clear();}containsKey(s){return this.backingStore.contains({key:s})}get(s){let n=this.backingStore.get({key:s});if(n)return n.value}get isEmpty(){return this.backingStore.isEmpty}put(s,n){let o=this.backingStore.get({key:s,value:n}),a;return o?(a=o.value,o.value=n):this.backingStore.add({key:s,value:n}),a}putIfAbsent(s,n){let o=this.backingStore.get({key:s,value:n}),a;return o?a=o.value:this.backingStore.add({key:s,value:n}),a}get size(){return this.backingStore.size}hashCode(){return this.backingStore.hashCode()}equals(s){return s instanceof i?this.backingStore.equals(s.backingStore):!1}};t.Array2DHashMap=i;}),ls=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DecisionState=void 0;var e=Ci(),r=class extends e.ATNState{constructor(){super(...arguments),this.decision=-1,this.nonGreedy=!1,this.sll=!1;}};t.DecisionState=r;}),wp=te(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.PredictionContextCache=void 0;var r=uo(),i=fe(),s=Qr(),n=Vr(),o=ge("assert"),a=class{constructor(u=!0){this.contexts=new r.Array2DHashMap(s.ObjectEqualityComparator.INSTANCE),this.childContexts=new r.Array2DHashMap(s.ObjectEqualityComparator.INSTANCE),this.joinContexts=new r.Array2DHashMap(s.ObjectEqualityComparator.INSTANCE),this.enableCache=u;}getAsCached(u){if(!this.enableCache)return u;let l=this.contexts.get(u);return l||(l=u,this.contexts.put(u,u)),l}getChild(u,l){if(!this.enableCache)return u.getChild(l);let h=new a.PredictionContextAndInt(u,l),c=this.childContexts.get(h);return c||(c=u.getChild(l),c=this.getAsCached(c),this.childContexts.put(h,c)),c}join(u,l){if(!this.enableCache)return n.PredictionContext.join(u,l,this);let h=new a.IdentityCommutativePredictionContextOperands(u,l),c=this.joinContexts.get(h);return c||(c=n.PredictionContext.join(u,l,this),c=this.getAsCached(c),this.joinContexts.put(h,c),c)}};t.PredictionContextCache=a,a.UNCACHED=new a(!1),function(u){class l{constructor(d,f){this.obj=d,this.value=f;}equals(d){if(d instanceof l){if(d===this)return !0}else return !1;let f=d;return this.value===f.value&&(this.obj===f.obj||this.obj!=null&&this.obj.equals(f.obj))}hashCode(){let d=5;return d=7*d+(this.obj!=null?this.obj.hashCode():0),d=7*d+this.value,d}}e([i.Override],l.prototype,"equals",null),e([i.Override],l.prototype,"hashCode",null),u.PredictionContextAndInt=l;class h{constructor(d,f){o(d!=null),o(f!=null),this._x=d,this._y=f;}get x(){return this._x}get y(){return this._y}equals(d){if(d instanceof h){if(this===d)return !0}else return !1;let f=d;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()}}e([i.Override],h.prototype,"equals",null),e([i.Override],h.prototype,"hashCode",null),u.IdentityCommutativePredictionContextOperands=h;}(a=t.PredictionContextCache||(t.PredictionContextCache={}));}),Vr=te(t=>{var e=t&&t.__decorate||function(g,v,x,_){var E=arguments.length,b=E<3?v:_===null?_=Object.getOwnPropertyDescriptor(v,x):_,w;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")b=Reflect.decorate(g,v,x,_);else for(var D=g.length-1;D>=0;D--)(w=g[D])&&(b=(E<3?w(b):E>3?w(v,x,b):w(v,x))||b);return E>3&&b&&Object.defineProperty(v,x,b),b},r=t&&t.__param||function(g,v){return function(x,_){v(x,_,g);}};Object.defineProperty(t,"__esModule",{value:!0}),t.SingletonPredictionContext=t.PredictionContext=void 0;var i=uo(),s=on(),n=Cp(),o=qt(),a=fe(),u=wp(),l=ge("assert"),h=1,c=class{constructor(g){this.cachedHashCode=g;}static calculateEmptyHashCode(){let g=o.MurmurHash.initialize(h);return g=o.MurmurHash.finish(g,0),g}static calculateSingleHashCode(g,v){let x=o.MurmurHash.initialize(h);return x=o.MurmurHash.update(x,g),x=o.MurmurHash.update(x,v),x=o.MurmurHash.finish(x,2),x}static calculateHashCode(g,v){let x=o.MurmurHash.initialize(h);for(let _ of g)x=o.MurmurHash.update(x,_);for(let _ of v)x=o.MurmurHash.update(x,_);return x=o.MurmurHash.finish(x,2*g.length),x}static fromRuleContext(g,v,x=!0){if(v.isEmpty)return x?c.EMPTY_FULL:c.EMPTY_LOCAL;let _;v._parent?_=c.fromRuleContext(g,v._parent,x):_=x?c.EMPTY_FULL:c.EMPTY_LOCAL;let b=g.states[v.invokingState].transition(0);return _.getChild(b.followState.stateNumber)}static addEmptyContext(g){return g.addEmptyContext()}static removeEmptyContext(g){return g.removeEmptyContext()}static join(g,v,x=u.PredictionContextCache.UNCACHED){if(g===v)return g;if(g.isEmpty)return c.isEmptyLocal(g)?g:c.addEmptyContext(v);if(v.isEmpty)return c.isEmptyLocal(v)?v:c.addEmptyContext(g);let _=g.size,E=v.size;if(_===1&&E===1&&g.getReturnState(0)===v.getReturnState(0)){let re=x.join(g.getParent(0),v.getParent(0));return re===g.getParent(0)?g:re===v.getParent(0)?v:re.getChild(g.getReturnState(0))}let b=0,w=new Array(_+E),D=new Array(w.length),N=0,F=0,U=!0,Z=!0;for(;N<_&&F<E;)g.getReturnState(N)===v.getReturnState(F)?(w[b]=x.join(g.getParent(N),v.getParent(F)),D[b]=g.getReturnState(N),U=U&&w[b]===g.getParent(N),Z=Z&&w[b]===v.getParent(F),N++,F++):g.getReturnState(N)<v.getReturnState(F)?(w[b]=g.getParent(N),D[b]=g.getReturnState(N),Z=!1,N++):(l(v.getReturnState(F)<g.getReturnState(N)),w[b]=v.getParent(F),D[b]=v.getReturnState(F),U=!1,F++),b++;for(;N<_;)w[b]=g.getParent(N),D[b]=g.getReturnState(N),N++,Z=!1,b++;for(;F<E;)w[b]=v.getParent(F),D[b]=v.getReturnState(F),F++,U=!1,b++;return U?g:Z?v:(b<w.length&&(w=w.slice(0,b),D=D.slice(0,b)),w.length===0?c.EMPTY_FULL:w.length===1?new m(w[0],D[0]):new f(w,D))}static isEmptyLocal(g){return g===c.EMPTY_LOCAL}static getCachedContext(g,v,x){if(g.isEmpty)return g;let _=x.get(g);if(_)return _;if(_=v.get(g),_)return x.put(g,_),_;let E=!1,b=new Array(g.size);for(let D=0;D<b.length;D++){let N=c.getCachedContext(g.getParent(D),v,x);if(E||N!==g.getParent(D)){if(!E){b=new Array(g.size);for(let F=0;F<g.size;F++)b[F]=g.getParent(F);E=!0;}b[D]=N;}}if(!E)return _=v.putIfAbsent(g,g),x.put(g,_!=null?_:g),g;let w;if(b.length===1)w=new m(b[0],g.getReturnState(0));else {let D=new Array(g.size);for(let N=0;N<g.size;N++)D[N]=g.getReturnState(N);w=new f(b,D,g.hashCode());}return _=v.putIfAbsent(w,w),x.put(w,_||w),x.put(g,_||w),w}appendSingleContext(g,v){return this.appendContext(c.EMPTY_FULL.getChild(g),v)}getChild(g){return new m(this,g)}hashCode(){return this.cachedHashCode}toStrings(g,v,x=c.EMPTY_FULL){let _=[];e:for(let E=0;;E++){let b=0,w=!0,D=this,N=v,F="";for(F+="[";!D.isEmpty&&D!==x;){let U=0;if(D.size>0){let Z=1;for(;1<<Z>>>0<D.size;)Z++;let re=(1<<Z>>>0)-1;if(U=E>>b&re,w=w&&U>=D.size-1,U>=D.size)continue e;b+=Z;}if(g){F.length>1&&(F+=" ");let re=g.atn.states[N],ae=g.ruleNames[re.ruleIndex];F+=ae;}else D.getReturnState(U)!==c.EMPTY_FULL_STATE_KEY&&(D.isEmpty||(F.length>1&&(F+=" "),F+=D.getReturnState(U)));N=D.getReturnState(U),D=D.getParent(U);}if(F+="]",_.push(F),w)break}return _}};e([a.Override],c.prototype,"hashCode",null),e([r(0,a.NotNull),r(1,a.NotNull),r(2,a.NotNull)],c,"join",null),e([r(0,a.NotNull),r(1,a.NotNull),r(2,a.NotNull)],c,"getCachedContext",null),t.PredictionContext=c;var d=class extends c{constructor(g){super(c.calculateEmptyHashCode()),this.fullContext=g;}get isFullContext(){return this.fullContext}addEmptyContext(){return this}removeEmptyContext(){throw new Error("Cannot remove the empty context from itself.")}getParent(g){throw new Error("index out of bounds")}getReturnState(g){throw new Error("index out of bounds")}findReturnState(g){return -1}get size(){return 0}appendSingleContext(g,v){return v.getChild(this,g)}appendContext(g,v){return g}get isEmpty(){return !0}get hasEmpty(){return !0}equals(g){return this===g}toStrings(g,v,x){return ["[]"]}};e([a.Override],d.prototype,"addEmptyContext",null),e([a.Override],d.prototype,"removeEmptyContext",null),e([a.Override],d.prototype,"getParent",null),e([a.Override],d.prototype,"getReturnState",null),e([a.Override],d.prototype,"findReturnState",null),e([a.Override],d.prototype,"size",null),e([a.Override],d.prototype,"appendSingleContext",null),e([a.Override],d.prototype,"appendContext",null),e([a.Override],d.prototype,"isEmpty",null),e([a.Override],d.prototype,"hasEmpty",null),e([a.Override],d.prototype,"equals",null),e([a.Override],d.prototype,"toStrings",null);var f=class as extends c{constructor(v,x,_){super(_||c.calculateHashCode(v,x)),l(v.length===x.length),l(x.length>1||x[0]!==c.EMPTY_FULL_STATE_KEY,"Should be using PredictionContext.EMPTY instead."),this.parents=v,this.returnStates=x;}getParent(v){return this.parents[v]}getReturnState(v){return this.returnStates[v]}findReturnState(v){return n.Arrays.binarySearch(this.returnStates,v)}get size(){return this.returnStates.length}get isEmpty(){return !1}get hasEmpty(){return this.returnStates[this.returnStates.length-1]===c.EMPTY_FULL_STATE_KEY}addEmptyContext(){if(this.hasEmpty)return this;let v=this.parents.slice(0),x=this.returnStates.slice(0);return v.push(c.EMPTY_FULL),x.push(c.EMPTY_FULL_STATE_KEY),new as(v,x)}removeEmptyContext(){if(!this.hasEmpty)return this;if(this.returnStates.length===2)return new m(this.parents[0],this.returnStates[0]);{let v=this.parents.slice(0,this.parents.length-1),x=this.returnStates.slice(0,this.returnStates.length-1);return new as(v,x)}}appendContext(v,x){return as.appendContextImpl(this,v,new c.IdentityHashMap)}static appendContextImpl(v,x,_){if(x.isEmpty){if(c.isEmptyLocal(x)){if(v.hasEmpty)return c.EMPTY_LOCAL;throw new Error("what to do here?")}return v}if(x.size!==1)throw new Error("Appending a tree suffix is not yet supported.");let E=_.get(v);if(!E){if(v.isEmpty)E=x;else {let b=v.size;v.hasEmpty&&b--;let w=new Array(b),D=new Array(b);for(let N=0;N<b;N++)D[N]=v.getReturnState(N);for(let N=0;N<b;N++)w[N]=as.appendContextImpl(v.getParent(N),x,_);w.length===1?E=new m(w[0],D[0]):(l(w.length>1),E=new as(w,D)),v.hasEmpty&&(E=c.join(E,x));}_.put(v,E);}return E}equals(v){if(this===v)return !0;if(!(v instanceof as)||this.hashCode()!==v.hashCode())return !1;let x=v;return this.equalsImpl(x,new s.Array2DHashSet)}equalsImpl(v,x){let _=[],E=[];for(_.push(this),E.push(v);;){let b=_.pop(),w=E.pop();if(!b||!w)break;let D=new u.PredictionContextCache.IdentityCommutativePredictionContextOperands(b,w);if(!x.add(D))continue;let N=D.x.size;if(N===0){if(!D.x.equals(D.y))return !1;continue}let F=D.y.size;if(N!==F)return !1;for(let U=0;U<N;U++){if(D.x.getReturnState(U)!==D.y.getReturnState(U))return !1;let Z=D.x.getParent(U),re=D.y.getParent(U);if(Z.hashCode()!==re.hashCode())return !1;Z!==re&&(_.push(Z),E.push(re));}}return !0}};e([a.NotNull],f.prototype,"parents",void 0),e([a.NotNull],f.prototype,"returnStates",void 0),e([a.Override],f.prototype,"getParent",null),e([a.Override],f.prototype,"getReturnState",null),e([a.Override],f.prototype,"findReturnState",null),e([a.Override],f.prototype,"size",null),e([a.Override],f.prototype,"isEmpty",null),e([a.Override],f.prototype,"hasEmpty",null),e([a.Override],f.prototype,"addEmptyContext",null),e([a.Override],f.prototype,"removeEmptyContext",null),e([a.Override],f.prototype,"appendContext",null),e([a.Override],f.prototype,"equals",null),f=e([r(0,a.NotNull)],f);var m=class gb extends c{constructor(v,x){super(c.calculateSingleHashCode(v,x)),this.parent=v,this.returnState=x;}getParent(v){return this.parent}getReturnState(v){return this.returnState}findReturnState(v){return this.returnState===v?0:-1}get size(){return 1}get isEmpty(){return !1}get hasEmpty(){return !1}appendContext(v,x){return x.getChild(this.parent.appendContext(v,x),this.returnState)}addEmptyContext(){let v=[this.parent,c.EMPTY_FULL],x=[this.returnState,c.EMPTY_FULL_STATE_KEY];return new f(v,x)}removeEmptyContext(){return this}equals(v){if(v===this)return !0;if(!(v instanceof gb))return !1;let x=v;return this.hashCode()!==x.hashCode()?!1:this.returnState===x.returnState&&this.parent.equals(x.parent)}};e([a.NotNull],m.prototype,"parent",void 0),e([a.Override],m.prototype,"getParent",null),e([a.Override],m.prototype,"getReturnState",null),e([a.Override],m.prototype,"findReturnState",null),e([a.Override],m.prototype,"size",null),e([a.Override],m.prototype,"isEmpty",null),e([a.Override],m.prototype,"hasEmpty",null),e([a.Override],m.prototype,"appendContext",null),e([a.Override],m.prototype,"addEmptyContext",null),e([a.Override],m.prototype,"removeEmptyContext",null),e([a.Override],m.prototype,"equals",null),m=e([r(0,a.NotNull)],m),t.SingletonPredictionContext=m,function(g){g.EMPTY_LOCAL=new d(!1),g.EMPTY_FULL=new d(!0),g.EMPTY_LOCAL_STATE_KEY=-(1<<31>>>0),g.EMPTY_FULL_STATE_KEY=(1<<31>>>0)-1;class v extends i.Array2DHashMap{constructor(){super(x.INSTANCE);}}g.IdentityHashMap=v;class x{IdentityEqualityComparator(){}hashCode(E){return E.hashCode()}equals(E,b){return E===b}}x.INSTANCE=new x,e([a.Override],x.prototype,"hashCode",null),e([a.Override],x.prototype,"equals",null),g.IdentityEqualityComparator=x;}(c=t.PredictionContext||(t.PredictionContext={}));}),ac=te(t=>{var e=t&&t.__decorate||function(v,x,_,E){var b=arguments.length,w=b<3?x:E===null?E=Object.getOwnPropertyDescriptor(x,_):E,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(v,x,_,E);else for(var N=v.length-1;N>=0;N--)(D=v[N])&&(w=(b<3?D(w):b>3?D(x,_,w):D(x,_))||w);return b>3&&w&&Object.defineProperty(x,_,w),w},r=t&&t.__param||function(v,x){return function(_,E){x(_,E,v);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNConfig=void 0;var i=uo(),s=ls(),n=qt(),o=fe(),a=Qr(),u=Vr(),l=ao(),h=ge("assert"),c=2147483648,d=class Fa{constructor(x,_,E){typeof _=="number"?(h((_&16777215)===_),this._state=x,this.altAndOuterContextDepth=_,this._context=E):(this._state=x,this.altAndOuterContextDepth=_.altAndOuterContextDepth,this._context=E);}static create(x,_,E,b=l.SemanticContext.NONE,w){return b!==l.SemanticContext.NONE?w!=null?new g(w,b,x,_,E,!1):new f(b,x,_,E):w!=null?new m(w,x,_,E,!1):new Fa(x,_,E)}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){h(x>=0),x=Math.min(x,127),this.altAndOuterContextDepth=x<<24|(this.altAndOuterContextDepth&-2130706433)>>>0;}get lexerActionExecutor(){}get semanticContext(){return l.SemanticContext.NONE}get hasPassedThroughNonGreedyDecision(){return !1}clone(){return this.transform(this.state,!1)}transform(x,_,E){return E==null?this.transformImpl(x,this._context,this.semanticContext,_,this.lexerActionExecutor):E instanceof u.PredictionContext?this.transformImpl(x,E,this.semanticContext,_,this.lexerActionExecutor):E instanceof l.SemanticContext?this.transformImpl(x,this._context,E,_,this.lexerActionExecutor):this.transformImpl(x,this._context,this.semanticContext,_,E)}transformImpl(x,_,E,b,w){let D=b&&Fa.checkNonGreedyDecision(this,x);return E!==l.SemanticContext.NONE?w!=null||D?new g(w,E,x,this,_,D):new f(E,x,this,_):w!=null||D?new m(w,x,this,_,D):new Fa(x,this,_)}static checkNonGreedyDecision(x,_){return x.hasPassedThroughNonGreedyDecision||_ instanceof s.DecisionState&&_.nonGreedy}appendContext(x,_){if(typeof x=="number"){let E=this.context.appendSingleContext(x,_);return this.transform(this.state,!1,E)}else {let E=this.context.appendContext(x,_);return this.transform(this.state,!1,E)}}contains(x){if(this.state.stateNumber!==x.state.stateNumber||this.alt!==x.alt||!this.semanticContext.equals(x.semanticContext))return !1;let _=[],E=[];for(_.push(this.context),E.push(x.context);;){let b=_.pop(),w=E.pop();if(!b||!w)break;if(b===w)return !0;if(b.size<w.size)return !1;if(w.isEmpty)return b.hasEmpty;for(let D=0;D<w.size;D++){let N=b.findReturnState(w.getReturnState(D));if(N<0)return !1;_.push(b.getParent(N)),E.push(w.getParent(D));}}return !1}get isPrecedenceFilterSuppressed(){return (this.altAndOuterContextDepth&c)!==0}set isPrecedenceFilterSuppressed(x){x?this.altAndOuterContextDepth|=c:this.altAndOuterContextDepth&=~c;}equals(x){return this===x?!0:x instanceof Fa?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&&a.ObjectEqualityComparator.INSTANCE.equals(this.lexerActionExecutor,x.lexerActionExecutor):!1}hashCode(){let x=n.MurmurHash.initialize(7);return x=n.MurmurHash.update(x,this.state.stateNumber),x=n.MurmurHash.update(x,this.alt),x=n.MurmurHash.update(x,this.reachesIntoOuterContext?1:0),x=n.MurmurHash.update(x,this.context),x=n.MurmurHash.update(x,this.semanticContext),x=n.MurmurHash.update(x,this.hasPassedThroughNonGreedyDecision?1:0),x=n.MurmurHash.update(x,this.lexerActionExecutor),x=n.MurmurHash.finish(x,7),x}toDotString(){let x="";x+=`digraph G {
62
62
  `,x+=`rankdir=LR;
63
63
  `;let _=new i.Array2DHashMap(u.PredictionContext.IdentityEqualityComparator.INSTANCE),E=[];function b(w){let D=_.size,N=_.putIfAbsent(w,D);return N!=null?N:(E.push(w),D)}for(E.push(this.context),_.put(this.context,0);;){let w=E.pop();if(!w)break;for(let D=0;D<w.size;D++)x+=" s"+b(w),x+="->",x+="s"+b(w.getParent(D)),x+='[label="'+w.getReturnState(D)+`"];
64
64
  `;}return x+=`}
65
- `,x.toString()}toString(x,_,E){E==null&&(E=_!=null),_==null&&(_=!0);let b="",w;E?w=this.context.toStrings(x,this.state.stateNumber):w=["?"];let D=!0;for(let N of w)D?D=!1:b+=", ",b+="(",b+=this.state,_&&(b+=",",b+=this.alt),this.context&&(b+=",",b+=N),this.semanticContext!==l.SemanticContext.NONE&&(b+=",",b+=this.semanticContext),this.reachesIntoOuterContext&&(b+=",up="+this.outerContextDepth),b+=")";return b.toString()}};e([o.NotNull],d.prototype,"_state",void 0),e([o.NotNull],d.prototype,"_context",void 0),e([o.NotNull],d.prototype,"state",null),e([o.NotNull,r(0,o.NotNull)],d.prototype,"context",null),e([o.NotNull],d.prototype,"semanticContext",null),e([o.Override],d.prototype,"clone",null),e([r(0,o.NotNull),r(2,o.NotNull)],d.prototype,"transformImpl",null),e([o.Override],d.prototype,"equals",null),e([o.Override],d.prototype,"hashCode",null),e([r(0,o.NotNull),r(3,o.NotNull)],d,"create",null),d=e([r(0,o.NotNull),r(2,o.NotNull)],d),t.ATNConfig=d;var f=class extends d{constructor(x,_,E,b){typeof E=="number"?super(_,E,b):super(_,E,b),this._semanticContext=x;}get semanticContext(){return this._semanticContext}};e([o.NotNull],f.prototype,"_semanticContext",void 0),e([o.Override],f.prototype,"semanticContext",null),f=e([r(1,o.NotNull),r(2,o.NotNull)],f);var m=class extends d{constructor(x,_,E,b,w){if(typeof E=="number")super(_,E,b);else if(super(_,E,b),E.semanticContext!==l.SemanticContext.NONE)throw new Error("Not supported");this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=w;}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};e([o.Override],m.prototype,"lexerActionExecutor",null),e([o.Override],m.prototype,"hasPassedThroughNonGreedyDecision",null),m=e([r(1,o.NotNull),r(2,o.NotNull)],m);var g=class extends f{constructor(x,_,E,b,w,D){typeof b=="number"?super(_,E,b,w):super(_,E,b,w),this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=D;}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};e([o.Override],g.prototype,"lexerActionExecutor",null),e([o.Override],g.prototype,"hasPassedThroughNonGreedyDecision",null),g=e([r(1,o.NotNull),r(2,o.NotNull)],g);}),an=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitSet=void 0;var e=ge("util"),r=qt(),i=new Uint16Array(0);function s(d){return d>>>4}function n(d){return d*16}function o(d){let f=1;for(let m=0;m<16;m++){if(d&f)return m;f=f<<1>>>0;}throw new RangeError("No specified bit found")}function a(d){let f=32768;for(let m=15;m>=0;m--){if(d&f)return m;f=f>>>1;}throw new RangeError("No specified bit found")}function u(d,f){return d&=15,f&=15,d===f?1<<d>>>0:65535>>>15-f^65535>>>16-d}var l=new Uint8Array(65536);for(let d=0;d<16;d++){let f=1<<d>>>0,m=0;for(;m<l.length;){m+=f;for(let g=0;g<f;g++)l[m]++,m++;}}var h=class{constructor(d){if(!d)this.data=i;else if(typeof d=="number"){if(d<0)throw new RangeError("nbits cannot be negative");this.data=new Uint16Array(s(d-1)+1);}else if(d instanceof h)this.data=d.data.slice(0);else {let f=-1;for(let m of d)f<m&&(f=m);this.data=new Uint16Array(s(f-1)+1);for(let m of d)this.set(m);}}and(d){let f=this.data,m=d.data,g=Math.min(f.length,m.length),v=-1;for(let x=0;x<g;x++)(f[x]&=m[x])!==0&&(v=x);v===-1&&(this.data=i),v<f.length-1&&(this.data=f.slice(0,v+1));}andNot(d){let f=this.data,m=d.data,g=Math.min(f.length,m.length),v=-1;for(let x=0;x<g;x++)(f[x]&=m[x]^65535)!==0&&(v=x);v===-1&&(this.data=i),v<f.length-1&&(this.data=f.slice(0,v+1));}cardinality(){if(this.isEmpty)return 0;let d=this.data,f=d.length,m=0;for(let g=0;g<f;g++)m+=l[d[g]];return m}clear(d,f){d==null?this.data.fill(0):f==null?this.set(d,!1):this.set(d,f,!1);}flip(d,f){if(f==null&&(f=d),d<0||f<d)throw new RangeError;let m=s(d),g=s(f);if(m===g)this.data[m]^=u(d,f);else {for(this.data[m++]^=u(d,15);m<g;)this.data[m++]^=65535;this.data[m++]^=u(0,f);}}get(d,f){if(f===void 0)return !!(this.data[s(d)]&u(d,d));{let m=new h(f+1);for(let g=d;g<=f;g++)m.set(g,this.get(g));return m}}intersects(d){let f=Math.min(this.length(),d.length());if(f===0)return !1;let m=s(f-1);for(let g=0;g<=m;g++)if(this.data[g]&d.data[g])return !0;return !1}get isEmpty(){return this.length()===0}length(){return this.data.length?this.previousSetBit(n(this.data.length)-1)+1:0}nextClearBit(d){if(d<0)throw new RangeError("fromIndex cannot be negative");let f=this.data,m=f.length,g=s(d);if(g>m)return -1;let v=65535^u(d,15);if((f[g]|v)===65535){for(g++,v=0;g<m&&f[g]===65535;g++);if(g===m)return -1}return n(g)+o((f[g]|v)^65535)}nextSetBit(d){if(d<0)throw new RangeError("fromIndex cannot be negative");let f=this.data,m=f.length,g=s(d);if(g>m)return -1;let v=u(d,15);if(!(f[g]&v)){for(g++,v=65535;g<m&&f[g]===0;g++);if(g>=m)return -1}return n(g)+o(f[g]&v)}or(d){let f=this.data,m=d.data,g=Math.min(f.length,m.length),v=Math.max(f.length,m.length),x=f.length===v?f:new Uint16Array(v),_=-1;for(let b=0;b<g;b++)(x[b]=f[b]|m[b])!==0&&(_=b);let E=f.length>m.length?f:m;for(let b=g;b<v;b++)(x[b]=E[b])!==0&&(_=b);_===-1?this.data=i:x.length===_+1?this.data=x:this.data=x.slice(0,_);}previousClearBit(d){if(d<0)throw new RangeError("fromIndex cannot be negative");let f=this.data,m=f.length,g=s(d);g>=m&&(g=m-1);let v=65535^u(0,d);if((f[g]|v)===65535){for(v=0,g--;g>=0&&f[g]===65535;g--);if(g<0)return -1}return n(g)+a((f[g]|v)^65535)}previousSetBit(d){if(d<0)throw new RangeError("fromIndex cannot be negative");let f=this.data,m=f.length,g=s(d);g>=m&&(g=m-1);let v=u(0,d);if(!(f[g]&v)){for(g--,v=65535;g>=0&&f[g]===0;g--);if(g<0)return -1}return n(g)+a(f[g]&v)}set(d,f,m){if(f===void 0?(f=d,m=!0):typeof f=="boolean"&&(m=f,f=d),m===void 0&&(m=!0),d<0||d>f)throw new RangeError;let g=s(d),v=s(f);if(m&&v>=this.data.length){let x=new Uint16Array(v+1);this.data.forEach((_,E)=>x[E]=_),this.data=x;}else if(!m){if(g>=this.data.length)return;v>=this.data.length&&(v=this.data.length-1,f=this.data.length*16-1);}if(g===v)this._setBits(g,m,u(d,f));else {for(this._setBits(g++,m,u(d,15));g<v;)this.data[g++]=m?65535:0;this._setBits(g,m,u(0,f));}}_setBits(d,f,m){f?this.data[d]|=m:this.data[d]&=65535^m;}get size(){return this.data.byteLength*8}hashCode(){return r.MurmurHash.hashCode(this.data,22)}equals(d){if(d===this)return !0;if(!(d instanceof h))return !1;let f=this.length();if(f!==d.length())return !1;if(f===0)return !0;let m=s(f-1);for(let g=0;g<=m;g++)if(this.data[g]!==d.data[g])return !1;return !0}toString(){let d="{",f=!0;for(let m=this.nextSetBit(0);m>=0;m=this.nextSetBit(m+1))f?f=!1:d+=", ",d+=m;return d+="}",d}xor(d){let f=this.data,m=d.data,g=Math.min(f.length,m.length),v=Math.max(f.length,m.length),x=f.length===v?f:new Uint16Array(v),_=-1;for(let b=0;b<g;b++)(x[b]=f[b]^m[b])!==0&&(_=b);let E=f.length>m.length?f:m;for(let b=g;b<v;b++)(x[b]=E[b])!==0&&(_=b);_===-1?this.data=i:x.length===_+1?this.data=x:this.data=x.slice(0,_+1);}clone(){return new h(this)}[Symbol.iterator](){return new c(this.data)}[e.inspect.custom](){return "BitSet "+this.toString()}};t.BitSet=h;var c=class{constructor(d){this.data=d,this.index=0,this.mask=65535;}next(){for(;this.index<this.data.length;){let d=this.data[this.index]&this.mask;if(d!==0){let f=n(this.index)+o(d);return this.mask=u(f+1,15),{done:!1,value:f}}this.index++,this.mask=65535;}return {done:!0,value:-1}}[Symbol.iterator](){return this}};}),Ba=re(t=>{var e=t&&t.__decorate||function(_,E,b,w){var D=arguments.length,N=D<3?E:w===null?w=Object.getOwnPropertyDescriptor(E,b):w,F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(_,E,b,w);else for(var V=_.length-1;V>=0;V--)(F=_[V])&&(N=(D<3?F(N):D>3?F(E,b,N):F(E,b))||N);return D>3&&N&&Object.defineProperty(E,b,N),N};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNConfigSet=void 0;var r=uo(),i=on(),s=nc(),n=ti(),o=ac(),a=an(),u=fe(),l=Qr(),h=Vr(),c=wp(),d=ao(),f=ge("assert"),m=ei(),g=class{hashCode(_){return _.state^_.alt}equals(_,E){return _.state===E.state&&_.alt===E.alt}};g.INSTANCE=new g;function v(_){return _?new r.Array2DHashMap(_):new r.Array2DHashMap(g.INSTANCE)}var x=class{constructor(_,E){this._uniqueAlt=0,this._hasSemanticContext=!1,this._dipsIntoOuterContext=!1,this.outermostConfigSet=!1,this.cachedHashCode=-1,_?(E?(this.mergedConfigs=void 0,this.unmerged=void 0):_.isReadOnly?(this.mergedConfigs=v(),this.unmerged=[]):(this.mergedConfigs=v(_.mergedConfigs),this.unmerged=_.unmerged.slice(0)),this.configs=_.configs.slice(0),this._dipsIntoOuterContext=_._dipsIntoOuterContext,this._hasSemanticContext=_._hasSemanticContext,this.outermostConfigSet=_.outermostConfigSet,(E||!_.isReadOnly)&&(this._uniqueAlt=_._uniqueAlt,this._conflictInfo=_._conflictInfo)):(this.mergedConfigs=v(),this.unmerged=[],this.configs=[],this._uniqueAlt=n.ATN.INVALID_ALT_NUMBER);}getRepresentedAlternatives(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts.clone();let _=new a.BitSet;for(let E of this)_.set(E.alt);return _}get isReadOnly(){return this.mergedConfigs==null}get isOutermostConfigSet(){return this.outermostConfigSet}set isOutermostConfigSet(_){if(this.outermostConfigSet&&!_)throw new Error("IllegalStateException");f(!_||!this._dipsIntoOuterContext),this.outermostConfigSet=_;}getStates(){let _=new i.Array2DHashSet(l.ObjectEqualityComparator.INSTANCE);for(let E of this.configs)_.add(E.state);return _}optimizeConfigs(_){if(this.configs.length!==0)for(let E of this.configs)E.context=_.atn.getCachedContext(E.context);}clone(_){let E=new x(this,_);return !_&&this.isReadOnly&&E.addAll(this.configs),E}get size(){return this.configs.length}get isEmpty(){return this.configs.length===0}contains(_){if(!(_ instanceof o.ATNConfig))return !1;if(this.mergedConfigs&&this.unmerged){let E=_,b=this.getKey(E),w=this.mergedConfigs.get(b);if(w!=null&&this.canMerge(E,b,w))return w.contains(E);for(let D of this.unmerged)if(D.contains(_))return !0}else for(let E of this.configs)if(E.contains(_))return !0;return !1}*[Symbol.iterator](){yield*this.configs;}toArray(){return this.configs}add(_,E){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");f(!this.outermostConfigSet||!_.reachesIntoOuterContext),E==null&&(E=c.PredictionContextCache.UNCACHED);let b,w=this.getKey(_),D=this.mergedConfigs.get(w);if(b=D==null,D!=null&&this.canMerge(_,w,D)){D.outerContextDepth=Math.max(D.outerContextDepth,_.outerContextDepth),_.isPrecedenceFilterSuppressed&&(D.isPrecedenceFilterSuppressed=!0);let N=h.PredictionContext.join(D.context,_.context,E);return this.updatePropertiesForMergedConfig(_),D.context===N?!1:(D.context=N,!0)}for(let N=0;N<this.unmerged.length;N++){let F=this.unmerged[N];if(this.canMerge(_,w,F)){F.outerContextDepth=Math.max(F.outerContextDepth,_.outerContextDepth),_.isPrecedenceFilterSuppressed&&(F.isPrecedenceFilterSuppressed=!0);let V=h.PredictionContext.join(F.context,_.context,E);return this.updatePropertiesForMergedConfig(_),F.context===V?!1:(F.context=V,b&&(this.mergedConfigs.put(w,F),this.unmerged.splice(N,1)),!0)}}return this.configs.push(_),b?this.mergedConfigs.put(w,_):this.unmerged.push(_),this.updatePropertiesForAddedConfig(_),!0}updatePropertiesForMergedConfig(_){this._dipsIntoOuterContext=this._dipsIntoOuterContext||_.reachesIntoOuterContext,f(!this.outermostConfigSet||!this._dipsIntoOuterContext);}updatePropertiesForAddedConfig(_){this.configs.length===1?this._uniqueAlt=_.alt:this._uniqueAlt!==_.alt&&(this._uniqueAlt=n.ATN.INVALID_ALT_NUMBER),this._hasSemanticContext=this._hasSemanticContext||!d.SemanticContext.NONE.equals(_.semanticContext),this._dipsIntoOuterContext=this._dipsIntoOuterContext||_.reachesIntoOuterContext,f(!this.outermostConfigSet||!this._dipsIntoOuterContext);}canMerge(_,E,b){return _.state.stateNumber!==b.state.stateNumber||E.alt!==b.alt?!1:_.semanticContext.equals(b.semanticContext)}getKey(_){return {state:_.state.stateNumber,alt:_.alt}}containsAll(_){for(let E of _)if(!(E instanceof o.ATNConfig)||!this.contains(E))return !1;return !0}addAll(_,E){this.ensureWritable();let b=!1;for(let w of _)this.add(w,E)&&(b=!0);return b}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=n.ATN.INVALID_ALT_NUMBER,this._conflictInfo=void 0;}equals(_){return this===_?!0:_ instanceof x?this.outermostConfigSet===_.outermostConfigSet&&m.equals(this._conflictInfo,_._conflictInfo)&&s.ArrayEqualityComparator.INSTANCE.equals(this.configs,_.configs):!1}hashCode(){if(this.isReadOnly&&this.cachedHashCode!==-1)return this.cachedHashCode;let _=1;return _=5*_^(this.outermostConfigSet?1:0),_=5*_^s.ArrayEqualityComparator.INSTANCE.hashCode(this.configs),this.isReadOnly&&(this.cachedHashCode=_),_}toString(_){_==null&&(_=!1);let E="",b=this.configs.slice(0);b.sort((w,D)=>w.alt!==D.alt?w.alt-D.alt:w.state.stateNumber!==D.state.stateNumber?w.state.stateNumber-D.state.stateNumber:w.semanticContext.toString().localeCompare(D.semanticContext.toString())),E+="[";for(let w=0;w<b.length;w++)w>0&&(E+=", "),E+=b[w].toString(void 0,!0,_);return E+="]",this._hasSemanticContext&&(E+=",hasSemanticContext="+this._hasSemanticContext),this._uniqueAlt!==n.ATN.INVALID_ALT_NUMBER&&(E+=",uniqueAlt="+this._uniqueAlt),this._conflictInfo!=null&&(E+=",conflictingAlts="+this._conflictInfo.conflictedAlts,this._conflictInfo.isExact||(E+="*")),this._dipsIntoOuterContext&&(E+=",dipsIntoOuterContext"),E.toString()}get uniqueAlt(){return this._uniqueAlt}get hasSemanticContext(){return this._hasSemanticContext}set hasSemanticContext(_){this.ensureWritable(),this._hasSemanticContext=_;}get conflictInfo(){return this._conflictInfo}set conflictInfo(_){this.ensureWritable(),this._conflictInfo=_;}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(_){return this.configs[_]}ensureWritable(){if(this.isReadOnly)throw new Error("This ATNConfigSet is read only.")}};e([u.NotNull],x.prototype,"getRepresentedAlternatives",null),e([u.Override],x.prototype,"size",null),e([u.Override],x.prototype,"isEmpty",null),e([u.Override],x.prototype,"contains",null),e([u.Override],x.prototype,Symbol.iterator,null),e([u.Override],x.prototype,"toArray",null),e([u.Override],x.prototype,"containsAll",null),e([u.Override],x.prototype,"clear",null),e([u.Override],x.prototype,"equals",null),e([u.Override],x.prototype,"hashCode",null),t.ATNConfigSet=x;}),uc=re(t=>{var e=t&&t.__decorate||function(h,c,d,f){var m=arguments.length,g=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,d):f,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(h,c,d,f);else for(var x=h.length-1;x>=0;x--)(v=h[x])&&(g=(m<3?v(g):m>3?v(c,d,g):v(c,d))||g);return m>3&&g&&Object.defineProperty(c,d,g),g},r=t&&t.__param||function(h,c){return function(d,f){c(d,f,h);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DFAState=void 0;var i=ti(),s=an(),n=qt(),o=fe(),a=Vr(),u=ge("assert"),l=class{constructor(h){this.stateNumber=-1,this.configs=h,this.edges=new Map,this.contextEdges=new Map;}get isContextSensitive(){return !!this.contextSymbols}isContextSymbol(h){return this.isContextSensitive?this.contextSymbols.get(h):!1}setContextSymbol(h){u(this.isContextSensitive),this.contextSymbols.set(h);}setContextSensitive(h){u(!this.configs.isOutermostConfigSet),!this.isContextSensitive&&(this.contextSymbols||(this.contextSymbols=new s.BitSet));}get acceptStateInfo(){return this._acceptStateInfo}set acceptStateInfo(h){this._acceptStateInfo=h;}get isAcceptState(){return !!this._acceptStateInfo}get prediction(){return this._acceptStateInfo?this._acceptStateInfo.prediction:i.ATN.INVALID_ALT_NUMBER}get lexerActionExecutor(){if(this._acceptStateInfo)return this._acceptStateInfo.lexerActionExecutor}getTarget(h){return this.edges.get(h)}setTarget(h,c){this.edges.set(h,c);}getEdgeMap(){return this.edges}getContextTarget(h){return h===a.PredictionContext.EMPTY_FULL_STATE_KEY&&(h=-1),this.contextEdges.get(h)}setContextTarget(h,c){if(!this.isContextSensitive)throw new Error("The state is not context sensitive.");h===a.PredictionContext.EMPTY_FULL_STATE_KEY&&(h=-1),this.contextEdges.set(h,c);}getContextEdgeMap(){let h=new Map(this.contextEdges),c=h.get(-1);if(c!==void 0)if(h.size===1){let d=new Map;return d.set(a.PredictionContext.EMPTY_FULL_STATE_KEY,c),d}else h.delete(-1),h.set(a.PredictionContext.EMPTY_FULL_STATE_KEY,c);return h}hashCode(){let h=n.MurmurHash.initialize(7);return h=n.MurmurHash.update(h,this.configs.hashCode()),h=n.MurmurHash.finish(h,1),h}equals(h){if(this===h)return !0;if(!(h instanceof l))return !1;let c=h;return this.configs.equals(c.configs)}toString(){let h="";return h+=this.stateNumber+":"+this.configs,this.isAcceptState&&(h+="=>",this.predicates?h+=this.predicates:h+=this.prediction),h.toString()}};e([o.NotNull],l.prototype,"configs",void 0),e([o.NotNull],l.prototype,"edges",void 0),e([o.NotNull],l.prototype,"contextEdges",void 0),e([o.Override],l.prototype,"hashCode",null),e([o.Override],l.prototype,"equals",null),e([o.Override],l.prototype,"toString",null),t.DFAState=l,function(h){let c=class{constructor(f,m){this.alt=m,this.pred=f;}toString(){return "("+this.pred+", "+this.alt+")"}};e([o.NotNull],c.prototype,"pred",void 0),e([o.Override],c.prototype,"toString",null),c=e([r(0,o.NotNull)],c),h.PredPrediction=c;}(l=t.DFAState||(t.DFAState={}));}),lc=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNSimulator=void 0;var i=Ba(),s=uc(),n=fe(),o=Vr(),a=class La{constructor(l){this.atn=l;}static get ERROR(){return La._ERROR||(La._ERROR=new s.DFAState(new i.ATNConfigSet),La._ERROR.stateNumber=o.PredictionContext.EMPTY_FULL_STATE_KEY),La._ERROR}clearDFA(){this.atn.clearDFA();}};e([n.NotNull],a.prototype,"atn",void 0),e([n.NotNull],a,"ERROR",null),a=e([r(0,n.NotNull)],a),t.ATNSimulator=a,a=t.ATNSimulator||(t.ATNSimulator={}),t.ATNSimulator=a;}),_b=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleErrorListener=void 0;var e=class{syntaxError(r,i,s,n,o,a){console.error(`line ${s}:${n} ${o}`);}};t.ConsoleErrorListener=e,e.INSTANCE=new e;}),Dp=re(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h},r=t&&t.__param||function(n,o){return function(a,u){o(a,u,n);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyErrorListener=void 0;var i=fe(),s=class{constructor(n){if(this.delegates=n,!n)throw new Error("Invalid delegates")}getDelegates(){return this.delegates}syntaxError(n,o,a,u,l,h){this.delegates.forEach(c=>{c.syntaxError&&c.syntaxError(n,o,a,u,l,h);});}};e([i.Override,r(0,i.NotNull),r(4,i.NotNull)],s.prototype,"syntaxError",null),t.ProxyErrorListener=s;}),ja=re(t=>{var e=t&&t.__decorate||function(l,h,c,d){var f=arguments.length,m=f<3?h:d===null?d=Object.getOwnPropertyDescriptor(h,c):d,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(l,h,c,d);else for(var v=l.length-1;v>=0;v--)(g=l[v])&&(m=(f<3?g(m):f>3?g(h,c,m):g(h,c))||m);return f>3&&m&&Object.defineProperty(h,c,m),m},r=t&&t.__param||function(l,h){return function(c,d){h(c,d,l);}};Object.defineProperty(t,"__esModule",{value:!0}),t.Recognizer=void 0;var i=_b(),s=Dp(),n=fe(),o=At(),a=ei(),u=class{constructor(){this._listeners=[i.ConsoleErrorListener.INSTANCE],this._stateNumber=-1;}getTokenTypeMap(){let l=this.vocabulary,h=u.tokenTypeMapCache.get(l);if(h==null){let c=new Map;for(let d=0;d<=this.atn.maxTokenType;d++){let f=l.getLiteralName(d);f!=null&&c.set(f,d);let m=l.getSymbolicName(d);m!=null&&c.set(m,d);}c.set("EOF",o.Token.EOF),h=c,u.tokenTypeMapCache.set(l,h);}return h}getRuleIndexMap(){let l=this.ruleNames;if(l==null)throw new Error("The current recognizer does not provide a list of rule names.");let h=u.ruleIndexMapCache.get(l);return h==null&&(h=a.toMap(l),u.ruleIndexMapCache.set(l,h)),h}getTokenType(l){let h=this.getTokenTypeMap().get(l);return h!=null?h:o.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(l){this._interp=l;}get parseInfo(){return Promise.resolve(void 0)}getErrorHeader(l){let h=l.getOffendingToken();if(!h)return "";let c=h.line,d=h.charPositionInLine;return "line "+c+":"+d}addErrorListener(l){if(!l)throw new TypeError("listener must not be null");this._listeners.push(l);}removeErrorListener(l){let h=this._listeners.indexOf(l);h!==-1&&this._listeners.splice(h,1);}removeErrorListeners(){this._listeners.length=0;}getErrorListeners(){return this._listeners.slice(0)}getErrorListenerDispatch(){return new s.ProxyErrorListener(this.getErrorListeners())}sempred(l,h,c){return !0}precpred(l,h){return !0}action(l,h,c){}get state(){return this._stateNumber}set state(l){this._stateNumber=l;}};u.EOF=-1,u.tokenTypeMapCache=new WeakMap,u.ruleIndexMapCache=new WeakMap,e([n.SuppressWarnings("serial"),n.NotNull],u.prototype,"_listeners",void 0),e([n.NotNull],u.prototype,"getTokenTypeMap",null),e([n.NotNull],u.prototype,"getRuleIndexMap",null),e([n.NotNull],u.prototype,"serializedATN",null),e([n.NotNull],u.prototype,"atn",null),e([n.NotNull,r(0,n.NotNull)],u.prototype,"interpreter",null),e([n.NotNull,r(0,n.NotNull)],u.prototype,"getErrorHeader",null),e([r(0,n.NotNull)],u.prototype,"addErrorListener",null),e([r(0,n.NotNull)],u.prototype,"removeErrorListener",null),e([n.NotNull],u.prototype,"getErrorListeners",null),t.Recognizer=u;}),un=re(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.VocabularyImpl=void 0;var r=fe(),i=At(),s=class{constructor(n,o,a){this.literalNames=n,this.symbolicNames=o,this.displayNames=a,this._maxTokenType=Math.max(this.displayNames.length,Math.max(this.literalNames.length,this.symbolicNames.length))-1;}get maxTokenType(){return this._maxTokenType}getLiteralName(n){if(n>=0&&n<this.literalNames.length)return this.literalNames[n]}getSymbolicName(n){if(n>=0&&n<this.symbolicNames.length)return this.symbolicNames[n];if(n===i.Token.EOF)return "EOF"}getDisplayName(n){if(n>=0&&n<this.displayNames.length){let u=this.displayNames[n];if(u)return u}let o=this.getLiteralName(n);if(o)return o;let a=this.getSymbolicName(n);return a||String(n)}};s.EMPTY_VOCABULARY=new s([],[],[]),e([r.NotNull],s.prototype,"literalNames",void 0),e([r.NotNull],s.prototype,"symbolicNames",void 0),e([r.NotNull],s.prototype,"displayNames",void 0),e([r.Override],s.prototype,"maxTokenType",null),e([r.Override],s.prototype,"getLiteralName",null),e([r.Override],s.prototype,"getSymbolicName",null),e([r.Override,r.NotNull],s.prototype,"getDisplayName",null),e([r.NotNull],s,"EMPTY_VOCABULARY",void 0),t.VocabularyImpl=s;}),yb=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.DFASerializer=void 0;var r=lc(),i=fe(),s=Vr(),n=ja(),o=un(),a=class{constructor(u,l,h,c){l instanceof n.Recognizer?(h=l.ruleNames,c=l.atn,l=l.vocabulary):l||(l=o.VocabularyImpl.EMPTY_VOCABULARY),this.dfa=u,this.vocabulary=l,this.ruleNames=h,this.atn=c;}toString(){if(!this.dfa.s0)return "";let u="";if(this.dfa.states){let h=new Array(...this.dfa.states.toArray());h.sort((c,d)=>c.stateNumber-d.stateNumber);for(let c of h){let d=c.getEdgeMap(),f=[...d.keys()].sort((v,x)=>v-x),m=c.getContextEdgeMap(),g=[...m.keys()].sort((v,x)=>v-x);for(let v of f){let x=d.get(v);if((x==null||x===r.ATNSimulator.ERROR)&&!c.isContextSymbol(v))continue;let _=!1;u+=this.getStateString(c)+"-"+this.getEdgeLabel(v)+"->",c.isContextSymbol(v)&&(u+="!",_=!0);let E=x;E&&E.stateNumber!==r.ATNSimulator.ERROR.stateNumber?u+=this.getStateString(E)+`
65
+ `,x.toString()}toString(x,_,E){E==null&&(E=_!=null),_==null&&(_=!0);let b="",w;E?w=this.context.toStrings(x,this.state.stateNumber):w=["?"];let D=!0;for(let N of w)D?D=!1:b+=", ",b+="(",b+=this.state,_&&(b+=",",b+=this.alt),this.context&&(b+=",",b+=N),this.semanticContext!==l.SemanticContext.NONE&&(b+=",",b+=this.semanticContext),this.reachesIntoOuterContext&&(b+=",up="+this.outerContextDepth),b+=")";return b.toString()}};e([o.NotNull],d.prototype,"_state",void 0),e([o.NotNull],d.prototype,"_context",void 0),e([o.NotNull],d.prototype,"state",null),e([o.NotNull,r(0,o.NotNull)],d.prototype,"context",null),e([o.NotNull],d.prototype,"semanticContext",null),e([o.Override],d.prototype,"clone",null),e([r(0,o.NotNull),r(2,o.NotNull)],d.prototype,"transformImpl",null),e([o.Override],d.prototype,"equals",null),e([o.Override],d.prototype,"hashCode",null),e([r(0,o.NotNull),r(3,o.NotNull)],d,"create",null),d=e([r(0,o.NotNull),r(2,o.NotNull)],d),t.ATNConfig=d;var f=class extends d{constructor(x,_,E,b){typeof E=="number"?super(_,E,b):super(_,E,b),this._semanticContext=x;}get semanticContext(){return this._semanticContext}};e([o.NotNull],f.prototype,"_semanticContext",void 0),e([o.Override],f.prototype,"semanticContext",null),f=e([r(1,o.NotNull),r(2,o.NotNull)],f);var m=class extends d{constructor(x,_,E,b,w){if(typeof E=="number")super(_,E,b);else if(super(_,E,b),E.semanticContext!==l.SemanticContext.NONE)throw new Error("Not supported");this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=w;}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};e([o.Override],m.prototype,"lexerActionExecutor",null),e([o.Override],m.prototype,"hasPassedThroughNonGreedyDecision",null),m=e([r(1,o.NotNull),r(2,o.NotNull)],m);var g=class extends f{constructor(x,_,E,b,w,D){typeof b=="number"?super(_,E,b,w):super(_,E,b,w),this._lexerActionExecutor=x,this.passedThroughNonGreedyDecision=D;}get lexerActionExecutor(){return this._lexerActionExecutor}get hasPassedThroughNonGreedyDecision(){return this.passedThroughNonGreedyDecision}};e([o.Override],g.prototype,"lexerActionExecutor",null),e([o.Override],g.prototype,"hasPassedThroughNonGreedyDecision",null),g=e([r(1,o.NotNull),r(2,o.NotNull)],g);}),an=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BitSet=void 0;var e=ge("util"),r=qt(),i=new Uint16Array(0);function s(d){return d>>>4}function n(d){return d*16}function o(d){let f=1;for(let m=0;m<16;m++){if(d&f)return m;f=f<<1>>>0;}throw new RangeError("No specified bit found")}function a(d){let f=32768;for(let m=15;m>=0;m--){if(d&f)return m;f=f>>>1;}throw new RangeError("No specified bit found")}function u(d,f){return d&=15,f&=15,d===f?1<<d>>>0:65535>>>15-f^65535>>>16-d}var l=new Uint8Array(65536);for(let d=0;d<16;d++){let f=1<<d>>>0,m=0;for(;m<l.length;){m+=f;for(let g=0;g<f;g++)l[m]++,m++;}}var h=class{constructor(d){if(!d)this.data=i;else if(typeof d=="number"){if(d<0)throw new RangeError("nbits cannot be negative");this.data=new Uint16Array(s(d-1)+1);}else if(d instanceof h)this.data=d.data.slice(0);else {let f=-1;for(let m of d)f<m&&(f=m);this.data=new Uint16Array(s(f-1)+1);for(let m of d)this.set(m);}}and(d){let f=this.data,m=d.data,g=Math.min(f.length,m.length),v=-1;for(let x=0;x<g;x++)(f[x]&=m[x])!==0&&(v=x);v===-1&&(this.data=i),v<f.length-1&&(this.data=f.slice(0,v+1));}andNot(d){let f=this.data,m=d.data,g=Math.min(f.length,m.length),v=-1;for(let x=0;x<g;x++)(f[x]&=m[x]^65535)!==0&&(v=x);v===-1&&(this.data=i),v<f.length-1&&(this.data=f.slice(0,v+1));}cardinality(){if(this.isEmpty)return 0;let d=this.data,f=d.length,m=0;for(let g=0;g<f;g++)m+=l[d[g]];return m}clear(d,f){d==null?this.data.fill(0):f==null?this.set(d,!1):this.set(d,f,!1);}flip(d,f){if(f==null&&(f=d),d<0||f<d)throw new RangeError;let m=s(d),g=s(f);if(m===g)this.data[m]^=u(d,f);else {for(this.data[m++]^=u(d,15);m<g;)this.data[m++]^=65535;this.data[m++]^=u(0,f);}}get(d,f){if(f===void 0)return !!(this.data[s(d)]&u(d,d));{let m=new h(f+1);for(let g=d;g<=f;g++)m.set(g,this.get(g));return m}}intersects(d){let f=Math.min(this.length(),d.length());if(f===0)return !1;let m=s(f-1);for(let g=0;g<=m;g++)if(this.data[g]&d.data[g])return !0;return !1}get isEmpty(){return this.length()===0}length(){return this.data.length?this.previousSetBit(n(this.data.length)-1)+1:0}nextClearBit(d){if(d<0)throw new RangeError("fromIndex cannot be negative");let f=this.data,m=f.length,g=s(d);if(g>m)return -1;let v=65535^u(d,15);if((f[g]|v)===65535){for(g++,v=0;g<m&&f[g]===65535;g++);if(g===m)return -1}return n(g)+o((f[g]|v)^65535)}nextSetBit(d){if(d<0)throw new RangeError("fromIndex cannot be negative");let f=this.data,m=f.length,g=s(d);if(g>m)return -1;let v=u(d,15);if(!(f[g]&v)){for(g++,v=65535;g<m&&f[g]===0;g++);if(g>=m)return -1}return n(g)+o(f[g]&v)}or(d){let f=this.data,m=d.data,g=Math.min(f.length,m.length),v=Math.max(f.length,m.length),x=f.length===v?f:new Uint16Array(v),_=-1;for(let b=0;b<g;b++)(x[b]=f[b]|m[b])!==0&&(_=b);let E=f.length>m.length?f:m;for(let b=g;b<v;b++)(x[b]=E[b])!==0&&(_=b);_===-1?this.data=i:x.length===_+1?this.data=x:this.data=x.slice(0,_);}previousClearBit(d){if(d<0)throw new RangeError("fromIndex cannot be negative");let f=this.data,m=f.length,g=s(d);g>=m&&(g=m-1);let v=65535^u(0,d);if((f[g]|v)===65535){for(v=0,g--;g>=0&&f[g]===65535;g--);if(g<0)return -1}return n(g)+a((f[g]|v)^65535)}previousSetBit(d){if(d<0)throw new RangeError("fromIndex cannot be negative");let f=this.data,m=f.length,g=s(d);g>=m&&(g=m-1);let v=u(0,d);if(!(f[g]&v)){for(g--,v=65535;g>=0&&f[g]===0;g--);if(g<0)return -1}return n(g)+a(f[g]&v)}set(d,f,m){if(f===void 0?(f=d,m=!0):typeof f=="boolean"&&(m=f,f=d),m===void 0&&(m=!0),d<0||d>f)throw new RangeError;let g=s(d),v=s(f);if(m&&v>=this.data.length){let x=new Uint16Array(v+1);this.data.forEach((_,E)=>x[E]=_),this.data=x;}else if(!m){if(g>=this.data.length)return;v>=this.data.length&&(v=this.data.length-1,f=this.data.length*16-1);}if(g===v)this._setBits(g,m,u(d,f));else {for(this._setBits(g++,m,u(d,15));g<v;)this.data[g++]=m?65535:0;this._setBits(g,m,u(0,f));}}_setBits(d,f,m){f?this.data[d]|=m:this.data[d]&=65535^m;}get size(){return this.data.byteLength*8}hashCode(){return r.MurmurHash.hashCode(this.data,22)}equals(d){if(d===this)return !0;if(!(d instanceof h))return !1;let f=this.length();if(f!==d.length())return !1;if(f===0)return !0;let m=s(f-1);for(let g=0;g<=m;g++)if(this.data[g]!==d.data[g])return !1;return !0}toString(){let d="{",f=!0;for(let m=this.nextSetBit(0);m>=0;m=this.nextSetBit(m+1))f?f=!1:d+=", ",d+=m;return d+="}",d}xor(d){let f=this.data,m=d.data,g=Math.min(f.length,m.length),v=Math.max(f.length,m.length),x=f.length===v?f:new Uint16Array(v),_=-1;for(let b=0;b<g;b++)(x[b]=f[b]^m[b])!==0&&(_=b);let E=f.length>m.length?f:m;for(let b=g;b<v;b++)(x[b]=E[b])!==0&&(_=b);_===-1?this.data=i:x.length===_+1?this.data=x:this.data=x.slice(0,_+1);}clone(){return new h(this)}[Symbol.iterator](){return new c(this.data)}[e.inspect.custom](){return "BitSet "+this.toString()}};t.BitSet=h;var c=class{constructor(d){this.data=d,this.index=0,this.mask=65535;}next(){for(;this.index<this.data.length;){let d=this.data[this.index]&this.mask;if(d!==0){let f=n(this.index)+o(d);return this.mask=u(f+1,15),{done:!1,value:f}}this.index++,this.mask=65535;}return {done:!0,value:-1}}[Symbol.iterator](){return this}};}),Ba=te(t=>{var e=t&&t.__decorate||function(_,E,b,w){var D=arguments.length,N=D<3?E:w===null?w=Object.getOwnPropertyDescriptor(E,b):w,F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(_,E,b,w);else for(var U=_.length-1;U>=0;U--)(F=_[U])&&(N=(D<3?F(N):D>3?F(E,b,N):F(E,b))||N);return D>3&&N&&Object.defineProperty(E,b,N),N};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNConfigSet=void 0;var r=uo(),i=on(),s=nc(),n=ti(),o=ac(),a=an(),u=fe(),l=Qr(),h=Vr(),c=wp(),d=ao(),f=ge("assert"),m=ei(),g=class{hashCode(_){return _.state^_.alt}equals(_,E){return _.state===E.state&&_.alt===E.alt}};g.INSTANCE=new g;function v(_){return _?new r.Array2DHashMap(_):new r.Array2DHashMap(g.INSTANCE)}var x=class{constructor(_,E){this._uniqueAlt=0,this._hasSemanticContext=!1,this._dipsIntoOuterContext=!1,this.outermostConfigSet=!1,this.cachedHashCode=-1,_?(E?(this.mergedConfigs=void 0,this.unmerged=void 0):_.isReadOnly?(this.mergedConfigs=v(),this.unmerged=[]):(this.mergedConfigs=v(_.mergedConfigs),this.unmerged=_.unmerged.slice(0)),this.configs=_.configs.slice(0),this._dipsIntoOuterContext=_._dipsIntoOuterContext,this._hasSemanticContext=_._hasSemanticContext,this.outermostConfigSet=_.outermostConfigSet,(E||!_.isReadOnly)&&(this._uniqueAlt=_._uniqueAlt,this._conflictInfo=_._conflictInfo)):(this.mergedConfigs=v(),this.unmerged=[],this.configs=[],this._uniqueAlt=n.ATN.INVALID_ALT_NUMBER);}getRepresentedAlternatives(){if(this._conflictInfo!=null)return this._conflictInfo.conflictedAlts.clone();let _=new a.BitSet;for(let E of this)_.set(E.alt);return _}get isReadOnly(){return this.mergedConfigs==null}get isOutermostConfigSet(){return this.outermostConfigSet}set isOutermostConfigSet(_){if(this.outermostConfigSet&&!_)throw new Error("IllegalStateException");f(!_||!this._dipsIntoOuterContext),this.outermostConfigSet=_;}getStates(){let _=new i.Array2DHashSet(l.ObjectEqualityComparator.INSTANCE);for(let E of this.configs)_.add(E.state);return _}optimizeConfigs(_){if(this.configs.length!==0)for(let E of this.configs)E.context=_.atn.getCachedContext(E.context);}clone(_){let E=new x(this,_);return !_&&this.isReadOnly&&E.addAll(this.configs),E}get size(){return this.configs.length}get isEmpty(){return this.configs.length===0}contains(_){if(!(_ instanceof o.ATNConfig))return !1;if(this.mergedConfigs&&this.unmerged){let E=_,b=this.getKey(E),w=this.mergedConfigs.get(b);if(w!=null&&this.canMerge(E,b,w))return w.contains(E);for(let D of this.unmerged)if(D.contains(_))return !0}else for(let E of this.configs)if(E.contains(_))return !0;return !1}*[Symbol.iterator](){yield*this.configs;}toArray(){return this.configs}add(_,E){if(this.ensureWritable(),!this.mergedConfigs||!this.unmerged)throw new Error("Covered by ensureWritable but duplicated here for strict null check limitation");f(!this.outermostConfigSet||!_.reachesIntoOuterContext),E==null&&(E=c.PredictionContextCache.UNCACHED);let b,w=this.getKey(_),D=this.mergedConfigs.get(w);if(b=D==null,D!=null&&this.canMerge(_,w,D)){D.outerContextDepth=Math.max(D.outerContextDepth,_.outerContextDepth),_.isPrecedenceFilterSuppressed&&(D.isPrecedenceFilterSuppressed=!0);let N=h.PredictionContext.join(D.context,_.context,E);return this.updatePropertiesForMergedConfig(_),D.context===N?!1:(D.context=N,!0)}for(let N=0;N<this.unmerged.length;N++){let F=this.unmerged[N];if(this.canMerge(_,w,F)){F.outerContextDepth=Math.max(F.outerContextDepth,_.outerContextDepth),_.isPrecedenceFilterSuppressed&&(F.isPrecedenceFilterSuppressed=!0);let U=h.PredictionContext.join(F.context,_.context,E);return this.updatePropertiesForMergedConfig(_),F.context===U?!1:(F.context=U,b&&(this.mergedConfigs.put(w,F),this.unmerged.splice(N,1)),!0)}}return this.configs.push(_),b?this.mergedConfigs.put(w,_):this.unmerged.push(_),this.updatePropertiesForAddedConfig(_),!0}updatePropertiesForMergedConfig(_){this._dipsIntoOuterContext=this._dipsIntoOuterContext||_.reachesIntoOuterContext,f(!this.outermostConfigSet||!this._dipsIntoOuterContext);}updatePropertiesForAddedConfig(_){this.configs.length===1?this._uniqueAlt=_.alt:this._uniqueAlt!==_.alt&&(this._uniqueAlt=n.ATN.INVALID_ALT_NUMBER),this._hasSemanticContext=this._hasSemanticContext||!d.SemanticContext.NONE.equals(_.semanticContext),this._dipsIntoOuterContext=this._dipsIntoOuterContext||_.reachesIntoOuterContext,f(!this.outermostConfigSet||!this._dipsIntoOuterContext);}canMerge(_,E,b){return _.state.stateNumber!==b.state.stateNumber||E.alt!==b.alt?!1:_.semanticContext.equals(b.semanticContext)}getKey(_){return {state:_.state.stateNumber,alt:_.alt}}containsAll(_){for(let E of _)if(!(E instanceof o.ATNConfig)||!this.contains(E))return !1;return !0}addAll(_,E){this.ensureWritable();let b=!1;for(let w of _)this.add(w,E)&&(b=!0);return b}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=n.ATN.INVALID_ALT_NUMBER,this._conflictInfo=void 0;}equals(_){return this===_?!0:_ instanceof x?this.outermostConfigSet===_.outermostConfigSet&&m.equals(this._conflictInfo,_._conflictInfo)&&s.ArrayEqualityComparator.INSTANCE.equals(this.configs,_.configs):!1}hashCode(){if(this.isReadOnly&&this.cachedHashCode!==-1)return this.cachedHashCode;let _=1;return _=5*_^(this.outermostConfigSet?1:0),_=5*_^s.ArrayEqualityComparator.INSTANCE.hashCode(this.configs),this.isReadOnly&&(this.cachedHashCode=_),_}toString(_){_==null&&(_=!1);let E="",b=this.configs.slice(0);b.sort((w,D)=>w.alt!==D.alt?w.alt-D.alt:w.state.stateNumber!==D.state.stateNumber?w.state.stateNumber-D.state.stateNumber:w.semanticContext.toString().localeCompare(D.semanticContext.toString())),E+="[";for(let w=0;w<b.length;w++)w>0&&(E+=", "),E+=b[w].toString(void 0,!0,_);return E+="]",this._hasSemanticContext&&(E+=",hasSemanticContext="+this._hasSemanticContext),this._uniqueAlt!==n.ATN.INVALID_ALT_NUMBER&&(E+=",uniqueAlt="+this._uniqueAlt),this._conflictInfo!=null&&(E+=",conflictingAlts="+this._conflictInfo.conflictedAlts,this._conflictInfo.isExact||(E+="*")),this._dipsIntoOuterContext&&(E+=",dipsIntoOuterContext"),E.toString()}get uniqueAlt(){return this._uniqueAlt}get hasSemanticContext(){return this._hasSemanticContext}set hasSemanticContext(_){this.ensureWritable(),this._hasSemanticContext=_;}get conflictInfo(){return this._conflictInfo}set conflictInfo(_){this.ensureWritable(),this._conflictInfo=_;}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(_){return this.configs[_]}ensureWritable(){if(this.isReadOnly)throw new Error("This ATNConfigSet is read only.")}};e([u.NotNull],x.prototype,"getRepresentedAlternatives",null),e([u.Override],x.prototype,"size",null),e([u.Override],x.prototype,"isEmpty",null),e([u.Override],x.prototype,"contains",null),e([u.Override],x.prototype,Symbol.iterator,null),e([u.Override],x.prototype,"toArray",null),e([u.Override],x.prototype,"containsAll",null),e([u.Override],x.prototype,"clear",null),e([u.Override],x.prototype,"equals",null),e([u.Override],x.prototype,"hashCode",null),t.ATNConfigSet=x;}),uc=te(t=>{var e=t&&t.__decorate||function(h,c,d,f){var m=arguments.length,g=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,d):f,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(h,c,d,f);else for(var x=h.length-1;x>=0;x--)(v=h[x])&&(g=(m<3?v(g):m>3?v(c,d,g):v(c,d))||g);return m>3&&g&&Object.defineProperty(c,d,g),g},r=t&&t.__param||function(h,c){return function(d,f){c(d,f,h);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DFAState=void 0;var i=ti(),s=an(),n=qt(),o=fe(),a=Vr(),u=ge("assert"),l=class{constructor(h){this.stateNumber=-1,this.configs=h,this.edges=new Map,this.contextEdges=new Map;}get isContextSensitive(){return !!this.contextSymbols}isContextSymbol(h){return this.isContextSensitive?this.contextSymbols.get(h):!1}setContextSymbol(h){u(this.isContextSensitive),this.contextSymbols.set(h);}setContextSensitive(h){u(!this.configs.isOutermostConfigSet),!this.isContextSensitive&&(this.contextSymbols||(this.contextSymbols=new s.BitSet));}get acceptStateInfo(){return this._acceptStateInfo}set acceptStateInfo(h){this._acceptStateInfo=h;}get isAcceptState(){return !!this._acceptStateInfo}get prediction(){return this._acceptStateInfo?this._acceptStateInfo.prediction:i.ATN.INVALID_ALT_NUMBER}get lexerActionExecutor(){if(this._acceptStateInfo)return this._acceptStateInfo.lexerActionExecutor}getTarget(h){return this.edges.get(h)}setTarget(h,c){this.edges.set(h,c);}getEdgeMap(){return this.edges}getContextTarget(h){return h===a.PredictionContext.EMPTY_FULL_STATE_KEY&&(h=-1),this.contextEdges.get(h)}setContextTarget(h,c){if(!this.isContextSensitive)throw new Error("The state is not context sensitive.");h===a.PredictionContext.EMPTY_FULL_STATE_KEY&&(h=-1),this.contextEdges.set(h,c);}getContextEdgeMap(){let h=new Map(this.contextEdges),c=h.get(-1);if(c!==void 0)if(h.size===1){let d=new Map;return d.set(a.PredictionContext.EMPTY_FULL_STATE_KEY,c),d}else h.delete(-1),h.set(a.PredictionContext.EMPTY_FULL_STATE_KEY,c);return h}hashCode(){let h=n.MurmurHash.initialize(7);return h=n.MurmurHash.update(h,this.configs.hashCode()),h=n.MurmurHash.finish(h,1),h}equals(h){if(this===h)return !0;if(!(h instanceof l))return !1;let c=h;return this.configs.equals(c.configs)}toString(){let h="";return h+=this.stateNumber+":"+this.configs,this.isAcceptState&&(h+="=>",this.predicates?h+=this.predicates:h+=this.prediction),h.toString()}};e([o.NotNull],l.prototype,"configs",void 0),e([o.NotNull],l.prototype,"edges",void 0),e([o.NotNull],l.prototype,"contextEdges",void 0),e([o.Override],l.prototype,"hashCode",null),e([o.Override],l.prototype,"equals",null),e([o.Override],l.prototype,"toString",null),t.DFAState=l,function(h){let c=class{constructor(f,m){this.alt=m,this.pred=f;}toString(){return "("+this.pred+", "+this.alt+")"}};e([o.NotNull],c.prototype,"pred",void 0),e([o.Override],c.prototype,"toString",null),c=e([r(0,o.NotNull)],c),h.PredPrediction=c;}(l=t.DFAState||(t.DFAState={}));}),lc=te(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNSimulator=void 0;var i=Ba(),s=uc(),n=fe(),o=Vr(),a=class La{constructor(l){this.atn=l;}static get ERROR(){return La._ERROR||(La._ERROR=new s.DFAState(new i.ATNConfigSet),La._ERROR.stateNumber=o.PredictionContext.EMPTY_FULL_STATE_KEY),La._ERROR}clearDFA(){this.atn.clearDFA();}};e([n.NotNull],a.prototype,"atn",void 0),e([n.NotNull],a,"ERROR",null),a=e([r(0,n.NotNull)],a),t.ATNSimulator=a,a=t.ATNSimulator||(t.ATNSimulator={}),t.ATNSimulator=a;}),_b=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConsoleErrorListener=void 0;var e=class{syntaxError(r,i,s,n,o,a){console.error(`line ${s}:${n} ${o}`);}};t.ConsoleErrorListener=e,e.INSTANCE=new e;}),Dp=te(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h},r=t&&t.__param||function(n,o){return function(a,u){o(a,u,n);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyErrorListener=void 0;var i=fe(),s=class{constructor(n){if(this.delegates=n,!n)throw new Error("Invalid delegates")}getDelegates(){return this.delegates}syntaxError(n,o,a,u,l,h){this.delegates.forEach(c=>{c.syntaxError&&c.syntaxError(n,o,a,u,l,h);});}};e([i.Override,r(0,i.NotNull),r(4,i.NotNull)],s.prototype,"syntaxError",null),t.ProxyErrorListener=s;}),ja=te(t=>{var e=t&&t.__decorate||function(l,h,c,d){var f=arguments.length,m=f<3?h:d===null?d=Object.getOwnPropertyDescriptor(h,c):d,g;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")m=Reflect.decorate(l,h,c,d);else for(var v=l.length-1;v>=0;v--)(g=l[v])&&(m=(f<3?g(m):f>3?g(h,c,m):g(h,c))||m);return f>3&&m&&Object.defineProperty(h,c,m),m},r=t&&t.__param||function(l,h){return function(c,d){h(c,d,l);}};Object.defineProperty(t,"__esModule",{value:!0}),t.Recognizer=void 0;var i=_b(),s=Dp(),n=fe(),o=At(),a=ei(),u=class{constructor(){this._listeners=[i.ConsoleErrorListener.INSTANCE],this._stateNumber=-1;}getTokenTypeMap(){let l=this.vocabulary,h=u.tokenTypeMapCache.get(l);if(h==null){let c=new Map;for(let d=0;d<=this.atn.maxTokenType;d++){let f=l.getLiteralName(d);f!=null&&c.set(f,d);let m=l.getSymbolicName(d);m!=null&&c.set(m,d);}c.set("EOF",o.Token.EOF),h=c,u.tokenTypeMapCache.set(l,h);}return h}getRuleIndexMap(){let l=this.ruleNames;if(l==null)throw new Error("The current recognizer does not provide a list of rule names.");let h=u.ruleIndexMapCache.get(l);return h==null&&(h=a.toMap(l),u.ruleIndexMapCache.set(l,h)),h}getTokenType(l){let h=this.getTokenTypeMap().get(l);return h!=null?h:o.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(l){this._interp=l;}get parseInfo(){return Promise.resolve(void 0)}getErrorHeader(l){let h=l.getOffendingToken();if(!h)return "";let c=h.line,d=h.charPositionInLine;return "line "+c+":"+d}addErrorListener(l){if(!l)throw new TypeError("listener must not be null");this._listeners.push(l);}removeErrorListener(l){let h=this._listeners.indexOf(l);h!==-1&&this._listeners.splice(h,1);}removeErrorListeners(){this._listeners.length=0;}getErrorListeners(){return this._listeners.slice(0)}getErrorListenerDispatch(){return new s.ProxyErrorListener(this.getErrorListeners())}sempred(l,h,c){return !0}precpred(l,h){return !0}action(l,h,c){}get state(){return this._stateNumber}set state(l){this._stateNumber=l;}};u.EOF=-1,u.tokenTypeMapCache=new WeakMap,u.ruleIndexMapCache=new WeakMap,e([n.SuppressWarnings("serial"),n.NotNull],u.prototype,"_listeners",void 0),e([n.NotNull],u.prototype,"getTokenTypeMap",null),e([n.NotNull],u.prototype,"getRuleIndexMap",null),e([n.NotNull],u.prototype,"serializedATN",null),e([n.NotNull],u.prototype,"atn",null),e([n.NotNull,r(0,n.NotNull)],u.prototype,"interpreter",null),e([n.NotNull,r(0,n.NotNull)],u.prototype,"getErrorHeader",null),e([r(0,n.NotNull)],u.prototype,"addErrorListener",null),e([r(0,n.NotNull)],u.prototype,"removeErrorListener",null),e([n.NotNull],u.prototype,"getErrorListeners",null),t.Recognizer=u;}),un=te(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.VocabularyImpl=void 0;var r=fe(),i=At(),s=class{constructor(n,o,a){this.literalNames=n,this.symbolicNames=o,this.displayNames=a,this._maxTokenType=Math.max(this.displayNames.length,Math.max(this.literalNames.length,this.symbolicNames.length))-1;}get maxTokenType(){return this._maxTokenType}getLiteralName(n){if(n>=0&&n<this.literalNames.length)return this.literalNames[n]}getSymbolicName(n){if(n>=0&&n<this.symbolicNames.length)return this.symbolicNames[n];if(n===i.Token.EOF)return "EOF"}getDisplayName(n){if(n>=0&&n<this.displayNames.length){let u=this.displayNames[n];if(u)return u}let o=this.getLiteralName(n);if(o)return o;let a=this.getSymbolicName(n);return a||String(n)}};s.EMPTY_VOCABULARY=new s([],[],[]),e([r.NotNull],s.prototype,"literalNames",void 0),e([r.NotNull],s.prototype,"symbolicNames",void 0),e([r.NotNull],s.prototype,"displayNames",void 0),e([r.Override],s.prototype,"maxTokenType",null),e([r.Override],s.prototype,"getLiteralName",null),e([r.Override],s.prototype,"getSymbolicName",null),e([r.Override,r.NotNull],s.prototype,"getDisplayName",null),e([r.NotNull],s,"EMPTY_VOCABULARY",void 0),t.VocabularyImpl=s;}),yb=te(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.DFASerializer=void 0;var r=lc(),i=fe(),s=Vr(),n=ja(),o=un(),a=class{constructor(u,l,h,c){l instanceof n.Recognizer?(h=l.ruleNames,c=l.atn,l=l.vocabulary):l||(l=o.VocabularyImpl.EMPTY_VOCABULARY),this.dfa=u,this.vocabulary=l,this.ruleNames=h,this.atn=c;}toString(){if(!this.dfa.s0)return "";let u="";if(this.dfa.states){let h=new Array(...this.dfa.states.toArray());h.sort((c,d)=>c.stateNumber-d.stateNumber);for(let c of h){let d=c.getEdgeMap(),f=[...d.keys()].sort((v,x)=>v-x),m=c.getContextEdgeMap(),g=[...m.keys()].sort((v,x)=>v-x);for(let v of f){let x=d.get(v);if((x==null||x===r.ATNSimulator.ERROR)&&!c.isContextSymbol(v))continue;let _=!1;u+=this.getStateString(c)+"-"+this.getEdgeLabel(v)+"->",c.isContextSymbol(v)&&(u+="!",_=!0);let E=x;E&&E.stateNumber!==r.ATNSimulator.ERROR.stateNumber?u+=this.getStateString(E)+`
66
66
  `:_&&(u+=`ctx
67
67
  `);}if(c.isContextSensitive)for(let v of g)u+=this.getStateString(c)+"-"+this.getContextLabel(v)+"->"+this.getStateString(m.get(v))+`
68
- `;}}let l=u;return l.length===0?"":l}getContextLabel(u){if(u===s.PredictionContext.EMPTY_FULL_STATE_KEY)return "ctx:EMPTY_FULL";if(u===s.PredictionContext.EMPTY_LOCAL_STATE_KEY)return "ctx:EMPTY_LOCAL";if(this.atn&&u>0&&u<=this.atn.states.length){let h=this.atn.states[u].ruleIndex;if(this.ruleNames&&h>=0&&h<this.ruleNames.length)return "ctx:"+String(u)+"("+this.ruleNames[h]+")"}return "ctx:"+String(u)}getEdgeLabel(u){return this.vocabulary.getDisplayName(u)}getStateString(u){if(u===r.ATNSimulator.ERROR)return "ERROR";let l=u.stateNumber,h="s"+l;if(u.isAcceptState&&(u.predicates?h=":s"+l+"=>"+u.predicates:h=":s"+l+"=>"+u.prediction),u.isContextSensitive){h+="*";for(let c of u.configs)if(c.reachesIntoOuterContext){h+="*";break}}return h}};e([i.NotNull],a.prototype,"dfa",void 0),e([i.NotNull],a.prototype,"vocabulary",void 0),e([i.Override],a.prototype,"toString",null),t.DFASerializer=a;}),x7=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerDFASerializer=void 0;var i=yb(),s=fe(),n=un(),o=class extends i.DFASerializer{constructor(u){super(u,n.VocabularyImpl.EMPTY_VOCABULARY);}getEdgeLabel(u){return "'"+String.fromCodePoint(u)+"'"}};e([s.Override,s.NotNull],o.prototype,"getEdgeLabel",null),o=e([r(0,s.NotNull)],o),t.LexerDFASerializer=o;}),Sp=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.StarLoopEntryState=void 0;var r=Qt(),i=an(),s=ls(),n=fe(),o=class extends s.DecisionState{constructor(){super(...arguments),this.precedenceRuleDecision=!1,this.precedenceLoopbackStates=new i.BitSet;}get stateType(){return r.ATNStateType.STAR_LOOP_ENTRY}};e([n.Override],o.prototype,"stateType",null),t.StarLoopEntryState=o;}),vb=re(t=>{var e=t&&t.__decorate||function(f,m,g,v){var x=arguments.length,_=x<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,g):v,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(f,m,g,v);else for(var b=f.length-1;b>=0;b--)(E=f[b])&&(_=(x<3?E(_):x>3?E(m,g,_):E(m,g))||_);return x>3&&_&&Object.defineProperty(m,g,_),_},r=t&&t.__param||function(f,m){return function(g,v){m(g,v,f);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DFA=void 0;var i=on(),s=Ba(),n=yb(),o=uc(),a=x7(),u=fe(),l=Qr(),h=Sp(),c=un(),d=class{constructor(m,g=0){if(this.states=new i.Array2DHashSet(l.ObjectEqualityComparator.INSTANCE),this.nextStateNumber=0,!m.atn)throw new Error("The ATNState must be associated with an ATN");this.atnStartState=m,this.atn=m.atn,this.decision=g;let v=!1;m instanceof h.StarLoopEntryState&&m.precedenceRuleDecision&&(v=!0,this.s0=new o.DFAState(new s.ATNConfigSet),this.s0full=new o.DFAState(new s.ATNConfigSet)),this.precedenceDfa=v;}get isPrecedenceDfa(){return this.precedenceDfa}getPrecedenceStartState(m,g){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");return g?this.s0full.getTarget(m):this.s0.getTarget(m)}setPrecedenceStartState(m,g,v){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");m<0||(g?this.s0full.setTarget(m,v):this.s0.setTarget(m,v));}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(m){return m.stateNumber=this.nextStateNumber++,this.states.getOrAdd(m)}toString(m,g){if(m||(m=c.VocabularyImpl.EMPTY_VOCABULARY),!this.s0)return "";let v;return g?v=new n.DFASerializer(this,m,g,this.atnStartState.atn):v=new n.DFASerializer(this,m),v.toString()}toLexerString(){return this.s0?new a.LexerDFASerializer(this).toString():""}};e([u.NotNull],d.prototype,"states",void 0),e([u.NotNull],d.prototype,"atnStartState",void 0),e([u.NotNull],d.prototype,"atn",void 0),d=e([r(0,u.NotNull)],d),t.DFA=d;}),xb=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.BasicState=void 0;var r=Ci(),i=Qt(),s=fe(),n=class extends r.ATNState{get stateType(){return i.ATNStateType.BASIC}};e([s.Override],n.prototype,"stateType",null),t.BasicState=n;}),bb=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidState=void 0;var r=Qt(),i=xb(),s=fe(),n=class extends i.BasicState{get stateType(){return r.ATNStateType.INVALID_TYPE}};e([s.Override],n.prototype,"stateType",null),t.InvalidState=n;}),Rp=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.SetTransition=void 0;var i=cs(),s=fe(),n=At(),o=sn(),a=class extends o.Transition{constructor(l,h){super(l),h==null&&(h=i.IntervalSet.of(n.Token.INVALID_TYPE)),this.set=h;}get serializationType(){return 7}get label(){return this.set}matches(l,h,c){return this.set.contains(l)}toString(){return this.set.toString()}};e([s.NotNull],a.prototype,"set",void 0),e([s.Override],a.prototype,"serializationType",null),e([s.Override,s.NotNull],a.prototype,"label",null),e([s.Override],a.prototype,"matches",null),e([s.Override,s.NotNull],a.prototype,"toString",null),a=e([r(0,s.NotNull),r(1,s.Nullable)],a),t.SetTransition=a;}),Np=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.NotSetTransition=void 0;var i=fe(),s=Rp(),n=class extends s.SetTransition{constructor(a,u){super(a,u);}get serializationType(){return 8}matches(a,u,l){return a>=u&&a<=l&&!super.matches(a,u,l)}toString(){return "~"+super.toString()}};e([i.Override],n.prototype,"serializationType",null),e([i.Override],n.prototype,"matches",null),e([i.Override],n.prototype,"toString",null),n=e([r(0,i.NotNull),r(1,i.Nullable)],n),t.NotSetTransition=n;}),qa=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleStopState=void 0;var r=Ci(),i=Qt(),s=fe(),n=class extends r.ATNState{get nonStopStateNumber(){return -1}get stateType(){return i.ATNStateType.RULE_STOP}};e([s.Override],n.prototype,"nonStopStateNumber",null),e([s.Override],n.prototype,"stateType",null),t.RuleStopState=n;}),Op=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleTransition=void 0;var i=fe(),s=sn(),n=class extends s.Transition{constructor(a,u,l,h){super(a),this.tailCall=!1,this.optimizedTailCall=!1,this.ruleIndex=u,this.precedence=l,this.followState=h;}get serializationType(){return 3}get isEpsilon(){return !0}matches(a,u,l){return !1}};e([i.NotNull],n.prototype,"followState",void 0),e([i.Override],n.prototype,"serializationType",null),e([i.Override],n.prototype,"isEpsilon",null),e([i.Override],n.prototype,"matches",null),n=e([r(0,i.NotNull),r(3,i.NotNull)],n),t.RuleTransition=n;}),Eb=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.WildcardTransition=void 0;var i=fe(),s=sn(),n=class extends s.Transition{constructor(a){super(a);}get serializationType(){return 9}matches(a,u,l){return a>=u&&a<=l}toString(){return "."}};e([i.Override],n.prototype,"serializationType",null),e([i.Override],n.prototype,"matches",null),e([i.Override,i.NotNull],n.prototype,"toString",null),n=e([r(0,i.NotNull)],n),t.WildcardTransition=n;}),b7=re(t=>{var e=t&&t.__decorate||function(x,_,E,b){var w=arguments.length,D=w<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,E):b,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(x,_,E,b);else for(var F=x.length-1;F>=0;F--)(N=x[F])&&(D=(w<3?N(D):w>3?N(_,E,D):N(_,E))||D);return w>3&&D&&Object.defineProperty(_,E,D),D},r=t&&t.__param||function(x,_){return function(E,b){_(E,b,x);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LL1Analyzer=void 0;var i=Ep(),s=on(),n=ac(),o=an(),a=cs(),u=fe(),l=Np(),h=Qr(),c=Vr(),d=qa(),f=Op(),m=At(),g=Eb(),v=class X0{constructor(_){this.atn=_;}getDecisionLookahead(_){if(_==null)return;let E=new Array(_.numberOfTransitions);for(let b=0;b<_.numberOfTransitions;b++){let w=new a.IntervalSet;E[b]=w;let D=new s.Array2DHashSet(h.ObjectEqualityComparator.INSTANCE);this._LOOK(_.transition(b).target,void 0,c.PredictionContext.EMPTY_LOCAL,w,D,new o.BitSet,!1,!1),(w.size===0||w.contains(X0.HIT_PRED))&&(w=void 0,E[b]=w);}return E}LOOK(_,E,b){if(b===void 0){if(_.atn==null)throw new Error("Illegal state");b=_.atn.ruleToStopState[_.ruleIndex];}else b===null&&(b=void 0);let w=new a.IntervalSet;return this._LOOK(_,b,E,w,new s.Array2DHashSet,new o.BitSet,!0,!0),w}_LOOK(_,E,b,w,D,N,F,V){let Z=n.ATNConfig.create(_,0,b);if(!D.add(Z))return;if(_===E){if(c.PredictionContext.isEmptyLocal(b)){w.add(m.Token.EPSILON);return}else if(b.isEmpty){V&&w.add(m.Token.EOF);return}}if(_ instanceof d.RuleStopState){if(b.isEmpty&&!c.PredictionContext.isEmptyLocal(b)){V&&w.add(m.Token.EOF);return}let ae=N.get(_.ruleIndex);try{N.clear(_.ruleIndex);for(let k=0;k<b.size;k++){if(b.getReturnState(k)===c.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let y=this.atn.states[b.getReturnState(k)];this._LOOK(y,E,b.getParent(k),w,D,N,F,V);}}finally{ae&&N.set(_.ruleIndex);}}let te=_.numberOfTransitions;for(let ae=0;ae<te;ae++){let k=_.transition(ae);if(k instanceof f.RuleTransition){if(N.get(k.ruleIndex))continue;let y=b.getChild(k.followState.stateNumber);try{N.set(k.ruleIndex),this._LOOK(k.target,E,y,w,D,N,F,V);}finally{N.clear(k.ruleIndex);}}else if(k instanceof i.AbstractPredicateTransition)F?this._LOOK(k.target,E,b,w,D,N,F,V):w.add(X0.HIT_PRED);else if(k.isEpsilon)this._LOOK(k.target,E,b,w,D,N,F,V);else if(k instanceof g.WildcardTransition)w.addAll(a.IntervalSet.of(m.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType));else {let y=k.label;y!=null&&(k instanceof l.NotSetTransition&&(y=y.complement(a.IntervalSet.of(m.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType))),w.addAll(y));}}}};v.HIT_PRED=m.Token.INVALID_TYPE,e([u.NotNull],v.prototype,"atn",void 0),e([u.NotNull,r(0,u.NotNull),r(1,u.NotNull)],v.prototype,"LOOK",null),e([r(0,u.NotNull),r(2,u.NotNull),r(3,u.NotNull),r(4,u.NotNull),r(5,u.NotNull)],v.prototype,"_LOOK",null),v=e([r(0,u.NotNull)],v),t.LL1Analyzer=v;}),ti=re(t=>{var e=t&&t.__decorate||function(m,g,v,x){var _=arguments.length,E=_<3?g:x===null?x=Object.getOwnPropertyDescriptor(g,v):x,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(m,g,v,x);else for(var w=m.length-1;w>=0;w--)(b=m[w])&&(E=(_<3?b(E):_>3?b(g,v,E):b(g,v))||E);return _>3&&E&&Object.defineProperty(g,v,E),E},r=t&&t.__param||function(m,g){return function(v,x){g(v,x,m);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ATN=void 0;var i=uo(),s=vb(),n=cs(),o=bb(),a=b7(),u=fe(),l=Qr(),h=Vr(),c=At(),d=ge("assert"),f=class{constructor(g,v){this.states=[],this.decisionToState=[],this.modeNameToStartState=new Map,this.modeToStartState=[],this.contextCache=new i.Array2DHashMap(l.ObjectEqualityComparator.INSTANCE),this.decisionToDFA=[],this.modeToDFA=[],this.LL1Table=new Map,this.grammarType=g,this.maxTokenType=v;}clearDFA(){this.decisionToDFA=new Array(this.decisionToState.length);for(let g=0;g<this.decisionToDFA.length;g++)this.decisionToDFA[g]=new s.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 s.DFA(this.modeToStartState[g]);this.contextCache.clear(),this.LL1Table.clear();}get contextCacheSize(){return this.contextCache.size}getCachedContext(g){return h.PredictionContext.getCachedContext(g,this.contextCache,new h.PredictionContext.IdentityHashMap)}getDecisionToDFA(){return d(this.decisionToDFA!=null&&this.decisionToDFA.length===this.decisionToState.length),this.decisionToDFA}nextTokens(g,v){return v?new a.LL1Analyzer(this).LOOK(g,v):(g.nextTokenWithinRule||(g.nextTokenWithinRule=this.nextTokens(g,h.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 v=new o.InvalidState;v.atn=this,v.stateNumber=g.stateNumber,this.states[g.stateNumber]=v;}defineMode(g,v){this.modeNameToStartState.set(g,v),this.modeToStartState.push(v),this.modeToDFA.push(new s.DFA(v)),this.defineDecisionState(v);}defineDecisionState(g){return this.decisionToState.push(g),g.decision=this.decisionToState.length-1,this.decisionToDFA.push(new s.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,v){if(g<0||g>=this.states.length)throw new RangeError("Invalid state number.");let x=v,_=this.states[g],E=this.nextTokens(_);if(!E.contains(c.Token.EPSILON))return E;let b=new n.IntervalSet;for(b.addAll(E),b.remove(c.Token.EPSILON);x!=null&&x.invokingState>=0&&E.contains(c.Token.EPSILON);){let D=this.states[x.invokingState].transition(0);E=this.nextTokens(D.followState),b.addAll(E),b.remove(c.Token.EPSILON),x=x._parent;}return E.contains(c.Token.EPSILON)&&b.add(c.Token.EOF),b}};e([u.NotNull],f.prototype,"states",void 0),e([u.NotNull],f.prototype,"decisionToState",void 0),e([u.NotNull],f.prototype,"modeNameToStartState",void 0),e([u.NotNull],f.prototype,"modeToStartState",void 0),e([u.NotNull],f.prototype,"decisionToDFA",void 0),e([u.NotNull],f.prototype,"modeToDFA",void 0),e([u.NotNull],f.prototype,"nextTokens",null),e([r(0,u.NotNull)],f.prototype,"removeState",null),e([r(0,u.NotNull),r(1,u.NotNull)],f.prototype,"defineMode",null),e([r(0,u.NotNull)],f.prototype,"defineDecisionState",null),e([u.NotNull],f.prototype,"getExpectedTokens",null),f=e([r(0,u.NotNull)],f),t.ATN=f,function(m){m.INVALID_ALT_NUMBER=0;}(f=t.ATN||(t.ATN={})),t.ATN=f;}),E7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerIndexedCustomAction=void 0;var i=qt(),s=fe(),n=class Cb{constructor(a,u){this._offset=a,this._action=u;}get offset(){return this._offset}get action(){return this._action}get actionType(){return this._action.actionType}get isPositionDependent(){return !0}execute(a){this._action.execute(a);}hashCode(){let a=i.MurmurHash.initialize();return a=i.MurmurHash.update(a,this._offset),a=i.MurmurHash.update(a,this._action),i.MurmurHash.finish(a,2)}equals(a){return a===this?!0:a instanceof Cb?this._offset===a._offset&&this._action.equals(a._action):!1}};e([s.NotNull],n.prototype,"action",null),e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),n=e([r(1,s.NotNull)],n),t.LexerIndexedCustomAction=n;}),C7=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerActionExecutor=void 0;var i=nc(),s=E7(),n=qt(),o=fe(),a=class Pa{constructor(l){this._lexerActions=l;let h=n.MurmurHash.initialize();for(let c of l)h=n.MurmurHash.update(h,c);this.cachedHashCode=n.MurmurHash.finish(h,l.length);}static append(l,h){if(!l)return new Pa([h]);let c=l._lexerActions.slice(0);return c.push(h),new Pa(c)}fixOffsetBeforeMatch(l){let h;for(let c=0;c<this._lexerActions.length;c++)this._lexerActions[c].isPositionDependent&&!(this._lexerActions[c]instanceof s.LexerIndexedCustomAction)&&(h||(h=this._lexerActions.slice(0)),h[c]=new s.LexerIndexedCustomAction(l,this._lexerActions[c]));return h?new Pa(h):this}get lexerActions(){return this._lexerActions}execute(l,h,c){let d=!1,f=h.index;try{for(let m of this._lexerActions){if(m instanceof s.LexerIndexedCustomAction){let g=m.offset;h.seek(c+g),m=m.action,d=c+g!==f;}else m.isPositionDependent&&(h.seek(f),d=!1);m.execute(l);}}finally{d&&h.seek(f);}}hashCode(){return this.cachedHashCode}equals(l){return l===this?!0:l instanceof Pa?this.cachedHashCode===l.cachedHashCode&&i.ArrayEqualityComparator.INSTANCE.equals(this._lexerActions,l._lexerActions):!1}};e([o.NotNull],a.prototype,"_lexerActions",void 0),e([o.NotNull],a.prototype,"lexerActions",null),e([r(0,o.NotNull)],a.prototype,"execute",null),e([o.Override],a.prototype,"hashCode",null),e([o.Override],a.prototype,"equals",null),e([o.NotNull,r(1,o.NotNull)],a,"append",null),a=e([r(0,o.NotNull)],a),t.LexerActionExecutor=a;}),cc=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerNoViableAltException=void 0;var i=nn(),s=fe(),n=mr(),o=ei(),a=class extends i.RecognitionException{constructor(l,h,c,d){super(l,h),this._startIndex=c,this._deadEndConfigs=d;}get startIndex(){return this._startIndex}get deadEndConfigs(){return this._deadEndConfigs}get inputStream(){return super.inputStream}toString(){let l="";return this._startIndex>=0&&this._startIndex<this.inputStream.size&&(l=this.inputStream.getText(n.Interval.of(this._startIndex,this._startIndex)),l=o.escapeWhitespace(l,!1)),`LexerNoViableAltException('${l}')`}};e([s.Override],a.prototype,"inputStream",null),e([s.Override],a.prototype,"toString",null),a=e([r(1,s.NotNull)],a),t.LexerNoViableAltException=a;}),T7=re(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.OrderedATNConfigSet=void 0;var r=Ba(),i=fe(),s=class extends r.ATNConfigSet{constructor(n,o){n!=null&&o!=null?super(n,o):super();}clone(n){let o=new s(this,n);return !n&&this.isReadOnly&&o.addAll(this),o}getKey(n){return {state:0,alt:n.hashCode()}}canMerge(n,o,a){return n.equals(a)}};e([i.Override],s.prototype,"clone",null),e([i.Override],s.prototype,"getKey",null),e([i.Override],s.prototype,"canMerge",null),t.OrderedATNConfigSet=s;}),hc=re(t=>{var e=t&&t.__decorate||function(w,D,N,F){var V=arguments.length,Z=V<3?D:F===null?F=Object.getOwnPropertyDescriptor(D,N):F,te;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(w,D,N,F);else for(var ae=w.length-1;ae>=0;ae--)(te=w[ae])&&(Z=(V<3?te(Z):V>3?te(D,N,Z):te(D,N))||Z);return V>3&&Z&&Object.defineProperty(D,N,Z),Z},r=t&&t.__param||function(w,D){return function(N,F){D(N,F,w);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerATNSimulator=void 0;var i=mb(),s=ti(),n=ac(),o=Ba(),a=lc(),u=uc(),l=mr(),h=rn(),c=ln(),d=C7(),f=cc(),m=fe(),g=T7(),v=Vr(),x=qa(),_=At(),E=ge("assert"),b=class Tr extends a.ATNSimulator{constructor(D,N){super(D),this.optimize_tail_calls=!0,this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=c.Lexer.DEFAULT_MODE,this.prevAccept=new Tr.SimState,this.recog=N;}copyState(D){this._charPositionInLine=D.charPositionInLine,this._line=D._line,this.mode=D.mode,this.startIndex=D.startIndex;}match(D,N){this.mode=N;let F=D.mark();try{this.startIndex=D.index,this.prevAccept.reset();let V=this.atn.modeToDFA[N].s0;return V==null?this.matchATN(D):this.execATN(D,V)}finally{D.release(F);}}reset(){this.prevAccept.reset(),this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=c.Lexer.DEFAULT_MODE;}matchATN(D){let N=this.atn.modeToStartState[this.mode];Tr.debug&&console.log(`matchATN mode ${this.mode} start: ${N}`);let F=this.mode,V=this.computeStartState(D,N),Z=V.hasSemanticContext;Z&&(V.hasSemanticContext=!1);let te=this.addDFAState(V);if(!Z){let k=this.atn.modeToDFA[this.mode];k.s0?te=k.s0:k.s0=te;}let ae=this.execATN(D,te);return Tr.debug&&console.log(`DFA after matchATN: ${this.atn.modeToDFA[F].toLexerString()}`),ae}execATN(D,N){Tr.debug&&console.log(`start state closure=${N.configs}`),N.isAcceptState&&this.captureSimState(this.prevAccept,D,N);let F=D.LA(1),V=N;for(;;){Tr.debug&&console.log(`execATN loop starting closure: ${V.configs}`);let Z=this.getExistingTargetState(V,F);if(Z==null&&(Z=this.computeTargetState(D,V,F)),Z===a.ATNSimulator.ERROR||(F!==h.IntStream.EOF&&this.consume(D),Z.isAcceptState&&(this.captureSimState(this.prevAccept,D,Z),F===h.IntStream.EOF)))break;F=D.LA(1),V=Z;}return this.failOrAccept(this.prevAccept,D,V.configs,F)}getExistingTargetState(D,N){let F=D.getTarget(N);return Tr.debug&&F!=null&&console.log("reuse state "+D.stateNumber+" edge to "+F.stateNumber),F}computeTargetState(D,N,F){let V=new g.OrderedATNConfigSet;return this.getReachableConfigSet(D,N.configs,V,F),V.isEmpty?(V.hasSemanticContext||this.addDFAEdge(N,F,a.ATNSimulator.ERROR),a.ATNSimulator.ERROR):this.addDFAEdge(N,F,V)}failOrAccept(D,N,F,V){if(D.dfaState!=null){let Z=D.dfaState.lexerActionExecutor;return this.accept(N,Z,this.startIndex,D.index,D.line,D.charPos),D.dfaState.prediction}else {if(V===h.IntStream.EOF&&N.index===this.startIndex)return _.Token.EOF;throw new f.LexerNoViableAltException(this.recog,N,this.startIndex,F)}}getReachableConfigSet(D,N,F,V){let Z=s.ATN.INVALID_ALT_NUMBER;for(let te of N){let ae=te.alt===Z;if(ae&&te.hasPassedThroughNonGreedyDecision)continue;Tr.debug&&console.log(`testing ${this.getTokenName(V)} at ${te.toString(this.recog,!0)}`);let k=te.state.numberOfOptimizedTransitions;for(let y=0;y<k;y++){let C=te.state.getOptimizedTransition(y),S=this.getReachableTarget(C,V);if(S!=null){let R=te.lexerActionExecutor,L;R!=null?(R=R.fixOffsetBeforeMatch(D.index-this.startIndex),L=te.transform(S,!0,R)):(E(te.lexerActionExecutor==null),L=te.transform(S,!0));let I=V===h.IntStream.EOF;if(this.closure(D,L,F,ae,!0,I)){Z=te.alt;break}}}}}accept(D,N,F,V,Z,te){Tr.debug&&console.log(`ACTION ${N}`),D.seek(V),this._line=Z,this._charPositionInLine=te,N!=null&&this.recog!=null&&N.execute(this.recog,D,F);}getReachableTarget(D,N){if(D.matches(N,c.Lexer.MIN_CHAR_VALUE,c.Lexer.MAX_CHAR_VALUE))return D.target}computeStartState(D,N){let F=v.PredictionContext.EMPTY_FULL,V=new g.OrderedATNConfigSet;for(let Z=0;Z<N.numberOfTransitions;Z++){let te=N.transition(Z).target,ae=n.ATNConfig.create(te,Z+1,F);this.closure(D,ae,V,!1,!1,!1);}return V}closure(D,N,F,V,Z,te){if(Tr.debug&&console.log("closure("+N.toString(this.recog,!0)+")"),N.state instanceof x.RuleStopState){Tr.debug&&(this.recog!=null?console.log(`closure at ${this.recog.ruleNames[N.state.ruleIndex]} rule stop ${N}`):console.log(`closure at rule stop ${N}`));let k=N.context;if(k.isEmpty)return F.add(N),!0;k.hasEmpty&&(F.add(N.transform(N.state,!0,v.PredictionContext.EMPTY_FULL)),V=!0);for(let y=0;y<k.size;y++){let C=k.getReturnState(y);if(C===v.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let S=k.getParent(y),R=this.atn.states[C],L=N.transform(R,!1,S);V=this.closure(D,L,F,V,Z,te);}return V}N.state.onlyHasEpsilonTransitions||(!V||!N.hasPassedThroughNonGreedyDecision)&&F.add(N);let ae=N.state;for(let k=0;k<ae.numberOfOptimizedTransitions;k++){let y=ae.getOptimizedTransition(k),C=this.getEpsilonTarget(D,N,y,F,Z,te);C!=null&&(V=this.closure(D,C,F,V,Z,te));}return V}getEpsilonTarget(D,N,F,V,Z,te){let ae;switch(F.serializationType){case 3:let k=F;if(this.optimize_tail_calls&&k.optimizedTailCall&&!N.context.hasEmpty)ae=N.transform(F.target,!0);else {let C=N.context.getChild(k.followState.stateNumber);ae=N.transform(F.target,!0,C);}break;case 10:throw new Error("Precedence predicates are not supported in lexers.");case 4:let y=F;Tr.debug&&console.log("EVAL rule "+y.ruleIndex+":"+y.predIndex),V.hasSemanticContext=!0,this.evaluatePredicate(D,y.ruleIndex,y.predIndex,Z)?ae=N.transform(F.target,!0):ae=void 0;break;case 6:if(N.context.hasEmpty){let C=d.LexerActionExecutor.append(N.lexerActionExecutor,this.atn.lexerActions[F.actionIndex]);ae=N.transform(F.target,!0,C);break}else {ae=N.transform(F.target,!0);break}case 1:ae=N.transform(F.target,!0);break;case 5:case 2:case 7:if(te&&F.matches(h.IntStream.EOF,c.Lexer.MIN_CHAR_VALUE,c.Lexer.MAX_CHAR_VALUE)){ae=N.transform(F.target,!1);break}ae=void 0;break;default:ae=void 0;break}return ae}evaluatePredicate(D,N,F,V){if(this.recog==null)return !0;if(!V)return this.recog.sempred(void 0,N,F);let Z=this._charPositionInLine,te=this._line,ae=D.index,k=D.mark();try{return this.consume(D),this.recog.sempred(void 0,N,F)}finally{this._charPositionInLine=Z,this._line=te,D.seek(ae),D.release(k);}}captureSimState(D,N,F){D.index=N.index,D.line=this._line,D.charPos=this._charPositionInLine,D.dfaState=F;}addDFAEdge(D,N,F){if(F instanceof o.ATNConfigSet){let V=F.hasSemanticContext;V&&(F.hasSemanticContext=!1);let Z=this.addDFAState(F);return V||this.addDFAEdge(D,N,Z),Z}else Tr.debug&&console.log("EDGE "+D+" -> "+F+" upon "+String.fromCharCode(N)),D!=null&&D.setTarget(N,F);}addDFAState(D){E(!D.hasSemanticContext);let N=new u.DFAState(D),F=this.atn.modeToDFA[this.mode].states.get(N);if(F!=null)return F;D.optimizeConfigs(this);let V=new u.DFAState(D.clone(!0)),Z;for(let te of D)if(te.state instanceof x.RuleStopState){Z=te;break}if(Z!=null){let te=this.atn.ruleToTokenType[Z.state.ruleIndex],ae=Z.lexerActionExecutor;V.acceptStateInfo=new i.AcceptStateInfo(te,ae);}return this.atn.modeToDFA[this.mode].addState(V)}getDFA(D){return this.atn.modeToDFA[D]}getText(D){return D.getText(l.Interval.of(this.startIndex,D.index-1))}get line(){return this._line}set line(D){this._line=D;}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(D){this._charPositionInLine=D;}consume(D){D.LA(1)===10?(this._line++,this._charPositionInLine=0):this._charPositionInLine++,D.consume();}getTokenName(D){return D===-1?"EOF":"'"+String.fromCharCode(D)+"'"}};e([m.NotNull],b.prototype,"prevAccept",void 0),e([r(0,m.NotNull)],b.prototype,"copyState",null),e([r(0,m.NotNull)],b.prototype,"match",null),e([m.Override],b.prototype,"reset",null),e([r(0,m.NotNull)],b.prototype,"matchATN",null),e([r(0,m.NotNull),r(1,m.NotNull)],b.prototype,"execATN",null),e([r(0,m.NotNull)],b.prototype,"getExistingTargetState",null),e([m.NotNull,r(0,m.NotNull),r(1,m.NotNull)],b.prototype,"computeTargetState",null),e([r(0,m.NotNull),r(1,m.NotNull),r(2,m.NotNull)],b.prototype,"getReachableConfigSet",null),e([r(0,m.NotNull)],b.prototype,"accept",null),e([m.NotNull,r(0,m.NotNull),r(1,m.NotNull)],b.prototype,"computeStartState",null),e([r(0,m.NotNull),r(1,m.NotNull),r(2,m.NotNull)],b.prototype,"closure",null),e([r(0,m.NotNull),r(1,m.NotNull),r(2,m.NotNull),r(3,m.NotNull)],b.prototype,"getEpsilonTarget",null),e([r(0,m.NotNull)],b.prototype,"evaluatePredicate",null),e([r(0,m.NotNull),r(1,m.NotNull),r(2,m.NotNull)],b.prototype,"captureSimState",null),e([m.NotNull,r(0,m.NotNull)],b.prototype,"addDFAState",null),e([m.NotNull],b.prototype,"getDFA",null),e([m.NotNull,r(0,m.NotNull)],b.prototype,"getText",null),e([r(0,m.NotNull)],b.prototype,"consume",null),e([m.NotNull],b.prototype,"getTokenName",null),b=e([r(0,m.NotNull)],b),t.LexerATNSimulator=b,function(w){w.debug=!1,w.dfa_debug=!1;class D{constructor(){this.index=-1,this.line=0,this.charPos=-1;}reset(){this.index=-1,this.line=0,this.charPos=-1,this.dfaState=void 0;}}w.SimState=D;}(b=t.LexerATNSimulator||(t.LexerATNSimulator={})),t.LexerATNSimulator=b;}),ln=re(t=>{var e=t&&t.__decorate||function(d,f,m,g){var v=arguments.length,x=v<3?f:g===null?g=Object.getOwnPropertyDescriptor(f,m):g,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(d,f,m,g);else for(var E=d.length-1;E>=0;E--)(_=d[E])&&(x=(v<3?_(x):v>3?_(f,m,x):_(f,m))||x);return v>3&&x&&Object.defineProperty(f,m,x),x};Object.defineProperty(t,"__esModule",{value:!0}),t.Lexer=void 0;var r=Ap(),i=pb(),s=mr(),n=rn(),o=hc(),a=cc(),u=fe(),l=ja(),h=At(),c=class extends l.Recognizer{constructor(d){super(),this._factory=r.CommonTokenFactory.DEFAULT,this._tokenStartCharIndex=-1,this._tokenStartLine=0,this._tokenStartCharPositionInLine=0,this._hitEOF=!1,this._channel=0,this._type=0,this._modeStack=new i.IntegerStack,this._mode=c.DEFAULT_MODE,this._input=d,this._tokenFactorySourcePair={source:this,stream:d};}static get DEFAULT_TOKEN_CHANNEL(){return h.Token.DEFAULT_CHANNEL}static get HIDDEN(){return h.Token.HIDDEN_CHANNEL}reset(d){(d===void 0||d)&&this._input.seek(0),this._token=void 0,this._type=h.Token.INVALID_TYPE,this._channel=h.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartCharPositionInLine=-1,this._tokenStartLine=-1,this._text=void 0,this._hitEOF=!1,this._mode=c.DEFAULT_MODE,this._modeStack.clear(),this.interpreter.reset();}nextToken(){if(this._input==null)throw new Error("nextToken requires a non-null input stream.");let d=this._input.mark();try{e:for(;;){if(this._hitEOF)return this.emitEOF();this._token=void 0,this._channel=h.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=h.Token.INVALID_TYPE;let f;try{f=this.interpreter.match(this._input,this._mode);}catch(m){if(m instanceof a.LexerNoViableAltException)this.notifyListeners(m),this.recover(m),f=c.SKIP;else throw m}if(this._input.LA(1)===n.IntStream.EOF&&(this._hitEOF=!0),this._type===h.Token.INVALID_TYPE&&(this._type=f),this._type===c.SKIP)continue e}while(this._type===c.MORE);return this._token==null?this.emit():this._token}}finally{this._input.release(d);}}skip(){this._type=c.SKIP;}more(){this._type=c.MORE;}mode(d){this._mode=d;}pushMode(d){o.LexerATNSimulator.debug&&console.log("pushMode "+d),this._modeStack.push(this._mode),this.mode(d);}popMode(){if(this._modeStack.isEmpty)throw new Error("EmptyStackException");return o.LexerATNSimulator.debug&&console.log("popMode back to "+this._modeStack.peek()),this.mode(this._modeStack.pop()),this._mode}get tokenFactory(){return this._factory}set tokenFactory(d){this._factory=d;}get inputStream(){return this._input}set inputStream(d){this.reset(!1),this._input=d,this._tokenFactorySourcePair={source:this,stream:this._input};}get sourceName(){return this._input.sourceName}emit(d){return d||(d=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.charIndex-1,this._tokenStartLine,this._tokenStartCharPositionInLine)),this._token=d,d}emitEOF(){let d=this.charPositionInLine,f=this.line,m=this._factory.create(this._tokenFactorySourcePair,h.Token.EOF,void 0,h.Token.DEFAULT_CHANNEL,this._input.index,this._input.index-1,f,d);return this.emit(m),m}get line(){return this.interpreter.line}set line(d){this.interpreter.line=d;}get charPositionInLine(){return this.interpreter.charPositionInLine}set charPositionInLine(d){this.interpreter.charPositionInLine=d;}get charIndex(){return this._input.index}get text(){return this._text!=null?this._text:this.interpreter.getText(this._input)}set text(d){this._text=d;}get token(){return this._token}set token(d){this._token=d;}set type(d){this._type=d;}get type(){return this._type}set channel(d){this._channel=d;}get channel(){return this._channel}getAllTokens(){let d=[],f=this.nextToken();for(;f.type!==h.Token.EOF;)d.push(f),f=this.nextToken();return d}notifyListeners(d){let f=this._input.getText(s.Interval.of(this._tokenStartCharIndex,this._input.index)),m="token recognition error at: '"+this.getErrorDisplay(f)+"'",g=this.getErrorListenerDispatch();g.syntaxError&&g.syntaxError(this,void 0,this._tokenStartLine,this._tokenStartCharPositionInLine,m,d);}getErrorDisplay(d){if(typeof d=="number"){switch(d){case h.Token.EOF:return "<EOF>";case 10:return "\\n";case 9:return "\\t";case 13:return "\\r"}return String.fromCharCode(d)}return d.replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}getCharErrorDisplay(d){return "'"+this.getErrorDisplay(d)+"'"}recover(d){d instanceof a.LexerNoViableAltException?this._input.LA(1)!==n.IntStream.EOF&&this.interpreter.consume(this._input):this._input.consume();}};c.DEFAULT_MODE=0,c.MORE=-2,c.SKIP=-3,c.MIN_CHAR_VALUE=0,c.MAX_CHAR_VALUE=1114111,e([u.Override],c.prototype,"nextToken",null),e([u.Override],c.prototype,"tokenFactory",null),e([u.Override],c.prototype,"inputStream",null),e([u.Override],c.prototype,"sourceName",null),e([u.Override],c.prototype,"line",null),e([u.Override],c.prototype,"charPositionInLine",null),t.Lexer=c;}),cs=re(t=>{var e=t&&t.__decorate||function(c,d,f,m){var g=arguments.length,v=g<3?d:m===null?m=Object.getOwnPropertyDescriptor(d,f):m,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(c,d,f,m);else for(var _=c.length-1;_>=0;_--)(x=c[_])&&(v=(g<3?x(v):g>3?x(d,f,v):x(d,f))||v);return g>3&&v&&Object.defineProperty(d,f,v),v},r=t&&t.__param||function(c,d){return function(f,m){d(f,m,c);}};Object.defineProperty(t,"__esModule",{value:!0}),t.IntervalSet=void 0;var i=nc(),s=Tp(),n=mr(),o=ln(),a=qt(),u=fe(),l=At(),h=class{constructor(c){this.readonly=!1,c!=null?this._intervals=c.slice(0):this._intervals=[];}static get COMPLETE_CHAR_SET(){return h._COMPLETE_CHAR_SET===void 0&&(h._COMPLETE_CHAR_SET=h.of(o.Lexer.MIN_CHAR_VALUE,o.Lexer.MAX_CHAR_VALUE),h._COMPLETE_CHAR_SET.setReadonly(!0)),h._COMPLETE_CHAR_SET}static get EMPTY_SET(){return h._EMPTY_SET==null&&(h._EMPTY_SET=new h,h._EMPTY_SET.setReadonly(!0)),h._EMPTY_SET}static of(c,d=c){let f=new h;return f.add(c,d),f}clear(){if(this.readonly)throw new Error("can't alter readonly IntervalSet");this._intervals.length=0;}add(c,d=c){this.addRange(n.Interval.of(c,d));}addRange(c){if(this.readonly)throw new Error("can't alter readonly IntervalSet");if(!(c.b<c.a)){for(let d=0;d<this._intervals.length;d++){let f=this._intervals[d];if(c.equals(f))return;if(c.adjacent(f)||!c.disjoint(f)){let m=c.union(f);for(this._intervals[d]=m;d<this._intervals.length-1;){d++;let g=this._intervals[d];if(!m.adjacent(g)&&m.disjoint(g))break;this._intervals.splice(d,1),d--,this._intervals[d]=m.union(g);}return}if(c.startsBeforeDisjoint(f)){this._intervals.splice(d,0,c);return}}this._intervals.push(c);}}static or(c){let d=new h;for(let f of c)d.addAll(f);return d}addAll(c){if(c==null)return this;if(c instanceof h){let d=c,f=d._intervals.length;for(let m=0;m<f;m++){let g=d._intervals[m];this.add(g.a,g.b);}}else for(let d of c.toArray())this.add(d);return this}complementRange(c,d){return this.complement(h.of(c,d))}complement(c){if(c.isNil)return h.EMPTY_SET;let d;return c instanceof h?d=c:(d=new h,d.addAll(c)),d.subtract(this)}subtract(c){if(c==null||c.isNil)return new h(this._intervals);if(c instanceof h)return h.subtract(this,c);let d=new h;return d.addAll(c),h.subtract(this,d)}static subtract(c,d){if(c.isNil)return new h;let f=new h(c._intervals);if(d.isNil)return f;let m=0,g=0;for(;m<f._intervals.length&&g<d._intervals.length;){let v=f._intervals[m],x=d._intervals[g];if(x.b<v.a){g++;continue}if(x.a>v.b){m++;continue}let _,E;if(x.a>v.a&&(_=new n.Interval(v.a,x.a-1)),x.b<v.b&&(E=new n.Interval(x.b+1,v.b)),_)if(E){f._intervals[m]=_,f._intervals.splice(m+1,0,E),m++,g++;continue}else {f._intervals[m]=_,m++;continue}else if(E){f._intervals[m]=E,g++;continue}else {f._intervals.splice(m,1);continue}}return f}or(c){let d=new h;return d.addAll(this),d.addAll(c),d}and(c){if(c.isNil)return new h;let d=this._intervals,f=c._intervals,m,g=d.length,v=f.length,x=0,_=0;for(;x<g&&_<v;){let E=d[x],b=f[_];E.startsBeforeDisjoint(b)?x++:b.startsBeforeDisjoint(E)?_++:E.properlyContains(b)?(m||(m=new h),m.addRange(E.intersection(b)),_++):b.properlyContains(E)?(m||(m=new h),m.addRange(E.intersection(b)),x++):E.disjoint(b)||(m||(m=new h),m.addRange(E.intersection(b)),E.startsAfterNonDisjoint(b)?_++:b.startsAfterNonDisjoint(E)&&x++);}return m||new h}contains(c){let d=this._intervals.length,f=0,m=d-1;for(;f<=m;){let g=f+m>>1,v=this._intervals[g],x=v.a;if(v.b<c)f=g+1;else if(x>c)m=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 c=a.MurmurHash.initialize();for(let d of this._intervals)c=a.MurmurHash.update(c,d.a),c=a.MurmurHash.update(c,d.b);return c=a.MurmurHash.finish(c,this._intervals.length*2),c}equals(c){return c==null||!(c instanceof h)?!1:i.ArrayEqualityComparator.INSTANCE.equals(this._intervals,c._intervals)}toString(c=!1){let d="";if(this._intervals==null||this._intervals.length===0)return "{}";this.size>1&&(d+="{");let f=!0;for(let m of this._intervals){f?f=!1:d+=", ";let g=m.a,v=m.b;g===v?g===l.Token.EOF?d+="<EOF>":c?d+="'"+String.fromCodePoint(g)+"'":d+=g:c?d+="'"+String.fromCodePoint(g)+"'..'"+String.fromCodePoint(v)+"'":d+=g+".."+v;}return this.size>1&&(d+="}"),d}toStringVocabulary(c){if(this._intervals==null||this._intervals.length===0)return "{}";let d="";this.size>1&&(d+="{");let f=!0;for(let m of this._intervals){f?f=!1:d+=", ";let g=m.a,v=m.b;if(g===v)d+=this.elementName(c,g);else for(let x=g;x<=v;x++)x>g&&(d+=", "),d+=this.elementName(c,x);}return this.size>1&&(d+="}"),d}elementName(c,d){return d===l.Token.EOF?"<EOF>":d===l.Token.EPSILON?"<EPSILON>":c.getDisplayName(d)}get size(){let c=0,d=this._intervals.length;if(d===1){let f=this._intervals[0];return f.b-f.a+1}for(let f=0;f<d;f++){let m=this._intervals[f];c+=m.b-m.a+1;}return c}toIntegerList(){let c=new s.IntegerList(this.size),d=this._intervals.length;for(let f=0;f<d;f++){let m=this._intervals[f],g=m.a,v=m.b;for(let x=g;x<=v;x++)c.add(x);}return c}toSet(){let c=new Set;for(let d of this._intervals){let f=d.a,m=d.b;for(let g=f;g<=m;g++)c.add(g);}return c}toArray(){let c=new Array,d=this._intervals.length;for(let f=0;f<d;f++){let m=this._intervals[f],g=m.a,v=m.b;for(let x=g;x<=v;x++)c.push(x);}return c}remove(c){if(this.readonly)throw new Error("can't alter readonly IntervalSet");let d=this._intervals.length;for(let f=0;f<d;f++){let m=this._intervals[f],g=m.a,v=m.b;if(c<g)break;if(c===g&&c===v){this._intervals.splice(f,1);break}if(c===g){this._intervals[f]=n.Interval.of(m.a+1,m.b);break}if(c===v){this._intervals[f]=n.Interval.of(m.a,m.b-1);break}if(c>g&&c<v){let x=m.b;this._intervals[f]=n.Interval.of(m.a,c-1),this.add(c+1,x);}}}get isReadonly(){return this.readonly}setReadonly(c){if(this.readonly&&!c)throw new Error("can't alter readonly IntervalSet");this.readonly=c;}};e([u.Override],h.prototype,"addAll",null),e([u.Override],h.prototype,"complement",null),e([u.Override],h.prototype,"subtract",null),e([u.Override],h.prototype,"or",null),e([u.Override],h.prototype,"and",null),e([u.Override],h.prototype,"contains",null),e([u.Override],h.prototype,"isNil",null),e([u.Override],h.prototype,"hashCode",null),e([u.Override],h.prototype,"equals",null),e([r(0,u.NotNull)],h.prototype,"toStringVocabulary",null),e([u.NotNull,r(0,u.NotNull)],h.prototype,"elementName",null),e([u.Override],h.prototype,"size",null),e([u.Override],h.prototype,"remove",null),e([u.NotNull],h,"of",null),e([u.NotNull],h,"subtract",null),t.IntervalSet=h;}),Tb=re(t=>{var e=t&&t.__decorate||function(s,n,o,a){var u=arguments.length,l=u<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,o):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(s,n,o,a);else for(var c=s.length-1;c>=0;c--)(h=s[c])&&(l=(u<3?h(l):u>3?h(n,o,l):h(n,o))||l);return u>3&&l&&Object.defineProperty(n,o,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNDeserializationOptions=void 0;var r=fe(),i=class{constructor(s){this.readOnly=!1,s?(this.verifyATN=s.verifyATN,this.generateRuleBypassTransitions=s.generateRuleBypassTransitions,this.optimize=s.optimize):(this.verifyATN=!0,this.generateRuleBypassTransitions=!1,this.optimize=!0);}static get defaultOptions(){return i._defaultOptions==null&&(i._defaultOptions=new i,i._defaultOptions.makeReadOnly()),i._defaultOptions}get isReadOnly(){return this.readOnly}makeReadOnly(){this.readOnly=!0;}get isVerifyATN(){return this.verifyATN}set isVerifyATN(s){this.throwIfReadOnly(),this.verifyATN=s;}get isGenerateRuleBypassTransitions(){return this.generateRuleBypassTransitions}set isGenerateRuleBypassTransitions(s){this.throwIfReadOnly(),this.generateRuleBypassTransitions=s;}get isOptimize(){return this.optimize}set isOptimize(s){this.throwIfReadOnly(),this.optimize=s;}throwIfReadOnly(){if(this.isReadOnly)throw new Error("The object is read only.")}};e([r.NotNull],i,"defaultOptions",null),t.ATNDeserializationOptions=i;}),Ab=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ActionTransition=void 0;var i=fe(),s=sn(),n=class extends s.Transition{constructor(a,u,l=-1,h=!1){super(a),this.ruleIndex=u,this.actionIndex=l,this.isCtxDependent=h;}get serializationType(){return 6}get isEpsilon(){return !0}matches(a,u,l){return !1}toString(){return "action_"+this.ruleIndex+":"+this.actionIndex}};e([i.Override],n.prototype,"serializationType",null),e([i.Override],n.prototype,"isEpsilon",null),e([i.Override],n.prototype,"matches",null),e([i.Override],n.prototype,"toString",null),n=e([r(0,i.NotNull)],n),t.ActionTransition=n;}),wb=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.AtomTransition=void 0;var i=cs(),s=fe(),n=sn(),o=class extends n.Transition{constructor(u,l){super(u),this._label=l;}get serializationType(){return 5}get label(){return i.IntervalSet.of(this._label)}matches(u,l,h){return this._label===u}toString(){return String(this.label)}};e([s.Override],o.prototype,"serializationType",null),e([s.Override,s.NotNull],o.prototype,"label",null),e([s.Override],o.prototype,"matches",null),e([s.Override,s.NotNull],o.prototype,"toString",null),o=e([r(0,s.NotNull)],o),t.AtomTransition=o;}),fc=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BlockStartState=void 0;var e=ls(),r=class extends e.DecisionState{};t.BlockStartState=r;}),A7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.BasicBlockStartState=void 0;var r=Qt(),i=fc(),s=fe(),n=class extends i.BlockStartState{get stateType(){return r.ATNStateType.BLOCK_START}};e([s.Override],n.prototype,"stateType",null),t.BasicBlockStartState=n;}),w7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.BlockEndState=void 0;var r=Ci(),i=Qt(),s=fe(),n=class extends r.ATNState{get stateType(){return i.ATNStateType.BLOCK_END}};e([s.Override],n.prototype,"stateType",null),t.BlockEndState=n;}),D7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.EpsilonTransition=void 0;var i=fe(),s=sn(),n=class extends s.Transition{constructor(a,u=-1){super(a),this._outermostPrecedenceReturn=u;}get outermostPrecedenceReturn(){return this._outermostPrecedenceReturn}get serializationType(){return 1}get isEpsilon(){return !0}matches(a,u,l){return !1}toString(){return "epsilon"}};e([i.Override],n.prototype,"serializationType",null),e([i.Override],n.prototype,"isEpsilon",null),e([i.Override],n.prototype,"matches",null),e([i.Override,i.NotNull],n.prototype,"toString",null),n=e([r(0,i.NotNull)],n),t.EpsilonTransition=n;}),S7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerChannelAction=void 0;var i=qt(),s=fe(),n=class{constructor(o){this._channel=o;}get channel(){return this._channel}get actionType(){return 0}get isPositionDependent(){return !1}execute(o){o.channel=this._channel;}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),o=i.MurmurHash.update(o,this._channel),i.MurmurHash.finish(o,2)}equals(o){return o===this?!0:o instanceof n?this._channel===o._channel:!1}toString(){return `channel(${this._channel})`}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),e([s.Override],n.prototype,"toString",null),t.LexerChannelAction=n;}),R7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerCustomAction=void 0;var i=qt(),s=fe(),n=class{constructor(o,a){this._ruleIndex=o,this._actionIndex=a;}get ruleIndex(){return this._ruleIndex}get actionIndex(){return this._actionIndex}get actionType(){return 1}get isPositionDependent(){return !0}execute(o){o.action(void 0,this._ruleIndex,this._actionIndex);}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),o=i.MurmurHash.update(o,this._ruleIndex),o=i.MurmurHash.update(o,this._actionIndex),i.MurmurHash.finish(o,3)}equals(o){return o===this?!0:o instanceof n?this._ruleIndex===o._ruleIndex&&this._actionIndex===o._actionIndex:!1}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),t.LexerCustomAction=n;}),N7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerModeAction=void 0;var i=qt(),s=fe(),n=class{constructor(o){this._mode=o;}get mode(){return this._mode}get actionType(){return 2}get isPositionDependent(){return !1}execute(o){o.mode(this._mode);}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),o=i.MurmurHash.update(o,this._mode),i.MurmurHash.finish(o,2)}equals(o){return o===this?!0:o instanceof n?this._mode===o._mode:!1}toString(){return `mode(${this._mode})`}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),e([s.Override],n.prototype,"toString",null),t.LexerModeAction=n;}),O7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerMoreAction=void 0;var i=qt(),s=fe(),n=class{constructor(){}get actionType(){return 3}get isPositionDependent(){return !1}execute(o){o.more();}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),i.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return "more"}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),e([s.Override],n.prototype,"toString",null),t.LexerMoreAction=n,function(o){o.INSTANCE=new o;}(n=t.LexerMoreAction||(t.LexerMoreAction={}));}),F7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerPopModeAction=void 0;var i=qt(),s=fe(),n=class{constructor(){}get actionType(){return 4}get isPositionDependent(){return !1}execute(o){o.popMode();}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),i.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return "popMode"}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),e([s.Override],n.prototype,"toString",null),t.LexerPopModeAction=n,function(o){o.INSTANCE=new o;}(n=t.LexerPopModeAction||(t.LexerPopModeAction={}));}),L7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerPushModeAction=void 0;var i=qt(),s=fe(),n=class{constructor(o){this._mode=o;}get mode(){return this._mode}get actionType(){return 5}get isPositionDependent(){return !1}execute(o){o.pushMode(this._mode);}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),o=i.MurmurHash.update(o,this._mode),i.MurmurHash.finish(o,2)}equals(o){return o===this?!0:o instanceof n?this._mode===o._mode:!1}toString(){return `pushMode(${this._mode})`}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),e([s.Override],n.prototype,"toString",null),t.LexerPushModeAction=n;}),P7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerSkipAction=void 0;var i=qt(),s=fe(),n=class{constructor(){}get actionType(){return 6}get isPositionDependent(){return !1}execute(o){o.skip();}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),i.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return "skip"}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),e([s.Override],n.prototype,"toString",null),t.LexerSkipAction=n,function(o){o.INSTANCE=new o;}(n=t.LexerSkipAction||(t.LexerSkipAction={}));}),I7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerTypeAction=void 0;var i=qt(),s=fe(),n=class{constructor(o){this._type=o;}get type(){return this._type}get actionType(){return 7}get isPositionDependent(){return !1}execute(o){o.type=this._type;}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),o=i.MurmurHash.update(o,this._type),i.MurmurHash.finish(o,2)}equals(o){return o===this?!0:o instanceof n?this._type===o._type:!1}toString(){return `type(${this._type})`}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),e([s.Override],n.prototype,"toString",null),t.LexerTypeAction=n;}),Db=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.LoopEndState=void 0;var r=Ci(),i=Qt(),s=fe(),n=class extends r.ATNState{get stateType(){return i.ATNStateType.LOOP_END}};e([s.Override],n.prototype,"stateType",null),t.LoopEndState=n;}),k7=re(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.ConflictInfo=void 0;var r=fe(),i=ei(),s=class{constructor(n,o){this._conflictedAlts=n,this.exact=o;}get conflictedAlts(){return this._conflictedAlts}get isExact(){return this.exact}equals(n){return n===this?!0:n instanceof s?this.isExact===n.isExact&&i.equals(this.conflictedAlts,n.conflictedAlts):!1}hashCode(){return this.conflictedAlts.hashCode()}};e([r.Override],s.prototype,"equals",null),e([r.Override],s.prototype,"hashCode",null),t.ConflictInfo=s;}),lo=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalNode=void 0;var r=mr(),i=fe(),s=At(),n=class{constructor(o){this._symbol=o;}getChild(o){throw new RangeError("Terminal Node has no children.")}get symbol(){return this._symbol}get parent(){return this._parent}setParent(o){this._parent=o;}get payload(){return this._symbol}get sourceInterval(){let o=this._symbol.tokenIndex;return new r.Interval(o,o)}get childCount(){return 0}accept(o){return o.visitTerminal(this)}get text(){return this._symbol.text||""}toStringTree(o){return this.toString()}toString(){return this._symbol.type===s.Token.EOF?"<EOF>":this._symbol.text||""}};e([i.Override],n.prototype,"getChild",null),e([i.Override],n.prototype,"parent",null),e([i.Override],n.prototype,"setParent",null),e([i.Override],n.prototype,"payload",null),e([i.Override],n.prototype,"sourceInterval",null),e([i.Override],n.prototype,"childCount",null),e([i.Override],n.prototype,"accept",null),e([i.Override],n.prototype,"text",null),e([i.Override],n.prototype,"toStringTree",null),e([i.Override],n.prototype,"toString",null),t.TerminalNode=n;}),dc=re(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorNode=void 0;var r=fe(),i=lo(),s=class extends i.TerminalNode{constructor(n){super(n);}accept(n){return n.visitErrorNode(this)}};e([r.Override],s.prototype,"accept",null),t.ErrorNode=s;}),Fp=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RuleNode=void 0;var e=class{};t.RuleNode=e;}),hs=re(t=>{var e=t&&t.__decorate||function(m,g,v,x){var _=arguments.length,E=_<3?g:x===null?x=Object.getOwnPropertyDescriptor(g,v):x,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(m,g,v,x);else for(var w=m.length-1;w>=0;w--)(b=m[w])&&(E=(_<3?b(E):_>3?b(g,v,E):b(g,v))||E);return _>3&&E&&Object.defineProperty(g,v,E),E},r=t&&t.__param||function(m,g){return function(v,x){g(v,x,m);}};Object.defineProperty(t,"__esModule",{value:!0}),t.Trees=void 0;var i=ti(),s=Ma(),n=dc(),o=fe(),a=Va(),u=$r(),l=Fp(),h=lo(),c=At(),d=ei(),f=class{static toStringTree(m,g){let v;g instanceof a.Parser?v=g.ruleNames:v=g;let x=d.escapeWhitespace(this.getNodeText(m,v),!1);if(m.childCount===0)return x;let _="";_+="(",x=d.escapeWhitespace(this.getNodeText(m,v),!1),_+=x,_+=" ";for(let E=0;E<m.childCount;E++)E>0&&(_+=" "),_+=this.toStringTree(m.getChild(E),v);return _+=")",_}static getNodeText(m,g){let v;if(g instanceof a.Parser)v=g.ruleNames;else if(g)v=g;else {let x=m.payload;return typeof x.text=="string"?x.text:m.payload.toString()}if(m instanceof l.RuleNode){let x=m.ruleContext,_=x.ruleIndex,E=v[_],b=x.altNumber;return b!==i.ATN.INVALID_ALT_NUMBER?E+":"+b:E}else {if(m instanceof n.ErrorNode)return m.toString();if(m instanceof h.TerminalNode)return m.symbol.text||""}throw new TypeError("Unexpected node type")}static getChildren(m){let g=[];for(let v=0;v<m.childCount;v++)g.push(m.getChild(v));return g}static getAncestors(m){let g=[],v=m.parent;for(;v;)g.unshift(v),v=v.parent;return g}static isAncestorOf(m,g){if(!m||!g||!m.parent)return !1;let v=g.parent;for(;v;){if(m===v)return !0;v=v.parent;}return !1}static findAllTokenNodes(m,g){return f.findAllNodes(m,g,!0)}static findAllRuleNodes(m,g){return f.findAllNodes(m,g,!1)}static findAllNodes(m,g,v){let x=[];return f._findAllNodes(m,g,v,x),x}static _findAllNodes(m,g,v,x){v&&m instanceof h.TerminalNode?m.symbol.type===g&&x.push(m):!v&&m instanceof u.ParserRuleContext&&m.ruleIndex===g&&x.push(m);for(let _=0;_<m.childCount;_++)f._findAllNodes(m.getChild(_),g,v,x);}static getDescendants(m){let g=[];function v(x){g.push(x);let _=x.childCount;for(let E=0;E<_;E++)v(x.getChild(E));}return v(m),g}static getRootOfSubtreeEnclosingRegion(m,g,v){let x=m.childCount;for(let _=0;_<x;_++){let E=m.getChild(_),b=f.getRootOfSubtreeEnclosingRegion(E,g,v);if(b)return b}if(m instanceof u.ParserRuleContext){let _=m.stop;if(g>=m.start.tokenIndex&&(_==null||v<=_.tokenIndex))return m}}static stripChildrenOutOfRange(m,g,v,x){if(!m)return;let _=m.childCount;for(let E=0;E<_;E++){let b=m.getChild(E),w=b.sourceInterval;if(b instanceof u.ParserRuleContext&&(w.b<v||w.a>x)&&f.isAncestorOf(b,g)){let D=new s.CommonToken(c.Token.INVALID_TYPE,"...");m.children[E]=new h.TerminalNode(D);}}}static findNodeSuchThat(m,g){if(g(m))return m;let v=m.childCount;for(let x=0;x<v;x++){let _=f.findNodeSuchThat(m.getChild(x),g);if(_!==void 0)return _}}};e([r(0,o.NotNull)],f,"toStringTree",null),e([o.NotNull,r(0,o.NotNull)],f,"getAncestors",null),e([r(0,o.NotNull)],f,"getRootOfSubtreeEnclosingRegion",null),t.Trees=f;}),Sb=re(t=>{var e=t&&t.__decorate||function(h,c,d,f){var m=arguments.length,g=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,d):f,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(h,c,d,f);else for(var x=h.length-1;x>=0;x--)(v=h[x])&&(g=(m<3?v(g):m>3?v(c,d,g):v(c,d))||g);return m>3&&g&&Object.defineProperty(c,d,g),g};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleContext=void 0;var r=ti(),i=ja(),s=Fp(),n=mr(),o=fe(),a=hs(),u=$r(),l=class extends s.RuleNode{constructor(h,c){super(),this._parent=h,this.invokingState=c!=null?c:-1;}static getChildContext(h,c){return new l(h,c)}depth(){let h=0,c=this;for(;c;)c=c._parent,h++;return h}get isEmpty(){return this.invokingState===-1}get sourceInterval(){return n.Interval.INVALID}get ruleContext(){return this}get parent(){return this._parent}setParent(h){this._parent=h;}get payload(){return this}get text(){if(this.childCount===0)return "";let h="";for(let c=0;c<this.childCount;c++)h+=this.getChild(c).text;return h.toString()}get ruleIndex(){return -1}get altNumber(){return r.ATN.INVALID_ALT_NUMBER}set altNumber(h){}getChild(h){throw new RangeError("i must be greater than or equal to 0 and less than childCount")}get childCount(){return 0}accept(h){return h.visitChildren(this)}toStringTree(h){return a.Trees.toStringTree(this,h)}toString(h,c){let d=h instanceof i.Recognizer?h.ruleNames:h;c=c||u.ParserRuleContext.emptyContext();let f="",m=this;for(f+="[";m&&m!==c;){if(!d)m.isEmpty||(f+=m.invokingState);else {let g=m.ruleIndex,v=g>=0&&g<d.length?d[g]:g.toString();f+=v;}m._parent&&(d||!m._parent.isEmpty)&&(f+=" "),m=m._parent;}return f+="]",f.toString()}};e([o.Override],l.prototype,"sourceInterval",null),e([o.Override],l.prototype,"ruleContext",null),e([o.Override],l.prototype,"parent",null),e([o.Override],l.prototype,"setParent",null),e([o.Override],l.prototype,"payload",null),e([o.Override],l.prototype,"text",null),e([o.Override],l.prototype,"getChild",null),e([o.Override],l.prototype,"childCount",null),e([o.Override],l.prototype,"accept",null),e([o.Override],l.prototype,"toStringTree",null),t.RuleContext=l;}),$r=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserRuleContext=void 0;var r=dc(),i=mr(),s=fe(),n=Sb(),o=lo(),a=class extends n.RuleContext{constructor(u,l){l==null?super():super(u,l);}static emptyContext(){return a.EMPTY}copyFrom(u){if(this._parent=u._parent,this.invokingState=u.invokingState,this._start=u._start,this._stop=u._stop,u.children){this.children=[];for(let l of u.children)l instanceof r.ErrorNode&&this.addChild(l);}}enterRule(u){}exitRule(u){}addAnyChild(u){return this.children?this.children.push(u):this.children=[u],u}addChild(u){if(u instanceof o.TerminalNode){u.setParent(this),this.addAnyChild(u);return}else if(u instanceof n.RuleContext){this.addAnyChild(u);return}else return u=new o.TerminalNode(u),this.addAnyChild(u),u.setParent(this),u}addErrorNode(u){if(u instanceof r.ErrorNode){let l=u;return l.setParent(this),this.addAnyChild(l)}else {let l=u,h=new r.ErrorNode(l);return this.addAnyChild(h),h.setParent(this),h}}removeLastChild(){this.children&&this.children.pop();}get parent(){let u=super.parent;if(u===void 0||u instanceof a)return u;throw new TypeError("Invalid parent type for ParserRuleContext")}getChild(u,l){if(!this.children||u<0||u>=this.children.length)throw new RangeError("index parameter must be between >= 0 and <= number of children.");if(l==null)return this.children[u];let h=this.tryGetChild(u,l);if(h===void 0)throw new Error("The specified node does not exist");return h}tryGetChild(u,l){if(!this.children||u<0||u>=this.children.length)return;let h=-1;for(let c of this.children)if(c instanceof l&&(h++,h===u))return c}getToken(u,l){let h=this.tryGetToken(u,l);if(h===void 0)throw new Error("The specified token does not exist");return h}tryGetToken(u,l){if(!this.children||l<0||l>=this.children.length)return;let h=-1;for(let c of this.children)if(c instanceof o.TerminalNode&&c.symbol.type===u&&(h++,h===l))return c}getTokens(u){let l=[];if(!this.children)return l;for(let h of this.children)h instanceof o.TerminalNode&&h.symbol.type===u&&l.push(h);return l}get ruleContext(){return this}getRuleContext(u,l){return this.getChild(u,l)}tryGetRuleContext(u,l){return this.tryGetChild(u,l)}getRuleContexts(u){let l=[];if(!this.children)return l;for(let h of this.children)h instanceof u&&l.push(h);return l}get childCount(){return this.children?this.children.length:0}get sourceInterval(){return this._start?!this._stop||this._stop.tokenIndex<this._start.tokenIndex?i.Interval.of(this._start.tokenIndex,this._start.tokenIndex-1):i.Interval.of(this._start.tokenIndex,this._stop.tokenIndex):i.Interval.INVALID}get start(){return this._start}get stop(){return this._stop}toInfoString(u){return "ParserRuleContext"+u.getRuleInvocationStack(this).reverse()+"{start="+this._start+", stop="+this._stop+"}"}};a.EMPTY=new a,e([s.Override],a.prototype,"parent",null),e([s.Override],a.prototype,"childCount",null),e([s.Override],a.prototype,"sourceInterval",null),t.ParserRuleContext=a;}),M7=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.PredictionMode=void 0;var r=uo(),i=qt(),s=fe(),n=qa();((function(a){a[a.SLL=0]="SLL",a[a.LL=1]="LL",a[a.LL_EXACT_AMBIG_DETECTION=2]="LL_EXACT_AMBIG_DETECTION";}))(t.PredictionMode||(t.PredictionMode={})),function(a){class u extends r.Array2DHashMap{constructor(){super(l.INSTANCE);}}class l{AltAndContextConfigEqualityComparator(){}hashCode(f){let m=i.MurmurHash.initialize(7);return m=i.MurmurHash.update(m,f.state.stateNumber),m=i.MurmurHash.update(m,f.context),m=i.MurmurHash.finish(m,2),m}equals(f,m){return f===m?!0:f==null||m==null?!1:f.state.stateNumber===m.state.stateNumber&&f.context.equals(m.context)}}l.INSTANCE=new l,e([s.Override],l.prototype,"hashCode",null),e([s.Override],l.prototype,"equals",null);function h(d){for(let f of d)if(f.state instanceof n.RuleStopState)return !0;return !1}a.hasConfigInRuleStopState=h;function c(d){for(let f of d)if(!(f.state instanceof n.RuleStopState))return !1;return !0}a.allConfigsInRuleStopStates=c;}(t.PredictionMode||(t.PredictionMode={}));}),Rb=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.SimulatorState=void 0;var i=fe(),s=$r(),n=class{constructor(a,u,l,h){this.outerContext=a!=null?a:s.ParserRuleContext.emptyContext(),this.s0=u,this.useContext=l,this.remainingOuterContext=h;}};n=e([r(1,i.NotNull)],n),t.SimulatorState=n;}),Ha=re(t=>{var e=t&&t.__decorate||function(q,B,T,P){var H=arguments.length,z=H<3?B:P===null?P=Object.getOwnPropertyDescriptor(B,T):P,G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(q,B,T,P);else for(var oe=q.length-1;oe>=0;oe--)(G=q[oe])&&(z=(H<3?G(z):H>3?G(B,T,z):G(B,T))||z);return H>3&&z&&Object.defineProperty(B,T,z),z},r=t&&t.__param||function(q,B){return function(T,P){B(T,P,q);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserATNSimulator=void 0;var i=mb(),s=Ab(),n=on(),o=Cp(),a=ti(),u=ac(),l=Ba(),h=lc(),c=Qt(),d=wb(),f=an(),m=k7(),g=ls(),v=uc(),x=Tp(),_=mr(),E=rn(),b=fe(),w=Np(),D=mc(),N=Qr(),F=$r(),V=Vr(),Z=wp(),te=M7(),ae=qa(),k=Op(),y=ao(),C=Rp(),S=Rb(),R=At(),L=un(),I=ge("assert"),K=65535,j=-(1<<31>>>0),A=class qe extends h.ATNSimulator{constructor(B,T){super(B),this.predictionMode=te.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=T;}getPredictionMode(){return this.predictionMode}setPredictionMode(B){this.predictionMode=B;}reset(){}adaptivePredict(B,T,P,H){H===void 0&&(H=!1);let z=this.atn.decisionToDFA[T];if(I(z!=null),this.optimize_ll1&&!z.isPrecedenceDfa&&!z.isEmpty){let X=B.LA(1);if(X>=0&&X<=65535){let ee=(T<<16>>>0)+X,U=this.atn.LL1Table.get(ee);if(U!=null)return U}}this.dfa=z,this.force_global_context?H=!0:this.always_try_local_context||(H=H||z.isContextSensitive),this.userWantsCtxSensitive=H||this.predictionMode!==te.PredictionMode.SLL&&P!=null&&!this.atn.decisionToState[T].sll,P==null&&(P=F.ParserRuleContext.emptyContext());let G;z.isEmpty||(G=this.getStartState(z,B,P,H)),G==null&&(P==null&&(P=F.ParserRuleContext.emptyContext()),qe.debug&&console.log("ATN decision "+z.decision+" exec LA(1)=="+this.getLookaheadName(B)+", outerContext="+P.toString(this._parser)),G=this.computeStartState(z,P,H));let oe=B.mark(),se=B.index;try{let X=this.execDFA(z,B,se,G);return qe.debug&&console.log("DFA after predictATN: "+z.toString(this._parser.vocabulary,this._parser.ruleNames)),X}finally{this.dfa=void 0,B.seek(se),B.release(oe);}}getStartState(B,T,P,H){if(!H)if(B.isPrecedenceDfa){let oe=B.getPrecedenceStartState(this._parser.precedence,!1);return oe==null?void 0:new S.SimulatorState(P,oe,!1,P)}else return B.s0==null?void 0:new S.SimulatorState(P,B.s0,!1,P);if(!this.enable_global_context_dfa)return;let z=P;I(P!=null);let G;for(B.isPrecedenceDfa?G=B.getPrecedenceStartState(this._parser.precedence,!0):G=B.s0full;z!=null&&G!=null&&G.isContextSensitive;)z=this.skipTailCalls(z),G=G.getContextTarget(this.getReturnState(z)),z.isEmpty?I(G==null||!G.isContextSensitive):z=z.parent;if(G!=null)return new S.SimulatorState(P,G,H,z)}execDFA(B,T,P,H){let z=H.outerContext;qe.dfa_debug&&console.log("DFA decision "+B.decision+" exec LA(1)=="+this.getLookaheadName(T)+", outerContext="+z.toString(this._parser)),qe.dfa_debug&&console.log(B.toString(this._parser.vocabulary,this._parser.ruleNames));let G=H.s0,oe=T.LA(1),se=H.remainingOuterContext;for(;;){if(qe.dfa_debug&&console.log("DFA state "+G.stateNumber+" LA(1)=="+this.getLookaheadName(T)),H.useContext)for(;G.isContextSymbol(oe);){let U;if(se!=null&&(se=this.skipTailCalls(se),U=G.getContextTarget(this.getReturnState(se))),U==null){let M=new S.SimulatorState(H.outerContext,G,H.useContext,se);return this.execATN(B,T,P,M)}I(se!=null),se=se.parent,G=U;}if(this.isAcceptState(G,H.useContext)){G.predicates!=null?qe.dfa_debug&&console.log("accept "+G):qe.dfa_debug&&console.log("accept; predict "+G.prediction+" in state "+G.stateNumber);break}I(!this.isAcceptState(G,H.useContext));let ee=this.getExistingTargetState(G,oe);if(ee==null){qe.dfa_debug&&oe>=0&&console.log("no edge for "+this._parser.vocabulary.getDisplayName(oe));let U;if(qe.dfa_debug){let J=_.Interval.of(P,this._parser.inputStream.index);console.log("ATN exec upon "+this._parser.inputStream.getText(J)+" at DFA state "+G.stateNumber);}let M=new S.SimulatorState(z,G,H.useContext,se);return U=this.execATN(B,T,P,M),qe.dfa_debug&&console.log("back from DFA update, alt="+U+`, dfa=
69
- `+B.toString(this._parser.vocabulary,this._parser.ruleNames)),qe.dfa_debug&&console.log("DFA decision "+B.decision+" predicts "+U),U}else if(ee===h.ATNSimulator.ERROR){let U=new S.SimulatorState(z,G,H.useContext,se);return this.handleNoViableAlt(T,P,U)}G=ee,!this.isAcceptState(G,H.useContext)&&oe!==E.IntStream.EOF&&(T.consume(),oe=T.LA(1));}if(!H.useContext&&G.configs.conflictInfo!=null&&B.atnStartState instanceof g.DecisionState&&!(!this.userWantsCtxSensitive||!G.configs.dipsIntoOuterContext&&G.configs.isExactConflict||this.treat_sllk1_conflict_as_ambiguity&&T.index===P)){I(!H.useContext);let ee,U=G.predicates;if(U!=null){let M=T.index;if(M!==P&&T.seek(P),ee=this.evalSemanticContext(U,z,!0),ee.cardinality()===1)return ee.nextSetBit(0);M!==P&&T.seek(M);}if(this.reportAmbiguities){let M=new S.SimulatorState(z,G,H.useContext,se);this.reportAttemptingFullContext(B,ee,M,P,T.index);}return T.seek(P),this.adaptivePredict(T,B.decision,z,!0)}let X=G.predicates;if(X!=null){let ee=T.index;P!==ee&&T.seek(P);let U=this.evalSemanticContext(X,z,this.reportAmbiguities&&this.predictionMode===te.PredictionMode.LL_EXACT_AMBIG_DETECTION);switch(U.cardinality()){case 0:throw this.noViableAlt(T,z,G.configs,P);case 1:return U.nextSetBit(0);default:return P!==ee&&T.seek(ee),this.reportAmbiguity(B,G,P,ee,G.configs.isExactConflict,U,G.configs),U.nextSetBit(0)}}return qe.dfa_debug&&console.log("DFA decision "+B.decision+" predicts "+G.prediction),G.prediction}isAcceptState(B,T){return B.isAcceptState?B.configs.conflictingAlts==null?!0:T&&this.predictionMode===te.PredictionMode.LL_EXACT_AMBIG_DETECTION?B.configs.isExactConflict:!0:!1}execATN(B,T,P,H){qe.debug&&console.log("execATN decision "+B.decision+" exec LA(1)=="+this.getLookaheadName(T));let z=H.outerContext,G=H.useContext,oe=T.LA(1),se=H,X=new Z.PredictionContextCache;for(;;){let ee=this.computeReachSet(B,se,oe,X);if(ee==null)return this.setDFAEdge(se.s0,T.LA(1),h.ATNSimulator.ERROR),this.handleNoViableAlt(T,P,se);let U=ee.s0;if(I(U.isAcceptState||U.prediction===a.ATN.INVALID_ALT_NUMBER),I(U.isAcceptState||U.configs.conflictInfo==null),this.isAcceptState(U,G)){let M=U.configs.conflictingAlts,J=M==null?U.prediction:a.ATN.INVALID_ALT_NUMBER;if(J!==a.ATN.INVALID_ALT_NUMBER){if(this.optimize_ll1&&T.index===P&&!B.isPrecedenceDfa&&ee.outerContext===ee.remainingOuterContext&&B.decision>=0&&!U.configs.hasSemanticContext&&oe>=0&&oe<=K){let ne=(B.decision<<16>>>0)+oe;this.atn.LL1Table.set(ne,J);}G&&this.always_try_local_context&&this.reportContextSensitivity(B,J,ee,P,T.index);}J=U.prediction;let W=M!=null&&this.userWantsCtxSensitive;if(W&&(W=!G&&(U.configs.dipsIntoOuterContext||!U.configs.isExactConflict)&&(!this.treat_sllk1_conflict_as_ambiguity||T.index!==P)),U.configs.hasSemanticContext){let ne=U.predicates;if(ne!=null){let le=T.index;switch(le!==P&&T.seek(P),M=this.evalSemanticContext(ne,z,W||this.reportAmbiguities),M.cardinality()){case 0:throw this.noViableAlt(T,z,U.configs,P);case 1:return M.nextSetBit(0);}le!==P&&T.seek(le);}}if(W){I(!G),I(this.isAcceptState(U,!1)),qe.debug&&console.log("RETRY with outerContext="+z);let ne=this.computeStartState(B,z,!0);return this.reportAmbiguities&&this.reportAttemptingFullContext(B,M,ee,P,T.index),T.seek(P),this.execATN(B,T,P,ne)}else return M!=null&&(this.reportAmbiguities&&M.cardinality()>1&&this.reportAmbiguity(B,U,P,T.index,U.configs.isExactConflict,M,U.configs),J=M.nextSetBit(0)),J}se=ee,oe!==E.IntStream.EOF&&(T.consume(),oe=T.LA(1));}}handleNoViableAlt(B,T,P){if(P.s0!=null){let H=new f.BitSet,z=0;for(let G of P.s0.configs)(G.reachesIntoOuterContext||G.state instanceof ae.RuleStopState)&&(H.set(G.alt),z=Math.max(z,G.alt));switch(H.cardinality()){case 0:break;case 1:return H.nextSetBit(0);default:if(!P.s0.configs.hasSemanticContext)return H.nextSetBit(0);let G=new l.ATNConfigSet;for(let se of P.s0.configs)(se.reachesIntoOuterContext||se.state instanceof ae.RuleStopState)&&G.add(se);let oe=this.getPredsForAmbigAlts(H,G,z);if(oe!=null){let se=this.getPredicatePredictions(H,oe);if(se!=null){let X=B.index;try{B.seek(T);let ee=this.evalSemanticContext(se,P.outerContext,!1);if(!ee.isEmpty)return ee.nextSetBit(0)}finally{B.seek(X);}}}return H.nextSetBit(0)}}throw this.noViableAlt(B,P.outerContext,P.s0.configs,T)}computeReachSet(B,T,P,H){let z=T.useContext,G=T.remainingOuterContext,oe=T.s0;if(z)for(;oe.isContextSymbol(P);){let ee;if(G!=null&&(G=this.skipTailCalls(G),ee=oe.getContextTarget(this.getReturnState(G))),ee==null)break;I(G!=null),G=G.parent,oe=ee;}if(I(!this.isAcceptState(oe,z)),this.isAcceptState(oe,z))return new S.SimulatorState(T.outerContext,oe,z,G);let se=oe,X=this.getExistingTargetState(se,P);if(X==null){let ee=this.computeTargetState(B,se,G,P,z,H);X=ee[0],G=ee[1];}if(X!==h.ATNSimulator.ERROR)return I(!z||!X.configs.dipsIntoOuterContext),new S.SimulatorState(T.outerContext,X,z,G)}getExistingTargetState(B,T){return B.getTarget(T)}computeTargetState(B,T,P,H,z,G){let oe=T.configs.toArray(),se,X=new l.ATNConfigSet,ee;do{let M=!z||P!=null;M||(X.isOutermostConfigSet=!0);let J=new l.ATNConfigSet,W;for(let Q of oe){if(qe.debug&&console.log("testing "+this.getTokenName(H)+" at "+Q.toString()),Q.state instanceof ae.RuleStopState){I(Q.context.isEmpty),(z&&!Q.reachesIntoOuterContext||H===E.IntStream.EOF)&&(W==null&&(W=[]),W.push(Q));continue}let _e=Q.state.numberOfOptimizedTransitions;for(let Se=0;Se<_e;Se++){let ye=Q.state.getOptimizedTransition(Se),Ce=this.getReachableTarget(Q,ye,H);Ce!=null&&J.add(Q.transform(Ce,!1),G);}}if(this.optimize_unique_closure&&W==null&&H!==R.Token.EOF&&J.uniqueAlt!==a.ATN.INVALID_ALT_NUMBER){J.isOutermostConfigSet=X.isOutermostConfigSet,X=J;break}let ne=!1,le=H===R.Token.EOF;if(this.closure(J,X,ne,M,G,le),ee=X.dipsIntoOuterContext,H===E.IntStream.EOF&&(X=this.removeAllConfigsNotInRuleStopState(X,G)),W!=null&&(!z||!te.PredictionMode.hasConfigInRuleStopState(X))){I(W.length>0);for(let Q of W)X.add(Q,G);}if(z&&ee){X.clear(),P=P,P=this.skipTailCalls(P);let Q=this.getReturnState(P);if(se==null&&(se=new x.IntegerList),P.isEmpty?P=void 0:P=P.parent,se.add(Q),Q!==V.PredictionContext.EMPTY_FULL_STATE_KEY)for(let _e=0;_e<oe.length;_e++)oe[_e]=oe[_e].appendContext(Q,G);}}while(z&&ee);return X.isEmpty?(this.setDFAEdge(T,H,h.ATNSimulator.ERROR),[h.ATNSimulator.ERROR,P]):[this.addDFAEdge(B,T,H,se,X,G),P]}removeAllConfigsNotInRuleStopState(B,T){if(te.PredictionMode.allConfigsInRuleStopStates(B))return B;let P=new l.ATNConfigSet;for(let H of B)H.state instanceof ae.RuleStopState&&P.add(H,T);return P}computeStartState(B,T,P){let H=B.isPrecedenceDfa?B.getPrecedenceStartState(this._parser.precedence,P):P?B.s0full:B.s0;if(H!=null){if(!P)return new S.SimulatorState(T,H,P,T);H.setContextSensitive(this.atn);}B.decision;let G=B.atnStartState,oe=0,se=T,X=P?V.PredictionContext.EMPTY_FULL:V.PredictionContext.EMPTY_LOCAL,ee=new Z.PredictionContextCache;if(P){if(!this.enable_global_context_dfa)for(;se!=null;)se.isEmpty?(oe=V.PredictionContext.EMPTY_FULL_STATE_KEY,se=void 0):(oe=this.getReturnState(se),X=X.appendSingleContext(oe,ee),se=se.parent);for(;H!=null&&H.isContextSensitive&&se!=null;){let M;if(se=this.skipTailCalls(se),se.isEmpty?(M=H.getContextTarget(V.PredictionContext.EMPTY_FULL_STATE_KEY),oe=V.PredictionContext.EMPTY_FULL_STATE_KEY,se=void 0):(oe=this.getReturnState(se),M=H.getContextTarget(oe),X=X.appendSingleContext(oe,ee),se=se.parent),M==null)break;H=M;}}if(H!=null&&!H.isContextSensitive)return new S.SimulatorState(T,H,P,se);let U=new l.ATNConfigSet;for(;;){let M=new l.ATNConfigSet,J=G.numberOfTransitions;for(let Se=0;Se<J;Se++){let ye=G.transition(Se).target;M.add(u.ATNConfig.create(ye,Se+1,X));}let W=se!=null;W||(U.isOutermostConfigSet=!0),this.closure(M,U,!0,W,ee,!1);let le=U.dipsIntoOuterContext,Q;if(P&&!this.enable_global_context_dfa){H=this.addDFAState(B,U,ee);break}else H==null?B.isPrecedenceDfa?(U=this.applyPrecedenceFilter(U,T,ee),Q=this.addDFAState(B,U,ee),B.setPrecedenceStartState(this._parser.precedence,P,Q)):(Q=this.addDFAState(B,U,ee),P?B.s0full?Q=B.s0full:B.s0full=Q:B.s0?Q=B.s0:B.s0=Q):(B.isPrecedenceDfa&&(U=this.applyPrecedenceFilter(U,T,ee)),Q=this.addDFAState(B,U,ee),H.setContextTarget(oe,Q));if(H=Q,!P||!le)break;Q.setContextSensitive(this.atn),se=se,U.clear(),se=this.skipTailCalls(se);let _e=this.getReturnState(se);se.isEmpty?se=void 0:se=se.parent,_e!==V.PredictionContext.EMPTY_FULL_STATE_KEY&&(X=X.appendSingleContext(_e,ee)),oe=_e;}return new S.SimulatorState(T,H,P,se)}applyPrecedenceFilter(B,T,P){let H=new Map,z=new l.ATNConfigSet;for(let G of B){if(G.alt!==1)continue;let oe=G.semanticContext.evalPrecedence(this._parser,T);oe!=null&&(H.set(G.state.stateNumber,G.context),oe!==G.semanticContext?z.add(G.transform(G.state,!1,oe),P):z.add(G,P));}for(let G of B)if(G.alt!==1){if(!G.isPrecedenceFilterSuppressed){let oe=H.get(G.state.stateNumber);if(oe!=null&&oe.equals(G.context))continue}z.add(G,P);}return z}getReachableTarget(B,T,P){if(T.matches(P,0,this.atn.maxTokenType))return T.target}predicateDFAState(B,T,P){let H=this.getConflictingAltsFromConfigSet(T);if(!H)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.");qe.debug&&console.log("predicateDFAState "+B);let z=this.getPredsForAmbigAlts(H,T,P),G;return z!=null&&(G=this.getPredicatePredictions(H,z),B.predicates=G),G}getPredsForAmbigAlts(B,T,P){let H=new Array(P+1),z=H.length;for(let se of T)B.get(se.alt)&&(H[se.alt]=y.SemanticContext.or(H[se.alt],se.semanticContext));let G=0;for(let se=0;se<z;se++)H[se]==null?H[se]=y.SemanticContext.NONE:H[se]!==y.SemanticContext.NONE&&G++;let oe=H;return G===0&&(oe=void 0),qe.debug&&console.log("getPredsForAmbigAlts result "+(oe?o.Arrays.toString(oe):"undefined")),oe}getPredicatePredictions(B,T){let P=[],H=!1;for(let z=1;z<T.length;z++){let G=T[z];I(G!=null),B!=null&&B.get(z)&&G===y.SemanticContext.NONE?P.push(new v.DFAState.PredPrediction(G,z)):G!==y.SemanticContext.NONE&&(H=!0,P.push(new v.DFAState.PredPrediction(G,z)));}if(H)return P}evalSemanticContext(B,T,P){let H=new f.BitSet;for(let z of B){if(z.pred===y.SemanticContext.NONE){if(H.set(z.alt),!P)break;continue}let G=this.evalSemanticContextImpl(z.pred,T,z.alt);if((qe.debug||qe.dfa_debug)&&console.log("eval pred "+z+"="+G),G&&((qe.debug||qe.dfa_debug)&&console.log("PREDICT "+z.alt),H.set(z.alt),!P))break}return H}evalSemanticContextImpl(B,T,P){return B.eval(this._parser,T)}closure(B,T,P,H,z,G){z==null&&(z=Z.PredictionContextCache.UNCACHED);let oe=B,se=new n.Array2DHashSet(N.ObjectEqualityComparator.INSTANCE);for(;oe.size>0;){let X=new l.ATNConfigSet;for(let ee of oe)this.closureImpl(ee,T,X,se,P,H,z,0,G);oe=X;}}closureImpl(B,T,P,H,z,G,oe,se,X){if(qe.debug&&console.log("closure("+B.toString(this._parser,!0)+")"),B.state instanceof ae.RuleStopState)if(B.context.isEmpty)if(G)qe.debug&&console.log("FALLING off rule "+this.getRuleName(B.state.ruleIndex)),B.context===V.PredictionContext.EMPTY_FULL?B=B.transform(B.state,!1,V.PredictionContext.EMPTY_LOCAL):!B.reachesIntoOuterContext&&V.PredictionContext.isEmptyLocal(B.context)&&T.add(B,oe);else {T.add(B,oe);return}else {let U=B.context.hasEmpty,M=B.context.size-(U?1:0);for(let J=0;J<M;J++){let W=B.context.getParent(J),ne=this.atn.states[B.context.getReturnState(J)],le=u.ATNConfig.create(ne,B.alt,W,B.semanticContext);le.outerContextDepth=B.outerContextDepth,le.isPrecedenceFilterSuppressed=B.isPrecedenceFilterSuppressed,I(se>j),this.closureImpl(le,T,P,H,z,G,oe,se-1,X);}if(!U||!G)return;B=B.transform(B.state,!1,V.PredictionContext.EMPTY_LOCAL);}let ee=B.state;ee.onlyHasEpsilonTransitions||(T.add(B,oe),qe.debug&&console.log("added config "+T));for(let U=0;U<ee.numberOfOptimizedTransitions;U++){if(U===0&&ee.stateType===c.ATNStateType.STAR_LOOP_ENTRY&&ee.precedenceRuleDecision&&!B.context.hasEmpty){let ne=ee,le=!0;for(let Q=0;Q<B.context.size;Q++)if(!ne.precedenceLoopbackStates.get(B.context.getReturnState(Q))){le=!1;break}if(le)continue}let M=ee.getOptimizedTransition(U),J=!(M instanceof s.ActionTransition)&&z,W=this.getEpsilonTarget(B,M,J,se===0,oe,X);if(W!=null){if(M instanceof k.RuleTransition&&P!=null&&!z){P.add(W,oe);continue}let ne=se;if(B.state instanceof ae.RuleStopState){if(this.dfa!=null&&this.dfa.isPrecedenceDfa&&M.outermostPrecedenceReturn===this.dfa.atnStartState.ruleIndex&&(W.isPrecedenceFilterSuppressed=!0),W.outerContextDepth=W.outerContextDepth+1,!H.add(W))continue;I(ne>j),ne--,qe.debug&&console.log("dips into outer ctx: "+W);}else if(M instanceof k.RuleTransition)this.optimize_tail_calls&&M.optimizedTailCall&&(!this.tail_call_preserves_sll||!V.PredictionContext.isEmptyLocal(B.context))?(I(W.context===B.context),ne===0&&(ne--,!this.tail_call_preserves_sll&&V.PredictionContext.isEmptyLocal(B.context)&&(W.outerContextDepth=W.outerContextDepth+1))):ne>=0&&ne++;else if(!M.isEpsilon&&!H.add(W))continue;this.closureImpl(W,T,P,H,J,G,oe,ne,X);}}}getRuleName(B){return this._parser!=null&&B>=0?this._parser.ruleNames[B]:"<rule "+B+">"}getEpsilonTarget(B,T,P,H,z,G){switch(T.serializationType){case 3:return this.ruleTransition(B,T,z);case 10:return this.precedenceTransition(B,T,P,H);case 4:return this.predTransition(B,T,P,H);case 6:return this.actionTransition(B,T);case 1:return B.transform(T.target,!1);case 5:case 2:case 7:return G&&T.matches(R.Token.EOF,0,1)?B.transform(T.target,!1):void 0;default:return}}actionTransition(B,T){return qe.debug&&console.log("ACTION edge "+T.ruleIndex+":"+T.actionIndex),B.transform(T.target,!1)}precedenceTransition(B,T,P,H){qe.debug&&(console.log("PRED (collectPredicates="+P+") "+T.precedence+">=_p, ctx dependent=true"),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let z;if(P&&H){let G=y.SemanticContext.and(B.semanticContext,T.predicate);z=B.transform(T.target,!1,G);}else z=B.transform(T.target,!1);return qe.debug&&console.log("config from pred transition="+z),z}predTransition(B,T,P,H){qe.debug&&(console.log("PRED (collectPredicates="+P+") "+T.ruleIndex+":"+T.predIndex+", ctx dependent="+T.isCtxDependent),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let z;if(P&&(!T.isCtxDependent||T.isCtxDependent&&H)){let G=y.SemanticContext.and(B.semanticContext,T.predicate);z=B.transform(T.target,!1,G);}else z=B.transform(T.target,!1);return qe.debug&&console.log("config from pred transition="+z),z}ruleTransition(B,T,P){qe.debug&&console.log("CALL rule "+this.getRuleName(T.target.ruleIndex)+", ctx="+B.context);let H=T.followState,z;return this.optimize_tail_calls&&T.optimizedTailCall&&(!this.tail_call_preserves_sll||!V.PredictionContext.isEmptyLocal(B.context))?z=B.context:P!=null?z=P.getChild(B.context,H.stateNumber):z=B.context.getChild(H.stateNumber),B.transform(T.target,!1,z)}isConflicted(B,T){if(B.uniqueAlt!==a.ATN.INVALID_ALT_NUMBER||B.size<=1)return;let P=B.toArray();P.sort(qe.STATE_ALT_SORT_COMPARATOR);let H=!B.dipsIntoOuterContext,z=new f.BitSet,G=P[0].alt;z.set(G);let oe=P[0].state.nonStopStateNumber;for(let M of P){let J=M.state.nonStopStateNumber;if(J!==oe){if(M.alt!==G)return;oe=J;}}let se;if(H){oe=P[0].state.nonStopStateNumber,se=new f.BitSet;let M=G;for(let W of P){if(W.state.nonStopStateNumber!==oe)break;let ne=W.alt;se.set(ne),M=ne;}oe=P[0].state.nonStopStateNumber;let J=G;for(let W of P){let ne=W.state.nonStopStateNumber,le=W.alt;if(ne!==oe){if(J!==M){H=!1;break}oe=ne,J=G;}else if(le!==J){if(le!==se.nextSetBit(J+1)){H=!1;break}J=le;}}}oe=P[0].state.nonStopStateNumber;let X=0,ee=0,U=P[0].context;for(let M=1;M<P.length;M++){let J=P[M];if(J.alt!==G||J.state.nonStopStateNumber!==oe)break;ee=M,U=T.join(U,P[M].context);}for(let M=ee+1;M<P.length;M++){let J=P[M],W=J.state;if(z.set(J.alt),W.nonStopStateNumber!==oe){oe=W.nonStopStateNumber,X=M,ee=M,U=J.context;for(let Se=X+1;Se<P.length;Se++){let ye=P[Se];if(ye.alt!==G||ye.state.nonStopStateNumber!==oe)break;ee=Se,U=T.join(U,ye.context);}M=ee;continue}let ne=J.context,le=J.alt,Q=M;for(let Se=Q+1;Se<P.length;Se++){let ye=P[Se];if(ye.alt!==le||ye.state.nonStopStateNumber!==oe)break;Q=Se,ne=T.join(ne,ye.context);}M=Q;let _e=T.join(U,ne);if(!U.equals(_e))return;H=H&&U.equals(ne);}return new m.ConflictInfo(z,H)}getConflictingAltsFromConfigSet(B){let T=B.conflictingAlts;return T==null&&B.uniqueAlt!==a.ATN.INVALID_ALT_NUMBER&&(T=new f.BitSet,T.set(B.uniqueAlt)),T}getTokenName(B){if(B===R.Token.EOF)return "EOF";let P=(this._parser!=null?this._parser.vocabulary:L.VocabularyImpl.EMPTY_VOCABULARY).getDisplayName(B);return P===String(B)?P:P+"<"+B+">"}getLookaheadName(B){return this.getTokenName(B.LA(1))}dumpDeadEndConfigs(B){console.log("dead end configs: ");let T=B.deadEndConfigs;if(T)for(let P of T){let H="no edges";if(P.state.numberOfOptimizedTransitions>0){let z=P.state.getOptimizedTransition(0);z instanceof d.AtomTransition?H="Atom "+this.getTokenName(z._label):z instanceof C.SetTransition&&(H=(z instanceof w.NotSetTransition?"~":"")+"Set "+z.set.toString());}console.log(P.toString(this._parser,!0)+":"+H);}}noViableAlt(B,T,P,H){return new D.NoViableAltException(this._parser,B,B.get(H),B.LT(1),P,T)}getUniqueAlt(B){let T=a.ATN.INVALID_ALT_NUMBER;for(let P of B)if(T===a.ATN.INVALID_ALT_NUMBER)T=P.alt;else if(P.alt!==T)return a.ATN.INVALID_ALT_NUMBER;return T}configWithAltAtStopState(B,T){for(let P of B)if(P.alt===T&&P.state instanceof ae.RuleStopState)return !0;return !1}addDFAEdge(B,T,P,H,z,G){I(H==null||H.isEmpty||B.isContextSensitive);let oe=T,se=this.addDFAState(B,z,G);if(H!=null)for(let X of H.toArray()){if(X===V.PredictionContext.EMPTY_FULL_STATE_KEY&&oe.configs.isOutermostConfigSet)continue;oe.setContextSensitive(this.atn),oe.setContextSymbol(P);let ee=oe.getContextTarget(X);if(ee!=null){oe=ee;continue}ee=this.addDFAContextState(B,oe.configs,X,G),I(X!==V.PredictionContext.EMPTY_FULL_STATE_KEY||ee.configs.isOutermostConfigSet),oe.setContextTarget(X,ee),oe=ee;}return qe.debug&&console.log("EDGE "+oe+" -> "+se+" upon "+this.getTokenName(P)),this.setDFAEdge(oe,P,se),qe.debug&&console.log(`DFA=
70
- `+B.toString(this._parser!=null?this._parser.vocabulary:L.VocabularyImpl.EMPTY_VOCABULARY,this._parser!=null?this._parser.ruleNames:void 0)),se}setDFAEdge(B,T,P){B!=null&&B.setTarget(T,P);}addDFAContextState(B,T,P,H){if(P!==V.PredictionContext.EMPTY_FULL_STATE_KEY){let z=new l.ATNConfigSet;for(let G of T)z.add(G.appendContext(P,H));return this.addDFAState(B,z,H)}else return I(!T.isOutermostConfigSet,"Shouldn't be adding a duplicate edge."),T=T.clone(!0),T.isOutermostConfigSet=!0,this.addDFAState(B,T,H)}addDFAState(B,T,P){let H=this.enable_global_context_dfa||!T.isOutermostConfigSet;if(H){T.isReadOnly||T.optimizeConfigs(this);let X=this.createDFAState(B,T),ee=B.states.get(X);if(ee!=null)return ee}T.isReadOnly||T.conflictInfo==null&&(T.conflictInfo=this.isConflicted(T,P));let z=this.createDFAState(B,T.clone(!0)),G=this.atn.getDecisionState(B.decision),oe=this.getUniqueAlt(T);if(oe!==a.ATN.INVALID_ALT_NUMBER)z.acceptStateInfo=new i.AcceptStateInfo(oe);else if(T.conflictingAlts!=null){let X=T.conflictingAlts;X&&(z.acceptStateInfo=new i.AcceptStateInfo(X.nextSetBit(0)));}if(z.isAcceptState&&T.hasSemanticContext&&this.predicateDFAState(z,T,G.numberOfTransitions),!H)return z;let se=B.addState(z);return qe.debug&&se===z&&console.log("adding new DFA state: "+z),se}createDFAState(B,T){return new v.DFAState(T)}reportAttemptingFullContext(B,T,P,H,z){if(qe.debug||qe.retry_debug){let G=_.Interval.of(H,z);console.log("reportAttemptingFullContext decision="+B.decision+":"+P.s0.configs+", input="+this._parser.inputStream.getText(G));}if(this._parser!=null){let G=this._parser.getErrorListenerDispatch();G.reportAttemptingFullContext&&G.reportAttemptingFullContext(this._parser,B,H,z,T,P);}}reportContextSensitivity(B,T,P,H,z){if(qe.debug||qe.retry_debug){let G=_.Interval.of(H,z);console.log("reportContextSensitivity decision="+B.decision+":"+P.s0.configs+", input="+this._parser.inputStream.getText(G));}if(this._parser!=null){let G=this._parser.getErrorListenerDispatch();G.reportContextSensitivity&&G.reportContextSensitivity(this._parser,B,H,z,T,P);}}reportAmbiguity(B,T,P,H,z,G,oe){if(qe.debug||qe.retry_debug){let se=_.Interval.of(P,H);console.log("reportAmbiguity "+G+":"+oe+", input="+this._parser.inputStream.getText(se));}if(this._parser!=null){let se=this._parser.getErrorListenerDispatch();se.reportAmbiguity&&se.reportAmbiguity(this._parser,B,P,H,z,G,oe);}}getReturnState(B){return B.isEmpty?V.PredictionContext.EMPTY_FULL_STATE_KEY:this.atn.states[B.invokingState].transition(0).followState.stateNumber}skipTailCalls(B){if(!this.optimize_tail_calls)return B;for(;!B.isEmpty;){let T=this.atn.states[B.invokingState];if(I(T.numberOfTransitions===1&&T.transition(0).serializationType===3),!T.transition(0).tailCall)break;B=B.parent;}return B}get parser(){return this._parser}};A.debug=!1,A.dfa_debug=!1,A.retry_debug=!1,A.STATE_ALT_SORT_COMPARATOR=(q,B)=>{let T=q.state.nonStopStateNumber-B.state.nonStopStateNumber;return T!==0||(T=q.alt-B.alt,T!==0)?T:0},e([b.NotNull],A.prototype,"predictionMode",void 0),e([b.NotNull],A.prototype,"getPredictionMode",null),e([r(0,b.NotNull)],A.prototype,"setPredictionMode",null),e([b.Override],A.prototype,"reset",null),e([r(0,b.NotNull)],A.prototype,"adaptivePredict",null),e([r(0,b.NotNull),r(1,b.NotNull),r(2,b.NotNull)],A.prototype,"getStartState",null),e([r(0,b.NotNull),r(1,b.NotNull),r(3,b.NotNull)],A.prototype,"execDFA",null),e([r(0,b.NotNull),r(1,b.NotNull),r(3,b.NotNull)],A.prototype,"execATN",null),e([r(0,b.NotNull),r(2,b.NotNull)],A.prototype,"handleNoViableAlt",null),e([r(0,b.NotNull)],A.prototype,"getExistingTargetState",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"computeTargetState",null),e([b.NotNull,r(0,b.NotNull)],A.prototype,"removeAllConfigsNotInRuleStopState",null),e([b.NotNull],A.prototype,"computeStartState",null),e([b.NotNull,r(0,b.NotNull)],A.prototype,"applyPrecedenceFilter",null),e([r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"getReachableTarget",null),e([r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"getPredsForAmbigAlts",null),e([r(0,b.NotNull)],A.prototype,"evalSemanticContext",null),e([r(0,b.NotNull)],A.prototype,"evalSemanticContextImpl",null),e([r(1,b.NotNull),r(4,b.Nullable)],A.prototype,"closure",null),e([r(0,b.NotNull),r(1,b.NotNull),r(2,b.Nullable),r(3,b.NotNull),r(6,b.NotNull)],A.prototype,"closureImpl",null),e([b.NotNull],A.prototype,"getRuleName",null),e([r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"getEpsilonTarget",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"actionTransition",null),e([b.Nullable,r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"precedenceTransition",null),e([b.Nullable,r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"predTransition",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull),r(2,b.Nullable)],A.prototype,"ruleTransition",null),e([r(0,b.NotNull)],A.prototype,"isConflicted",null),e([b.NotNull],A.prototype,"getTokenName",null),e([r(0,b.NotNull)],A.prototype,"dumpDeadEndConfigs",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull),r(2,b.NotNull)],A.prototype,"noViableAlt",null),e([r(0,b.NotNull)],A.prototype,"getUniqueAlt",null),e([r(0,b.NotNull)],A.prototype,"configWithAltAtStopState",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull),r(4,b.NotNull)],A.prototype,"addDFAEdge",null),e([r(0,b.Nullable),r(2,b.Nullable)],A.prototype,"setDFAEdge",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"addDFAContextState",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"addDFAState",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"createDFAState",null),e([r(0,b.NotNull),r(2,b.NotNull)],A.prototype,"reportAttemptingFullContext",null),e([r(0,b.NotNull),r(2,b.NotNull)],A.prototype,"reportContextSensitivity",null),e([r(0,b.NotNull),r(5,b.NotNull),r(6,b.NotNull)],A.prototype,"reportAmbiguity",null),A=e([r(0,b.NotNull)],A),t.ParserATNSimulator=A;}),B7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.PlusBlockStartState=void 0;var r=Qt(),i=fc(),s=fe(),n=class extends i.BlockStartState{get stateType(){return r.ATNStateType.PLUS_BLOCK_START}};e([s.Override],n.prototype,"stateType",null),t.PlusBlockStartState=n;}),j7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.PlusLoopbackState=void 0;var r=Qt(),i=ls(),s=fe(),n=class extends i.DecisionState{get stateType(){return r.ATNStateType.PLUS_LOOP_BACK}};e([s.Override],n.prototype,"stateType",null),t.PlusLoopbackState=n;}),q7=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.PrecedencePredicateTransition=void 0;var i=Ep(),s=fe(),n=ao(),o=class extends i.AbstractPredicateTransition{constructor(u,l){super(u),this.precedence=l;}get serializationType(){return 10}get isEpsilon(){return !0}matches(u,l,h){return !1}get predicate(){return new n.SemanticContext.PrecedencePredicate(this.precedence)}toString(){return this.precedence+" >= _p"}};e([s.Override],o.prototype,"serializationType",null),e([s.Override],o.prototype,"isEpsilon",null),e([s.Override],o.prototype,"matches",null),e([s.Override],o.prototype,"toString",null),o=e([r(0,s.NotNull)],o),t.PrecedencePredicateTransition=o;}),H7=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.RangeTransition=void 0;var i=cs(),s=fe(),n=sn(),o=class extends n.Transition{constructor(u,l,h){super(u),this.from=l,this.to=h;}get serializationType(){return 2}get label(){return i.IntervalSet.of(this.from,this.to)}matches(u,l,h){return u>=this.from&&u<=this.to}toString(){return "'"+String.fromCodePoint(this.from)+"'..'"+String.fromCodePoint(this.to)+"'"}};e([s.Override],o.prototype,"serializationType",null),e([s.Override,s.NotNull],o.prototype,"label",null),e([s.Override],o.prototype,"matches",null),e([s.Override,s.NotNull],o.prototype,"toString",null),o=e([r(0,s.NotNull)],o),t.RangeTransition=o;}),U7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleStartState=void 0;var r=Ci(),i=Qt(),s=fe(),n=class extends r.ATNState{constructor(){super(...arguments),this.isPrecedenceRule=!1,this.leftFactored=!1;}get stateType(){return i.ATNStateType.RULE_START}};e([s.Override],n.prototype,"stateType",null),t.RuleStartState=n;}),V7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.StarBlockStartState=void 0;var r=Qt(),i=fc(),s=fe(),n=class extends i.BlockStartState{get stateType(){return r.ATNStateType.STAR_BLOCK_START}};e([s.Override],n.prototype,"stateType",null),t.StarBlockStartState=n;}),$7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.StarLoopbackState=void 0;var r=Ci(),i=Qt(),s=fe(),n=class extends r.ATNState{get loopEntryState(){return this.transition(0).target}get stateType(){return i.ATNStateType.STAR_LOOP_BACK}};e([s.Override],n.prototype,"stateType",null),t.StarLoopbackState=n;}),z7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.TokensStartState=void 0;var r=Qt(),i=ls(),s=fe(),n=class extends i.DecisionState{get stateType(){return r.ATNStateType.TOKEN_START}};e([s.Override],n.prototype,"stateType",null),t.TokensStartState=n;}),K7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UUID=void 0;var e=qt(),r=class{constructor(i,s,n,o){this.data=new Uint32Array(4),this.data[0]=i,this.data[1]=s,this.data[2]=n,this.data[3]=o;}static fromString(i){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(i))throw new Error("Incorrectly formatted UUID");let s=i.split("-"),n=parseInt(s[0],16),o=(parseInt(s[1],16)<<16>>>0)+parseInt(s[2],16),a=(parseInt(s[3],16)<<16>>>0)+parseInt(s[4].substr(0,4),16),u=parseInt(s[4].substr(-8),16);return new r(n,o,a,u)}hashCode(){return e.MurmurHash.hashCode([this.data[0],this.data[1],this.data[2],this.data[3]])}equals(i){return i===this?!0:i instanceof r?this.data[0]===i.data[0]&&this.data[1]===i.data[1]&&this.data[2]===i.data[2]&&this.data[3]===i.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)}};t.UUID=r;}),pc=re(t=>{var e=t&&t.__decorate||function(ee,U,M,J){var W=arguments.length,ne=W<3?U:J===null?J=Object.getOwnPropertyDescriptor(U,M):J,le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ne=Reflect.decorate(ee,U,M,J);else for(var Q=ee.length-1;Q>=0;Q--)(le=ee[Q])&&(ne=(W<3?le(ne):W>3?le(U,M,ne):le(U,M))||ne);return W>3&&ne&&Object.defineProperty(U,M,ne),ne},r=t&&t.__param||function(ee,U){return function(M,J){U(M,J,ee);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNDeserializer=void 0;var i=Ab(),s=on(),n=ti(),o=Tb(),a=Qt(),u=wb(),l=A7(),h=xb(),c=an(),d=w7(),f=fc(),m=ls(),g=vb(),v=D7(),x=cs(),_=bb(),E=S7(),b=R7(),w=N7(),D=O7(),N=F7(),F=L7(),V=P7(),Z=I7(),te=Db(),ae=fe(),k=Np(),y=Ha(),C=B7(),S=j7(),R=q7(),L=fb(),I=H7(),K=U7(),j=qa(),A=Op(),q=Rp(),B=V7(),T=$7(),P=Sp(),H=At(),z=z7(),G=K7(),oe=Eb(),se;(function(ee){ee[ee.UNICODE_BMP=0]="UNICODE_BMP",ee[ee.UNICODE_SMP=1]="UNICODE_SMP";})(se||(se={}));var X=class{constructor(ee){ee===void 0&&(ee=o.ATNDeserializationOptions.defaultOptions),this.deserializationOptions=ee;}static get SERIALIZED_VERSION(){return 3}static isFeatureSupported(ee,U){let M=X.SUPPORTED_UUIDS.findIndex(J=>J.equals(ee));return M<0?!1:X.SUPPORTED_UUIDS.findIndex(J=>J.equals(U))>=M}static getUnicodeDeserializer(ee){return ee===0?{readUnicode:(U,M)=>X.toInt(U[M]),size:1}:{readUnicode:(U,M)=>X.toInt32(U,M),size:2}}deserialize(ee){ee=ee.slice(0);for(let ce=1;ce<ee.length;ce++)ee[ce]=ee[ce]-2&65535;let U=0,M=X.toInt(ee[U++]);if(M!==X.SERIALIZED_VERSION){let ce=`Could not deserialize ATN with version ${M} (expected ${X.SERIALIZED_VERSION}).`;throw new Error(ce)}let J=X.toUUID(ee,U);if(U+=8,X.SUPPORTED_UUIDS.findIndex(ce=>ce.equals(J))<0){let ce=`Could not deserialize ATN with UUID ${J} (expected ${X.SERIALIZED_UUID} or a legacy UUID).`;throw new Error(ce)}let W=X.isFeatureSupported(X.ADDED_LEXER_ACTIONS,J),ne=X.toInt(ee[U++]),le=X.toInt(ee[U++]),Q=new n.ATN(ne,le),_e=[],Se=[],ye=X.toInt(ee[U++]);for(let ce=0;ce<ye;ce++){let be=X.toInt(ee[U++]);if(be===a.ATNStateType.INVALID_TYPE){Q.addState(new _.InvalidState);continue}let Ae=X.toInt(ee[U++]);Ae===65535&&(Ae=-1);let Le=this.stateFactory(be,Ae);if(be===a.ATNStateType.LOOP_END){let Ne=X.toInt(ee[U++]);_e.push([Le,Ne]);}else if(Le instanceof f.BlockStartState){let Ne=X.toInt(ee[U++]);Se.push([Le,Ne]);}Q.addState(Le);}for(let ce of _e)ce[0].loopBackState=Q.states[ce[1]];for(let ce of Se)ce[0].endState=Q.states[ce[1]];let Ce=X.toInt(ee[U++]);for(let ce=0;ce<Ce;ce++){let be=X.toInt(ee[U++]);Q.states[be].nonGreedy=!0;}let tt=X.toInt(ee[U++]);for(let ce=0;ce<tt;ce++){let be=X.toInt(ee[U++]);Q.states[be].sll=!0;}let Fe=X.toInt(ee[U++]);for(let ce=0;ce<Fe;ce++){let be=X.toInt(ee[U++]);Q.states[be].isPrecedenceRule=!0;}let He=X.toInt(ee[U++]);Q.grammarType===0&&(Q.ruleToTokenType=new Int32Array(He)),Q.ruleToStartState=new Array(He);for(let ce=0;ce<He;ce++){let be=X.toInt(ee[U++]),Ae=Q.states[be];if(Ae.leftFactored=X.toInt(ee[U++])!==0,Q.ruleToStartState[ce]=Ae,Q.grammarType===0){let Le=X.toInt(ee[U++]);if(Le===65535&&(Le=H.Token.EOF),Q.ruleToTokenType[ce]=Le,!X.isFeatureSupported(X.ADDED_LEXER_ACTIONS,J)){X.toInt(ee[U++]);}}}Q.ruleToStopState=new Array(He);for(let ce of Q.states)ce instanceof j.RuleStopState&&(Q.ruleToStopState[ce.ruleIndex]=ce,Q.ruleToStartState[ce.ruleIndex].stopState=ce);let Yt=X.toInt(ee[U++]);for(let ce=0;ce<Yt;ce++){let be=X.toInt(ee[U++]);Q.modeToStartState.push(Q.states[be]);}Q.modeToDFA=new Array(Yt);for(let ce=0;ce<Yt;ce++)Q.modeToDFA[ce]=new g.DFA(Q.modeToStartState[ce]);let Xe=[];U=this.deserializeSets(ee,U,Xe,X.getUnicodeDeserializer(0)),X.isFeatureSupported(X.ADDED_UNICODE_SMP,J)&&(U=this.deserializeSets(ee,U,Xe,X.getUnicodeDeserializer(1)));let ot=X.toInt(ee[U++]);for(let ce=0;ce<ot;ce++){let be=X.toInt(ee[U]),Ae=X.toInt(ee[U+1]),Le=X.toInt(ee[U+2]),Ne=X.toInt(ee[U+3]),We=X.toInt(ee[U+4]),lt=X.toInt(ee[U+5]),Ve=this.edgeFactory(Q,Le,be,Ae,Ne,We,lt,Xe);Q.states[be].addTransition(Ve),U+=6;}let pi=new s.Array2DHashSet({hashCode:ce=>ce.stopState^ce.returnState^ce.outermostPrecedenceReturn,equals:(ce,be)=>ce.stopState===be.stopState&&ce.returnState===be.returnState&&ce.outermostPrecedenceReturn===be.outermostPrecedenceReturn}),nt=[];for(let ce of Q.states){let be=ce.ruleIndex>=0&&Q.ruleToStartState[ce.ruleIndex].leftFactored;for(let Ae=0;Ae<ce.numberOfTransitions;Ae++){let Le=ce.transition(Ae);if(!(Le instanceof A.RuleTransition))continue;let Ne=Le;if(!Q.ruleToStartState[Ne.target.ruleIndex].leftFactored&&be)continue;let lt=-1;Q.ruleToStartState[Ne.target.ruleIndex].isPrecedenceRule&&Ne.precedence===0&&(lt=Ne.target.ruleIndex);let Ve={stopState:Ne.target.ruleIndex,returnState:Ne.followState.stateNumber,outermostPrecedenceReturn:lt};pi.add(Ve)&&nt.push(Ve);}}for(let ce of nt){let be=new v.EpsilonTransition(Q.states[ce.returnState],ce.outermostPrecedenceReturn);Q.ruleToStopState[ce.stopState].addTransition(be);}for(let ce of Q.states){if(ce instanceof f.BlockStartState){if(ce.endState===void 0)throw new Error("IllegalStateException");if(ce.endState.startState!==void 0)throw new Error("IllegalStateException");ce.endState.startState=ce;}if(ce instanceof S.PlusLoopbackState){let be=ce;for(let Ae=0;Ae<be.numberOfTransitions;Ae++){let Le=be.transition(Ae).target;Le instanceof C.PlusBlockStartState&&(Le.loopBackState=be);}}else if(ce instanceof T.StarLoopbackState){let be=ce;for(let Ae=0;Ae<be.numberOfTransitions;Ae++){let Le=be.transition(Ae).target;Le instanceof P.StarLoopEntryState&&(Le.loopBackState=be);}}}let rt=X.toInt(ee[U++]);for(let ce=1;ce<=rt;ce++){let be=X.toInt(ee[U++]),Ae=Q.states[be];Q.decisionToState.push(Ae),Ae.decision=ce-1;}if(Q.grammarType===0)if(W){Q.lexerActions=new Array(X.toInt(ee[U++]));for(let ce=0;ce<Q.lexerActions.length;ce++){let be=X.toInt(ee[U++]),Ae=X.toInt(ee[U++]);Ae===65535&&(Ae=-1);let Le=X.toInt(ee[U++]);Le===65535&&(Le=-1);let Ne=this.lexerActionFactory(be,Ae,Le);Q.lexerActions[ce]=Ne;}}else {let ce=[];for(let be of Q.states)for(let Ae=0;Ae<be.numberOfTransitions;Ae++){let Le=be.transition(Ae);if(!(Le instanceof i.ActionTransition))continue;let Ne=Le.ruleIndex,We=Le.actionIndex,lt=new b.LexerCustomAction(Ne,We);be.setTransition(Ae,new i.ActionTransition(Le.target,Ne,ce.length,!1)),ce.push(lt);}Q.lexerActions=ce;}this.markPrecedenceDecisions(Q),Q.decisionToDFA=new Array(rt);for(let ce=0;ce<rt;ce++)Q.decisionToDFA[ce]=new g.DFA(Q.decisionToState[ce],ce);if(this.deserializationOptions.isVerifyATN&&this.verifyATN(Q),this.deserializationOptions.isGenerateRuleBypassTransitions&&Q.grammarType===1){Q.ruleToTokenType=new Int32Array(Q.ruleToStartState.length);for(let ce=0;ce<Q.ruleToStartState.length;ce++)Q.ruleToTokenType[ce]=Q.maxTokenType+ce+1;for(let ce=0;ce<Q.ruleToStartState.length;ce++){let be=new l.BasicBlockStartState;be.ruleIndex=ce,Q.addState(be);let Ae=new d.BlockEndState;Ae.ruleIndex=ce,Q.addState(Ae),be.endState=Ae,Q.defineDecisionState(be),Ae.startState=be;let Le,Ne;if(Q.ruleToStartState[ce].isPrecedenceRule){Le=void 0;for(let lt of Q.states){if(lt.ruleIndex!==ce||!(lt instanceof P.StarLoopEntryState))continue;let Ve=lt.transition(lt.numberOfTransitions-1).target;if(Ve instanceof te.LoopEndState&&Ve.epsilonOnlyTransitions&&Ve.transition(0).target instanceof j.RuleStopState){Le=lt;break}}if(!Le)throw new Error("Couldn't identify final state of the precedence rule prefix section.");Ne=Le.loopBackState.transition(0);}else Le=Q.ruleToStopState[ce];for(let lt of Q.states)for(let Ve=0;Ve<lt.numberOfTransitions;Ve++){let Qe=lt.transition(Ve);Qe!==Ne&&Qe.target===Le&&(Qe.target=Ae);}for(;Q.ruleToStartState[ce].numberOfTransitions>0;){let lt=Q.ruleToStartState[ce].removeTransition(Q.ruleToStartState[ce].numberOfTransitions-1);be.addTransition(lt);}Q.ruleToStartState[ce].addTransition(new v.EpsilonTransition(be)),Ae.addTransition(new v.EpsilonTransition(Le));let We=new h.BasicState;Q.addState(We),We.addTransition(new u.AtomTransition(Ae,Q.ruleToTokenType[ce])),be.addTransition(new v.EpsilonTransition(We));}this.deserializationOptions.isVerifyATN&&this.verifyATN(Q);}if(this.deserializationOptions.isOptimize){for(;;){let ce=0;ce+=X.inlineSetRules(Q),ce+=X.combineChainedEpsilons(Q);let be=Q.grammarType===0;if(ce+=X.optimizeSets(Q,be),ce===0)break}this.deserializationOptions.isVerifyATN&&this.verifyATN(Q);}return X.identifyTailCalls(Q),Q}deserializeSets(ee,U,M,J){let W=X.toInt(ee[U++]);for(let ne=0;ne<W;ne++){let le=X.toInt(ee[U]);U++;let Q=new x.IntervalSet;M.push(Q),X.toInt(ee[U++])!==0&&Q.add(-1);for(let Se=0;Se<le;Se++){let ye=J.readUnicode(ee,U);U+=J.size;let Ce=J.readUnicode(ee,U);U+=J.size,Q.add(ye,Ce);}}return U}markPrecedenceDecisions(ee){let U=new Map;for(let M of ee.states)if(M instanceof P.StarLoopEntryState&&ee.ruleToStartState[M.ruleIndex].isPrecedenceRule){let J=M.transition(M.numberOfTransitions-1).target;J instanceof te.LoopEndState&&J.epsilonOnlyTransitions&&J.transition(0).target instanceof j.RuleStopState&&(U.set(M.ruleIndex,M),M.precedenceRuleDecision=!0,M.precedenceLoopbackStates=new c.BitSet(ee.states.length));}for(let M of U)for(let J of ee.ruleToStopState[M[0]].getTransitions())J.serializationType!==1||J.outermostPrecedenceReturn!==-1||M[1].precedenceLoopbackStates.set(J.target.stateNumber);}verifyATN(ee){for(let U of ee.states)if(this.checkCondition(U!==void 0,"ATN states should not be undefined."),U.stateType!==a.ATNStateType.INVALID_TYPE){if(this.checkCondition(U.onlyHasEpsilonTransitions||U.numberOfTransitions<=1),U instanceof C.PlusBlockStartState&&this.checkCondition(U.loopBackState!==void 0),U instanceof P.StarLoopEntryState){let M=U;if(this.checkCondition(M.loopBackState!==void 0),this.checkCondition(M.numberOfTransitions===2),M.transition(0).target instanceof B.StarBlockStartState)this.checkCondition(M.transition(1).target instanceof te.LoopEndState),this.checkCondition(!M.nonGreedy);else if(M.transition(0).target instanceof te.LoopEndState)this.checkCondition(M.transition(1).target instanceof B.StarBlockStartState),this.checkCondition(M.nonGreedy);else throw new Error("IllegalStateException")}if(U instanceof T.StarLoopbackState&&(this.checkCondition(U.numberOfTransitions===1),this.checkCondition(U.transition(0).target instanceof P.StarLoopEntryState)),U instanceof te.LoopEndState&&this.checkCondition(U.loopBackState!==void 0),U instanceof K.RuleStartState&&this.checkCondition(U.stopState!==void 0),U instanceof f.BlockStartState&&this.checkCondition(U.endState!==void 0),U instanceof d.BlockEndState&&this.checkCondition(U.startState!==void 0),U instanceof m.DecisionState){let M=U;this.checkCondition(M.numberOfTransitions<=1||M.decision>=0);}else this.checkCondition(U.numberOfTransitions<=1||U instanceof j.RuleStopState);}}checkCondition(ee,U){if(!ee)throw new Error("IllegalStateException: "+U)}static inlineSetRules(ee){let U=0,M=new Array(ee.ruleToStartState.length);for(let J=0;J<ee.ruleToStartState.length;J++){let ne=ee.ruleToStartState[J];for(;ne.onlyHasEpsilonTransitions&&ne.numberOfOptimizedTransitions===1&&ne.getOptimizedTransition(0).serializationType===1;)ne=ne.getOptimizedTransition(0).target;if(ne.numberOfOptimizedTransitions!==1)continue;let le=ne.getOptimizedTransition(0),Q=le.target;if(!(le.isEpsilon||!Q.onlyHasEpsilonTransitions||Q.numberOfOptimizedTransitions!==1||!(Q.getOptimizedTransition(0).target instanceof j.RuleStopState)))switch(le.serializationType){case 5:case 2:case 7:M[J]=le;break;case 8:case 9:continue;default:continue}}for(let J of ee.states){if(J.ruleIndex<0)continue;let W;for(let ne=0;ne<J.numberOfOptimizedTransitions;ne++){let le=J.getOptimizedTransition(ne);if(!(le instanceof A.RuleTransition)){W!==void 0&&W.push(le);continue}let Q=le,_e=M[Q.target.ruleIndex];if(_e===void 0){W!==void 0&&W.push(le);continue}if(W===void 0){W=[];for(let Ce=0;Ce<ne;Ce++)W.push(J.getOptimizedTransition(ne));}U++;let Se=Q.followState,ye=new h.BasicState;switch(ye.setRuleIndex(Se.ruleIndex),ee.addState(ye),W.push(new v.EpsilonTransition(ye)),_e.serializationType){case 5:ye.addTransition(new u.AtomTransition(Se,_e._label));break;case 2:ye.addTransition(new I.RangeTransition(Se,_e.from,_e.to));break;case 7:ye.addTransition(new q.SetTransition(Se,_e.label));break;default:throw new Error("UnsupportedOperationException")}}if(W!==void 0){if(J.isOptimized)for(;J.numberOfOptimizedTransitions>0;)J.removeOptimizedTransition(J.numberOfOptimizedTransitions-1);for(let ne of W)J.addOptimizedTransition(ne);}}return y.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+U+" rule invocations by inlining sets."),U}static combineChainedEpsilons(ee){let U=0;for(let M of ee.states){if(!M.onlyHasEpsilonTransitions||M instanceof j.RuleStopState)continue;let J;e:for(let W=0;W<M.numberOfOptimizedTransitions;W++){let ne=M.getOptimizedTransition(W),le=ne.target;if(ne.serializationType!==1||ne.outermostPrecedenceReturn!==-1||le.stateType!==a.ATNStateType.BASIC||!le.onlyHasEpsilonTransitions){J!==void 0&&J.push(ne);continue e}for(let Q=0;Q<le.numberOfOptimizedTransitions;Q++)if(le.getOptimizedTransition(Q).serializationType!==1||le.getOptimizedTransition(Q).outermostPrecedenceReturn!==-1){J!==void 0&&J.push(ne);continue e}if(U++,J===void 0){J=[];for(let Q=0;Q<W;Q++)J.push(M.getOptimizedTransition(Q));}for(let Q=0;Q<le.numberOfOptimizedTransitions;Q++){let _e=le.getOptimizedTransition(Q).target;J.push(new v.EpsilonTransition(_e));}}if(J!==void 0){if(M.isOptimized)for(;M.numberOfOptimizedTransitions>0;)M.removeOptimizedTransition(M.numberOfOptimizedTransitions-1);for(let W of J)M.addOptimizedTransition(W);}}return y.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+U+" transitions by combining chained epsilon transitions."),U}static optimizeSets(ee,U){if(U)return 0;let M=0,J=ee.decisionToState;for(let W of J){let ne=new x.IntervalSet;for(let Ce=0;Ce<W.numberOfOptimizedTransitions;Ce++){let tt=W.getOptimizedTransition(Ce);if(!(tt instanceof v.EpsilonTransition)||tt.target.numberOfOptimizedTransitions!==1)continue;let Fe=tt.target.getOptimizedTransition(0);Fe.target instanceof d.BlockEndState&&(Fe instanceof k.NotSetTransition||(Fe instanceof u.AtomTransition||Fe instanceof I.RangeTransition||Fe instanceof q.SetTransition)&&ne.add(Ce));}if(ne.size<=1)continue;let le=[];for(let Ce=0;Ce<W.numberOfOptimizedTransitions;Ce++)ne.contains(Ce)||le.push(W.getOptimizedTransition(Ce));let Q=W.getOptimizedTransition(ne.minElement).target.getOptimizedTransition(0).target,_e=new x.IntervalSet;for(let Ce of ne.intervals)for(let tt=Ce.a;tt<=Ce.b;tt++){let Fe=W.getOptimizedTransition(tt).target.getOptimizedTransition(0);if(Fe instanceof k.NotSetTransition)throw new Error("Not yet implemented.");_e.addAll(Fe.label);}let Se;if(_e.intervals.length===1)if(_e.size===1)Se=new u.AtomTransition(Q,_e.minElement);else {let Ce=_e.intervals[0];Se=new I.RangeTransition(Q,Ce.a,Ce.b);}else Se=new q.SetTransition(Q,_e);let ye=new h.BasicState;if(ye.setRuleIndex(W.ruleIndex),ee.addState(ye),ye.addTransition(Se),le.push(new v.EpsilonTransition(ye)),M+=W.numberOfOptimizedTransitions-le.length,W.isOptimized)for(;W.numberOfOptimizedTransitions>0;)W.removeOptimizedTransition(W.numberOfOptimizedTransitions-1);for(let Ce of le)W.addOptimizedTransition(Ce);}return y.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+M+" paths by collapsing sets."),M}static identifyTailCalls(ee){for(let U of ee.states){for(let M=0;M<U.numberOfTransitions;M++){let J=U.transition(M);J instanceof A.RuleTransition&&(J.tailCall=this.testTailCall(ee,J,!1),J.optimizedTailCall=this.testTailCall(ee,J,!0));}if(U.isOptimized)for(let M=0;M<U.numberOfOptimizedTransitions;M++){let J=U.getOptimizedTransition(M);J instanceof A.RuleTransition&&(J.tailCall=this.testTailCall(ee,J,!1),J.optimizedTailCall=this.testTailCall(ee,J,!0));}}}static testTailCall(ee,U,M){if(!M&&U.tailCall||M&&U.optimizedTailCall)return !0;let J=new c.BitSet(ee.states.length),W=[];for(W.push(U.followState);;){let ne=W.pop();if(!ne)break;if(J.get(ne.stateNumber)||ne instanceof j.RuleStopState)continue;if(!ne.onlyHasEpsilonTransitions)return !1;let le=M?ne.numberOfOptimizedTransitions:ne.numberOfTransitions;for(let Q=0;Q<le;Q++){let _e=M?ne.getOptimizedTransition(Q):ne.transition(Q);if(_e.serializationType!==1)return !1;W.push(_e.target);}}return !0}static toInt(ee){return ee}static toInt32(ee,U){return (ee[U]|ee[U+1]<<16)>>>0}static toUUID(ee,U){let M=X.toInt32(ee,U),J=X.toInt32(ee,U+2),W=X.toInt32(ee,U+4),ne=X.toInt32(ee,U+6);return new G.UUID(ne,W,J,M)}edgeFactory(ee,U,M,J,W,ne,le,Q){let _e=ee.states[J];switch(U){case 1:return new v.EpsilonTransition(_e);case 2:return le!==0?new I.RangeTransition(_e,H.Token.EOF,ne):new I.RangeTransition(_e,W,ne);case 3:return new A.RuleTransition(ee.states[W],ne,le,_e);case 4:return new L.PredicateTransition(_e,W,ne,le!==0);case 10:return new R.PrecedencePredicateTransition(_e,W);case 5:return le!==0?new u.AtomTransition(_e,H.Token.EOF):new u.AtomTransition(_e,W);case 6:return new i.ActionTransition(_e,W,ne,le!==0);case 7:return new q.SetTransition(_e,Q[W]);case 8:return new k.NotSetTransition(_e,Q[W]);case 9:return new oe.WildcardTransition(_e)}throw new Error("The specified transition type is not valid.")}stateFactory(ee,U){let M;switch(ee){case a.ATNStateType.INVALID_TYPE:return new _.InvalidState;case a.ATNStateType.BASIC:M=new h.BasicState;break;case a.ATNStateType.RULE_START:M=new K.RuleStartState;break;case a.ATNStateType.BLOCK_START:M=new l.BasicBlockStartState;break;case a.ATNStateType.PLUS_BLOCK_START:M=new C.PlusBlockStartState;break;case a.ATNStateType.STAR_BLOCK_START:M=new B.StarBlockStartState;break;case a.ATNStateType.TOKEN_START:M=new z.TokensStartState;break;case a.ATNStateType.RULE_STOP:M=new j.RuleStopState;break;case a.ATNStateType.BLOCK_END:M=new d.BlockEndState;break;case a.ATNStateType.STAR_LOOP_BACK:M=new T.StarLoopbackState;break;case a.ATNStateType.STAR_LOOP_ENTRY:M=new P.StarLoopEntryState;break;case a.ATNStateType.PLUS_LOOP_BACK:M=new S.PlusLoopbackState;break;case a.ATNStateType.LOOP_END:M=new te.LoopEndState;break;default:let J=`The specified state type ${ee} is not valid.`;throw new Error(J)}return M.ruleIndex=U,M}lexerActionFactory(ee,U,M){switch(ee){case 0:return new E.LexerChannelAction(U);case 1:return new b.LexerCustomAction(U,M);case 2:return new w.LexerModeAction(U);case 3:return D.LexerMoreAction.INSTANCE;case 4:return N.LexerPopModeAction.INSTANCE;case 5:return new F.LexerPushModeAction(U);case 6:return V.LexerSkipAction.INSTANCE;case 7:return new Z.LexerTypeAction(U);default:let J=`The specified lexer action type ${ee} is not valid.`;throw new Error(J)}}};X.BASE_SERIALIZED_UUID=G.UUID.fromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3"),X.ADDED_LEXER_ACTIONS=G.UUID.fromString("AB35191A-1603-487E-B75A-479B831EAF6D"),X.ADDED_UNICODE_SMP=G.UUID.fromString("C23FEA89-0605-4f51-AFB8-058BCAB8C91B"),X.SUPPORTED_UUIDS=[X.BASE_SERIALIZED_UUID,X.ADDED_LEXER_ACTIONS,X.ADDED_UNICODE_SMP],X.SERIALIZED_UUID=X.ADDED_UNICODE_SMP,e([ae.NotNull],X.prototype,"deserializationOptions",void 0),e([r(0,ae.NotNull)],X.prototype,"deserialize",null),e([r(0,ae.NotNull)],X.prototype,"markPrecedenceDecisions",null),e([ae.NotNull,r(0,ae.NotNull)],X.prototype,"edgeFactory",null),t.ATNDeserializer=X;}),G7=re(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h},r=t&&t.__param||function(n,o){return function(a,u){o(a,u,n);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParseInfo=void 0;var i=fe(),s=class{constructor(o){this.atnSimulator=o;}getDecisionInfo(){return this.atnSimulator.getDecisionInfo()}getLLDecisions(){let o=this.atnSimulator.getDecisionInfo(),a=[];for(let u=0;u<o.length;u++)o[u].LL_Fallback>0&&a.push(u);return a}getTotalTimeInPrediction(){let o=this.atnSimulator.getDecisionInfo(),a=0;for(let u of o)a+=u.timeInPrediction;return a}getTotalSLLLookaheadOps(){let o=this.atnSimulator.getDecisionInfo(),a=0;for(let u of o)a+=u.SLL_TotalLook;return a}getTotalLLLookaheadOps(){let o=this.atnSimulator.getDecisionInfo(),a=0;for(let u of o)a+=u.LL_TotalLook;return a}getTotalSLLATNLookaheadOps(){let o=this.atnSimulator.getDecisionInfo(),a=0;for(let u of o)a+=u.SLL_ATNTransitions;return a}getTotalLLATNLookaheadOps(){let o=this.atnSimulator.getDecisionInfo(),a=0;for(let u of o)a+=u.LL_ATNTransitions;return a}getTotalATNLookaheadOps(){let o=this.atnSimulator.getDecisionInfo(),a=0;for(let u of o)a+=u.SLL_ATNTransitions,a+=u.LL_ATNTransitions;return a}getDFASize(o){if(o)return this.atnSimulator.atn.decisionToDFA[o].states.size;{let a=0,u=this.atnSimulator.atn.decisionToDFA;for(let l=0;l<u.length;l++)a+=this.getDFASize(l);return a}}};e([i.NotNull],s.prototype,"getDecisionInfo",null),e([i.NotNull],s.prototype,"getLLDecisions",null),s=e([r(0,i.NotNull)],s),t.ParseInfo=s;}),Nb=re(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyParserErrorListener=void 0;var r=Dp(),i=fe(),s=class extends r.ProxyErrorListener{constructor(n){super(n);}reportAmbiguity(n,o,a,u,l,h,c){this.getDelegates().forEach(d=>{d.reportAmbiguity&&d.reportAmbiguity(n,o,a,u,l,h,c);});}reportAttemptingFullContext(n,o,a,u,l,h){this.getDelegates().forEach(c=>{c.reportAttemptingFullContext&&c.reportAttemptingFullContext(n,o,a,u,l,h);});}reportContextSensitivity(n,o,a,u,l,h){this.getDelegates().forEach(c=>{c.reportContextSensitivity&&c.reportContextSensitivity(n,o,a,u,l,h);});}};e([i.Override],s.prototype,"reportAmbiguity",null),e([i.Override],s.prototype,"reportAttemptingFullContext",null),e([i.Override],s.prototype,"reportContextSensitivity",null),t.ProxyParserErrorListener=s;}),W7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isSupplementaryCodePoint=t.isLowSurrogate=t.isHighSurrogate=void 0;function e(s){return s>=55296&&s<=56319}t.isHighSurrogate=e;function r(s){return s>=56320&&s<=57343}t.isLowSurrogate=r;function i(s){return s>=65536}t.isSupplementaryCodePoint=i;}),Ob=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodePointBuffer=void 0;var e=ge("assert"),r=W7(),i=class{constructor(s,n){this.buffer=s,this._position=0,this._size=n;}static withArray(s){return new i(s,s.length)}get position(){return this._position}set position(s){if(s<0||s>this._size)throw new RangeError;this._position=s;}get remaining(){return this._size-this.position}get(s){return this.buffer[s]}array(){return this.buffer.slice(0,this._size)}static builder(s){return new i.Builder(s)}};t.CodePointBuffer=i,function(s){let n;(function(a){a[a.BYTE=0]="BYTE",a[a.CHAR=1]="CHAR",a[a.INT=2]="INT";})(n||(n={}));class o{constructor(u){this.type=0,this.buffer=new Uint8Array(u),this.prevHighSurrogate=-1,this.position=0;}build(){return new s(this.buffer,this.position)}static roundUpToNextPowerOfTwo(u){let l=32-Math.clz32(u-1);return Math.pow(2,l)}ensureRemaining(u){switch(this.type){case 0:if(this.buffer.length-this.position<u){let l=o.roundUpToNextPowerOfTwo(this.buffer.length+u),h=new Uint8Array(l);h.set(this.buffer.subarray(0,this.position),0),this.buffer=h;}break;case 1:if(this.buffer.length-this.position<u){let l=o.roundUpToNextPowerOfTwo(this.buffer.length+u),h=new Uint16Array(l);h.set(this.buffer.subarray(0,this.position),0),this.buffer=h;}break;case 2:if(this.buffer.length-this.position<u){let l=o.roundUpToNextPowerOfTwo(this.buffer.length+u),h=new Int32Array(l);h.set(this.buffer.subarray(0,this.position),0),this.buffer=h;}break}}append(u){this.ensureRemaining(u.length),this.appendArray(u);}appendArray(u){switch(this.type){case 0:this.appendArrayByte(u);break;case 1:this.appendArrayChar(u);break;case 2:this.appendArrayInt(u);break}}appendArrayByte(u){e(this.prevHighSurrogate===-1);let l=u,h=0,c=u.length,d=this.buffer,f=this.position;for(;h<c;){let m=l[h];if(m<=255)d[f]=m;else if(u=u.subarray(h,c),this.position=f,r.isHighSurrogate(m)){this.byteToIntBuffer(u.length),this.appendArrayInt(u);return}else {this.byteToCharBuffer(u.length),this.appendArrayChar(u);return}h++,f++;}this.position=f;}appendArrayChar(u){e(this.prevHighSurrogate===-1);let l=u,h=0,c=u.length,d=this.buffer,f=this.position;for(;h<c;){let m=l[h];if(!r.isHighSurrogate(m))d[f]=m;else {u=u.subarray(h,c),this.position=f,this.charToIntBuffer(u.length),this.appendArrayInt(u);return}h++,f++;}this.position=f;}appendArrayInt(u){let l=u,h=0,c=u.length,d=this.buffer,f=this.position;for(;h<c;){let m=l[h];h++,this.prevHighSurrogate!==-1?r.isLowSurrogate(m)?(d[f]=String.fromCharCode(this.prevHighSurrogate,m).codePointAt(0),f++,this.prevHighSurrogate=-1):(d[f]=this.prevHighSurrogate,f++,r.isHighSurrogate(m)?this.prevHighSurrogate=m:(d[f]=m,f++,this.prevHighSurrogate=-1)):r.isHighSurrogate(m)?this.prevHighSurrogate=m:(d[f]=m,f++);}this.prevHighSurrogate!==-1&&(d[f]=this.prevHighSurrogate,f++),this.position=f;}byteToCharBuffer(u){let l=new Uint16Array(Math.max(this.position+u,this.buffer.length>>1));l.set(this.buffer.subarray(0,this.position),0),this.type=1,this.buffer=l;}byteToIntBuffer(u){let l=new Int32Array(Math.max(this.position+u,this.buffer.length>>2));l.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=l;}charToIntBuffer(u){let l=new Int32Array(Math.max(this.position+u,this.buffer.length>>1));l.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=l;}}s.Builder=o;}(i=t.CodePointBuffer||(t.CodePointBuffer={}));}),Fb=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.CodePointCharStream=void 0;var r=ge("assert"),i=rn(),s=mr(),n=fe(),o=class{constructor(a,u,l,h){r(u===0),this._array=a,this._size=l,this._name=h,this._position=0;}get internalStorage(){return this._array}static fromBuffer(a,u){return (u===void 0||u.length===0)&&(u=i.IntStream.UNKNOWN_SOURCE_NAME),new o(a.array(),a.position,a.remaining,u)}consume(){if(this._size-this._position===0)throw r(this.LA(1)===i.IntStream.EOF),new RangeError("cannot consume EOF");this._position++;}get index(){return this._position}get size(){return this._size}mark(){return -1}release(a){}seek(a){this._position=a;}get sourceName(){return this._name}toString(){return this.getText(s.Interval.of(0,this.size-1))}LA(a){let u;switch(Math.sign(a)){case-1:return u=this.index+a,u<0?i.IntStream.EOF:this._array[u];case 0:return 0;case 1:return u=this.index+a-1,u>=this.size?i.IntStream.EOF:this._array[u]}throw new RangeError("Not reached")}getText(a){let u=Math.min(a.a,this.size),l=Math.min(a.b-a.a+1,this.size-u);return this._array instanceof Int32Array?String.fromCodePoint(...Array.from(this._array.subarray(u,u+l))):String.fromCharCode(...Array.from(this._array.subarray(u,u+l)))}};e([n.Override],o.prototype,"consume",null),e([n.Override],o.prototype,"index",null),e([n.Override],o.prototype,"size",null),e([n.Override],o.prototype,"mark",null),e([n.Override],o.prototype,"release",null),e([n.Override],o.prototype,"seek",null),e([n.Override],o.prototype,"sourceName",null),e([n.Override],o.prototype,"toString",null),e([n.Override],o.prototype,"LA",null),e([n.Override],o.prototype,"getText",null),t.CodePointCharStream=o;}),Lp=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CharStreams=void 0;var e=Ob(),r=Fb(),i=rn();(function(n){function o(a,u){(u===void 0||u.length===0)&&(u=i.IntStream.UNKNOWN_SOURCE_NAME);let l=e.CodePointBuffer.builder(a.length),h=new Uint16Array(a.length);for(let c=0;c<a.length;c++)h[c]=a.charCodeAt(c);return l.append(h),r.CodePointCharStream.fromBuffer(l.build(),u)}n.fromString=o;})(t.CharStreams||(t.CharStreams={}));}),Lb=re(t=>{var e=t&&t.__decorate||function(h,c,d,f){var m=arguments.length,g=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,d):f,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(h,c,d,f);else for(var x=h.length-1;x>=0;x--)(v=h[x])&&(g=(m<3?v(g):m>3?v(c,d,g):v(c,d))||g);return m>3&&g&&Object.defineProperty(c,d,g),g},r=t&&t.__param||function(h,c){return function(d,f){c(d,f,h);}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferedTokenStream=void 0;var i=ge("assert"),s=Ma(),n=mr(),o=ln(),a=fe(),u=At(),l=class{constructor(c){if(this.tokens=[],this.p=-1,this.fetchedEOF=!1,c==null)throw new Error("tokenSource cannot be null");this._tokenSource=c;}get tokenSource(){return this._tokenSource}set tokenSource(c){this._tokenSource=c,this.tokens.length=0,this.p=-1,this.fetchedEOF=!1;}get index(){return this.p}mark(){return 0}release(c){}seek(c){this.lazyInit(),this.p=this.adjustSeekIndex(c);}get size(){return this.tokens.length}consume(){let c;if(this.p>=0?this.fetchedEOF?c=this.p<this.tokens.length-1:c=this.p<this.tokens.length:c=!1,!c&&this.LA(1)===u.Token.EOF)throw new Error("cannot consume EOF");this.sync(this.p+1)&&(this.p=this.adjustSeekIndex(this.p+1));}sync(c){i(c>=0);let d=c-this.tokens.length+1;return d>0?this.fetch(d)>=d:!0}fetch(c){if(this.fetchedEOF)return 0;for(let d=0;d<c;d++){let f=this.tokenSource.nextToken();if(this.isWritableToken(f)&&(f.tokenIndex=this.tokens.length),this.tokens.push(f),f.type===u.Token.EOF)return this.fetchedEOF=!0,d+1}return c}get(c){if(c<0||c>=this.tokens.length)throw new RangeError("token index "+c+" out of range 0.."+(this.tokens.length-1));return this.tokens[c]}getRange(c,d){if(c<0||d<0)return [];this.lazyInit();let f=new Array;d>=this.tokens.length&&(d=this.tokens.length-1);for(let m=c;m<=d;m++){let g=this.tokens[m];if(g.type===u.Token.EOF)break;f.push(g);}return f}LA(c){let d=this.LT(c);return d?d.type:u.Token.INVALID_TYPE}tryLB(c){if(!(this.p-c<0))return this.tokens[this.p-c]}LT(c){let d=this.tryLT(c);if(d===void 0)throw new RangeError("requested lookback index out of range");return d}tryLT(c){if(this.lazyInit(),c===0)throw new RangeError("0 is not a valid lookahead index");if(c<0)return this.tryLB(-c);let d=this.p+c-1;return this.sync(d),d>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[d]}adjustSeekIndex(c){return c}lazyInit(){this.p===-1&&this.setup();}setup(){this.sync(0),this.p=this.adjustSeekIndex(0);}getTokens(c,d,f){if(this.lazyInit(),c===void 0)return i(d===void 0&&f===void 0),this.tokens;if(d===void 0&&(d=this.tokens.length-1),c<0||d>=this.tokens.length||d<0||c>=this.tokens.length)throw new RangeError("start "+c+" or stop "+d+" not in 0.."+(this.tokens.length-1));if(c>d)return [];if(f===void 0)return this.tokens.slice(c,d+1);typeof f=="number"&&(f=new Set().add(f));let m=f,g=this.tokens.slice(c,d+1);return g=g.filter(v=>m.has(v.type)),g}nextTokenOnChannel(c,d){if(this.sync(c),c>=this.size)return this.size-1;let f=this.tokens[c];for(;f.channel!==d;){if(f.type===u.Token.EOF)return c;c++,this.sync(c),f=this.tokens[c];}return c}previousTokenOnChannel(c,d){if(this.sync(c),c>=this.size)return this.size-1;for(;c>=0;){let f=this.tokens[c];if(f.type===u.Token.EOF||f.channel===d)return c;c--;}return c}getHiddenTokensToRight(c,d=-1){if(this.lazyInit(),c<0||c>=this.tokens.length)throw new RangeError(c+" not in 0.."+(this.tokens.length-1));let f=this.nextTokenOnChannel(c+1,o.Lexer.DEFAULT_TOKEN_CHANNEL),m,g=c+1;return f===-1?m=this.size-1:m=f,this.filterForChannel(g,m,d)}getHiddenTokensToLeft(c,d=-1){if(this.lazyInit(),c<0||c>=this.tokens.length)throw new RangeError(c+" not in 0.."+(this.tokens.length-1));if(c===0)return [];let f=this.previousTokenOnChannel(c-1,o.Lexer.DEFAULT_TOKEN_CHANNEL);if(f===c-1)return [];let m=f+1,g=c-1;return this.filterForChannel(m,g,d)}filterForChannel(c,d,f){let m=new Array;for(let g=c;g<=d;g++){let v=this.tokens[g];f===-1?v.channel!==o.Lexer.DEFAULT_TOKEN_CHANNEL&&m.push(v):v.channel===f&&m.push(v);}return m}get sourceName(){return this.tokenSource.sourceName}getText(c){c===void 0?c=n.Interval.of(0,this.size-1):c instanceof n.Interval||(c=c.sourceInterval);let d=c.a,f=c.b;if(d<0||f<0)return "";this.fill(),f>=this.tokens.length&&(f=this.tokens.length-1);let m="";for(let g=d;g<=f;g++){let v=this.tokens[g];if(v.type===u.Token.EOF)break;m+=v.text;}return m.toString()}getTextFromRange(c,d){return this.isToken(c)&&this.isToken(d)?this.getText(n.Interval.of(c.tokenIndex,d.tokenIndex)):""}fill(){this.lazyInit();let c=1e3;for(;;)if(this.fetch(c)<c)return}isWritableToken(c){return c instanceof s.CommonToken}isToken(c){return c instanceof s.CommonToken}};e([a.NotNull],l.prototype,"_tokenSource",void 0),e([a.Override],l.prototype,"tokenSource",null),e([a.Override],l.prototype,"index",null),e([a.Override],l.prototype,"mark",null),e([a.Override],l.prototype,"release",null),e([a.Override],l.prototype,"seek",null),e([a.Override],l.prototype,"size",null),e([a.Override],l.prototype,"consume",null),e([a.Override],l.prototype,"get",null),e([a.Override],l.prototype,"LA",null),e([a.NotNull,a.Override],l.prototype,"LT",null),e([a.Override],l.prototype,"sourceName",null),e([a.NotNull,a.Override],l.prototype,"getText",null),e([a.NotNull,a.Override],l.prototype,"getTextFromRange",null),l=e([r(0,a.NotNull)],l),t.BufferedTokenStream=l;}),Pp=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommonTokenStream=void 0;var i=Lb(),s=fe(),n=At(),o=class extends i.BufferedTokenStream{constructor(u,l=n.Token.DEFAULT_CHANNEL){super(u),this.channel=l;}adjustSeekIndex(u){return this.nextTokenOnChannel(u,this.channel)}tryLB(u){if(this.p-u<0)return;let l=this.p,h=1;for(;h<=u&&l>0;)l=this.previousTokenOnChannel(l-1,this.channel),h++;if(!(l<0))return this.tokens[l]}tryLT(u){if(this.lazyInit(),u===0)throw new RangeError("0 is not a valid lookahead index");if(u<0)return this.tryLB(-u);let l=this.p,h=1;for(;h<u;)this.sync(l+1)&&(l=this.nextTokenOnChannel(l+1,this.channel)),h++;return this.tokens[l]}getNumberOfOnChannelTokens(){let u=0;this.fill();for(let l of this.tokens)if(l.channel===this.channel&&u++,l.type===n.Token.EOF)break;return u}};e([s.Override],o.prototype,"adjustSeekIndex",null),e([s.Override],o.prototype,"tryLB",null),e([s.Override],o.prototype,"tryLT",null),o=e([r(0,s.NotNull)],o),t.CommonTokenStream=o;}),Pb=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ListTokenSource=void 0;var i=Ap(),s=fe(),n=At(),o=class{constructor(u,l){if(this.i=0,this._factory=i.CommonTokenFactory.DEFAULT,u==null)throw new Error("tokens cannot be null");this.tokens=u,this._sourceName=l;}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 u=this.tokens[this.tokens.length-1],l=u.text;if(l!=null){let h=l.lastIndexOf(`
68
+ `;}}let l=u;return l.length===0?"":l}getContextLabel(u){if(u===s.PredictionContext.EMPTY_FULL_STATE_KEY)return "ctx:EMPTY_FULL";if(u===s.PredictionContext.EMPTY_LOCAL_STATE_KEY)return "ctx:EMPTY_LOCAL";if(this.atn&&u>0&&u<=this.atn.states.length){let h=this.atn.states[u].ruleIndex;if(this.ruleNames&&h>=0&&h<this.ruleNames.length)return "ctx:"+String(u)+"("+this.ruleNames[h]+")"}return "ctx:"+String(u)}getEdgeLabel(u){return this.vocabulary.getDisplayName(u)}getStateString(u){if(u===r.ATNSimulator.ERROR)return "ERROR";let l=u.stateNumber,h="s"+l;if(u.isAcceptState&&(u.predicates?h=":s"+l+"=>"+u.predicates:h=":s"+l+"=>"+u.prediction),u.isContextSensitive){h+="*";for(let c of u.configs)if(c.reachesIntoOuterContext){h+="*";break}}return h}};e([i.NotNull],a.prototype,"dfa",void 0),e([i.NotNull],a.prototype,"vocabulary",void 0),e([i.Override],a.prototype,"toString",null),t.DFASerializer=a;}),x7=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerDFASerializer=void 0;var i=yb(),s=fe(),n=un(),o=class extends i.DFASerializer{constructor(u){super(u,n.VocabularyImpl.EMPTY_VOCABULARY);}getEdgeLabel(u){return "'"+String.fromCodePoint(u)+"'"}};e([s.Override,s.NotNull],o.prototype,"getEdgeLabel",null),o=e([r(0,s.NotNull)],o),t.LexerDFASerializer=o;}),Sp=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.StarLoopEntryState=void 0;var r=Qt(),i=an(),s=ls(),n=fe(),o=class extends s.DecisionState{constructor(){super(...arguments),this.precedenceRuleDecision=!1,this.precedenceLoopbackStates=new i.BitSet;}get stateType(){return r.ATNStateType.STAR_LOOP_ENTRY}};e([n.Override],o.prototype,"stateType",null),t.StarLoopEntryState=o;}),vb=te(t=>{var e=t&&t.__decorate||function(f,m,g,v){var x=arguments.length,_=x<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,g):v,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(f,m,g,v);else for(var b=f.length-1;b>=0;b--)(E=f[b])&&(_=(x<3?E(_):x>3?E(m,g,_):E(m,g))||_);return x>3&&_&&Object.defineProperty(m,g,_),_},r=t&&t.__param||function(f,m){return function(g,v){m(g,v,f);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DFA=void 0;var i=on(),s=Ba(),n=yb(),o=uc(),a=x7(),u=fe(),l=Qr(),h=Sp(),c=un(),d=class{constructor(m,g=0){if(this.states=new i.Array2DHashSet(l.ObjectEqualityComparator.INSTANCE),this.nextStateNumber=0,!m.atn)throw new Error("The ATNState must be associated with an ATN");this.atnStartState=m,this.atn=m.atn,this.decision=g;let v=!1;m instanceof h.StarLoopEntryState&&m.precedenceRuleDecision&&(v=!0,this.s0=new o.DFAState(new s.ATNConfigSet),this.s0full=new o.DFAState(new s.ATNConfigSet)),this.precedenceDfa=v;}get isPrecedenceDfa(){return this.precedenceDfa}getPrecedenceStartState(m,g){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");return g?this.s0full.getTarget(m):this.s0.getTarget(m)}setPrecedenceStartState(m,g,v){if(!this.isPrecedenceDfa)throw new Error("Only precedence DFAs may contain a precedence start state.");m<0||(g?this.s0full.setTarget(m,v):this.s0.setTarget(m,v));}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(m){return m.stateNumber=this.nextStateNumber++,this.states.getOrAdd(m)}toString(m,g){if(m||(m=c.VocabularyImpl.EMPTY_VOCABULARY),!this.s0)return "";let v;return g?v=new n.DFASerializer(this,m,g,this.atnStartState.atn):v=new n.DFASerializer(this,m),v.toString()}toLexerString(){return this.s0?new a.LexerDFASerializer(this).toString():""}};e([u.NotNull],d.prototype,"states",void 0),e([u.NotNull],d.prototype,"atnStartState",void 0),e([u.NotNull],d.prototype,"atn",void 0),d=e([r(0,u.NotNull)],d),t.DFA=d;}),xb=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.BasicState=void 0;var r=Ci(),i=Qt(),s=fe(),n=class extends r.ATNState{get stateType(){return i.ATNStateType.BASIC}};e([s.Override],n.prototype,"stateType",null),t.BasicState=n;}),bb=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.InvalidState=void 0;var r=Qt(),i=xb(),s=fe(),n=class extends i.BasicState{get stateType(){return r.ATNStateType.INVALID_TYPE}};e([s.Override],n.prototype,"stateType",null),t.InvalidState=n;}),Rp=te(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.SetTransition=void 0;var i=cs(),s=fe(),n=At(),o=sn(),a=class extends o.Transition{constructor(l,h){super(l),h==null&&(h=i.IntervalSet.of(n.Token.INVALID_TYPE)),this.set=h;}get serializationType(){return 7}get label(){return this.set}matches(l,h,c){return this.set.contains(l)}toString(){return this.set.toString()}};e([s.NotNull],a.prototype,"set",void 0),e([s.Override],a.prototype,"serializationType",null),e([s.Override,s.NotNull],a.prototype,"label",null),e([s.Override],a.prototype,"matches",null),e([s.Override,s.NotNull],a.prototype,"toString",null),a=e([r(0,s.NotNull),r(1,s.Nullable)],a),t.SetTransition=a;}),Np=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.NotSetTransition=void 0;var i=fe(),s=Rp(),n=class extends s.SetTransition{constructor(a,u){super(a,u);}get serializationType(){return 8}matches(a,u,l){return a>=u&&a<=l&&!super.matches(a,u,l)}toString(){return "~"+super.toString()}};e([i.Override],n.prototype,"serializationType",null),e([i.Override],n.prototype,"matches",null),e([i.Override],n.prototype,"toString",null),n=e([r(0,i.NotNull),r(1,i.Nullable)],n),t.NotSetTransition=n;}),qa=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleStopState=void 0;var r=Ci(),i=Qt(),s=fe(),n=class extends r.ATNState{get nonStopStateNumber(){return -1}get stateType(){return i.ATNStateType.RULE_STOP}};e([s.Override],n.prototype,"nonStopStateNumber",null),e([s.Override],n.prototype,"stateType",null),t.RuleStopState=n;}),Op=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleTransition=void 0;var i=fe(),s=sn(),n=class extends s.Transition{constructor(a,u,l,h){super(a),this.tailCall=!1,this.optimizedTailCall=!1,this.ruleIndex=u,this.precedence=l,this.followState=h;}get serializationType(){return 3}get isEpsilon(){return !0}matches(a,u,l){return !1}};e([i.NotNull],n.prototype,"followState",void 0),e([i.Override],n.prototype,"serializationType",null),e([i.Override],n.prototype,"isEpsilon",null),e([i.Override],n.prototype,"matches",null),n=e([r(0,i.NotNull),r(3,i.NotNull)],n),t.RuleTransition=n;}),Eb=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.WildcardTransition=void 0;var i=fe(),s=sn(),n=class extends s.Transition{constructor(a){super(a);}get serializationType(){return 9}matches(a,u,l){return a>=u&&a<=l}toString(){return "."}};e([i.Override],n.prototype,"serializationType",null),e([i.Override],n.prototype,"matches",null),e([i.Override,i.NotNull],n.prototype,"toString",null),n=e([r(0,i.NotNull)],n),t.WildcardTransition=n;}),b7=te(t=>{var e=t&&t.__decorate||function(x,_,E,b){var w=arguments.length,D=w<3?_:b===null?b=Object.getOwnPropertyDescriptor(_,E):b,N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(x,_,E,b);else for(var F=x.length-1;F>=0;F--)(N=x[F])&&(D=(w<3?N(D):w>3?N(_,E,D):N(_,E))||D);return w>3&&D&&Object.defineProperty(_,E,D),D},r=t&&t.__param||function(x,_){return function(E,b){_(E,b,x);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LL1Analyzer=void 0;var i=Ep(),s=on(),n=ac(),o=an(),a=cs(),u=fe(),l=Np(),h=Qr(),c=Vr(),d=qa(),f=Op(),m=At(),g=Eb(),v=class X0{constructor(_){this.atn=_;}getDecisionLookahead(_){if(_==null)return;let E=new Array(_.numberOfTransitions);for(let b=0;b<_.numberOfTransitions;b++){let w=new a.IntervalSet;E[b]=w;let D=new s.Array2DHashSet(h.ObjectEqualityComparator.INSTANCE);this._LOOK(_.transition(b).target,void 0,c.PredictionContext.EMPTY_LOCAL,w,D,new o.BitSet,!1,!1),(w.size===0||w.contains(X0.HIT_PRED))&&(w=void 0,E[b]=w);}return E}LOOK(_,E,b){if(b===void 0){if(_.atn==null)throw new Error("Illegal state");b=_.atn.ruleToStopState[_.ruleIndex];}else b===null&&(b=void 0);let w=new a.IntervalSet;return this._LOOK(_,b,E,w,new s.Array2DHashSet,new o.BitSet,!0,!0),w}_LOOK(_,E,b,w,D,N,F,U){let Z=n.ATNConfig.create(_,0,b);if(!D.add(Z))return;if(_===E){if(c.PredictionContext.isEmptyLocal(b)){w.add(m.Token.EPSILON);return}else if(b.isEmpty){U&&w.add(m.Token.EOF);return}}if(_ instanceof d.RuleStopState){if(b.isEmpty&&!c.PredictionContext.isEmptyLocal(b)){U&&w.add(m.Token.EOF);return}let ae=N.get(_.ruleIndex);try{N.clear(_.ruleIndex);for(let k=0;k<b.size;k++){if(b.getReturnState(k)===c.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let y=this.atn.states[b.getReturnState(k)];this._LOOK(y,E,b.getParent(k),w,D,N,F,U);}}finally{ae&&N.set(_.ruleIndex);}}let re=_.numberOfTransitions;for(let ae=0;ae<re;ae++){let k=_.transition(ae);if(k instanceof f.RuleTransition){if(N.get(k.ruleIndex))continue;let y=b.getChild(k.followState.stateNumber);try{N.set(k.ruleIndex),this._LOOK(k.target,E,y,w,D,N,F,U);}finally{N.clear(k.ruleIndex);}}else if(k instanceof i.AbstractPredicateTransition)F?this._LOOK(k.target,E,b,w,D,N,F,U):w.add(X0.HIT_PRED);else if(k.isEpsilon)this._LOOK(k.target,E,b,w,D,N,F,U);else if(k instanceof g.WildcardTransition)w.addAll(a.IntervalSet.of(m.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType));else {let y=k.label;y!=null&&(k instanceof l.NotSetTransition&&(y=y.complement(a.IntervalSet.of(m.Token.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType))),w.addAll(y));}}}};v.HIT_PRED=m.Token.INVALID_TYPE,e([u.NotNull],v.prototype,"atn",void 0),e([u.NotNull,r(0,u.NotNull),r(1,u.NotNull)],v.prototype,"LOOK",null),e([r(0,u.NotNull),r(2,u.NotNull),r(3,u.NotNull),r(4,u.NotNull),r(5,u.NotNull)],v.prototype,"_LOOK",null),v=e([r(0,u.NotNull)],v),t.LL1Analyzer=v;}),ti=te(t=>{var e=t&&t.__decorate||function(m,g,v,x){var _=arguments.length,E=_<3?g:x===null?x=Object.getOwnPropertyDescriptor(g,v):x,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(m,g,v,x);else for(var w=m.length-1;w>=0;w--)(b=m[w])&&(E=(_<3?b(E):_>3?b(g,v,E):b(g,v))||E);return _>3&&E&&Object.defineProperty(g,v,E),E},r=t&&t.__param||function(m,g){return function(v,x){g(v,x,m);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ATN=void 0;var i=uo(),s=vb(),n=cs(),o=bb(),a=b7(),u=fe(),l=Qr(),h=Vr(),c=At(),d=ge("assert"),f=class{constructor(g,v){this.states=[],this.decisionToState=[],this.modeNameToStartState=new Map,this.modeToStartState=[],this.contextCache=new i.Array2DHashMap(l.ObjectEqualityComparator.INSTANCE),this.decisionToDFA=[],this.modeToDFA=[],this.LL1Table=new Map,this.grammarType=g,this.maxTokenType=v;}clearDFA(){this.decisionToDFA=new Array(this.decisionToState.length);for(let g=0;g<this.decisionToDFA.length;g++)this.decisionToDFA[g]=new s.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 s.DFA(this.modeToStartState[g]);this.contextCache.clear(),this.LL1Table.clear();}get contextCacheSize(){return this.contextCache.size}getCachedContext(g){return h.PredictionContext.getCachedContext(g,this.contextCache,new h.PredictionContext.IdentityHashMap)}getDecisionToDFA(){return d(this.decisionToDFA!=null&&this.decisionToDFA.length===this.decisionToState.length),this.decisionToDFA}nextTokens(g,v){return v?new a.LL1Analyzer(this).LOOK(g,v):(g.nextTokenWithinRule||(g.nextTokenWithinRule=this.nextTokens(g,h.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 v=new o.InvalidState;v.atn=this,v.stateNumber=g.stateNumber,this.states[g.stateNumber]=v;}defineMode(g,v){this.modeNameToStartState.set(g,v),this.modeToStartState.push(v),this.modeToDFA.push(new s.DFA(v)),this.defineDecisionState(v);}defineDecisionState(g){return this.decisionToState.push(g),g.decision=this.decisionToState.length-1,this.decisionToDFA.push(new s.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,v){if(g<0||g>=this.states.length)throw new RangeError("Invalid state number.");let x=v,_=this.states[g],E=this.nextTokens(_);if(!E.contains(c.Token.EPSILON))return E;let b=new n.IntervalSet;for(b.addAll(E),b.remove(c.Token.EPSILON);x!=null&&x.invokingState>=0&&E.contains(c.Token.EPSILON);){let D=this.states[x.invokingState].transition(0);E=this.nextTokens(D.followState),b.addAll(E),b.remove(c.Token.EPSILON),x=x._parent;}return E.contains(c.Token.EPSILON)&&b.add(c.Token.EOF),b}};e([u.NotNull],f.prototype,"states",void 0),e([u.NotNull],f.prototype,"decisionToState",void 0),e([u.NotNull],f.prototype,"modeNameToStartState",void 0),e([u.NotNull],f.prototype,"modeToStartState",void 0),e([u.NotNull],f.prototype,"decisionToDFA",void 0),e([u.NotNull],f.prototype,"modeToDFA",void 0),e([u.NotNull],f.prototype,"nextTokens",null),e([r(0,u.NotNull)],f.prototype,"removeState",null),e([r(0,u.NotNull),r(1,u.NotNull)],f.prototype,"defineMode",null),e([r(0,u.NotNull)],f.prototype,"defineDecisionState",null),e([u.NotNull],f.prototype,"getExpectedTokens",null),f=e([r(0,u.NotNull)],f),t.ATN=f,function(m){m.INVALID_ALT_NUMBER=0;}(f=t.ATN||(t.ATN={})),t.ATN=f;}),E7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerIndexedCustomAction=void 0;var i=qt(),s=fe(),n=class Cb{constructor(a,u){this._offset=a,this._action=u;}get offset(){return this._offset}get action(){return this._action}get actionType(){return this._action.actionType}get isPositionDependent(){return !0}execute(a){this._action.execute(a);}hashCode(){let a=i.MurmurHash.initialize();return a=i.MurmurHash.update(a,this._offset),a=i.MurmurHash.update(a,this._action),i.MurmurHash.finish(a,2)}equals(a){return a===this?!0:a instanceof Cb?this._offset===a._offset&&this._action.equals(a._action):!1}};e([s.NotNull],n.prototype,"action",null),e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),n=e([r(1,s.NotNull)],n),t.LexerIndexedCustomAction=n;}),C7=te(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerActionExecutor=void 0;var i=nc(),s=E7(),n=qt(),o=fe(),a=class Pa{constructor(l){this._lexerActions=l;let h=n.MurmurHash.initialize();for(let c of l)h=n.MurmurHash.update(h,c);this.cachedHashCode=n.MurmurHash.finish(h,l.length);}static append(l,h){if(!l)return new Pa([h]);let c=l._lexerActions.slice(0);return c.push(h),new Pa(c)}fixOffsetBeforeMatch(l){let h;for(let c=0;c<this._lexerActions.length;c++)this._lexerActions[c].isPositionDependent&&!(this._lexerActions[c]instanceof s.LexerIndexedCustomAction)&&(h||(h=this._lexerActions.slice(0)),h[c]=new s.LexerIndexedCustomAction(l,this._lexerActions[c]));return h?new Pa(h):this}get lexerActions(){return this._lexerActions}execute(l,h,c){let d=!1,f=h.index;try{for(let m of this._lexerActions){if(m instanceof s.LexerIndexedCustomAction){let g=m.offset;h.seek(c+g),m=m.action,d=c+g!==f;}else m.isPositionDependent&&(h.seek(f),d=!1);m.execute(l);}}finally{d&&h.seek(f);}}hashCode(){return this.cachedHashCode}equals(l){return l===this?!0:l instanceof Pa?this.cachedHashCode===l.cachedHashCode&&i.ArrayEqualityComparator.INSTANCE.equals(this._lexerActions,l._lexerActions):!1}};e([o.NotNull],a.prototype,"_lexerActions",void 0),e([o.NotNull],a.prototype,"lexerActions",null),e([r(0,o.NotNull)],a.prototype,"execute",null),e([o.Override],a.prototype,"hashCode",null),e([o.Override],a.prototype,"equals",null),e([o.NotNull,r(1,o.NotNull)],a,"append",null),a=e([r(0,o.NotNull)],a),t.LexerActionExecutor=a;}),cc=te(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerNoViableAltException=void 0;var i=nn(),s=fe(),n=mr(),o=ei(),a=class extends i.RecognitionException{constructor(l,h,c,d){super(l,h),this._startIndex=c,this._deadEndConfigs=d;}get startIndex(){return this._startIndex}get deadEndConfigs(){return this._deadEndConfigs}get inputStream(){return super.inputStream}toString(){let l="";return this._startIndex>=0&&this._startIndex<this.inputStream.size&&(l=this.inputStream.getText(n.Interval.of(this._startIndex,this._startIndex)),l=o.escapeWhitespace(l,!1)),`LexerNoViableAltException('${l}')`}};e([s.Override],a.prototype,"inputStream",null),e([s.Override],a.prototype,"toString",null),a=e([r(1,s.NotNull)],a),t.LexerNoViableAltException=a;}),T7=te(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.OrderedATNConfigSet=void 0;var r=Ba(),i=fe(),s=class extends r.ATNConfigSet{constructor(n,o){n!=null&&o!=null?super(n,o):super();}clone(n){let o=new s(this,n);return !n&&this.isReadOnly&&o.addAll(this),o}getKey(n){return {state:0,alt:n.hashCode()}}canMerge(n,o,a){return n.equals(a)}};e([i.Override],s.prototype,"clone",null),e([i.Override],s.prototype,"getKey",null),e([i.Override],s.prototype,"canMerge",null),t.OrderedATNConfigSet=s;}),hc=te(t=>{var e=t&&t.__decorate||function(w,D,N,F){var U=arguments.length,Z=U<3?D:F===null?F=Object.getOwnPropertyDescriptor(D,N):F,re;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")Z=Reflect.decorate(w,D,N,F);else for(var ae=w.length-1;ae>=0;ae--)(re=w[ae])&&(Z=(U<3?re(Z):U>3?re(D,N,Z):re(D,N))||Z);return U>3&&Z&&Object.defineProperty(D,N,Z),Z},r=t&&t.__param||function(w,D){return function(N,F){D(N,F,w);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerATNSimulator=void 0;var i=mb(),s=ti(),n=ac(),o=Ba(),a=lc(),u=uc(),l=mr(),h=rn(),c=ln(),d=C7(),f=cc(),m=fe(),g=T7(),v=Vr(),x=qa(),_=At(),E=ge("assert"),b=class Tr extends a.ATNSimulator{constructor(D,N){super(D),this.optimize_tail_calls=!0,this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=c.Lexer.DEFAULT_MODE,this.prevAccept=new Tr.SimState,this.recog=N;}copyState(D){this._charPositionInLine=D.charPositionInLine,this._line=D._line,this.mode=D.mode,this.startIndex=D.startIndex;}match(D,N){this.mode=N;let F=D.mark();try{this.startIndex=D.index,this.prevAccept.reset();let U=this.atn.modeToDFA[N].s0;return U==null?this.matchATN(D):this.execATN(D,U)}finally{D.release(F);}}reset(){this.prevAccept.reset(),this.startIndex=-1,this._line=1,this._charPositionInLine=0,this.mode=c.Lexer.DEFAULT_MODE;}matchATN(D){let N=this.atn.modeToStartState[this.mode];Tr.debug&&console.log(`matchATN mode ${this.mode} start: ${N}`);let F=this.mode,U=this.computeStartState(D,N),Z=U.hasSemanticContext;Z&&(U.hasSemanticContext=!1);let re=this.addDFAState(U);if(!Z){let k=this.atn.modeToDFA[this.mode];k.s0?re=k.s0:k.s0=re;}let ae=this.execATN(D,re);return Tr.debug&&console.log(`DFA after matchATN: ${this.atn.modeToDFA[F].toLexerString()}`),ae}execATN(D,N){Tr.debug&&console.log(`start state closure=${N.configs}`),N.isAcceptState&&this.captureSimState(this.prevAccept,D,N);let F=D.LA(1),U=N;for(;;){Tr.debug&&console.log(`execATN loop starting closure: ${U.configs}`);let Z=this.getExistingTargetState(U,F);if(Z==null&&(Z=this.computeTargetState(D,U,F)),Z===a.ATNSimulator.ERROR||(F!==h.IntStream.EOF&&this.consume(D),Z.isAcceptState&&(this.captureSimState(this.prevAccept,D,Z),F===h.IntStream.EOF)))break;F=D.LA(1),U=Z;}return this.failOrAccept(this.prevAccept,D,U.configs,F)}getExistingTargetState(D,N){let F=D.getTarget(N);return Tr.debug&&F!=null&&console.log("reuse state "+D.stateNumber+" edge to "+F.stateNumber),F}computeTargetState(D,N,F){let U=new g.OrderedATNConfigSet;return this.getReachableConfigSet(D,N.configs,U,F),U.isEmpty?(U.hasSemanticContext||this.addDFAEdge(N,F,a.ATNSimulator.ERROR),a.ATNSimulator.ERROR):this.addDFAEdge(N,F,U)}failOrAccept(D,N,F,U){if(D.dfaState!=null){let Z=D.dfaState.lexerActionExecutor;return this.accept(N,Z,this.startIndex,D.index,D.line,D.charPos),D.dfaState.prediction}else {if(U===h.IntStream.EOF&&N.index===this.startIndex)return _.Token.EOF;throw new f.LexerNoViableAltException(this.recog,N,this.startIndex,F)}}getReachableConfigSet(D,N,F,U){let Z=s.ATN.INVALID_ALT_NUMBER;for(let re of N){let ae=re.alt===Z;if(ae&&re.hasPassedThroughNonGreedyDecision)continue;Tr.debug&&console.log(`testing ${this.getTokenName(U)} at ${re.toString(this.recog,!0)}`);let k=re.state.numberOfOptimizedTransitions;for(let y=0;y<k;y++){let C=re.state.getOptimizedTransition(y),S=this.getReachableTarget(C,U);if(S!=null){let R=re.lexerActionExecutor,L;R!=null?(R=R.fixOffsetBeforeMatch(D.index-this.startIndex),L=re.transform(S,!0,R)):(E(re.lexerActionExecutor==null),L=re.transform(S,!0));let I=U===h.IntStream.EOF;if(this.closure(D,L,F,ae,!0,I)){Z=re.alt;break}}}}}accept(D,N,F,U,Z,re){Tr.debug&&console.log(`ACTION ${N}`),D.seek(U),this._line=Z,this._charPositionInLine=re,N!=null&&this.recog!=null&&N.execute(this.recog,D,F);}getReachableTarget(D,N){if(D.matches(N,c.Lexer.MIN_CHAR_VALUE,c.Lexer.MAX_CHAR_VALUE))return D.target}computeStartState(D,N){let F=v.PredictionContext.EMPTY_FULL,U=new g.OrderedATNConfigSet;for(let Z=0;Z<N.numberOfTransitions;Z++){let re=N.transition(Z).target,ae=n.ATNConfig.create(re,Z+1,F);this.closure(D,ae,U,!1,!1,!1);}return U}closure(D,N,F,U,Z,re){if(Tr.debug&&console.log("closure("+N.toString(this.recog,!0)+")"),N.state instanceof x.RuleStopState){Tr.debug&&(this.recog!=null?console.log(`closure at ${this.recog.ruleNames[N.state.ruleIndex]} rule stop ${N}`):console.log(`closure at rule stop ${N}`));let k=N.context;if(k.isEmpty)return F.add(N),!0;k.hasEmpty&&(F.add(N.transform(N.state,!0,v.PredictionContext.EMPTY_FULL)),U=!0);for(let y=0;y<k.size;y++){let C=k.getReturnState(y);if(C===v.PredictionContext.EMPTY_FULL_STATE_KEY)continue;let S=k.getParent(y),R=this.atn.states[C],L=N.transform(R,!1,S);U=this.closure(D,L,F,U,Z,re);}return U}N.state.onlyHasEpsilonTransitions||(!U||!N.hasPassedThroughNonGreedyDecision)&&F.add(N);let ae=N.state;for(let k=0;k<ae.numberOfOptimizedTransitions;k++){let y=ae.getOptimizedTransition(k),C=this.getEpsilonTarget(D,N,y,F,Z,re);C!=null&&(U=this.closure(D,C,F,U,Z,re));}return U}getEpsilonTarget(D,N,F,U,Z,re){let ae;switch(F.serializationType){case 3:let k=F;if(this.optimize_tail_calls&&k.optimizedTailCall&&!N.context.hasEmpty)ae=N.transform(F.target,!0);else {let C=N.context.getChild(k.followState.stateNumber);ae=N.transform(F.target,!0,C);}break;case 10:throw new Error("Precedence predicates are not supported in lexers.");case 4:let y=F;Tr.debug&&console.log("EVAL rule "+y.ruleIndex+":"+y.predIndex),U.hasSemanticContext=!0,this.evaluatePredicate(D,y.ruleIndex,y.predIndex,Z)?ae=N.transform(F.target,!0):ae=void 0;break;case 6:if(N.context.hasEmpty){let C=d.LexerActionExecutor.append(N.lexerActionExecutor,this.atn.lexerActions[F.actionIndex]);ae=N.transform(F.target,!0,C);break}else {ae=N.transform(F.target,!0);break}case 1:ae=N.transform(F.target,!0);break;case 5:case 2:case 7:if(re&&F.matches(h.IntStream.EOF,c.Lexer.MIN_CHAR_VALUE,c.Lexer.MAX_CHAR_VALUE)){ae=N.transform(F.target,!1);break}ae=void 0;break;default:ae=void 0;break}return ae}evaluatePredicate(D,N,F,U){if(this.recog==null)return !0;if(!U)return this.recog.sempred(void 0,N,F);let Z=this._charPositionInLine,re=this._line,ae=D.index,k=D.mark();try{return this.consume(D),this.recog.sempred(void 0,N,F)}finally{this._charPositionInLine=Z,this._line=re,D.seek(ae),D.release(k);}}captureSimState(D,N,F){D.index=N.index,D.line=this._line,D.charPos=this._charPositionInLine,D.dfaState=F;}addDFAEdge(D,N,F){if(F instanceof o.ATNConfigSet){let U=F.hasSemanticContext;U&&(F.hasSemanticContext=!1);let Z=this.addDFAState(F);return U||this.addDFAEdge(D,N,Z),Z}else Tr.debug&&console.log("EDGE "+D+" -> "+F+" upon "+String.fromCharCode(N)),D!=null&&D.setTarget(N,F);}addDFAState(D){E(!D.hasSemanticContext);let N=new u.DFAState(D),F=this.atn.modeToDFA[this.mode].states.get(N);if(F!=null)return F;D.optimizeConfigs(this);let U=new u.DFAState(D.clone(!0)),Z;for(let re of D)if(re.state instanceof x.RuleStopState){Z=re;break}if(Z!=null){let re=this.atn.ruleToTokenType[Z.state.ruleIndex],ae=Z.lexerActionExecutor;U.acceptStateInfo=new i.AcceptStateInfo(re,ae);}return this.atn.modeToDFA[this.mode].addState(U)}getDFA(D){return this.atn.modeToDFA[D]}getText(D){return D.getText(l.Interval.of(this.startIndex,D.index-1))}get line(){return this._line}set line(D){this._line=D;}get charPositionInLine(){return this._charPositionInLine}set charPositionInLine(D){this._charPositionInLine=D;}consume(D){D.LA(1)===10?(this._line++,this._charPositionInLine=0):this._charPositionInLine++,D.consume();}getTokenName(D){return D===-1?"EOF":"'"+String.fromCharCode(D)+"'"}};e([m.NotNull],b.prototype,"prevAccept",void 0),e([r(0,m.NotNull)],b.prototype,"copyState",null),e([r(0,m.NotNull)],b.prototype,"match",null),e([m.Override],b.prototype,"reset",null),e([r(0,m.NotNull)],b.prototype,"matchATN",null),e([r(0,m.NotNull),r(1,m.NotNull)],b.prototype,"execATN",null),e([r(0,m.NotNull)],b.prototype,"getExistingTargetState",null),e([m.NotNull,r(0,m.NotNull),r(1,m.NotNull)],b.prototype,"computeTargetState",null),e([r(0,m.NotNull),r(1,m.NotNull),r(2,m.NotNull)],b.prototype,"getReachableConfigSet",null),e([r(0,m.NotNull)],b.prototype,"accept",null),e([m.NotNull,r(0,m.NotNull),r(1,m.NotNull)],b.prototype,"computeStartState",null),e([r(0,m.NotNull),r(1,m.NotNull),r(2,m.NotNull)],b.prototype,"closure",null),e([r(0,m.NotNull),r(1,m.NotNull),r(2,m.NotNull),r(3,m.NotNull)],b.prototype,"getEpsilonTarget",null),e([r(0,m.NotNull)],b.prototype,"evaluatePredicate",null),e([r(0,m.NotNull),r(1,m.NotNull),r(2,m.NotNull)],b.prototype,"captureSimState",null),e([m.NotNull,r(0,m.NotNull)],b.prototype,"addDFAState",null),e([m.NotNull],b.prototype,"getDFA",null),e([m.NotNull,r(0,m.NotNull)],b.prototype,"getText",null),e([r(0,m.NotNull)],b.prototype,"consume",null),e([m.NotNull],b.prototype,"getTokenName",null),b=e([r(0,m.NotNull)],b),t.LexerATNSimulator=b,function(w){w.debug=!1,w.dfa_debug=!1;class D{constructor(){this.index=-1,this.line=0,this.charPos=-1;}reset(){this.index=-1,this.line=0,this.charPos=-1,this.dfaState=void 0;}}w.SimState=D;}(b=t.LexerATNSimulator||(t.LexerATNSimulator={})),t.LexerATNSimulator=b;}),ln=te(t=>{var e=t&&t.__decorate||function(d,f,m,g){var v=arguments.length,x=v<3?f:g===null?g=Object.getOwnPropertyDescriptor(f,m):g,_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")x=Reflect.decorate(d,f,m,g);else for(var E=d.length-1;E>=0;E--)(_=d[E])&&(x=(v<3?_(x):v>3?_(f,m,x):_(f,m))||x);return v>3&&x&&Object.defineProperty(f,m,x),x};Object.defineProperty(t,"__esModule",{value:!0}),t.Lexer=void 0;var r=Ap(),i=pb(),s=mr(),n=rn(),o=hc(),a=cc(),u=fe(),l=ja(),h=At(),c=class extends l.Recognizer{constructor(d){super(),this._factory=r.CommonTokenFactory.DEFAULT,this._tokenStartCharIndex=-1,this._tokenStartLine=0,this._tokenStartCharPositionInLine=0,this._hitEOF=!1,this._channel=0,this._type=0,this._modeStack=new i.IntegerStack,this._mode=c.DEFAULT_MODE,this._input=d,this._tokenFactorySourcePair={source:this,stream:d};}static get DEFAULT_TOKEN_CHANNEL(){return h.Token.DEFAULT_CHANNEL}static get HIDDEN(){return h.Token.HIDDEN_CHANNEL}reset(d){(d===void 0||d)&&this._input.seek(0),this._token=void 0,this._type=h.Token.INVALID_TYPE,this._channel=h.Token.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartCharPositionInLine=-1,this._tokenStartLine=-1,this._text=void 0,this._hitEOF=!1,this._mode=c.DEFAULT_MODE,this._modeStack.clear(),this.interpreter.reset();}nextToken(){if(this._input==null)throw new Error("nextToken requires a non-null input stream.");let d=this._input.mark();try{e:for(;;){if(this._hitEOF)return this.emitEOF();this._token=void 0,this._channel=h.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=h.Token.INVALID_TYPE;let f;try{f=this.interpreter.match(this._input,this._mode);}catch(m){if(m instanceof a.LexerNoViableAltException)this.notifyListeners(m),this.recover(m),f=c.SKIP;else throw m}if(this._input.LA(1)===n.IntStream.EOF&&(this._hitEOF=!0),this._type===h.Token.INVALID_TYPE&&(this._type=f),this._type===c.SKIP)continue e}while(this._type===c.MORE);return this._token==null?this.emit():this._token}}finally{this._input.release(d);}}skip(){this._type=c.SKIP;}more(){this._type=c.MORE;}mode(d){this._mode=d;}pushMode(d){o.LexerATNSimulator.debug&&console.log("pushMode "+d),this._modeStack.push(this._mode),this.mode(d);}popMode(){if(this._modeStack.isEmpty)throw new Error("EmptyStackException");return o.LexerATNSimulator.debug&&console.log("popMode back to "+this._modeStack.peek()),this.mode(this._modeStack.pop()),this._mode}get tokenFactory(){return this._factory}set tokenFactory(d){this._factory=d;}get inputStream(){return this._input}set inputStream(d){this.reset(!1),this._input=d,this._tokenFactorySourcePair={source:this,stream:this._input};}get sourceName(){return this._input.sourceName}emit(d){return d||(d=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.charIndex-1,this._tokenStartLine,this._tokenStartCharPositionInLine)),this._token=d,d}emitEOF(){let d=this.charPositionInLine,f=this.line,m=this._factory.create(this._tokenFactorySourcePair,h.Token.EOF,void 0,h.Token.DEFAULT_CHANNEL,this._input.index,this._input.index-1,f,d);return this.emit(m),m}get line(){return this.interpreter.line}set line(d){this.interpreter.line=d;}get charPositionInLine(){return this.interpreter.charPositionInLine}set charPositionInLine(d){this.interpreter.charPositionInLine=d;}get charIndex(){return this._input.index}get text(){return this._text!=null?this._text:this.interpreter.getText(this._input)}set text(d){this._text=d;}get token(){return this._token}set token(d){this._token=d;}set type(d){this._type=d;}get type(){return this._type}set channel(d){this._channel=d;}get channel(){return this._channel}getAllTokens(){let d=[],f=this.nextToken();for(;f.type!==h.Token.EOF;)d.push(f),f=this.nextToken();return d}notifyListeners(d){let f=this._input.getText(s.Interval.of(this._tokenStartCharIndex,this._input.index)),m="token recognition error at: '"+this.getErrorDisplay(f)+"'",g=this.getErrorListenerDispatch();g.syntaxError&&g.syntaxError(this,void 0,this._tokenStartLine,this._tokenStartCharPositionInLine,m,d);}getErrorDisplay(d){if(typeof d=="number"){switch(d){case h.Token.EOF:return "<EOF>";case 10:return "\\n";case 9:return "\\t";case 13:return "\\r"}return String.fromCharCode(d)}return d.replace(/\n/g,"\\n").replace(/\t/g,"\\t").replace(/\r/g,"\\r")}getCharErrorDisplay(d){return "'"+this.getErrorDisplay(d)+"'"}recover(d){d instanceof a.LexerNoViableAltException?this._input.LA(1)!==n.IntStream.EOF&&this.interpreter.consume(this._input):this._input.consume();}};c.DEFAULT_MODE=0,c.MORE=-2,c.SKIP=-3,c.MIN_CHAR_VALUE=0,c.MAX_CHAR_VALUE=1114111,e([u.Override],c.prototype,"nextToken",null),e([u.Override],c.prototype,"tokenFactory",null),e([u.Override],c.prototype,"inputStream",null),e([u.Override],c.prototype,"sourceName",null),e([u.Override],c.prototype,"line",null),e([u.Override],c.prototype,"charPositionInLine",null),t.Lexer=c;}),cs=te(t=>{var e=t&&t.__decorate||function(c,d,f,m){var g=arguments.length,v=g<3?d:m===null?m=Object.getOwnPropertyDescriptor(d,f):m,x;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")v=Reflect.decorate(c,d,f,m);else for(var _=c.length-1;_>=0;_--)(x=c[_])&&(v=(g<3?x(v):g>3?x(d,f,v):x(d,f))||v);return g>3&&v&&Object.defineProperty(d,f,v),v},r=t&&t.__param||function(c,d){return function(f,m){d(f,m,c);}};Object.defineProperty(t,"__esModule",{value:!0}),t.IntervalSet=void 0;var i=nc(),s=Tp(),n=mr(),o=ln(),a=qt(),u=fe(),l=At(),h=class{constructor(c){this.readonly=!1,c!=null?this._intervals=c.slice(0):this._intervals=[];}static get COMPLETE_CHAR_SET(){return h._COMPLETE_CHAR_SET===void 0&&(h._COMPLETE_CHAR_SET=h.of(o.Lexer.MIN_CHAR_VALUE,o.Lexer.MAX_CHAR_VALUE),h._COMPLETE_CHAR_SET.setReadonly(!0)),h._COMPLETE_CHAR_SET}static get EMPTY_SET(){return h._EMPTY_SET==null&&(h._EMPTY_SET=new h,h._EMPTY_SET.setReadonly(!0)),h._EMPTY_SET}static of(c,d=c){let f=new h;return f.add(c,d),f}clear(){if(this.readonly)throw new Error("can't alter readonly IntervalSet");this._intervals.length=0;}add(c,d=c){this.addRange(n.Interval.of(c,d));}addRange(c){if(this.readonly)throw new Error("can't alter readonly IntervalSet");if(!(c.b<c.a)){for(let d=0;d<this._intervals.length;d++){let f=this._intervals[d];if(c.equals(f))return;if(c.adjacent(f)||!c.disjoint(f)){let m=c.union(f);for(this._intervals[d]=m;d<this._intervals.length-1;){d++;let g=this._intervals[d];if(!m.adjacent(g)&&m.disjoint(g))break;this._intervals.splice(d,1),d--,this._intervals[d]=m.union(g);}return}if(c.startsBeforeDisjoint(f)){this._intervals.splice(d,0,c);return}}this._intervals.push(c);}}static or(c){let d=new h;for(let f of c)d.addAll(f);return d}addAll(c){if(c==null)return this;if(c instanceof h){let d=c,f=d._intervals.length;for(let m=0;m<f;m++){let g=d._intervals[m];this.add(g.a,g.b);}}else for(let d of c.toArray())this.add(d);return this}complementRange(c,d){return this.complement(h.of(c,d))}complement(c){if(c.isNil)return h.EMPTY_SET;let d;return c instanceof h?d=c:(d=new h,d.addAll(c)),d.subtract(this)}subtract(c){if(c==null||c.isNil)return new h(this._intervals);if(c instanceof h)return h.subtract(this,c);let d=new h;return d.addAll(c),h.subtract(this,d)}static subtract(c,d){if(c.isNil)return new h;let f=new h(c._intervals);if(d.isNil)return f;let m=0,g=0;for(;m<f._intervals.length&&g<d._intervals.length;){let v=f._intervals[m],x=d._intervals[g];if(x.b<v.a){g++;continue}if(x.a>v.b){m++;continue}let _,E;if(x.a>v.a&&(_=new n.Interval(v.a,x.a-1)),x.b<v.b&&(E=new n.Interval(x.b+1,v.b)),_)if(E){f._intervals[m]=_,f._intervals.splice(m+1,0,E),m++,g++;continue}else {f._intervals[m]=_,m++;continue}else if(E){f._intervals[m]=E,g++;continue}else {f._intervals.splice(m,1);continue}}return f}or(c){let d=new h;return d.addAll(this),d.addAll(c),d}and(c){if(c.isNil)return new h;let d=this._intervals,f=c._intervals,m,g=d.length,v=f.length,x=0,_=0;for(;x<g&&_<v;){let E=d[x],b=f[_];E.startsBeforeDisjoint(b)?x++:b.startsBeforeDisjoint(E)?_++:E.properlyContains(b)?(m||(m=new h),m.addRange(E.intersection(b)),_++):b.properlyContains(E)?(m||(m=new h),m.addRange(E.intersection(b)),x++):E.disjoint(b)||(m||(m=new h),m.addRange(E.intersection(b)),E.startsAfterNonDisjoint(b)?_++:b.startsAfterNonDisjoint(E)&&x++);}return m||new h}contains(c){let d=this._intervals.length,f=0,m=d-1;for(;f<=m;){let g=f+m>>1,v=this._intervals[g],x=v.a;if(v.b<c)f=g+1;else if(x>c)m=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 c=a.MurmurHash.initialize();for(let d of this._intervals)c=a.MurmurHash.update(c,d.a),c=a.MurmurHash.update(c,d.b);return c=a.MurmurHash.finish(c,this._intervals.length*2),c}equals(c){return c==null||!(c instanceof h)?!1:i.ArrayEqualityComparator.INSTANCE.equals(this._intervals,c._intervals)}toString(c=!1){let d="";if(this._intervals==null||this._intervals.length===0)return "{}";this.size>1&&(d+="{");let f=!0;for(let m of this._intervals){f?f=!1:d+=", ";let g=m.a,v=m.b;g===v?g===l.Token.EOF?d+="<EOF>":c?d+="'"+String.fromCodePoint(g)+"'":d+=g:c?d+="'"+String.fromCodePoint(g)+"'..'"+String.fromCodePoint(v)+"'":d+=g+".."+v;}return this.size>1&&(d+="}"),d}toStringVocabulary(c){if(this._intervals==null||this._intervals.length===0)return "{}";let d="";this.size>1&&(d+="{");let f=!0;for(let m of this._intervals){f?f=!1:d+=", ";let g=m.a,v=m.b;if(g===v)d+=this.elementName(c,g);else for(let x=g;x<=v;x++)x>g&&(d+=", "),d+=this.elementName(c,x);}return this.size>1&&(d+="}"),d}elementName(c,d){return d===l.Token.EOF?"<EOF>":d===l.Token.EPSILON?"<EPSILON>":c.getDisplayName(d)}get size(){let c=0,d=this._intervals.length;if(d===1){let f=this._intervals[0];return f.b-f.a+1}for(let f=0;f<d;f++){let m=this._intervals[f];c+=m.b-m.a+1;}return c}toIntegerList(){let c=new s.IntegerList(this.size),d=this._intervals.length;for(let f=0;f<d;f++){let m=this._intervals[f],g=m.a,v=m.b;for(let x=g;x<=v;x++)c.add(x);}return c}toSet(){let c=new Set;for(let d of this._intervals){let f=d.a,m=d.b;for(let g=f;g<=m;g++)c.add(g);}return c}toArray(){let c=new Array,d=this._intervals.length;for(let f=0;f<d;f++){let m=this._intervals[f],g=m.a,v=m.b;for(let x=g;x<=v;x++)c.push(x);}return c}remove(c){if(this.readonly)throw new Error("can't alter readonly IntervalSet");let d=this._intervals.length;for(let f=0;f<d;f++){let m=this._intervals[f],g=m.a,v=m.b;if(c<g)break;if(c===g&&c===v){this._intervals.splice(f,1);break}if(c===g){this._intervals[f]=n.Interval.of(m.a+1,m.b);break}if(c===v){this._intervals[f]=n.Interval.of(m.a,m.b-1);break}if(c>g&&c<v){let x=m.b;this._intervals[f]=n.Interval.of(m.a,c-1),this.add(c+1,x);}}}get isReadonly(){return this.readonly}setReadonly(c){if(this.readonly&&!c)throw new Error("can't alter readonly IntervalSet");this.readonly=c;}};e([u.Override],h.prototype,"addAll",null),e([u.Override],h.prototype,"complement",null),e([u.Override],h.prototype,"subtract",null),e([u.Override],h.prototype,"or",null),e([u.Override],h.prototype,"and",null),e([u.Override],h.prototype,"contains",null),e([u.Override],h.prototype,"isNil",null),e([u.Override],h.prototype,"hashCode",null),e([u.Override],h.prototype,"equals",null),e([r(0,u.NotNull)],h.prototype,"toStringVocabulary",null),e([u.NotNull,r(0,u.NotNull)],h.prototype,"elementName",null),e([u.Override],h.prototype,"size",null),e([u.Override],h.prototype,"remove",null),e([u.NotNull],h,"of",null),e([u.NotNull],h,"subtract",null),t.IntervalSet=h;}),Tb=te(t=>{var e=t&&t.__decorate||function(s,n,o,a){var u=arguments.length,l=u<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,o):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(s,n,o,a);else for(var c=s.length-1;c>=0;c--)(h=s[c])&&(l=(u<3?h(l):u>3?h(n,o,l):h(n,o))||l);return u>3&&l&&Object.defineProperty(n,o,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNDeserializationOptions=void 0;var r=fe(),i=class{constructor(s){this.readOnly=!1,s?(this.verifyATN=s.verifyATN,this.generateRuleBypassTransitions=s.generateRuleBypassTransitions,this.optimize=s.optimize):(this.verifyATN=!0,this.generateRuleBypassTransitions=!1,this.optimize=!0);}static get defaultOptions(){return i._defaultOptions==null&&(i._defaultOptions=new i,i._defaultOptions.makeReadOnly()),i._defaultOptions}get isReadOnly(){return this.readOnly}makeReadOnly(){this.readOnly=!0;}get isVerifyATN(){return this.verifyATN}set isVerifyATN(s){this.throwIfReadOnly(),this.verifyATN=s;}get isGenerateRuleBypassTransitions(){return this.generateRuleBypassTransitions}set isGenerateRuleBypassTransitions(s){this.throwIfReadOnly(),this.generateRuleBypassTransitions=s;}get isOptimize(){return this.optimize}set isOptimize(s){this.throwIfReadOnly(),this.optimize=s;}throwIfReadOnly(){if(this.isReadOnly)throw new Error("The object is read only.")}};e([r.NotNull],i,"defaultOptions",null),t.ATNDeserializationOptions=i;}),Ab=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ActionTransition=void 0;var i=fe(),s=sn(),n=class extends s.Transition{constructor(a,u,l=-1,h=!1){super(a),this.ruleIndex=u,this.actionIndex=l,this.isCtxDependent=h;}get serializationType(){return 6}get isEpsilon(){return !0}matches(a,u,l){return !1}toString(){return "action_"+this.ruleIndex+":"+this.actionIndex}};e([i.Override],n.prototype,"serializationType",null),e([i.Override],n.prototype,"isEpsilon",null),e([i.Override],n.prototype,"matches",null),e([i.Override],n.prototype,"toString",null),n=e([r(0,i.NotNull)],n),t.ActionTransition=n;}),wb=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.AtomTransition=void 0;var i=cs(),s=fe(),n=sn(),o=class extends n.Transition{constructor(u,l){super(u),this._label=l;}get serializationType(){return 5}get label(){return i.IntervalSet.of(this._label)}matches(u,l,h){return this._label===u}toString(){return String(this.label)}};e([s.Override],o.prototype,"serializationType",null),e([s.Override,s.NotNull],o.prototype,"label",null),e([s.Override],o.prototype,"matches",null),e([s.Override,s.NotNull],o.prototype,"toString",null),o=e([r(0,s.NotNull)],o),t.AtomTransition=o;}),fc=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BlockStartState=void 0;var e=ls(),r=class extends e.DecisionState{};t.BlockStartState=r;}),A7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.BasicBlockStartState=void 0;var r=Qt(),i=fc(),s=fe(),n=class extends i.BlockStartState{get stateType(){return r.ATNStateType.BLOCK_START}};e([s.Override],n.prototype,"stateType",null),t.BasicBlockStartState=n;}),w7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.BlockEndState=void 0;var r=Ci(),i=Qt(),s=fe(),n=class extends r.ATNState{get stateType(){return i.ATNStateType.BLOCK_END}};e([s.Override],n.prototype,"stateType",null),t.BlockEndState=n;}),D7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.EpsilonTransition=void 0;var i=fe(),s=sn(),n=class extends s.Transition{constructor(a,u=-1){super(a),this._outermostPrecedenceReturn=u;}get outermostPrecedenceReturn(){return this._outermostPrecedenceReturn}get serializationType(){return 1}get isEpsilon(){return !0}matches(a,u,l){return !1}toString(){return "epsilon"}};e([i.Override],n.prototype,"serializationType",null),e([i.Override],n.prototype,"isEpsilon",null),e([i.Override],n.prototype,"matches",null),e([i.Override,i.NotNull],n.prototype,"toString",null),n=e([r(0,i.NotNull)],n),t.EpsilonTransition=n;}),S7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerChannelAction=void 0;var i=qt(),s=fe(),n=class{constructor(o){this._channel=o;}get channel(){return this._channel}get actionType(){return 0}get isPositionDependent(){return !1}execute(o){o.channel=this._channel;}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),o=i.MurmurHash.update(o,this._channel),i.MurmurHash.finish(o,2)}equals(o){return o===this?!0:o instanceof n?this._channel===o._channel:!1}toString(){return `channel(${this._channel})`}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),e([s.Override],n.prototype,"toString",null),t.LexerChannelAction=n;}),R7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerCustomAction=void 0;var i=qt(),s=fe(),n=class{constructor(o,a){this._ruleIndex=o,this._actionIndex=a;}get ruleIndex(){return this._ruleIndex}get actionIndex(){return this._actionIndex}get actionType(){return 1}get isPositionDependent(){return !0}execute(o){o.action(void 0,this._ruleIndex,this._actionIndex);}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),o=i.MurmurHash.update(o,this._ruleIndex),o=i.MurmurHash.update(o,this._actionIndex),i.MurmurHash.finish(o,3)}equals(o){return o===this?!0:o instanceof n?this._ruleIndex===o._ruleIndex&&this._actionIndex===o._actionIndex:!1}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),t.LexerCustomAction=n;}),N7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerModeAction=void 0;var i=qt(),s=fe(),n=class{constructor(o){this._mode=o;}get mode(){return this._mode}get actionType(){return 2}get isPositionDependent(){return !1}execute(o){o.mode(this._mode);}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),o=i.MurmurHash.update(o,this._mode),i.MurmurHash.finish(o,2)}equals(o){return o===this?!0:o instanceof n?this._mode===o._mode:!1}toString(){return `mode(${this._mode})`}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),e([s.Override],n.prototype,"toString",null),t.LexerModeAction=n;}),O7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerMoreAction=void 0;var i=qt(),s=fe(),n=class{constructor(){}get actionType(){return 3}get isPositionDependent(){return !1}execute(o){o.more();}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),i.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return "more"}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),e([s.Override],n.prototype,"toString",null),t.LexerMoreAction=n,function(o){o.INSTANCE=new o;}(n=t.LexerMoreAction||(t.LexerMoreAction={}));}),F7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerPopModeAction=void 0;var i=qt(),s=fe(),n=class{constructor(){}get actionType(){return 4}get isPositionDependent(){return !1}execute(o){o.popMode();}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),i.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return "popMode"}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),e([s.Override],n.prototype,"toString",null),t.LexerPopModeAction=n,function(o){o.INSTANCE=new o;}(n=t.LexerPopModeAction||(t.LexerPopModeAction={}));}),L7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerPushModeAction=void 0;var i=qt(),s=fe(),n=class{constructor(o){this._mode=o;}get mode(){return this._mode}get actionType(){return 5}get isPositionDependent(){return !1}execute(o){o.pushMode(this._mode);}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),o=i.MurmurHash.update(o,this._mode),i.MurmurHash.finish(o,2)}equals(o){return o===this?!0:o instanceof n?this._mode===o._mode:!1}toString(){return `pushMode(${this._mode})`}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),e([s.Override],n.prototype,"toString",null),t.LexerPushModeAction=n;}),P7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerSkipAction=void 0;var i=qt(),s=fe(),n=class{constructor(){}get actionType(){return 6}get isPositionDependent(){return !1}execute(o){o.skip();}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),i.MurmurHash.finish(o,1)}equals(o){return o===this}toString(){return "skip"}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),e([s.Override],n.prototype,"toString",null),t.LexerSkipAction=n,function(o){o.INSTANCE=new o;}(n=t.LexerSkipAction||(t.LexerSkipAction={}));}),I7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerTypeAction=void 0;var i=qt(),s=fe(),n=class{constructor(o){this._type=o;}get type(){return this._type}get actionType(){return 7}get isPositionDependent(){return !1}execute(o){o.type=this._type;}hashCode(){let o=i.MurmurHash.initialize();return o=i.MurmurHash.update(o,this.actionType),o=i.MurmurHash.update(o,this._type),i.MurmurHash.finish(o,2)}equals(o){return o===this?!0:o instanceof n?this._type===o._type:!1}toString(){return `type(${this._type})`}};e([s.Override],n.prototype,"actionType",null),e([s.Override],n.prototype,"isPositionDependent",null),e([s.Override,r(0,s.NotNull)],n.prototype,"execute",null),e([s.Override],n.prototype,"hashCode",null),e([s.Override],n.prototype,"equals",null),e([s.Override],n.prototype,"toString",null),t.LexerTypeAction=n;}),Db=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.LoopEndState=void 0;var r=Ci(),i=Qt(),s=fe(),n=class extends r.ATNState{get stateType(){return i.ATNStateType.LOOP_END}};e([s.Override],n.prototype,"stateType",null),t.LoopEndState=n;}),k7=te(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.ConflictInfo=void 0;var r=fe(),i=ei(),s=class{constructor(n,o){this._conflictedAlts=n,this.exact=o;}get conflictedAlts(){return this._conflictedAlts}get isExact(){return this.exact}equals(n){return n===this?!0:n instanceof s?this.isExact===n.isExact&&i.equals(this.conflictedAlts,n.conflictedAlts):!1}hashCode(){return this.conflictedAlts.hashCode()}};e([r.Override],s.prototype,"equals",null),e([r.Override],s.prototype,"hashCode",null),t.ConflictInfo=s;}),lo=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.TerminalNode=void 0;var r=mr(),i=fe(),s=At(),n=class{constructor(o){this._symbol=o;}getChild(o){throw new RangeError("Terminal Node has no children.")}get symbol(){return this._symbol}get parent(){return this._parent}setParent(o){this._parent=o;}get payload(){return this._symbol}get sourceInterval(){let o=this._symbol.tokenIndex;return new r.Interval(o,o)}get childCount(){return 0}accept(o){return o.visitTerminal(this)}get text(){return this._symbol.text||""}toStringTree(o){return this.toString()}toString(){return this._symbol.type===s.Token.EOF?"<EOF>":this._symbol.text||""}};e([i.Override],n.prototype,"getChild",null),e([i.Override],n.prototype,"parent",null),e([i.Override],n.prototype,"setParent",null),e([i.Override],n.prototype,"payload",null),e([i.Override],n.prototype,"sourceInterval",null),e([i.Override],n.prototype,"childCount",null),e([i.Override],n.prototype,"accept",null),e([i.Override],n.prototype,"text",null),e([i.Override],n.prototype,"toStringTree",null),e([i.Override],n.prototype,"toString",null),t.TerminalNode=n;}),dc=te(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorNode=void 0;var r=fe(),i=lo(),s=class extends i.TerminalNode{constructor(n){super(n);}accept(n){return n.visitErrorNode(this)}};e([r.Override],s.prototype,"accept",null),t.ErrorNode=s;}),Fp=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RuleNode=void 0;var e=class{};t.RuleNode=e;}),hs=te(t=>{var e=t&&t.__decorate||function(m,g,v,x){var _=arguments.length,E=_<3?g:x===null?x=Object.getOwnPropertyDescriptor(g,v):x,b;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")E=Reflect.decorate(m,g,v,x);else for(var w=m.length-1;w>=0;w--)(b=m[w])&&(E=(_<3?b(E):_>3?b(g,v,E):b(g,v))||E);return _>3&&E&&Object.defineProperty(g,v,E),E},r=t&&t.__param||function(m,g){return function(v,x){g(v,x,m);}};Object.defineProperty(t,"__esModule",{value:!0}),t.Trees=void 0;var i=ti(),s=Ma(),n=dc(),o=fe(),a=Va(),u=$r(),l=Fp(),h=lo(),c=At(),d=ei(),f=class{static toStringTree(m,g){let v;g instanceof a.Parser?v=g.ruleNames:v=g;let x=d.escapeWhitespace(this.getNodeText(m,v),!1);if(m.childCount===0)return x;let _="";_+="(",x=d.escapeWhitespace(this.getNodeText(m,v),!1),_+=x,_+=" ";for(let E=0;E<m.childCount;E++)E>0&&(_+=" "),_+=this.toStringTree(m.getChild(E),v);return _+=")",_}static getNodeText(m,g){let v;if(g instanceof a.Parser)v=g.ruleNames;else if(g)v=g;else {let x=m.payload;return typeof x.text=="string"?x.text:m.payload.toString()}if(m instanceof l.RuleNode){let x=m.ruleContext,_=x.ruleIndex,E=v[_],b=x.altNumber;return b!==i.ATN.INVALID_ALT_NUMBER?E+":"+b:E}else {if(m instanceof n.ErrorNode)return m.toString();if(m instanceof h.TerminalNode)return m.symbol.text||""}throw new TypeError("Unexpected node type")}static getChildren(m){let g=[];for(let v=0;v<m.childCount;v++)g.push(m.getChild(v));return g}static getAncestors(m){let g=[],v=m.parent;for(;v;)g.unshift(v),v=v.parent;return g}static isAncestorOf(m,g){if(!m||!g||!m.parent)return !1;let v=g.parent;for(;v;){if(m===v)return !0;v=v.parent;}return !1}static findAllTokenNodes(m,g){return f.findAllNodes(m,g,!0)}static findAllRuleNodes(m,g){return f.findAllNodes(m,g,!1)}static findAllNodes(m,g,v){let x=[];return f._findAllNodes(m,g,v,x),x}static _findAllNodes(m,g,v,x){v&&m instanceof h.TerminalNode?m.symbol.type===g&&x.push(m):!v&&m instanceof u.ParserRuleContext&&m.ruleIndex===g&&x.push(m);for(let _=0;_<m.childCount;_++)f._findAllNodes(m.getChild(_),g,v,x);}static getDescendants(m){let g=[];function v(x){g.push(x);let _=x.childCount;for(let E=0;E<_;E++)v(x.getChild(E));}return v(m),g}static getRootOfSubtreeEnclosingRegion(m,g,v){let x=m.childCount;for(let _=0;_<x;_++){let E=m.getChild(_),b=f.getRootOfSubtreeEnclosingRegion(E,g,v);if(b)return b}if(m instanceof u.ParserRuleContext){let _=m.stop;if(g>=m.start.tokenIndex&&(_==null||v<=_.tokenIndex))return m}}static stripChildrenOutOfRange(m,g,v,x){if(!m)return;let _=m.childCount;for(let E=0;E<_;E++){let b=m.getChild(E),w=b.sourceInterval;if(b instanceof u.ParserRuleContext&&(w.b<v||w.a>x)&&f.isAncestorOf(b,g)){let D=new s.CommonToken(c.Token.INVALID_TYPE,"...");m.children[E]=new h.TerminalNode(D);}}}static findNodeSuchThat(m,g){if(g(m))return m;let v=m.childCount;for(let x=0;x<v;x++){let _=f.findNodeSuchThat(m.getChild(x),g);if(_!==void 0)return _}}};e([r(0,o.NotNull)],f,"toStringTree",null),e([o.NotNull,r(0,o.NotNull)],f,"getAncestors",null),e([r(0,o.NotNull)],f,"getRootOfSubtreeEnclosingRegion",null),t.Trees=f;}),Sb=te(t=>{var e=t&&t.__decorate||function(h,c,d,f){var m=arguments.length,g=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,d):f,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(h,c,d,f);else for(var x=h.length-1;x>=0;x--)(v=h[x])&&(g=(m<3?v(g):m>3?v(c,d,g):v(c,d))||g);return m>3&&g&&Object.defineProperty(c,d,g),g};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleContext=void 0;var r=ti(),i=ja(),s=Fp(),n=mr(),o=fe(),a=hs(),u=$r(),l=class extends s.RuleNode{constructor(h,c){super(),this._parent=h,this.invokingState=c!=null?c:-1;}static getChildContext(h,c){return new l(h,c)}depth(){let h=0,c=this;for(;c;)c=c._parent,h++;return h}get isEmpty(){return this.invokingState===-1}get sourceInterval(){return n.Interval.INVALID}get ruleContext(){return this}get parent(){return this._parent}setParent(h){this._parent=h;}get payload(){return this}get text(){if(this.childCount===0)return "";let h="";for(let c=0;c<this.childCount;c++)h+=this.getChild(c).text;return h.toString()}get ruleIndex(){return -1}get altNumber(){return r.ATN.INVALID_ALT_NUMBER}set altNumber(h){}getChild(h){throw new RangeError("i must be greater than or equal to 0 and less than childCount")}get childCount(){return 0}accept(h){return h.visitChildren(this)}toStringTree(h){return a.Trees.toStringTree(this,h)}toString(h,c){let d=h instanceof i.Recognizer?h.ruleNames:h;c=c||u.ParserRuleContext.emptyContext();let f="",m=this;for(f+="[";m&&m!==c;){if(!d)m.isEmpty||(f+=m.invokingState);else {let g=m.ruleIndex,v=g>=0&&g<d.length?d[g]:g.toString();f+=v;}m._parent&&(d||!m._parent.isEmpty)&&(f+=" "),m=m._parent;}return f+="]",f.toString()}};e([o.Override],l.prototype,"sourceInterval",null),e([o.Override],l.prototype,"ruleContext",null),e([o.Override],l.prototype,"parent",null),e([o.Override],l.prototype,"setParent",null),e([o.Override],l.prototype,"payload",null),e([o.Override],l.prototype,"text",null),e([o.Override],l.prototype,"getChild",null),e([o.Override],l.prototype,"childCount",null),e([o.Override],l.prototype,"accept",null),e([o.Override],l.prototype,"toStringTree",null),t.RuleContext=l;}),$r=te(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserRuleContext=void 0;var r=dc(),i=mr(),s=fe(),n=Sb(),o=lo(),a=class extends n.RuleContext{constructor(u,l){l==null?super():super(u,l);}static emptyContext(){return a.EMPTY}copyFrom(u){if(this._parent=u._parent,this.invokingState=u.invokingState,this._start=u._start,this._stop=u._stop,u.children){this.children=[];for(let l of u.children)l instanceof r.ErrorNode&&this.addChild(l);}}enterRule(u){}exitRule(u){}addAnyChild(u){return this.children?this.children.push(u):this.children=[u],u}addChild(u){if(u instanceof o.TerminalNode){u.setParent(this),this.addAnyChild(u);return}else if(u instanceof n.RuleContext){this.addAnyChild(u);return}else return u=new o.TerminalNode(u),this.addAnyChild(u),u.setParent(this),u}addErrorNode(u){if(u instanceof r.ErrorNode){let l=u;return l.setParent(this),this.addAnyChild(l)}else {let l=u,h=new r.ErrorNode(l);return this.addAnyChild(h),h.setParent(this),h}}removeLastChild(){this.children&&this.children.pop();}get parent(){let u=super.parent;if(u===void 0||u instanceof a)return u;throw new TypeError("Invalid parent type for ParserRuleContext")}getChild(u,l){if(!this.children||u<0||u>=this.children.length)throw new RangeError("index parameter must be between >= 0 and <= number of children.");if(l==null)return this.children[u];let h=this.tryGetChild(u,l);if(h===void 0)throw new Error("The specified node does not exist");return h}tryGetChild(u,l){if(!this.children||u<0||u>=this.children.length)return;let h=-1;for(let c of this.children)if(c instanceof l&&(h++,h===u))return c}getToken(u,l){let h=this.tryGetToken(u,l);if(h===void 0)throw new Error("The specified token does not exist");return h}tryGetToken(u,l){if(!this.children||l<0||l>=this.children.length)return;let h=-1;for(let c of this.children)if(c instanceof o.TerminalNode&&c.symbol.type===u&&(h++,h===l))return c}getTokens(u){let l=[];if(!this.children)return l;for(let h of this.children)h instanceof o.TerminalNode&&h.symbol.type===u&&l.push(h);return l}get ruleContext(){return this}getRuleContext(u,l){return this.getChild(u,l)}tryGetRuleContext(u,l){return this.tryGetChild(u,l)}getRuleContexts(u){let l=[];if(!this.children)return l;for(let h of this.children)h instanceof u&&l.push(h);return l}get childCount(){return this.children?this.children.length:0}get sourceInterval(){return this._start?!this._stop||this._stop.tokenIndex<this._start.tokenIndex?i.Interval.of(this._start.tokenIndex,this._start.tokenIndex-1):i.Interval.of(this._start.tokenIndex,this._stop.tokenIndex):i.Interval.INVALID}get start(){return this._start}get stop(){return this._stop}toInfoString(u){return "ParserRuleContext"+u.getRuleInvocationStack(this).reverse()+"{start="+this._start+", stop="+this._stop+"}"}};a.EMPTY=new a,e([s.Override],a.prototype,"parent",null),e([s.Override],a.prototype,"childCount",null),e([s.Override],a.prototype,"sourceInterval",null),t.ParserRuleContext=a;}),M7=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.PredictionMode=void 0;var r=uo(),i=qt(),s=fe(),n=qa();((function(a){a[a.SLL=0]="SLL",a[a.LL=1]="LL",a[a.LL_EXACT_AMBIG_DETECTION=2]="LL_EXACT_AMBIG_DETECTION";}))(t.PredictionMode||(t.PredictionMode={})),function(a){class u extends r.Array2DHashMap{constructor(){super(l.INSTANCE);}}class l{AltAndContextConfigEqualityComparator(){}hashCode(f){let m=i.MurmurHash.initialize(7);return m=i.MurmurHash.update(m,f.state.stateNumber),m=i.MurmurHash.update(m,f.context),m=i.MurmurHash.finish(m,2),m}equals(f,m){return f===m?!0:f==null||m==null?!1:f.state.stateNumber===m.state.stateNumber&&f.context.equals(m.context)}}l.INSTANCE=new l,e([s.Override],l.prototype,"hashCode",null),e([s.Override],l.prototype,"equals",null);function h(d){for(let f of d)if(f.state instanceof n.RuleStopState)return !0;return !1}a.hasConfigInRuleStopState=h;function c(d){for(let f of d)if(!(f.state instanceof n.RuleStopState))return !1;return !0}a.allConfigsInRuleStopStates=c;}(t.PredictionMode||(t.PredictionMode={}));}),Rb=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.SimulatorState=void 0;var i=fe(),s=$r(),n=class{constructor(a,u,l,h){this.outerContext=a!=null?a:s.ParserRuleContext.emptyContext(),this.s0=u,this.useContext=l,this.remainingOuterContext=h;}};n=e([r(1,i.NotNull)],n),t.SimulatorState=n;}),Ha=te(t=>{var e=t&&t.__decorate||function(q,B,T,P){var H=arguments.length,z=H<3?B:P===null?P=Object.getOwnPropertyDescriptor(B,T):P,G;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")z=Reflect.decorate(q,B,T,P);else for(var oe=q.length-1;oe>=0;oe--)(G=q[oe])&&(z=(H<3?G(z):H>3?G(B,T,z):G(B,T))||z);return H>3&&z&&Object.defineProperty(B,T,z),z},r=t&&t.__param||function(q,B){return function(T,P){B(T,P,q);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserATNSimulator=void 0;var i=mb(),s=Ab(),n=on(),o=Cp(),a=ti(),u=ac(),l=Ba(),h=lc(),c=Qt(),d=wb(),f=an(),m=k7(),g=ls(),v=uc(),x=Tp(),_=mr(),E=rn(),b=fe(),w=Np(),D=mc(),N=Qr(),F=$r(),U=Vr(),Z=wp(),re=M7(),ae=qa(),k=Op(),y=ao(),C=Rp(),S=Rb(),R=At(),L=un(),I=ge("assert"),K=65535,j=-(1<<31>>>0),A=class qe extends h.ATNSimulator{constructor(B,T){super(B),this.predictionMode=re.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=T;}getPredictionMode(){return this.predictionMode}setPredictionMode(B){this.predictionMode=B;}reset(){}adaptivePredict(B,T,P,H){H===void 0&&(H=!1);let z=this.atn.decisionToDFA[T];if(I(z!=null),this.optimize_ll1&&!z.isPrecedenceDfa&&!z.isEmpty){let X=B.LA(1);if(X>=0&&X<=65535){let ee=(T<<16>>>0)+X,V=this.atn.LL1Table.get(ee);if(V!=null)return V}}this.dfa=z,this.force_global_context?H=!0:this.always_try_local_context||(H=H||z.isContextSensitive),this.userWantsCtxSensitive=H||this.predictionMode!==re.PredictionMode.SLL&&P!=null&&!this.atn.decisionToState[T].sll,P==null&&(P=F.ParserRuleContext.emptyContext());let G;z.isEmpty||(G=this.getStartState(z,B,P,H)),G==null&&(P==null&&(P=F.ParserRuleContext.emptyContext()),qe.debug&&console.log("ATN decision "+z.decision+" exec LA(1)=="+this.getLookaheadName(B)+", outerContext="+P.toString(this._parser)),G=this.computeStartState(z,P,H));let oe=B.mark(),se=B.index;try{let X=this.execDFA(z,B,se,G);return qe.debug&&console.log("DFA after predictATN: "+z.toString(this._parser.vocabulary,this._parser.ruleNames)),X}finally{this.dfa=void 0,B.seek(se),B.release(oe);}}getStartState(B,T,P,H){if(!H)if(B.isPrecedenceDfa){let oe=B.getPrecedenceStartState(this._parser.precedence,!1);return oe==null?void 0:new S.SimulatorState(P,oe,!1,P)}else return B.s0==null?void 0:new S.SimulatorState(P,B.s0,!1,P);if(!this.enable_global_context_dfa)return;let z=P;I(P!=null);let G;for(B.isPrecedenceDfa?G=B.getPrecedenceStartState(this._parser.precedence,!0):G=B.s0full;z!=null&&G!=null&&G.isContextSensitive;)z=this.skipTailCalls(z),G=G.getContextTarget(this.getReturnState(z)),z.isEmpty?I(G==null||!G.isContextSensitive):z=z.parent;if(G!=null)return new S.SimulatorState(P,G,H,z)}execDFA(B,T,P,H){let z=H.outerContext;qe.dfa_debug&&console.log("DFA decision "+B.decision+" exec LA(1)=="+this.getLookaheadName(T)+", outerContext="+z.toString(this._parser)),qe.dfa_debug&&console.log(B.toString(this._parser.vocabulary,this._parser.ruleNames));let G=H.s0,oe=T.LA(1),se=H.remainingOuterContext;for(;;){if(qe.dfa_debug&&console.log("DFA state "+G.stateNumber+" LA(1)=="+this.getLookaheadName(T)),H.useContext)for(;G.isContextSymbol(oe);){let V;if(se!=null&&(se=this.skipTailCalls(se),V=G.getContextTarget(this.getReturnState(se))),V==null){let M=new S.SimulatorState(H.outerContext,G,H.useContext,se);return this.execATN(B,T,P,M)}I(se!=null),se=se.parent,G=V;}if(this.isAcceptState(G,H.useContext)){G.predicates!=null?qe.dfa_debug&&console.log("accept "+G):qe.dfa_debug&&console.log("accept; predict "+G.prediction+" in state "+G.stateNumber);break}I(!this.isAcceptState(G,H.useContext));let ee=this.getExistingTargetState(G,oe);if(ee==null){qe.dfa_debug&&oe>=0&&console.log("no edge for "+this._parser.vocabulary.getDisplayName(oe));let V;if(qe.dfa_debug){let J=_.Interval.of(P,this._parser.inputStream.index);console.log("ATN exec upon "+this._parser.inputStream.getText(J)+" at DFA state "+G.stateNumber);}let M=new S.SimulatorState(z,G,H.useContext,se);return V=this.execATN(B,T,P,M),qe.dfa_debug&&console.log("back from DFA update, alt="+V+`, dfa=
69
+ `+B.toString(this._parser.vocabulary,this._parser.ruleNames)),qe.dfa_debug&&console.log("DFA decision "+B.decision+" predicts "+V),V}else if(ee===h.ATNSimulator.ERROR){let V=new S.SimulatorState(z,G,H.useContext,se);return this.handleNoViableAlt(T,P,V)}G=ee,!this.isAcceptState(G,H.useContext)&&oe!==E.IntStream.EOF&&(T.consume(),oe=T.LA(1));}if(!H.useContext&&G.configs.conflictInfo!=null&&B.atnStartState instanceof g.DecisionState&&!(!this.userWantsCtxSensitive||!G.configs.dipsIntoOuterContext&&G.configs.isExactConflict||this.treat_sllk1_conflict_as_ambiguity&&T.index===P)){I(!H.useContext);let ee,V=G.predicates;if(V!=null){let M=T.index;if(M!==P&&T.seek(P),ee=this.evalSemanticContext(V,z,!0),ee.cardinality()===1)return ee.nextSetBit(0);M!==P&&T.seek(M);}if(this.reportAmbiguities){let M=new S.SimulatorState(z,G,H.useContext,se);this.reportAttemptingFullContext(B,ee,M,P,T.index);}return T.seek(P),this.adaptivePredict(T,B.decision,z,!0)}let X=G.predicates;if(X!=null){let ee=T.index;P!==ee&&T.seek(P);let V=this.evalSemanticContext(X,z,this.reportAmbiguities&&this.predictionMode===re.PredictionMode.LL_EXACT_AMBIG_DETECTION);switch(V.cardinality()){case 0:throw this.noViableAlt(T,z,G.configs,P);case 1:return V.nextSetBit(0);default:return P!==ee&&T.seek(ee),this.reportAmbiguity(B,G,P,ee,G.configs.isExactConflict,V,G.configs),V.nextSetBit(0)}}return qe.dfa_debug&&console.log("DFA decision "+B.decision+" predicts "+G.prediction),G.prediction}isAcceptState(B,T){return B.isAcceptState?B.configs.conflictingAlts==null?!0:T&&this.predictionMode===re.PredictionMode.LL_EXACT_AMBIG_DETECTION?B.configs.isExactConflict:!0:!1}execATN(B,T,P,H){qe.debug&&console.log("execATN decision "+B.decision+" exec LA(1)=="+this.getLookaheadName(T));let z=H.outerContext,G=H.useContext,oe=T.LA(1),se=H,X=new Z.PredictionContextCache;for(;;){let ee=this.computeReachSet(B,se,oe,X);if(ee==null)return this.setDFAEdge(se.s0,T.LA(1),h.ATNSimulator.ERROR),this.handleNoViableAlt(T,P,se);let V=ee.s0;if(I(V.isAcceptState||V.prediction===a.ATN.INVALID_ALT_NUMBER),I(V.isAcceptState||V.configs.conflictInfo==null),this.isAcceptState(V,G)){let M=V.configs.conflictingAlts,J=M==null?V.prediction:a.ATN.INVALID_ALT_NUMBER;if(J!==a.ATN.INVALID_ALT_NUMBER){if(this.optimize_ll1&&T.index===P&&!B.isPrecedenceDfa&&ee.outerContext===ee.remainingOuterContext&&B.decision>=0&&!V.configs.hasSemanticContext&&oe>=0&&oe<=K){let ne=(B.decision<<16>>>0)+oe;this.atn.LL1Table.set(ne,J);}G&&this.always_try_local_context&&this.reportContextSensitivity(B,J,ee,P,T.index);}J=V.prediction;let W=M!=null&&this.userWantsCtxSensitive;if(W&&(W=!G&&(V.configs.dipsIntoOuterContext||!V.configs.isExactConflict)&&(!this.treat_sllk1_conflict_as_ambiguity||T.index!==P)),V.configs.hasSemanticContext){let ne=V.predicates;if(ne!=null){let le=T.index;switch(le!==P&&T.seek(P),M=this.evalSemanticContext(ne,z,W||this.reportAmbiguities),M.cardinality()){case 0:throw this.noViableAlt(T,z,V.configs,P);case 1:return M.nextSetBit(0);}le!==P&&T.seek(le);}}if(W){I(!G),I(this.isAcceptState(V,!1)),qe.debug&&console.log("RETRY with outerContext="+z);let ne=this.computeStartState(B,z,!0);return this.reportAmbiguities&&this.reportAttemptingFullContext(B,M,ee,P,T.index),T.seek(P),this.execATN(B,T,P,ne)}else return M!=null&&(this.reportAmbiguities&&M.cardinality()>1&&this.reportAmbiguity(B,V,P,T.index,V.configs.isExactConflict,M,V.configs),J=M.nextSetBit(0)),J}se=ee,oe!==E.IntStream.EOF&&(T.consume(),oe=T.LA(1));}}handleNoViableAlt(B,T,P){if(P.s0!=null){let H=new f.BitSet,z=0;for(let G of P.s0.configs)(G.reachesIntoOuterContext||G.state instanceof ae.RuleStopState)&&(H.set(G.alt),z=Math.max(z,G.alt));switch(H.cardinality()){case 0:break;case 1:return H.nextSetBit(0);default:if(!P.s0.configs.hasSemanticContext)return H.nextSetBit(0);let G=new l.ATNConfigSet;for(let se of P.s0.configs)(se.reachesIntoOuterContext||se.state instanceof ae.RuleStopState)&&G.add(se);let oe=this.getPredsForAmbigAlts(H,G,z);if(oe!=null){let se=this.getPredicatePredictions(H,oe);if(se!=null){let X=B.index;try{B.seek(T);let ee=this.evalSemanticContext(se,P.outerContext,!1);if(!ee.isEmpty)return ee.nextSetBit(0)}finally{B.seek(X);}}}return H.nextSetBit(0)}}throw this.noViableAlt(B,P.outerContext,P.s0.configs,T)}computeReachSet(B,T,P,H){let z=T.useContext,G=T.remainingOuterContext,oe=T.s0;if(z)for(;oe.isContextSymbol(P);){let ee;if(G!=null&&(G=this.skipTailCalls(G),ee=oe.getContextTarget(this.getReturnState(G))),ee==null)break;I(G!=null),G=G.parent,oe=ee;}if(I(!this.isAcceptState(oe,z)),this.isAcceptState(oe,z))return new S.SimulatorState(T.outerContext,oe,z,G);let se=oe,X=this.getExistingTargetState(se,P);if(X==null){let ee=this.computeTargetState(B,se,G,P,z,H);X=ee[0],G=ee[1];}if(X!==h.ATNSimulator.ERROR)return I(!z||!X.configs.dipsIntoOuterContext),new S.SimulatorState(T.outerContext,X,z,G)}getExistingTargetState(B,T){return B.getTarget(T)}computeTargetState(B,T,P,H,z,G){let oe=T.configs.toArray(),se,X=new l.ATNConfigSet,ee;do{let M=!z||P!=null;M||(X.isOutermostConfigSet=!0);let J=new l.ATNConfigSet,W;for(let Q of oe){if(qe.debug&&console.log("testing "+this.getTokenName(H)+" at "+Q.toString()),Q.state instanceof ae.RuleStopState){I(Q.context.isEmpty),(z&&!Q.reachesIntoOuterContext||H===E.IntStream.EOF)&&(W==null&&(W=[]),W.push(Q));continue}let _e=Q.state.numberOfOptimizedTransitions;for(let Se=0;Se<_e;Se++){let ye=Q.state.getOptimizedTransition(Se),Ce=this.getReachableTarget(Q,ye,H);Ce!=null&&J.add(Q.transform(Ce,!1),G);}}if(this.optimize_unique_closure&&W==null&&H!==R.Token.EOF&&J.uniqueAlt!==a.ATN.INVALID_ALT_NUMBER){J.isOutermostConfigSet=X.isOutermostConfigSet,X=J;break}let ne=!1,le=H===R.Token.EOF;if(this.closure(J,X,ne,M,G,le),ee=X.dipsIntoOuterContext,H===E.IntStream.EOF&&(X=this.removeAllConfigsNotInRuleStopState(X,G)),W!=null&&(!z||!re.PredictionMode.hasConfigInRuleStopState(X))){I(W.length>0);for(let Q of W)X.add(Q,G);}if(z&&ee){X.clear(),P=P,P=this.skipTailCalls(P);let Q=this.getReturnState(P);if(se==null&&(se=new x.IntegerList),P.isEmpty?P=void 0:P=P.parent,se.add(Q),Q!==U.PredictionContext.EMPTY_FULL_STATE_KEY)for(let _e=0;_e<oe.length;_e++)oe[_e]=oe[_e].appendContext(Q,G);}}while(z&&ee);return X.isEmpty?(this.setDFAEdge(T,H,h.ATNSimulator.ERROR),[h.ATNSimulator.ERROR,P]):[this.addDFAEdge(B,T,H,se,X,G),P]}removeAllConfigsNotInRuleStopState(B,T){if(re.PredictionMode.allConfigsInRuleStopStates(B))return B;let P=new l.ATNConfigSet;for(let H of B)H.state instanceof ae.RuleStopState&&P.add(H,T);return P}computeStartState(B,T,P){let H=B.isPrecedenceDfa?B.getPrecedenceStartState(this._parser.precedence,P):P?B.s0full:B.s0;if(H!=null){if(!P)return new S.SimulatorState(T,H,P,T);H.setContextSensitive(this.atn);}B.decision;let G=B.atnStartState,oe=0,se=T,X=P?U.PredictionContext.EMPTY_FULL:U.PredictionContext.EMPTY_LOCAL,ee=new Z.PredictionContextCache;if(P){if(!this.enable_global_context_dfa)for(;se!=null;)se.isEmpty?(oe=U.PredictionContext.EMPTY_FULL_STATE_KEY,se=void 0):(oe=this.getReturnState(se),X=X.appendSingleContext(oe,ee),se=se.parent);for(;H!=null&&H.isContextSensitive&&se!=null;){let M;if(se=this.skipTailCalls(se),se.isEmpty?(M=H.getContextTarget(U.PredictionContext.EMPTY_FULL_STATE_KEY),oe=U.PredictionContext.EMPTY_FULL_STATE_KEY,se=void 0):(oe=this.getReturnState(se),M=H.getContextTarget(oe),X=X.appendSingleContext(oe,ee),se=se.parent),M==null)break;H=M;}}if(H!=null&&!H.isContextSensitive)return new S.SimulatorState(T,H,P,se);let V=new l.ATNConfigSet;for(;;){let M=new l.ATNConfigSet,J=G.numberOfTransitions;for(let Se=0;Se<J;Se++){let ye=G.transition(Se).target;M.add(u.ATNConfig.create(ye,Se+1,X));}let W=se!=null;W||(V.isOutermostConfigSet=!0),this.closure(M,V,!0,W,ee,!1);let le=V.dipsIntoOuterContext,Q;if(P&&!this.enable_global_context_dfa){H=this.addDFAState(B,V,ee);break}else H==null?B.isPrecedenceDfa?(V=this.applyPrecedenceFilter(V,T,ee),Q=this.addDFAState(B,V,ee),B.setPrecedenceStartState(this._parser.precedence,P,Q)):(Q=this.addDFAState(B,V,ee),P?B.s0full?Q=B.s0full:B.s0full=Q:B.s0?Q=B.s0:B.s0=Q):(B.isPrecedenceDfa&&(V=this.applyPrecedenceFilter(V,T,ee)),Q=this.addDFAState(B,V,ee),H.setContextTarget(oe,Q));if(H=Q,!P||!le)break;Q.setContextSensitive(this.atn),se=se,V.clear(),se=this.skipTailCalls(se);let _e=this.getReturnState(se);se.isEmpty?se=void 0:se=se.parent,_e!==U.PredictionContext.EMPTY_FULL_STATE_KEY&&(X=X.appendSingleContext(_e,ee)),oe=_e;}return new S.SimulatorState(T,H,P,se)}applyPrecedenceFilter(B,T,P){let H=new Map,z=new l.ATNConfigSet;for(let G of B){if(G.alt!==1)continue;let oe=G.semanticContext.evalPrecedence(this._parser,T);oe!=null&&(H.set(G.state.stateNumber,G.context),oe!==G.semanticContext?z.add(G.transform(G.state,!1,oe),P):z.add(G,P));}for(let G of B)if(G.alt!==1){if(!G.isPrecedenceFilterSuppressed){let oe=H.get(G.state.stateNumber);if(oe!=null&&oe.equals(G.context))continue}z.add(G,P);}return z}getReachableTarget(B,T,P){if(T.matches(P,0,this.atn.maxTokenType))return T.target}predicateDFAState(B,T,P){let H=this.getConflictingAltsFromConfigSet(T);if(!H)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.");qe.debug&&console.log("predicateDFAState "+B);let z=this.getPredsForAmbigAlts(H,T,P),G;return z!=null&&(G=this.getPredicatePredictions(H,z),B.predicates=G),G}getPredsForAmbigAlts(B,T,P){let H=new Array(P+1),z=H.length;for(let se of T)B.get(se.alt)&&(H[se.alt]=y.SemanticContext.or(H[se.alt],se.semanticContext));let G=0;for(let se=0;se<z;se++)H[se]==null?H[se]=y.SemanticContext.NONE:H[se]!==y.SemanticContext.NONE&&G++;let oe=H;return G===0&&(oe=void 0),qe.debug&&console.log("getPredsForAmbigAlts result "+(oe?o.Arrays.toString(oe):"undefined")),oe}getPredicatePredictions(B,T){let P=[],H=!1;for(let z=1;z<T.length;z++){let G=T[z];I(G!=null),B!=null&&B.get(z)&&G===y.SemanticContext.NONE?P.push(new v.DFAState.PredPrediction(G,z)):G!==y.SemanticContext.NONE&&(H=!0,P.push(new v.DFAState.PredPrediction(G,z)));}if(H)return P}evalSemanticContext(B,T,P){let H=new f.BitSet;for(let z of B){if(z.pred===y.SemanticContext.NONE){if(H.set(z.alt),!P)break;continue}let G=this.evalSemanticContextImpl(z.pred,T,z.alt);if((qe.debug||qe.dfa_debug)&&console.log("eval pred "+z+"="+G),G&&((qe.debug||qe.dfa_debug)&&console.log("PREDICT "+z.alt),H.set(z.alt),!P))break}return H}evalSemanticContextImpl(B,T,P){return B.eval(this._parser,T)}closure(B,T,P,H,z,G){z==null&&(z=Z.PredictionContextCache.UNCACHED);let oe=B,se=new n.Array2DHashSet(N.ObjectEqualityComparator.INSTANCE);for(;oe.size>0;){let X=new l.ATNConfigSet;for(let ee of oe)this.closureImpl(ee,T,X,se,P,H,z,0,G);oe=X;}}closureImpl(B,T,P,H,z,G,oe,se,X){if(qe.debug&&console.log("closure("+B.toString(this._parser,!0)+")"),B.state instanceof ae.RuleStopState)if(B.context.isEmpty)if(G)qe.debug&&console.log("FALLING off rule "+this.getRuleName(B.state.ruleIndex)),B.context===U.PredictionContext.EMPTY_FULL?B=B.transform(B.state,!1,U.PredictionContext.EMPTY_LOCAL):!B.reachesIntoOuterContext&&U.PredictionContext.isEmptyLocal(B.context)&&T.add(B,oe);else {T.add(B,oe);return}else {let V=B.context.hasEmpty,M=B.context.size-(V?1:0);for(let J=0;J<M;J++){let W=B.context.getParent(J),ne=this.atn.states[B.context.getReturnState(J)],le=u.ATNConfig.create(ne,B.alt,W,B.semanticContext);le.outerContextDepth=B.outerContextDepth,le.isPrecedenceFilterSuppressed=B.isPrecedenceFilterSuppressed,I(se>j),this.closureImpl(le,T,P,H,z,G,oe,se-1,X);}if(!V||!G)return;B=B.transform(B.state,!1,U.PredictionContext.EMPTY_LOCAL);}let ee=B.state;ee.onlyHasEpsilonTransitions||(T.add(B,oe),qe.debug&&console.log("added config "+T));for(let V=0;V<ee.numberOfOptimizedTransitions;V++){if(V===0&&ee.stateType===c.ATNStateType.STAR_LOOP_ENTRY&&ee.precedenceRuleDecision&&!B.context.hasEmpty){let ne=ee,le=!0;for(let Q=0;Q<B.context.size;Q++)if(!ne.precedenceLoopbackStates.get(B.context.getReturnState(Q))){le=!1;break}if(le)continue}let M=ee.getOptimizedTransition(V),J=!(M instanceof s.ActionTransition)&&z,W=this.getEpsilonTarget(B,M,J,se===0,oe,X);if(W!=null){if(M instanceof k.RuleTransition&&P!=null&&!z){P.add(W,oe);continue}let ne=se;if(B.state instanceof ae.RuleStopState){if(this.dfa!=null&&this.dfa.isPrecedenceDfa&&M.outermostPrecedenceReturn===this.dfa.atnStartState.ruleIndex&&(W.isPrecedenceFilterSuppressed=!0),W.outerContextDepth=W.outerContextDepth+1,!H.add(W))continue;I(ne>j),ne--,qe.debug&&console.log("dips into outer ctx: "+W);}else if(M instanceof k.RuleTransition)this.optimize_tail_calls&&M.optimizedTailCall&&(!this.tail_call_preserves_sll||!U.PredictionContext.isEmptyLocal(B.context))?(I(W.context===B.context),ne===0&&(ne--,!this.tail_call_preserves_sll&&U.PredictionContext.isEmptyLocal(B.context)&&(W.outerContextDepth=W.outerContextDepth+1))):ne>=0&&ne++;else if(!M.isEpsilon&&!H.add(W))continue;this.closureImpl(W,T,P,H,J,G,oe,ne,X);}}}getRuleName(B){return this._parser!=null&&B>=0?this._parser.ruleNames[B]:"<rule "+B+">"}getEpsilonTarget(B,T,P,H,z,G){switch(T.serializationType){case 3:return this.ruleTransition(B,T,z);case 10:return this.precedenceTransition(B,T,P,H);case 4:return this.predTransition(B,T,P,H);case 6:return this.actionTransition(B,T);case 1:return B.transform(T.target,!1);case 5:case 2:case 7:return G&&T.matches(R.Token.EOF,0,1)?B.transform(T.target,!1):void 0;default:return}}actionTransition(B,T){return qe.debug&&console.log("ACTION edge "+T.ruleIndex+":"+T.actionIndex),B.transform(T.target,!1)}precedenceTransition(B,T,P,H){qe.debug&&(console.log("PRED (collectPredicates="+P+") "+T.precedence+">=_p, ctx dependent=true"),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let z;if(P&&H){let G=y.SemanticContext.and(B.semanticContext,T.predicate);z=B.transform(T.target,!1,G);}else z=B.transform(T.target,!1);return qe.debug&&console.log("config from pred transition="+z),z}predTransition(B,T,P,H){qe.debug&&(console.log("PRED (collectPredicates="+P+") "+T.ruleIndex+":"+T.predIndex+", ctx dependent="+T.isCtxDependent),this._parser!=null&&console.log("context surrounding pred is "+this._parser.getRuleInvocationStack()));let z;if(P&&(!T.isCtxDependent||T.isCtxDependent&&H)){let G=y.SemanticContext.and(B.semanticContext,T.predicate);z=B.transform(T.target,!1,G);}else z=B.transform(T.target,!1);return qe.debug&&console.log("config from pred transition="+z),z}ruleTransition(B,T,P){qe.debug&&console.log("CALL rule "+this.getRuleName(T.target.ruleIndex)+", ctx="+B.context);let H=T.followState,z;return this.optimize_tail_calls&&T.optimizedTailCall&&(!this.tail_call_preserves_sll||!U.PredictionContext.isEmptyLocal(B.context))?z=B.context:P!=null?z=P.getChild(B.context,H.stateNumber):z=B.context.getChild(H.stateNumber),B.transform(T.target,!1,z)}isConflicted(B,T){if(B.uniqueAlt!==a.ATN.INVALID_ALT_NUMBER||B.size<=1)return;let P=B.toArray();P.sort(qe.STATE_ALT_SORT_COMPARATOR);let H=!B.dipsIntoOuterContext,z=new f.BitSet,G=P[0].alt;z.set(G);let oe=P[0].state.nonStopStateNumber;for(let M of P){let J=M.state.nonStopStateNumber;if(J!==oe){if(M.alt!==G)return;oe=J;}}let se;if(H){oe=P[0].state.nonStopStateNumber,se=new f.BitSet;let M=G;for(let W of P){if(W.state.nonStopStateNumber!==oe)break;let ne=W.alt;se.set(ne),M=ne;}oe=P[0].state.nonStopStateNumber;let J=G;for(let W of P){let ne=W.state.nonStopStateNumber,le=W.alt;if(ne!==oe){if(J!==M){H=!1;break}oe=ne,J=G;}else if(le!==J){if(le!==se.nextSetBit(J+1)){H=!1;break}J=le;}}}oe=P[0].state.nonStopStateNumber;let X=0,ee=0,V=P[0].context;for(let M=1;M<P.length;M++){let J=P[M];if(J.alt!==G||J.state.nonStopStateNumber!==oe)break;ee=M,V=T.join(V,P[M].context);}for(let M=ee+1;M<P.length;M++){let J=P[M],W=J.state;if(z.set(J.alt),W.nonStopStateNumber!==oe){oe=W.nonStopStateNumber,X=M,ee=M,V=J.context;for(let Se=X+1;Se<P.length;Se++){let ye=P[Se];if(ye.alt!==G||ye.state.nonStopStateNumber!==oe)break;ee=Se,V=T.join(V,ye.context);}M=ee;continue}let ne=J.context,le=J.alt,Q=M;for(let Se=Q+1;Se<P.length;Se++){let ye=P[Se];if(ye.alt!==le||ye.state.nonStopStateNumber!==oe)break;Q=Se,ne=T.join(ne,ye.context);}M=Q;let _e=T.join(V,ne);if(!V.equals(_e))return;H=H&&V.equals(ne);}return new m.ConflictInfo(z,H)}getConflictingAltsFromConfigSet(B){let T=B.conflictingAlts;return T==null&&B.uniqueAlt!==a.ATN.INVALID_ALT_NUMBER&&(T=new f.BitSet,T.set(B.uniqueAlt)),T}getTokenName(B){if(B===R.Token.EOF)return "EOF";let P=(this._parser!=null?this._parser.vocabulary:L.VocabularyImpl.EMPTY_VOCABULARY).getDisplayName(B);return P===String(B)?P:P+"<"+B+">"}getLookaheadName(B){return this.getTokenName(B.LA(1))}dumpDeadEndConfigs(B){console.log("dead end configs: ");let T=B.deadEndConfigs;if(T)for(let P of T){let H="no edges";if(P.state.numberOfOptimizedTransitions>0){let z=P.state.getOptimizedTransition(0);z instanceof d.AtomTransition?H="Atom "+this.getTokenName(z._label):z instanceof C.SetTransition&&(H=(z instanceof w.NotSetTransition?"~":"")+"Set "+z.set.toString());}console.log(P.toString(this._parser,!0)+":"+H);}}noViableAlt(B,T,P,H){return new D.NoViableAltException(this._parser,B,B.get(H),B.LT(1),P,T)}getUniqueAlt(B){let T=a.ATN.INVALID_ALT_NUMBER;for(let P of B)if(T===a.ATN.INVALID_ALT_NUMBER)T=P.alt;else if(P.alt!==T)return a.ATN.INVALID_ALT_NUMBER;return T}configWithAltAtStopState(B,T){for(let P of B)if(P.alt===T&&P.state instanceof ae.RuleStopState)return !0;return !1}addDFAEdge(B,T,P,H,z,G){I(H==null||H.isEmpty||B.isContextSensitive);let oe=T,se=this.addDFAState(B,z,G);if(H!=null)for(let X of H.toArray()){if(X===U.PredictionContext.EMPTY_FULL_STATE_KEY&&oe.configs.isOutermostConfigSet)continue;oe.setContextSensitive(this.atn),oe.setContextSymbol(P);let ee=oe.getContextTarget(X);if(ee!=null){oe=ee;continue}ee=this.addDFAContextState(B,oe.configs,X,G),I(X!==U.PredictionContext.EMPTY_FULL_STATE_KEY||ee.configs.isOutermostConfigSet),oe.setContextTarget(X,ee),oe=ee;}return qe.debug&&console.log("EDGE "+oe+" -> "+se+" upon "+this.getTokenName(P)),this.setDFAEdge(oe,P,se),qe.debug&&console.log(`DFA=
70
+ `+B.toString(this._parser!=null?this._parser.vocabulary:L.VocabularyImpl.EMPTY_VOCABULARY,this._parser!=null?this._parser.ruleNames:void 0)),se}setDFAEdge(B,T,P){B!=null&&B.setTarget(T,P);}addDFAContextState(B,T,P,H){if(P!==U.PredictionContext.EMPTY_FULL_STATE_KEY){let z=new l.ATNConfigSet;for(let G of T)z.add(G.appendContext(P,H));return this.addDFAState(B,z,H)}else return I(!T.isOutermostConfigSet,"Shouldn't be adding a duplicate edge."),T=T.clone(!0),T.isOutermostConfigSet=!0,this.addDFAState(B,T,H)}addDFAState(B,T,P){let H=this.enable_global_context_dfa||!T.isOutermostConfigSet;if(H){T.isReadOnly||T.optimizeConfigs(this);let X=this.createDFAState(B,T),ee=B.states.get(X);if(ee!=null)return ee}T.isReadOnly||T.conflictInfo==null&&(T.conflictInfo=this.isConflicted(T,P));let z=this.createDFAState(B,T.clone(!0)),G=this.atn.getDecisionState(B.decision),oe=this.getUniqueAlt(T);if(oe!==a.ATN.INVALID_ALT_NUMBER)z.acceptStateInfo=new i.AcceptStateInfo(oe);else if(T.conflictingAlts!=null){let X=T.conflictingAlts;X&&(z.acceptStateInfo=new i.AcceptStateInfo(X.nextSetBit(0)));}if(z.isAcceptState&&T.hasSemanticContext&&this.predicateDFAState(z,T,G.numberOfTransitions),!H)return z;let se=B.addState(z);return qe.debug&&se===z&&console.log("adding new DFA state: "+z),se}createDFAState(B,T){return new v.DFAState(T)}reportAttemptingFullContext(B,T,P,H,z){if(qe.debug||qe.retry_debug){let G=_.Interval.of(H,z);console.log("reportAttemptingFullContext decision="+B.decision+":"+P.s0.configs+", input="+this._parser.inputStream.getText(G));}if(this._parser!=null){let G=this._parser.getErrorListenerDispatch();G.reportAttemptingFullContext&&G.reportAttemptingFullContext(this._parser,B,H,z,T,P);}}reportContextSensitivity(B,T,P,H,z){if(qe.debug||qe.retry_debug){let G=_.Interval.of(H,z);console.log("reportContextSensitivity decision="+B.decision+":"+P.s0.configs+", input="+this._parser.inputStream.getText(G));}if(this._parser!=null){let G=this._parser.getErrorListenerDispatch();G.reportContextSensitivity&&G.reportContextSensitivity(this._parser,B,H,z,T,P);}}reportAmbiguity(B,T,P,H,z,G,oe){if(qe.debug||qe.retry_debug){let se=_.Interval.of(P,H);console.log("reportAmbiguity "+G+":"+oe+", input="+this._parser.inputStream.getText(se));}if(this._parser!=null){let se=this._parser.getErrorListenerDispatch();se.reportAmbiguity&&se.reportAmbiguity(this._parser,B,P,H,z,G,oe);}}getReturnState(B){return B.isEmpty?U.PredictionContext.EMPTY_FULL_STATE_KEY:this.atn.states[B.invokingState].transition(0).followState.stateNumber}skipTailCalls(B){if(!this.optimize_tail_calls)return B;for(;!B.isEmpty;){let T=this.atn.states[B.invokingState];if(I(T.numberOfTransitions===1&&T.transition(0).serializationType===3),!T.transition(0).tailCall)break;B=B.parent;}return B}get parser(){return this._parser}};A.debug=!1,A.dfa_debug=!1,A.retry_debug=!1,A.STATE_ALT_SORT_COMPARATOR=(q,B)=>{let T=q.state.nonStopStateNumber-B.state.nonStopStateNumber;return T!==0||(T=q.alt-B.alt,T!==0)?T:0},e([b.NotNull],A.prototype,"predictionMode",void 0),e([b.NotNull],A.prototype,"getPredictionMode",null),e([r(0,b.NotNull)],A.prototype,"setPredictionMode",null),e([b.Override],A.prototype,"reset",null),e([r(0,b.NotNull)],A.prototype,"adaptivePredict",null),e([r(0,b.NotNull),r(1,b.NotNull),r(2,b.NotNull)],A.prototype,"getStartState",null),e([r(0,b.NotNull),r(1,b.NotNull),r(3,b.NotNull)],A.prototype,"execDFA",null),e([r(0,b.NotNull),r(1,b.NotNull),r(3,b.NotNull)],A.prototype,"execATN",null),e([r(0,b.NotNull),r(2,b.NotNull)],A.prototype,"handleNoViableAlt",null),e([r(0,b.NotNull)],A.prototype,"getExistingTargetState",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"computeTargetState",null),e([b.NotNull,r(0,b.NotNull)],A.prototype,"removeAllConfigsNotInRuleStopState",null),e([b.NotNull],A.prototype,"computeStartState",null),e([b.NotNull,r(0,b.NotNull)],A.prototype,"applyPrecedenceFilter",null),e([r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"getReachableTarget",null),e([r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"getPredsForAmbigAlts",null),e([r(0,b.NotNull)],A.prototype,"evalSemanticContext",null),e([r(0,b.NotNull)],A.prototype,"evalSemanticContextImpl",null),e([r(1,b.NotNull),r(4,b.Nullable)],A.prototype,"closure",null),e([r(0,b.NotNull),r(1,b.NotNull),r(2,b.Nullable),r(3,b.NotNull),r(6,b.NotNull)],A.prototype,"closureImpl",null),e([b.NotNull],A.prototype,"getRuleName",null),e([r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"getEpsilonTarget",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"actionTransition",null),e([b.Nullable,r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"precedenceTransition",null),e([b.Nullable,r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"predTransition",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull),r(2,b.Nullable)],A.prototype,"ruleTransition",null),e([r(0,b.NotNull)],A.prototype,"isConflicted",null),e([b.NotNull],A.prototype,"getTokenName",null),e([r(0,b.NotNull)],A.prototype,"dumpDeadEndConfigs",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull),r(2,b.NotNull)],A.prototype,"noViableAlt",null),e([r(0,b.NotNull)],A.prototype,"getUniqueAlt",null),e([r(0,b.NotNull)],A.prototype,"configWithAltAtStopState",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull),r(4,b.NotNull)],A.prototype,"addDFAEdge",null),e([r(0,b.Nullable),r(2,b.Nullable)],A.prototype,"setDFAEdge",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"addDFAContextState",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"addDFAState",null),e([b.NotNull,r(0,b.NotNull),r(1,b.NotNull)],A.prototype,"createDFAState",null),e([r(0,b.NotNull),r(2,b.NotNull)],A.prototype,"reportAttemptingFullContext",null),e([r(0,b.NotNull),r(2,b.NotNull)],A.prototype,"reportContextSensitivity",null),e([r(0,b.NotNull),r(5,b.NotNull),r(6,b.NotNull)],A.prototype,"reportAmbiguity",null),A=e([r(0,b.NotNull)],A),t.ParserATNSimulator=A;}),B7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.PlusBlockStartState=void 0;var r=Qt(),i=fc(),s=fe(),n=class extends i.BlockStartState{get stateType(){return r.ATNStateType.PLUS_BLOCK_START}};e([s.Override],n.prototype,"stateType",null),t.PlusBlockStartState=n;}),j7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.PlusLoopbackState=void 0;var r=Qt(),i=ls(),s=fe(),n=class extends i.DecisionState{get stateType(){return r.ATNStateType.PLUS_LOOP_BACK}};e([s.Override],n.prototype,"stateType",null),t.PlusLoopbackState=n;}),q7=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.PrecedencePredicateTransition=void 0;var i=Ep(),s=fe(),n=ao(),o=class extends i.AbstractPredicateTransition{constructor(u,l){super(u),this.precedence=l;}get serializationType(){return 10}get isEpsilon(){return !0}matches(u,l,h){return !1}get predicate(){return new n.SemanticContext.PrecedencePredicate(this.precedence)}toString(){return this.precedence+" >= _p"}};e([s.Override],o.prototype,"serializationType",null),e([s.Override],o.prototype,"isEpsilon",null),e([s.Override],o.prototype,"matches",null),e([s.Override],o.prototype,"toString",null),o=e([r(0,s.NotNull)],o),t.PrecedencePredicateTransition=o;}),H7=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.RangeTransition=void 0;var i=cs(),s=fe(),n=sn(),o=class extends n.Transition{constructor(u,l,h){super(u),this.from=l,this.to=h;}get serializationType(){return 2}get label(){return i.IntervalSet.of(this.from,this.to)}matches(u,l,h){return u>=this.from&&u<=this.to}toString(){return "'"+String.fromCodePoint(this.from)+"'..'"+String.fromCodePoint(this.to)+"'"}};e([s.Override],o.prototype,"serializationType",null),e([s.Override,s.NotNull],o.prototype,"label",null),e([s.Override],o.prototype,"matches",null),e([s.Override,s.NotNull],o.prototype,"toString",null),o=e([r(0,s.NotNull)],o),t.RangeTransition=o;}),U7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleStartState=void 0;var r=Ci(),i=Qt(),s=fe(),n=class extends r.ATNState{constructor(){super(...arguments),this.isPrecedenceRule=!1,this.leftFactored=!1;}get stateType(){return i.ATNStateType.RULE_START}};e([s.Override],n.prototype,"stateType",null),t.RuleStartState=n;}),V7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.StarBlockStartState=void 0;var r=Qt(),i=fc(),s=fe(),n=class extends i.BlockStartState{get stateType(){return r.ATNStateType.STAR_BLOCK_START}};e([s.Override],n.prototype,"stateType",null),t.StarBlockStartState=n;}),$7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.StarLoopbackState=void 0;var r=Ci(),i=Qt(),s=fe(),n=class extends r.ATNState{get loopEntryState(){return this.transition(0).target}get stateType(){return i.ATNStateType.STAR_LOOP_BACK}};e([s.Override],n.prototype,"stateType",null),t.StarLoopbackState=n;}),z7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.TokensStartState=void 0;var r=Qt(),i=ls(),s=fe(),n=class extends i.DecisionState{get stateType(){return r.ATNStateType.TOKEN_START}};e([s.Override],n.prototype,"stateType",null),t.TokensStartState=n;}),K7=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UUID=void 0;var e=qt(),r=class{constructor(i,s,n,o){this.data=new Uint32Array(4),this.data[0]=i,this.data[1]=s,this.data[2]=n,this.data[3]=o;}static fromString(i){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(i))throw new Error("Incorrectly formatted UUID");let s=i.split("-"),n=parseInt(s[0],16),o=(parseInt(s[1],16)<<16>>>0)+parseInt(s[2],16),a=(parseInt(s[3],16)<<16>>>0)+parseInt(s[4].substr(0,4),16),u=parseInt(s[4].substr(-8),16);return new r(n,o,a,u)}hashCode(){return e.MurmurHash.hashCode([this.data[0],this.data[1],this.data[2],this.data[3]])}equals(i){return i===this?!0:i instanceof r?this.data[0]===i.data[0]&&this.data[1]===i.data[1]&&this.data[2]===i.data[2]&&this.data[3]===i.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)}};t.UUID=r;}),pc=te(t=>{var e=t&&t.__decorate||function(ee,V,M,J){var W=arguments.length,ne=W<3?V:J===null?J=Object.getOwnPropertyDescriptor(V,M):J,le;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ne=Reflect.decorate(ee,V,M,J);else for(var Q=ee.length-1;Q>=0;Q--)(le=ee[Q])&&(ne=(W<3?le(ne):W>3?le(V,M,ne):le(V,M))||ne);return W>3&&ne&&Object.defineProperty(V,M,ne),ne},r=t&&t.__param||function(ee,V){return function(M,J){V(M,J,ee);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ATNDeserializer=void 0;var i=Ab(),s=on(),n=ti(),o=Tb(),a=Qt(),u=wb(),l=A7(),h=xb(),c=an(),d=w7(),f=fc(),m=ls(),g=vb(),v=D7(),x=cs(),_=bb(),E=S7(),b=R7(),w=N7(),D=O7(),N=F7(),F=L7(),U=P7(),Z=I7(),re=Db(),ae=fe(),k=Np(),y=Ha(),C=B7(),S=j7(),R=q7(),L=fb(),I=H7(),K=U7(),j=qa(),A=Op(),q=Rp(),B=V7(),T=$7(),P=Sp(),H=At(),z=z7(),G=K7(),oe=Eb(),se;(function(ee){ee[ee.UNICODE_BMP=0]="UNICODE_BMP",ee[ee.UNICODE_SMP=1]="UNICODE_SMP";})(se||(se={}));var X=class{constructor(ee){ee===void 0&&(ee=o.ATNDeserializationOptions.defaultOptions),this.deserializationOptions=ee;}static get SERIALIZED_VERSION(){return 3}static isFeatureSupported(ee,V){let M=X.SUPPORTED_UUIDS.findIndex(J=>J.equals(ee));return M<0?!1:X.SUPPORTED_UUIDS.findIndex(J=>J.equals(V))>=M}static getUnicodeDeserializer(ee){return ee===0?{readUnicode:(V,M)=>X.toInt(V[M]),size:1}:{readUnicode:(V,M)=>X.toInt32(V,M),size:2}}deserialize(ee){ee=ee.slice(0);for(let ce=1;ce<ee.length;ce++)ee[ce]=ee[ce]-2&65535;let V=0,M=X.toInt(ee[V++]);if(M!==X.SERIALIZED_VERSION){let ce=`Could not deserialize ATN with version ${M} (expected ${X.SERIALIZED_VERSION}).`;throw new Error(ce)}let J=X.toUUID(ee,V);if(V+=8,X.SUPPORTED_UUIDS.findIndex(ce=>ce.equals(J))<0){let ce=`Could not deserialize ATN with UUID ${J} (expected ${X.SERIALIZED_UUID} or a legacy UUID).`;throw new Error(ce)}let W=X.isFeatureSupported(X.ADDED_LEXER_ACTIONS,J),ne=X.toInt(ee[V++]),le=X.toInt(ee[V++]),Q=new n.ATN(ne,le),_e=[],Se=[],ye=X.toInt(ee[V++]);for(let ce=0;ce<ye;ce++){let be=X.toInt(ee[V++]);if(be===a.ATNStateType.INVALID_TYPE){Q.addState(new _.InvalidState);continue}let Ae=X.toInt(ee[V++]);Ae===65535&&(Ae=-1);let Le=this.stateFactory(be,Ae);if(be===a.ATNStateType.LOOP_END){let Ne=X.toInt(ee[V++]);_e.push([Le,Ne]);}else if(Le instanceof f.BlockStartState){let Ne=X.toInt(ee[V++]);Se.push([Le,Ne]);}Q.addState(Le);}for(let ce of _e)ce[0].loopBackState=Q.states[ce[1]];for(let ce of Se)ce[0].endState=Q.states[ce[1]];let Ce=X.toInt(ee[V++]);for(let ce=0;ce<Ce;ce++){let be=X.toInt(ee[V++]);Q.states[be].nonGreedy=!0;}let tt=X.toInt(ee[V++]);for(let ce=0;ce<tt;ce++){let be=X.toInt(ee[V++]);Q.states[be].sll=!0;}let Fe=X.toInt(ee[V++]);for(let ce=0;ce<Fe;ce++){let be=X.toInt(ee[V++]);Q.states[be].isPrecedenceRule=!0;}let He=X.toInt(ee[V++]);Q.grammarType===0&&(Q.ruleToTokenType=new Int32Array(He)),Q.ruleToStartState=new Array(He);for(let ce=0;ce<He;ce++){let be=X.toInt(ee[V++]),Ae=Q.states[be];if(Ae.leftFactored=X.toInt(ee[V++])!==0,Q.ruleToStartState[ce]=Ae,Q.grammarType===0){let Le=X.toInt(ee[V++]);if(Le===65535&&(Le=H.Token.EOF),Q.ruleToTokenType[ce]=Le,!X.isFeatureSupported(X.ADDED_LEXER_ACTIONS,J)){X.toInt(ee[V++]);}}}Q.ruleToStopState=new Array(He);for(let ce of Q.states)ce instanceof j.RuleStopState&&(Q.ruleToStopState[ce.ruleIndex]=ce,Q.ruleToStartState[ce.ruleIndex].stopState=ce);let Yt=X.toInt(ee[V++]);for(let ce=0;ce<Yt;ce++){let be=X.toInt(ee[V++]);Q.modeToStartState.push(Q.states[be]);}Q.modeToDFA=new Array(Yt);for(let ce=0;ce<Yt;ce++)Q.modeToDFA[ce]=new g.DFA(Q.modeToStartState[ce]);let Xe=[];V=this.deserializeSets(ee,V,Xe,X.getUnicodeDeserializer(0)),X.isFeatureSupported(X.ADDED_UNICODE_SMP,J)&&(V=this.deserializeSets(ee,V,Xe,X.getUnicodeDeserializer(1)));let ot=X.toInt(ee[V++]);for(let ce=0;ce<ot;ce++){let be=X.toInt(ee[V]),Ae=X.toInt(ee[V+1]),Le=X.toInt(ee[V+2]),Ne=X.toInt(ee[V+3]),We=X.toInt(ee[V+4]),lt=X.toInt(ee[V+5]),Ve=this.edgeFactory(Q,Le,be,Ae,Ne,We,lt,Xe);Q.states[be].addTransition(Ve),V+=6;}let pi=new s.Array2DHashSet({hashCode:ce=>ce.stopState^ce.returnState^ce.outermostPrecedenceReturn,equals:(ce,be)=>ce.stopState===be.stopState&&ce.returnState===be.returnState&&ce.outermostPrecedenceReturn===be.outermostPrecedenceReturn}),nt=[];for(let ce of Q.states){let be=ce.ruleIndex>=0&&Q.ruleToStartState[ce.ruleIndex].leftFactored;for(let Ae=0;Ae<ce.numberOfTransitions;Ae++){let Le=ce.transition(Ae);if(!(Le instanceof A.RuleTransition))continue;let Ne=Le;if(!Q.ruleToStartState[Ne.target.ruleIndex].leftFactored&&be)continue;let lt=-1;Q.ruleToStartState[Ne.target.ruleIndex].isPrecedenceRule&&Ne.precedence===0&&(lt=Ne.target.ruleIndex);let Ve={stopState:Ne.target.ruleIndex,returnState:Ne.followState.stateNumber,outermostPrecedenceReturn:lt};pi.add(Ve)&&nt.push(Ve);}}for(let ce of nt){let be=new v.EpsilonTransition(Q.states[ce.returnState],ce.outermostPrecedenceReturn);Q.ruleToStopState[ce.stopState].addTransition(be);}for(let ce of Q.states){if(ce instanceof f.BlockStartState){if(ce.endState===void 0)throw new Error("IllegalStateException");if(ce.endState.startState!==void 0)throw new Error("IllegalStateException");ce.endState.startState=ce;}if(ce instanceof S.PlusLoopbackState){let be=ce;for(let Ae=0;Ae<be.numberOfTransitions;Ae++){let Le=be.transition(Ae).target;Le instanceof C.PlusBlockStartState&&(Le.loopBackState=be);}}else if(ce instanceof T.StarLoopbackState){let be=ce;for(let Ae=0;Ae<be.numberOfTransitions;Ae++){let Le=be.transition(Ae).target;Le instanceof P.StarLoopEntryState&&(Le.loopBackState=be);}}}let rt=X.toInt(ee[V++]);for(let ce=1;ce<=rt;ce++){let be=X.toInt(ee[V++]),Ae=Q.states[be];Q.decisionToState.push(Ae),Ae.decision=ce-1;}if(Q.grammarType===0)if(W){Q.lexerActions=new Array(X.toInt(ee[V++]));for(let ce=0;ce<Q.lexerActions.length;ce++){let be=X.toInt(ee[V++]),Ae=X.toInt(ee[V++]);Ae===65535&&(Ae=-1);let Le=X.toInt(ee[V++]);Le===65535&&(Le=-1);let Ne=this.lexerActionFactory(be,Ae,Le);Q.lexerActions[ce]=Ne;}}else {let ce=[];for(let be of Q.states)for(let Ae=0;Ae<be.numberOfTransitions;Ae++){let Le=be.transition(Ae);if(!(Le instanceof i.ActionTransition))continue;let Ne=Le.ruleIndex,We=Le.actionIndex,lt=new b.LexerCustomAction(Ne,We);be.setTransition(Ae,new i.ActionTransition(Le.target,Ne,ce.length,!1)),ce.push(lt);}Q.lexerActions=ce;}this.markPrecedenceDecisions(Q),Q.decisionToDFA=new Array(rt);for(let ce=0;ce<rt;ce++)Q.decisionToDFA[ce]=new g.DFA(Q.decisionToState[ce],ce);if(this.deserializationOptions.isVerifyATN&&this.verifyATN(Q),this.deserializationOptions.isGenerateRuleBypassTransitions&&Q.grammarType===1){Q.ruleToTokenType=new Int32Array(Q.ruleToStartState.length);for(let ce=0;ce<Q.ruleToStartState.length;ce++)Q.ruleToTokenType[ce]=Q.maxTokenType+ce+1;for(let ce=0;ce<Q.ruleToStartState.length;ce++){let be=new l.BasicBlockStartState;be.ruleIndex=ce,Q.addState(be);let Ae=new d.BlockEndState;Ae.ruleIndex=ce,Q.addState(Ae),be.endState=Ae,Q.defineDecisionState(be),Ae.startState=be;let Le,Ne;if(Q.ruleToStartState[ce].isPrecedenceRule){Le=void 0;for(let lt of Q.states){if(lt.ruleIndex!==ce||!(lt instanceof P.StarLoopEntryState))continue;let Ve=lt.transition(lt.numberOfTransitions-1).target;if(Ve instanceof re.LoopEndState&&Ve.epsilonOnlyTransitions&&Ve.transition(0).target instanceof j.RuleStopState){Le=lt;break}}if(!Le)throw new Error("Couldn't identify final state of the precedence rule prefix section.");Ne=Le.loopBackState.transition(0);}else Le=Q.ruleToStopState[ce];for(let lt of Q.states)for(let Ve=0;Ve<lt.numberOfTransitions;Ve++){let Qe=lt.transition(Ve);Qe!==Ne&&Qe.target===Le&&(Qe.target=Ae);}for(;Q.ruleToStartState[ce].numberOfTransitions>0;){let lt=Q.ruleToStartState[ce].removeTransition(Q.ruleToStartState[ce].numberOfTransitions-1);be.addTransition(lt);}Q.ruleToStartState[ce].addTransition(new v.EpsilonTransition(be)),Ae.addTransition(new v.EpsilonTransition(Le));let We=new h.BasicState;Q.addState(We),We.addTransition(new u.AtomTransition(Ae,Q.ruleToTokenType[ce])),be.addTransition(new v.EpsilonTransition(We));}this.deserializationOptions.isVerifyATN&&this.verifyATN(Q);}if(this.deserializationOptions.isOptimize){for(;;){let ce=0;ce+=X.inlineSetRules(Q),ce+=X.combineChainedEpsilons(Q);let be=Q.grammarType===0;if(ce+=X.optimizeSets(Q,be),ce===0)break}this.deserializationOptions.isVerifyATN&&this.verifyATN(Q);}return X.identifyTailCalls(Q),Q}deserializeSets(ee,V,M,J){let W=X.toInt(ee[V++]);for(let ne=0;ne<W;ne++){let le=X.toInt(ee[V]);V++;let Q=new x.IntervalSet;M.push(Q),X.toInt(ee[V++])!==0&&Q.add(-1);for(let Se=0;Se<le;Se++){let ye=J.readUnicode(ee,V);V+=J.size;let Ce=J.readUnicode(ee,V);V+=J.size,Q.add(ye,Ce);}}return V}markPrecedenceDecisions(ee){let V=new Map;for(let M of ee.states)if(M instanceof P.StarLoopEntryState&&ee.ruleToStartState[M.ruleIndex].isPrecedenceRule){let J=M.transition(M.numberOfTransitions-1).target;J instanceof re.LoopEndState&&J.epsilonOnlyTransitions&&J.transition(0).target instanceof j.RuleStopState&&(V.set(M.ruleIndex,M),M.precedenceRuleDecision=!0,M.precedenceLoopbackStates=new c.BitSet(ee.states.length));}for(let M of V)for(let J of ee.ruleToStopState[M[0]].getTransitions())J.serializationType!==1||J.outermostPrecedenceReturn!==-1||M[1].precedenceLoopbackStates.set(J.target.stateNumber);}verifyATN(ee){for(let V of ee.states)if(this.checkCondition(V!==void 0,"ATN states should not be undefined."),V.stateType!==a.ATNStateType.INVALID_TYPE){if(this.checkCondition(V.onlyHasEpsilonTransitions||V.numberOfTransitions<=1),V instanceof C.PlusBlockStartState&&this.checkCondition(V.loopBackState!==void 0),V instanceof P.StarLoopEntryState){let M=V;if(this.checkCondition(M.loopBackState!==void 0),this.checkCondition(M.numberOfTransitions===2),M.transition(0).target instanceof B.StarBlockStartState)this.checkCondition(M.transition(1).target instanceof re.LoopEndState),this.checkCondition(!M.nonGreedy);else if(M.transition(0).target instanceof re.LoopEndState)this.checkCondition(M.transition(1).target instanceof B.StarBlockStartState),this.checkCondition(M.nonGreedy);else throw new Error("IllegalStateException")}if(V instanceof T.StarLoopbackState&&(this.checkCondition(V.numberOfTransitions===1),this.checkCondition(V.transition(0).target instanceof P.StarLoopEntryState)),V instanceof re.LoopEndState&&this.checkCondition(V.loopBackState!==void 0),V instanceof K.RuleStartState&&this.checkCondition(V.stopState!==void 0),V instanceof f.BlockStartState&&this.checkCondition(V.endState!==void 0),V instanceof d.BlockEndState&&this.checkCondition(V.startState!==void 0),V instanceof m.DecisionState){let M=V;this.checkCondition(M.numberOfTransitions<=1||M.decision>=0);}else this.checkCondition(V.numberOfTransitions<=1||V instanceof j.RuleStopState);}}checkCondition(ee,V){if(!ee)throw new Error("IllegalStateException: "+V)}static inlineSetRules(ee){let V=0,M=new Array(ee.ruleToStartState.length);for(let J=0;J<ee.ruleToStartState.length;J++){let ne=ee.ruleToStartState[J];for(;ne.onlyHasEpsilonTransitions&&ne.numberOfOptimizedTransitions===1&&ne.getOptimizedTransition(0).serializationType===1;)ne=ne.getOptimizedTransition(0).target;if(ne.numberOfOptimizedTransitions!==1)continue;let le=ne.getOptimizedTransition(0),Q=le.target;if(!(le.isEpsilon||!Q.onlyHasEpsilonTransitions||Q.numberOfOptimizedTransitions!==1||!(Q.getOptimizedTransition(0).target instanceof j.RuleStopState)))switch(le.serializationType){case 5:case 2:case 7:M[J]=le;break;case 8:case 9:continue;default:continue}}for(let J of ee.states){if(J.ruleIndex<0)continue;let W;for(let ne=0;ne<J.numberOfOptimizedTransitions;ne++){let le=J.getOptimizedTransition(ne);if(!(le instanceof A.RuleTransition)){W!==void 0&&W.push(le);continue}let Q=le,_e=M[Q.target.ruleIndex];if(_e===void 0){W!==void 0&&W.push(le);continue}if(W===void 0){W=[];for(let Ce=0;Ce<ne;Ce++)W.push(J.getOptimizedTransition(ne));}V++;let Se=Q.followState,ye=new h.BasicState;switch(ye.setRuleIndex(Se.ruleIndex),ee.addState(ye),W.push(new v.EpsilonTransition(ye)),_e.serializationType){case 5:ye.addTransition(new u.AtomTransition(Se,_e._label));break;case 2:ye.addTransition(new I.RangeTransition(Se,_e.from,_e.to));break;case 7:ye.addTransition(new q.SetTransition(Se,_e.label));break;default:throw new Error("UnsupportedOperationException")}}if(W!==void 0){if(J.isOptimized)for(;J.numberOfOptimizedTransitions>0;)J.removeOptimizedTransition(J.numberOfOptimizedTransitions-1);for(let ne of W)J.addOptimizedTransition(ne);}}return y.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+V+" rule invocations by inlining sets."),V}static combineChainedEpsilons(ee){let V=0;for(let M of ee.states){if(!M.onlyHasEpsilonTransitions||M instanceof j.RuleStopState)continue;let J;e:for(let W=0;W<M.numberOfOptimizedTransitions;W++){let ne=M.getOptimizedTransition(W),le=ne.target;if(ne.serializationType!==1||ne.outermostPrecedenceReturn!==-1||le.stateType!==a.ATNStateType.BASIC||!le.onlyHasEpsilonTransitions){J!==void 0&&J.push(ne);continue e}for(let Q=0;Q<le.numberOfOptimizedTransitions;Q++)if(le.getOptimizedTransition(Q).serializationType!==1||le.getOptimizedTransition(Q).outermostPrecedenceReturn!==-1){J!==void 0&&J.push(ne);continue e}if(V++,J===void 0){J=[];for(let Q=0;Q<W;Q++)J.push(M.getOptimizedTransition(Q));}for(let Q=0;Q<le.numberOfOptimizedTransitions;Q++){let _e=le.getOptimizedTransition(Q).target;J.push(new v.EpsilonTransition(_e));}}if(J!==void 0){if(M.isOptimized)for(;M.numberOfOptimizedTransitions>0;)M.removeOptimizedTransition(M.numberOfOptimizedTransitions-1);for(let W of J)M.addOptimizedTransition(W);}}return y.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+V+" transitions by combining chained epsilon transitions."),V}static optimizeSets(ee,V){if(V)return 0;let M=0,J=ee.decisionToState;for(let W of J){let ne=new x.IntervalSet;for(let Ce=0;Ce<W.numberOfOptimizedTransitions;Ce++){let tt=W.getOptimizedTransition(Ce);if(!(tt instanceof v.EpsilonTransition)||tt.target.numberOfOptimizedTransitions!==1)continue;let Fe=tt.target.getOptimizedTransition(0);Fe.target instanceof d.BlockEndState&&(Fe instanceof k.NotSetTransition||(Fe instanceof u.AtomTransition||Fe instanceof I.RangeTransition||Fe instanceof q.SetTransition)&&ne.add(Ce));}if(ne.size<=1)continue;let le=[];for(let Ce=0;Ce<W.numberOfOptimizedTransitions;Ce++)ne.contains(Ce)||le.push(W.getOptimizedTransition(Ce));let Q=W.getOptimizedTransition(ne.minElement).target.getOptimizedTransition(0).target,_e=new x.IntervalSet;for(let Ce of ne.intervals)for(let tt=Ce.a;tt<=Ce.b;tt++){let Fe=W.getOptimizedTransition(tt).target.getOptimizedTransition(0);if(Fe instanceof k.NotSetTransition)throw new Error("Not yet implemented.");_e.addAll(Fe.label);}let Se;if(_e.intervals.length===1)if(_e.size===1)Se=new u.AtomTransition(Q,_e.minElement);else {let Ce=_e.intervals[0];Se=new I.RangeTransition(Q,Ce.a,Ce.b);}else Se=new q.SetTransition(Q,_e);let ye=new h.BasicState;if(ye.setRuleIndex(W.ruleIndex),ee.addState(ye),ye.addTransition(Se),le.push(new v.EpsilonTransition(ye)),M+=W.numberOfOptimizedTransitions-le.length,W.isOptimized)for(;W.numberOfOptimizedTransitions>0;)W.removeOptimizedTransition(W.numberOfOptimizedTransitions-1);for(let Ce of le)W.addOptimizedTransition(Ce);}return y.ParserATNSimulator.debug&&console.log("ATN runtime optimizer removed "+M+" paths by collapsing sets."),M}static identifyTailCalls(ee){for(let V of ee.states){for(let M=0;M<V.numberOfTransitions;M++){let J=V.transition(M);J instanceof A.RuleTransition&&(J.tailCall=this.testTailCall(ee,J,!1),J.optimizedTailCall=this.testTailCall(ee,J,!0));}if(V.isOptimized)for(let M=0;M<V.numberOfOptimizedTransitions;M++){let J=V.getOptimizedTransition(M);J instanceof A.RuleTransition&&(J.tailCall=this.testTailCall(ee,J,!1),J.optimizedTailCall=this.testTailCall(ee,J,!0));}}}static testTailCall(ee,V,M){if(!M&&V.tailCall||M&&V.optimizedTailCall)return !0;let J=new c.BitSet(ee.states.length),W=[];for(W.push(V.followState);;){let ne=W.pop();if(!ne)break;if(J.get(ne.stateNumber)||ne instanceof j.RuleStopState)continue;if(!ne.onlyHasEpsilonTransitions)return !1;let le=M?ne.numberOfOptimizedTransitions:ne.numberOfTransitions;for(let Q=0;Q<le;Q++){let _e=M?ne.getOptimizedTransition(Q):ne.transition(Q);if(_e.serializationType!==1)return !1;W.push(_e.target);}}return !0}static toInt(ee){return ee}static toInt32(ee,V){return (ee[V]|ee[V+1]<<16)>>>0}static toUUID(ee,V){let M=X.toInt32(ee,V),J=X.toInt32(ee,V+2),W=X.toInt32(ee,V+4),ne=X.toInt32(ee,V+6);return new G.UUID(ne,W,J,M)}edgeFactory(ee,V,M,J,W,ne,le,Q){let _e=ee.states[J];switch(V){case 1:return new v.EpsilonTransition(_e);case 2:return le!==0?new I.RangeTransition(_e,H.Token.EOF,ne):new I.RangeTransition(_e,W,ne);case 3:return new A.RuleTransition(ee.states[W],ne,le,_e);case 4:return new L.PredicateTransition(_e,W,ne,le!==0);case 10:return new R.PrecedencePredicateTransition(_e,W);case 5:return le!==0?new u.AtomTransition(_e,H.Token.EOF):new u.AtomTransition(_e,W);case 6:return new i.ActionTransition(_e,W,ne,le!==0);case 7:return new q.SetTransition(_e,Q[W]);case 8:return new k.NotSetTransition(_e,Q[W]);case 9:return new oe.WildcardTransition(_e)}throw new Error("The specified transition type is not valid.")}stateFactory(ee,V){let M;switch(ee){case a.ATNStateType.INVALID_TYPE:return new _.InvalidState;case a.ATNStateType.BASIC:M=new h.BasicState;break;case a.ATNStateType.RULE_START:M=new K.RuleStartState;break;case a.ATNStateType.BLOCK_START:M=new l.BasicBlockStartState;break;case a.ATNStateType.PLUS_BLOCK_START:M=new C.PlusBlockStartState;break;case a.ATNStateType.STAR_BLOCK_START:M=new B.StarBlockStartState;break;case a.ATNStateType.TOKEN_START:M=new z.TokensStartState;break;case a.ATNStateType.RULE_STOP:M=new j.RuleStopState;break;case a.ATNStateType.BLOCK_END:M=new d.BlockEndState;break;case a.ATNStateType.STAR_LOOP_BACK:M=new T.StarLoopbackState;break;case a.ATNStateType.STAR_LOOP_ENTRY:M=new P.StarLoopEntryState;break;case a.ATNStateType.PLUS_LOOP_BACK:M=new S.PlusLoopbackState;break;case a.ATNStateType.LOOP_END:M=new re.LoopEndState;break;default:let J=`The specified state type ${ee} is not valid.`;throw new Error(J)}return M.ruleIndex=V,M}lexerActionFactory(ee,V,M){switch(ee){case 0:return new E.LexerChannelAction(V);case 1:return new b.LexerCustomAction(V,M);case 2:return new w.LexerModeAction(V);case 3:return D.LexerMoreAction.INSTANCE;case 4:return N.LexerPopModeAction.INSTANCE;case 5:return new F.LexerPushModeAction(V);case 6:return U.LexerSkipAction.INSTANCE;case 7:return new Z.LexerTypeAction(V);default:let J=`The specified lexer action type ${ee} is not valid.`;throw new Error(J)}}};X.BASE_SERIALIZED_UUID=G.UUID.fromString("E4178468-DF95-44D0-AD87-F22A5D5FB6D3"),X.ADDED_LEXER_ACTIONS=G.UUID.fromString("AB35191A-1603-487E-B75A-479B831EAF6D"),X.ADDED_UNICODE_SMP=G.UUID.fromString("C23FEA89-0605-4f51-AFB8-058BCAB8C91B"),X.SUPPORTED_UUIDS=[X.BASE_SERIALIZED_UUID,X.ADDED_LEXER_ACTIONS,X.ADDED_UNICODE_SMP],X.SERIALIZED_UUID=X.ADDED_UNICODE_SMP,e([ae.NotNull],X.prototype,"deserializationOptions",void 0),e([r(0,ae.NotNull)],X.prototype,"deserialize",null),e([r(0,ae.NotNull)],X.prototype,"markPrecedenceDecisions",null),e([ae.NotNull,r(0,ae.NotNull)],X.prototype,"edgeFactory",null),t.ATNDeserializer=X;}),G7=te(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h},r=t&&t.__param||function(n,o){return function(a,u){o(a,u,n);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParseInfo=void 0;var i=fe(),s=class{constructor(o){this.atnSimulator=o;}getDecisionInfo(){return this.atnSimulator.getDecisionInfo()}getLLDecisions(){let o=this.atnSimulator.getDecisionInfo(),a=[];for(let u=0;u<o.length;u++)o[u].LL_Fallback>0&&a.push(u);return a}getTotalTimeInPrediction(){let o=this.atnSimulator.getDecisionInfo(),a=0;for(let u of o)a+=u.timeInPrediction;return a}getTotalSLLLookaheadOps(){let o=this.atnSimulator.getDecisionInfo(),a=0;for(let u of o)a+=u.SLL_TotalLook;return a}getTotalLLLookaheadOps(){let o=this.atnSimulator.getDecisionInfo(),a=0;for(let u of o)a+=u.LL_TotalLook;return a}getTotalSLLATNLookaheadOps(){let o=this.atnSimulator.getDecisionInfo(),a=0;for(let u of o)a+=u.SLL_ATNTransitions;return a}getTotalLLATNLookaheadOps(){let o=this.atnSimulator.getDecisionInfo(),a=0;for(let u of o)a+=u.LL_ATNTransitions;return a}getTotalATNLookaheadOps(){let o=this.atnSimulator.getDecisionInfo(),a=0;for(let u of o)a+=u.SLL_ATNTransitions,a+=u.LL_ATNTransitions;return a}getDFASize(o){if(o)return this.atnSimulator.atn.decisionToDFA[o].states.size;{let a=0,u=this.atnSimulator.atn.decisionToDFA;for(let l=0;l<u.length;l++)a+=this.getDFASize(l);return a}}};e([i.NotNull],s.prototype,"getDecisionInfo",null),e([i.NotNull],s.prototype,"getLLDecisions",null),s=e([r(0,i.NotNull)],s),t.ParseInfo=s;}),Nb=te(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.ProxyParserErrorListener=void 0;var r=Dp(),i=fe(),s=class extends r.ProxyErrorListener{constructor(n){super(n);}reportAmbiguity(n,o,a,u,l,h,c){this.getDelegates().forEach(d=>{d.reportAmbiguity&&d.reportAmbiguity(n,o,a,u,l,h,c);});}reportAttemptingFullContext(n,o,a,u,l,h){this.getDelegates().forEach(c=>{c.reportAttemptingFullContext&&c.reportAttemptingFullContext(n,o,a,u,l,h);});}reportContextSensitivity(n,o,a,u,l,h){this.getDelegates().forEach(c=>{c.reportContextSensitivity&&c.reportContextSensitivity(n,o,a,u,l,h);});}};e([i.Override],s.prototype,"reportAmbiguity",null),e([i.Override],s.prototype,"reportAttemptingFullContext",null),e([i.Override],s.prototype,"reportContextSensitivity",null),t.ProxyParserErrorListener=s;}),W7=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.isSupplementaryCodePoint=t.isLowSurrogate=t.isHighSurrogate=void 0;function e(s){return s>=55296&&s<=56319}t.isHighSurrogate=e;function r(s){return s>=56320&&s<=57343}t.isLowSurrogate=r;function i(s){return s>=65536}t.isSupplementaryCodePoint=i;}),Ob=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodePointBuffer=void 0;var e=ge("assert"),r=W7(),i=class{constructor(s,n){this.buffer=s,this._position=0,this._size=n;}static withArray(s){return new i(s,s.length)}get position(){return this._position}set position(s){if(s<0||s>this._size)throw new RangeError;this._position=s;}get remaining(){return this._size-this.position}get(s){return this.buffer[s]}array(){return this.buffer.slice(0,this._size)}static builder(s){return new i.Builder(s)}};t.CodePointBuffer=i,function(s){let n;(function(a){a[a.BYTE=0]="BYTE",a[a.CHAR=1]="CHAR",a[a.INT=2]="INT";})(n||(n={}));class o{constructor(u){this.type=0,this.buffer=new Uint8Array(u),this.prevHighSurrogate=-1,this.position=0;}build(){return new s(this.buffer,this.position)}static roundUpToNextPowerOfTwo(u){let l=32-Math.clz32(u-1);return Math.pow(2,l)}ensureRemaining(u){switch(this.type){case 0:if(this.buffer.length-this.position<u){let l=o.roundUpToNextPowerOfTwo(this.buffer.length+u),h=new Uint8Array(l);h.set(this.buffer.subarray(0,this.position),0),this.buffer=h;}break;case 1:if(this.buffer.length-this.position<u){let l=o.roundUpToNextPowerOfTwo(this.buffer.length+u),h=new Uint16Array(l);h.set(this.buffer.subarray(0,this.position),0),this.buffer=h;}break;case 2:if(this.buffer.length-this.position<u){let l=o.roundUpToNextPowerOfTwo(this.buffer.length+u),h=new Int32Array(l);h.set(this.buffer.subarray(0,this.position),0),this.buffer=h;}break}}append(u){this.ensureRemaining(u.length),this.appendArray(u);}appendArray(u){switch(this.type){case 0:this.appendArrayByte(u);break;case 1:this.appendArrayChar(u);break;case 2:this.appendArrayInt(u);break}}appendArrayByte(u){e(this.prevHighSurrogate===-1);let l=u,h=0,c=u.length,d=this.buffer,f=this.position;for(;h<c;){let m=l[h];if(m<=255)d[f]=m;else if(u=u.subarray(h,c),this.position=f,r.isHighSurrogate(m)){this.byteToIntBuffer(u.length),this.appendArrayInt(u);return}else {this.byteToCharBuffer(u.length),this.appendArrayChar(u);return}h++,f++;}this.position=f;}appendArrayChar(u){e(this.prevHighSurrogate===-1);let l=u,h=0,c=u.length,d=this.buffer,f=this.position;for(;h<c;){let m=l[h];if(!r.isHighSurrogate(m))d[f]=m;else {u=u.subarray(h,c),this.position=f,this.charToIntBuffer(u.length),this.appendArrayInt(u);return}h++,f++;}this.position=f;}appendArrayInt(u){let l=u,h=0,c=u.length,d=this.buffer,f=this.position;for(;h<c;){let m=l[h];h++,this.prevHighSurrogate!==-1?r.isLowSurrogate(m)?(d[f]=String.fromCharCode(this.prevHighSurrogate,m).codePointAt(0),f++,this.prevHighSurrogate=-1):(d[f]=this.prevHighSurrogate,f++,r.isHighSurrogate(m)?this.prevHighSurrogate=m:(d[f]=m,f++,this.prevHighSurrogate=-1)):r.isHighSurrogate(m)?this.prevHighSurrogate=m:(d[f]=m,f++);}this.prevHighSurrogate!==-1&&(d[f]=this.prevHighSurrogate,f++),this.position=f;}byteToCharBuffer(u){let l=new Uint16Array(Math.max(this.position+u,this.buffer.length>>1));l.set(this.buffer.subarray(0,this.position),0),this.type=1,this.buffer=l;}byteToIntBuffer(u){let l=new Int32Array(Math.max(this.position+u,this.buffer.length>>2));l.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=l;}charToIntBuffer(u){let l=new Int32Array(Math.max(this.position+u,this.buffer.length>>1));l.set(this.buffer.subarray(0,this.position),0),this.type=2,this.buffer=l;}}s.Builder=o;}(i=t.CodePointBuffer||(t.CodePointBuffer={}));}),Fb=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.CodePointCharStream=void 0;var r=ge("assert"),i=rn(),s=mr(),n=fe(),o=class{constructor(a,u,l,h){r(u===0),this._array=a,this._size=l,this._name=h,this._position=0;}get internalStorage(){return this._array}static fromBuffer(a,u){return (u===void 0||u.length===0)&&(u=i.IntStream.UNKNOWN_SOURCE_NAME),new o(a.array(),a.position,a.remaining,u)}consume(){if(this._size-this._position===0)throw r(this.LA(1)===i.IntStream.EOF),new RangeError("cannot consume EOF");this._position++;}get index(){return this._position}get size(){return this._size}mark(){return -1}release(a){}seek(a){this._position=a;}get sourceName(){return this._name}toString(){return this.getText(s.Interval.of(0,this.size-1))}LA(a){let u;switch(Math.sign(a)){case-1:return u=this.index+a,u<0?i.IntStream.EOF:this._array[u];case 0:return 0;case 1:return u=this.index+a-1,u>=this.size?i.IntStream.EOF:this._array[u]}throw new RangeError("Not reached")}getText(a){let u=Math.min(a.a,this.size),l=Math.min(a.b-a.a+1,this.size-u);return this._array instanceof Int32Array?String.fromCodePoint(...Array.from(this._array.subarray(u,u+l))):String.fromCharCode(...Array.from(this._array.subarray(u,u+l)))}};e([n.Override],o.prototype,"consume",null),e([n.Override],o.prototype,"index",null),e([n.Override],o.prototype,"size",null),e([n.Override],o.prototype,"mark",null),e([n.Override],o.prototype,"release",null),e([n.Override],o.prototype,"seek",null),e([n.Override],o.prototype,"sourceName",null),e([n.Override],o.prototype,"toString",null),e([n.Override],o.prototype,"LA",null),e([n.Override],o.prototype,"getText",null),t.CodePointCharStream=o;}),Lp=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CharStreams=void 0;var e=Ob(),r=Fb(),i=rn();(function(n){function o(a,u){(u===void 0||u.length===0)&&(u=i.IntStream.UNKNOWN_SOURCE_NAME);let l=e.CodePointBuffer.builder(a.length),h=new Uint16Array(a.length);for(let c=0;c<a.length;c++)h[c]=a.charCodeAt(c);return l.append(h),r.CodePointCharStream.fromBuffer(l.build(),u)}n.fromString=o;})(t.CharStreams||(t.CharStreams={}));}),Lb=te(t=>{var e=t&&t.__decorate||function(h,c,d,f){var m=arguments.length,g=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,d):f,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(h,c,d,f);else for(var x=h.length-1;x>=0;x--)(v=h[x])&&(g=(m<3?v(g):m>3?v(c,d,g):v(c,d))||g);return m>3&&g&&Object.defineProperty(c,d,g),g},r=t&&t.__param||function(h,c){return function(d,f){c(d,f,h);}};Object.defineProperty(t,"__esModule",{value:!0}),t.BufferedTokenStream=void 0;var i=ge("assert"),s=Ma(),n=mr(),o=ln(),a=fe(),u=At(),l=class{constructor(c){if(this.tokens=[],this.p=-1,this.fetchedEOF=!1,c==null)throw new Error("tokenSource cannot be null");this._tokenSource=c;}get tokenSource(){return this._tokenSource}set tokenSource(c){this._tokenSource=c,this.tokens.length=0,this.p=-1,this.fetchedEOF=!1;}get index(){return this.p}mark(){return 0}release(c){}seek(c){this.lazyInit(),this.p=this.adjustSeekIndex(c);}get size(){return this.tokens.length}consume(){let c;if(this.p>=0?this.fetchedEOF?c=this.p<this.tokens.length-1:c=this.p<this.tokens.length:c=!1,!c&&this.LA(1)===u.Token.EOF)throw new Error("cannot consume EOF");this.sync(this.p+1)&&(this.p=this.adjustSeekIndex(this.p+1));}sync(c){i(c>=0);let d=c-this.tokens.length+1;return d>0?this.fetch(d)>=d:!0}fetch(c){if(this.fetchedEOF)return 0;for(let d=0;d<c;d++){let f=this.tokenSource.nextToken();if(this.isWritableToken(f)&&(f.tokenIndex=this.tokens.length),this.tokens.push(f),f.type===u.Token.EOF)return this.fetchedEOF=!0,d+1}return c}get(c){if(c<0||c>=this.tokens.length)throw new RangeError("token index "+c+" out of range 0.."+(this.tokens.length-1));return this.tokens[c]}getRange(c,d){if(c<0||d<0)return [];this.lazyInit();let f=new Array;d>=this.tokens.length&&(d=this.tokens.length-1);for(let m=c;m<=d;m++){let g=this.tokens[m];if(g.type===u.Token.EOF)break;f.push(g);}return f}LA(c){let d=this.LT(c);return d?d.type:u.Token.INVALID_TYPE}tryLB(c){if(!(this.p-c<0))return this.tokens[this.p-c]}LT(c){let d=this.tryLT(c);if(d===void 0)throw new RangeError("requested lookback index out of range");return d}tryLT(c){if(this.lazyInit(),c===0)throw new RangeError("0 is not a valid lookahead index");if(c<0)return this.tryLB(-c);let d=this.p+c-1;return this.sync(d),d>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[d]}adjustSeekIndex(c){return c}lazyInit(){this.p===-1&&this.setup();}setup(){this.sync(0),this.p=this.adjustSeekIndex(0);}getTokens(c,d,f){if(this.lazyInit(),c===void 0)return i(d===void 0&&f===void 0),this.tokens;if(d===void 0&&(d=this.tokens.length-1),c<0||d>=this.tokens.length||d<0||c>=this.tokens.length)throw new RangeError("start "+c+" or stop "+d+" not in 0.."+(this.tokens.length-1));if(c>d)return [];if(f===void 0)return this.tokens.slice(c,d+1);typeof f=="number"&&(f=new Set().add(f));let m=f,g=this.tokens.slice(c,d+1);return g=g.filter(v=>m.has(v.type)),g}nextTokenOnChannel(c,d){if(this.sync(c),c>=this.size)return this.size-1;let f=this.tokens[c];for(;f.channel!==d;){if(f.type===u.Token.EOF)return c;c++,this.sync(c),f=this.tokens[c];}return c}previousTokenOnChannel(c,d){if(this.sync(c),c>=this.size)return this.size-1;for(;c>=0;){let f=this.tokens[c];if(f.type===u.Token.EOF||f.channel===d)return c;c--;}return c}getHiddenTokensToRight(c,d=-1){if(this.lazyInit(),c<0||c>=this.tokens.length)throw new RangeError(c+" not in 0.."+(this.tokens.length-1));let f=this.nextTokenOnChannel(c+1,o.Lexer.DEFAULT_TOKEN_CHANNEL),m,g=c+1;return f===-1?m=this.size-1:m=f,this.filterForChannel(g,m,d)}getHiddenTokensToLeft(c,d=-1){if(this.lazyInit(),c<0||c>=this.tokens.length)throw new RangeError(c+" not in 0.."+(this.tokens.length-1));if(c===0)return [];let f=this.previousTokenOnChannel(c-1,o.Lexer.DEFAULT_TOKEN_CHANNEL);if(f===c-1)return [];let m=f+1,g=c-1;return this.filterForChannel(m,g,d)}filterForChannel(c,d,f){let m=new Array;for(let g=c;g<=d;g++){let v=this.tokens[g];f===-1?v.channel!==o.Lexer.DEFAULT_TOKEN_CHANNEL&&m.push(v):v.channel===f&&m.push(v);}return m}get sourceName(){return this.tokenSource.sourceName}getText(c){c===void 0?c=n.Interval.of(0,this.size-1):c instanceof n.Interval||(c=c.sourceInterval);let d=c.a,f=c.b;if(d<0||f<0)return "";this.fill(),f>=this.tokens.length&&(f=this.tokens.length-1);let m="";for(let g=d;g<=f;g++){let v=this.tokens[g];if(v.type===u.Token.EOF)break;m+=v.text;}return m.toString()}getTextFromRange(c,d){return this.isToken(c)&&this.isToken(d)?this.getText(n.Interval.of(c.tokenIndex,d.tokenIndex)):""}fill(){this.lazyInit();let c=1e3;for(;;)if(this.fetch(c)<c)return}isWritableToken(c){return c instanceof s.CommonToken}isToken(c){return c instanceof s.CommonToken}};e([a.NotNull],l.prototype,"_tokenSource",void 0),e([a.Override],l.prototype,"tokenSource",null),e([a.Override],l.prototype,"index",null),e([a.Override],l.prototype,"mark",null),e([a.Override],l.prototype,"release",null),e([a.Override],l.prototype,"seek",null),e([a.Override],l.prototype,"size",null),e([a.Override],l.prototype,"consume",null),e([a.Override],l.prototype,"get",null),e([a.Override],l.prototype,"LA",null),e([a.NotNull,a.Override],l.prototype,"LT",null),e([a.Override],l.prototype,"sourceName",null),e([a.NotNull,a.Override],l.prototype,"getText",null),e([a.NotNull,a.Override],l.prototype,"getTextFromRange",null),l=e([r(0,a.NotNull)],l),t.BufferedTokenStream=l;}),Pp=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.CommonTokenStream=void 0;var i=Lb(),s=fe(),n=At(),o=class extends i.BufferedTokenStream{constructor(u,l=n.Token.DEFAULT_CHANNEL){super(u),this.channel=l;}adjustSeekIndex(u){return this.nextTokenOnChannel(u,this.channel)}tryLB(u){if(this.p-u<0)return;let l=this.p,h=1;for(;h<=u&&l>0;)l=this.previousTokenOnChannel(l-1,this.channel),h++;if(!(l<0))return this.tokens[l]}tryLT(u){if(this.lazyInit(),u===0)throw new RangeError("0 is not a valid lookahead index");if(u<0)return this.tryLB(-u);let l=this.p,h=1;for(;h<u;)this.sync(l+1)&&(l=this.nextTokenOnChannel(l+1,this.channel)),h++;return this.tokens[l]}getNumberOfOnChannelTokens(){let u=0;this.fill();for(let l of this.tokens)if(l.channel===this.channel&&u++,l.type===n.Token.EOF)break;return u}};e([s.Override],o.prototype,"adjustSeekIndex",null),e([s.Override],o.prototype,"tryLB",null),e([s.Override],o.prototype,"tryLT",null),o=e([r(0,s.NotNull)],o),t.CommonTokenStream=o;}),Pb=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ListTokenSource=void 0;var i=Ap(),s=fe(),n=At(),o=class{constructor(u,l){if(this.i=0,this._factory=i.CommonTokenFactory.DEFAULT,u==null)throw new Error("tokens cannot be null");this.tokens=u,this._sourceName=l;}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 u=this.tokens[this.tokens.length-1],l=u.text;if(l!=null){let h=l.lastIndexOf(`
71
71
  `);if(h>=0)return l.length-h-1}return u.charPositionInLine+u.stopIndex-u.startIndex+1}return 0}nextToken(){if(this.i>=this.tokens.length){if(this.eofToken==null){let l=-1;if(this.tokens.length>0){let c=this.tokens[this.tokens.length-1].stopIndex;c!==-1&&(l=c+1);}let h=Math.max(-1,l-1);this.eofToken=this._factory.create({source:this,stream:this.inputStream},n.Token.EOF,"EOF",n.Token.DEFAULT_CHANNEL,l,h,this.line,this.charPositionInLine);}return this.eofToken}let u=this.tokens[this.i];return this.i===this.tokens.length-1&&u.type===n.Token.EOF&&(this.eofToken=u),this.i++,u}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 u=this.tokens[this.tokens.length-1],l=u.line,h=u.text;if(h!=null)for(let c=0;c<h.length;c++)h.charAt(c)===`
72
- `&&l++;return l}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 u=this.inputStream;return u!=null?u.sourceName:"List"}set tokenFactory(u){this._factory=u;}get tokenFactory(){return this._factory}};e([s.Override],o.prototype,"charPositionInLine",null),e([s.Override],o.prototype,"nextToken",null),e([s.Override],o.prototype,"line",null),e([s.Override],o.prototype,"inputStream",null),e([s.Override],o.prototype,"sourceName",null),e([s.Override,s.NotNull,r(0,s.NotNull)],o.prototype,"tokenFactory",null),o=e([r(0,s.NotNull)],o),t.ListTokenSource=o;}),Y7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MultiMap=void 0;var e=class extends Map{constructor(){super();}map(r,i){let s=super.get(r);s||(s=[],super.set(r,s)),s.push(i);}getPairs(){let r=[];return this.forEach((i,s)=>{i.forEach(n=>{r.push([s,n]);});}),r}};t.MultiMap=e;}),Ib=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ParseCancellationException=void 0;var e=class extends Error{constructor(r){super(r.message),this.cause=r,this.stack=r.stack;}getCause(){return this.cause}};t.ParseCancellationException=e;}),kb=re(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.InterpreterRuleContext=void 0;var r=fe(),i=$r(),s=class extends i.ParserRuleContext{constructor(n,o,a){a!==void 0?super(o,a):super(),this._ruleIndex=n;}get ruleIndex(){return this._ruleIndex}};e([r.Override],s.prototype,"ruleIndex",null),t.InterpreterRuleContext=s;}),Mb=re(t=>{var e=t&&t.__decorate||function(_,E,b,w){var D=arguments.length,N=D<3?E:w===null?w=Object.getOwnPropertyDescriptor(E,b):w,F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(_,E,b,w);else for(var V=_.length-1;V>=0;V--)(F=_[V])&&(N=(D<3?F(N):D>3?F(E,b,N):F(E,b))||N);return D>3&&N&&Object.defineProperty(E,b,N),N},r=t&&t.__param||function(_,E){return function(b,w){E(b,w,_);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserInterpreter=void 0;var i=Ci(),s=Qt(),n=an(),o=sc(),a=oc(),u=kb(),l=Db(),h=fe(),c=fe(),d=Va(),f=Ha(),m=nn(),g=Sp(),v=At(),x=class Q0 extends d.Parser{constructor(E,b,w,D,N){if(super(E instanceof Q0?E.inputStream:N),this._parentContextStack=[],this.overrideDecision=-1,this.overrideDecisionInputIndex=-1,this.overrideDecisionAlt=-1,this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0,E instanceof Q0){let F=E;this._grammarFileName=F._grammarFileName,this._atn=F._atn,this.pushRecursionContextStates=F.pushRecursionContextStates,this._ruleNames=F._ruleNames,this._vocabulary=F._vocabulary,this.interpreter=new f.ParserATNSimulator(this._atn,this);}else {b=b,w=w,D=D,this._grammarFileName=E,this._atn=D,this._ruleNames=w.slice(0),this._vocabulary=b,this.pushRecursionContextStates=new n.BitSet(D.states.length);for(let F of D.states)F instanceof g.StarLoopEntryState&&F.precedenceRuleDecision&&this.pushRecursionContextStates.set(F.stateNumber);this.interpreter=new f.ParserATNSimulator(D,this);}}reset(E){E===void 0?super.reset():super.reset(E),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(E){let b=this._atn.ruleToStartState[E];for(this._rootContext=this.createInterpreterRuleContext(void 0,i.ATNState.INVALID_STATE_NUMBER,E),b.isPrecedenceRule?this.enterRecursionRule(this._rootContext,b.stateNumber,E,0):this.enterRule(this._rootContext,b.stateNumber,E);;){let w=this.atnState;switch(w.stateType){case s.ATNStateType.RULE_STOP:if(this._ctx.isEmpty)if(b.isPrecedenceRule){let D=this._ctx,N=this._parentContextStack.pop();return this.unrollRecursionContexts(N[0]),D}else return this.exitRule(),this._rootContext;this.visitRuleStopState(w);break;default:try{this.visitState(w);}catch(D){if(D instanceof m.RecognitionException)this.state=this._atn.ruleToStopState[w.ruleIndex].stateNumber,this.context.exception=D,this.errorHandler.reportError(this,D),this.recover(D);else throw D}break}}}enterRecursionRule(E,b,w,D){this._parentContextStack.push([this._ctx,E.invokingState]),super.enterRecursionRule(E,b,w,D);}get atnState(){return this._atn.states[this.state]}visitState(E){let b=1;E.numberOfTransitions>1&&(b=this.visitDecisionState(E));let w=E.transition(b-1);switch(w.serializationType){case 1:if(this.pushRecursionContextStates.get(E.stateNumber)&&!(w.target instanceof l.LoopEndState)){let te=this._parentContextStack[this._parentContextStack.length-1],ae=this.createInterpreterRuleContext(te[0],te[1],this._ctx.ruleIndex);this.pushNewRecursionContext(ae,this._atn.ruleToStartState[E.ruleIndex].stateNumber,this._ctx.ruleIndex);}break;case 5:this.match(w._label);break;case 2:case 7:case 8:w.matches(this._input.LA(1),v.Token.MIN_USER_TOKEN_TYPE,65535)||this.recoverInline(),this.matchWildcard();break;case 9:this.matchWildcard();break;case 3:let D=w.target,N=D.ruleIndex,F=this.createInterpreterRuleContext(this._ctx,E.stateNumber,N);D.isPrecedenceRule?this.enterRecursionRule(F,D.stateNumber,N,w.precedence):this.enterRule(F,w.target.stateNumber,N);break;case 4:let V=w;if(!this.sempred(this._ctx,V.ruleIndex,V.predIndex))throw new o.FailedPredicateException(this);break;case 6:let Z=w;this.action(this._ctx,Z.ruleIndex,Z.actionIndex);break;case 10:if(!this.precpred(this._ctx,w.precedence)){let te=w.precedence;throw new o.FailedPredicateException(this,`precpred(_ctx, ${te})`)}break;default:throw new Error("UnsupportedOperationException: Unrecognized ATN transition type.")}this.state=w.target.stateNumber;}visitDecisionState(E){let b;this.errorHandler.sync(this);let w=E.decision;return w===this.overrideDecision&&this._input.index===this.overrideDecisionInputIndex&&!this.overrideDecisionReached?(b=this.overrideDecisionAlt,this.overrideDecisionReached=!0):b=this.interpreter.adaptivePredict(this._input,w,this._ctx),b}createInterpreterRuleContext(E,b,w){return new u.InterpreterRuleContext(w,E,b)}visitRuleStopState(E){if(this._atn.ruleToStartState[E.ruleIndex].isPrecedenceRule){let D=this._parentContextStack.pop();this.unrollRecursionContexts(D[0]),this.state=D[1];}else this.exitRule();let w=this._atn.states[this.state].transition(0);this.state=w.followState.stateNumber;}addDecisionOverride(E,b,w){this.overrideDecision=E,this.overrideDecisionInputIndex=b,this.overrideDecisionAlt=w;}get overrideDecisionRoot(){return this._overrideDecisionRoot}recover(E){let b=this._input.index;if(this.errorHandler.recover(this,E),this._input.index===b){let w=E.getOffendingToken();if(!w)throw new Error("Expected exception to have an offending token");let D=w.tokenSource,N=D!==void 0?D.inputStream:void 0,F={source:D,stream:N};if(E instanceof a.InputMismatchException){let V=E.expectedTokens;if(V===void 0)throw new Error("Expected the exception to provide expected tokens");let Z=v.Token.INVALID_TYPE;V.isNil||(Z=V.minElement);let te=this.tokenFactory.create(F,Z,w.text,v.Token.DEFAULT_CHANNEL,-1,-1,w.line,w.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,te));}else {w.tokenSource;let Z=this.tokenFactory.create(F,v.Token.INVALID_TYPE,w.text,v.Token.DEFAULT_CHANNEL,-1,-1,w.line,w.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,Z));}}}recoverInline(){return this._errHandler.recoverInline(this)}get rootContext(){return this._rootContext}};e([h.NotNull],x.prototype,"_vocabulary",void 0),e([c.Override],x.prototype,"reset",null),e([c.Override],x.prototype,"atn",null),e([c.Override],x.prototype,"vocabulary",null),e([c.Override],x.prototype,"ruleNames",null),e([c.Override],x.prototype,"grammarFileName",null),e([c.Override],x.prototype,"enterRecursionRule",null),x=e([r(1,h.NotNull)],x),t.ParserInterpreter=x;}),J7=re(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h},r=t&&t.__param||function(n,o){return function(a,u){o(a,u,n);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParseTreeMatch=void 0;var i=fe(),s=class{constructor(o,a,u,l){if(!o)throw new Error("tree cannot be null");if(!a)throw new Error("pattern cannot be null");if(!u)throw new Error("labels cannot be null");this._tree=o,this._pattern=a,this._labels=u,this._mismatchedNode=l;}get(o){let a=this._labels.get(o);if(!(!a||a.length===0))return a[a.length-1]}getAll(o){let a=this._labels.get(o);return a||[]}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`}};e([i.NotNull,r(0,i.NotNull)],s.prototype,"getAll",null),e([i.NotNull],s.prototype,"labels",null),e([i.NotNull],s.prototype,"pattern",null),e([i.NotNull],s.prototype,"tree",null),e([i.Override],s.prototype,"toString",null),s=e([r(0,i.NotNull),r(1,i.NotNull),r(2,i.NotNull)],s),t.ParseTreeMatch=s;}),Z7=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XPathLexer=void 0;var e=pc(),r=ln(),i=hc(),s=un(),n=ei(),o=class extends r.Lexer{constructor(a){super(a),this._interp=new i.LexerATNSimulator(o._ATN,this);}get vocabulary(){return o.VOCABULARY}get grammarFileName(){return "XPathLexer.g4"}get ruleNames(){return o.ruleNames}get serializedATN(){return o._serializedATN}get channelNames(){return o.channelNames}get modeNames(){return o.modeNames}action(a,u,l){switch(u){case 4:this.ID_action(a,l);break}}ID_action(a,u){switch(u){case 0:let l=this.text;l.charAt(0)===l.charAt(0).toUpperCase()?this.type=o.TOKEN_REF:this.type=o.RULE_REF;break}}static get _ATN(){return o.__ATN||(o.__ATN=new e.ATNDeserializer().deserialize(n.toCharArray(o._serializedATN))),o.__ATN}};t.XPathLexer=o,o.TOKEN_REF=1,o.RULE_REF=2,o.ANYWHERE=3,o.ROOT=4,o.WILDCARD=5,o.BANG=6,o.ID=7,o.STRING=8,o.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],o.modeNames=["DEFAULT_MODE"],o.ruleNames=["ANYWHERE","ROOT","WILDCARD","BANG","ID","NameChar","NameStartChar","STRING"],o._LITERAL_NAMES=[void 0,void 0,void 0,"'//'","'/'","'*'","'!'"],o._SYMBOLIC_NAMES=[void 0,"TOKEN_REF","RULE_REF","ANYWHERE","ROOT","WILDCARD","BANG","ID","STRING"],o.VOCABULARY=new s.VocabularyImpl(o._LITERAL_NAMES,o._SYMBOLIC_NAMES,[]),o._serializedATNSegments=2,o._serializedATNSegment0=`\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241
72
+ `&&l++;return l}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 u=this.inputStream;return u!=null?u.sourceName:"List"}set tokenFactory(u){this._factory=u;}get tokenFactory(){return this._factory}};e([s.Override],o.prototype,"charPositionInLine",null),e([s.Override],o.prototype,"nextToken",null),e([s.Override],o.prototype,"line",null),e([s.Override],o.prototype,"inputStream",null),e([s.Override],o.prototype,"sourceName",null),e([s.Override,s.NotNull,r(0,s.NotNull)],o.prototype,"tokenFactory",null),o=e([r(0,s.NotNull)],o),t.ListTokenSource=o;}),Y7=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MultiMap=void 0;var e=class extends Map{constructor(){super();}map(r,i){let s=super.get(r);s||(s=[],super.set(r,s)),s.push(i);}getPairs(){let r=[];return this.forEach((i,s)=>{i.forEach(n=>{r.push([s,n]);});}),r}};t.MultiMap=e;}),Ib=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ParseCancellationException=void 0;var e=class extends Error{constructor(r){super(r.message),this.cause=r,this.stack=r.stack;}getCause(){return this.cause}};t.ParseCancellationException=e;}),kb=te(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.InterpreterRuleContext=void 0;var r=fe(),i=$r(),s=class extends i.ParserRuleContext{constructor(n,o,a){a!==void 0?super(o,a):super(),this._ruleIndex=n;}get ruleIndex(){return this._ruleIndex}};e([r.Override],s.prototype,"ruleIndex",null),t.InterpreterRuleContext=s;}),Mb=te(t=>{var e=t&&t.__decorate||function(_,E,b,w){var D=arguments.length,N=D<3?E:w===null?w=Object.getOwnPropertyDescriptor(E,b):w,F;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")N=Reflect.decorate(_,E,b,w);else for(var U=_.length-1;U>=0;U--)(F=_[U])&&(N=(D<3?F(N):D>3?F(E,b,N):F(E,b))||N);return D>3&&N&&Object.defineProperty(E,b,N),N},r=t&&t.__param||function(_,E){return function(b,w){E(b,w,_);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParserInterpreter=void 0;var i=Ci(),s=Qt(),n=an(),o=sc(),a=oc(),u=kb(),l=Db(),h=fe(),c=fe(),d=Va(),f=Ha(),m=nn(),g=Sp(),v=At(),x=class Q0 extends d.Parser{constructor(E,b,w,D,N){if(super(E instanceof Q0?E.inputStream:N),this._parentContextStack=[],this.overrideDecision=-1,this.overrideDecisionInputIndex=-1,this.overrideDecisionAlt=-1,this.overrideDecisionReached=!1,this._overrideDecisionRoot=void 0,E instanceof Q0){let F=E;this._grammarFileName=F._grammarFileName,this._atn=F._atn,this.pushRecursionContextStates=F.pushRecursionContextStates,this._ruleNames=F._ruleNames,this._vocabulary=F._vocabulary,this.interpreter=new f.ParserATNSimulator(this._atn,this);}else {b=b,w=w,D=D,this._grammarFileName=E,this._atn=D,this._ruleNames=w.slice(0),this._vocabulary=b,this.pushRecursionContextStates=new n.BitSet(D.states.length);for(let F of D.states)F instanceof g.StarLoopEntryState&&F.precedenceRuleDecision&&this.pushRecursionContextStates.set(F.stateNumber);this.interpreter=new f.ParserATNSimulator(D,this);}}reset(E){E===void 0?super.reset():super.reset(E),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(E){let b=this._atn.ruleToStartState[E];for(this._rootContext=this.createInterpreterRuleContext(void 0,i.ATNState.INVALID_STATE_NUMBER,E),b.isPrecedenceRule?this.enterRecursionRule(this._rootContext,b.stateNumber,E,0):this.enterRule(this._rootContext,b.stateNumber,E);;){let w=this.atnState;switch(w.stateType){case s.ATNStateType.RULE_STOP:if(this._ctx.isEmpty)if(b.isPrecedenceRule){let D=this._ctx,N=this._parentContextStack.pop();return this.unrollRecursionContexts(N[0]),D}else return this.exitRule(),this._rootContext;this.visitRuleStopState(w);break;default:try{this.visitState(w);}catch(D){if(D instanceof m.RecognitionException)this.state=this._atn.ruleToStopState[w.ruleIndex].stateNumber,this.context.exception=D,this.errorHandler.reportError(this,D),this.recover(D);else throw D}break}}}enterRecursionRule(E,b,w,D){this._parentContextStack.push([this._ctx,E.invokingState]),super.enterRecursionRule(E,b,w,D);}get atnState(){return this._atn.states[this.state]}visitState(E){let b=1;E.numberOfTransitions>1&&(b=this.visitDecisionState(E));let w=E.transition(b-1);switch(w.serializationType){case 1:if(this.pushRecursionContextStates.get(E.stateNumber)&&!(w.target instanceof l.LoopEndState)){let re=this._parentContextStack[this._parentContextStack.length-1],ae=this.createInterpreterRuleContext(re[0],re[1],this._ctx.ruleIndex);this.pushNewRecursionContext(ae,this._atn.ruleToStartState[E.ruleIndex].stateNumber,this._ctx.ruleIndex);}break;case 5:this.match(w._label);break;case 2:case 7:case 8:w.matches(this._input.LA(1),v.Token.MIN_USER_TOKEN_TYPE,65535)||this.recoverInline(),this.matchWildcard();break;case 9:this.matchWildcard();break;case 3:let D=w.target,N=D.ruleIndex,F=this.createInterpreterRuleContext(this._ctx,E.stateNumber,N);D.isPrecedenceRule?this.enterRecursionRule(F,D.stateNumber,N,w.precedence):this.enterRule(F,w.target.stateNumber,N);break;case 4:let U=w;if(!this.sempred(this._ctx,U.ruleIndex,U.predIndex))throw new o.FailedPredicateException(this);break;case 6:let Z=w;this.action(this._ctx,Z.ruleIndex,Z.actionIndex);break;case 10:if(!this.precpred(this._ctx,w.precedence)){let re=w.precedence;throw new o.FailedPredicateException(this,`precpred(_ctx, ${re})`)}break;default:throw new Error("UnsupportedOperationException: Unrecognized ATN transition type.")}this.state=w.target.stateNumber;}visitDecisionState(E){let b;this.errorHandler.sync(this);let w=E.decision;return w===this.overrideDecision&&this._input.index===this.overrideDecisionInputIndex&&!this.overrideDecisionReached?(b=this.overrideDecisionAlt,this.overrideDecisionReached=!0):b=this.interpreter.adaptivePredict(this._input,w,this._ctx),b}createInterpreterRuleContext(E,b,w){return new u.InterpreterRuleContext(w,E,b)}visitRuleStopState(E){if(this._atn.ruleToStartState[E.ruleIndex].isPrecedenceRule){let D=this._parentContextStack.pop();this.unrollRecursionContexts(D[0]),this.state=D[1];}else this.exitRule();let w=this._atn.states[this.state].transition(0);this.state=w.followState.stateNumber;}addDecisionOverride(E,b,w){this.overrideDecision=E,this.overrideDecisionInputIndex=b,this.overrideDecisionAlt=w;}get overrideDecisionRoot(){return this._overrideDecisionRoot}recover(E){let b=this._input.index;if(this.errorHandler.recover(this,E),this._input.index===b){let w=E.getOffendingToken();if(!w)throw new Error("Expected exception to have an offending token");let D=w.tokenSource,N=D!==void 0?D.inputStream:void 0,F={source:D,stream:N};if(E instanceof a.InputMismatchException){let U=E.expectedTokens;if(U===void 0)throw new Error("Expected the exception to provide expected tokens");let Z=v.Token.INVALID_TYPE;U.isNil||(Z=U.minElement);let re=this.tokenFactory.create(F,Z,w.text,v.Token.DEFAULT_CHANNEL,-1,-1,w.line,w.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,re));}else {w.tokenSource;let Z=this.tokenFactory.create(F,v.Token.INVALID_TYPE,w.text,v.Token.DEFAULT_CHANNEL,-1,-1,w.line,w.charPositionInLine);this._ctx.addErrorNode(this.createErrorNode(this._ctx,Z));}}}recoverInline(){return this._errHandler.recoverInline(this)}get rootContext(){return this._rootContext}};e([h.NotNull],x.prototype,"_vocabulary",void 0),e([c.Override],x.prototype,"reset",null),e([c.Override],x.prototype,"atn",null),e([c.Override],x.prototype,"vocabulary",null),e([c.Override],x.prototype,"ruleNames",null),e([c.Override],x.prototype,"grammarFileName",null),e([c.Override],x.prototype,"enterRecursionRule",null),x=e([r(1,h.NotNull)],x),t.ParserInterpreter=x;}),J7=te(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h},r=t&&t.__param||function(n,o){return function(a,u){o(a,u,n);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParseTreeMatch=void 0;var i=fe(),s=class{constructor(o,a,u,l){if(!o)throw new Error("tree cannot be null");if(!a)throw new Error("pattern cannot be null");if(!u)throw new Error("labels cannot be null");this._tree=o,this._pattern=a,this._labels=u,this._mismatchedNode=l;}get(o){let a=this._labels.get(o);if(!(!a||a.length===0))return a[a.length-1]}getAll(o){let a=this._labels.get(o);return a||[]}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`}};e([i.NotNull,r(0,i.NotNull)],s.prototype,"getAll",null),e([i.NotNull],s.prototype,"labels",null),e([i.NotNull],s.prototype,"pattern",null),e([i.NotNull],s.prototype,"tree",null),e([i.Override],s.prototype,"toString",null),s=e([r(0,i.NotNull),r(1,i.NotNull),r(2,i.NotNull)],s),t.ParseTreeMatch=s;}),Z7=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XPathLexer=void 0;var e=pc(),r=ln(),i=hc(),s=un(),n=ei(),o=class extends r.Lexer{constructor(a){super(a),this._interp=new i.LexerATNSimulator(o._ATN,this);}get vocabulary(){return o.VOCABULARY}get grammarFileName(){return "XPathLexer.g4"}get ruleNames(){return o.ruleNames}get serializedATN(){return o._serializedATN}get channelNames(){return o.channelNames}get modeNames(){return o.modeNames}action(a,u,l){switch(u){case 4:this.ID_action(a,l);break}}ID_action(a,u){switch(u){case 0:let l=this.text;l.charAt(0)===l.charAt(0).toUpperCase()?this.type=o.TOKEN_REF:this.type=o.RULE_REF;break}}static get _ATN(){return o.__ATN||(o.__ATN=new e.ATNDeserializer().deserialize(n.toCharArray(o._serializedATN))),o.__ATN}};t.XPathLexer=o,o.TOKEN_REF=1,o.RULE_REF=2,o.ANYWHERE=3,o.ROOT=4,o.WILDCARD=5,o.BANG=6,o.ID=7,o.STRING=8,o.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"],o.modeNames=["DEFAULT_MODE"],o.ruleNames=["ANYWHERE","ROOT","WILDCARD","BANG","ID","NameChar","NameStartChar","STRING"],o._LITERAL_NAMES=[void 0,void 0,void 0,"'//'","'/'","'*'","'!'"],o._SYMBOLIC_NAMES=[void 0,"TOKEN_REF","RULE_REF","ANYWHERE","ROOT","WILDCARD","BANG","ID","STRING"],o.VOCABULARY=new s.VocabularyImpl(o._LITERAL_NAMES,o._SYMBOLIC_NAMES,[]),o._serializedATNSegments=2,o._serializedATNSegment0=`\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241
73
73
  2\b     \x07 \x07\b \b \x07
74
74
  \f"\v\x07\x07\b\b  \x07 ,
75
75
  \f  /\v   -
76
76
  \x07\x07 \b\v \r
77
77
  \u02B6
78
78
  2;C\\aac|\x81\xA1\xAC\xAC\xAF\xAF\xB7\xB7\xBC\xBC\xC2\xD8\xDA\xF8\xFA\u02C3\u02C8\u02D3\u02E2\u02E6\u02EE\u02EE\u02F0\u02F0\u0302\u0376\u0378\u0379\u037C\u037F\u0381\u0381\u0388\u0388\u038A\u038C\u038E\u038E\u0390\u03A3\u03A5\u03F7\u03F9\u0483\u0485\u0489\u048C\u0531\u0533\u0558\u055B\u055B\u0563\u0589\u0593\u05BF\u05C1\u05C1\u05C3\u05C4\u05C6\u05C7\u05C9\u05C9\u05D2\u05EC\u05F2\u05F4\u0602\u0607\u0612\u061C\u061E\u061E\u0622\u066B\u0670\u06D5\u06D7\u06DF\u06E1\u06EA\u06EC\u06FE\u0701\u0701\u0711\u074C\u074F\u07B3\u07C2\u07F7\u07FC\u07FC\u0802\u082F\u0842\u085D\u08A2\u08B6\u08B8\u08BF\u08D6\u0965\u0968\u0971\u0973\u0985\u0987\u098E\u0991\u0992\u0995\u09AA\u09AC\u09B2\u09B4\u09B4\u09B8\u09BB\u09BE\u09C6\u09C9\u09CA\u09CD\u09D0\u09D9\u09D9\u09DE\u09DF\u09E1\u09E5\u09E8\u09F3\u0A03\u0A05\u0A07\u0A0C\u0A11\u0A12\u0A15\u0A2A\u0A2C\u0A32\u0A34\u0A35\u0A37\u0A38\u0A3A\u0A3B\u0A3E\u0A3E\u0A40\u0A44\u0A49\u0A4A\u0A4D\u0A4F\u0A53\u0A53\u0A5B\u0A5E\u0A60\u0A60\u0A68\u0A77\u0A83\u0A85\u0A87\u0A8F\u0A91\u0A93\u0A95\u0AAA\u0AAC\u0AB2\u0AB4\u0AB5\u0AB7\u0ABB\u0ABE\u0AC7\u0AC9\u0ACB\u0ACD\u0ACF\u0AD2\u0AD2\u0AE2\u0AE5\u0AE8\u0AF1\u0AFB\u0AFB\u0B03\u0B05\u0B07\u0B0E\u0B11\u0B12\u0B15\u0B2A\u0B2C\u0B32\u0B34\u0B35\u0B37\u0B3B\u0B3E\u0B46\u0B49\u0B4A\u0B4D\u0B4F\u0B58\u0B59\u0B5E\u0B5F\u0B61\u0B65\u0B68\u0B71\u0B73\u0B73\u0B84\u0B85\u0B87\u0B8C\u0B90\u0B92\u0B94\u0B97\u0B9B\u0B9C\u0B9E\u0B9E\u0BA0\u0BA1\u0BA5\u0BA6\u0BAA\u0BAC\u0BB0\u0BBB\u0BC0\u0BC4\u0BC8\u0BCA\u0BCC\u0BCF\u0BD2\u0BD2\u0BD9\u0BD9\u0BE8\u0BF1\u0C02\u0C05\u0C07\u0C0E\u0C10\u0C12\u0C14\u0C2A\u0C2C\u0C3B\u0C3F\u0C46\u0C48\u0C4A\u0C4C\u0C4F\u0C57\u0C58\u0C5A\u0C5C\u0C62\u0C65\u0C68\u0C71\u0C82\u0C85\u0C87\u0C8E\u0C90\u0C92\u0C94\u0CAA\u0CAC\u0CB5\u0CB7\u0CBB\u0CBE\u0CC6\u0CC8\u0CCA\u0CCC\u0CCF\u0CD7\u0CD8\u0CE0\u0CE0\u0CE2\u0CE5\u0CE8\u0CF1\u0CF3\u0CF4\u0D03\u0D05\u0D07\u0D0E\u0D10\u0D12\u0D14\u0D3C\u0D3F\u0D46\u0D48\u0D4A\u0D4C\u0D50\u0D56\u0D59\u0D61\u0D65\u0D68\u0D71\u0D7C\u0D81\u0D84\u0D85\u0D87\u0D98\u0D9C\u0DB3\u0DB5\u0DBD\u0DBF\u0DBF\u0DC2\u0DC8\u0DCC\u0DCC\u0DD1\u0DD6\u0DD8\u0DD8\u0DDA\u0DE1\u0DE8\u0DF1\u0DF4\u0DF5\u0E03\u0E3C\u0E42\u0E50\u0E52\u0E5B\u0E83\u0E84\u0E86\u0E86\u0E89\u0E8A\u0E8C\u0E8C\u0E8F\u0E8F\u0E96\u0E99\u0E9B\u0EA1\u0EA3\u0EA5\u0EA7\u0EA7\u0EA9\u0EA9\u0EAC\u0EAD\u0EAF\u0EBB\u0EBD\u0EBF\u0EC2\u0EC6\u0EC8\u0EC8\u0ECA\u0ECF\u0ED2\u0EDB\u0EDE\u0EE1\u0F02\u0F02\u0F1A\u0F1B\u0F22\u0F2B\u0F37\u0F37\u0F39\u0F39\u0F3B\u0F3B\u0F40\u0F49\u0F4B\u0F6E\u0F73\u0F86\u0F88\u0F99\u0F9B\u0FBE\u0FC8\u0FC8\u1002\u104B\u1052\u109F\u10A2\u10C7\u10C9\u10C9\u10CF\u10CF\u10D2\u10FC\u10FE\u124A\u124C\u124F\u1252\u1258\u125A\u125A\u125C\u125F\u1262\u128A\u128C\u128F\u1292\u12B2\u12B4\u12B7\u12BA\u12C0\u12C2\u12C2\u12C4\u12C7\u12CA\u12D8\u12DA\u1312\u1314\u1317\u131A\u135C\u135F\u1361\u1382\u1391\u13A2\u13F7\u13FA\u13FF\u1403\u166E\u1671\u1681\u1683\u169C\u16A2\u16EC\u16F0\u16FA\u1702\u170E\u1710\u1716\u1722\u1736\u1742\u1755\u1762\u176E\u1770\u1772\u1774\u1775\u1782\u17D5\u17D9\u17D9\u17DE\u17DF\u17E2\u17EB\u180D\u1810\u1812\u181B\u1822\u1879\u1882\u18AC\u18B2\u18F7\u1902\u1920\u1922\u192D\u1932\u193D\u1948\u196F\u1972\u1976\u1982\u19AD\u19B2\u19CB\u19D2\u19DB\u1A02\u1A1D\u1A22\u1A60\u1A62\u1A7E\u1A81\u1A8B\u1A92\u1A9B\u1AA9\u1AA9\u1AB2\u1ABF\u1B02\u1B4D\u1B52\u1B5B\u1B6D\u1B75\u1B82\u1BF5\u1C02\u1C39\u1C42\u1C4B\u1C4F\u1C7F\u1C82\u1C8A\u1CD2\u1CD4\u1CD6\u1CF8\u1CFA\u1CFB\u1D02\u1DF7\u1DFD\u1F17\u1F1A\u1F1F\u1F22\u1F47\u1F4A\u1F4F\u1F52\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F5F\u1F61\u1F7F\u1F82\u1FB6\u1FB8\u1FBE\u1FC0\u1FC0\u1FC4\u1FC6\u1FC8\u1FCE\u1FD2\u1FD5\u1FD8\u1FDD\u1FE2\u1FEE\u1FF4\u1FF6\u1FF8\u1FFE\u200D\u2011\u202C\u2030\u2041\u2042\u2056\u2056\u2062\u2066\u2068\u2071\u2073\u2073\u2081\u2081\u2092\u209E\u20D2\u20DE\u20E3\u20E3\u20E7\u20F2\u2104\u2104\u2109\u2109\u210C\u2115\u2117\u2117\u211B\u211F\u2126\u2126\u2128\u2128\u212A\u212A\u212C\u212F\u2131\u213B\u213E\u2141\u2147\u214B\u2150\u2150\u2162\u218A\u2C02\u2C30\u2C32\u2C60\u2C62\u2CE6\u2CED\u2CF5\u2D02\u2D27\u2D29\u2D29\u2D2F\u2D2F\u2D32\u2D69\u2D71\u2D71\u2D81\u2D98\u2DA2\u2DA8\u2DAA\u2DB0\u2DB2\u2DB8\u2DBA\u2DC0\u2DC2\u2DC8\u2DCA\u2DD0\u2DD2\u2DD8\u2DDA\u2DE0\u2DE2\u2E01\u2E31\u2E31\u3007\u3009\u3023\u3031\u3033\u3037\u303A\u303E\u3043\u3098\u309B\u309C\u309F\u30A1\u30A3\u30FC\u30FE\u3101\u3107\u312F\u3133\u3190\u31A2\u31BC\u31F2\u3201\u3402\u4DB7\u4E02\u9FD7\uA002\uA48E\uA4D2\uA4FF\uA502\uA60E\uA612\uA62D\uA642\uA671\uA676\uA67F\uA681\uA6F3\uA719\uA721\uA724\uA78A\uA78D\uA7B0\uA7B2\uA7B9\uA7F9\uA829\uA842\uA875\uA882\uA8C7\uA8D2\uA8DB\uA8E2\uA8F9\uA8FD\uA8FD\uA8FF\uA8FF\uA902\uA92F\uA932\uA955\uA962\uA97E\uA982\uA9C2\uA9D1\uA9DB\uA9E2\uAA00\uAA02\uAA38\uAA42\uAA4F\uAA52\uAA5B\uAA62\uAA78\uAA7C\uAAC4\uAADD\uAADF\uAAE2\uAAF1\uAAF4\uAAF8\uAB03\uAB08\uAB0B\uAB10\uAB13\uAB18\uAB22\uAB28\uAB2A\uAB30\uAB32\uAB5C\uAB5E\uAB67\uAB72\uABEC\uABEE\uABEF\uABF2\uABFB\uAC02\uD7A5\uD7B2\uD7C8\uD7CD\uD7FD\uF902\uFA6F\uFA72\uFADB\uFB02\uFB08\uFB15\uFB19\uFB1F\uFB2A\uFB2C\uFB38\uFB3A\uFB3E\uFB40\uFB40\uFB42\uFB43\uFB45\uFB46\uFB48\uFBB3\uFBD5\uFD3F\uFD52\uFD91\uFD94\uFDC9\uFDF2\uFDFD\uFE02\uFE11\uFE22\uFE31\uFE35\uFE36\uFE4F\uFE51\uFE72\uFE76\uFE78\uFEFE\uFF01\uFF01\uFF12\uFF1B\uFF23\uFF3C\uFF41\uFF41\uFF43\uFF5C\uFF68\uFFC0\uFFC4\uFFC9\uFFCC\uFFD1\uFFD4\uFFD9\uFFDC\uFFDE\uFFFB\uFFFD\r(*<>?AOR_\x82\xFC\u0142\u0176\u01FF\u01FF\u0282\u029E\u02A2\u02D2\u02E2\u02E2\u0302\u0321\u0332\u034C\u0352\u037C\u0382\u039F\u03A2\u03C5\u03CA\u03D1\u03D3\u03D7\u0402\u049F\u04A2\u04AB\u04B2\u04D5\u04DA\u04FD\u0502\u0529\u0532\u0565\u0602\u0738\u0742\u0757\u0762\u0769\u0802\u0807\u080A\u080A\u080C\u0837\u0839\u083A\u083E\u083E\u0841\u0857\u0862\u0878\u0882\u08A0\u08E2\u08F4\u08F6\u08F7\u0902\u0917\u0922\u093B\u0982\u09B9\u09C0\u09C1\u0A02\u0A05\u0A07\u0A08\u0A0E\u0A15\u0A17\u0A19\u0A1B\u0A35\u0A3A\u0A3C\u0A41\u0A41\u0A62\u0A7E\u0A82\u0A9E\u0AC2\u0AC9\u0ACB\u0AE8\u0B02\u0B37\u0B42\u0B57\u0B62\u0B74\u0B82\u0B93\u0C02\u0C4A\u0C82\u0CB4\u0CC2\u0CF4\u1002\u1048\u1068\u1071\u1081\u10BC\u10BF\u10BF\u10D2\u10EA\u10F2\u10FB\u1102\u1136\u1138\u1141\u1152\u1175\u1178\u1178\u1182\u11C6\u11CC\u11CE\u11D2\u11DC\u11DE\u11DE\u1202\u1213\u1215\u1239\u1240\u1240\u1282\u1288\u128A\u128A\u128C\u128F\u1291\u129F\u12A1\u12AA\u12B2\u12EC\u12F2\u12FB\u1302\u1305\u1307\u130E\u1311\u1312\u1315\u132A\u132C\u1332\u1334\u1335\u1337\u133B\u133E\u1346\u1349\u134A\u134D\u134F\u1352\u1352\u1359\u1359\u135F\u1365\u1368\u136E\u1372\u1376\u1402\u144C\u1452\u145B\u1482\u14C7\u14C9\u14C9\u14D2\u14DB\u1582\u15B7\u15BA\u15C2\u15DA\u15DF\u1602\u1642\u1646\u1646\u1652\u165B\u1682\u16B9\u16C2\u16CB\u1702\u171B\u171F\u172D\u1732\u173B\u18A2\u18EB\u1901\u1901\u1AC2\u1AFA\u1C02\u1C0A\u1C0C\u1C38\u1C3A\u1C42\u1C52\u1C5B\u1C74\u1C91\u1C94\u1CA9\u1CAB\u1CB8\u2002\u239B\u2402\u2470\u2482\u2545\u3002\u3430\u4402\u4648\u6802\u6A3A\u6A42\u6A60\u6A62\u6A6B\u6AD2\u6AEF\u6AF2\u6AF6\u6B02\u6B38\u6B42\u6B45\u6B52\u6B5B\u6B65\u6B79\u6B7F\u6B91\u6F02\u6F46\u6F52\u6F80\u6F91\u6FA1\u6FE2\u6FE2\u7002\u87EE\u8802\u8AF4\uB002\uB003\uBC02\uBC6C\uBC72\uBC7E\uBC82\uBC8A\uBC92\uBC9B\uBC9F\uBCA0\uBCA2\uBCA5\uD167\uD16B\uD16F\uD184\uD187\uD18D\uD1AC\uD1AF\uD244\uD246\uD402\uD456\uD458\uD49E\uD4A0\uD4A1\uD4A4\uD4A4\uD4A7\uD4A8\uD4AB\uD4AE\uD4B0\uD4BB\uD4BD\uD4BD\uD4BF\uD4C5\uD4C7\uD507\uD509\uD50C\uD50F\uD516\uD518\uD51E\uD520\uD53B\uD53D\uD540\uD542\uD546\uD548\uD548\uD54C\uD552\uD554\uD6A7\uD6AA\uD6C2\uD6C4\uD6DC\uD6DE\uD6FC\uD6FE\uD716\uD718\uD736\uD738\uD750\uD752\uD770\uD772\uD78A\uD78C\uD7AA\uD7AC\uD7C4\uD7C6\uD7CD\uD7D0\uD801\uDA02\uDA38\uDA3D\uDA6E\uDA77\uDA77\uDA86\uDA86\uDA9D\uDAA1\uDAA3\uDAB1\uE002\uE008\uE00A\uE01A\uE01D\uE023\uE025\uE026\uE028\uE02C\uE802\uE8C6\uE8D2\uE8D8\uE902\uE94C\uE952\uE95B\uEE02\uEE05\uEE07\uEE21\uEE23\uEE24\uEE26\uEE26\uEE29\uEE29\uEE2B\uEE34\uEE36\uEE39\uEE3B\uEE3B\uEE3D\uEE3D\uEE44\uEE44\uEE49\uEE49\uEE4B\uEE4B\uEE4D\uEE4D\uEE4F\uEE51\uEE53\uEE54\uEE56\uEE56\uEE59\uEE59\uEE5B\uEE5B\uEE5D\uEE5D\uEE5F\uEE5F\uEE61\uEE61\uEE63\uEE64\uEE66\uEE66\uEE69\uEE6C\uEE6E\uEE74\uEE76\uEE79\uEE7B\uEE7E\uEE80\uEE80\uEE82\uEE8B\uEE8D\uEE9D\uEEA3\uEEA5\uEEA7\uEEAB\uEEAD\uEEBD\uA6D8\uA702\uB736\uB742\uB81F\uB822\uCEA3\uF802\uFA1F"\x81\u0102\u01F1\u0240C\\c|\xAC\xAC\xB7\xB7\xBC\xBC\xC2\xD8\xDA\xF8\xFA\u02C3\u02C8\u02D3\u02E2\u02E6\u02EE\u02EE\u02F0\u02F0\u0372\u0376\u0378\u0379\u037C\u037F\u0381\u0381\u0388\u0388\u038A\u038C\u038E\u038E\u0390\u03A3\u03A5\u03F7\u03F9\u0483\u048C\u0531\u0533\u0558\u055B\u055B\u0563\u0589\u05D2\u05EC\u05F2\u05F4\u0622\u064C\u0670\u0671\u0673\u06D5\u06D7\u06D7\u06E7\u06E8\u06F0\u06F1\u06FC\u06FE\u0701\u0701\u0712\u0712\u0714\u0731\u074F\u07A7\u07B3\u07B3\u07CC\u07EC\u07F6\u07F7\u07FC\u07FC\u0802\u0817\u081C\u081C\u0826\u0826\u082A\u082A\u0842\u085A\u08A2\u08B6\u08B8\u08BF\u0906\u093B\u093F\u093F\u0952\u0952\u095A\u0963\u0973\u0982\u0987\u098E\u0991\u0992\u0995\u09AA\u09AC\u09B2\u09B4\u09B4\u09B8\u09BB\u09BF\u09BF\u09D0\u09D0\u09DE\u09DF\u09E1\u09E3\u09F2\u09F3\u0A07\u0A0C\u0A11\u0A12\u0A15\u0A2A\u0A2C\u0A32\u0A34\u0A35\u0A37\u0A38\u0A3A\u0A3B\u0A5B\u0A5E\u0A60\u0A60\u0A74\u0A76\u0A87\u0A8F\u0A91\u0A93\u0A95\u0AAA\u0AAC\u0AB2\u0AB4\u0AB5\u0AB7\u0ABB\u0ABF\u0ABF\u0AD2\u0AD2\u0AE2\u0AE3\u0AFB\u0AFB\u0B07\u0B0E\u0B11\u0B12\u0B15\u0B2A\u0B2C\u0B32\u0B34\u0B35\u0B37\u0B3B\u0B3F\u0B3F\u0B5E\u0B5F\u0B61\u0B63\u0B73\u0B73\u0B85\u0B85\u0B87\u0B8C\u0B90\u0B92\u0B94\u0B97\u0B9B\u0B9C\u0B9E\u0B9E\u0BA0\u0BA1\u0BA5\u0BA6\u0BAA\u0BAC\u0BB0\u0BBB\u0BD2\u0BD2\u0C07\u0C0E\u0C10\u0C12\u0C14\u0C2A\u0C2C\u0C3B\u0C3F\u0C3F\u0C5A\u0C5C\u0C62\u0C63\u0C82\u0C82\u0C87\u0C8E\u0C90\u0C92\u0C94\u0CAA\u0CAC\u0CB5\u0CB7\u0CBB\u0CBF\u0CBF\u0CE0\u0CE0\u0CE2\u0CE3\u0CF3\u0CF4\u0D07\u0D0E\u0D10\u0D12\u0D14\u0D3C\u0D3F\u0D3F\u0D50\u0D50\u0D56\u0D58\u0D61\u0D63\u0D7C\u0D81\u0D87\u0D98\u0D9C\u0DB3\u0DB5\u0DBD\u0DBF\u0DBF\u0DC2\u0DC8\u0E03\u0E32\u0E34\u0E35\u0E42\u0E48\u0E83\u0E84\u0E86\u0E86\u0E89\u0E8A\u0E8C\u0E8C\u0E8F\u0E8F\u0E96\u0E99\u0E9B\u0EA1\u0EA3\u0EA5\u0EA7\u0EA7\u0EA9\u0EA9\u0EAC\u0EAD\u0EAF\u0EB2\u0EB4\u0EB5\u0EBF\u0EBF\u0EC2\u0EC6\u0EC8\u0EC8\u0EDE\u0EE1\u0F02\u0F02\u0F42\u0F49\u0F4B\u0F6E\u0F8A\u0F8E\u1002\u102C\u1041\u1041\u1052\u1057\u105C\u105F\u1063\u1063\u1067\u1068\u1070\u1072\u1077\u1083\u1090\u1090\u10A2\u10C7\u10C9\u10C9\u10CF\u10CF\u10D2\u10FC\u10FE\u124A\u124C\u124F\u1252\u1258\u125A\u125A\u125C\u125F\u1262\u128A\u128C\u128F\u1292\u12B2\u12B4\u12B7\u12BA\u12C0\u12C2\u12C2\u12C4\u12C7\u12CA\u12D8\u12DA\u1312\u1314\u1317\u131A\u135C\u1382\u1391\u13A2\u13F7\u13FA\u13FF\u1403\u166E\u1671\u1681\u1683\u169C\u16A2\u16EC\u16F0\u16FA\u1702\u170E\u1710\u1713\u1722\u1733\u1742\u1753\u1762\u176E\u1770\u1772\u1782\u17B5\u17D9\u17D9\u17DE\u17DE\u1822\u1879\u1882\u1886\u1889\u18AA\u18AC\u18AC\u18B2\u18F7\u1902\u1920\u1952\u196F\u1972\u1976\u1982\u19AD\u19B2\u19CB\u1A02\u1A18\u1A22\u1A56\u1AA9\u1AA9\u1B07\u1B35\u1B47\u1B4D\u1B85\u1BA2\u1BB0\u1BB1\u1BBC\u1BE7\u1C02\u1C25\u1C4F\u1C51\u1C5C\u1C7F\u1C82\u1C8A\u1CEB\u1CEE\u1CF0\u1CF3\u1CF7\u1CF8\u1D02\u1DC1\u1E02\u1F17\u1F1A\u1F1F\u1F22\u1F47\u1F4A\u1F4F\u1F52\u1F59\u1F5B\u1F5B\u1F5D\u1F5D\u1F5F\u1F5F\u1F61\u1F7F\u1F82\u1FB6\u1FB8\u1FBE\u1FC0\u1FC0\u1FC4\u1FC6\u1FC8\u1FCE\u1FD2\u1FD5\u1FD8\u1FDD\u1FE2\u1FEE\u1FF4\u1FF6\u1FF8\u1FFE\u2073\u2073\u2081\u2081\u2092\u209E\u2104\u2104\u2109\u2109\u210C\u2115\u2117\u2117\u211B\u211F\u2126\u2126\u2128\u2128\u212A\u212A\u212C\u212F\u2131\u213B\u213E\u2141\u2147\u214B\u2150\u2150\u2162\u218A\u2C02\u2C30\u2C32\u2C60\u2C62\u2CE6\u2CED\u2CF0\u2CF4\u2CF5\u2D02\u2D27\u2D29\u2D29\u2D2F\u2D2F\u2D32\u2D69\u2D71\u2D71\u2D82\u2D98\u2DA2\u2DA8\u2DAA\u2DB0\u2DB2\u2DB8\u2DBA\u2DC0\u2DC2\u2DC8\u2DCA\u2DD0\u2DD2\u2DD8\u2DDA\u2DE0\u2E31\u2E31\u3007\u3009\u3023\u302B\u3033\u3037\u303A\u303E\u3043\u3098\u309F\u30A1\u30A3\u30FC\u30FE\u3101\u3107\u312F\u3133\u3190\u31A2\u31BC\u31F2\u3201\u3402\u4DB7\u4E02\u9FD7\uA002\uA48E\uA4D2\uA4FF\uA502\uA60E\uA612\uA621\uA62C\uA62D\uA642\uA670\uA681\uA69F\uA6A2\uA6F1\uA719\uA721\uA724\uA78A\uA78D\uA7B0\uA7B2\uA7B9\uA7F9\uA803\uA805\uA807\uA809\uA80C\uA80E\uA824\uA842\uA875\uA884\uA8B5\uA8F4\uA8F9\uA8FD\uA8FD\uA8FF\uA8FF\uA90C\uA927\uA932\uA948\uA962\uA97E\uA986\uA9B4\uA9D1\uA9D1\uA9E2\uA9E6\uA9E8\uA9F1\uA9FC\uAA00\uAA02\uAA2A\uAA42\uAA44\uAA46\uAA4D\uAA62\uAA78\uAA7C\uAA7C\uAA80\uAAB1\uAAB3\uAAB3\uAAB7\uAAB8\uAABB\uAABF\uAAC2\uAAC2\uAAC4\uAAC4\uAADD\uAADF\uAAE2\uAAEC\uAAF4\uAAF6\uAB03\uAB08\uAB0B\uAB10\uAB13\uAB18\uAB22\uAB28\uAB2A\uAB30\uAB32\uAB5C\uAB5E\uAB67\uAB72\uABE4\uAC02\uD7A5\uD7B2\uD7C8\uD7CD\uD7FD\uF902\uFA6F\uFA72\uFADB\uFB02\uFB08\uFB15\uFB19\uFB1F\uFB1F\uFB21\uFB2A\uFB2C\uFB38\uFB3A\uFB3E\uFB40\uFB40\uFB42\uFB43\uFB45\uFB46\uFB48\uFBB3\uFBD5\uFD3F\uFD52\uFD91\uFD94\uFDC9\uFDF2\uFDFD\uFE72\uFE76\uFE78\uFEFE\uFF23\uFF3C\uFF43\uFF5C\uFF68\uFFC0\uFFC4\uFFC9\uFFCC\uFFD1\uFFD4\uFFD9\uFFDC\uFFDE\r(*<>?AOR_\x82\xFC\u0142\u0176\u0282\u029E\u02A2\u02D2\u0302\u0321\u0332\u034C\u0352\u0377\u0382\u039F\u03A2\u03C5\u03CA\u03D1\u03D3\u03D7\u0402\u049F\u04B2\u04D5\u04DA\u04FD\u0502\u0529\u0532\u0565\u0602\u0738\u0742\u0757\u0762\u0769\u0802\u0807\u080A\u080A\u080C\u0837\u0839\u083A\u083E\u083E\u0841\u0857\u0862\u0878\u0882\u08A0\u08E2\u08F4\u08F6\u08F7\u0902\u0917\u0922\u093B\u0982\u09B9\u09C0\u09C1\u0A02\u0A02\u0A12\u0A15\u0A17\u0A19\u0A1B\u0A35\u0A62\u0A7E\u0A82\u0A9E\u0AC2\u0AC9\u0ACB\u0AE6\u0B02\u0B37\u0B42\u0B57\u0B62\u0B74\u0B82\u0B93\u0C02\u0C4A\u0C82\u0CB4\u0CC2\u0CF4\u1005\u1039\u1085\u10B1\u10D2\u10EA\u1105\u1128\u1152\u1174\u1178\u1178\u1185\u11B4\u11C3\u11C6\u11DC\u11DC\u11DE\u11DE\u1202\u1213\u1215\u122D\u1282\u1288\u128A\u128A\u128C\u128F\u1291\u129F\u12A1\u12AA\u12B2\u12E0\u1307\u130E\u1311\u1312\u1315\u132A\u132C\u1332\u1334\u1335\u1337\u133B\u133F\u133F\u1352\u1352\u135F\u1363\u1402\u1436\u1449\u144C\u1482\u14B1\u14C6\u14C7\u14C9\u14C9\u1582\u15B0\u15DA\u15DD\u1602\u1631\u1646\u1646\u1682\u16AC\u1702\u171B\u18A2\u18E1\u1901\u1901\u1AC2\u1AFA\u1C02\u1C0A\u1C0C\u1C30\u1C42\u1C42\u1C74\u1C91\u2002\u239B\u2402\u2470\u2482\u2545\u3002\u3430\u4402\u4648\u6802\u6A3A\u6A42\u6A60\u6AD2\u6AEF\u6B02\u6B31\u6B42\u6B45\u6B65\u6B79\u6B7F\u6B91\u6F02\u6F46\u6F52\u6F52\u6F95\u6FA1\u6FE2\u6FE2\u7002\u87EE\u8802\u8AF4\uB002\uB003\uBC02\uBC6C\uBC72\uBC7E\uBC82\uBC8A\uBC92\uBC9B\uD402\uD456\uD458\uD49E\uD4A0\uD4A1\uD4A4\uD4A4\uD4A7\uD4A8\uD4AB\uD4AE\uD4B0\uD4BB\uD4BD\uD4BD\uD4BF\uD4C5\uD4C7\uD507\uD509\uD50C\uD50F\uD516\uD518\uD51E\uD520\uD53B\uD53D\uD540\uD542\uD546\uD548\uD548`,o._serializedATNSegment1=`\uD54C\uD552\uD554\uD6A7\uD6AA\uD6C2\uD6C4\uD6DC\uD6DE\uD6FC\uD6FE\uD716\uD718\uD736\uD738\uD750\uD752\uD770\uD772\uD78A\uD78C\uD7AA\uD7AC\uD7C4\uD7C6\uD7CD\uE802\uE8C6\uE902\uE945\uEE02\uEE05\uEE07\uEE21\uEE23\uEE24\uEE26\uEE26\uEE29\uEE29\uEE2B\uEE34\uEE36\uEE39\uEE3B\uEE3B\uEE3D\uEE3D\uEE44\uEE44\uEE49\uEE49\uEE4B\uEE4B\uEE4D\uEE4D\uEE4F\uEE51\uEE53\uEE54\uEE56\uEE56\uEE59\uEE59\uEE5B\uEE5B\uEE5D\uEE5D\uEE5F\uEE5F\uEE61\uEE61\uEE63\uEE64\uEE66\uEE66\uEE69\uEE6C\uEE6E\uEE74\uEE76\uEE79\uEE7B\uEE7E\uEE80\uEE80\uEE82\uEE8B\uEE8D\uEE9D\uEEA3\uEEA5\uEEA7\uEEAB\uEEAD\uEEBD\uA6D8\uA702\uB736\uB742\uB81F\uB822\uCEA3\uF802\uFA1F1\x07 \v\x07 \v\r%')\x071\x071\x071\x07,\b\x1B\x07#\x1B
79
-  \b\r\x07"  !!#" #$\b$\f%& &'( ()-\x07)*,\v+*,/-.-+.0/-01\x07)1 -`,o._serializedATN=n.join([o._serializedATNSegment0,o._serializedATNSegment1],"");}),X7=re(t=>{var e=t&&t.__decorate||function(s,n,o,a){var u=arguments.length,l=u<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,o):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(s,n,o,a);else for(var c=s.length-1;c>=0;c--)(h=s[c])&&(l=(u<3?h(l):u>3?h(n,o,l):h(n,o))||l);return u>3&&l&&Object.defineProperty(n,o,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathLexerErrorListener=void 0;var r=fe(),i=class{syntaxError(s,n,o,a,u,l){}};e([r.Override],i.prototype,"syntaxError",null),t.XPathLexerErrorListener=i;}),co=re(t=>{var e=t&&t.__decorate||function(s,n,o,a){var u=arguments.length,l=u<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,o):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(s,n,o,a);else for(var c=s.length-1;c>=0;c--)(h=s[c])&&(l=(u<3?h(l):u>3?h(n,o,l):h(n,o))||l);return u>3&&l&&Object.defineProperty(n,o,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathElement=void 0;var r=fe(),i=class{constructor(s){this.nodeName=s,this.invert=!1;}toString(){let s=this.invert?"!":"";return Object.constructor.name+"["+s+this.nodeName+"]"}};e([r.Override],i.prototype,"toString",null),t.XPathElement=i;}),Q7=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathRuleAnywhereElement=void 0;var r=fe(),i=hs(),s=co(),n=class extends s.XPathElement{constructor(o,a){super(o),this.ruleIndex=a;}evaluate(o){return i.Trees.findAllRuleNodes(o,this.ruleIndex)}};e([r.Override],n.prototype,"evaluate",null),t.XPathRuleAnywhereElement=n;}),e8=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathRuleElement=void 0;var r=$r(),i=fe(),s=hs(),n=co(),o=class extends n.XPathElement{constructor(a,u){super(a),this.ruleIndex=u;}evaluate(a){let u=[];for(let l of s.Trees.getChildren(a))l instanceof r.ParserRuleContext&&(l.ruleIndex===this.ruleIndex&&!this.invert||l.ruleIndex!==this.ruleIndex&&this.invert)&&u.push(l);return u}};e([i.Override],o.prototype,"evaluate",null),t.XPathRuleElement=o;}),t8=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathTokenAnywhereElement=void 0;var r=fe(),i=hs(),s=co(),n=class extends s.XPathElement{constructor(o,a){super(o),this.tokenType=a;}evaluate(o){return i.Trees.findAllTokenNodes(o,this.tokenType)}};e([r.Override],n.prototype,"evaluate",null),t.XPathTokenAnywhereElement=n;}),r8=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathTokenElement=void 0;var r=fe(),i=lo(),s=hs(),n=co(),o=class extends n.XPathElement{constructor(a,u){super(a),this.tokenType=u;}evaluate(a){let u=[];for(let l of s.Trees.getChildren(a))l instanceof i.TerminalNode&&(l.symbol.type===this.tokenType&&!this.invert||l.symbol.type!==this.tokenType&&this.invert)&&u.push(l);return u}};e([r.Override],o.prototype,"evaluate",null),t.XPathTokenElement=o;}),i8=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathWildcardAnywhereElement=void 0;var r=fe(),i=hs(),s=Ip(),n=co(),o=class extends n.XPathElement{constructor(){super(s.XPath.WILDCARD);}evaluate(a){return this.invert?[]:i.Trees.getDescendants(a)}};e([r.Override],o.prototype,"evaluate",null),t.XPathWildcardAnywhereElement=o;}),n8=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathWildcardElement=void 0;var r=fe(),i=hs(),s=Ip(),n=co(),o=class extends n.XPathElement{constructor(){super(s.XPath.WILDCARD);}evaluate(a){let u=[];if(this.invert)return u;for(let l of i.Trees.getChildren(a))u.push(l);return u}};e([r.Override],o.prototype,"evaluate",null),t.XPathWildcardElement=o;}),Ip=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XPath=void 0;var e=Lp(),r=Pp(),i=cc(),s=$r(),n=At(),o=Z7(),a=X7(),u=Q7(),l=e8(),h=t8(),c=r8(),d=i8(),f=n8(),m=class{constructor(g,v){this.parser=g,this.path=v,this.elements=this.split(v);}split(g){let v=new o.XPathLexer(e.CharStreams.fromString(g));v.recover=D=>{throw D},v.removeErrorListeners(),v.addErrorListener(new a.XPathLexerErrorListener);let x=new r.CommonTokenStream(v);try{x.fill();}catch(D){if(D instanceof i.LexerNoViableAltException){let F="Invalid tokens or characters at index "+v.charPositionInLine+" in path '"+g+"' -- "+D.message;throw new RangeError(F)}throw D}let _=x.getTokens(),E=[],b=_.length,w=0;e:for(;w<b;){let D=_[w],N;switch(D.type){case o.XPathLexer.ROOT:case o.XPathLexer.ANYWHERE:let F=D.type===o.XPathLexer.ANYWHERE;w++,N=_[w];let V=N.type===o.XPathLexer.BANG;V&&(w++,N=_[w]);let Z=this.getXPathElement(N,F);Z.invert=V,E.push(Z),w++;break;case o.XPathLexer.TOKEN_REF:case o.XPathLexer.RULE_REF:case o.XPathLexer.WILDCARD:E.push(this.getXPathElement(D,!1)),w++;break;case n.Token.EOF:break e;default:throw new Error("Unknowth path element "+D)}}return E}getXPathElement(g,v){if(g.type===n.Token.EOF)throw new Error("Missing path element at end of path");let x=g.text;if(x==null)throw new Error("Expected wordToken to have text content.");let _=this.parser.getTokenType(x),E=this.parser.getRuleIndex(x);switch(g.type){case o.XPathLexer.WILDCARD:return v?new d.XPathWildcardAnywhereElement:new f.XPathWildcardElement;case o.XPathLexer.TOKEN_REF:case o.XPathLexer.STRING:if(_===n.Token.INVALID_TYPE)throw new Error(x+" at index "+g.startIndex+" isn't a valid token name");return v?new h.XPathTokenAnywhereElement(x,_):new c.XPathTokenElement(x,_);default:if(E===-1)throw new Error(x+" at index "+g.startIndex+" isn't a valid rule name");return v?new u.XPathRuleAnywhereElement(x,E):new l.XPathRuleElement(x,E)}}static findAll(g,v,x){return new m(x,v).evaluate(g)}evaluate(g){let v=new s.ParserRuleContext;v.addChild(g);let x=new Set([v]),_=0;for(;_<this.elements.length;){let E=new Set;for(let b of x)b.childCount>0&&this.elements[_].evaluate(b).forEach(E.add,E);_++,x=E;}return x}};t.XPath=m,m.WILDCARD="*",m.NOT="!";}),s8=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParseTreePattern=void 0;var i=fe(),s=Ip(),n=class{constructor(a,u,l,h){this._matcher=a,this._patternRuleIndex=l,this._pattern=u,this._patternTree=h;}match(a){return this._matcher.match(a,this)}matches(a){return this._matcher.match(a,this).succeeded}findAll(a,u){let l=s.XPath.findAll(a,u,this._matcher.parser),h=[];for(let c of l){let d=this.match(c);d.succeeded&&h.push(d);}return h}get matcher(){return this._matcher}get pattern(){return this._pattern}get patternRuleIndex(){return this._patternRuleIndex}get patternTree(){return this._patternTree}};e([i.NotNull],n.prototype,"_pattern",void 0),e([i.NotNull],n.prototype,"_patternTree",void 0),e([i.NotNull],n.prototype,"_matcher",void 0),e([i.NotNull,r(0,i.NotNull)],n.prototype,"match",null),e([r(0,i.NotNull)],n.prototype,"matches",null),e([i.NotNull,r(0,i.NotNull),r(1,i.NotNull)],n.prototype,"findAll",null),e([i.NotNull],n.prototype,"matcher",null),e([i.NotNull],n.prototype,"pattern",null),e([i.NotNull],n.prototype,"patternTree",null),n=e([r(0,i.NotNull),r(1,i.NotNull),r(3,i.NotNull)],n),t.ParseTreePattern=n;}),o8=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleTagToken=void 0;var i=fe(),s=At(),n=class{constructor(a,u,l){if(a==null||a.length===0)throw new Error("ruleName cannot be null or empty.");this._ruleName=a,this.bypassTokenType=u,this._label=l;}get ruleName(){return this._ruleName}get label(){return this._label}get channel(){return s.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}};e([i.NotNull],n.prototype,"ruleName",null),e([i.Override],n.prototype,"channel",null),e([i.Override],n.prototype,"text",null),e([i.Override],n.prototype,"type",null),e([i.Override],n.prototype,"line",null),e([i.Override],n.prototype,"charPositionInLine",null),e([i.Override],n.prototype,"tokenIndex",null),e([i.Override],n.prototype,"startIndex",null),e([i.Override],n.prototype,"stopIndex",null),e([i.Override],n.prototype,"tokenSource",null),e([i.Override],n.prototype,"inputStream",null),e([i.Override],n.prototype,"toString",null),n=e([r(0,i.NotNull)],n),t.RuleTagToken=n;}),Bb=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Chunk=void 0;var e=class{};t.Chunk=e;}),a8=re(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.TagChunk=void 0;var r=Bb(),i=fe(),s=class extends r.Chunk{constructor(n,o){if(super(),n==null||n.length===0)throw new Error("tag cannot be null or empty");this._tag=n,this._label=o;}get tag(){return this._tag}get label(){return this._label}toString(){return this._label!=null?this._label+":"+this._tag:this._tag}};e([i.NotNull],s.prototype,"tag",null),e([i.Override],s.prototype,"toString",null),t.TagChunk=s;}),u8=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.TextChunk=void 0;var i=Bb(),s=fe(),n=class extends i.Chunk{constructor(a){if(super(),a==null)throw new Error("text cannot be null");this._text=a;}get text(){return this._text}toString(){return "'"+this._text+"'"}};e([s.NotNull],n.prototype,"_text",void 0),e([s.NotNull],n.prototype,"text",null),e([s.Override],n.prototype,"toString",null),n=e([r(0,s.NotNull)],n),t.TextChunk=n;}),l8=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.TokenTagToken=void 0;var i=Ma(),s=fe(),n=class extends i.CommonToken{constructor(a,u,l){super(u),this._tokenName=a,this._label=l;}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}};e([s.NotNull],n.prototype,"_tokenName",void 0),e([s.NotNull],n.prototype,"tokenName",null),e([s.Override],n.prototype,"text",null),e([s.Override],n.prototype,"toString",null),n=e([r(0,s.NotNull)],n),t.TokenTagToken=n;}),c8=re(t=>{var e=t&&t.__decorate||function(N,F,V,Z){var te=arguments.length,ae=te<3?F:Z===null?Z=Object.getOwnPropertyDescriptor(F,V):Z,k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(N,F,V,Z);else for(var y=N.length-1;y>=0;y--)(k=N[y])&&(ae=(te<3?k(ae):te>3?k(F,V,ae):k(F,V))||ae);return te>3&&ae&&Object.defineProperty(F,V,ae),ae},r=t&&t.__param||function(N,F){return function(V,Z){F(V,Z,N);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParseTreePatternMatcher=void 0;var i=jb(),s=Lp(),n=Pp(),o=Pb(),a=Y7(),u=fe(),l=Ib(),h=Mb(),c=$r(),d=J7(),f=s8(),m=nn(),g=Fp(),v=o8(),x=a8(),_=lo(),E=u8(),b=At(),w=l8(),D=class{constructor(N,F){this.start="<",this.stop=">",this.escape="\\",this.escapeRE=/\\/g,this._lexer=N,this._parser=F;}setDelimiters(N,F,V){if(!N)throw new Error("start cannot be null or empty");if(!F)throw new Error("stop cannot be null or empty");this.start=N,this.stop=F,this.escape=V,this.escapeRE=new RegExp(V.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g");}matches(N,F,V=0){if(typeof F=="string"){let Z=this.compile(F,V);return this.matches(N,Z)}else {let Z=new a.MultiMap;return !this.matchImpl(N,F.patternTree,Z)}}match(N,F,V=0){if(typeof F=="string"){let Z=this.compile(F,V);return this.match(N,Z)}else {let Z=new a.MultiMap,te=this.matchImpl(N,F.patternTree,Z);return new d.ParseTreeMatch(N,F,Z,te)}}compile(N,F){let V=this.tokenize(N),Z=new o.ListTokenSource(V),te=new n.CommonTokenStream(Z),ae=this._parser,k=new h.ParserInterpreter(ae.grammarFileName,ae.vocabulary,ae.ruleNames,ae.getATNWithBypassAlts(),te),y;try{k.errorHandler=new i.BailErrorStrategy,y=k.parse(F);}catch(C){throw C instanceof l.ParseCancellationException?C.getCause():C instanceof m.RecognitionException?C:C instanceof Error?new D.CannotInvokeStartRule(C):C}if(te.LA(1)!==b.Token.EOF)throw new D.StartRuleDoesNotConsumeFullPattern;return new f.ParseTreePattern(this,N,F,y)}get lexer(){return this._lexer}get parser(){return this._parser}matchImpl(N,F,V){if(!N)throw new TypeError("tree cannot be null");if(!F)throw new TypeError("patternTree cannot be null");if(N instanceof _.TerminalNode&&F instanceof _.TerminalNode){let Z;if(N.symbol.type===F.symbol.type)if(F.symbol instanceof w.TokenTagToken){let te=F.symbol;V.map(te.tokenName,N);let ae=te.label;ae&&V.map(ae,N);}else N.text===F.text||Z||(Z=N);else Z||(Z=N);return Z}if(N instanceof c.ParserRuleContext&&F instanceof c.ParserRuleContext){let Z,te=this.getRuleTagToken(F);if(te){if(N.ruleContext.ruleIndex===F.ruleContext.ruleIndex){V.map(te.ruleName,N);let y=te.label;y&&V.map(y,N);}else Z||(Z=N);return Z}if(N.childCount!==F.childCount)return Z||(Z=N),Z;let ae=N.childCount;for(let k=0;k<ae;k++){let y=this.matchImpl(N.getChild(k),F.getChild(k),V);if(y)return y}return Z}return N}getRuleTagToken(N){if(N instanceof g.RuleNode&&N.childCount===1&&N.getChild(0)instanceof _.TerminalNode){let F=N.getChild(0);if(F.symbol instanceof v.RuleTagToken)return F.symbol}}tokenize(N){let F=this.split(N),V=[];for(let Z of F)if(Z instanceof x.TagChunk){let te=Z,ae=te.tag.substr(0,1);if(ae===ae.toUpperCase()){let k=this._parser.getTokenType(te.tag);if(k===b.Token.INVALID_TYPE)throw new Error("Unknown token "+te.tag+" in pattern: "+N);let y=new w.TokenTagToken(te.tag,k,te.label);V.push(y);}else if(ae===ae.toLowerCase()){let k=this._parser.getRuleIndex(te.tag);if(k===-1)throw new Error("Unknown rule "+te.tag+" in pattern: "+N);let y=this._parser.getATNWithBypassAlts().ruleToTokenType[k];V.push(new v.RuleTagToken(te.tag,y,te.label));}else throw new Error("invalid tag: "+te.tag+" in pattern: "+N)}else {let te=Z;this._lexer.inputStream=s.CharStreams.fromString(te.text);let ae=this._lexer.nextToken();for(;ae.type!==b.Token.EOF;)V.push(ae),ae=this._lexer.nextToken();}return V}split(N){let F=0,V=N.length,Z=[],ae=[],k=[];for(;F<V;)F===N.indexOf(this.escape+this.start,F)?F+=this.escape.length+this.start.length:F===N.indexOf(this.escape+this.stop,F)?F+=this.escape.length+this.stop.length:F===N.indexOf(this.start,F)?(ae.push(F),F+=this.start.length):F===N.indexOf(this.stop,F)?(k.push(F),F+=this.stop.length):F++;if(ae.length>k.length)throw new Error("unterminated tag in pattern: "+N);if(ae.length<k.length)throw new Error("missing start tag in pattern: "+N);let y=ae.length;for(let C=0;C<y;C++)if(ae[C]>=k[C])throw new Error("tag delimiters out of order in pattern: "+N);if(y===0){let C=N.substring(0,V);Z.push(new E.TextChunk(C));}if(y>0&&ae[0]>0){let C=N.substring(0,ae[0]);Z.push(new E.TextChunk(C));}for(let C=0;C<y;C++){let S=N.substring(ae[C]+this.start.length,k[C]),R=S,L,I=S.indexOf(":");if(I>=0&&(L=S.substring(0,I),R=S.substring(I+1,S.length)),Z.push(new x.TagChunk(R,L)),C+1<y){let K=N.substring(k[C]+this.stop.length,ae[C+1]);Z.push(new E.TextChunk(K));}}if(y>0){let C=k[y-1]+this.stop.length;if(C<V){let S=N.substring(C,V);Z.push(new E.TextChunk(S));}}for(let C=0;C<Z.length;C++){let S=Z[C];if(S instanceof E.TextChunk){let R=S.text.replace(this.escapeRE,"");R.length<S.text.length&&(Z[C]=new E.TextChunk(R));}}return Z}};e([u.NotNull,r(1,u.NotNull)],D.prototype,"match",null),e([u.NotNull],D.prototype,"lexer",null),e([u.NotNull],D.prototype,"parser",null),e([r(0,u.NotNull),r(1,u.NotNull),r(2,u.NotNull)],D.prototype,"matchImpl",null),t.ParseTreePatternMatcher=D,function(N){class F extends Error{constructor(te){super(`CannotInvokeStartRule: ${te}`),this.error=te;}}N.CannotInvokeStartRule=F;class V extends Error{constructor(){super("StartRuleDoesNotConsumeFullPattern");}}N.StartRuleDoesNotConsumeFullPattern=V;}(D=t.ParseTreePatternMatcher||(t.ParseTreePatternMatcher={}));}),Ua=re(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h},r=t&&t.__param||function(n,o){return function(a,u){o(a,u,n);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DecisionEventInfo=void 0;var i=fe(),s=class{constructor(o,a,u,l,h,c){this.decision=o,this.fullCtx=c,this.stopIndex=h,this.input=u,this.startIndex=l,this.state=a;}};e([i.NotNull],s.prototype,"input",void 0),s=e([r(2,i.NotNull)],s),t.DecisionEventInfo=s;}),h8=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.AmbiguityInfo=void 0;var i=Ua(),s=fe(),n=class extends i.DecisionEventInfo{constructor(a,u,l,h,c,d){super(a,u,h,c,d,u.useContext),this.ambigAlts=l;}get ambiguousAlternatives(){return this.ambigAlts}};e([s.NotNull],n.prototype,"ambigAlts",void 0),e([s.NotNull],n.prototype,"ambiguousAlternatives",null),n=e([r(1,s.NotNull),r(2,s.NotNull),r(3,s.NotNull)],n),t.AmbiguityInfo=n;}),f8=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContextSensitivityInfo=void 0;var i=Ua(),s=fe(),n=class extends i.DecisionEventInfo{constructor(a,u,l,h,c){super(a,u,l,h,c,!0);}};n=e([r(1,s.NotNull),r(2,s.NotNull)],n),t.ContextSensitivityInfo=n;}),d8=re(t=>{var e=t&&t.__decorate||function(s,n,o,a){var u=arguments.length,l=u<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,o):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(s,n,o,a);else for(var c=s.length-1;c>=0;c--)(h=s[c])&&(l=(u<3?h(l):u>3?h(n,o,l):h(n,o))||l);return u>3&&l&&Object.defineProperty(n,o,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.DecisionInfo=void 0;var r=fe(),i=class{constructor(s){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=s;}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+"}"}};e([r.Override],i.prototype,"toString",null),t.DecisionInfo=i;}),p8=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorInfo=void 0;var i=Ua(),s=fe(),n=class extends i.DecisionEventInfo{constructor(a,u,l,h,c){super(a,u,l,h,c,u.useContext);}};n=e([r(1,s.NotNull),r(2,s.NotNull)],n),t.ErrorInfo=n;}),m8=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LookaheadEventInfo=void 0;var i=Ua(),s=fe(),n=class extends i.DecisionEventInfo{constructor(a,u,l,h,c,d,f){super(a,u,h,c,d,f),this.predictedAlt=l;}};n=e([r(3,s.NotNull)],n),t.LookaheadEventInfo=n;}),g8=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.PredicateEvalInfo=void 0;var i=Ua(),s=fe(),n=class extends i.DecisionEventInfo{constructor(a,u,l,h,c,d,f,m){super(u,a,l,h,c,a.useContext),this.semctx=d,this.evalResult=f,this.predictedAlt=m;}};n=e([r(0,s.NotNull),r(2,s.NotNull),r(5,s.NotNull)],n),t.PredicateEvalInfo=n;}),lb=re(t=>{var e=t&&t.__decorate||function(v,x,_,E){var b=arguments.length,w=b<3?x:E===null?E=Object.getOwnPropertyDescriptor(x,_):E,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(v,x,_,E);else for(var N=v.length-1;N>=0;N--)(D=v[N])&&(w=(b<3?D(w):b>3?D(x,_,w):D(x,_))||w);return b>3&&w&&Object.defineProperty(x,_,w),w},r=t&&t.__param||function(v,x){return function(_,E){x(_,E,v);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProfilingATNSimulator=void 0;var i=h8(),s=ti(),n=lc(),o=f8(),a=d8(),u=p8(),l=fe(),h=m8(),c=Ha(),d=g8(),f=ao(),m=Rb(),g=class extends c.ParserATNSimulator{constructor(v){super(v.interpreter.atn,v),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 x=0;x<this.numDecisions;x++)this.decisions.push(new a.DecisionInfo(x));}adaptivePredict(v,x,_,E){if(E!==void 0)return super.adaptivePredict(v,x,_,E);try{this._input=v,this._startIndex=v.index,this._sllStopIndex=this._startIndex-1,this._llStopIndex=-1,this.currentDecision=x,this.currentState=void 0,this.conflictingAltResolvedBySLL=s.ATN.INVALID_ALT_NUMBER;let b=process.hrtime(),w=super.adaptivePredict(v,x,_),D=process.hrtime(),N=(D[0]-b[0])*1e9;N===0?N=D[1]-b[1]:N+=1e9-b[1]+D[1],this.decisions[x].timeInPrediction+=N,this.decisions[x].invocations++;let F=this._sllStopIndex-this._startIndex+1;if(this.decisions[x].SLL_TotalLook+=F,this.decisions[x].SLL_MinLook=this.decisions[x].SLL_MinLook===0?F:Math.min(this.decisions[x].SLL_MinLook,F),F>this.decisions[x].SLL_MaxLook&&(this.decisions[x].SLL_MaxLook=F,this.decisions[x].SLL_MaxLookEvent=new h.LookaheadEventInfo(x,void 0,w,v,this._startIndex,this._sllStopIndex,!1)),this._llStopIndex>=0){let V=this._llStopIndex-this._startIndex+1;this.decisions[x].LL_TotalLook+=V,this.decisions[x].LL_MinLook=this.decisions[x].LL_MinLook===0?V:Math.min(this.decisions[x].LL_MinLook,V),V>this.decisions[x].LL_MaxLook&&(this.decisions[x].LL_MaxLook=V,this.decisions[x].LL_MaxLookEvent=new h.LookaheadEventInfo(x,void 0,w,v,this._startIndex,this._llStopIndex,!0));}return w}finally{this._input=void 0,this.currentDecision=-1;}}getStartState(v,x,_,E){let b=super.getStartState(v,x,_,E);return this.currentState=b,b}computeStartState(v,x,_){let E=super.computeStartState(v,x,_);return this.currentState=E,E}computeReachSet(v,x,_,E){if(this._input===void 0)throw new Error("Invalid state");let b=super.computeReachSet(v,x,_,E);return b==null&&this.decisions[this.currentDecision].errors.push(new u.ErrorInfo(this.currentDecision,x,this._input,this._startIndex,this._input.index)),this.currentState=b,b}getExistingTargetState(v,x){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 _=super.getExistingTargetState(v,x);if(_!=null&&(this.currentState=new m.SimulatorState(this.currentState.outerContext,_,this.currentState.useContext,this.currentState.remainingOuterContext),this.currentState.useContext?this.decisions[this.currentDecision].LL_DFATransitions++:this.decisions[this.currentDecision].SLL_DFATransitions++,_===n.ATNSimulator.ERROR)){let E=new m.SimulatorState(this.currentState.outerContext,v,this.currentState.useContext,this.currentState.remainingOuterContext);this.decisions[this.currentDecision].errors.push(new u.ErrorInfo(this.currentDecision,E,this._input,this._startIndex,this._input.index));}return _}computeTargetState(v,x,_,E,b,w){let D=super.computeTargetState(v,x,_,E,b,w);return b?this.decisions[this.currentDecision].LL_ATNTransitions++:this.decisions[this.currentDecision].SLL_ATNTransitions++,D}evalSemanticContextImpl(v,x,_){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let E=super.evalSemanticContextImpl(v,x,_);if(!(v instanceof f.SemanticContext.PrecedencePredicate)){let w=this._llStopIndex>=0?this._llStopIndex:this._sllStopIndex;this.decisions[this.currentDecision].predicateEvals.push(new d.PredicateEvalInfo(this.currentState,this.currentDecision,this._input,this._startIndex,w,v,E,_));}return E}reportContextSensitivity(v,x,_,E,b){if(this._input===void 0)throw new Error("Invalid state");x!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new o.ContextSensitivityInfo(this.currentDecision,_,this._input,E,b)),super.reportContextSensitivity(v,x,_,E,b);}reportAttemptingFullContext(v,x,_,E,b){x!=null?this.conflictingAltResolvedBySLL=x.nextSetBit(0):this.conflictingAltResolvedBySLL=_.s0.configs.getRepresentedAlternatives().nextSetBit(0),this.decisions[this.currentDecision].LL_Fallback++,super.reportAttemptingFullContext(v,x,_,E,b);}reportAmbiguity(v,x,_,E,b,w,D){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let N;w!=null?N=w.nextSetBit(0):N=D.getRepresentedAlternatives().nextSetBit(0),this.conflictingAltResolvedBySLL!==s.ATN.INVALID_ALT_NUMBER&&N!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new o.ContextSensitivityInfo(this.currentDecision,this.currentState,this._input,_,E)),this.decisions[this.currentDecision].ambiguities.push(new i.AmbiguityInfo(this.currentDecision,this.currentState,w,this._input,_,E)),super.reportAmbiguity(v,x,_,E,b,w,D);}getDecisionInfo(){return this.decisions}getCurrentState(){return this.currentState}};e([l.Override,r(0,l.NotNull)],g.prototype,"adaptivePredict",null),e([l.Override],g.prototype,"getStartState",null),e([l.Override],g.prototype,"computeStartState",null),e([l.Override],g.prototype,"computeReachSet",null),e([l.Override],g.prototype,"getExistingTargetState",null),e([l.Override],g.prototype,"computeTargetState",null),e([l.Override],g.prototype,"evalSemanticContextImpl",null),e([l.Override],g.prototype,"reportContextSensitivity",null),e([l.Override],g.prototype,"reportAttemptingFullContext",null),e([l.Override,r(0,l.NotNull),r(5,l.NotNull),r(6,l.NotNull)],g.prototype,"reportAmbiguity",null),t.ProfilingATNSimulator=g;}),Va=re(t=>{var e=t&&t.__decorate||function(b,w,D,N){var F=arguments.length,V=F<3?w:N===null?N=Object.getOwnPropertyDescriptor(w,D):N,Z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")V=Reflect.decorate(b,w,D,N);else for(var te=b.length-1;te>=0;te--)(Z=b[te])&&(V=(F<3?Z(V):F>3?Z(w,D,V):Z(w,D))||V);return F>3&&V&&Object.defineProperty(w,D,V),V},r=t&&t.__param||function(b,w){return function(D,N){w(D,N,b);}},i=t&&t.__awaiter||function(b,w,D,N){function F(V){return V instanceof D?V:new D(function(Z){Z(V);})}return new(D||(D=Promise))(function(V,Z){function te(y){try{k(N.next(y));}catch(C){Z(C);}}function ae(y){try{k(N.throw(y));}catch(C){Z(C);}}function k(y){y.done?V(y.value):F(y.value).then(te,ae);}k((N=N.apply(b,w||[])).next());})};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var s=ei(),n=Tb(),o=pc(),a=kp(),u=dc(),l=pb(),h=ln(),c=fe(),d=G7(),f=Ha(),m=Nb(),g=ja(),v=lo(),x=At(),_=class{constructor(b,w){this.ruleNames=b,this.tokenStream=w;}enterEveryRule(b){console.log("enter "+this.ruleNames[b.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text);}exitEveryRule(b){console.log("exit "+this.ruleNames[b.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text);}visitErrorNode(b){}visitTerminal(b){let w=b.parent.ruleContext,D=b.symbol;console.log("consume "+D+" rule "+this.ruleNames[w.ruleIndex]);}};e([c.Override],_.prototype,"enterEveryRule",null),e([c.Override],_.prototype,"exitEveryRule",null),e([c.Override],_.prototype,"visitErrorNode",null),e([c.Override],_.prototype,"visitTerminal",null);var E=class extends g.Recognizer{constructor(b){super(),this._errHandler=new a.DefaultErrorStrategy,this._precedenceStack=new l.IntegerStack,this._buildParseTrees=!0,this._parseListeners=[],this._syntaxErrors=0,this.matchedEOF=!1,this._precedenceStack.push(0),this.inputStream=b;}reset(b){(b===void 0||b)&&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 w=this.interpreter;w!=null&&w.reset();}match(b){let w=this.currentToken;return w.type===b?(b===x.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):(w=this._errHandler.recoverInline(this),this._buildParseTrees&&w.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,w))),w}matchWildcard(){let b=this.currentToken;return b.type>0?(this._errHandler.reportMatch(this),this.consume()):(b=this._errHandler.recoverInline(this),this._buildParseTrees&&b.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,b))),b}set buildParseTree(b){this._buildParseTrees=b;}get buildParseTree(){return this._buildParseTrees}getParseListeners(){return this._parseListeners}addParseListener(b){if(b==null)throw new TypeError("listener cannot be null");this._parseListeners.push(b);}removeParseListener(b){let w=this._parseListeners.findIndex(D=>D===b);w!==-1&&this._parseListeners.splice(w,1);}removeParseListeners(){this._parseListeners.length=0;}triggerEnterRuleEvent(){for(let b of this._parseListeners)b.enterEveryRule&&b.enterEveryRule(this._ctx),this._ctx.enterRule(b);}triggerExitRuleEvent(){for(let b=this._parseListeners.length-1;b>=0;b--){let w=this._parseListeners[b];this._ctx.exitRule(w),w.exitEveryRule&&w.exitEveryRule(this._ctx);}}get numberOfSyntaxErrors(){return this._syntaxErrors}get tokenFactory(){return this._input.tokenSource.tokenFactory}getATNWithBypassAlts(){let b=this.serializedATN;if(b==null)throw new Error("The current parser does not support an ATN with bypass alternatives.");let w=E.bypassAltsAtnCache.get(b);if(w==null){let D=new n.ATNDeserializationOptions;D.isGenerateRuleBypassTransitions=!0,w=new o.ATNDeserializer(D).deserialize(s.toCharArray(b)),E.bypassAltsAtnCache.set(b,w);}return w}compileParseTreePattern(b,w,D){return i(this,void 0,void 0,function*(){if(!D){if(this.inputStream){let Z=this.inputStream.tokenSource;Z instanceof h.Lexer&&(D=Z);}if(!D)throw new Error("Parser can't discover a lexer to use")}let N=D,F=yield Promise.resolve().then(()=>c8());return new F.ParseTreePatternMatcher(N,this).compile(b,w)})}get errorHandler(){return this._errHandler}set errorHandler(b){this._errHandler=b;}get inputStream(){return this._input}set inputStream(b){this.reset(!1),this._input=b;}get currentToken(){return this._input.LT(1)}notifyErrorListeners(b,w,D){w===void 0?w=this.currentToken:w===null&&(w=void 0),this._syntaxErrors++;let N=-1,F=-1;w!=null&&(N=w.line,F=w.charPositionInLine);let V=this.getErrorListenerDispatch();V.syntaxError&&V.syntaxError(this,w,N,F,b,D);}consume(){let b=this.currentToken;b.type!==E.EOF&&this.inputStream.consume();let w=this._parseListeners.length!==0;if(this._buildParseTrees||w)if(this._errHandler.inErrorRecoveryMode(this)){let D=this._ctx.addErrorNode(this.createErrorNode(this._ctx,b));if(w)for(let N of this._parseListeners)N.visitErrorNode&&N.visitErrorNode(D);}else {let D=this.createTerminalNode(this._ctx,b);if(this._ctx.addChild(D),w)for(let N of this._parseListeners)N.visitTerminal&&N.visitTerminal(D);}return b}createTerminalNode(b,w){return new v.TerminalNode(w)}createErrorNode(b,w){return new u.ErrorNode(w)}addContextToParseTree(){let b=this._ctx._parent;b!=null&&b.addChild(this._ctx);}enterRule(b,w,D){this.state=w,this._ctx=b,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent();}enterLeftFactoredRule(b,w,D){if(this.state=w,this._buildParseTrees){let N=this._ctx.getChild(this._ctx.childCount-1);this._ctx.removeLastChild(),N._parent=b,b.addChild(N);}this._ctx=b,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(b,w){if(b.altNumber=w,this._buildParseTrees&&this._ctx!==b){let D=this._ctx._parent;D!=null&&(D.removeLastChild(),D.addChild(b));}this._ctx=b;}get precedence(){return this._precedenceStack.isEmpty?-1:this._precedenceStack.peek()}enterRecursionRule(b,w,D,N){this.state=w,this._precedenceStack.push(N),this._ctx=b,this._ctx._start=this._input.LT(1),this.triggerEnterRuleEvent();}pushNewRecursionContext(b,w,D){let N=this._ctx;N._parent=b,N.invokingState=w,N._stop=this._input.tryLT(-1),this._ctx=b,this._ctx._start=N._start,this._buildParseTrees&&this._ctx.addChild(N),this.triggerEnterRuleEvent();}unrollRecursionContexts(b){this._precedenceStack.pop(),this._ctx._stop=this._input.tryLT(-1);let w=this._ctx;if(this._parseListeners.length>0)for(;this._ctx!==b;)this.triggerExitRuleEvent(),this._ctx=this._ctx._parent;else this._ctx=b;w._parent=b,this._buildParseTrees&&b!=null&&b.addChild(w);}getInvokingContext(b){let w=this._ctx;for(;w&&w.ruleIndex!==b;)w=w._parent;return w}get context(){return this._ctx}set context(b){this._ctx=b;}precpred(b,w){return w>=this._precedenceStack.peek()}getErrorListenerDispatch(){return new m.ProxyParserErrorListener(this.getErrorListeners())}inContext(b){return !1}isExpectedToken(b){let w=this.interpreter.atn,D=this._ctx,N=w.states[this.state],F=w.nextTokens(N);if(F.contains(b))return !0;if(!F.contains(x.Token.EPSILON))return !1;for(;D!=null&&D.invokingState>=0&&F.contains(x.Token.EPSILON);){let Z=w.states[D.invokingState].transition(0);if(F=w.nextTokens(Z.followState),F.contains(b))return !0;D=D._parent;}return !!(F.contains(x.Token.EPSILON)&&b===x.Token.EOF)}get isMatchedEOF(){return this.matchedEOF}getExpectedTokens(){return this.atn.getExpectedTokens(this.state,this.context)}getExpectedTokensWithinCurrentRule(){let b=this.interpreter.atn,w=b.states[this.state];return b.nextTokens(w)}getRuleIndex(b){let w=this.getRuleIndexMap().get(b);return w!=null?w:-1}get ruleContext(){return this._ctx}getRuleInvocationStack(b=this._ctx){let w=b,D=this.ruleNames,N=[];for(;w!=null;){let F=w.ruleIndex;F<0?N.push("n/a"):N.push(D[F]),w=w._parent;}return N}getDFAStrings(){let b=[];for(let w of this._interp.atn.decisionToDFA)b.push(w.toString(this.vocabulary,this.ruleNames));return b}dumpDFA(){let b=!1;for(let w of this._interp.atn.decisionToDFA)w.isEmpty||(b&&console.log(),console.log("Decision "+w.decision+":"),process.stdout.write(w.toString(this.vocabulary,this.ruleNames)),b=!0);}get sourceName(){return this._input.sourceName}get parseInfo(){return Promise.resolve().then(()=>lb()).then(b=>{let w=this.interpreter;if(w instanceof b.ProfilingATNSimulator)return new d.ParseInfo(w)})}setProfile(b){return i(this,void 0,void 0,function*(){let w=yield Promise.resolve().then(()=>lb()),D=this.interpreter;b?D instanceof w.ProfilingATNSimulator||(this.interpreter=new w.ProfilingATNSimulator(this)):D instanceof w.ProfilingATNSimulator&&(this.interpreter=new f.ParserATNSimulator(this.atn,this)),this.interpreter.setPredictionMode(D.getPredictionMode());})}set isTrace(b){b?(this._tracer?this.removeParseListener(this._tracer):this._tracer=new _(this.ruleNames,this._input),this.addParseListener(this._tracer)):this._tracer&&(this.removeParseListener(this._tracer),this._tracer=void 0);}get isTrace(){return this._tracer!=null}};E.bypassAltsAtnCache=new Map,e([c.NotNull],E.prototype,"_errHandler",void 0),e([c.NotNull],E.prototype,"match",null),e([c.NotNull],E.prototype,"matchWildcard",null),e([c.NotNull],E.prototype,"getParseListeners",null),e([r(0,c.NotNull)],E.prototype,"addParseListener",null),e([c.NotNull],E.prototype,"getATNWithBypassAlts",null),e([c.NotNull,r(0,c.NotNull)],E.prototype,"errorHandler",null),e([c.Override],E.prototype,"inputStream",null),e([c.NotNull],E.prototype,"currentToken",null),e([r(0,c.NotNull)],E.prototype,"enterRule",null),e([c.Override,r(0,c.Nullable)],E.prototype,"precpred",null),e([c.Override],E.prototype,"getErrorListenerDispatch",null),e([c.NotNull],E.prototype,"getExpectedTokens",null),e([c.NotNull],E.prototype,"getExpectedTokensWithinCurrentRule",null),e([c.Override],E.prototype,"parseInfo",null),t.Parser=E;}),mc=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.NoViableAltException=void 0;var r=Va(),i=nn(),s=fe(),n=class extends i.RecognitionException{constructor(o,a,u,l,h,c){o instanceof r.Parser&&(a===void 0&&(a=o.inputStream),u===void 0&&(u=o.currentToken),l===void 0&&(l=o.currentToken),c===void 0&&(c=o.context)),super(o,a,c),this._deadEndConfigs=h,this._startToken=u,this.setOffendingToken(o,l);}get startToken(){return this._startToken}get deadEndConfigs(){return this._deadEndConfigs}};e([s.NotNull],n.prototype,"_startToken",void 0),t.NoViableAltException=n;}),kp=re(t=>{var e=t&&t.__decorate||function(f,m,g,v){var x=arguments.length,_=x<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,g):v,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(f,m,g,v);else for(var b=f.length-1;b>=0;b--)(E=f[b])&&(_=(x<3?E(_):x>3?E(m,g,_):E(m,g))||_);return x>3&&_&&Object.defineProperty(m,g,_),_},r=t&&t.__param||function(f,m){return function(g,v){m(g,v,f);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultErrorStrategy=void 0;var i=Ci(),s=Qt(),n=sc(),o=oc(),a=cs(),u=mc(),l=Vr(),h=At(),c=fe(),d=class{constructor(){this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.nextTokensState=i.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,m){this.inErrorRecoveryMode(f)||(this.beginErrorCondition(f),m instanceof u.NoViableAltException?this.reportNoViableAlternative(f,m):m instanceof o.InputMismatchException?this.reportInputMismatch(f,m):m instanceof n.FailedPredicateException?this.reportFailedPredicate(f,m):(console.error(`unknown recognition error type: ${m}`),this.notifyErrorListeners(f,m.toString(),m)));}notifyErrorListeners(f,m,g){let v=g.getOffendingToken(f);v===void 0&&(v=null),f.notifyErrorListeners(m,v,g);}recover(f,m){this.lastErrorIndex===f.inputStream.index&&this.lastErrorStates&&this.lastErrorStates.contains(f.state)&&f.consume(),this.lastErrorIndex=f.inputStream.index,this.lastErrorStates||(this.lastErrorStates=new a.IntervalSet),this.lastErrorStates.add(f.state);let g=this.getErrorRecoverySet(f);this.consumeUntil(f,g);}sync(f){let m=f.interpreter.atn.states[f.state];if(this.inErrorRecoveryMode(f))return;let v=f.inputStream.LA(1),x=f.atn.nextTokens(m);if(x.contains(v)){this.nextTokensContext=void 0,this.nextTokensState=i.ATNState.INVALID_STATE_NUMBER;return}if(x.contains(h.Token.EPSILON)){this.nextTokensContext===void 0&&(this.nextTokensContext=f.context,this.nextTokensState=f.state);return}switch(m.stateType){case s.ATNStateType.BLOCK_START:case s.ATNStateType.STAR_BLOCK_START:case s.ATNStateType.PLUS_BLOCK_START:case s.ATNStateType.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(f))return;throw new o.InputMismatchException(f);case s.ATNStateType.PLUS_LOOP_BACK:case s.ATNStateType.STAR_LOOP_BACK:this.reportUnwantedToken(f);let E=f.getExpectedTokens().or(this.getErrorRecoverySet(f));this.consumeUntil(f,E);break;}}reportNoViableAlternative(f,m){let g=f.inputStream,v;g?m.startToken.type===h.Token.EOF?v="<EOF>":v=g.getTextFromRange(m.startToken,m.getOffendingToken()):v="<unknown input>";let x="no viable alternative at input "+this.escapeWSAndQuote(v);this.notifyErrorListeners(f,x,m);}reportInputMismatch(f,m){let g=m.expectedTokens,v=g?g.toStringVocabulary(f.vocabulary):"",x="mismatched input "+this.getTokenErrorDisplay(m.getOffendingToken(f))+" expecting "+v;this.notifyErrorListeners(f,x,m);}reportFailedPredicate(f,m){let v="rule "+f.ruleNames[f.context.ruleIndex]+" "+m.message;this.notifyErrorListeners(f,v,m);}reportUnwantedToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let m=f.currentToken,g=this.getTokenErrorDisplay(m),v=this.getExpectedTokens(f),x="extraneous input "+g+" expecting "+v.toStringVocabulary(f.vocabulary);f.notifyErrorListeners(x,m,void 0);}reportMissingToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let m=f.currentToken,v="missing "+this.getExpectedTokens(f).toStringVocabulary(f.vocabulary)+" at "+this.getTokenErrorDisplay(m);f.notifyErrorListeners(v,m,void 0);}recoverInline(f){let m=this.singleTokenDeletion(f);if(m)return f.consume(),m;if(this.singleTokenInsertion(f))return this.getMissingSymbol(f);throw this.nextTokensContext===void 0?new o.InputMismatchException(f):new o.InputMismatchException(f,this.nextTokensState,this.nextTokensContext)}singleTokenInsertion(f){let m=f.inputStream.LA(1),v=f.interpreter.atn.states[f.state].transition(0).target,x=f.interpreter.atn;return x.nextTokens(v,l.PredictionContext.fromRuleContext(x,f.context)).contains(m)?(this.reportMissingToken(f),!0):!1}singleTokenDeletion(f){let m=f.inputStream.LA(2);if(this.getExpectedTokens(f).contains(m)){this.reportUnwantedToken(f),f.consume();let v=f.currentToken;return this.reportMatch(f),v}}getMissingSymbol(f){let m=f.currentToken,g=this.getExpectedTokens(f),v=h.Token.INVALID_TYPE;g.isNil||(v=g.minElement);let x;v===h.Token.EOF?x="<missing EOF>":x="<missing "+f.vocabulary.getDisplayName(v)+">";let _=m,E=f.inputStream.tryLT(-1);return _.type===h.Token.EOF&&E!=null&&(_=E),this.constructToken(f.inputStream.tokenSource,v,x,_)}constructToken(f,m,g,v){let x=f.tokenFactory,_=v.tokenSource,E=_?_.inputStream:void 0;return x.create({source:f,stream:E},m,g,h.Token.DEFAULT_CHANNEL,-1,-1,v.line,v.charPositionInLine)}getExpectedTokens(f){return f.getExpectedTokens()}getTokenErrorDisplay(f){if(!f)return "<no token>";let m=this.getSymbolText(f);return m||(this.getSymbolType(f)===h.Token.EOF?m="<EOF>":m=`<${this.getSymbolType(f)}>`),this.escapeWSAndQuote(m)}getSymbolText(f){return f.text}getSymbolType(f){return f.type}escapeWSAndQuote(f){return f=f.replace(`
80
- `,"\\n"),f=f.replace("\r","\\r"),f=f.replace(" ","\\t"),"'"+f+"'"}getErrorRecoverySet(f){let m=f.interpreter.atn,g=f.context,v=new a.IntervalSet;for(;g&&g.invokingState>=0;){let _=m.states[g.invokingState].transition(0),E=m.nextTokens(_.followState);v.addAll(E),g=g._parent;}return v.remove(h.Token.EPSILON),v}consumeUntil(f,m){let g=f.inputStream.LA(1);for(;g!==h.Token.EOF&&!m.contains(g);)f.consume(),g=f.inputStream.LA(1);}};e([c.Override],d.prototype,"reset",null),e([r(0,c.NotNull)],d.prototype,"beginErrorCondition",null),e([c.Override],d.prototype,"inErrorRecoveryMode",null),e([r(0,c.NotNull)],d.prototype,"endErrorCondition",null),e([c.Override],d.prototype,"reportMatch",null),e([c.Override],d.prototype,"reportError",null),e([r(0,c.NotNull)],d.prototype,"notifyErrorListeners",null),e([c.Override],d.prototype,"recover",null),e([c.Override],d.prototype,"sync",null),e([r(0,c.NotNull),r(1,c.NotNull)],d.prototype,"reportNoViableAlternative",null),e([r(0,c.NotNull),r(1,c.NotNull)],d.prototype,"reportInputMismatch",null),e([r(0,c.NotNull),r(1,c.NotNull)],d.prototype,"reportFailedPredicate",null),e([r(0,c.NotNull)],d.prototype,"reportUnwantedToken",null),e([r(0,c.NotNull)],d.prototype,"reportMissingToken",null),e([c.Override],d.prototype,"recoverInline",null),e([r(0,c.NotNull)],d.prototype,"singleTokenInsertion",null),e([r(0,c.NotNull)],d.prototype,"singleTokenDeletion",null),e([c.NotNull,r(0,c.NotNull)],d.prototype,"getMissingSymbol",null),e([c.NotNull,r(0,c.NotNull)],d.prototype,"getExpectedTokens",null),e([r(0,c.NotNull)],d.prototype,"getSymbolText",null),e([r(0,c.NotNull)],d.prototype,"getSymbolType",null),e([c.NotNull,r(0,c.NotNull)],d.prototype,"escapeWSAndQuote",null),e([c.NotNull,r(0,c.NotNull)],d.prototype,"getErrorRecoverySet",null),e([r(0,c.NotNull),r(1,c.NotNull)],d.prototype,"consumeUntil",null),t.DefaultErrorStrategy=d;}),jb=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.BailErrorStrategy=void 0;var r=kp(),i=oc(),s=fe(),n=Ib(),o=class extends r.DefaultErrorStrategy{recover(a,u){for(let l=a.context;l;l=l.parent)l.exception=u;throw new n.ParseCancellationException(u)}recoverInline(a){let u=new i.InputMismatchException(a);for(let l=a.context;l;l=l.parent)l.exception=u;throw new n.ParseCancellationException(u)}sync(a){}};e([s.Override],o.prototype,"recover",null),e([s.Override],o.prototype,"recoverInline",null),e([s.Override],o.prototype,"sync",null),t.BailErrorStrategy=o;}),_8=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),y8=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Dependents=void 0;(function(r){r[r.SELF=0]="SELF",r[r.PARENTS=1]="PARENTS",r[r.CHILDREN=2]="CHILDREN",r[r.ANCESTORS=3]="ANCESTORS",r[r.DESCENDANTS=4]="DESCENDANTS",r[r.SIBLINGS=5]="SIBLINGS",r[r.PRECEEDING_SIBLINGS=6]="PRECEEDING_SIBLINGS",r[r.FOLLOWING_SIBLINGS=7]="FOLLOWING_SIBLINGS",r[r.PRECEEDING=8]="PRECEEDING",r[r.FOLLOWING=9]="FOLLOWING";})(t.Dependents||(t.Dependents={}));}),v8=re(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticErrorListener=void 0;var i=an(),s=fe(),n=mr(),o=class{constructor(a=!0){this.exactOnly=a,this.exactOnly=a;}syntaxError(a,u,l,h,c,d){}reportAmbiguity(a,u,l,h,c,d,f){if(this.exactOnly&&!c)return;let m=this.getDecisionDescription(a,u),g=this.getConflictingAlts(d,f),v=a.inputStream.getText(n.Interval.of(l,h)),x=`reportAmbiguity d=${m}: ambigAlts=${g}, input='${v}'`;a.notifyErrorListeners(x);}reportAttemptingFullContext(a,u,l,h,c,d){let m=this.getDecisionDescription(a,u),g=a.inputStream.getText(n.Interval.of(l,h)),v=`reportAttemptingFullContext d=${m}, input='${g}'`;a.notifyErrorListeners(v);}reportContextSensitivity(a,u,l,h,c,d){let m=this.getDecisionDescription(a,u),g=a.inputStream.getText(n.Interval.of(l,h)),v=`reportContextSensitivity d=${m}, input='${g}'`;a.notifyErrorListeners(v);}getDecisionDescription(a,u){let l=u.decision,h=u.atnStartState.ruleIndex,c=a.ruleNames;if(h<0||h>=c.length)return l.toString();let d=c[h];return d?`${l} (${d})`:l.toString()}getConflictingAlts(a,u){if(a!=null)return a;let l=new i.BitSet;for(let h of u)l.set(h.alt);return l}};e([s.Override],o.prototype,"syntaxError",null),e([s.Override,r(0,s.NotNull),r(1,s.NotNull),r(6,s.NotNull)],o.prototype,"reportAmbiguity",null),e([s.Override,r(0,s.NotNull),r(1,s.NotNull),r(5,s.NotNull)],o.prototype,"reportAttemptingFullContext",null),e([s.Override,r(0,s.NotNull),r(1,s.NotNull),r(5,s.NotNull)],o.prototype,"reportContextSensitivity",null),e([r(0,s.NotNull),r(1,s.NotNull)],o.prototype,"getDecisionDescription",null),e([s.NotNull,r(1,s.NotNull)],o.prototype,"getConflictingAlts",null),t.DiagnosticErrorListener=o;}),x8=re(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerInterpreter=void 0;var i=ln(),s=hc(),n=fe(),o=fe(),a=class extends i.Lexer{constructor(l,h,c,d,f,m,g){if(super(g),m.grammarType!==0)throw new Error("IllegalArgumentException: The ATN must be a lexer ATN.");this._grammarFileName=l,this._atn=m,this._ruleNames=c.slice(0),this._channelNames=d.slice(0),this._modeNames=f.slice(0),this._vocabulary=h,this._interp=new s.LexerATNSimulator(m,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}};e([n.NotNull],a.prototype,"_vocabulary",void 0),e([o.Override],a.prototype,"atn",null),e([o.Override],a.prototype,"grammarFileName",null),e([o.Override],a.prototype,"ruleNames",null),e([o.Override],a.prototype,"channelNames",null),e([o.Override],a.prototype,"modeNames",null),e([o.Override],a.prototype,"vocabulary",null),a=e([r(1,n.NotNull)],a),t.LexerInterpreter=a;}),b8=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),E8=re(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleContextWithAltNum=void 0;var r=ti(),i=fe(),s=$r(),n=class extends s.ParserRuleContext{constructor(o,a){a!==void 0?super(o,a):super(),this._altNumber=r.ATN.INVALID_ALT_NUMBER;}get altNumber(){return this._altNumber}set altNumber(o){this._altNumber=o;}};e([i.Override],n.prototype,"altNumber",null),t.RuleContextWithAltNum=n;}),C8=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RuleDependency=void 0;function e(r){return (i,s,n)=>{}}t.RuleDependency=e;}),T8=re(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RuleVersion=void 0;function e(r){return (i,s,n)=>{}}t.RuleVersion=e;}),A8=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),w8=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),D8=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),S8=re(t=>{var e=t&&t.__decorate||function(h,c,d,f){var m=arguments.length,g=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,d):f,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(h,c,d,f);else for(var x=h.length-1;x>=0;x--)(v=h[x])&&(g=(m<3?v(g):m>3?v(c,d,g):v(c,d))||g);return m>3&&g&&Object.defineProperty(c,d,g),g};Object.defineProperty(t,"__esModule",{value:!0}),t.RewriteOperation=t.TokenStreamRewriter=void 0;var r=mr(),i=fe(),s=At(),n=class{constructor(h){this.tokens=h,this.programs=new Map,this.programs.set(n.DEFAULT_PROGRAM_NAME,[]),this.lastRewriteTokenIndexes=new Map;}getTokenStream(){return this.tokens}rollback(h,c=n.DEFAULT_PROGRAM_NAME){let d=this.programs.get(c);d!=null&&this.programs.set(c,d.slice(n.MIN_TOKEN_INDEX,h));}deleteProgram(h=n.DEFAULT_PROGRAM_NAME){this.rollback(n.MIN_TOKEN_INDEX,h);}insertAfter(h,c,d=n.DEFAULT_PROGRAM_NAME){let f;typeof h=="number"?f=h:f=h.tokenIndex;let m=this.getProgram(d),g=new u(this.tokens,f,m.length,c);m.push(g);}insertBefore(h,c,d=n.DEFAULT_PROGRAM_NAME){let f;typeof h=="number"?f=h:f=h.tokenIndex;let m=this.getProgram(d),g=new a(this.tokens,f,m.length,c);m.push(g);}replaceSingle(h,c){typeof h=="number"?this.replace(h,h,c):this.replace(h,h,c);}replace(h,c,d,f=n.DEFAULT_PROGRAM_NAME){if(typeof h!="number"&&(h=h.tokenIndex),typeof c!="number"&&(c=c.tokenIndex),h>c||h<0||c<0||c>=this.tokens.size)throw new RangeError(`replace: range invalid: ${h}..${c}(size=${this.tokens.size})`);let m=this.getProgram(f),g=new l(this.tokens,h,c,m.length,d);m.push(g);}delete(h,c,d=n.DEFAULT_PROGRAM_NAME){c===void 0&&(c=h),typeof h=="number"?this.replace(h,c,"",d):this.replace(h,c,"",d);}getLastRewriteTokenIndex(h=n.DEFAULT_PROGRAM_NAME){let c=this.lastRewriteTokenIndexes.get(h);return c==null?-1:c}setLastRewriteTokenIndex(h,c){this.lastRewriteTokenIndexes.set(h,c);}getProgram(h){let c=this.programs.get(h);return c==null&&(c=this.initializeProgram(h)),c}initializeProgram(h){let c=[];return this.programs.set(h,c),c}getText(h,c=n.DEFAULT_PROGRAM_NAME){let d;h instanceof r.Interval?d=h:d=r.Interval.of(0,this.tokens.size-1),typeof h=="string"&&(c=h);let f=this.programs.get(c),m=d.a,g=d.b;if(g>this.tokens.size-1&&(g=this.tokens.size-1),m<0&&(m=0),f==null||f.length===0)return this.tokens.getText(d);let v=[],x=this.reduceToSingleOperationPerIndex(f),_=m;for(;_<=g&&_<this.tokens.size;){let E=x.get(_);x.delete(_);let b=this.tokens.get(_);E==null?(b.type!==s.Token.EOF&&v.push(String(b.text)),_++):_=E.execute(v);}if(g===this.tokens.size-1)for(let E of x.values())E.index>=this.tokens.size-1&&v.push(E.text.toString());return v.join("")}reduceToSingleOperationPerIndex(h){for(let d=0;d<h.length;d++){let f=h[d];if(f==null||!(f instanceof l))continue;let m=f,g=this.getKindOfOps(h,a,d);for(let x of g)x.index===m.index?(h[x.instructionIndex]=void 0,m.text=x.text.toString()+(m.text!=null?m.text.toString():"")):x.index>m.index&&x.index<=m.lastIndex&&(h[x.instructionIndex]=void 0);let v=this.getKindOfOps(h,l,d);for(let x of v){if(x.index>=m.index&&x.lastIndex<=m.lastIndex){h[x.instructionIndex]=void 0;continue}let _=x.lastIndex<m.index||x.index>m.lastIndex;if(x.text==null&&m.text==null&&!_)h[x.instructionIndex]=void 0,m.index=Math.min(x.index,m.index),m.lastIndex=Math.max(x.lastIndex,m.lastIndex);else if(!_)throw new Error(`replace op boundaries of ${m} overlap with previous ${x}`)}}for(let d=0;d<h.length;d++){let f=h[d];if(f==null||!(f instanceof a))continue;let m=f,g=this.getKindOfOps(h,a,d);for(let x of g)x.index===m.index&&(x instanceof u?(m.text=this.catOpText(x.text,m.text),h[x.instructionIndex]=void 0):x instanceof a&&(m.text=this.catOpText(m.text,x.text),h[x.instructionIndex]=void 0));let v=this.getKindOfOps(h,l,d);for(let x of v){if(m.index===x.index){x.text=this.catOpText(m.text,x.text),h[d]=void 0;continue}if(m.index>=x.index&&m.index<=x.lastIndex)throw new Error(`insert op ${m} within boundaries of previous ${x}`)}}let c=new Map;for(let d of h)if(d!=null){if(c.get(d.index)!=null)throw new Error("should only be one op per index");c.set(d.index,d);}return c}catOpText(h,c){let d="",f="";return h!=null&&(d=h.toString()),c!=null&&(f=c.toString()),d+f}getKindOfOps(h,c,d){let f=[];for(let m=0;m<d&&m<h.length;m++){let g=h[m];g!=null&&g instanceof c&&f.push(g);}return f}};t.TokenStreamRewriter=n,n.DEFAULT_PROGRAM_NAME="default",n.PROGRAM_INIT_SIZE=100,n.MIN_TOKEN_INDEX=0;var o=class{constructor(h,c,d,f){this.tokens=h,this.instructionIndex=d,this.index=c,this.text=f===void 0?"":f;}execute(h){return this.index}toString(){let h=this.constructor.name,c=h.indexOf("$");return h=h.substring(c+1,h.length),"<"+h+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}};e([i.Override],o.prototype,"toString",null),t.RewriteOperation=o;var a=class extends o{constructor(h,c,d,f){super(h,c,d,f);}execute(h){return h.push(this.text.toString()),this.tokens.get(this.index).type!==s.Token.EOF&&h.push(String(this.tokens.get(this.index).text)),this.index+1}};e([i.Override],a.prototype,"execute",null);var u=class extends a{constructor(h,c,d,f){super(h,c+1,d,f);}},l=class extends o{constructor(h,c,d,f,m){super(h,c,f,m),this.lastIndex=d;}execute(h){return this.text!=null&&h.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+'">'}};e([i.Override],l.prototype,"execute",null),e([i.Override],l.prototype,"toString",null);}),R8=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),N8=re(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),O8=re(t=>{var e=t&&t.__createBinding||(Object.create?function(i,s,n,o){o===void 0&&(o=n),Object.defineProperty(i,o,{enumerable:!0,get:function(){return s[n]}});}:function(i,s,n,o){o===void 0&&(o=n),i[o]=s[n];}),r=t&&t.__exportStar||function(i,s){for(var n in i)n!=="default"&&!Object.prototype.hasOwnProperty.call(s,n)&&e(s,i,n);};Object.defineProperty(t,"__esModule",{value:!0}),r(g7(),t),r(_7(),t),r(y7(),t),r(jb(),t),r(Lb(),t),r(_8(),t),r(Lp(),t),r(Ob(),t),r(Fb(),t),r(Ma(),t),r(Ap(),t),r(Pp(),t),r(_b(),t),r(kp(),t),r(y8(),t),r(v8(),t),r(sc(),t),r(oc(),t),r(kb(),t),r(rn(),t),r(ln(),t),r(x8(),t),r(cc(),t),r(Pb(),t),r(mc(),t),r(Va(),t),r(b8(),t),r(Mb(),t),r($r(),t),r(Dp(),t),r(Nb(),t),r(nn(),t),r(ja(),t),r(Sb(),t),r(E8(),t),r(C8(),t),r(T8(),t),r(At(),t),r(A8(),t),r(w8(),t),r(D8(),t),r(S8(),t),r(R8(),t),r(un(),t),r(N8(),t);}),F8=re(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h},r=t&&t.__param||function(n,o){return function(a,u){o(a,u,n);}};Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractParseTreeVisitor=void 0;var i=fe(),s=class{visit(n){return n.accept(this)}visitChildren(n){let o=this.defaultResult(),a=n.childCount;for(let u=0;u<a&&this.shouldVisitNextChild(n,o);u++){let h=n.getChild(u).accept(this);o=this.aggregateResult(o,h);}return o}visitTerminal(n){return this.defaultResult()}visitErrorNode(n){return this.defaultResult()}aggregateResult(n,o){return o}shouldVisitNextChild(n,o){return !0}};e([i.Override,r(0,i.NotNull)],s.prototype,"visit",null),e([i.Override,r(0,i.NotNull)],s.prototype,"visitChildren",null),e([i.Override,r(0,i.NotNull)],s.prototype,"visitTerminal",null),e([i.Override,r(0,i.NotNull)],s.prototype,"visitErrorNode",null),e([r(0,i.NotNull)],s.prototype,"shouldVisitNextChild",null),t.AbstractParseTreeVisitor=s;}),gr=re((t,e)=>{function r(g){return Array.isArray(g)?"["+g.join(", ")+"]":"null"}String.prototype.seed=String.prototype.seed||Math.round(Math.random()*Math.pow(2,32)),String.prototype.hashCode=function(){let g=this.toString(),v,x,_=g.length&3,E=g.length-_,b=String.prototype.seed,w=3432918353,D=461845907,N=0;for(;N<E;)x=g.charCodeAt(N)&255|(g.charCodeAt(++N)&255)<<8|(g.charCodeAt(++N)&255)<<16|(g.charCodeAt(++N)&255)<<24,++N,x=(x&65535)*w+(((x>>>16)*w&65535)<<16)&4294967295,x=x<<15|x>>>17,x=(x&65535)*D+(((x>>>16)*D&65535)<<16)&4294967295,b^=x,b=b<<13|b>>>19,v=(b&65535)*5+(((b>>>16)*5&65535)<<16)&4294967295,b=(v&65535)+27492+(((v>>>16)+58964&65535)<<16);switch(x=0,_){case 3:x^=(g.charCodeAt(N+2)&255)<<16;case 2:x^=(g.charCodeAt(N+1)&255)<<8;case 1:x^=g.charCodeAt(N)&255,x=(x&65535)*w+(((x>>>16)*w&65535)<<16)&4294967295,x=x<<15|x>>>17,x=(x&65535)*D+(((x>>>16)*D&65535)<<16)&4294967295,b^=x;}return b^=g.length,b^=b>>>16,b=(b&65535)*2246822507+(((b>>>16)*2246822507&65535)<<16)&4294967295,b^=b>>>13,b=(b&65535)*3266489909+(((b>>>16)*3266489909&65535)<<16)&4294967295,b^=b>>>16,b>>>0};function i(g,v){return g?g.equals(v):g==v}function s(g){return g?g.hashCode():-1}var n=class{constructor(g,v){this.data={},this.hashFunction=g||s,this.equalsFunction=v||i;}add(g){let x="hash_"+this.hashFunction(g);if(x in this.data){let _=this.data[x];for(let E=0;E<_.length;E++)if(this.equalsFunction(g,_[E]))return _[E];return _.push(g),g}else return this.data[x]=[g],g}contains(g){return this.get(g)!=null}get(g){let x="hash_"+this.hashFunction(g);if(x in this.data){let _=this.data[x];for(let E=0;E<_.length;E++)if(this.equalsFunction(g,_[E]))return _[E]}return null}values(){let g=[];for(let v in this.data)v.indexOf("hash_")===0&&(g=g.concat(this.data[v]));return g}toString(){return r(this.values())}get length(){let g=0;for(let v in this.data)v.indexOf("hash_")===0&&(g=g+this.data[v].length);return g}},o=class{constructor(){this.data=[];}add(g){this.data[g]=!0;}or(g){let v=this;Object.keys(g.data).map(function(x){v.add(x);});}remove(g){delete this.data[g];}contains(g){return this.data[g]===!0}values(){return Object.keys(this.data)}minValue(){return Math.min.apply(null,this.values())}hashCode(){let g=new h;return g.update(this.values()),g.finish()}equals(g){return g instanceof o?this.hashCode()===g.hashCode():!1}toString(){return "{"+this.values().join(", ")+"}"}get length(){return this.values().length}},a=class{constructor(g,v){this.data={},this.hashFunction=g||s,this.equalsFunction=v||i;}put(g,v){let x="hash_"+this.hashFunction(g);if(x in this.data){let _=this.data[x];for(let E=0;E<_.length;E++){let b=_[E];if(this.equalsFunction(g,b.key)){let w=b.value;return b.value=v,w}}return _.push({key:g,value:v}),v}else return this.data[x]=[{key:g,value:v}],v}containsKey(g){let v="hash_"+this.hashFunction(g);if(v in this.data){let x=this.data[v];for(let _=0;_<x.length;_++){let E=x[_];if(this.equalsFunction(g,E.key))return !0}}return !1}get(g){let v="hash_"+this.hashFunction(g);if(v in this.data){let x=this.data[v];for(let _=0;_<x.length;_++){let E=x[_];if(this.equalsFunction(g,E.key))return E.value}}return null}entries(){let g=[];for(let v in this.data)v.indexOf("hash_")===0&&(g=g.concat(this.data[v]));return g}getKeys(){return this.entries().map(function(g){return g.key})}getValues(){return this.entries().map(function(g){return g.value})}toString(){return "["+this.entries().map(function(v){return "{"+v.key+":"+v.value+"}"}).join(", ")+"]"}get length(){let g=0;for(let v in this.data)v.indexOf("hash_")===0&&(g=g+this.data[v].length);return g}},u=class{constructor(){this.data={};}get(g){return g="k-"+g,g in this.data?this.data[g]:null}put(g,v){g="k-"+g,this.data[g]=v;}values(){let g=this.data;return Object.keys(this.data).map(function(x){return g[x]})}},l=class{constructor(g){this.defaultMapCtor=g||a,this.cacheMap=new this.defaultMapCtor;}get(g,v){let x=this.cacheMap.get(g)||null;return x===null?null:x.get(v)||null}set(g,v,x){let _=this.cacheMap.get(g)||null;_===null&&(_=new this.defaultMapCtor,this.cacheMap.put(g,_)),_.put(v,x);}},h=class{constructor(){this.count=0,this.hash=0;}update(){for(let g=0;g<arguments.length;g++){let v=arguments[g];if(v!=null)if(Array.isArray(v))this.update.apply(this,v);else {let x=0;switch(typeof v){case"undefined":case"function":continue;case"number":case"boolean":x=v;break;case"string":x=v.hashCode();break;default:v.updateHashCode?v.updateHashCode(this):console.log("No updateHashCode for "+v.toString());continue}x=x*3432918353,x=x<<15|x>>>17,x=x*461845907,this.count=this.count+1;let _=this.hash^x;_=_<<13|_>>>19,_=_*5+3864292196,this.hash=_;}}}finish(){let g=this.hash^this.count*4;return g=g^g>>>16,g=g*2246822507,g=g^g>>>13,g=g*3266489909,g=g^g>>>16,g}};function c(){let g=new h;return g.update.apply(g,arguments),g.finish()}function d(g,v){return g=g.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),v&&(g=g.replace(/ /g,"\xB7")),g}function f(g){return g.replace(/\w\S*/g,function(v){return v.charAt(0).toUpperCase()+v.substr(1)})}function m(g,v){if(!Array.isArray(g)||!Array.isArray(v))return !1;if(g===v)return !0;if(g.length!==v.length)return !1;for(let x=0;x<g.length;x++)if(g[x]!==v[x]&&(!g[x].equals||!g[x].equals(v[x])))return !1;return !0}e.exports={Hash:h,Set:n,Map:a,BitSet:o,AltDict:u,DoubleDict:l,hashStuff:c,escapeWhitespace:d,arrayToString:r,titleCase:f,equalArrays:m};}),$t=re((t,e)=>{var r=class{constructor(){this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null;}getTokenSource(){return this.source[0]}getInputStream(){return this.source[1]}get text(){return this._text}set text(s){this._text=s;}};r.INVALID_TYPE=0,r.EPSILON=-2,r.MIN_USER_TOKEN_TYPE=1,r.EOF=-1,r.DEFAULT_CHANNEL=0,r.HIDDEN_CHANNEL=1;var i=class extends r{constructor(s,n,o,a,u){super(),this.source=s!==void 0?s:i.EMPTY_SOURCE,this.type=n!==void 0?n:null,this.channel=o!==void 0?o:r.DEFAULT_CHANNEL,this.start=a!==void 0?a:-1,this.stop=u!==void 0?u:-1,this.tokenIndex=-1,this.source[0]!==null?(this.line=s[0].line,this.column=s[0].column):this.column=-1;}clone(){let s=new i(this.source,this.type,this.channel,this.start,this.stop);return s.tokenIndex=this.tokenIndex,s.line=this.line,s.column=this.column,s.text=this.text,s}toString(){let s=this.text;return s!==null?s=s.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):s="<no text>","[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+s+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"}get text(){if(this._text!==null)return this._text;let s=this.getInputStream();if(s===null)return null;let n=s.size;return this.start<n&&this.stop<n?s.getText(this.start,this.stop):"<EOF>"}set text(s){this._text=s;}};i.EMPTY_SOURCE=[null,null],e.exports={Token:r,CommonToken:i};}),cn=re((t,e)=>{var r=class{constructor(){this.atn=null,this.stateNumber=r.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null;}toString(){return this.stateNumber}equals(x){return x instanceof r?this.stateNumber===x.stateNumber:!1}isNonGreedyExitState(){return !1}addTransition(x,_){_===void 0&&(_=-1),this.transitions.length===0?this.epsilonOnlyTransitions=x.isEpsilon:this.epsilonOnlyTransitions!==x.isEpsilon&&(this.epsilonOnlyTransitions=!1),_===-1?this.transitions.push(x):this.transitions.splice(_,1,x);}};r.INVALID_TYPE=0,r.BASIC=1,r.RULE_START=2,r.BLOCK_START=3,r.PLUS_BLOCK_START=4,r.STAR_BLOCK_START=5,r.TOKEN_START=6,r.RULE_STOP=7,r.BLOCK_END=8,r.STAR_LOOP_BACK=9,r.STAR_LOOP_ENTRY=10,r.PLUS_LOOP_BACK=11,r.LOOP_END=12,r.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],r.INVALID_STATE_NUMBER=-1;var i=class extends r{constructor(){super(),this.stateType=r.BASIC;}},s=class extends r{constructor(){return super(),this.decision=-1,this.nonGreedy=!1,this}},n=class extends s{constructor(){return super(),this.endState=null,this}},o=class extends n{constructor(){return super(),this.stateType=r.BLOCK_START,this}},a=class extends r{constructor(){return super(),this.stateType=r.BLOCK_END,this.startState=null,this}},u=class extends r{constructor(){return super(),this.stateType=r.RULE_STOP,this}},l=class extends r{constructor(){return super(),this.stateType=r.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}},h=class extends s{constructor(){return super(),this.stateType=r.PLUS_LOOP_BACK,this}},c=class extends n{constructor(){return super(),this.stateType=r.PLUS_BLOCK_START,this.loopBackState=null,this}},d=class extends n{constructor(){return super(),this.stateType=r.STAR_BLOCK_START,this}},f=class extends r{constructor(){return super(),this.stateType=r.STAR_LOOP_BACK,this}},m=class extends s{constructor(){return super(),this.stateType=r.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}},g=class extends r{constructor(){return super(),this.stateType=r.LOOP_END,this.loopBackState=null,this}},v=class extends s{constructor(){return super(),this.stateType=r.TOKEN_START,this}};e.exports={ATNState:r,BasicState:i,DecisionState:s,BlockStartState:n,BlockEndState:a,LoopEndState:g,RuleStartState:l,RuleStopState:u,TokensStartState:v,PlusLoopbackState:h,StarLoopbackState:f,StarLoopEntryState:m,PlusBlockStartState:c,StarBlockStartState:d,BasicBlockStartState:o};}),$a=re((t,e)=>{var{Set:r,Hash:i,equalArrays:s}=gr(),n=class{hashCode(){let h=new i;return this.updateHashCode(h),h.finish()}evaluate(h,c){}evalPrecedence(h,c){return this}static andContext(h,c){if(h===null||h===n.NONE)return c;if(c===null||c===n.NONE)return h;let d=new u(h,c);return d.opnds.length===1?d.opnds[0]:d}static orContext(h,c){if(h===null)return c;if(c===null)return h;if(h===n.NONE||c===n.NONE)return n.NONE;let d=new l(h,c);return d.opnds.length===1?d.opnds[0]:d}},o=class extends n{constructor(h,c,d){super(),this.ruleIndex=h===void 0?-1:h,this.predIndex=c===void 0?-1:c,this.isCtxDependent=d===void 0?!1:d;}evaluate(h,c){let d=this.isCtxDependent?c:null;return h.sempred(d,this.ruleIndex,this.predIndex)}updateHashCode(h){h.update(this.ruleIndex,this.predIndex,this.isCtxDependent);}equals(h){return this===h?!0:h instanceof o?this.ruleIndex===h.ruleIndex&&this.predIndex===h.predIndex&&this.isCtxDependent===h.isCtxDependent:!1}toString(){return "{"+this.ruleIndex+":"+this.predIndex+"}?"}};n.NONE=new o;var a=class extends n{constructor(h){super(),this.precedence=h===void 0?0:h;}evaluate(h,c){return h.precpred(c,this.precedence)}evalPrecedence(h,c){return h.precpred(c,this.precedence)?n.NONE:null}compareTo(h){return this.precedence-h.precedence}updateHashCode(h){h.update(this.precedence);}equals(h){return this===h?!0:h instanceof a?this.precedence===h.precedence:!1}toString(){return "{"+this.precedence+">=prec}?"}static filterPrecedencePredicates(h){let c=[];return h.values().map(function(d){d instanceof a&&c.push(d);}),c}},u=class extends n{constructor(h,c){super();let d=new r;h instanceof u?h.opnds.map(function(m){d.add(m);}):d.add(h),c instanceof u?c.opnds.map(function(m){d.add(m);}):d.add(c);let f=a.filterPrecedencePredicates(d);if(f.length>0){let m=null;f.map(function(g){(m===null||g.precedence<m.precedence)&&(m=g);}),d.add(m);}this.opnds=Array.from(d.values());}equals(h){return this===h?!0:h instanceof u?s(this.opnds,h.opnds):!1}updateHashCode(h){h.update(this.opnds,"AND");}evaluate(h,c){for(let d=0;d<this.opnds.length;d++)if(!this.opnds[d].evaluate(h,c))return !1;return !0}evalPrecedence(h,c){let d=!1,f=[];for(let g=0;g<this.opnds.length;g++){let v=this.opnds[g],x=v.evalPrecedence(h,c);if(d|=x!==v,x===null)return null;x!==n.NONE&&f.push(x);}if(!d)return this;if(f.length===0)return n.NONE;let m=null;return f.map(function(g){m=m===null?g:n.andContext(m,g);}),m}toString(){let h=this.opnds.map(c=>c.toString());return (h.length>3?h.slice(3):h).join("&&")}},l=class extends n{constructor(h,c){super();let d=new r;h instanceof l?h.opnds.map(function(m){d.add(m);}):d.add(h),c instanceof l?c.opnds.map(function(m){d.add(m);}):d.add(c);let f=a.filterPrecedencePredicates(d);if(f.length>0){let m=f.sort(function(v,x){return v.compareTo(x)}),g=m[m.length-1];d.add(g);}this.opnds=Array.from(d.values());}equals(h){return this===h?!0:h instanceof l?s(this.opnds,h.opnds):!1}updateHashCode(h){h.update(this.opnds,"OR");}evaluate(h,c){for(let d=0;d<this.opnds.length;d++)if(this.opnds[d].evaluate(h,c))return !0;return !1}evalPrecedence(h,c){let d=!1,f=[];for(let g=0;g<this.opnds.length;g++){let v=this.opnds[g],x=v.evalPrecedence(h,c);if(d|=x!==v,x===n.NONE)return n.NONE;x!==null&&f.push(x);}if(!d)return this;if(f.length===0)return null;let m=null;return m}toString(){let h=this.opnds.map(c=>c.toString());return (h.length>3?h.slice(3):h).join("||")}};e.exports={SemanticContext:n,PrecedencePredicate:a,Predicate:o};}),gc=re((t,e)=>{var{DecisionState:r}=cn(),{SemanticContext:i}=$a(),{Hash:s}=gr();function n(u,l){if(u===null){let h={state:null,alt:null,context:null,semanticContext:null};return l&&(h.reachesIntoOuterContext=0),h}else {let h={};return h.state=u.state||null,h.alt=u.alt===void 0?null:u.alt,h.context=u.context||null,h.semanticContext=u.semanticContext||null,l&&(h.reachesIntoOuterContext=u.reachesIntoOuterContext||0,h.precedenceFilterSuppressed=u.precedenceFilterSuppressed||!1),h}}var o=class{constructor(u,l){this.checkContext(u,l),u=n(u),l=n(l,!0),this.state=u.state!==null?u.state:l.state,this.alt=u.alt!==null?u.alt:l.alt,this.context=u.context!==null?u.context:l.context,this.semanticContext=u.semanticContext!==null?u.semanticContext:l.semanticContext!==null?l.semanticContext:i.NONE,this.reachesIntoOuterContext=l.reachesIntoOuterContext,this.precedenceFilterSuppressed=l.precedenceFilterSuppressed;}checkContext(u,l){(u.context===null||u.context===void 0)&&(l===null||l.context===null||l.context===void 0)&&(this.context=null);}hashCode(){let u=new s;return this.updateHashCode(u),u.finish()}updateHashCode(u){u.update(this.state.stateNumber,this.alt,this.context,this.semanticContext);}equals(u){return this===u?!0:u instanceof o?this.state.stateNumber===u.state.stateNumber&&this.alt===u.alt&&(this.context===null?u.context===null:this.context.equals(u.context))&&this.semanticContext.equals(u.semanticContext)&&this.precedenceFilterSuppressed===u.precedenceFilterSuppressed:!1}hashCodeForConfigSet(){let u=new s;return u.update(this.state.stateNumber,this.alt,this.semanticContext),u.finish()}equalsForConfigSet(u){return this===u?!0:u instanceof o?this.state.stateNumber===u.state.stateNumber&&this.alt===u.alt&&this.semanticContext.equals(u.semanticContext):!1}toString(){return "("+this.state+","+this.alt+(this.context!==null?",["+this.context.toString()+"]":"")+(this.semanticContext!==i.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}},a=class extends o{constructor(u,l){super(u,l);let h=u.lexerActionExecutor||null;return this.lexerActionExecutor=h||(l!==null?l.lexerActionExecutor:null),this.passedThroughNonGreedyDecision=l!==null?this.checkNonGreedyDecision(l,this.state):!1,this.hashCodeForConfigSet=a.prototype.hashCode,this.equalsForConfigSet=a.prototype.equals,this}updateHashCode(u){u.update(this.state.stateNumber,this.alt,this.context,this.semanticContext,this.passedThroughNonGreedyDecision,this.lexerActionExecutor);}equals(u){return this===u||u instanceof a&&this.passedThroughNonGreedyDecision===u.passedThroughNonGreedyDecision&&(this.lexerActionExecutor?this.lexerActionExecutor.equals(u.lexerActionExecutor):!u.lexerActionExecutor)&&super.equals(u)}checkNonGreedyDecision(u,l){return u.passedThroughNonGreedyDecision||l instanceof r&&l.nonGreedy}};e.exports.ATNConfig=o,e.exports.LexerATNConfig=a;}),Ar=re((t,e)=>{var{Token:r}=$t(),i=class{constructor(n,o){this.start=n,this.stop=o;}contains(n){return n>=this.start&&n<this.stop}toString(){return this.start===this.stop-1?this.start.toString():this.start.toString()+".."+(this.stop-1).toString()}get length(){return this.stop-this.start}},s=class{constructor(){this.intervals=null,this.readOnly=!1;}first(n){return this.intervals===null||this.intervals.length===0?r.INVALID_TYPE:this.intervals[0].start}addOne(n){this.addInterval(new i(n,n+1));}addRange(n,o){this.addInterval(new i(n,o+1));}addInterval(n){if(this.intervals===null)this.intervals=[],this.intervals.push(n);else {for(let o=0;o<this.intervals.length;o++){let a=this.intervals[o];if(n.stop<a.start){this.intervals.splice(o,0,n);return}else if(n.stop===a.start){this.intervals[o].start=n.start;return}else if(n.start<=a.stop){this.intervals[o]=new i(Math.min(a.start,n.start),Math.max(a.stop,n.stop)),this.reduce(o);return}}this.intervals.push(n);}}addSet(n){return n.intervals!==null&&n.intervals.forEach(o=>this.addInterval(o),this),this}reduce(n){if(n<this.intervals.length-1){let o=this.intervals[n],a=this.intervals[n+1];o.stop>=a.stop?(this.intervals.splice(n+1,1),this.reduce(n)):o.stop>=a.start&&(this.intervals[n]=new i(o.start,a.stop),this.intervals.splice(n+1,1));}}complement(n,o){let a=new s;return a.addInterval(new i(n,o+1)),this.intervals!==null&&this.intervals.forEach(u=>a.removeRange(u)),a}contains(n){if(this.intervals===null)return !1;for(let o=0;o<this.intervals.length;o++)if(this.intervals[o].contains(n))return !0;return !1}removeRange(n){if(n.start===n.stop-1)this.removeOne(n.start);else if(this.intervals!==null){let o=0;for(let a=0;a<this.intervals.length;a++){let u=this.intervals[o];if(n.stop<=u.start)return;if(n.start>u.start&&n.stop<u.stop){this.intervals[o]=new i(u.start,n.start);let l=new i(n.stop,u.stop);this.intervals.splice(o,0,l);return}else n.start<=u.start&&n.stop>=u.stop?(this.intervals.splice(o,1),o=o-1):n.start<u.stop?this.intervals[o]=new i(u.start,n.start):n.stop<u.stop&&(this.intervals[o]=new i(n.stop,u.stop));o+=1;}}}removeOne(n){if(this.intervals!==null)for(let o=0;o<this.intervals.length;o++){let a=this.intervals[o];if(n<a.start)return;if(n===a.start&&n===a.stop-1){this.intervals.splice(o,1);return}else if(n===a.start){this.intervals[o]=new i(a.start+1,a.stop);return}else if(n===a.stop-1){this.intervals[o]=new i(a.start,a.stop-1);return}else if(n<a.stop-1){let u=new i(a.start,n);a.start=n+1,this.intervals.splice(o,0,u);return}}}toString(n,o,a){return n=n||null,o=o||null,a=a||!1,this.intervals===null?"{}":n!==null||o!==null?this.toTokenString(n,o):a?this.toCharString():this.toIndexString()}toCharString(){let n=[];for(let o=0;o<this.intervals.length;o++){let a=this.intervals[o];a.stop===a.start+1?a.start===r.EOF?n.push("<EOF>"):n.push("'"+String.fromCharCode(a.start)+"'"):n.push("'"+String.fromCharCode(a.start)+"'..'"+String.fromCharCode(a.stop-1)+"'");}return n.length>1?"{"+n.join(", ")+"}":n[0]}toIndexString(){let n=[];for(let o=0;o<this.intervals.length;o++){let a=this.intervals[o];a.stop===a.start+1?a.start===r.EOF?n.push("<EOF>"):n.push(a.start.toString()):n.push(a.start.toString()+".."+(a.stop-1).toString());}return n.length>1?"{"+n.join(", ")+"}":n[0]}toTokenString(n,o){let a=[];for(let u=0;u<this.intervals.length;u++){let l=this.intervals[u];for(let h=l.start;h<l.stop;h++)a.push(this.elementName(n,o,h));}return a.length>1?"{"+a.join(", ")+"}":a[0]}elementName(n,o,a){return a===r.EOF?"<EOF>":a===r.EPSILON?"<EPSILON>":n[a]||o[a]}get length(){return this.intervals.map(n=>n.length).reduce((n,o)=>n+o)}};e.exports={Interval:i,IntervalSet:s};}),za=re((t,e)=>{var{Token:r}=$t(),{IntervalSet:i}=Ar(),{Predicate:s,PrecedencePredicate:n}=$a(),o=class{constructor(_){if(_==null)throw "target cannot be null.";this.target=_,this.isEpsilon=!1,this.label=null;}};o.EPSILON=1,o.RANGE=2,o.RULE=3,o.PREDICATE=4,o.ATOM=5,o.ACTION=6,o.SET=7,o.NOT_SET=8,o.WILDCARD=9,o.PRECEDENCE=10,o.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],o.serializationTypes={EpsilonTransition:o.EPSILON,RangeTransition:o.RANGE,RuleTransition:o.RULE,PredicateTransition:o.PREDICATE,AtomTransition:o.ATOM,ActionTransition:o.ACTION,SetTransition:o.SET,NotSetTransition:o.NOT_SET,WildcardTransition:o.WILDCARD,PrecedencePredicateTransition:o.PRECEDENCE};var a=class extends o{constructor(_,E){super(_),this.label_=E,this.label=this.makeLabel(),this.serializationType=o.ATOM;}makeLabel(){let _=new i;return _.addOne(this.label_),_}matches(_,E,b){return this.label_===_}toString(){return this.label_}},u=class extends o{constructor(_,E,b,w){super(_),this.ruleIndex=E,this.precedence=b,this.followState=w,this.serializationType=o.RULE,this.isEpsilon=!0;}matches(_,E,b){return !1}},l=class extends o{constructor(_,E){super(_),this.serializationType=o.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=E;}matches(_,E,b){return !1}toString(){return "epsilon"}},h=class extends o{constructor(_,E,b){super(_),this.serializationType=o.RANGE,this.start=E,this.stop=b,this.label=this.makeLabel();}makeLabel(){let _=new i;return _.addRange(this.start,this.stop),_}matches(_,E,b){return _>=this.start&&_<=this.stop}toString(){return "'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"}},c=class extends o{constructor(_){super(_);}},d=class extends c{constructor(_,E,b,w){super(_),this.serializationType=o.PREDICATE,this.ruleIndex=E,this.predIndex=b,this.isCtxDependent=w,this.isEpsilon=!0;}matches(_,E,b){return !1}getPredicate(){return new s(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return "pred_"+this.ruleIndex+":"+this.predIndex}},f=class extends o{constructor(_,E,b,w){super(_),this.serializationType=o.ACTION,this.ruleIndex=E,this.actionIndex=b===void 0?-1:b,this.isCtxDependent=w===void 0?!1:w,this.isEpsilon=!0;}matches(_,E,b){return !1}toString(){return "action_"+this.ruleIndex+":"+this.actionIndex}},m=class extends o{constructor(_,E){super(_),this.serializationType=o.SET,E!=null?this.label=E:(this.label=new i,this.label.addOne(r.INVALID_TYPE));}matches(_,E,b){return this.label.contains(_)}toString(){return this.label.toString()}},g=class extends m{constructor(_,E){super(_,E),this.serializationType=o.NOT_SET;}matches(_,E,b){return _>=E&&_<=b&&!super.matches(_,E,b)}toString(){return "~"+super.toString()}},v=class extends o{constructor(_){super(_),this.serializationType=o.WILDCARD;}matches(_,E,b){return _>=E&&_<=b}toString(){return "."}},x=class extends c{constructor(_,E){super(_),this.serializationType=o.PRECEDENCE,this.precedence=E,this.isEpsilon=!0;}matches(_,E,b){return !1}getPredicate(){return new n(this.precedence)}toString(){return this.precedence+" >= _p"}};e.exports={Transition:o,AtomTransition:a,SetTransition:m,NotSetTransition:g,RuleTransition:u,ActionTransition:f,EpsilonTransition:l,RangeTransition:h,WildcardTransition:v,PredicateTransition:d,PrecedencePredicateTransition:x,AbstractPredicateTransition:c};}),so=re((t,e)=>{var{Token:r}=$t(),{Interval:i}=Ar(),s=new i(-1,-2),n=class{},o=class extends n{constructor(){super();}},a=class extends o{constructor(){super();}},u=class extends a{constructor(){super();}getRuleContext(){throw new Error("missing interface implementation")}},l=class extends a{constructor(){super();}},h=class extends l{constructor(){super();}},c=class{visit(v){return Array.isArray(v)?v.map(function(x){return x.accept(this)},this):v.accept(this)}visitChildren(v){return v.children?this.visit(v.children):null}visitTerminal(v){}visitErrorNode(v){}},d=class{visitTerminal(v){}visitErrorNode(v){}enterEveryRule(v){}exitEveryRule(v){}},f=class extends l{constructor(v){super(),this.parentCtx=null,this.symbol=v;}getChild(v){return null}getSymbol(){return this.symbol}getParent(){return this.parentCtx}getPayload(){return this.symbol}getSourceInterval(){if(this.symbol===null)return s;let v=this.symbol.tokenIndex;return new i(v,v)}getChildCount(){return 0}accept(v){return v.visitTerminal(this)}getText(){return this.symbol.text}toString(){return this.symbol.type===r.EOF?"<EOF>":this.symbol.text}},m=class extends f{constructor(v){super(v);}isErrorNode(){return !0}accept(v){return v.visitErrorNode(this)}},g=class{walk(v,x){if(x instanceof h||x.isErrorNode!==void 0&&x.isErrorNode())v.visitErrorNode(x);else if(x instanceof l)v.visitTerminal(x);else {this.enterRule(v,x);for(let E=0;E<x.getChildCount();E++){let b=x.getChild(E);this.walk(v,b);}this.exitRule(v,x);}}enterRule(v,x){let _=x.getRuleContext();v.enterEveryRule(_),_.enterRule(v);}exitRule(v,x){let _=x.getRuleContext();_.exitRule(v),v.exitEveryRule(_);}};g.DEFAULT=new g,e.exports={RuleNode:u,ErrorNode:h,TerminalNode:l,ErrorNodeImpl:m,TerminalNodeImpl:f,ParseTreeListener:d,ParseTreeVisitor:c,ParseTreeWalker:g,INVALID_INTERVAL:s};}),qb=re((t,e)=>{var r=gr(),{Token:i}=$t(),{ErrorNode:s,TerminalNode:n,RuleNode:o}=so(),a={toStringTree:function(u,l,h){l=l||null,h=h||null,h!==null&&(l=h.ruleNames);let c=a.getNodeText(u,l);c=r.escapeWhitespace(c,!1);let d=u.getChildCount();if(d===0)return c;let f="("+c+" ";d>0&&(c=a.toStringTree(u.getChild(0),l),f=f.concat(c));for(let m=1;m<d;m++)c=a.toStringTree(u.getChild(m),l),f=f.concat(" "+c);return f=f.concat(")"),f},getNodeText:function(u,l,h){if(l=l||null,h=h||null,h!==null&&(l=h.ruleNames),l!==null)if(u instanceof o){let f=u.getRuleContext().getAltNumber();return f!=0?l[u.ruleIndex]+":"+f:l[u.ruleIndex]}else {if(u instanceof s)return u.toString();if(u instanceof n&&u.symbol!==null)return u.symbol.text}let c=u.getPayload();return c instanceof i?c.text:u.getPayload().toString()},getChildren:function(u){let l=[];for(let h=0;h<u.getChildCount();h++)l.push(u.getChild(h));return l},getAncestors:function(u){let l=[];for(u=u.getParent();u!==null;)l=[u].concat(l),u=u.getParent();return l},findAllTokenNodes:function(u,l){return a.findAllNodes(u,l,!0)},findAllRuleNodes:function(u,l){return a.findAllNodes(u,l,!1)},findAllNodes:function(u,l,h){let c=[];return a._findAllNodes(u,l,h,c),c},_findAllNodes:function(u,l,h,c){h&&u instanceof n?u.symbol.type===l&&c.push(u):!h&&u instanceof o&&u.ruleIndex===l&&c.push(u);for(let d=0;d<u.getChildCount();d++)a._findAllNodes(u.getChild(d),l,h,c);},descendants:function(u){let l=[u];for(let h=0;h<u.getChildCount();h++)l=l.concat(a.descendants(u.getChild(h)));return l}};e.exports=a;}),Mp=re((t,e)=>{var{RuleNode:r}=so(),{INVALID_INTERVAL:i}=so(),s=qb(),n=class extends r{constructor(o,a){super(),this.parentCtx=o||null,this.invokingState=a||-1;}depth(){let o=0,a=this;for(;a!==null;)a=a.parentCtx,o+=1;return o}isEmpty(){return this.invokingState===-1}getSourceInterval(){return i}getRuleContext(){return this}getPayload(){return this}getText(){return this.getChildCount()===0?"":this.children.map(function(o){return o.getText()}).join("")}getAltNumber(){return 0}setAltNumber(o){}getChild(o){return null}getChildCount(){return 0}accept(o){return o.visitChildren(this)}toStringTree(o,a){return s.toStringTree(this,o,a)}toString(o,a){o=o||null,a=a||null;let u=this,l="[";for(;u!==null&&u!==a;){if(o===null)u.isEmpty()||(l+=u.invokingState);else {let h=u.ruleIndex,c=h>=0&&h<o.length?o[h]:""+h;l+=c;}u.parentCtx!==null&&(o!==null||!u.parentCtx.isEmpty())&&(l+=" "),u=u.parentCtx;}return l+="]",l}};e.exports=n;}),Xi=re((t,e)=>{var r=Mp(),{Hash:i,Map:s,equalArrays:n}=gr(),o=class{constructor(_){this.cachedHashCode=_;}isEmpty(){return this===o.EMPTY}hasEmptyPath(){return this.getReturnState(this.length-1)===o.EMPTY_RETURN_STATE}hashCode(){return this.cachedHashCode}updateHashCode(_){_.update(this.cachedHashCode);}};o.EMPTY=null,o.EMPTY_RETURN_STATE=2147483647,o.globalNodeCount=1,o.id=o.globalNodeCount;var a=class{constructor(){this.cache=new s;}add(_){if(_===o.EMPTY)return o.EMPTY;let E=this.cache.get(_)||null;return E!==null?E:(this.cache.put(_,_),_)}get(_){return this.cache.get(_)||null}get length(){return this.cache.length}},u=class extends o{constructor(_,E){let b=0,w=new i;_!==null?w.update(_,E):w.update(1),b=w.finish(),super(b),this.parentCtx=_,this.returnState=E;}getParent(_){return this.parentCtx}getReturnState(_){return this.returnState}equals(_){return this===_?!0:_ instanceof u?this.hashCode()!==_.hashCode()||this.returnState!==_.returnState?!1:this.parentCtx==null?_.parentCtx==null:this.parentCtx.equals(_.parentCtx):!1}toString(){let _=this.parentCtx===null?"":this.parentCtx.toString();return _.length===0?this.returnState===o.EMPTY_RETURN_STATE?"$":""+this.returnState:""+this.returnState+" "+_}get length(){return 1}static create(_,E){return E===o.EMPTY_RETURN_STATE&&_===null?o.EMPTY:new u(_,E)}},l=class extends u{constructor(){super(null,o.EMPTY_RETURN_STATE);}isEmpty(){return !0}getParent(_){return null}getReturnState(_){return this.returnState}equals(_){return this===_}toString(){return "$"}};o.EMPTY=new l;var h=class extends o{constructor(_,E){let b=new i;b.update(_,E);let w=b.finish();return super(w),this.parents=_,this.returnStates=E,this}isEmpty(){return this.returnStates[0]===o.EMPTY_RETURN_STATE}getParent(_){return this.parents[_]}getReturnState(_){return this.returnStates[_]}equals(_){return this===_?!0:_ instanceof h?this.hashCode()!==_.hashCode()?!1:n(this.returnStates,_.returnStates)&&n(this.parents,_.parents):!1}toString(){if(this.isEmpty())return "[]";{let _="[";for(let E=0;E<this.returnStates.length;E++){if(E>0&&(_=_+", "),this.returnStates[E]===o.EMPTY_RETURN_STATE){_=_+"$";continue}_=_+this.returnStates[E],this.parents[E]!==null?_=_+" "+this.parents[E]:_=_+"null";}return _+"]"}}get length(){return this.returnStates.length}};function c(_,E){if(E==null&&(E=r.EMPTY),E.parentCtx===null||E===r.EMPTY)return o.EMPTY;let b=c(_,E.parentCtx),D=_.states[E.invokingState].transitions[0];return u.create(b,D.followState.stateNumber)}function d(_,E,b,w){if(_===E)return _;if(_ instanceof u&&E instanceof u)return f(_,E,b,w);if(b){if(_ instanceof l)return _;if(E instanceof l)return E}return _ instanceof u&&(_=new h([_.getParent()],[_.returnState])),E instanceof u&&(E=new h([E.getParent()],[E.returnState])),g(_,E,b,w)}function f(_,E,b,w){if(w!==null){let N=w.get(_,E);if(N!==null||(N=w.get(E,_),N!==null))return N}let D=m(_,E,b);if(D!==null)return w!==null&&w.set(_,E,D),D;if(_.returnState===E.returnState){let N=d(_.parentCtx,E.parentCtx,b,w);if(N===_.parentCtx)return _;if(N===E.parentCtx)return E;let F=u.create(N,_.returnState);return w!==null&&w.set(_,E,F),F}else {let N=null;if((_===E||_.parentCtx!==null&&_.parentCtx===E.parentCtx)&&(N=_.parentCtx),N!==null){let te=[_.returnState,E.returnState];_.returnState>E.returnState&&(te[0]=E.returnState,te[1]=_.returnState);let ae=[N,N],k=new h(ae,te);return w!==null&&w.set(_,E,k),k}let F=[_.returnState,E.returnState],V=[_.parentCtx,E.parentCtx];_.returnState>E.returnState&&(F[0]=E.returnState,F[1]=_.returnState,V=[E.parentCtx,_.parentCtx]);let Z=new h(V,F);return w!==null&&w.set(_,E,Z),Z}}function m(_,E,b){if(b){if(_===o.EMPTY||E===o.EMPTY)return o.EMPTY}else {if(_===o.EMPTY&&E===o.EMPTY)return o.EMPTY;if(_===o.EMPTY){let w=[E.returnState,o.EMPTY_RETURN_STATE],D=[E.parentCtx,null];return new h(D,w)}else if(E===o.EMPTY){let w=[_.returnState,o.EMPTY_RETURN_STATE],D=[_.parentCtx,null];return new h(D,w)}}return null}function g(_,E,b,w){if(w!==null){let ae=w.get(_,E);if(ae!==null||(ae=w.get(E,_),ae!==null))return ae}let D=0,N=0,F=0,V=[],Z=[];for(;D<_.returnStates.length&&N<E.returnStates.length;){let ae=_.parents[D],k=E.parents[N];if(_.returnStates[D]===E.returnStates[N]){let y=_.returnStates[D];y===o.EMPTY_RETURN_STATE&&ae===null&&k===null||ae!==null&&k!==null&&ae===k?(Z[F]=ae,V[F]=y):(Z[F]=d(ae,k,b,w),V[F]=y),D+=1,N+=1;}else _.returnStates[D]<E.returnStates[N]?(Z[F]=ae,V[F]=_.returnStates[D],D+=1):(Z[F]=k,V[F]=E.returnStates[N],N+=1);F+=1;}if(D<_.returnStates.length)for(let ae=D;ae<_.returnStates.length;ae++)Z[F]=_.parents[ae],V[F]=_.returnStates[ae],F+=1;else for(let ae=N;ae<E.returnStates.length;ae++)Z[F]=E.parents[ae],V[F]=E.returnStates[ae],F+=1;if(F<Z.length){if(F===1){let ae=u.create(Z[0],V[0]);return w!==null&&w.set(_,E,ae),ae}Z=Z.slice(0,F),V=V.slice(0,F);}let te=new h(Z,V);return te===_?(w!==null&&w.set(_,E,_),_):te===E?(w!==null&&w.set(_,E,E),E):(v(Z),w!==null&&w.set(_,E,te),te)}function v(_){let E=new s;for(let b=0;b<_.length;b++){let w=_[b];E.containsKey(w)||E.put(w,w);}for(let b=0;b<_.length;b++)_[b]=E.get(_[b]);}function x(_,E,b){if(_.isEmpty())return _;let w=b.get(_)||null;if(w!==null)return w;if(w=E.get(_),w!==null)return b.put(_,w),w;let D=!1,N=[];for(let V=0;V<N.length;V++){let Z=x(_.getParent(V),E,b);if(D||Z!==_.getParent(V)){if(!D){N=[];for(let te=0;te<_.length;te++)N[te]=_.getParent(te);D=!0;}N[V]=Z;}}if(!D)return E.add(_),b.put(_,_),_;let F=null;return N.length===0?F=o.EMPTY:N.length===1?F=u.create(N[0],_.getReturnState(0)):F=new h(N,_.returnStates),E.add(F),b.put(F,F),b.put(_,F),F}e.exports={merge:d,PredictionContext:o,PredictionContextCache:a,SingletonPredictionContext:u,predictionContextFromRuleContext:c,getCachedPredictionContext:x};}),Hb=re((t,e)=>{var{Set:r,BitSet:i}=gr(),{Token:s}=$t(),{ATNConfig:n}=gc(),{IntervalSet:o}=Ar(),{RuleStopState:a}=cn(),{RuleTransition:u,NotSetTransition:l,WildcardTransition:h,AbstractPredicateTransition:c}=za(),{predictionContextFromRuleContext:d,PredictionContext:f,SingletonPredictionContext:m}=Xi(),g=class{constructor(v){this.atn=v;}getDecisionLookahead(v){if(v===null)return null;let x=v.transitions.length,_=[];for(let E=0;E<x;E++){_[E]=new o;let b=new r;this._LOOK(v.transition(E).target,null,f.EMPTY,_[E],b,new i,!1,!1),(_[E].length===0||_[E].contains(g.HIT_PRED))&&(_[E]=null);}return _}LOOK(v,x,_){let E=new o,b=!0;_=_||null;let w=_!==null?d(v.atn,_):null;return this._LOOK(v,x,w,E,new r,new i,b,!0),E}_LOOK(v,x,_,E,b,w,D,N){let F=new n({state:v,alt:0,context:_},null);if(!b.contains(F)){if(b.add(F),v===x){if(_===null){E.addOne(s.EPSILON);return}else if(_.isEmpty()&&N){E.addOne(s.EOF);return}}if(v instanceof a){if(_===null){E.addOne(s.EPSILON);return}else if(_.isEmpty()&&N){E.addOne(s.EOF);return}if(_!==f.EMPTY){let V=w.contains(v.ruleIndex);try{w.remove(v.ruleIndex);for(let Z=0;Z<_.length;Z++){let te=this.atn.states[_.getReturnState(Z)];this._LOOK(te,x,_.getParent(Z),E,b,w,D,N);}}finally{V&&w.add(v.ruleIndex);}return}}for(let V=0;V<v.transitions.length;V++){let Z=v.transitions[V];if(Z.constructor===u){if(w.contains(Z.target.ruleIndex))continue;let te=m.create(_,Z.followState.stateNumber);try{w.add(Z.target.ruleIndex),this._LOOK(Z.target,x,te,E,b,w,D,N);}finally{w.remove(Z.target.ruleIndex);}}else if(Z instanceof c)D?this._LOOK(Z.target,x,_,E,b,w,D,N):E.addOne(g.HIT_PRED);else if(Z.isEpsilon)this._LOOK(Z.target,x,_,E,b,w,D,N);else if(Z.constructor===h)E.addRange(s.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType);else {let te=Z.label;te!==null&&(Z instanceof l&&(te=te.complement(s.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType)),E.addSet(te));}}}}};g.HIT_PRED=s.INVALID_TYPE,e.exports=g;}),ho=re((t,e)=>{var r=Hb(),{IntervalSet:i}=Ar(),{Token:s}=$t(),n=class{constructor(o,a){this.grammarType=o,this.maxTokenType=a,this.states=[],this.decisionToState=[],this.ruleToStartState=[],this.ruleToStopState=null,this.modeNameToStartState={},this.ruleToTokenType=null,this.lexerActions=null,this.modeToStartState=[];}nextTokensInContext(o,a){return new r(this).LOOK(o,null,a)}nextTokensNoContext(o){return o.nextTokenWithinRule!==null||(o.nextTokenWithinRule=this.nextTokensInContext(o,null),o.nextTokenWithinRule.readOnly=!0),o.nextTokenWithinRule}nextTokens(o,a){return a===void 0?this.nextTokensNoContext(o):this.nextTokensInContext(o,a)}addState(o){o!==null&&(o.atn=this,o.stateNumber=this.states.length),this.states.push(o);}removeState(o){this.states[o.stateNumber]=null;}defineDecisionState(o){return this.decisionToState.push(o),o.decision=this.decisionToState.length-1,o.decision}getDecisionState(o){return this.decisionToState.length===0?null:this.decisionToState[o]}getExpectedTokens(o,a){if(o<0||o>=this.states.length)throw "Invalid state number.";let u=this.states[o],l=this.nextTokens(u);if(!l.contains(s.EPSILON))return l;let h=new i;for(h.addSet(l),h.removeOne(s.EPSILON);a!==null&&a.invokingState>=0&&l.contains(s.EPSILON);){let d=this.states[a.invokingState].transitions[0];l=this.nextTokens(d.followState),h.addSet(l),h.removeOne(s.EPSILON),a=a.parentCtx;}return l.contains(s.EPSILON)&&h.addOne(s.EOF),h}};n.INVALID_ALT_NUMBER=0,e.exports=n;}),L8=re((t,e)=>{e.exports={LEXER:0,PARSER:1};}),Ub=re((t,e)=>{var r=class{constructor(i){i===void 0&&(i=null),this.readOnly=!1,this.verifyATN=i===null?!0:i.verifyATN,this.generateRuleBypassTransitions=i===null?!1:i.generateRuleBypassTransitions;}};r.defaultOptions=new r,r.defaultOptions.readOnly=!0,e.exports=r;}),Vb=re((t,e)=>{var r={CHANNEL:0,CUSTOM:1,MODE:2,MORE:3,POP_MODE:4,PUSH_MODE:5,SKIP:6,TYPE:7},i=class{constructor(f){this.actionType=f,this.isPositionDependent=!1;}hashCode(){let f=new Hash;return this.updateHashCode(f),f.finish()}updateHashCode(f){f.update(this.actionType);}equals(f){return this===f}},s=class extends i{constructor(){super(r.SKIP);}execute(f){f.skip();}toString(){return "skip"}};s.INSTANCE=new s;var n=class extends i{constructor(f){super(r.TYPE),this.type=f;}execute(f){f.type=this.type;}updateHashCode(f){f.update(this.actionType,this.type);}equals(f){return this===f?!0:f instanceof n?this.type===f.type:!1}toString(){return "type("+this.type+")"}},o=class extends i{constructor(f){super(r.PUSH_MODE),this.mode=f;}execute(f){f.pushMode(this.mode);}updateHashCode(f){f.update(this.actionType,this.mode);}equals(f){return this===f?!0:f instanceof o?this.mode===f.mode:!1}toString(){return "pushMode("+this.mode+")"}},a=class extends i{constructor(){super(r.POP_MODE);}execute(f){f.popMode();}toString(){return "popMode"}};a.INSTANCE=new a;var u=class extends i{constructor(){super(r.MORE);}execute(f){f.more();}toString(){return "more"}};u.INSTANCE=new u;var l=class extends i{constructor(f){super(r.MODE),this.mode=f;}execute(f){f.mode(this.mode);}updateHashCode(f){f.update(this.actionType,this.mode);}equals(f){return this===f?!0:f instanceof l?this.mode===f.mode:!1}toString(){return "mode("+this.mode+")"}},h=class extends i{constructor(f,m){super(r.CUSTOM),this.ruleIndex=f,this.actionIndex=m,this.isPositionDependent=!0;}execute(f){f.action(null,this.ruleIndex,this.actionIndex);}updateHashCode(f){f.update(this.actionType,this.ruleIndex,this.actionIndex);}equals(f){return this===f?!0:f instanceof h?this.ruleIndex===f.ruleIndex&&this.actionIndex===f.actionIndex:!1}},c=class extends i{constructor(f){super(r.CHANNEL),this.channel=f;}execute(f){f._channel=this.channel;}updateHashCode(f){f.update(this.actionType,this.channel);}equals(f){return this===f?!0:f instanceof c?this.channel===f.channel:!1}toString(){return "channel("+this.channel+")"}},d=class extends i{constructor(f,m){super(m.actionType),this.offset=f,this.action=m,this.isPositionDependent=!0;}execute(f){this.action.execute(f);}updateHashCode(f){f.update(this.actionType,this.offset,this.action);}equals(f){return this===f?!0:f instanceof d?this.offset===f.offset&&this.action===f.action:!1}};e.exports={LexerActionType:r,LexerSkipAction:s,LexerChannelAction:c,LexerCustomAction:h,LexerIndexedCustomAction:d,LexerMoreAction:u,LexerTypeAction:n,LexerPushModeAction:o,LexerPopModeAction:a,LexerModeAction:l};}),$b=re((t,e)=>{var{Token:r}=$t(),i=ho(),s=L8(),{ATNState:n,BasicState:o,DecisionState:a,BlockStartState:u,BlockEndState:l,LoopEndState:h,RuleStartState:c,RuleStopState:d,TokensStartState:f,PlusLoopbackState:m,StarLoopbackState:g,StarLoopEntryState:v,PlusBlockStartState:x,StarBlockStartState:_,BasicBlockStartState:E}=cn(),{Transition:b,AtomTransition:w,SetTransition:D,NotSetTransition:N,RuleTransition:F,RangeTransition:V,ActionTransition:Z,EpsilonTransition:te,WildcardTransition:ae,PredicateTransition:k,PrecedencePredicateTransition:y}=za(),{IntervalSet:C}=Ar(),S=Ub(),{LexerActionType:R,LexerSkipAction:L,LexerChannelAction:I,LexerCustomAction:K,LexerMoreAction:j,LexerTypeAction:A,LexerPushModeAction:q,LexerPopModeAction:B,LexerModeAction:T}=Vb(),P="AADB8D7E-AEEF-4415-AD2B-8204D6CF042E",H="59627784-3BE5-417A-B9EB-8131A7286089",z=[P,H],G=3,oe=H;function se(M,J){let W=[];return W[M-1]=J,W.map(function(ne){return J})}var X=class{constructor(M){M==null&&(M=S.defaultOptions),this.deserializationOptions=M,this.stateFactories=null,this.actionFactories=null;}isFeatureSupported(M,J){let W=z.indexOf(M);return W<0?!1:z.indexOf(J)>=W}deserialize(M){this.reset(M),this.checkVersion(),this.checkUUID();let J=this.readATN();this.readStates(J),this.readRules(J),this.readModes(J);let W=[];return this.readSets(J,W,this.readInt.bind(this)),this.isFeatureSupported(H,this.uuid)&&this.readSets(J,W,this.readInt32.bind(this)),this.readEdges(J,W),this.readDecisions(J),this.readLexerActions(J),this.markPrecedenceDecisions(J),this.verifyATN(J),this.deserializationOptions.generateRuleBypassTransitions&&J.grammarType===s.PARSER&&(this.generateRuleBypassTransitions(J),this.verifyATN(J)),J}reset(M){let J=function(ne){let le=ne.charCodeAt(0);return le>1?le-2:le+65534},W=M.split("").map(J);W[0]=M.charCodeAt(0),this.data=W,this.pos=0;}checkVersion(){let M=this.readInt();if(M!==G)throw "Could not deserialize ATN with version "+M+" (expected "+G+")."}checkUUID(){let M=this.readUUID();if(z.indexOf(M)<0)throw oe;this.uuid=M;}readATN(){let M=this.readInt(),J=this.readInt();return new i(M,J)}readStates(M){let J,W,ne,le=[],Q=[],_e=this.readInt();for(let Ce=0;Ce<_e;Ce++){let tt=this.readInt();if(tt===n.INVALID_TYPE){M.addState(null);continue}let Fe=this.readInt();Fe===65535&&(Fe=-1);let He=this.stateFactory(tt,Fe);if(tt===n.LOOP_END){let Yt=this.readInt();le.push([He,Yt]);}else if(He instanceof u){let Yt=this.readInt();Q.push([He,Yt]);}M.addState(He);}for(J=0;J<le.length;J++)W=le[J],W[0].loopBackState=M.states[W[1]];for(J=0;J<Q.length;J++)W=Q[J],W[0].endState=M.states[W[1]];let Se=this.readInt();for(J=0;J<Se;J++)ne=this.readInt(),M.states[ne].nonGreedy=!0;let ye=this.readInt();for(J=0;J<ye;J++)ne=this.readInt(),M.states[ne].isPrecedenceRule=!0;}readRules(M){let J,W=this.readInt();for(M.grammarType===s.LEXER&&(M.ruleToTokenType=se(W,0)),M.ruleToStartState=se(W,0),J=0;J<W;J++){let ne=this.readInt();if(M.ruleToStartState[J]=M.states[ne],M.grammarType===s.LEXER){let le=this.readInt();le===65535&&(le=r.EOF),M.ruleToTokenType[J]=le;}}for(M.ruleToStopState=se(W,0),J=0;J<M.states.length;J++){let ne=M.states[J];ne instanceof d&&(M.ruleToStopState[ne.ruleIndex]=ne,M.ruleToStartState[ne.ruleIndex].stopState=ne);}}readModes(M){let J=this.readInt();for(let W=0;W<J;W++){let ne=this.readInt();M.modeToStartState.push(M.states[ne]);}}readSets(M,J,W){let ne=this.readInt();for(let le=0;le<ne;le++){let Q=new C;J.push(Q);let _e=this.readInt();this.readInt()!==0&&Q.addOne(-1);for(let ye=0;ye<_e;ye++){let Ce=W(),tt=W();Q.addRange(Ce,tt);}}}readEdges(M,J){let W,ne,le,Q,_e,Se=this.readInt();for(W=0;W<Se;W++){let ye=this.readInt(),Ce=this.readInt(),tt=this.readInt(),Fe=this.readInt(),He=this.readInt(),Yt=this.readInt();Q=this.edgeFactory(M,tt,ye,Ce,Fe,He,Yt,J),M.states[ye].addTransition(Q);}for(W=0;W<M.states.length;W++)for(le=M.states[W],ne=0;ne<le.transitions.length;ne++){let ye=le.transitions[ne];if(!(ye instanceof F))continue;let Ce=-1;M.ruleToStartState[ye.target.ruleIndex].isPrecedenceRule&&ye.precedence===0&&(Ce=ye.target.ruleIndex),Q=new te(ye.followState,Ce),M.ruleToStopState[ye.target.ruleIndex].addTransition(Q);}for(W=0;W<M.states.length;W++){if(le=M.states[W],le instanceof u){if(le.endState===null||le.endState.startState!==null)throw "IllegalState";le.endState.startState=le;}if(le instanceof m)for(ne=0;ne<le.transitions.length;ne++)_e=le.transitions[ne].target,_e instanceof x&&(_e.loopBackState=le);else if(le instanceof g)for(ne=0;ne<le.transitions.length;ne++)_e=le.transitions[ne].target,_e instanceof v&&(_e.loopBackState=le);}}readDecisions(M){let J=this.readInt();for(let W=0;W<J;W++){let ne=this.readInt(),le=M.states[ne];M.decisionToState.push(le),le.decision=W;}}readLexerActions(M){if(M.grammarType===s.LEXER){let J=this.readInt();M.lexerActions=se(J,null);for(let W=0;W<J;W++){let ne=this.readInt(),le=this.readInt();le===65535&&(le=-1);let Q=this.readInt();Q===65535&&(Q=-1),M.lexerActions[W]=this.lexerActionFactory(ne,le,Q);}}}generateRuleBypassTransitions(M){let J,W=M.ruleToStartState.length;for(J=0;J<W;J++)M.ruleToTokenType[J]=M.maxTokenType+J+1;for(J=0;J<W;J++)this.generateRuleBypassTransition(M,J);}generateRuleBypassTransition(M,J){let W,ne,le=new E;le.ruleIndex=J,M.addState(le);let Q=new l;Q.ruleIndex=J,M.addState(Q),le.endState=Q,M.defineDecisionState(le),Q.startState=le;let _e=null,Se=null;if(M.ruleToStartState[J].isPrecedenceRule){for(Se=null,W=0;W<M.states.length;W++)if(ne=M.states[W],this.stateIsEndStateFor(ne,J)){Se=ne,_e=ne.loopBackState.transitions[0];break}if(_e===null)throw "Couldn't identify final state of the precedence rule prefix section."}else Se=M.ruleToStopState[J];for(W=0;W<M.states.length;W++){ne=M.states[W];for(let Fe=0;Fe<ne.transitions.length;Fe++){let He=ne.transitions[Fe];He!==_e&&He.target===Se&&(He.target=Q);}}let ye=M.ruleToStartState[J],Ce=ye.transitions.length;for(;Ce>0;)le.addTransition(ye.transitions[Ce-1]),ye.transitions=ye.transitions.slice(-1);M.ruleToStartState[J].addTransition(new te(le)),Q.addTransition(new te(Se));let tt=new o;M.addState(tt),tt.addTransition(new w(Q,M.ruleToTokenType[J])),le.addTransition(new te(tt));}stateIsEndStateFor(M,J){if(M.ruleIndex!==J||!(M instanceof v))return null;let W=M.transitions[M.transitions.length-1].target;return W instanceof h&&W.epsilonOnlyTransitions&&W.transitions[0].target instanceof d?M:null}markPrecedenceDecisions(M){for(let J=0;J<M.states.length;J++){let W=M.states[J];if(W instanceof v&&M.ruleToStartState[W.ruleIndex].isPrecedenceRule){let ne=W.transitions[W.transitions.length-1].target;ne instanceof h&&ne.epsilonOnlyTransitions&&ne.transitions[0].target instanceof d&&(W.isPrecedenceDecision=!0);}}}verifyATN(M){if(this.deserializationOptions.verifyATN)for(let J=0;J<M.states.length;J++){let W=M.states[J];if(W!==null)if(this.checkCondition(W.epsilonOnlyTransitions||W.transitions.length<=1),W instanceof x)this.checkCondition(W.loopBackState!==null);else if(W instanceof v)if(this.checkCondition(W.loopBackState!==null),this.checkCondition(W.transitions.length===2),W.transitions[0].target instanceof _)this.checkCondition(W.transitions[1].target instanceof h),this.checkCondition(!W.nonGreedy);else if(W.transitions[0].target instanceof h)this.checkCondition(W.transitions[1].target instanceof _),this.checkCondition(W.nonGreedy);else throw "IllegalState";else W instanceof g?(this.checkCondition(W.transitions.length===1),this.checkCondition(W.transitions[0].target instanceof v)):W instanceof h?this.checkCondition(W.loopBackState!==null):W instanceof c?this.checkCondition(W.stopState!==null):W instanceof u?this.checkCondition(W.endState!==null):W instanceof l?this.checkCondition(W.startState!==null):W instanceof a?this.checkCondition(W.transitions.length<=1||W.decision>=0):this.checkCondition(W.transitions.length<=1||W instanceof d);}}checkCondition(M,J){if(!M)throw J==null&&(J="IllegalState"),J}readInt(){return this.data[this.pos++]}readInt32(){let M=this.readInt(),J=this.readInt();return M|J<<16}readLong(){let M=this.readInt32(),J=this.readInt32();return M&4294967295|J<<32}readUUID(){let M=[];for(let J=7;J>=0;J--){let W=this.readInt();M[2*J+1]=W&255,M[2*J]=W>>8&255;}return U[M[0]]+U[M[1]]+U[M[2]]+U[M[3]]+"-"+U[M[4]]+U[M[5]]+"-"+U[M[6]]+U[M[7]]+"-"+U[M[8]]+U[M[9]]+"-"+U[M[10]]+U[M[11]]+U[M[12]]+U[M[13]]+U[M[14]]+U[M[15]]}edgeFactory(M,J,W,ne,le,Q,_e,Se){let ye=M.states[ne];switch(J){case b.EPSILON:return new te(ye);case b.RANGE:return _e!==0?new V(ye,r.EOF,Q):new V(ye,le,Q);case b.RULE:return new F(M.states[le],Q,_e,ye);case b.PREDICATE:return new k(ye,le,Q,_e!==0);case b.PRECEDENCE:return new y(ye,le);case b.ATOM:return _e!==0?new w(ye,r.EOF):new w(ye,le);case b.ACTION:return new Z(ye,le,Q,_e!==0);case b.SET:return new D(ye,Se[le]);case b.NOT_SET:return new N(ye,Se[le]);case b.WILDCARD:return new ae(ye);default:throw "The specified transition type: "+J+" is not valid."}}stateFactory(M,J){if(this.stateFactories===null){let W=[];W[n.INVALID_TYPE]=null,W[n.BASIC]=()=>new o,W[n.RULE_START]=()=>new c,W[n.BLOCK_START]=()=>new E,W[n.PLUS_BLOCK_START]=()=>new x,W[n.STAR_BLOCK_START]=()=>new _,W[n.TOKEN_START]=()=>new f,W[n.RULE_STOP]=()=>new d,W[n.BLOCK_END]=()=>new l,W[n.STAR_LOOP_BACK]=()=>new g,W[n.STAR_LOOP_ENTRY]=()=>new v,W[n.PLUS_LOOP_BACK]=()=>new m,W[n.LOOP_END]=()=>new h,this.stateFactories=W;}if(M>this.stateFactories.length||this.stateFactories[M]===null)throw "The specified state type "+M+" is not valid.";{let W=this.stateFactories[M]();if(W!==null)return W.ruleIndex=J,W}}lexerActionFactory(M,J,W){if(this.actionFactories===null){let ne=[];ne[R.CHANNEL]=(le,Q)=>new I(le),ne[R.CUSTOM]=(le,Q)=>new K(le,Q),ne[R.MODE]=(le,Q)=>new T(le),ne[R.MORE]=(le,Q)=>j.INSTANCE,ne[R.POP_MODE]=(le,Q)=>B.INSTANCE,ne[R.PUSH_MODE]=(le,Q)=>new q(le),ne[R.SKIP]=(le,Q)=>L.INSTANCE,ne[R.TYPE]=(le,Q)=>new A(le),this.actionFactories=ne;}if(M>this.actionFactories.length||this.actionFactories[M]===null)throw "The specified lexer action type "+M+" is not valid.";return this.actionFactories[M](J,W)}};function ee(){let M=[];for(let J=0;J<256;J++)M[J]=(J+256).toString(16).substr(1).toUpperCase();return M}var U=ee();e.exports=X;}),Yl=re((t,e)=>{var r=class{syntaxError(n,o,a,u,l,h){}reportAmbiguity(n,o,a,u,l,h,c){}reportAttemptingFullContext(n,o,a,u,l,h){}reportContextSensitivity(n,o,a,u,l,h){}},i=class extends r{constructor(){super();}syntaxError(n,o,a,u,l,h){console.error("line "+a+":"+u+" "+l);}};i.INSTANCE=new i;var s=class extends r{constructor(n){if(super(),n===null)throw "delegates";return this.delegates=n,this}syntaxError(n,o,a,u,l,h){this.delegates.map(c=>c.syntaxError(n,o,a,u,l,h));}reportAmbiguity(n,o,a,u,l,h,c){this.delegates.map(d=>d.reportAmbiguity(n,o,a,u,l,h,c));}reportAttemptingFullContext(n,o,a,u,l,h){this.delegates.map(c=>c.reportAttemptingFullContext(n,o,a,u,l,h));}reportContextSensitivity(n,o,a,u,l,h){this.delegates.map(c=>c.reportContextSensitivity(n,o,a,u,l,h));}};e.exports={ErrorListener:r,ConsoleErrorListener:i,ProxyErrorListener:s};}),zb=re((t,e)=>{var{Token:r}=$t(),{ConsoleErrorListener:i}=Yl(),{ProxyErrorListener:s}=Yl(),n=class{constructor(){this._listeners=[i.INSTANCE],this._interp=null,this._stateNumber=-1;}checkVersion(o){let a="4.9.2";a!==o&&console.log("ANTLR runtime and generated code versions disagree: "+a+"!="+o);}addErrorListener(o){this._listeners.push(o);}removeErrorListeners(){this._listeners=[];}getTokenTypeMap(){let o=this.getTokenNames();if(o===null)throw "The current recognizer does not provide a list of token names.";let a=this.tokenTypeMapCache[o];return a===void 0&&(a=o.reduce(function(u,l,h){u[l]=h;}),a.EOF=r.EOF,this.tokenTypeMapCache[o]=a),a}getRuleIndexMap(){let o=this.ruleNames;if(o===null)throw "The current recognizer does not provide a list of rule names.";let a=this.ruleIndexMapCache[o];return a===void 0&&(a=o.reduce(function(u,l,h){u[l]=h;}),this.ruleIndexMapCache[o]=a),a}getTokenType(o){let a=this.getTokenTypeMap()[o];return a!==void 0?a:r.INVALID_TYPE}getErrorHeader(o){let a=o.getOffendingToken().line,u=o.getOffendingToken().column;return "line "+a+":"+u}getTokenErrorDisplay(o){if(o===null)return "<no token>";let a=o.text;return a===null&&(o.type===r.EOF?a="<EOF>":a="<"+o.type+">"),a=a.replace(`
81
- `,"\\n").replace("\r","\\r").replace(" ","\\t"),"'"+a+"'"}getErrorListenerDispatch(){return new s(this._listeners)}sempred(o,a,u){return !0}precpred(o,a){return !0}get state(){return this._stateNumber}set state(o){this._stateNumber=o;}};n.tokenTypeMapCache={},n.ruleIndexMapCache={},e.exports=n;}),P8=re((t,e)=>{var r=$t().CommonToken,i=class{},s=class extends i{constructor(n){super(),this.copyText=n===void 0?!1:n;}create(n,o,a,u,l,h,c,d){let f=new r(n,o,u,l,h);return f.line=c,f.column=d,a!==null?f.text=a:this.copyText&&n[1]!==null&&(f.text=n[1].getText(l,h)),f}createThin(n,o){let a=new r(null,n);return a.text=o,a}};s.DEFAULT=new s,e.exports=s;}),Xr=re((t,e)=>{var{PredicateTransition:r}=za(),{Interval:i}=Ar().Interval,s=class extends Error{constructor(c){if(super(c.message),Error.captureStackTrace)Error.captureStackTrace(this,s);else var d=new Error().stack;this.message=c.message,this.recognizer=c.recognizer,this.input=c.input,this.ctx=c.ctx,this.offendingToken=null,this.offendingState=-1,this.recognizer!==null&&(this.offendingState=this.recognizer.state);}getExpectedTokens(){return this.recognizer!==null?this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx):null}toString(){return this.message}},n=class extends s{constructor(c,d,f,m){super({message:"",recognizer:c,input:d,ctx:null}),this.startIndex=f,this.deadEndConfigs=m;}toString(){let c="";return this.startIndex>=0&&this.startIndex<this.input.size&&(c=this.input.getText(new i(this.startIndex,this.startIndex))),"LexerNoViableAltException"+c}},o=class extends s{constructor(c,d,f,m,g,v){v=v||c._ctx,m=m||c.getCurrentToken(),f=f||c.getCurrentToken(),d=d||c.getInputStream(),super({message:"",recognizer:c,input:d,ctx:v}),this.deadEndConfigs=g,this.startToken=f,this.offendingToken=m;}},a=class extends s{constructor(c){super({message:"",recognizer:c,input:c.getInputStream(),ctx:c._ctx}),this.offendingToken=c.getCurrentToken();}};function u(c,d){return d!==null?d:"failed predicate: {"+c+"}?"}var l=class extends s{constructor(c,d,f){super({message:u(d,f||null),recognizer:c,input:c.getInputStream(),ctx:c._ctx});let g=c._interp.atn.states[c.state].transitions[0];g instanceof r?(this.ruleIndex=g.ruleIndex,this.predicateIndex=g.predIndex):(this.ruleIndex=0,this.predicateIndex=0),this.predicate=d,this.offendingToken=c.getCurrentToken();}},h=class extends Error{constructor(){super(),Error.captureStackTrace(this,h);}};e.exports={RecognitionException:s,NoViableAltException:o,LexerNoViableAltException:n,InputMismatchException:a,FailedPredicateException:l,ParseCancellationException:h};}),_c=re((t,e)=>{var{Token:r}=$t(),i=zb(),s=P8(),{RecognitionException:n}=Xr(),{LexerNoViableAltException:o}=Xr(),a=class extends i{constructor(u){super(),this._input=u,this._factory=s.DEFAULT,this._tokenFactorySourcePair=[this,u],this._interp=null,this._token=null,this._tokenStartCharIndex=-1,this._tokenStartLine=-1,this._tokenStartColumn=-1,this._hitEOF=!1,this._channel=r.DEFAULT_CHANNEL,this._type=r.INVALID_TYPE,this._modeStack=[],this._mode=a.DEFAULT_MODE,this._text=null;}reset(){this._input!==null&&this._input.seek(0),this._token=null,this._type=r.INVALID_TYPE,this._channel=r.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartColumn=-1,this._tokenStartLine=-1,this._text=null,this._hitEOF=!1,this._mode=a.DEFAULT_MODE,this._modeStack=[],this._interp.reset();}nextToken(){if(this._input===null)throw "nextToken requires a non-null input stream.";let u=this._input.mark();try{for(;;){if(this._hitEOF)return this.emitEOF(),this._token;this._token=null,this._channel=r.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartColumn=this._interp.column,this._tokenStartLine=this._interp.line,this._text=null;let l=!1;for(;;){this._type=r.INVALID_TYPE;let h=a.SKIP;try{h=this._interp.match(this._input,this._mode);}catch(c){if(c instanceof n)this.notifyListeners(c),this.recover(c);else throw console.log(c.stack),c}if(this._input.LA(1)===r.EOF&&(this._hitEOF=!0),this._type===r.INVALID_TYPE&&(this._type=h),this._type===a.SKIP){l=!0;break}if(this._type!==a.MORE)break}if(!l)return this._token===null&&this.emit(),this._token}}finally{this._input.release(u);}}skip(){this._type=a.SKIP;}more(){this._type=a.MORE;}mode(u){this._mode=u;}pushMode(u){this._interp.debug&&console.log("pushMode "+u),this._modeStack.push(this._mode),this.mode(u);}popMode(){if(this._modeStack.length===0)throw "Empty Stack";return this._interp.debug&&console.log("popMode back to "+this._modeStack.slice(0,-1)),this.mode(this._modeStack.pop()),this._mode}emitToken(u){this._token=u;}emit(){let u=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.getCharIndex()-1,this._tokenStartLine,this._tokenStartColumn);return this.emitToken(u),u}emitEOF(){let u=this.column,l=this.line,h=this._factory.create(this._tokenFactorySourcePair,r.EOF,null,r.DEFAULT_CHANNEL,this._input.index,this._input.index-1,l,u);return this.emitToken(h),h}getCharIndex(){return this._input.index}getAllTokens(){let u=[],l=this.nextToken();for(;l.type!==r.EOF;)u.push(l),l=this.nextToken();return u}notifyListeners(u){let l=this._tokenStartCharIndex,h=this._input.index,c=this._input.getText(l,h),d="token recognition error at: '"+this.getErrorDisplay(c)+"'";this.getErrorListenerDispatch().syntaxError(this,null,this._tokenStartLine,this._tokenStartColumn,d,u);}getErrorDisplay(u){let l=[];for(let h=0;h<u.length;h++)l.push(u[h]);return l.join("")}getErrorDisplayForChar(u){return u.charCodeAt(0)===r.EOF?"<EOF>":u===`
82
- `?"\\n":u===" "?"\\t":u==="\r"?"\\r":u}getCharErrorDisplay(u){return "'"+this.getErrorDisplayForChar(u)+"'"}recover(u){this._input.LA(1)!==r.EOF&&(u instanceof o?this._interp.consume(this._input):this._input.consume());}get inputStream(){return this._input}set inputStream(u){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=u,this._tokenFactorySourcePair=[this,this._input];}get sourceName(){return this._input.sourceName}get type(){return this.type}set type(u){this._type=u;}get line(){return this._interp.line}set line(u){this._interp.line=u;}get column(){return this._interp.column}set column(u){this._interp.column=u;}get text(){return this._text!==null?this._text:this._interp.getText(this._input)}set text(u){this._text=u;}};a.DEFAULT_MODE=0,a.MORE=-2,a.SKIP=-3,a.DEFAULT_TOKEN_CHANNEL=r.DEFAULT_CHANNEL,a.HIDDEN=r.HIDDEN_CHANNEL,a.MIN_CHAR_VALUE=0,a.MAX_CHAR_VALUE=1114111,e.exports=a;}),fo=re((t,e)=>{var r=ho(),i=gr(),{SemanticContext:s}=$a(),{merge:n}=Xi();function o(h){return h.hashCodeForConfigSet()}function a(h,c){return h===c?!0:h===null||c===null?!1:h.equalsForConfigSet(c)}var u=class{constructor(h){this.configLookup=new i.Set(o,a),this.fullCtx=h===void 0?!0:h,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1;}add(h,c){if(c===void 0&&(c=null),this.readOnly)throw "This set is readonly";h.semanticContext!==s.NONE&&(this.hasSemanticContext=!0),h.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);let d=this.configLookup.add(h);if(d===h)return this.cachedHashCode=-1,this.configs.push(h),!0;let f=!this.fullCtx,m=n(d.context,h.context,f,c);return d.reachesIntoOuterContext=Math.max(d.reachesIntoOuterContext,h.reachesIntoOuterContext),h.precedenceFilterSuppressed&&(d.precedenceFilterSuppressed=!0),d.context=m,!0}getStates(){let h=new i.Set;for(let c=0;c<this.configs.length;c++)h.add(this.configs[c].state);return h}getPredicates(){let h=[];for(let c=0;c<this.configs.length;c++){let d=this.configs[c].semanticContext;d!==s.NONE&&h.push(d.semanticContext);}return h}optimizeConfigs(h){if(this.readOnly)throw "This set is readonly";if(this.configLookup.length!==0)for(let c=0;c<this.configs.length;c++){let d=this.configs[c];d.context=h.getCachedContext(d.context);}}addAll(h){for(let c=0;c<h.length;c++)this.add(h[c]);return !1}equals(h){return this===h||h instanceof u&&i.equalArrays(this.configs,h.configs)&&this.fullCtx===h.fullCtx&&this.uniqueAlt===h.uniqueAlt&&this.conflictingAlts===h.conflictingAlts&&this.hasSemanticContext===h.hasSemanticContext&&this.dipsIntoOuterContext===h.dipsIntoOuterContext}hashCode(){let h=new i.Hash;return h.update(this.configs),h.finish()}updateHashCode(h){this.readOnly?(this.cachedHashCode===-1&&(this.cachedHashCode=this.hashCode()),h.update(this.cachedHashCode)):h.update(this.hashCode());}isEmpty(){return this.configs.length===0}contains(h){if(this.configLookup===null)throw "This method is not implemented for readonly sets.";return this.configLookup.contains(h)}containsFast(h){if(this.configLookup===null)throw "This method is not implemented for readonly sets.";return this.configLookup.containsFast(h)}clear(){if(this.readOnly)throw "This set is readonly";this.configs=[],this.cachedHashCode=-1,this.configLookup=new i.Set;}setReadonly(h){this.readOnly=h,h&&(this.configLookup=null);}toString(){return i.arrayToString(this.configs)+(this.hasSemanticContext?",hasSemanticContext="+this.hasSemanticContext:"")+(this.uniqueAlt!==r.INVALID_ALT_NUMBER?",uniqueAlt="+this.uniqueAlt:"")+(this.conflictingAlts!==null?",conflictingAlts="+this.conflictingAlts:"")+(this.dipsIntoOuterContext?",dipsIntoOuterContext":"")}get items(){return this.configs}get length(){return this.configs.length}},l=class extends u{constructor(){super(),this.configLookup=new i.Set;}};e.exports={ATNConfigSet:u,OrderedATNConfigSet:l};}),Ka=re((t,e)=>{var{ATNConfigSet:r}=fo(),{Hash:i,Set:s}=gr(),n=class{constructor(a,u){this.alt=u,this.pred=a;}toString(){return "("+this.pred+", "+this.alt+")"}},o=class{constructor(a,u){return a===null&&(a=-1),u===null&&(u=new r),this.stateNumber=a,this.configs=u,this.edges=null,this.isAcceptState=!1,this.prediction=0,this.lexerActionExecutor=null,this.requiresFullContext=!1,this.predicates=null,this}getAltSet(){let a=new s;if(this.configs!==null)for(let u=0;u<this.configs.length;u++){let l=this.configs[u];a.add(l.alt);}return a.length===0?null:a}equals(a){return this===a||a instanceof o&&this.configs.equals(a.configs)}toString(){let a=""+this.stateNumber+":"+this.configs;return this.isAcceptState&&(a=a+"=>",this.predicates!==null?a=a+this.predicates:a=a+this.prediction),a}hashCode(){let a=new i;return a.update(this.configs),a.finish()}};e.exports={DFAState:o,PredPrediction:n};}),Kb=re((t,e)=>{var{DFAState:r}=Ka(),{ATNConfigSet:i}=fo(),{getCachedPredictionContext:s}=Xi(),{Map:n}=gr(),o=class{constructor(a,u){return this.atn=a,this.sharedContextCache=u,this}getCachedContext(a){if(this.sharedContextCache===null)return a;let u=new n;return s(a,this.sharedContextCache,u)}};o.ERROR=new r(2147483647,new i),e.exports=o;}),I8=re((t,e)=>{var{hashStuff:r}=gr(),{LexerIndexedCustomAction:i}=Vb(),s=class{constructor(n){return this.lexerActions=n===null?[]:n,this.cachedHashCode=r(n),this}fixOffsetBeforeMatch(n){let o=null;for(let a=0;a<this.lexerActions.length;a++)this.lexerActions[a].isPositionDependent&&!(this.lexerActions[a]instanceof i)&&(o===null&&(o=this.lexerActions.concat([])),o[a]=new i(n,this.lexerActions[a]));return o===null?this:new s(o)}execute(n,o,a){let u=!1,l=o.index;try{for(let h=0;h<this.lexerActions.length;h++){let c=this.lexerActions[h];if(c instanceof i){let d=c.offset;o.seek(a+d),c=c.action,u=a+d!==l;}else c.isPositionDependent&&(o.seek(l),u=!1);c.execute(n);}}finally{u&&o.seek(l);}}hashCode(){return this.cachedHashCode}updateHashCode(n){n.update(this.cachedHashCode);}equals(n){if(this===n)return !0;if(n instanceof s){if(this.cachedHashCode!=n.cachedHashCode)return !1;if(this.lexerActions.length!=n.lexerActions.length)return !1;{let o=this.lexerActions.length;for(let a=0;a<o;++a)if(!this.lexerActions[a].equals(n.lexerActions[a]))return !1;return !0}}else return !1}static append(n,o){if(n===null)return new s([o]);let a=n.lexerActions.concat([o]);return new s(a)}};e.exports=s;}),k8=re((t,e)=>{var{Token:r}=$t(),i=_c(),s=ho(),n=Kb(),{DFAState:o}=Ka(),{OrderedATNConfigSet:a}=fo(),{PredictionContext:u}=Xi(),{SingletonPredictionContext:l}=Xi(),{RuleStopState:h}=cn(),{LexerATNConfig:c}=gc(),{Transition:d}=za(),f=I8(),{LexerNoViableAltException:m}=Xr();function g(_){_.index=-1,_.line=0,_.column=-1,_.dfaState=null;}var v=class{constructor(){g(this);}reset(){g(this);}},x=class extends n{constructor(_,E,b,w){super(E,w),this.decisionToDFA=b,this.recog=_,this.startIndex=-1,this.line=1,this.column=0,this.mode=i.DEFAULT_MODE,this.prevAccept=new v;}copyState(_){this.column=_.column,this.line=_.line,this.mode=_.mode,this.startIndex=_.startIndex;}match(_,E){this.match_calls+=1,this.mode=E;let b=_.mark();try{this.startIndex=_.index,this.prevAccept.reset();let w=this.decisionToDFA[E];return w.s0===null?this.matchATN(_):this.execATN(_,w.s0)}finally{_.release(b);}}reset(){this.prevAccept.reset(),this.startIndex=-1,this.line=1,this.column=0,this.mode=i.DEFAULT_MODE;}matchATN(_){let E=this.atn.modeToStartState[this.mode];x.debug&&console.log("matchATN mode "+this.mode+" start: "+E);let b=this.mode,w=this.computeStartState(_,E),D=w.hasSemanticContext;w.hasSemanticContext=!1;let N=this.addDFAState(w);D||(this.decisionToDFA[this.mode].s0=N);let F=this.execATN(_,N);return x.debug&&console.log("DFA after matchATN: "+this.decisionToDFA[b].toLexerString()),F}execATN(_,E){x.debug&&console.log("start state closure="+E.configs),E.isAcceptState&&this.captureSimState(this.prevAccept,_,E);let b=_.LA(1),w=E;for(;;){x.debug&&console.log("execATN loop starting closure: "+w.configs);let D=this.getExistingTargetState(w,b);if(D===null&&(D=this.computeTargetState(_,w,b)),D===n.ERROR||(b!==r.EOF&&this.consume(_),D.isAcceptState&&(this.captureSimState(this.prevAccept,_,D),b===r.EOF)))break;b=_.LA(1),w=D;}return this.failOrAccept(this.prevAccept,_,w.configs,b)}getExistingTargetState(_,E){if(_.edges===null||E<x.MIN_DFA_EDGE||E>x.MAX_DFA_EDGE)return null;let b=_.edges[E-x.MIN_DFA_EDGE];return b===void 0&&(b=null),x.debug&&b!==null&&console.log("reuse state "+_.stateNumber+" edge to "+b.stateNumber),b}computeTargetState(_,E,b){let w=new a;return this.getReachableConfigSet(_,E.configs,w,b),w.items.length===0?(w.hasSemanticContext||this.addDFAEdge(E,b,n.ERROR),n.ERROR):this.addDFAEdge(E,b,null,w)}failOrAccept(_,E,b,w){if(this.prevAccept.dfaState!==null){let D=_.dfaState.lexerActionExecutor;return this.accept(E,D,this.startIndex,_.index,_.line,_.column),_.dfaState.prediction}else {if(w===r.EOF&&E.index===this.startIndex)return r.EOF;throw new m(this.recog,E,this.startIndex,b)}}getReachableConfigSet(_,E,b,w){let D=s.INVALID_ALT_NUMBER;for(let N=0;N<E.items.length;N++){let F=E.items[N],V=F.alt===D;if(!(V&&F.passedThroughNonGreedyDecision)){x.debug&&console.log(`testing %s at %s
83
- `,this.getTokenName(w),F.toString(this.recog,!0));for(let Z=0;Z<F.state.transitions.length;Z++){let te=F.state.transitions[Z],ae=this.getReachableTarget(te,w);if(ae!==null){let k=F.lexerActionExecutor;k!==null&&(k=k.fixOffsetBeforeMatch(_.index-this.startIndex));let y=w===r.EOF,C=new c({state:ae,lexerActionExecutor:k},F);this.closure(_,C,b,V,!0,y)&&(D=F.alt);}}}}}accept(_,E,b,w,D,N){x.debug&&console.log(`ACTION %s
79
+  \b\r\x07"  !!#" #$\b$\f%& &'( ()-\x07)*,\v+*,/-.-+.0/-01\x07)1 -`,o._serializedATN=n.join([o._serializedATNSegment0,o._serializedATNSegment1],"");}),X7=te(t=>{var e=t&&t.__decorate||function(s,n,o,a){var u=arguments.length,l=u<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,o):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(s,n,o,a);else for(var c=s.length-1;c>=0;c--)(h=s[c])&&(l=(u<3?h(l):u>3?h(n,o,l):h(n,o))||l);return u>3&&l&&Object.defineProperty(n,o,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathLexerErrorListener=void 0;var r=fe(),i=class{syntaxError(s,n,o,a,u,l){}};e([r.Override],i.prototype,"syntaxError",null),t.XPathLexerErrorListener=i;}),co=te(t=>{var e=t&&t.__decorate||function(s,n,o,a){var u=arguments.length,l=u<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,o):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(s,n,o,a);else for(var c=s.length-1;c>=0;c--)(h=s[c])&&(l=(u<3?h(l):u>3?h(n,o,l):h(n,o))||l);return u>3&&l&&Object.defineProperty(n,o,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathElement=void 0;var r=fe(),i=class{constructor(s){this.nodeName=s,this.invert=!1;}toString(){let s=this.invert?"!":"";return Object.constructor.name+"["+s+this.nodeName+"]"}};e([r.Override],i.prototype,"toString",null),t.XPathElement=i;}),Q7=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathRuleAnywhereElement=void 0;var r=fe(),i=hs(),s=co(),n=class extends s.XPathElement{constructor(o,a){super(o),this.ruleIndex=a;}evaluate(o){return i.Trees.findAllRuleNodes(o,this.ruleIndex)}};e([r.Override],n.prototype,"evaluate",null),t.XPathRuleAnywhereElement=n;}),e8=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathRuleElement=void 0;var r=$r(),i=fe(),s=hs(),n=co(),o=class extends n.XPathElement{constructor(a,u){super(a),this.ruleIndex=u;}evaluate(a){let u=[];for(let l of s.Trees.getChildren(a))l instanceof r.ParserRuleContext&&(l.ruleIndex===this.ruleIndex&&!this.invert||l.ruleIndex!==this.ruleIndex&&this.invert)&&u.push(l);return u}};e([i.Override],o.prototype,"evaluate",null),t.XPathRuleElement=o;}),t8=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathTokenAnywhereElement=void 0;var r=fe(),i=hs(),s=co(),n=class extends s.XPathElement{constructor(o,a){super(o),this.tokenType=a;}evaluate(o){return i.Trees.findAllTokenNodes(o,this.tokenType)}};e([r.Override],n.prototype,"evaluate",null),t.XPathTokenAnywhereElement=n;}),r8=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathTokenElement=void 0;var r=fe(),i=lo(),s=hs(),n=co(),o=class extends n.XPathElement{constructor(a,u){super(a),this.tokenType=u;}evaluate(a){let u=[];for(let l of s.Trees.getChildren(a))l instanceof i.TerminalNode&&(l.symbol.type===this.tokenType&&!this.invert||l.symbol.type!==this.tokenType&&this.invert)&&u.push(l);return u}};e([r.Override],o.prototype,"evaluate",null),t.XPathTokenElement=o;}),i8=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathWildcardAnywhereElement=void 0;var r=fe(),i=hs(),s=Ip(),n=co(),o=class extends n.XPathElement{constructor(){super(s.XPath.WILDCARD);}evaluate(a){return this.invert?[]:i.Trees.getDescendants(a)}};e([r.Override],o.prototype,"evaluate",null),t.XPathWildcardAnywhereElement=o;}),n8=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.XPathWildcardElement=void 0;var r=fe(),i=hs(),s=Ip(),n=co(),o=class extends n.XPathElement{constructor(){super(s.XPath.WILDCARD);}evaluate(a){let u=[];if(this.invert)return u;for(let l of i.Trees.getChildren(a))u.push(l);return u}};e([r.Override],o.prototype,"evaluate",null),t.XPathWildcardElement=o;}),Ip=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.XPath=void 0;var e=Lp(),r=Pp(),i=cc(),s=$r(),n=At(),o=Z7(),a=X7(),u=Q7(),l=e8(),h=t8(),c=r8(),d=i8(),f=n8(),m=class{constructor(g,v){this.parser=g,this.path=v,this.elements=this.split(v);}split(g){let v=new o.XPathLexer(e.CharStreams.fromString(g));v.recover=D=>{throw D},v.removeErrorListeners(),v.addErrorListener(new a.XPathLexerErrorListener);let x=new r.CommonTokenStream(v);try{x.fill();}catch(D){if(D instanceof i.LexerNoViableAltException){let F="Invalid tokens or characters at index "+v.charPositionInLine+" in path '"+g+"' -- "+D.message;throw new RangeError(F)}throw D}let _=x.getTokens(),E=[],b=_.length,w=0;e:for(;w<b;){let D=_[w],N;switch(D.type){case o.XPathLexer.ROOT:case o.XPathLexer.ANYWHERE:let F=D.type===o.XPathLexer.ANYWHERE;w++,N=_[w];let U=N.type===o.XPathLexer.BANG;U&&(w++,N=_[w]);let Z=this.getXPathElement(N,F);Z.invert=U,E.push(Z),w++;break;case o.XPathLexer.TOKEN_REF:case o.XPathLexer.RULE_REF:case o.XPathLexer.WILDCARD:E.push(this.getXPathElement(D,!1)),w++;break;case n.Token.EOF:break e;default:throw new Error("Unknowth path element "+D)}}return E}getXPathElement(g,v){if(g.type===n.Token.EOF)throw new Error("Missing path element at end of path");let x=g.text;if(x==null)throw new Error("Expected wordToken to have text content.");let _=this.parser.getTokenType(x),E=this.parser.getRuleIndex(x);switch(g.type){case o.XPathLexer.WILDCARD:return v?new d.XPathWildcardAnywhereElement:new f.XPathWildcardElement;case o.XPathLexer.TOKEN_REF:case o.XPathLexer.STRING:if(_===n.Token.INVALID_TYPE)throw new Error(x+" at index "+g.startIndex+" isn't a valid token name");return v?new h.XPathTokenAnywhereElement(x,_):new c.XPathTokenElement(x,_);default:if(E===-1)throw new Error(x+" at index "+g.startIndex+" isn't a valid rule name");return v?new u.XPathRuleAnywhereElement(x,E):new l.XPathRuleElement(x,E)}}static findAll(g,v,x){return new m(x,v).evaluate(g)}evaluate(g){let v=new s.ParserRuleContext;v.addChild(g);let x=new Set([v]),_=0;for(;_<this.elements.length;){let E=new Set;for(let b of x)b.childCount>0&&this.elements[_].evaluate(b).forEach(E.add,E);_++,x=E;}return x}};t.XPath=m,m.WILDCARD="*",m.NOT="!";}),s8=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParseTreePattern=void 0;var i=fe(),s=Ip(),n=class{constructor(a,u,l,h){this._matcher=a,this._patternRuleIndex=l,this._pattern=u,this._patternTree=h;}match(a){return this._matcher.match(a,this)}matches(a){return this._matcher.match(a,this).succeeded}findAll(a,u){let l=s.XPath.findAll(a,u,this._matcher.parser),h=[];for(let c of l){let d=this.match(c);d.succeeded&&h.push(d);}return h}get matcher(){return this._matcher}get pattern(){return this._pattern}get patternRuleIndex(){return this._patternRuleIndex}get patternTree(){return this._patternTree}};e([i.NotNull],n.prototype,"_pattern",void 0),e([i.NotNull],n.prototype,"_patternTree",void 0),e([i.NotNull],n.prototype,"_matcher",void 0),e([i.NotNull,r(0,i.NotNull)],n.prototype,"match",null),e([r(0,i.NotNull)],n.prototype,"matches",null),e([i.NotNull,r(0,i.NotNull),r(1,i.NotNull)],n.prototype,"findAll",null),e([i.NotNull],n.prototype,"matcher",null),e([i.NotNull],n.prototype,"pattern",null),e([i.NotNull],n.prototype,"patternTree",null),n=e([r(0,i.NotNull),r(1,i.NotNull),r(3,i.NotNull)],n),t.ParseTreePattern=n;}),o8=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleTagToken=void 0;var i=fe(),s=At(),n=class{constructor(a,u,l){if(a==null||a.length===0)throw new Error("ruleName cannot be null or empty.");this._ruleName=a,this.bypassTokenType=u,this._label=l;}get ruleName(){return this._ruleName}get label(){return this._label}get channel(){return s.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}};e([i.NotNull],n.prototype,"ruleName",null),e([i.Override],n.prototype,"channel",null),e([i.Override],n.prototype,"text",null),e([i.Override],n.prototype,"type",null),e([i.Override],n.prototype,"line",null),e([i.Override],n.prototype,"charPositionInLine",null),e([i.Override],n.prototype,"tokenIndex",null),e([i.Override],n.prototype,"startIndex",null),e([i.Override],n.prototype,"stopIndex",null),e([i.Override],n.prototype,"tokenSource",null),e([i.Override],n.prototype,"inputStream",null),e([i.Override],n.prototype,"toString",null),n=e([r(0,i.NotNull)],n),t.RuleTagToken=n;}),Bb=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Chunk=void 0;var e=class{};t.Chunk=e;}),a8=te(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h};Object.defineProperty(t,"__esModule",{value:!0}),t.TagChunk=void 0;var r=Bb(),i=fe(),s=class extends r.Chunk{constructor(n,o){if(super(),n==null||n.length===0)throw new Error("tag cannot be null or empty");this._tag=n,this._label=o;}get tag(){return this._tag}get label(){return this._label}toString(){return this._label!=null?this._label+":"+this._tag:this._tag}};e([i.NotNull],s.prototype,"tag",null),e([i.Override],s.prototype,"toString",null),t.TagChunk=s;}),u8=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.TextChunk=void 0;var i=Bb(),s=fe(),n=class extends i.Chunk{constructor(a){if(super(),a==null)throw new Error("text cannot be null");this._text=a;}get text(){return this._text}toString(){return "'"+this._text+"'"}};e([s.NotNull],n.prototype,"_text",void 0),e([s.NotNull],n.prototype,"text",null),e([s.Override],n.prototype,"toString",null),n=e([r(0,s.NotNull)],n),t.TextChunk=n;}),l8=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.TokenTagToken=void 0;var i=Ma(),s=fe(),n=class extends i.CommonToken{constructor(a,u,l){super(u),this._tokenName=a,this._label=l;}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}};e([s.NotNull],n.prototype,"_tokenName",void 0),e([s.NotNull],n.prototype,"tokenName",null),e([s.Override],n.prototype,"text",null),e([s.Override],n.prototype,"toString",null),n=e([r(0,s.NotNull)],n),t.TokenTagToken=n;}),c8=te(t=>{var e=t&&t.__decorate||function(N,F,U,Z){var re=arguments.length,ae=re<3?F:Z===null?Z=Object.getOwnPropertyDescriptor(F,U):Z,k;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")ae=Reflect.decorate(N,F,U,Z);else for(var y=N.length-1;y>=0;y--)(k=N[y])&&(ae=(re<3?k(ae):re>3?k(F,U,ae):k(F,U))||ae);return re>3&&ae&&Object.defineProperty(F,U,ae),ae},r=t&&t.__param||function(N,F){return function(U,Z){F(U,Z,N);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ParseTreePatternMatcher=void 0;var i=jb(),s=Lp(),n=Pp(),o=Pb(),a=Y7(),u=fe(),l=Ib(),h=Mb(),c=$r(),d=J7(),f=s8(),m=nn(),g=Fp(),v=o8(),x=a8(),_=lo(),E=u8(),b=At(),w=l8(),D=class{constructor(N,F){this.start="<",this.stop=">",this.escape="\\",this.escapeRE=/\\/g,this._lexer=N,this._parser=F;}setDelimiters(N,F,U){if(!N)throw new Error("start cannot be null or empty");if(!F)throw new Error("stop cannot be null or empty");this.start=N,this.stop=F,this.escape=U,this.escapeRE=new RegExp(U.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),"g");}matches(N,F,U=0){if(typeof F=="string"){let Z=this.compile(F,U);return this.matches(N,Z)}else {let Z=new a.MultiMap;return !this.matchImpl(N,F.patternTree,Z)}}match(N,F,U=0){if(typeof F=="string"){let Z=this.compile(F,U);return this.match(N,Z)}else {let Z=new a.MultiMap,re=this.matchImpl(N,F.patternTree,Z);return new d.ParseTreeMatch(N,F,Z,re)}}compile(N,F){let U=this.tokenize(N),Z=new o.ListTokenSource(U),re=new n.CommonTokenStream(Z),ae=this._parser,k=new h.ParserInterpreter(ae.grammarFileName,ae.vocabulary,ae.ruleNames,ae.getATNWithBypassAlts(),re),y;try{k.errorHandler=new i.BailErrorStrategy,y=k.parse(F);}catch(C){throw C instanceof l.ParseCancellationException?C.getCause():C instanceof m.RecognitionException?C:C instanceof Error?new D.CannotInvokeStartRule(C):C}if(re.LA(1)!==b.Token.EOF)throw new D.StartRuleDoesNotConsumeFullPattern;return new f.ParseTreePattern(this,N,F,y)}get lexer(){return this._lexer}get parser(){return this._parser}matchImpl(N,F,U){if(!N)throw new TypeError("tree cannot be null");if(!F)throw new TypeError("patternTree cannot be null");if(N instanceof _.TerminalNode&&F instanceof _.TerminalNode){let Z;if(N.symbol.type===F.symbol.type)if(F.symbol instanceof w.TokenTagToken){let re=F.symbol;U.map(re.tokenName,N);let ae=re.label;ae&&U.map(ae,N);}else N.text===F.text||Z||(Z=N);else Z||(Z=N);return Z}if(N instanceof c.ParserRuleContext&&F instanceof c.ParserRuleContext){let Z,re=this.getRuleTagToken(F);if(re){if(N.ruleContext.ruleIndex===F.ruleContext.ruleIndex){U.map(re.ruleName,N);let y=re.label;y&&U.map(y,N);}else Z||(Z=N);return Z}if(N.childCount!==F.childCount)return Z||(Z=N),Z;let ae=N.childCount;for(let k=0;k<ae;k++){let y=this.matchImpl(N.getChild(k),F.getChild(k),U);if(y)return y}return Z}return N}getRuleTagToken(N){if(N instanceof g.RuleNode&&N.childCount===1&&N.getChild(0)instanceof _.TerminalNode){let F=N.getChild(0);if(F.symbol instanceof v.RuleTagToken)return F.symbol}}tokenize(N){let F=this.split(N),U=[];for(let Z of F)if(Z instanceof x.TagChunk){let re=Z,ae=re.tag.substr(0,1);if(ae===ae.toUpperCase()){let k=this._parser.getTokenType(re.tag);if(k===b.Token.INVALID_TYPE)throw new Error("Unknown token "+re.tag+" in pattern: "+N);let y=new w.TokenTagToken(re.tag,k,re.label);U.push(y);}else if(ae===ae.toLowerCase()){let k=this._parser.getRuleIndex(re.tag);if(k===-1)throw new Error("Unknown rule "+re.tag+" in pattern: "+N);let y=this._parser.getATNWithBypassAlts().ruleToTokenType[k];U.push(new v.RuleTagToken(re.tag,y,re.label));}else throw new Error("invalid tag: "+re.tag+" in pattern: "+N)}else {let re=Z;this._lexer.inputStream=s.CharStreams.fromString(re.text);let ae=this._lexer.nextToken();for(;ae.type!==b.Token.EOF;)U.push(ae),ae=this._lexer.nextToken();}return U}split(N){let F=0,U=N.length,Z=[],ae=[],k=[];for(;F<U;)F===N.indexOf(this.escape+this.start,F)?F+=this.escape.length+this.start.length:F===N.indexOf(this.escape+this.stop,F)?F+=this.escape.length+this.stop.length:F===N.indexOf(this.start,F)?(ae.push(F),F+=this.start.length):F===N.indexOf(this.stop,F)?(k.push(F),F+=this.stop.length):F++;if(ae.length>k.length)throw new Error("unterminated tag in pattern: "+N);if(ae.length<k.length)throw new Error("missing start tag in pattern: "+N);let y=ae.length;for(let C=0;C<y;C++)if(ae[C]>=k[C])throw new Error("tag delimiters out of order in pattern: "+N);if(y===0){let C=N.substring(0,U);Z.push(new E.TextChunk(C));}if(y>0&&ae[0]>0){let C=N.substring(0,ae[0]);Z.push(new E.TextChunk(C));}for(let C=0;C<y;C++){let S=N.substring(ae[C]+this.start.length,k[C]),R=S,L,I=S.indexOf(":");if(I>=0&&(L=S.substring(0,I),R=S.substring(I+1,S.length)),Z.push(new x.TagChunk(R,L)),C+1<y){let K=N.substring(k[C]+this.stop.length,ae[C+1]);Z.push(new E.TextChunk(K));}}if(y>0){let C=k[y-1]+this.stop.length;if(C<U){let S=N.substring(C,U);Z.push(new E.TextChunk(S));}}for(let C=0;C<Z.length;C++){let S=Z[C];if(S instanceof E.TextChunk){let R=S.text.replace(this.escapeRE,"");R.length<S.text.length&&(Z[C]=new E.TextChunk(R));}}return Z}};e([u.NotNull,r(1,u.NotNull)],D.prototype,"match",null),e([u.NotNull],D.prototype,"lexer",null),e([u.NotNull],D.prototype,"parser",null),e([r(0,u.NotNull),r(1,u.NotNull),r(2,u.NotNull)],D.prototype,"matchImpl",null),t.ParseTreePatternMatcher=D,function(N){class F extends Error{constructor(re){super(`CannotInvokeStartRule: ${re}`),this.error=re;}}N.CannotInvokeStartRule=F;class U extends Error{constructor(){super("StartRuleDoesNotConsumeFullPattern");}}N.StartRuleDoesNotConsumeFullPattern=U;}(D=t.ParseTreePatternMatcher||(t.ParseTreePatternMatcher={}));}),Ua=te(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h},r=t&&t.__param||function(n,o){return function(a,u){o(a,u,n);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DecisionEventInfo=void 0;var i=fe(),s=class{constructor(o,a,u,l,h,c){this.decision=o,this.fullCtx=c,this.stopIndex=h,this.input=u,this.startIndex=l,this.state=a;}};e([i.NotNull],s.prototype,"input",void 0),s=e([r(2,i.NotNull)],s),t.DecisionEventInfo=s;}),h8=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.AmbiguityInfo=void 0;var i=Ua(),s=fe(),n=class extends i.DecisionEventInfo{constructor(a,u,l,h,c,d){super(a,u,h,c,d,u.useContext),this.ambigAlts=l;}get ambiguousAlternatives(){return this.ambigAlts}};e([s.NotNull],n.prototype,"ambigAlts",void 0),e([s.NotNull],n.prototype,"ambiguousAlternatives",null),n=e([r(1,s.NotNull),r(2,s.NotNull),r(3,s.NotNull)],n),t.AmbiguityInfo=n;}),f8=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ContextSensitivityInfo=void 0;var i=Ua(),s=fe(),n=class extends i.DecisionEventInfo{constructor(a,u,l,h,c){super(a,u,l,h,c,!0);}};n=e([r(1,s.NotNull),r(2,s.NotNull)],n),t.ContextSensitivityInfo=n;}),d8=te(t=>{var e=t&&t.__decorate||function(s,n,o,a){var u=arguments.length,l=u<3?n:a===null?a=Object.getOwnPropertyDescriptor(n,o):a,h;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")l=Reflect.decorate(s,n,o,a);else for(var c=s.length-1;c>=0;c--)(h=s[c])&&(l=(u<3?h(l):u>3?h(n,o,l):h(n,o))||l);return u>3&&l&&Object.defineProperty(n,o,l),l};Object.defineProperty(t,"__esModule",{value:!0}),t.DecisionInfo=void 0;var r=fe(),i=class{constructor(s){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=s;}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+"}"}};e([r.Override],i.prototype,"toString",null),t.DecisionInfo=i;}),p8=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorInfo=void 0;var i=Ua(),s=fe(),n=class extends i.DecisionEventInfo{constructor(a,u,l,h,c){super(a,u,l,h,c,u.useContext);}};n=e([r(1,s.NotNull),r(2,s.NotNull)],n),t.ErrorInfo=n;}),m8=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LookaheadEventInfo=void 0;var i=Ua(),s=fe(),n=class extends i.DecisionEventInfo{constructor(a,u,l,h,c,d,f){super(a,u,h,c,d,f),this.predictedAlt=l;}};n=e([r(3,s.NotNull)],n),t.LookaheadEventInfo=n;}),g8=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c},r=t&&t.__param||function(o,a){return function(u,l){a(u,l,o);}};Object.defineProperty(t,"__esModule",{value:!0}),t.PredicateEvalInfo=void 0;var i=Ua(),s=fe(),n=class extends i.DecisionEventInfo{constructor(a,u,l,h,c,d,f,m){super(u,a,l,h,c,a.useContext),this.semctx=d,this.evalResult=f,this.predictedAlt=m;}};n=e([r(0,s.NotNull),r(2,s.NotNull),r(5,s.NotNull)],n),t.PredicateEvalInfo=n;}),lb=te(t=>{var e=t&&t.__decorate||function(v,x,_,E){var b=arguments.length,w=b<3?x:E===null?E=Object.getOwnPropertyDescriptor(x,_):E,D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")w=Reflect.decorate(v,x,_,E);else for(var N=v.length-1;N>=0;N--)(D=v[N])&&(w=(b<3?D(w):b>3?D(x,_,w):D(x,_))||w);return b>3&&w&&Object.defineProperty(x,_,w),w},r=t&&t.__param||function(v,x){return function(_,E){x(_,E,v);}};Object.defineProperty(t,"__esModule",{value:!0}),t.ProfilingATNSimulator=void 0;var i=h8(),s=ti(),n=lc(),o=f8(),a=d8(),u=p8(),l=fe(),h=m8(),c=Ha(),d=g8(),f=ao(),m=Rb(),g=class extends c.ParserATNSimulator{constructor(v){super(v.interpreter.atn,v),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 x=0;x<this.numDecisions;x++)this.decisions.push(new a.DecisionInfo(x));}adaptivePredict(v,x,_,E){if(E!==void 0)return super.adaptivePredict(v,x,_,E);try{this._input=v,this._startIndex=v.index,this._sllStopIndex=this._startIndex-1,this._llStopIndex=-1,this.currentDecision=x,this.currentState=void 0,this.conflictingAltResolvedBySLL=s.ATN.INVALID_ALT_NUMBER;let b=process.hrtime(),w=super.adaptivePredict(v,x,_),D=process.hrtime(),N=(D[0]-b[0])*1e9;N===0?N=D[1]-b[1]:N+=1e9-b[1]+D[1],this.decisions[x].timeInPrediction+=N,this.decisions[x].invocations++;let F=this._sllStopIndex-this._startIndex+1;if(this.decisions[x].SLL_TotalLook+=F,this.decisions[x].SLL_MinLook=this.decisions[x].SLL_MinLook===0?F:Math.min(this.decisions[x].SLL_MinLook,F),F>this.decisions[x].SLL_MaxLook&&(this.decisions[x].SLL_MaxLook=F,this.decisions[x].SLL_MaxLookEvent=new h.LookaheadEventInfo(x,void 0,w,v,this._startIndex,this._sllStopIndex,!1)),this._llStopIndex>=0){let U=this._llStopIndex-this._startIndex+1;this.decisions[x].LL_TotalLook+=U,this.decisions[x].LL_MinLook=this.decisions[x].LL_MinLook===0?U:Math.min(this.decisions[x].LL_MinLook,U),U>this.decisions[x].LL_MaxLook&&(this.decisions[x].LL_MaxLook=U,this.decisions[x].LL_MaxLookEvent=new h.LookaheadEventInfo(x,void 0,w,v,this._startIndex,this._llStopIndex,!0));}return w}finally{this._input=void 0,this.currentDecision=-1;}}getStartState(v,x,_,E){let b=super.getStartState(v,x,_,E);return this.currentState=b,b}computeStartState(v,x,_){let E=super.computeStartState(v,x,_);return this.currentState=E,E}computeReachSet(v,x,_,E){if(this._input===void 0)throw new Error("Invalid state");let b=super.computeReachSet(v,x,_,E);return b==null&&this.decisions[this.currentDecision].errors.push(new u.ErrorInfo(this.currentDecision,x,this._input,this._startIndex,this._input.index)),this.currentState=b,b}getExistingTargetState(v,x){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 _=super.getExistingTargetState(v,x);if(_!=null&&(this.currentState=new m.SimulatorState(this.currentState.outerContext,_,this.currentState.useContext,this.currentState.remainingOuterContext),this.currentState.useContext?this.decisions[this.currentDecision].LL_DFATransitions++:this.decisions[this.currentDecision].SLL_DFATransitions++,_===n.ATNSimulator.ERROR)){let E=new m.SimulatorState(this.currentState.outerContext,v,this.currentState.useContext,this.currentState.remainingOuterContext);this.decisions[this.currentDecision].errors.push(new u.ErrorInfo(this.currentDecision,E,this._input,this._startIndex,this._input.index));}return _}computeTargetState(v,x,_,E,b,w){let D=super.computeTargetState(v,x,_,E,b,w);return b?this.decisions[this.currentDecision].LL_ATNTransitions++:this.decisions[this.currentDecision].SLL_ATNTransitions++,D}evalSemanticContextImpl(v,x,_){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let E=super.evalSemanticContextImpl(v,x,_);if(!(v instanceof f.SemanticContext.PrecedencePredicate)){let w=this._llStopIndex>=0?this._llStopIndex:this._sllStopIndex;this.decisions[this.currentDecision].predicateEvals.push(new d.PredicateEvalInfo(this.currentState,this.currentDecision,this._input,this._startIndex,w,v,E,_));}return E}reportContextSensitivity(v,x,_,E,b){if(this._input===void 0)throw new Error("Invalid state");x!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new o.ContextSensitivityInfo(this.currentDecision,_,this._input,E,b)),super.reportContextSensitivity(v,x,_,E,b);}reportAttemptingFullContext(v,x,_,E,b){x!=null?this.conflictingAltResolvedBySLL=x.nextSetBit(0):this.conflictingAltResolvedBySLL=_.s0.configs.getRepresentedAlternatives().nextSetBit(0),this.decisions[this.currentDecision].LL_Fallback++,super.reportAttemptingFullContext(v,x,_,E,b);}reportAmbiguity(v,x,_,E,b,w,D){if(this.currentState===void 0||this._input===void 0)throw new Error("Invalid state");let N;w!=null?N=w.nextSetBit(0):N=D.getRepresentedAlternatives().nextSetBit(0),this.conflictingAltResolvedBySLL!==s.ATN.INVALID_ALT_NUMBER&&N!==this.conflictingAltResolvedBySLL&&this.decisions[this.currentDecision].contextSensitivities.push(new o.ContextSensitivityInfo(this.currentDecision,this.currentState,this._input,_,E)),this.decisions[this.currentDecision].ambiguities.push(new i.AmbiguityInfo(this.currentDecision,this.currentState,w,this._input,_,E)),super.reportAmbiguity(v,x,_,E,b,w,D);}getDecisionInfo(){return this.decisions}getCurrentState(){return this.currentState}};e([l.Override,r(0,l.NotNull)],g.prototype,"adaptivePredict",null),e([l.Override],g.prototype,"getStartState",null),e([l.Override],g.prototype,"computeStartState",null),e([l.Override],g.prototype,"computeReachSet",null),e([l.Override],g.prototype,"getExistingTargetState",null),e([l.Override],g.prototype,"computeTargetState",null),e([l.Override],g.prototype,"evalSemanticContextImpl",null),e([l.Override],g.prototype,"reportContextSensitivity",null),e([l.Override],g.prototype,"reportAttemptingFullContext",null),e([l.Override,r(0,l.NotNull),r(5,l.NotNull),r(6,l.NotNull)],g.prototype,"reportAmbiguity",null),t.ProfilingATNSimulator=g;}),Va=te(t=>{var e=t&&t.__decorate||function(b,w,D,N){var F=arguments.length,U=F<3?w:N===null?N=Object.getOwnPropertyDescriptor(w,D):N,Z;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")U=Reflect.decorate(b,w,D,N);else for(var re=b.length-1;re>=0;re--)(Z=b[re])&&(U=(F<3?Z(U):F>3?Z(w,D,U):Z(w,D))||U);return F>3&&U&&Object.defineProperty(w,D,U),U},r=t&&t.__param||function(b,w){return function(D,N){w(D,N,b);}},i=t&&t.__awaiter||function(b,w,D,N){function F(U){return U instanceof D?U:new D(function(Z){Z(U);})}return new(D||(D=Promise))(function(U,Z){function re(y){try{k(N.next(y));}catch(C){Z(C);}}function ae(y){try{k(N.throw(y));}catch(C){Z(C);}}function k(y){y.done?U(y.value):F(y.value).then(re,ae);}k((N=N.apply(b,w||[])).next());})};Object.defineProperty(t,"__esModule",{value:!0}),t.Parser=void 0;var s=ei(),n=Tb(),o=pc(),a=kp(),u=dc(),l=pb(),h=ln(),c=fe(),d=G7(),f=Ha(),m=Nb(),g=ja(),v=lo(),x=At(),_=class{constructor(b,w){this.ruleNames=b,this.tokenStream=w;}enterEveryRule(b){console.log("enter "+this.ruleNames[b.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text);}exitEveryRule(b){console.log("exit "+this.ruleNames[b.ruleIndex]+", LT(1)="+this.tokenStream.LT(1).text);}visitErrorNode(b){}visitTerminal(b){let w=b.parent.ruleContext,D=b.symbol;console.log("consume "+D+" rule "+this.ruleNames[w.ruleIndex]);}};e([c.Override],_.prototype,"enterEveryRule",null),e([c.Override],_.prototype,"exitEveryRule",null),e([c.Override],_.prototype,"visitErrorNode",null),e([c.Override],_.prototype,"visitTerminal",null);var E=class extends g.Recognizer{constructor(b){super(),this._errHandler=new a.DefaultErrorStrategy,this._precedenceStack=new l.IntegerStack,this._buildParseTrees=!0,this._parseListeners=[],this._syntaxErrors=0,this.matchedEOF=!1,this._precedenceStack.push(0),this.inputStream=b;}reset(b){(b===void 0||b)&&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 w=this.interpreter;w!=null&&w.reset();}match(b){let w=this.currentToken;return w.type===b?(b===x.Token.EOF&&(this.matchedEOF=!0),this._errHandler.reportMatch(this),this.consume()):(w=this._errHandler.recoverInline(this),this._buildParseTrees&&w.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,w))),w}matchWildcard(){let b=this.currentToken;return b.type>0?(this._errHandler.reportMatch(this),this.consume()):(b=this._errHandler.recoverInline(this),this._buildParseTrees&&b.tokenIndex===-1&&this._ctx.addErrorNode(this.createErrorNode(this._ctx,b))),b}set buildParseTree(b){this._buildParseTrees=b;}get buildParseTree(){return this._buildParseTrees}getParseListeners(){return this._parseListeners}addParseListener(b){if(b==null)throw new TypeError("listener cannot be null");this._parseListeners.push(b);}removeParseListener(b){let w=this._parseListeners.findIndex(D=>D===b);w!==-1&&this._parseListeners.splice(w,1);}removeParseListeners(){this._parseListeners.length=0;}triggerEnterRuleEvent(){for(let b of this._parseListeners)b.enterEveryRule&&b.enterEveryRule(this._ctx),this._ctx.enterRule(b);}triggerExitRuleEvent(){for(let b=this._parseListeners.length-1;b>=0;b--){let w=this._parseListeners[b];this._ctx.exitRule(w),w.exitEveryRule&&w.exitEveryRule(this._ctx);}}get numberOfSyntaxErrors(){return this._syntaxErrors}get tokenFactory(){return this._input.tokenSource.tokenFactory}getATNWithBypassAlts(){let b=this.serializedATN;if(b==null)throw new Error("The current parser does not support an ATN with bypass alternatives.");let w=E.bypassAltsAtnCache.get(b);if(w==null){let D=new n.ATNDeserializationOptions;D.isGenerateRuleBypassTransitions=!0,w=new o.ATNDeserializer(D).deserialize(s.toCharArray(b)),E.bypassAltsAtnCache.set(b,w);}return w}compileParseTreePattern(b,w,D){return i(this,void 0,void 0,function*(){if(!D){if(this.inputStream){let Z=this.inputStream.tokenSource;Z instanceof h.Lexer&&(D=Z);}if(!D)throw new Error("Parser can't discover a lexer to use")}let N=D,F=yield Promise.resolve().then(()=>c8());return new F.ParseTreePatternMatcher(N,this).compile(b,w)})}get errorHandler(){return this._errHandler}set errorHandler(b){this._errHandler=b;}get inputStream(){return this._input}set inputStream(b){this.reset(!1),this._input=b;}get currentToken(){return this._input.LT(1)}notifyErrorListeners(b,w,D){w===void 0?w=this.currentToken:w===null&&(w=void 0),this._syntaxErrors++;let N=-1,F=-1;w!=null&&(N=w.line,F=w.charPositionInLine);let U=this.getErrorListenerDispatch();U.syntaxError&&U.syntaxError(this,w,N,F,b,D);}consume(){let b=this.currentToken;b.type!==E.EOF&&this.inputStream.consume();let w=this._parseListeners.length!==0;if(this._buildParseTrees||w)if(this._errHandler.inErrorRecoveryMode(this)){let D=this._ctx.addErrorNode(this.createErrorNode(this._ctx,b));if(w)for(let N of this._parseListeners)N.visitErrorNode&&N.visitErrorNode(D);}else {let D=this.createTerminalNode(this._ctx,b);if(this._ctx.addChild(D),w)for(let N of this._parseListeners)N.visitTerminal&&N.visitTerminal(D);}return b}createTerminalNode(b,w){return new v.TerminalNode(w)}createErrorNode(b,w){return new u.ErrorNode(w)}addContextToParseTree(){let b=this._ctx._parent;b!=null&&b.addChild(this._ctx);}enterRule(b,w,D){this.state=w,this._ctx=b,this._ctx._start=this._input.LT(1),this._buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent();}enterLeftFactoredRule(b,w,D){if(this.state=w,this._buildParseTrees){let N=this._ctx.getChild(this._ctx.childCount-1);this._ctx.removeLastChild(),N._parent=b,b.addChild(N);}this._ctx=b,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(b,w){if(b.altNumber=w,this._buildParseTrees&&this._ctx!==b){let D=this._ctx._parent;D!=null&&(D.removeLastChild(),D.addChild(b));}this._ctx=b;}get precedence(){return this._precedenceStack.isEmpty?-1:this._precedenceStack.peek()}enterRecursionRule(b,w,D,N){this.state=w,this._precedenceStack.push(N),this._ctx=b,this._ctx._start=this._input.LT(1),this.triggerEnterRuleEvent();}pushNewRecursionContext(b,w,D){let N=this._ctx;N._parent=b,N.invokingState=w,N._stop=this._input.tryLT(-1),this._ctx=b,this._ctx._start=N._start,this._buildParseTrees&&this._ctx.addChild(N),this.triggerEnterRuleEvent();}unrollRecursionContexts(b){this._precedenceStack.pop(),this._ctx._stop=this._input.tryLT(-1);let w=this._ctx;if(this._parseListeners.length>0)for(;this._ctx!==b;)this.triggerExitRuleEvent(),this._ctx=this._ctx._parent;else this._ctx=b;w._parent=b,this._buildParseTrees&&b!=null&&b.addChild(w);}getInvokingContext(b){let w=this._ctx;for(;w&&w.ruleIndex!==b;)w=w._parent;return w}get context(){return this._ctx}set context(b){this._ctx=b;}precpred(b,w){return w>=this._precedenceStack.peek()}getErrorListenerDispatch(){return new m.ProxyParserErrorListener(this.getErrorListeners())}inContext(b){return !1}isExpectedToken(b){let w=this.interpreter.atn,D=this._ctx,N=w.states[this.state],F=w.nextTokens(N);if(F.contains(b))return !0;if(!F.contains(x.Token.EPSILON))return !1;for(;D!=null&&D.invokingState>=0&&F.contains(x.Token.EPSILON);){let Z=w.states[D.invokingState].transition(0);if(F=w.nextTokens(Z.followState),F.contains(b))return !0;D=D._parent;}return !!(F.contains(x.Token.EPSILON)&&b===x.Token.EOF)}get isMatchedEOF(){return this.matchedEOF}getExpectedTokens(){return this.atn.getExpectedTokens(this.state,this.context)}getExpectedTokensWithinCurrentRule(){let b=this.interpreter.atn,w=b.states[this.state];return b.nextTokens(w)}getRuleIndex(b){let w=this.getRuleIndexMap().get(b);return w!=null?w:-1}get ruleContext(){return this._ctx}getRuleInvocationStack(b=this._ctx){let w=b,D=this.ruleNames,N=[];for(;w!=null;){let F=w.ruleIndex;F<0?N.push("n/a"):N.push(D[F]),w=w._parent;}return N}getDFAStrings(){let b=[];for(let w of this._interp.atn.decisionToDFA)b.push(w.toString(this.vocabulary,this.ruleNames));return b}dumpDFA(){let b=!1;for(let w of this._interp.atn.decisionToDFA)w.isEmpty||(b&&console.log(),console.log("Decision "+w.decision+":"),process.stdout.write(w.toString(this.vocabulary,this.ruleNames)),b=!0);}get sourceName(){return this._input.sourceName}get parseInfo(){return Promise.resolve().then(()=>lb()).then(b=>{let w=this.interpreter;if(w instanceof b.ProfilingATNSimulator)return new d.ParseInfo(w)})}setProfile(b){return i(this,void 0,void 0,function*(){let w=yield Promise.resolve().then(()=>lb()),D=this.interpreter;b?D instanceof w.ProfilingATNSimulator||(this.interpreter=new w.ProfilingATNSimulator(this)):D instanceof w.ProfilingATNSimulator&&(this.interpreter=new f.ParserATNSimulator(this.atn,this)),this.interpreter.setPredictionMode(D.getPredictionMode());})}set isTrace(b){b?(this._tracer?this.removeParseListener(this._tracer):this._tracer=new _(this.ruleNames,this._input),this.addParseListener(this._tracer)):this._tracer&&(this.removeParseListener(this._tracer),this._tracer=void 0);}get isTrace(){return this._tracer!=null}};E.bypassAltsAtnCache=new Map,e([c.NotNull],E.prototype,"_errHandler",void 0),e([c.NotNull],E.prototype,"match",null),e([c.NotNull],E.prototype,"matchWildcard",null),e([c.NotNull],E.prototype,"getParseListeners",null),e([r(0,c.NotNull)],E.prototype,"addParseListener",null),e([c.NotNull],E.prototype,"getATNWithBypassAlts",null),e([c.NotNull,r(0,c.NotNull)],E.prototype,"errorHandler",null),e([c.Override],E.prototype,"inputStream",null),e([c.NotNull],E.prototype,"currentToken",null),e([r(0,c.NotNull)],E.prototype,"enterRule",null),e([c.Override,r(0,c.Nullable)],E.prototype,"precpred",null),e([c.Override],E.prototype,"getErrorListenerDispatch",null),e([c.NotNull],E.prototype,"getExpectedTokens",null),e([c.NotNull],E.prototype,"getExpectedTokensWithinCurrentRule",null),e([c.Override],E.prototype,"parseInfo",null),t.Parser=E;}),mc=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.NoViableAltException=void 0;var r=Va(),i=nn(),s=fe(),n=class extends i.RecognitionException{constructor(o,a,u,l,h,c){o instanceof r.Parser&&(a===void 0&&(a=o.inputStream),u===void 0&&(u=o.currentToken),l===void 0&&(l=o.currentToken),c===void 0&&(c=o.context)),super(o,a,c),this._deadEndConfigs=h,this._startToken=u,this.setOffendingToken(o,l);}get startToken(){return this._startToken}get deadEndConfigs(){return this._deadEndConfigs}};e([s.NotNull],n.prototype,"_startToken",void 0),t.NoViableAltException=n;}),kp=te(t=>{var e=t&&t.__decorate||function(f,m,g,v){var x=arguments.length,_=x<3?m:v===null?v=Object.getOwnPropertyDescriptor(m,g):v,E;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")_=Reflect.decorate(f,m,g,v);else for(var b=f.length-1;b>=0;b--)(E=f[b])&&(_=(x<3?E(_):x>3?E(m,g,_):E(m,g))||_);return x>3&&_&&Object.defineProperty(m,g,_),_},r=t&&t.__param||function(f,m){return function(g,v){m(g,v,f);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultErrorStrategy=void 0;var i=Ci(),s=Qt(),n=sc(),o=oc(),a=cs(),u=mc(),l=Vr(),h=At(),c=fe(),d=class{constructor(){this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.nextTokensState=i.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,m){this.inErrorRecoveryMode(f)||(this.beginErrorCondition(f),m instanceof u.NoViableAltException?this.reportNoViableAlternative(f,m):m instanceof o.InputMismatchException?this.reportInputMismatch(f,m):m instanceof n.FailedPredicateException?this.reportFailedPredicate(f,m):(console.error(`unknown recognition error type: ${m}`),this.notifyErrorListeners(f,m.toString(),m)));}notifyErrorListeners(f,m,g){let v=g.getOffendingToken(f);v===void 0&&(v=null),f.notifyErrorListeners(m,v,g);}recover(f,m){this.lastErrorIndex===f.inputStream.index&&this.lastErrorStates&&this.lastErrorStates.contains(f.state)&&f.consume(),this.lastErrorIndex=f.inputStream.index,this.lastErrorStates||(this.lastErrorStates=new a.IntervalSet),this.lastErrorStates.add(f.state);let g=this.getErrorRecoverySet(f);this.consumeUntil(f,g);}sync(f){let m=f.interpreter.atn.states[f.state];if(this.inErrorRecoveryMode(f))return;let v=f.inputStream.LA(1),x=f.atn.nextTokens(m);if(x.contains(v)){this.nextTokensContext=void 0,this.nextTokensState=i.ATNState.INVALID_STATE_NUMBER;return}if(x.contains(h.Token.EPSILON)){this.nextTokensContext===void 0&&(this.nextTokensContext=f.context,this.nextTokensState=f.state);return}switch(m.stateType){case s.ATNStateType.BLOCK_START:case s.ATNStateType.STAR_BLOCK_START:case s.ATNStateType.PLUS_BLOCK_START:case s.ATNStateType.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(f))return;throw new o.InputMismatchException(f);case s.ATNStateType.PLUS_LOOP_BACK:case s.ATNStateType.STAR_LOOP_BACK:this.reportUnwantedToken(f);let E=f.getExpectedTokens().or(this.getErrorRecoverySet(f));this.consumeUntil(f,E);break;}}reportNoViableAlternative(f,m){let g=f.inputStream,v;g?m.startToken.type===h.Token.EOF?v="<EOF>":v=g.getTextFromRange(m.startToken,m.getOffendingToken()):v="<unknown input>";let x="no viable alternative at input "+this.escapeWSAndQuote(v);this.notifyErrorListeners(f,x,m);}reportInputMismatch(f,m){let g=m.expectedTokens,v=g?g.toStringVocabulary(f.vocabulary):"",x="mismatched input "+this.getTokenErrorDisplay(m.getOffendingToken(f))+" expecting "+v;this.notifyErrorListeners(f,x,m);}reportFailedPredicate(f,m){let v="rule "+f.ruleNames[f.context.ruleIndex]+" "+m.message;this.notifyErrorListeners(f,v,m);}reportUnwantedToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let m=f.currentToken,g=this.getTokenErrorDisplay(m),v=this.getExpectedTokens(f),x="extraneous input "+g+" expecting "+v.toStringVocabulary(f.vocabulary);f.notifyErrorListeners(x,m,void 0);}reportMissingToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let m=f.currentToken,v="missing "+this.getExpectedTokens(f).toStringVocabulary(f.vocabulary)+" at "+this.getTokenErrorDisplay(m);f.notifyErrorListeners(v,m,void 0);}recoverInline(f){let m=this.singleTokenDeletion(f);if(m)return f.consume(),m;if(this.singleTokenInsertion(f))return this.getMissingSymbol(f);throw this.nextTokensContext===void 0?new o.InputMismatchException(f):new o.InputMismatchException(f,this.nextTokensState,this.nextTokensContext)}singleTokenInsertion(f){let m=f.inputStream.LA(1),v=f.interpreter.atn.states[f.state].transition(0).target,x=f.interpreter.atn;return x.nextTokens(v,l.PredictionContext.fromRuleContext(x,f.context)).contains(m)?(this.reportMissingToken(f),!0):!1}singleTokenDeletion(f){let m=f.inputStream.LA(2);if(this.getExpectedTokens(f).contains(m)){this.reportUnwantedToken(f),f.consume();let v=f.currentToken;return this.reportMatch(f),v}}getMissingSymbol(f){let m=f.currentToken,g=this.getExpectedTokens(f),v=h.Token.INVALID_TYPE;g.isNil||(v=g.minElement);let x;v===h.Token.EOF?x="<missing EOF>":x="<missing "+f.vocabulary.getDisplayName(v)+">";let _=m,E=f.inputStream.tryLT(-1);return _.type===h.Token.EOF&&E!=null&&(_=E),this.constructToken(f.inputStream.tokenSource,v,x,_)}constructToken(f,m,g,v){let x=f.tokenFactory,_=v.tokenSource,E=_?_.inputStream:void 0;return x.create({source:f,stream:E},m,g,h.Token.DEFAULT_CHANNEL,-1,-1,v.line,v.charPositionInLine)}getExpectedTokens(f){return f.getExpectedTokens()}getTokenErrorDisplay(f){if(!f)return "<no token>";let m=this.getSymbolText(f);return m||(this.getSymbolType(f)===h.Token.EOF?m="<EOF>":m=`<${this.getSymbolType(f)}>`),this.escapeWSAndQuote(m)}getSymbolText(f){return f.text}getSymbolType(f){return f.type}escapeWSAndQuote(f){return f=f.replace(`
80
+ `,"\\n"),f=f.replace("\r","\\r"),f=f.replace(" ","\\t"),"'"+f+"'"}getErrorRecoverySet(f){let m=f.interpreter.atn,g=f.context,v=new a.IntervalSet;for(;g&&g.invokingState>=0;){let _=m.states[g.invokingState].transition(0),E=m.nextTokens(_.followState);v.addAll(E),g=g._parent;}return v.remove(h.Token.EPSILON),v}consumeUntil(f,m){let g=f.inputStream.LA(1);for(;g!==h.Token.EOF&&!m.contains(g);)f.consume(),g=f.inputStream.LA(1);}};e([c.Override],d.prototype,"reset",null),e([r(0,c.NotNull)],d.prototype,"beginErrorCondition",null),e([c.Override],d.prototype,"inErrorRecoveryMode",null),e([r(0,c.NotNull)],d.prototype,"endErrorCondition",null),e([c.Override],d.prototype,"reportMatch",null),e([c.Override],d.prototype,"reportError",null),e([r(0,c.NotNull)],d.prototype,"notifyErrorListeners",null),e([c.Override],d.prototype,"recover",null),e([c.Override],d.prototype,"sync",null),e([r(0,c.NotNull),r(1,c.NotNull)],d.prototype,"reportNoViableAlternative",null),e([r(0,c.NotNull),r(1,c.NotNull)],d.prototype,"reportInputMismatch",null),e([r(0,c.NotNull),r(1,c.NotNull)],d.prototype,"reportFailedPredicate",null),e([r(0,c.NotNull)],d.prototype,"reportUnwantedToken",null),e([r(0,c.NotNull)],d.prototype,"reportMissingToken",null),e([c.Override],d.prototype,"recoverInline",null),e([r(0,c.NotNull)],d.prototype,"singleTokenInsertion",null),e([r(0,c.NotNull)],d.prototype,"singleTokenDeletion",null),e([c.NotNull,r(0,c.NotNull)],d.prototype,"getMissingSymbol",null),e([c.NotNull,r(0,c.NotNull)],d.prototype,"getExpectedTokens",null),e([r(0,c.NotNull)],d.prototype,"getSymbolText",null),e([r(0,c.NotNull)],d.prototype,"getSymbolType",null),e([c.NotNull,r(0,c.NotNull)],d.prototype,"escapeWSAndQuote",null),e([c.NotNull,r(0,c.NotNull)],d.prototype,"getErrorRecoverySet",null),e([r(0,c.NotNull),r(1,c.NotNull)],d.prototype,"consumeUntil",null),t.DefaultErrorStrategy=d;}),jb=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d};Object.defineProperty(t,"__esModule",{value:!0}),t.BailErrorStrategy=void 0;var r=kp(),i=oc(),s=fe(),n=Ib(),o=class extends r.DefaultErrorStrategy{recover(a,u){for(let l=a.context;l;l=l.parent)l.exception=u;throw new n.ParseCancellationException(u)}recoverInline(a){let u=new i.InputMismatchException(a);for(let l=a.context;l;l=l.parent)l.exception=u;throw new n.ParseCancellationException(u)}sync(a){}};e([s.Override],o.prototype,"recover",null),e([s.Override],o.prototype,"recoverInline",null),e([s.Override],o.prototype,"sync",null),t.BailErrorStrategy=o;}),_8=te(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),y8=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Dependents=void 0;(function(r){r[r.SELF=0]="SELF",r[r.PARENTS=1]="PARENTS",r[r.CHILDREN=2]="CHILDREN",r[r.ANCESTORS=3]="ANCESTORS",r[r.DESCENDANTS=4]="DESCENDANTS",r[r.SIBLINGS=5]="SIBLINGS",r[r.PRECEEDING_SIBLINGS=6]="PRECEEDING_SIBLINGS",r[r.FOLLOWING_SIBLINGS=7]="FOLLOWING_SIBLINGS",r[r.PRECEEDING=8]="PRECEEDING",r[r.FOLLOWING=9]="FOLLOWING";})(t.Dependents||(t.Dependents={}));}),v8=te(t=>{var e=t&&t.__decorate||function(a,u,l,h){var c=arguments.length,d=c<3?u:h===null?h=Object.getOwnPropertyDescriptor(u,l):h,f;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")d=Reflect.decorate(a,u,l,h);else for(var m=a.length-1;m>=0;m--)(f=a[m])&&(d=(c<3?f(d):c>3?f(u,l,d):f(u,l))||d);return c>3&&d&&Object.defineProperty(u,l,d),d},r=t&&t.__param||function(a,u){return function(l,h){u(l,h,a);}};Object.defineProperty(t,"__esModule",{value:!0}),t.DiagnosticErrorListener=void 0;var i=an(),s=fe(),n=mr(),o=class{constructor(a=!0){this.exactOnly=a,this.exactOnly=a;}syntaxError(a,u,l,h,c,d){}reportAmbiguity(a,u,l,h,c,d,f){if(this.exactOnly&&!c)return;let m=this.getDecisionDescription(a,u),g=this.getConflictingAlts(d,f),v=a.inputStream.getText(n.Interval.of(l,h)),x=`reportAmbiguity d=${m}: ambigAlts=${g}, input='${v}'`;a.notifyErrorListeners(x);}reportAttemptingFullContext(a,u,l,h,c,d){let m=this.getDecisionDescription(a,u),g=a.inputStream.getText(n.Interval.of(l,h)),v=`reportAttemptingFullContext d=${m}, input='${g}'`;a.notifyErrorListeners(v);}reportContextSensitivity(a,u,l,h,c,d){let m=this.getDecisionDescription(a,u),g=a.inputStream.getText(n.Interval.of(l,h)),v=`reportContextSensitivity d=${m}, input='${g}'`;a.notifyErrorListeners(v);}getDecisionDescription(a,u){let l=u.decision,h=u.atnStartState.ruleIndex,c=a.ruleNames;if(h<0||h>=c.length)return l.toString();let d=c[h];return d?`${l} (${d})`:l.toString()}getConflictingAlts(a,u){if(a!=null)return a;let l=new i.BitSet;for(let h of u)l.set(h.alt);return l}};e([s.Override],o.prototype,"syntaxError",null),e([s.Override,r(0,s.NotNull),r(1,s.NotNull),r(6,s.NotNull)],o.prototype,"reportAmbiguity",null),e([s.Override,r(0,s.NotNull),r(1,s.NotNull),r(5,s.NotNull)],o.prototype,"reportAttemptingFullContext",null),e([s.Override,r(0,s.NotNull),r(1,s.NotNull),r(5,s.NotNull)],o.prototype,"reportContextSensitivity",null),e([r(0,s.NotNull),r(1,s.NotNull)],o.prototype,"getDecisionDescription",null),e([s.NotNull,r(1,s.NotNull)],o.prototype,"getConflictingAlts",null),t.DiagnosticErrorListener=o;}),x8=te(t=>{var e=t&&t.__decorate||function(u,l,h,c){var d=arguments.length,f=d<3?l:c===null?c=Object.getOwnPropertyDescriptor(l,h):c,m;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")f=Reflect.decorate(u,l,h,c);else for(var g=u.length-1;g>=0;g--)(m=u[g])&&(f=(d<3?m(f):d>3?m(l,h,f):m(l,h))||f);return d>3&&f&&Object.defineProperty(l,h,f),f},r=t&&t.__param||function(u,l){return function(h,c){l(h,c,u);}};Object.defineProperty(t,"__esModule",{value:!0}),t.LexerInterpreter=void 0;var i=ln(),s=hc(),n=fe(),o=fe(),a=class extends i.Lexer{constructor(l,h,c,d,f,m,g){if(super(g),m.grammarType!==0)throw new Error("IllegalArgumentException: The ATN must be a lexer ATN.");this._grammarFileName=l,this._atn=m,this._ruleNames=c.slice(0),this._channelNames=d.slice(0),this._modeNames=f.slice(0),this._vocabulary=h,this._interp=new s.LexerATNSimulator(m,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}};e([n.NotNull],a.prototype,"_vocabulary",void 0),e([o.Override],a.prototype,"atn",null),e([o.Override],a.prototype,"grammarFileName",null),e([o.Override],a.prototype,"ruleNames",null),e([o.Override],a.prototype,"channelNames",null),e([o.Override],a.prototype,"modeNames",null),e([o.Override],a.prototype,"vocabulary",null),a=e([r(1,n.NotNull)],a),t.LexerInterpreter=a;}),b8=te(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),E8=te(t=>{var e=t&&t.__decorate||function(o,a,u,l){var h=arguments.length,c=h<3?a:l===null?l=Object.getOwnPropertyDescriptor(a,u):l,d;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")c=Reflect.decorate(o,a,u,l);else for(var f=o.length-1;f>=0;f--)(d=o[f])&&(c=(h<3?d(c):h>3?d(a,u,c):d(a,u))||c);return h>3&&c&&Object.defineProperty(a,u,c),c};Object.defineProperty(t,"__esModule",{value:!0}),t.RuleContextWithAltNum=void 0;var r=ti(),i=fe(),s=$r(),n=class extends s.ParserRuleContext{constructor(o,a){a!==void 0?super(o,a):super(),this._altNumber=r.ATN.INVALID_ALT_NUMBER;}get altNumber(){return this._altNumber}set altNumber(o){this._altNumber=o;}};e([i.Override],n.prototype,"altNumber",null),t.RuleContextWithAltNum=n;}),C8=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RuleDependency=void 0;function e(r){return (i,s,n)=>{}}t.RuleDependency=e;}),T8=te(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RuleVersion=void 0;function e(r){return (i,s,n)=>{}}t.RuleVersion=e;}),A8=te(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),w8=te(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),D8=te(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),S8=te(t=>{var e=t&&t.__decorate||function(h,c,d,f){var m=arguments.length,g=m<3?c:f===null?f=Object.getOwnPropertyDescriptor(c,d):f,v;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")g=Reflect.decorate(h,c,d,f);else for(var x=h.length-1;x>=0;x--)(v=h[x])&&(g=(m<3?v(g):m>3?v(c,d,g):v(c,d))||g);return m>3&&g&&Object.defineProperty(c,d,g),g};Object.defineProperty(t,"__esModule",{value:!0}),t.RewriteOperation=t.TokenStreamRewriter=void 0;var r=mr(),i=fe(),s=At(),n=class{constructor(h){this.tokens=h,this.programs=new Map,this.programs.set(n.DEFAULT_PROGRAM_NAME,[]),this.lastRewriteTokenIndexes=new Map;}getTokenStream(){return this.tokens}rollback(h,c=n.DEFAULT_PROGRAM_NAME){let d=this.programs.get(c);d!=null&&this.programs.set(c,d.slice(n.MIN_TOKEN_INDEX,h));}deleteProgram(h=n.DEFAULT_PROGRAM_NAME){this.rollback(n.MIN_TOKEN_INDEX,h);}insertAfter(h,c,d=n.DEFAULT_PROGRAM_NAME){let f;typeof h=="number"?f=h:f=h.tokenIndex;let m=this.getProgram(d),g=new u(this.tokens,f,m.length,c);m.push(g);}insertBefore(h,c,d=n.DEFAULT_PROGRAM_NAME){let f;typeof h=="number"?f=h:f=h.tokenIndex;let m=this.getProgram(d),g=new a(this.tokens,f,m.length,c);m.push(g);}replaceSingle(h,c){typeof h=="number"?this.replace(h,h,c):this.replace(h,h,c);}replace(h,c,d,f=n.DEFAULT_PROGRAM_NAME){if(typeof h!="number"&&(h=h.tokenIndex),typeof c!="number"&&(c=c.tokenIndex),h>c||h<0||c<0||c>=this.tokens.size)throw new RangeError(`replace: range invalid: ${h}..${c}(size=${this.tokens.size})`);let m=this.getProgram(f),g=new l(this.tokens,h,c,m.length,d);m.push(g);}delete(h,c,d=n.DEFAULT_PROGRAM_NAME){c===void 0&&(c=h),typeof h=="number"?this.replace(h,c,"",d):this.replace(h,c,"",d);}getLastRewriteTokenIndex(h=n.DEFAULT_PROGRAM_NAME){let c=this.lastRewriteTokenIndexes.get(h);return c==null?-1:c}setLastRewriteTokenIndex(h,c){this.lastRewriteTokenIndexes.set(h,c);}getProgram(h){let c=this.programs.get(h);return c==null&&(c=this.initializeProgram(h)),c}initializeProgram(h){let c=[];return this.programs.set(h,c),c}getText(h,c=n.DEFAULT_PROGRAM_NAME){let d;h instanceof r.Interval?d=h:d=r.Interval.of(0,this.tokens.size-1),typeof h=="string"&&(c=h);let f=this.programs.get(c),m=d.a,g=d.b;if(g>this.tokens.size-1&&(g=this.tokens.size-1),m<0&&(m=0),f==null||f.length===0)return this.tokens.getText(d);let v=[],x=this.reduceToSingleOperationPerIndex(f),_=m;for(;_<=g&&_<this.tokens.size;){let E=x.get(_);x.delete(_);let b=this.tokens.get(_);E==null?(b.type!==s.Token.EOF&&v.push(String(b.text)),_++):_=E.execute(v);}if(g===this.tokens.size-1)for(let E of x.values())E.index>=this.tokens.size-1&&v.push(E.text.toString());return v.join("")}reduceToSingleOperationPerIndex(h){for(let d=0;d<h.length;d++){let f=h[d];if(f==null||!(f instanceof l))continue;let m=f,g=this.getKindOfOps(h,a,d);for(let x of g)x.index===m.index?(h[x.instructionIndex]=void 0,m.text=x.text.toString()+(m.text!=null?m.text.toString():"")):x.index>m.index&&x.index<=m.lastIndex&&(h[x.instructionIndex]=void 0);let v=this.getKindOfOps(h,l,d);for(let x of v){if(x.index>=m.index&&x.lastIndex<=m.lastIndex){h[x.instructionIndex]=void 0;continue}let _=x.lastIndex<m.index||x.index>m.lastIndex;if(x.text==null&&m.text==null&&!_)h[x.instructionIndex]=void 0,m.index=Math.min(x.index,m.index),m.lastIndex=Math.max(x.lastIndex,m.lastIndex);else if(!_)throw new Error(`replace op boundaries of ${m} overlap with previous ${x}`)}}for(let d=0;d<h.length;d++){let f=h[d];if(f==null||!(f instanceof a))continue;let m=f,g=this.getKindOfOps(h,a,d);for(let x of g)x.index===m.index&&(x instanceof u?(m.text=this.catOpText(x.text,m.text),h[x.instructionIndex]=void 0):x instanceof a&&(m.text=this.catOpText(m.text,x.text),h[x.instructionIndex]=void 0));let v=this.getKindOfOps(h,l,d);for(let x of v){if(m.index===x.index){x.text=this.catOpText(m.text,x.text),h[d]=void 0;continue}if(m.index>=x.index&&m.index<=x.lastIndex)throw new Error(`insert op ${m} within boundaries of previous ${x}`)}}let c=new Map;for(let d of h)if(d!=null){if(c.get(d.index)!=null)throw new Error("should only be one op per index");c.set(d.index,d);}return c}catOpText(h,c){let d="",f="";return h!=null&&(d=h.toString()),c!=null&&(f=c.toString()),d+f}getKindOfOps(h,c,d){let f=[];for(let m=0;m<d&&m<h.length;m++){let g=h[m];g!=null&&g instanceof c&&f.push(g);}return f}};t.TokenStreamRewriter=n,n.DEFAULT_PROGRAM_NAME="default",n.PROGRAM_INIT_SIZE=100,n.MIN_TOKEN_INDEX=0;var o=class{constructor(h,c,d,f){this.tokens=h,this.instructionIndex=d,this.index=c,this.text=f===void 0?"":f;}execute(h){return this.index}toString(){let h=this.constructor.name,c=h.indexOf("$");return h=h.substring(c+1,h.length),"<"+h+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}};e([i.Override],o.prototype,"toString",null),t.RewriteOperation=o;var a=class extends o{constructor(h,c,d,f){super(h,c,d,f);}execute(h){return h.push(this.text.toString()),this.tokens.get(this.index).type!==s.Token.EOF&&h.push(String(this.tokens.get(this.index).text)),this.index+1}};e([i.Override],a.prototype,"execute",null);var u=class extends a{constructor(h,c,d,f){super(h,c+1,d,f);}},l=class extends o{constructor(h,c,d,f,m){super(h,c,f,m),this.lastIndex=d;}execute(h){return this.text!=null&&h.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+'">'}};e([i.Override],l.prototype,"execute",null),e([i.Override],l.prototype,"toString",null);}),R8=te(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),N8=te(t=>{Object.defineProperty(t,"__esModule",{value:!0});}),O8=te(t=>{var e=t&&t.__createBinding||(Object.create?function(i,s,n,o){o===void 0&&(o=n),Object.defineProperty(i,o,{enumerable:!0,get:function(){return s[n]}});}:function(i,s,n,o){o===void 0&&(o=n),i[o]=s[n];}),r=t&&t.__exportStar||function(i,s){for(var n in i)n!=="default"&&!Object.prototype.hasOwnProperty.call(s,n)&&e(s,i,n);};Object.defineProperty(t,"__esModule",{value:!0}),r(g7(),t),r(_7(),t),r(y7(),t),r(jb(),t),r(Lb(),t),r(_8(),t),r(Lp(),t),r(Ob(),t),r(Fb(),t),r(Ma(),t),r(Ap(),t),r(Pp(),t),r(_b(),t),r(kp(),t),r(y8(),t),r(v8(),t),r(sc(),t),r(oc(),t),r(kb(),t),r(rn(),t),r(ln(),t),r(x8(),t),r(cc(),t),r(Pb(),t),r(mc(),t),r(Va(),t),r(b8(),t),r(Mb(),t),r($r(),t),r(Dp(),t),r(Nb(),t),r(nn(),t),r(ja(),t),r(Sb(),t),r(E8(),t),r(C8(),t),r(T8(),t),r(At(),t),r(A8(),t),r(w8(),t),r(D8(),t),r(S8(),t),r(R8(),t),r(un(),t),r(N8(),t);}),F8=te(t=>{var e=t&&t.__decorate||function(n,o,a,u){var l=arguments.length,h=l<3?o:u===null?u=Object.getOwnPropertyDescriptor(o,a):u,c;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")h=Reflect.decorate(n,o,a,u);else for(var d=n.length-1;d>=0;d--)(c=n[d])&&(h=(l<3?c(h):l>3?c(o,a,h):c(o,a))||h);return l>3&&h&&Object.defineProperty(o,a,h),h},r=t&&t.__param||function(n,o){return function(a,u){o(a,u,n);}};Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractParseTreeVisitor=void 0;var i=fe(),s=class{visit(n){return n.accept(this)}visitChildren(n){let o=this.defaultResult(),a=n.childCount;for(let u=0;u<a&&this.shouldVisitNextChild(n,o);u++){let h=n.getChild(u).accept(this);o=this.aggregateResult(o,h);}return o}visitTerminal(n){return this.defaultResult()}visitErrorNode(n){return this.defaultResult()}aggregateResult(n,o){return o}shouldVisitNextChild(n,o){return !0}};e([i.Override,r(0,i.NotNull)],s.prototype,"visit",null),e([i.Override,r(0,i.NotNull)],s.prototype,"visitChildren",null),e([i.Override,r(0,i.NotNull)],s.prototype,"visitTerminal",null),e([i.Override,r(0,i.NotNull)],s.prototype,"visitErrorNode",null),e([r(0,i.NotNull)],s.prototype,"shouldVisitNextChild",null),t.AbstractParseTreeVisitor=s;}),gr=te((t,e)=>{function r(g){return Array.isArray(g)?"["+g.join(", ")+"]":"null"}String.prototype.seed=String.prototype.seed||Math.round(Math.random()*Math.pow(2,32)),String.prototype.hashCode=function(){let g=this.toString(),v,x,_=g.length&3,E=g.length-_,b=String.prototype.seed,w=3432918353,D=461845907,N=0;for(;N<E;)x=g.charCodeAt(N)&255|(g.charCodeAt(++N)&255)<<8|(g.charCodeAt(++N)&255)<<16|(g.charCodeAt(++N)&255)<<24,++N,x=(x&65535)*w+(((x>>>16)*w&65535)<<16)&4294967295,x=x<<15|x>>>17,x=(x&65535)*D+(((x>>>16)*D&65535)<<16)&4294967295,b^=x,b=b<<13|b>>>19,v=(b&65535)*5+(((b>>>16)*5&65535)<<16)&4294967295,b=(v&65535)+27492+(((v>>>16)+58964&65535)<<16);switch(x=0,_){case 3:x^=(g.charCodeAt(N+2)&255)<<16;case 2:x^=(g.charCodeAt(N+1)&255)<<8;case 1:x^=g.charCodeAt(N)&255,x=(x&65535)*w+(((x>>>16)*w&65535)<<16)&4294967295,x=x<<15|x>>>17,x=(x&65535)*D+(((x>>>16)*D&65535)<<16)&4294967295,b^=x;}return b^=g.length,b^=b>>>16,b=(b&65535)*2246822507+(((b>>>16)*2246822507&65535)<<16)&4294967295,b^=b>>>13,b=(b&65535)*3266489909+(((b>>>16)*3266489909&65535)<<16)&4294967295,b^=b>>>16,b>>>0};function i(g,v){return g?g.equals(v):g==v}function s(g){return g?g.hashCode():-1}var n=class{constructor(g,v){this.data={},this.hashFunction=g||s,this.equalsFunction=v||i;}add(g){let x="hash_"+this.hashFunction(g);if(x in this.data){let _=this.data[x];for(let E=0;E<_.length;E++)if(this.equalsFunction(g,_[E]))return _[E];return _.push(g),g}else return this.data[x]=[g],g}contains(g){return this.get(g)!=null}get(g){let x="hash_"+this.hashFunction(g);if(x in this.data){let _=this.data[x];for(let E=0;E<_.length;E++)if(this.equalsFunction(g,_[E]))return _[E]}return null}values(){let g=[];for(let v in this.data)v.indexOf("hash_")===0&&(g=g.concat(this.data[v]));return g}toString(){return r(this.values())}get length(){let g=0;for(let v in this.data)v.indexOf("hash_")===0&&(g=g+this.data[v].length);return g}},o=class{constructor(){this.data=[];}add(g){this.data[g]=!0;}or(g){let v=this;Object.keys(g.data).map(function(x){v.add(x);});}remove(g){delete this.data[g];}contains(g){return this.data[g]===!0}values(){return Object.keys(this.data)}minValue(){return Math.min.apply(null,this.values())}hashCode(){let g=new h;return g.update(this.values()),g.finish()}equals(g){return g instanceof o?this.hashCode()===g.hashCode():!1}toString(){return "{"+this.values().join(", ")+"}"}get length(){return this.values().length}},a=class{constructor(g,v){this.data={},this.hashFunction=g||s,this.equalsFunction=v||i;}put(g,v){let x="hash_"+this.hashFunction(g);if(x in this.data){let _=this.data[x];for(let E=0;E<_.length;E++){let b=_[E];if(this.equalsFunction(g,b.key)){let w=b.value;return b.value=v,w}}return _.push({key:g,value:v}),v}else return this.data[x]=[{key:g,value:v}],v}containsKey(g){let v="hash_"+this.hashFunction(g);if(v in this.data){let x=this.data[v];for(let _=0;_<x.length;_++){let E=x[_];if(this.equalsFunction(g,E.key))return !0}}return !1}get(g){let v="hash_"+this.hashFunction(g);if(v in this.data){let x=this.data[v];for(let _=0;_<x.length;_++){let E=x[_];if(this.equalsFunction(g,E.key))return E.value}}return null}entries(){let g=[];for(let v in this.data)v.indexOf("hash_")===0&&(g=g.concat(this.data[v]));return g}getKeys(){return this.entries().map(function(g){return g.key})}getValues(){return this.entries().map(function(g){return g.value})}toString(){return "["+this.entries().map(function(v){return "{"+v.key+":"+v.value+"}"}).join(", ")+"]"}get length(){let g=0;for(let v in this.data)v.indexOf("hash_")===0&&(g=g+this.data[v].length);return g}},u=class{constructor(){this.data={};}get(g){return g="k-"+g,g in this.data?this.data[g]:null}put(g,v){g="k-"+g,this.data[g]=v;}values(){let g=this.data;return Object.keys(this.data).map(function(x){return g[x]})}},l=class{constructor(g){this.defaultMapCtor=g||a,this.cacheMap=new this.defaultMapCtor;}get(g,v){let x=this.cacheMap.get(g)||null;return x===null?null:x.get(v)||null}set(g,v,x){let _=this.cacheMap.get(g)||null;_===null&&(_=new this.defaultMapCtor,this.cacheMap.put(g,_)),_.put(v,x);}},h=class{constructor(){this.count=0,this.hash=0;}update(){for(let g=0;g<arguments.length;g++){let v=arguments[g];if(v!=null)if(Array.isArray(v))this.update.apply(this,v);else {let x=0;switch(typeof v){case"undefined":case"function":continue;case"number":case"boolean":x=v;break;case"string":x=v.hashCode();break;default:v.updateHashCode?v.updateHashCode(this):console.log("No updateHashCode for "+v.toString());continue}x=x*3432918353,x=x<<15|x>>>17,x=x*461845907,this.count=this.count+1;let _=this.hash^x;_=_<<13|_>>>19,_=_*5+3864292196,this.hash=_;}}}finish(){let g=this.hash^this.count*4;return g=g^g>>>16,g=g*2246822507,g=g^g>>>13,g=g*3266489909,g=g^g>>>16,g}};function c(){let g=new h;return g.update.apply(g,arguments),g.finish()}function d(g,v){return g=g.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r"),v&&(g=g.replace(/ /g,"\xB7")),g}function f(g){return g.replace(/\w\S*/g,function(v){return v.charAt(0).toUpperCase()+v.substr(1)})}function m(g,v){if(!Array.isArray(g)||!Array.isArray(v))return !1;if(g===v)return !0;if(g.length!==v.length)return !1;for(let x=0;x<g.length;x++)if(g[x]!==v[x]&&(!g[x].equals||!g[x].equals(v[x])))return !1;return !0}e.exports={Hash:h,Set:n,Map:a,BitSet:o,AltDict:u,DoubleDict:l,hashStuff:c,escapeWhitespace:d,arrayToString:r,titleCase:f,equalArrays:m};}),$t=te((t,e)=>{var r=class{constructor(){this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null;}getTokenSource(){return this.source[0]}getInputStream(){return this.source[1]}get text(){return this._text}set text(s){this._text=s;}};r.INVALID_TYPE=0,r.EPSILON=-2,r.MIN_USER_TOKEN_TYPE=1,r.EOF=-1,r.DEFAULT_CHANNEL=0,r.HIDDEN_CHANNEL=1;var i=class extends r{constructor(s,n,o,a,u){super(),this.source=s!==void 0?s:i.EMPTY_SOURCE,this.type=n!==void 0?n:null,this.channel=o!==void 0?o:r.DEFAULT_CHANNEL,this.start=a!==void 0?a:-1,this.stop=u!==void 0?u:-1,this.tokenIndex=-1,this.source[0]!==null?(this.line=s[0].line,this.column=s[0].column):this.column=-1;}clone(){let s=new i(this.source,this.type,this.channel,this.start,this.stop);return s.tokenIndex=this.tokenIndex,s.line=this.line,s.column=this.column,s.text=this.text,s}toString(){let s=this.text;return s!==null?s=s.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):s="<no text>","[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+s+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"}get text(){if(this._text!==null)return this._text;let s=this.getInputStream();if(s===null)return null;let n=s.size;return this.start<n&&this.stop<n?s.getText(this.start,this.stop):"<EOF>"}set text(s){this._text=s;}};i.EMPTY_SOURCE=[null,null],e.exports={Token:r,CommonToken:i};}),cn=te((t,e)=>{var r=class{constructor(){this.atn=null,this.stateNumber=r.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null;}toString(){return this.stateNumber}equals(x){return x instanceof r?this.stateNumber===x.stateNumber:!1}isNonGreedyExitState(){return !1}addTransition(x,_){_===void 0&&(_=-1),this.transitions.length===0?this.epsilonOnlyTransitions=x.isEpsilon:this.epsilonOnlyTransitions!==x.isEpsilon&&(this.epsilonOnlyTransitions=!1),_===-1?this.transitions.push(x):this.transitions.splice(_,1,x);}};r.INVALID_TYPE=0,r.BASIC=1,r.RULE_START=2,r.BLOCK_START=3,r.PLUS_BLOCK_START=4,r.STAR_BLOCK_START=5,r.TOKEN_START=6,r.RULE_STOP=7,r.BLOCK_END=8,r.STAR_LOOP_BACK=9,r.STAR_LOOP_ENTRY=10,r.PLUS_LOOP_BACK=11,r.LOOP_END=12,r.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],r.INVALID_STATE_NUMBER=-1;var i=class extends r{constructor(){super(),this.stateType=r.BASIC;}},s=class extends r{constructor(){return super(),this.decision=-1,this.nonGreedy=!1,this}},n=class extends s{constructor(){return super(),this.endState=null,this}},o=class extends n{constructor(){return super(),this.stateType=r.BLOCK_START,this}},a=class extends r{constructor(){return super(),this.stateType=r.BLOCK_END,this.startState=null,this}},u=class extends r{constructor(){return super(),this.stateType=r.RULE_STOP,this}},l=class extends r{constructor(){return super(),this.stateType=r.RULE_START,this.stopState=null,this.isPrecedenceRule=!1,this}},h=class extends s{constructor(){return super(),this.stateType=r.PLUS_LOOP_BACK,this}},c=class extends n{constructor(){return super(),this.stateType=r.PLUS_BLOCK_START,this.loopBackState=null,this}},d=class extends n{constructor(){return super(),this.stateType=r.STAR_BLOCK_START,this}},f=class extends r{constructor(){return super(),this.stateType=r.STAR_LOOP_BACK,this}},m=class extends s{constructor(){return super(),this.stateType=r.STAR_LOOP_ENTRY,this.loopBackState=null,this.isPrecedenceDecision=null,this}},g=class extends r{constructor(){return super(),this.stateType=r.LOOP_END,this.loopBackState=null,this}},v=class extends s{constructor(){return super(),this.stateType=r.TOKEN_START,this}};e.exports={ATNState:r,BasicState:i,DecisionState:s,BlockStartState:n,BlockEndState:a,LoopEndState:g,RuleStartState:l,RuleStopState:u,TokensStartState:v,PlusLoopbackState:h,StarLoopbackState:f,StarLoopEntryState:m,PlusBlockStartState:c,StarBlockStartState:d,BasicBlockStartState:o};}),$a=te((t,e)=>{var{Set:r,Hash:i,equalArrays:s}=gr(),n=class{hashCode(){let h=new i;return this.updateHashCode(h),h.finish()}evaluate(h,c){}evalPrecedence(h,c){return this}static andContext(h,c){if(h===null||h===n.NONE)return c;if(c===null||c===n.NONE)return h;let d=new u(h,c);return d.opnds.length===1?d.opnds[0]:d}static orContext(h,c){if(h===null)return c;if(c===null)return h;if(h===n.NONE||c===n.NONE)return n.NONE;let d=new l(h,c);return d.opnds.length===1?d.opnds[0]:d}},o=class extends n{constructor(h,c,d){super(),this.ruleIndex=h===void 0?-1:h,this.predIndex=c===void 0?-1:c,this.isCtxDependent=d===void 0?!1:d;}evaluate(h,c){let d=this.isCtxDependent?c:null;return h.sempred(d,this.ruleIndex,this.predIndex)}updateHashCode(h){h.update(this.ruleIndex,this.predIndex,this.isCtxDependent);}equals(h){return this===h?!0:h instanceof o?this.ruleIndex===h.ruleIndex&&this.predIndex===h.predIndex&&this.isCtxDependent===h.isCtxDependent:!1}toString(){return "{"+this.ruleIndex+":"+this.predIndex+"}?"}};n.NONE=new o;var a=class extends n{constructor(h){super(),this.precedence=h===void 0?0:h;}evaluate(h,c){return h.precpred(c,this.precedence)}evalPrecedence(h,c){return h.precpred(c,this.precedence)?n.NONE:null}compareTo(h){return this.precedence-h.precedence}updateHashCode(h){h.update(this.precedence);}equals(h){return this===h?!0:h instanceof a?this.precedence===h.precedence:!1}toString(){return "{"+this.precedence+">=prec}?"}static filterPrecedencePredicates(h){let c=[];return h.values().map(function(d){d instanceof a&&c.push(d);}),c}},u=class extends n{constructor(h,c){super();let d=new r;h instanceof u?h.opnds.map(function(m){d.add(m);}):d.add(h),c instanceof u?c.opnds.map(function(m){d.add(m);}):d.add(c);let f=a.filterPrecedencePredicates(d);if(f.length>0){let m=null;f.map(function(g){(m===null||g.precedence<m.precedence)&&(m=g);}),d.add(m);}this.opnds=Array.from(d.values());}equals(h){return this===h?!0:h instanceof u?s(this.opnds,h.opnds):!1}updateHashCode(h){h.update(this.opnds,"AND");}evaluate(h,c){for(let d=0;d<this.opnds.length;d++)if(!this.opnds[d].evaluate(h,c))return !1;return !0}evalPrecedence(h,c){let d=!1,f=[];for(let g=0;g<this.opnds.length;g++){let v=this.opnds[g],x=v.evalPrecedence(h,c);if(d|=x!==v,x===null)return null;x!==n.NONE&&f.push(x);}if(!d)return this;if(f.length===0)return n.NONE;let m=null;return f.map(function(g){m=m===null?g:n.andContext(m,g);}),m}toString(){let h=this.opnds.map(c=>c.toString());return (h.length>3?h.slice(3):h).join("&&")}},l=class extends n{constructor(h,c){super();let d=new r;h instanceof l?h.opnds.map(function(m){d.add(m);}):d.add(h),c instanceof l?c.opnds.map(function(m){d.add(m);}):d.add(c);let f=a.filterPrecedencePredicates(d);if(f.length>0){let m=f.sort(function(v,x){return v.compareTo(x)}),g=m[m.length-1];d.add(g);}this.opnds=Array.from(d.values());}equals(h){return this===h?!0:h instanceof l?s(this.opnds,h.opnds):!1}updateHashCode(h){h.update(this.opnds,"OR");}evaluate(h,c){for(let d=0;d<this.opnds.length;d++)if(this.opnds[d].evaluate(h,c))return !0;return !1}evalPrecedence(h,c){let d=!1,f=[];for(let g=0;g<this.opnds.length;g++){let v=this.opnds[g],x=v.evalPrecedence(h,c);if(d|=x!==v,x===n.NONE)return n.NONE;x!==null&&f.push(x);}if(!d)return this;if(f.length===0)return null;let m=null;return m}toString(){let h=this.opnds.map(c=>c.toString());return (h.length>3?h.slice(3):h).join("||")}};e.exports={SemanticContext:n,PrecedencePredicate:a,Predicate:o};}),gc=te((t,e)=>{var{DecisionState:r}=cn(),{SemanticContext:i}=$a(),{Hash:s}=gr();function n(u,l){if(u===null){let h={state:null,alt:null,context:null,semanticContext:null};return l&&(h.reachesIntoOuterContext=0),h}else {let h={};return h.state=u.state||null,h.alt=u.alt===void 0?null:u.alt,h.context=u.context||null,h.semanticContext=u.semanticContext||null,l&&(h.reachesIntoOuterContext=u.reachesIntoOuterContext||0,h.precedenceFilterSuppressed=u.precedenceFilterSuppressed||!1),h}}var o=class{constructor(u,l){this.checkContext(u,l),u=n(u),l=n(l,!0),this.state=u.state!==null?u.state:l.state,this.alt=u.alt!==null?u.alt:l.alt,this.context=u.context!==null?u.context:l.context,this.semanticContext=u.semanticContext!==null?u.semanticContext:l.semanticContext!==null?l.semanticContext:i.NONE,this.reachesIntoOuterContext=l.reachesIntoOuterContext,this.precedenceFilterSuppressed=l.precedenceFilterSuppressed;}checkContext(u,l){(u.context===null||u.context===void 0)&&(l===null||l.context===null||l.context===void 0)&&(this.context=null);}hashCode(){let u=new s;return this.updateHashCode(u),u.finish()}updateHashCode(u){u.update(this.state.stateNumber,this.alt,this.context,this.semanticContext);}equals(u){return this===u?!0:u instanceof o?this.state.stateNumber===u.state.stateNumber&&this.alt===u.alt&&(this.context===null?u.context===null:this.context.equals(u.context))&&this.semanticContext.equals(u.semanticContext)&&this.precedenceFilterSuppressed===u.precedenceFilterSuppressed:!1}hashCodeForConfigSet(){let u=new s;return u.update(this.state.stateNumber,this.alt,this.semanticContext),u.finish()}equalsForConfigSet(u){return this===u?!0:u instanceof o?this.state.stateNumber===u.state.stateNumber&&this.alt===u.alt&&this.semanticContext.equals(u.semanticContext):!1}toString(){return "("+this.state+","+this.alt+(this.context!==null?",["+this.context.toString()+"]":"")+(this.semanticContext!==i.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}},a=class extends o{constructor(u,l){super(u,l);let h=u.lexerActionExecutor||null;return this.lexerActionExecutor=h||(l!==null?l.lexerActionExecutor:null),this.passedThroughNonGreedyDecision=l!==null?this.checkNonGreedyDecision(l,this.state):!1,this.hashCodeForConfigSet=a.prototype.hashCode,this.equalsForConfigSet=a.prototype.equals,this}updateHashCode(u){u.update(this.state.stateNumber,this.alt,this.context,this.semanticContext,this.passedThroughNonGreedyDecision,this.lexerActionExecutor);}equals(u){return this===u||u instanceof a&&this.passedThroughNonGreedyDecision===u.passedThroughNonGreedyDecision&&(this.lexerActionExecutor?this.lexerActionExecutor.equals(u.lexerActionExecutor):!u.lexerActionExecutor)&&super.equals(u)}checkNonGreedyDecision(u,l){return u.passedThroughNonGreedyDecision||l instanceof r&&l.nonGreedy}};e.exports.ATNConfig=o,e.exports.LexerATNConfig=a;}),Ar=te((t,e)=>{var{Token:r}=$t(),i=class{constructor(n,o){this.start=n,this.stop=o;}contains(n){return n>=this.start&&n<this.stop}toString(){return this.start===this.stop-1?this.start.toString():this.start.toString()+".."+(this.stop-1).toString()}get length(){return this.stop-this.start}},s=class{constructor(){this.intervals=null,this.readOnly=!1;}first(n){return this.intervals===null||this.intervals.length===0?r.INVALID_TYPE:this.intervals[0].start}addOne(n){this.addInterval(new i(n,n+1));}addRange(n,o){this.addInterval(new i(n,o+1));}addInterval(n){if(this.intervals===null)this.intervals=[],this.intervals.push(n);else {for(let o=0;o<this.intervals.length;o++){let a=this.intervals[o];if(n.stop<a.start){this.intervals.splice(o,0,n);return}else if(n.stop===a.start){this.intervals[o].start=n.start;return}else if(n.start<=a.stop){this.intervals[o]=new i(Math.min(a.start,n.start),Math.max(a.stop,n.stop)),this.reduce(o);return}}this.intervals.push(n);}}addSet(n){return n.intervals!==null&&n.intervals.forEach(o=>this.addInterval(o),this),this}reduce(n){if(n<this.intervals.length-1){let o=this.intervals[n],a=this.intervals[n+1];o.stop>=a.stop?(this.intervals.splice(n+1,1),this.reduce(n)):o.stop>=a.start&&(this.intervals[n]=new i(o.start,a.stop),this.intervals.splice(n+1,1));}}complement(n,o){let a=new s;return a.addInterval(new i(n,o+1)),this.intervals!==null&&this.intervals.forEach(u=>a.removeRange(u)),a}contains(n){if(this.intervals===null)return !1;for(let o=0;o<this.intervals.length;o++)if(this.intervals[o].contains(n))return !0;return !1}removeRange(n){if(n.start===n.stop-1)this.removeOne(n.start);else if(this.intervals!==null){let o=0;for(let a=0;a<this.intervals.length;a++){let u=this.intervals[o];if(n.stop<=u.start)return;if(n.start>u.start&&n.stop<u.stop){this.intervals[o]=new i(u.start,n.start);let l=new i(n.stop,u.stop);this.intervals.splice(o,0,l);return}else n.start<=u.start&&n.stop>=u.stop?(this.intervals.splice(o,1),o=o-1):n.start<u.stop?this.intervals[o]=new i(u.start,n.start):n.stop<u.stop&&(this.intervals[o]=new i(n.stop,u.stop));o+=1;}}}removeOne(n){if(this.intervals!==null)for(let o=0;o<this.intervals.length;o++){let a=this.intervals[o];if(n<a.start)return;if(n===a.start&&n===a.stop-1){this.intervals.splice(o,1);return}else if(n===a.start){this.intervals[o]=new i(a.start+1,a.stop);return}else if(n===a.stop-1){this.intervals[o]=new i(a.start,a.stop-1);return}else if(n<a.stop-1){let u=new i(a.start,n);a.start=n+1,this.intervals.splice(o,0,u);return}}}toString(n,o,a){return n=n||null,o=o||null,a=a||!1,this.intervals===null?"{}":n!==null||o!==null?this.toTokenString(n,o):a?this.toCharString():this.toIndexString()}toCharString(){let n=[];for(let o=0;o<this.intervals.length;o++){let a=this.intervals[o];a.stop===a.start+1?a.start===r.EOF?n.push("<EOF>"):n.push("'"+String.fromCharCode(a.start)+"'"):n.push("'"+String.fromCharCode(a.start)+"'..'"+String.fromCharCode(a.stop-1)+"'");}return n.length>1?"{"+n.join(", ")+"}":n[0]}toIndexString(){let n=[];for(let o=0;o<this.intervals.length;o++){let a=this.intervals[o];a.stop===a.start+1?a.start===r.EOF?n.push("<EOF>"):n.push(a.start.toString()):n.push(a.start.toString()+".."+(a.stop-1).toString());}return n.length>1?"{"+n.join(", ")+"}":n[0]}toTokenString(n,o){let a=[];for(let u=0;u<this.intervals.length;u++){let l=this.intervals[u];for(let h=l.start;h<l.stop;h++)a.push(this.elementName(n,o,h));}return a.length>1?"{"+a.join(", ")+"}":a[0]}elementName(n,o,a){return a===r.EOF?"<EOF>":a===r.EPSILON?"<EPSILON>":n[a]||o[a]}get length(){return this.intervals.map(n=>n.length).reduce((n,o)=>n+o)}};e.exports={Interval:i,IntervalSet:s};}),za=te((t,e)=>{var{Token:r}=$t(),{IntervalSet:i}=Ar(),{Predicate:s,PrecedencePredicate:n}=$a(),o=class{constructor(_){if(_==null)throw "target cannot be null.";this.target=_,this.isEpsilon=!1,this.label=null;}};o.EPSILON=1,o.RANGE=2,o.RULE=3,o.PREDICATE=4,o.ATOM=5,o.ACTION=6,o.SET=7,o.NOT_SET=8,o.WILDCARD=9,o.PRECEDENCE=10,o.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],o.serializationTypes={EpsilonTransition:o.EPSILON,RangeTransition:o.RANGE,RuleTransition:o.RULE,PredicateTransition:o.PREDICATE,AtomTransition:o.ATOM,ActionTransition:o.ACTION,SetTransition:o.SET,NotSetTransition:o.NOT_SET,WildcardTransition:o.WILDCARD,PrecedencePredicateTransition:o.PRECEDENCE};var a=class extends o{constructor(_,E){super(_),this.label_=E,this.label=this.makeLabel(),this.serializationType=o.ATOM;}makeLabel(){let _=new i;return _.addOne(this.label_),_}matches(_,E,b){return this.label_===_}toString(){return this.label_}},u=class extends o{constructor(_,E,b,w){super(_),this.ruleIndex=E,this.precedence=b,this.followState=w,this.serializationType=o.RULE,this.isEpsilon=!0;}matches(_,E,b){return !1}},l=class extends o{constructor(_,E){super(_),this.serializationType=o.EPSILON,this.isEpsilon=!0,this.outermostPrecedenceReturn=E;}matches(_,E,b){return !1}toString(){return "epsilon"}},h=class extends o{constructor(_,E,b){super(_),this.serializationType=o.RANGE,this.start=E,this.stop=b,this.label=this.makeLabel();}makeLabel(){let _=new i;return _.addRange(this.start,this.stop),_}matches(_,E,b){return _>=this.start&&_<=this.stop}toString(){return "'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"}},c=class extends o{constructor(_){super(_);}},d=class extends c{constructor(_,E,b,w){super(_),this.serializationType=o.PREDICATE,this.ruleIndex=E,this.predIndex=b,this.isCtxDependent=w,this.isEpsilon=!0;}matches(_,E,b){return !1}getPredicate(){return new s(this.ruleIndex,this.predIndex,this.isCtxDependent)}toString(){return "pred_"+this.ruleIndex+":"+this.predIndex}},f=class extends o{constructor(_,E,b,w){super(_),this.serializationType=o.ACTION,this.ruleIndex=E,this.actionIndex=b===void 0?-1:b,this.isCtxDependent=w===void 0?!1:w,this.isEpsilon=!0;}matches(_,E,b){return !1}toString(){return "action_"+this.ruleIndex+":"+this.actionIndex}},m=class extends o{constructor(_,E){super(_),this.serializationType=o.SET,E!=null?this.label=E:(this.label=new i,this.label.addOne(r.INVALID_TYPE));}matches(_,E,b){return this.label.contains(_)}toString(){return this.label.toString()}},g=class extends m{constructor(_,E){super(_,E),this.serializationType=o.NOT_SET;}matches(_,E,b){return _>=E&&_<=b&&!super.matches(_,E,b)}toString(){return "~"+super.toString()}},v=class extends o{constructor(_){super(_),this.serializationType=o.WILDCARD;}matches(_,E,b){return _>=E&&_<=b}toString(){return "."}},x=class extends c{constructor(_,E){super(_),this.serializationType=o.PRECEDENCE,this.precedence=E,this.isEpsilon=!0;}matches(_,E,b){return !1}getPredicate(){return new n(this.precedence)}toString(){return this.precedence+" >= _p"}};e.exports={Transition:o,AtomTransition:a,SetTransition:m,NotSetTransition:g,RuleTransition:u,ActionTransition:f,EpsilonTransition:l,RangeTransition:h,WildcardTransition:v,PredicateTransition:d,PrecedencePredicateTransition:x,AbstractPredicateTransition:c};}),so=te((t,e)=>{var{Token:r}=$t(),{Interval:i}=Ar(),s=new i(-1,-2),n=class{},o=class extends n{constructor(){super();}},a=class extends o{constructor(){super();}},u=class extends a{constructor(){super();}getRuleContext(){throw new Error("missing interface implementation")}},l=class extends a{constructor(){super();}},h=class extends l{constructor(){super();}},c=class{visit(v){return Array.isArray(v)?v.map(function(x){return x.accept(this)},this):v.accept(this)}visitChildren(v){return v.children?this.visit(v.children):null}visitTerminal(v){}visitErrorNode(v){}},d=class{visitTerminal(v){}visitErrorNode(v){}enterEveryRule(v){}exitEveryRule(v){}},f=class extends l{constructor(v){super(),this.parentCtx=null,this.symbol=v;}getChild(v){return null}getSymbol(){return this.symbol}getParent(){return this.parentCtx}getPayload(){return this.symbol}getSourceInterval(){if(this.symbol===null)return s;let v=this.symbol.tokenIndex;return new i(v,v)}getChildCount(){return 0}accept(v){return v.visitTerminal(this)}getText(){return this.symbol.text}toString(){return this.symbol.type===r.EOF?"<EOF>":this.symbol.text}},m=class extends f{constructor(v){super(v);}isErrorNode(){return !0}accept(v){return v.visitErrorNode(this)}},g=class{walk(v,x){if(x instanceof h||x.isErrorNode!==void 0&&x.isErrorNode())v.visitErrorNode(x);else if(x instanceof l)v.visitTerminal(x);else {this.enterRule(v,x);for(let E=0;E<x.getChildCount();E++){let b=x.getChild(E);this.walk(v,b);}this.exitRule(v,x);}}enterRule(v,x){let _=x.getRuleContext();v.enterEveryRule(_),_.enterRule(v);}exitRule(v,x){let _=x.getRuleContext();_.exitRule(v),v.exitEveryRule(_);}};g.DEFAULT=new g,e.exports={RuleNode:u,ErrorNode:h,TerminalNode:l,ErrorNodeImpl:m,TerminalNodeImpl:f,ParseTreeListener:d,ParseTreeVisitor:c,ParseTreeWalker:g,INVALID_INTERVAL:s};}),qb=te((t,e)=>{var r=gr(),{Token:i}=$t(),{ErrorNode:s,TerminalNode:n,RuleNode:o}=so(),a={toStringTree:function(u,l,h){l=l||null,h=h||null,h!==null&&(l=h.ruleNames);let c=a.getNodeText(u,l);c=r.escapeWhitespace(c,!1);let d=u.getChildCount();if(d===0)return c;let f="("+c+" ";d>0&&(c=a.toStringTree(u.getChild(0),l),f=f.concat(c));for(let m=1;m<d;m++)c=a.toStringTree(u.getChild(m),l),f=f.concat(" "+c);return f=f.concat(")"),f},getNodeText:function(u,l,h){if(l=l||null,h=h||null,h!==null&&(l=h.ruleNames),l!==null)if(u instanceof o){let f=u.getRuleContext().getAltNumber();return f!=0?l[u.ruleIndex]+":"+f:l[u.ruleIndex]}else {if(u instanceof s)return u.toString();if(u instanceof n&&u.symbol!==null)return u.symbol.text}let c=u.getPayload();return c instanceof i?c.text:u.getPayload().toString()},getChildren:function(u){let l=[];for(let h=0;h<u.getChildCount();h++)l.push(u.getChild(h));return l},getAncestors:function(u){let l=[];for(u=u.getParent();u!==null;)l=[u].concat(l),u=u.getParent();return l},findAllTokenNodes:function(u,l){return a.findAllNodes(u,l,!0)},findAllRuleNodes:function(u,l){return a.findAllNodes(u,l,!1)},findAllNodes:function(u,l,h){let c=[];return a._findAllNodes(u,l,h,c),c},_findAllNodes:function(u,l,h,c){h&&u instanceof n?u.symbol.type===l&&c.push(u):!h&&u instanceof o&&u.ruleIndex===l&&c.push(u);for(let d=0;d<u.getChildCount();d++)a._findAllNodes(u.getChild(d),l,h,c);},descendants:function(u){let l=[u];for(let h=0;h<u.getChildCount();h++)l=l.concat(a.descendants(u.getChild(h)));return l}};e.exports=a;}),Mp=te((t,e)=>{var{RuleNode:r}=so(),{INVALID_INTERVAL:i}=so(),s=qb(),n=class extends r{constructor(o,a){super(),this.parentCtx=o||null,this.invokingState=a||-1;}depth(){let o=0,a=this;for(;a!==null;)a=a.parentCtx,o+=1;return o}isEmpty(){return this.invokingState===-1}getSourceInterval(){return i}getRuleContext(){return this}getPayload(){return this}getText(){return this.getChildCount()===0?"":this.children.map(function(o){return o.getText()}).join("")}getAltNumber(){return 0}setAltNumber(o){}getChild(o){return null}getChildCount(){return 0}accept(o){return o.visitChildren(this)}toStringTree(o,a){return s.toStringTree(this,o,a)}toString(o,a){o=o||null,a=a||null;let u=this,l="[";for(;u!==null&&u!==a;){if(o===null)u.isEmpty()||(l+=u.invokingState);else {let h=u.ruleIndex,c=h>=0&&h<o.length?o[h]:""+h;l+=c;}u.parentCtx!==null&&(o!==null||!u.parentCtx.isEmpty())&&(l+=" "),u=u.parentCtx;}return l+="]",l}};e.exports=n;}),Xi=te((t,e)=>{var r=Mp(),{Hash:i,Map:s,equalArrays:n}=gr(),o=class{constructor(_){this.cachedHashCode=_;}isEmpty(){return this===o.EMPTY}hasEmptyPath(){return this.getReturnState(this.length-1)===o.EMPTY_RETURN_STATE}hashCode(){return this.cachedHashCode}updateHashCode(_){_.update(this.cachedHashCode);}};o.EMPTY=null,o.EMPTY_RETURN_STATE=2147483647,o.globalNodeCount=1,o.id=o.globalNodeCount;var a=class{constructor(){this.cache=new s;}add(_){if(_===o.EMPTY)return o.EMPTY;let E=this.cache.get(_)||null;return E!==null?E:(this.cache.put(_,_),_)}get(_){return this.cache.get(_)||null}get length(){return this.cache.length}},u=class extends o{constructor(_,E){let b=0,w=new i;_!==null?w.update(_,E):w.update(1),b=w.finish(),super(b),this.parentCtx=_,this.returnState=E;}getParent(_){return this.parentCtx}getReturnState(_){return this.returnState}equals(_){return this===_?!0:_ instanceof u?this.hashCode()!==_.hashCode()||this.returnState!==_.returnState?!1:this.parentCtx==null?_.parentCtx==null:this.parentCtx.equals(_.parentCtx):!1}toString(){let _=this.parentCtx===null?"":this.parentCtx.toString();return _.length===0?this.returnState===o.EMPTY_RETURN_STATE?"$":""+this.returnState:""+this.returnState+" "+_}get length(){return 1}static create(_,E){return E===o.EMPTY_RETURN_STATE&&_===null?o.EMPTY:new u(_,E)}},l=class extends u{constructor(){super(null,o.EMPTY_RETURN_STATE);}isEmpty(){return !0}getParent(_){return null}getReturnState(_){return this.returnState}equals(_){return this===_}toString(){return "$"}};o.EMPTY=new l;var h=class extends o{constructor(_,E){let b=new i;b.update(_,E);let w=b.finish();return super(w),this.parents=_,this.returnStates=E,this}isEmpty(){return this.returnStates[0]===o.EMPTY_RETURN_STATE}getParent(_){return this.parents[_]}getReturnState(_){return this.returnStates[_]}equals(_){return this===_?!0:_ instanceof h?this.hashCode()!==_.hashCode()?!1:n(this.returnStates,_.returnStates)&&n(this.parents,_.parents):!1}toString(){if(this.isEmpty())return "[]";{let _="[";for(let E=0;E<this.returnStates.length;E++){if(E>0&&(_=_+", "),this.returnStates[E]===o.EMPTY_RETURN_STATE){_=_+"$";continue}_=_+this.returnStates[E],this.parents[E]!==null?_=_+" "+this.parents[E]:_=_+"null";}return _+"]"}}get length(){return this.returnStates.length}};function c(_,E){if(E==null&&(E=r.EMPTY),E.parentCtx===null||E===r.EMPTY)return o.EMPTY;let b=c(_,E.parentCtx),D=_.states[E.invokingState].transitions[0];return u.create(b,D.followState.stateNumber)}function d(_,E,b,w){if(_===E)return _;if(_ instanceof u&&E instanceof u)return f(_,E,b,w);if(b){if(_ instanceof l)return _;if(E instanceof l)return E}return _ instanceof u&&(_=new h([_.getParent()],[_.returnState])),E instanceof u&&(E=new h([E.getParent()],[E.returnState])),g(_,E,b,w)}function f(_,E,b,w){if(w!==null){let N=w.get(_,E);if(N!==null||(N=w.get(E,_),N!==null))return N}let D=m(_,E,b);if(D!==null)return w!==null&&w.set(_,E,D),D;if(_.returnState===E.returnState){let N=d(_.parentCtx,E.parentCtx,b,w);if(N===_.parentCtx)return _;if(N===E.parentCtx)return E;let F=u.create(N,_.returnState);return w!==null&&w.set(_,E,F),F}else {let N=null;if((_===E||_.parentCtx!==null&&_.parentCtx===E.parentCtx)&&(N=_.parentCtx),N!==null){let re=[_.returnState,E.returnState];_.returnState>E.returnState&&(re[0]=E.returnState,re[1]=_.returnState);let ae=[N,N],k=new h(ae,re);return w!==null&&w.set(_,E,k),k}let F=[_.returnState,E.returnState],U=[_.parentCtx,E.parentCtx];_.returnState>E.returnState&&(F[0]=E.returnState,F[1]=_.returnState,U=[E.parentCtx,_.parentCtx]);let Z=new h(U,F);return w!==null&&w.set(_,E,Z),Z}}function m(_,E,b){if(b){if(_===o.EMPTY||E===o.EMPTY)return o.EMPTY}else {if(_===o.EMPTY&&E===o.EMPTY)return o.EMPTY;if(_===o.EMPTY){let w=[E.returnState,o.EMPTY_RETURN_STATE],D=[E.parentCtx,null];return new h(D,w)}else if(E===o.EMPTY){let w=[_.returnState,o.EMPTY_RETURN_STATE],D=[_.parentCtx,null];return new h(D,w)}}return null}function g(_,E,b,w){if(w!==null){let ae=w.get(_,E);if(ae!==null||(ae=w.get(E,_),ae!==null))return ae}let D=0,N=0,F=0,U=[],Z=[];for(;D<_.returnStates.length&&N<E.returnStates.length;){let ae=_.parents[D],k=E.parents[N];if(_.returnStates[D]===E.returnStates[N]){let y=_.returnStates[D];y===o.EMPTY_RETURN_STATE&&ae===null&&k===null||ae!==null&&k!==null&&ae===k?(Z[F]=ae,U[F]=y):(Z[F]=d(ae,k,b,w),U[F]=y),D+=1,N+=1;}else _.returnStates[D]<E.returnStates[N]?(Z[F]=ae,U[F]=_.returnStates[D],D+=1):(Z[F]=k,U[F]=E.returnStates[N],N+=1);F+=1;}if(D<_.returnStates.length)for(let ae=D;ae<_.returnStates.length;ae++)Z[F]=_.parents[ae],U[F]=_.returnStates[ae],F+=1;else for(let ae=N;ae<E.returnStates.length;ae++)Z[F]=E.parents[ae],U[F]=E.returnStates[ae],F+=1;if(F<Z.length){if(F===1){let ae=u.create(Z[0],U[0]);return w!==null&&w.set(_,E,ae),ae}Z=Z.slice(0,F),U=U.slice(0,F);}let re=new h(Z,U);return re===_?(w!==null&&w.set(_,E,_),_):re===E?(w!==null&&w.set(_,E,E),E):(v(Z),w!==null&&w.set(_,E,re),re)}function v(_){let E=new s;for(let b=0;b<_.length;b++){let w=_[b];E.containsKey(w)||E.put(w,w);}for(let b=0;b<_.length;b++)_[b]=E.get(_[b]);}function x(_,E,b){if(_.isEmpty())return _;let w=b.get(_)||null;if(w!==null)return w;if(w=E.get(_),w!==null)return b.put(_,w),w;let D=!1,N=[];for(let U=0;U<N.length;U++){let Z=x(_.getParent(U),E,b);if(D||Z!==_.getParent(U)){if(!D){N=[];for(let re=0;re<_.length;re++)N[re]=_.getParent(re);D=!0;}N[U]=Z;}}if(!D)return E.add(_),b.put(_,_),_;let F=null;return N.length===0?F=o.EMPTY:N.length===1?F=u.create(N[0],_.getReturnState(0)):F=new h(N,_.returnStates),E.add(F),b.put(F,F),b.put(_,F),F}e.exports={merge:d,PredictionContext:o,PredictionContextCache:a,SingletonPredictionContext:u,predictionContextFromRuleContext:c,getCachedPredictionContext:x};}),Hb=te((t,e)=>{var{Set:r,BitSet:i}=gr(),{Token:s}=$t(),{ATNConfig:n}=gc(),{IntervalSet:o}=Ar(),{RuleStopState:a}=cn(),{RuleTransition:u,NotSetTransition:l,WildcardTransition:h,AbstractPredicateTransition:c}=za(),{predictionContextFromRuleContext:d,PredictionContext:f,SingletonPredictionContext:m}=Xi(),g=class{constructor(v){this.atn=v;}getDecisionLookahead(v){if(v===null)return null;let x=v.transitions.length,_=[];for(let E=0;E<x;E++){_[E]=new o;let b=new r;this._LOOK(v.transition(E).target,null,f.EMPTY,_[E],b,new i,!1,!1),(_[E].length===0||_[E].contains(g.HIT_PRED))&&(_[E]=null);}return _}LOOK(v,x,_){let E=new o,b=!0;_=_||null;let w=_!==null?d(v.atn,_):null;return this._LOOK(v,x,w,E,new r,new i,b,!0),E}_LOOK(v,x,_,E,b,w,D,N){let F=new n({state:v,alt:0,context:_},null);if(!b.contains(F)){if(b.add(F),v===x){if(_===null){E.addOne(s.EPSILON);return}else if(_.isEmpty()&&N){E.addOne(s.EOF);return}}if(v instanceof a){if(_===null){E.addOne(s.EPSILON);return}else if(_.isEmpty()&&N){E.addOne(s.EOF);return}if(_!==f.EMPTY){let U=w.contains(v.ruleIndex);try{w.remove(v.ruleIndex);for(let Z=0;Z<_.length;Z++){let re=this.atn.states[_.getReturnState(Z)];this._LOOK(re,x,_.getParent(Z),E,b,w,D,N);}}finally{U&&w.add(v.ruleIndex);}return}}for(let U=0;U<v.transitions.length;U++){let Z=v.transitions[U];if(Z.constructor===u){if(w.contains(Z.target.ruleIndex))continue;let re=m.create(_,Z.followState.stateNumber);try{w.add(Z.target.ruleIndex),this._LOOK(Z.target,x,re,E,b,w,D,N);}finally{w.remove(Z.target.ruleIndex);}}else if(Z instanceof c)D?this._LOOK(Z.target,x,_,E,b,w,D,N):E.addOne(g.HIT_PRED);else if(Z.isEpsilon)this._LOOK(Z.target,x,_,E,b,w,D,N);else if(Z.constructor===h)E.addRange(s.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType);else {let re=Z.label;re!==null&&(Z instanceof l&&(re=re.complement(s.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType)),E.addSet(re));}}}}};g.HIT_PRED=s.INVALID_TYPE,e.exports=g;}),ho=te((t,e)=>{var r=Hb(),{IntervalSet:i}=Ar(),{Token:s}=$t(),n=class{constructor(o,a){this.grammarType=o,this.maxTokenType=a,this.states=[],this.decisionToState=[],this.ruleToStartState=[],this.ruleToStopState=null,this.modeNameToStartState={},this.ruleToTokenType=null,this.lexerActions=null,this.modeToStartState=[];}nextTokensInContext(o,a){return new r(this).LOOK(o,null,a)}nextTokensNoContext(o){return o.nextTokenWithinRule!==null||(o.nextTokenWithinRule=this.nextTokensInContext(o,null),o.nextTokenWithinRule.readOnly=!0),o.nextTokenWithinRule}nextTokens(o,a){return a===void 0?this.nextTokensNoContext(o):this.nextTokensInContext(o,a)}addState(o){o!==null&&(o.atn=this,o.stateNumber=this.states.length),this.states.push(o);}removeState(o){this.states[o.stateNumber]=null;}defineDecisionState(o){return this.decisionToState.push(o),o.decision=this.decisionToState.length-1,o.decision}getDecisionState(o){return this.decisionToState.length===0?null:this.decisionToState[o]}getExpectedTokens(o,a){if(o<0||o>=this.states.length)throw "Invalid state number.";let u=this.states[o],l=this.nextTokens(u);if(!l.contains(s.EPSILON))return l;let h=new i;for(h.addSet(l),h.removeOne(s.EPSILON);a!==null&&a.invokingState>=0&&l.contains(s.EPSILON);){let d=this.states[a.invokingState].transitions[0];l=this.nextTokens(d.followState),h.addSet(l),h.removeOne(s.EPSILON),a=a.parentCtx;}return l.contains(s.EPSILON)&&h.addOne(s.EOF),h}};n.INVALID_ALT_NUMBER=0,e.exports=n;}),L8=te((t,e)=>{e.exports={LEXER:0,PARSER:1};}),Ub=te((t,e)=>{var r=class{constructor(i){i===void 0&&(i=null),this.readOnly=!1,this.verifyATN=i===null?!0:i.verifyATN,this.generateRuleBypassTransitions=i===null?!1:i.generateRuleBypassTransitions;}};r.defaultOptions=new r,r.defaultOptions.readOnly=!0,e.exports=r;}),Vb=te((t,e)=>{var r={CHANNEL:0,CUSTOM:1,MODE:2,MORE:3,POP_MODE:4,PUSH_MODE:5,SKIP:6,TYPE:7},i=class{constructor(f){this.actionType=f,this.isPositionDependent=!1;}hashCode(){let f=new Hash;return this.updateHashCode(f),f.finish()}updateHashCode(f){f.update(this.actionType);}equals(f){return this===f}},s=class extends i{constructor(){super(r.SKIP);}execute(f){f.skip();}toString(){return "skip"}};s.INSTANCE=new s;var n=class extends i{constructor(f){super(r.TYPE),this.type=f;}execute(f){f.type=this.type;}updateHashCode(f){f.update(this.actionType,this.type);}equals(f){return this===f?!0:f instanceof n?this.type===f.type:!1}toString(){return "type("+this.type+")"}},o=class extends i{constructor(f){super(r.PUSH_MODE),this.mode=f;}execute(f){f.pushMode(this.mode);}updateHashCode(f){f.update(this.actionType,this.mode);}equals(f){return this===f?!0:f instanceof o?this.mode===f.mode:!1}toString(){return "pushMode("+this.mode+")"}},a=class extends i{constructor(){super(r.POP_MODE);}execute(f){f.popMode();}toString(){return "popMode"}};a.INSTANCE=new a;var u=class extends i{constructor(){super(r.MORE);}execute(f){f.more();}toString(){return "more"}};u.INSTANCE=new u;var l=class extends i{constructor(f){super(r.MODE),this.mode=f;}execute(f){f.mode(this.mode);}updateHashCode(f){f.update(this.actionType,this.mode);}equals(f){return this===f?!0:f instanceof l?this.mode===f.mode:!1}toString(){return "mode("+this.mode+")"}},h=class extends i{constructor(f,m){super(r.CUSTOM),this.ruleIndex=f,this.actionIndex=m,this.isPositionDependent=!0;}execute(f){f.action(null,this.ruleIndex,this.actionIndex);}updateHashCode(f){f.update(this.actionType,this.ruleIndex,this.actionIndex);}equals(f){return this===f?!0:f instanceof h?this.ruleIndex===f.ruleIndex&&this.actionIndex===f.actionIndex:!1}},c=class extends i{constructor(f){super(r.CHANNEL),this.channel=f;}execute(f){f._channel=this.channel;}updateHashCode(f){f.update(this.actionType,this.channel);}equals(f){return this===f?!0:f instanceof c?this.channel===f.channel:!1}toString(){return "channel("+this.channel+")"}},d=class extends i{constructor(f,m){super(m.actionType),this.offset=f,this.action=m,this.isPositionDependent=!0;}execute(f){this.action.execute(f);}updateHashCode(f){f.update(this.actionType,this.offset,this.action);}equals(f){return this===f?!0:f instanceof d?this.offset===f.offset&&this.action===f.action:!1}};e.exports={LexerActionType:r,LexerSkipAction:s,LexerChannelAction:c,LexerCustomAction:h,LexerIndexedCustomAction:d,LexerMoreAction:u,LexerTypeAction:n,LexerPushModeAction:o,LexerPopModeAction:a,LexerModeAction:l};}),$b=te((t,e)=>{var{Token:r}=$t(),i=ho(),s=L8(),{ATNState:n,BasicState:o,DecisionState:a,BlockStartState:u,BlockEndState:l,LoopEndState:h,RuleStartState:c,RuleStopState:d,TokensStartState:f,PlusLoopbackState:m,StarLoopbackState:g,StarLoopEntryState:v,PlusBlockStartState:x,StarBlockStartState:_,BasicBlockStartState:E}=cn(),{Transition:b,AtomTransition:w,SetTransition:D,NotSetTransition:N,RuleTransition:F,RangeTransition:U,ActionTransition:Z,EpsilonTransition:re,WildcardTransition:ae,PredicateTransition:k,PrecedencePredicateTransition:y}=za(),{IntervalSet:C}=Ar(),S=Ub(),{LexerActionType:R,LexerSkipAction:L,LexerChannelAction:I,LexerCustomAction:K,LexerMoreAction:j,LexerTypeAction:A,LexerPushModeAction:q,LexerPopModeAction:B,LexerModeAction:T}=Vb(),P="AADB8D7E-AEEF-4415-AD2B-8204D6CF042E",H="59627784-3BE5-417A-B9EB-8131A7286089",z=[P,H],G=3,oe=H;function se(M,J){let W=[];return W[M-1]=J,W.map(function(ne){return J})}var X=class{constructor(M){M==null&&(M=S.defaultOptions),this.deserializationOptions=M,this.stateFactories=null,this.actionFactories=null;}isFeatureSupported(M,J){let W=z.indexOf(M);return W<0?!1:z.indexOf(J)>=W}deserialize(M){this.reset(M),this.checkVersion(),this.checkUUID();let J=this.readATN();this.readStates(J),this.readRules(J),this.readModes(J);let W=[];return this.readSets(J,W,this.readInt.bind(this)),this.isFeatureSupported(H,this.uuid)&&this.readSets(J,W,this.readInt32.bind(this)),this.readEdges(J,W),this.readDecisions(J),this.readLexerActions(J),this.markPrecedenceDecisions(J),this.verifyATN(J),this.deserializationOptions.generateRuleBypassTransitions&&J.grammarType===s.PARSER&&(this.generateRuleBypassTransitions(J),this.verifyATN(J)),J}reset(M){let J=function(ne){let le=ne.charCodeAt(0);return le>1?le-2:le+65534},W=M.split("").map(J);W[0]=M.charCodeAt(0),this.data=W,this.pos=0;}checkVersion(){let M=this.readInt();if(M!==G)throw "Could not deserialize ATN with version "+M+" (expected "+G+")."}checkUUID(){let M=this.readUUID();if(z.indexOf(M)<0)throw oe;this.uuid=M;}readATN(){let M=this.readInt(),J=this.readInt();return new i(M,J)}readStates(M){let J,W,ne,le=[],Q=[],_e=this.readInt();for(let Ce=0;Ce<_e;Ce++){let tt=this.readInt();if(tt===n.INVALID_TYPE){M.addState(null);continue}let Fe=this.readInt();Fe===65535&&(Fe=-1);let He=this.stateFactory(tt,Fe);if(tt===n.LOOP_END){let Yt=this.readInt();le.push([He,Yt]);}else if(He instanceof u){let Yt=this.readInt();Q.push([He,Yt]);}M.addState(He);}for(J=0;J<le.length;J++)W=le[J],W[0].loopBackState=M.states[W[1]];for(J=0;J<Q.length;J++)W=Q[J],W[0].endState=M.states[W[1]];let Se=this.readInt();for(J=0;J<Se;J++)ne=this.readInt(),M.states[ne].nonGreedy=!0;let ye=this.readInt();for(J=0;J<ye;J++)ne=this.readInt(),M.states[ne].isPrecedenceRule=!0;}readRules(M){let J,W=this.readInt();for(M.grammarType===s.LEXER&&(M.ruleToTokenType=se(W,0)),M.ruleToStartState=se(W,0),J=0;J<W;J++){let ne=this.readInt();if(M.ruleToStartState[J]=M.states[ne],M.grammarType===s.LEXER){let le=this.readInt();le===65535&&(le=r.EOF),M.ruleToTokenType[J]=le;}}for(M.ruleToStopState=se(W,0),J=0;J<M.states.length;J++){let ne=M.states[J];ne instanceof d&&(M.ruleToStopState[ne.ruleIndex]=ne,M.ruleToStartState[ne.ruleIndex].stopState=ne);}}readModes(M){let J=this.readInt();for(let W=0;W<J;W++){let ne=this.readInt();M.modeToStartState.push(M.states[ne]);}}readSets(M,J,W){let ne=this.readInt();for(let le=0;le<ne;le++){let Q=new C;J.push(Q);let _e=this.readInt();this.readInt()!==0&&Q.addOne(-1);for(let ye=0;ye<_e;ye++){let Ce=W(),tt=W();Q.addRange(Ce,tt);}}}readEdges(M,J){let W,ne,le,Q,_e,Se=this.readInt();for(W=0;W<Se;W++){let ye=this.readInt(),Ce=this.readInt(),tt=this.readInt(),Fe=this.readInt(),He=this.readInt(),Yt=this.readInt();Q=this.edgeFactory(M,tt,ye,Ce,Fe,He,Yt,J),M.states[ye].addTransition(Q);}for(W=0;W<M.states.length;W++)for(le=M.states[W],ne=0;ne<le.transitions.length;ne++){let ye=le.transitions[ne];if(!(ye instanceof F))continue;let Ce=-1;M.ruleToStartState[ye.target.ruleIndex].isPrecedenceRule&&ye.precedence===0&&(Ce=ye.target.ruleIndex),Q=new re(ye.followState,Ce),M.ruleToStopState[ye.target.ruleIndex].addTransition(Q);}for(W=0;W<M.states.length;W++){if(le=M.states[W],le instanceof u){if(le.endState===null||le.endState.startState!==null)throw "IllegalState";le.endState.startState=le;}if(le instanceof m)for(ne=0;ne<le.transitions.length;ne++)_e=le.transitions[ne].target,_e instanceof x&&(_e.loopBackState=le);else if(le instanceof g)for(ne=0;ne<le.transitions.length;ne++)_e=le.transitions[ne].target,_e instanceof v&&(_e.loopBackState=le);}}readDecisions(M){let J=this.readInt();for(let W=0;W<J;W++){let ne=this.readInt(),le=M.states[ne];M.decisionToState.push(le),le.decision=W;}}readLexerActions(M){if(M.grammarType===s.LEXER){let J=this.readInt();M.lexerActions=se(J,null);for(let W=0;W<J;W++){let ne=this.readInt(),le=this.readInt();le===65535&&(le=-1);let Q=this.readInt();Q===65535&&(Q=-1),M.lexerActions[W]=this.lexerActionFactory(ne,le,Q);}}}generateRuleBypassTransitions(M){let J,W=M.ruleToStartState.length;for(J=0;J<W;J++)M.ruleToTokenType[J]=M.maxTokenType+J+1;for(J=0;J<W;J++)this.generateRuleBypassTransition(M,J);}generateRuleBypassTransition(M,J){let W,ne,le=new E;le.ruleIndex=J,M.addState(le);let Q=new l;Q.ruleIndex=J,M.addState(Q),le.endState=Q,M.defineDecisionState(le),Q.startState=le;let _e=null,Se=null;if(M.ruleToStartState[J].isPrecedenceRule){for(Se=null,W=0;W<M.states.length;W++)if(ne=M.states[W],this.stateIsEndStateFor(ne,J)){Se=ne,_e=ne.loopBackState.transitions[0];break}if(_e===null)throw "Couldn't identify final state of the precedence rule prefix section."}else Se=M.ruleToStopState[J];for(W=0;W<M.states.length;W++){ne=M.states[W];for(let Fe=0;Fe<ne.transitions.length;Fe++){let He=ne.transitions[Fe];He!==_e&&He.target===Se&&(He.target=Q);}}let ye=M.ruleToStartState[J],Ce=ye.transitions.length;for(;Ce>0;)le.addTransition(ye.transitions[Ce-1]),ye.transitions=ye.transitions.slice(-1);M.ruleToStartState[J].addTransition(new re(le)),Q.addTransition(new re(Se));let tt=new o;M.addState(tt),tt.addTransition(new w(Q,M.ruleToTokenType[J])),le.addTransition(new re(tt));}stateIsEndStateFor(M,J){if(M.ruleIndex!==J||!(M instanceof v))return null;let W=M.transitions[M.transitions.length-1].target;return W instanceof h&&W.epsilonOnlyTransitions&&W.transitions[0].target instanceof d?M:null}markPrecedenceDecisions(M){for(let J=0;J<M.states.length;J++){let W=M.states[J];if(W instanceof v&&M.ruleToStartState[W.ruleIndex].isPrecedenceRule){let ne=W.transitions[W.transitions.length-1].target;ne instanceof h&&ne.epsilonOnlyTransitions&&ne.transitions[0].target instanceof d&&(W.isPrecedenceDecision=!0);}}}verifyATN(M){if(this.deserializationOptions.verifyATN)for(let J=0;J<M.states.length;J++){let W=M.states[J];if(W!==null)if(this.checkCondition(W.epsilonOnlyTransitions||W.transitions.length<=1),W instanceof x)this.checkCondition(W.loopBackState!==null);else if(W instanceof v)if(this.checkCondition(W.loopBackState!==null),this.checkCondition(W.transitions.length===2),W.transitions[0].target instanceof _)this.checkCondition(W.transitions[1].target instanceof h),this.checkCondition(!W.nonGreedy);else if(W.transitions[0].target instanceof h)this.checkCondition(W.transitions[1].target instanceof _),this.checkCondition(W.nonGreedy);else throw "IllegalState";else W instanceof g?(this.checkCondition(W.transitions.length===1),this.checkCondition(W.transitions[0].target instanceof v)):W instanceof h?this.checkCondition(W.loopBackState!==null):W instanceof c?this.checkCondition(W.stopState!==null):W instanceof u?this.checkCondition(W.endState!==null):W instanceof l?this.checkCondition(W.startState!==null):W instanceof a?this.checkCondition(W.transitions.length<=1||W.decision>=0):this.checkCondition(W.transitions.length<=1||W instanceof d);}}checkCondition(M,J){if(!M)throw J==null&&(J="IllegalState"),J}readInt(){return this.data[this.pos++]}readInt32(){let M=this.readInt(),J=this.readInt();return M|J<<16}readLong(){let M=this.readInt32(),J=this.readInt32();return M&4294967295|J<<32}readUUID(){let M=[];for(let J=7;J>=0;J--){let W=this.readInt();M[2*J+1]=W&255,M[2*J]=W>>8&255;}return V[M[0]]+V[M[1]]+V[M[2]]+V[M[3]]+"-"+V[M[4]]+V[M[5]]+"-"+V[M[6]]+V[M[7]]+"-"+V[M[8]]+V[M[9]]+"-"+V[M[10]]+V[M[11]]+V[M[12]]+V[M[13]]+V[M[14]]+V[M[15]]}edgeFactory(M,J,W,ne,le,Q,_e,Se){let ye=M.states[ne];switch(J){case b.EPSILON:return new re(ye);case b.RANGE:return _e!==0?new U(ye,r.EOF,Q):new U(ye,le,Q);case b.RULE:return new F(M.states[le],Q,_e,ye);case b.PREDICATE:return new k(ye,le,Q,_e!==0);case b.PRECEDENCE:return new y(ye,le);case b.ATOM:return _e!==0?new w(ye,r.EOF):new w(ye,le);case b.ACTION:return new Z(ye,le,Q,_e!==0);case b.SET:return new D(ye,Se[le]);case b.NOT_SET:return new N(ye,Se[le]);case b.WILDCARD:return new ae(ye);default:throw "The specified transition type: "+J+" is not valid."}}stateFactory(M,J){if(this.stateFactories===null){let W=[];W[n.INVALID_TYPE]=null,W[n.BASIC]=()=>new o,W[n.RULE_START]=()=>new c,W[n.BLOCK_START]=()=>new E,W[n.PLUS_BLOCK_START]=()=>new x,W[n.STAR_BLOCK_START]=()=>new _,W[n.TOKEN_START]=()=>new f,W[n.RULE_STOP]=()=>new d,W[n.BLOCK_END]=()=>new l,W[n.STAR_LOOP_BACK]=()=>new g,W[n.STAR_LOOP_ENTRY]=()=>new v,W[n.PLUS_LOOP_BACK]=()=>new m,W[n.LOOP_END]=()=>new h,this.stateFactories=W;}if(M>this.stateFactories.length||this.stateFactories[M]===null)throw "The specified state type "+M+" is not valid.";{let W=this.stateFactories[M]();if(W!==null)return W.ruleIndex=J,W}}lexerActionFactory(M,J,W){if(this.actionFactories===null){let ne=[];ne[R.CHANNEL]=(le,Q)=>new I(le),ne[R.CUSTOM]=(le,Q)=>new K(le,Q),ne[R.MODE]=(le,Q)=>new T(le),ne[R.MORE]=(le,Q)=>j.INSTANCE,ne[R.POP_MODE]=(le,Q)=>B.INSTANCE,ne[R.PUSH_MODE]=(le,Q)=>new q(le),ne[R.SKIP]=(le,Q)=>L.INSTANCE,ne[R.TYPE]=(le,Q)=>new A(le),this.actionFactories=ne;}if(M>this.actionFactories.length||this.actionFactories[M]===null)throw "The specified lexer action type "+M+" is not valid.";return this.actionFactories[M](J,W)}};function ee(){let M=[];for(let J=0;J<256;J++)M[J]=(J+256).toString(16).substr(1).toUpperCase();return M}var V=ee();e.exports=X;}),Yl=te((t,e)=>{var r=class{syntaxError(n,o,a,u,l,h){}reportAmbiguity(n,o,a,u,l,h,c){}reportAttemptingFullContext(n,o,a,u,l,h){}reportContextSensitivity(n,o,a,u,l,h){}},i=class extends r{constructor(){super();}syntaxError(n,o,a,u,l,h){console.error("line "+a+":"+u+" "+l);}};i.INSTANCE=new i;var s=class extends r{constructor(n){if(super(),n===null)throw "delegates";return this.delegates=n,this}syntaxError(n,o,a,u,l,h){this.delegates.map(c=>c.syntaxError(n,o,a,u,l,h));}reportAmbiguity(n,o,a,u,l,h,c){this.delegates.map(d=>d.reportAmbiguity(n,o,a,u,l,h,c));}reportAttemptingFullContext(n,o,a,u,l,h){this.delegates.map(c=>c.reportAttemptingFullContext(n,o,a,u,l,h));}reportContextSensitivity(n,o,a,u,l,h){this.delegates.map(c=>c.reportContextSensitivity(n,o,a,u,l,h));}};e.exports={ErrorListener:r,ConsoleErrorListener:i,ProxyErrorListener:s};}),zb=te((t,e)=>{var{Token:r}=$t(),{ConsoleErrorListener:i}=Yl(),{ProxyErrorListener:s}=Yl(),n=class{constructor(){this._listeners=[i.INSTANCE],this._interp=null,this._stateNumber=-1;}checkVersion(o){let a="4.9.2";a!==o&&console.log("ANTLR runtime and generated code versions disagree: "+a+"!="+o);}addErrorListener(o){this._listeners.push(o);}removeErrorListeners(){this._listeners=[];}getTokenTypeMap(){let o=this.getTokenNames();if(o===null)throw "The current recognizer does not provide a list of token names.";let a=this.tokenTypeMapCache[o];return a===void 0&&(a=o.reduce(function(u,l,h){u[l]=h;}),a.EOF=r.EOF,this.tokenTypeMapCache[o]=a),a}getRuleIndexMap(){let o=this.ruleNames;if(o===null)throw "The current recognizer does not provide a list of rule names.";let a=this.ruleIndexMapCache[o];return a===void 0&&(a=o.reduce(function(u,l,h){u[l]=h;}),this.ruleIndexMapCache[o]=a),a}getTokenType(o){let a=this.getTokenTypeMap()[o];return a!==void 0?a:r.INVALID_TYPE}getErrorHeader(o){let a=o.getOffendingToken().line,u=o.getOffendingToken().column;return "line "+a+":"+u}getTokenErrorDisplay(o){if(o===null)return "<no token>";let a=o.text;return a===null&&(o.type===r.EOF?a="<EOF>":a="<"+o.type+">"),a=a.replace(`
81
+ `,"\\n").replace("\r","\\r").replace(" ","\\t"),"'"+a+"'"}getErrorListenerDispatch(){return new s(this._listeners)}sempred(o,a,u){return !0}precpred(o,a){return !0}get state(){return this._stateNumber}set state(o){this._stateNumber=o;}};n.tokenTypeMapCache={},n.ruleIndexMapCache={},e.exports=n;}),P8=te((t,e)=>{var r=$t().CommonToken,i=class{},s=class extends i{constructor(n){super(),this.copyText=n===void 0?!1:n;}create(n,o,a,u,l,h,c,d){let f=new r(n,o,u,l,h);return f.line=c,f.column=d,a!==null?f.text=a:this.copyText&&n[1]!==null&&(f.text=n[1].getText(l,h)),f}createThin(n,o){let a=new r(null,n);return a.text=o,a}};s.DEFAULT=new s,e.exports=s;}),Xr=te((t,e)=>{var{PredicateTransition:r}=za(),{Interval:i}=Ar().Interval,s=class extends Error{constructor(c){if(super(c.message),Error.captureStackTrace)Error.captureStackTrace(this,s);else var d=new Error().stack;this.message=c.message,this.recognizer=c.recognizer,this.input=c.input,this.ctx=c.ctx,this.offendingToken=null,this.offendingState=-1,this.recognizer!==null&&(this.offendingState=this.recognizer.state);}getExpectedTokens(){return this.recognizer!==null?this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx):null}toString(){return this.message}},n=class extends s{constructor(c,d,f,m){super({message:"",recognizer:c,input:d,ctx:null}),this.startIndex=f,this.deadEndConfigs=m;}toString(){let c="";return this.startIndex>=0&&this.startIndex<this.input.size&&(c=this.input.getText(new i(this.startIndex,this.startIndex))),"LexerNoViableAltException"+c}},o=class extends s{constructor(c,d,f,m,g,v){v=v||c._ctx,m=m||c.getCurrentToken(),f=f||c.getCurrentToken(),d=d||c.getInputStream(),super({message:"",recognizer:c,input:d,ctx:v}),this.deadEndConfigs=g,this.startToken=f,this.offendingToken=m;}},a=class extends s{constructor(c){super({message:"",recognizer:c,input:c.getInputStream(),ctx:c._ctx}),this.offendingToken=c.getCurrentToken();}};function u(c,d){return d!==null?d:"failed predicate: {"+c+"}?"}var l=class extends s{constructor(c,d,f){super({message:u(d,f||null),recognizer:c,input:c.getInputStream(),ctx:c._ctx});let g=c._interp.atn.states[c.state].transitions[0];g instanceof r?(this.ruleIndex=g.ruleIndex,this.predicateIndex=g.predIndex):(this.ruleIndex=0,this.predicateIndex=0),this.predicate=d,this.offendingToken=c.getCurrentToken();}},h=class extends Error{constructor(){super(),Error.captureStackTrace(this,h);}};e.exports={RecognitionException:s,NoViableAltException:o,LexerNoViableAltException:n,InputMismatchException:a,FailedPredicateException:l,ParseCancellationException:h};}),_c=te((t,e)=>{var{Token:r}=$t(),i=zb(),s=P8(),{RecognitionException:n}=Xr(),{LexerNoViableAltException:o}=Xr(),a=class extends i{constructor(u){super(),this._input=u,this._factory=s.DEFAULT,this._tokenFactorySourcePair=[this,u],this._interp=null,this._token=null,this._tokenStartCharIndex=-1,this._tokenStartLine=-1,this._tokenStartColumn=-1,this._hitEOF=!1,this._channel=r.DEFAULT_CHANNEL,this._type=r.INVALID_TYPE,this._modeStack=[],this._mode=a.DEFAULT_MODE,this._text=null;}reset(){this._input!==null&&this._input.seek(0),this._token=null,this._type=r.INVALID_TYPE,this._channel=r.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartColumn=-1,this._tokenStartLine=-1,this._text=null,this._hitEOF=!1,this._mode=a.DEFAULT_MODE,this._modeStack=[],this._interp.reset();}nextToken(){if(this._input===null)throw "nextToken requires a non-null input stream.";let u=this._input.mark();try{for(;;){if(this._hitEOF)return this.emitEOF(),this._token;this._token=null,this._channel=r.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartColumn=this._interp.column,this._tokenStartLine=this._interp.line,this._text=null;let l=!1;for(;;){this._type=r.INVALID_TYPE;let h=a.SKIP;try{h=this._interp.match(this._input,this._mode);}catch(c){if(c instanceof n)this.notifyListeners(c),this.recover(c);else throw console.log(c.stack),c}if(this._input.LA(1)===r.EOF&&(this._hitEOF=!0),this._type===r.INVALID_TYPE&&(this._type=h),this._type===a.SKIP){l=!0;break}if(this._type!==a.MORE)break}if(!l)return this._token===null&&this.emit(),this._token}}finally{this._input.release(u);}}skip(){this._type=a.SKIP;}more(){this._type=a.MORE;}mode(u){this._mode=u;}pushMode(u){this._interp.debug&&console.log("pushMode "+u),this._modeStack.push(this._mode),this.mode(u);}popMode(){if(this._modeStack.length===0)throw "Empty Stack";return this._interp.debug&&console.log("popMode back to "+this._modeStack.slice(0,-1)),this.mode(this._modeStack.pop()),this._mode}emitToken(u){this._token=u;}emit(){let u=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.getCharIndex()-1,this._tokenStartLine,this._tokenStartColumn);return this.emitToken(u),u}emitEOF(){let u=this.column,l=this.line,h=this._factory.create(this._tokenFactorySourcePair,r.EOF,null,r.DEFAULT_CHANNEL,this._input.index,this._input.index-1,l,u);return this.emitToken(h),h}getCharIndex(){return this._input.index}getAllTokens(){let u=[],l=this.nextToken();for(;l.type!==r.EOF;)u.push(l),l=this.nextToken();return u}notifyListeners(u){let l=this._tokenStartCharIndex,h=this._input.index,c=this._input.getText(l,h),d="token recognition error at: '"+this.getErrorDisplay(c)+"'";this.getErrorListenerDispatch().syntaxError(this,null,this._tokenStartLine,this._tokenStartColumn,d,u);}getErrorDisplay(u){let l=[];for(let h=0;h<u.length;h++)l.push(u[h]);return l.join("")}getErrorDisplayForChar(u){return u.charCodeAt(0)===r.EOF?"<EOF>":u===`
82
+ `?"\\n":u===" "?"\\t":u==="\r"?"\\r":u}getCharErrorDisplay(u){return "'"+this.getErrorDisplayForChar(u)+"'"}recover(u){this._input.LA(1)!==r.EOF&&(u instanceof o?this._interp.consume(this._input):this._input.consume());}get inputStream(){return this._input}set inputStream(u){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=u,this._tokenFactorySourcePair=[this,this._input];}get sourceName(){return this._input.sourceName}get type(){return this.type}set type(u){this._type=u;}get line(){return this._interp.line}set line(u){this._interp.line=u;}get column(){return this._interp.column}set column(u){this._interp.column=u;}get text(){return this._text!==null?this._text:this._interp.getText(this._input)}set text(u){this._text=u;}};a.DEFAULT_MODE=0,a.MORE=-2,a.SKIP=-3,a.DEFAULT_TOKEN_CHANNEL=r.DEFAULT_CHANNEL,a.HIDDEN=r.HIDDEN_CHANNEL,a.MIN_CHAR_VALUE=0,a.MAX_CHAR_VALUE=1114111,e.exports=a;}),fo=te((t,e)=>{var r=ho(),i=gr(),{SemanticContext:s}=$a(),{merge:n}=Xi();function o(h){return h.hashCodeForConfigSet()}function a(h,c){return h===c?!0:h===null||c===null?!1:h.equalsForConfigSet(c)}var u=class{constructor(h){this.configLookup=new i.Set(o,a),this.fullCtx=h===void 0?!0:h,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1;}add(h,c){if(c===void 0&&(c=null),this.readOnly)throw "This set is readonly";h.semanticContext!==s.NONE&&(this.hasSemanticContext=!0),h.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);let d=this.configLookup.add(h);if(d===h)return this.cachedHashCode=-1,this.configs.push(h),!0;let f=!this.fullCtx,m=n(d.context,h.context,f,c);return d.reachesIntoOuterContext=Math.max(d.reachesIntoOuterContext,h.reachesIntoOuterContext),h.precedenceFilterSuppressed&&(d.precedenceFilterSuppressed=!0),d.context=m,!0}getStates(){let h=new i.Set;for(let c=0;c<this.configs.length;c++)h.add(this.configs[c].state);return h}getPredicates(){let h=[];for(let c=0;c<this.configs.length;c++){let d=this.configs[c].semanticContext;d!==s.NONE&&h.push(d.semanticContext);}return h}optimizeConfigs(h){if(this.readOnly)throw "This set is readonly";if(this.configLookup.length!==0)for(let c=0;c<this.configs.length;c++){let d=this.configs[c];d.context=h.getCachedContext(d.context);}}addAll(h){for(let c=0;c<h.length;c++)this.add(h[c]);return !1}equals(h){return this===h||h instanceof u&&i.equalArrays(this.configs,h.configs)&&this.fullCtx===h.fullCtx&&this.uniqueAlt===h.uniqueAlt&&this.conflictingAlts===h.conflictingAlts&&this.hasSemanticContext===h.hasSemanticContext&&this.dipsIntoOuterContext===h.dipsIntoOuterContext}hashCode(){let h=new i.Hash;return h.update(this.configs),h.finish()}updateHashCode(h){this.readOnly?(this.cachedHashCode===-1&&(this.cachedHashCode=this.hashCode()),h.update(this.cachedHashCode)):h.update(this.hashCode());}isEmpty(){return this.configs.length===0}contains(h){if(this.configLookup===null)throw "This method is not implemented for readonly sets.";return this.configLookup.contains(h)}containsFast(h){if(this.configLookup===null)throw "This method is not implemented for readonly sets.";return this.configLookup.containsFast(h)}clear(){if(this.readOnly)throw "This set is readonly";this.configs=[],this.cachedHashCode=-1,this.configLookup=new i.Set;}setReadonly(h){this.readOnly=h,h&&(this.configLookup=null);}toString(){return i.arrayToString(this.configs)+(this.hasSemanticContext?",hasSemanticContext="+this.hasSemanticContext:"")+(this.uniqueAlt!==r.INVALID_ALT_NUMBER?",uniqueAlt="+this.uniqueAlt:"")+(this.conflictingAlts!==null?",conflictingAlts="+this.conflictingAlts:"")+(this.dipsIntoOuterContext?",dipsIntoOuterContext":"")}get items(){return this.configs}get length(){return this.configs.length}},l=class extends u{constructor(){super(),this.configLookup=new i.Set;}};e.exports={ATNConfigSet:u,OrderedATNConfigSet:l};}),Ka=te((t,e)=>{var{ATNConfigSet:r}=fo(),{Hash:i,Set:s}=gr(),n=class{constructor(a,u){this.alt=u,this.pred=a;}toString(){return "("+this.pred+", "+this.alt+")"}},o=class{constructor(a,u){return a===null&&(a=-1),u===null&&(u=new r),this.stateNumber=a,this.configs=u,this.edges=null,this.isAcceptState=!1,this.prediction=0,this.lexerActionExecutor=null,this.requiresFullContext=!1,this.predicates=null,this}getAltSet(){let a=new s;if(this.configs!==null)for(let u=0;u<this.configs.length;u++){let l=this.configs[u];a.add(l.alt);}return a.length===0?null:a}equals(a){return this===a||a instanceof o&&this.configs.equals(a.configs)}toString(){let a=""+this.stateNumber+":"+this.configs;return this.isAcceptState&&(a=a+"=>",this.predicates!==null?a=a+this.predicates:a=a+this.prediction),a}hashCode(){let a=new i;return a.update(this.configs),a.finish()}};e.exports={DFAState:o,PredPrediction:n};}),Kb=te((t,e)=>{var{DFAState:r}=Ka(),{ATNConfigSet:i}=fo(),{getCachedPredictionContext:s}=Xi(),{Map:n}=gr(),o=class{constructor(a,u){return this.atn=a,this.sharedContextCache=u,this}getCachedContext(a){if(this.sharedContextCache===null)return a;let u=new n;return s(a,this.sharedContextCache,u)}};o.ERROR=new r(2147483647,new i),e.exports=o;}),I8=te((t,e)=>{var{hashStuff:r}=gr(),{LexerIndexedCustomAction:i}=Vb(),s=class{constructor(n){return this.lexerActions=n===null?[]:n,this.cachedHashCode=r(n),this}fixOffsetBeforeMatch(n){let o=null;for(let a=0;a<this.lexerActions.length;a++)this.lexerActions[a].isPositionDependent&&!(this.lexerActions[a]instanceof i)&&(o===null&&(o=this.lexerActions.concat([])),o[a]=new i(n,this.lexerActions[a]));return o===null?this:new s(o)}execute(n,o,a){let u=!1,l=o.index;try{for(let h=0;h<this.lexerActions.length;h++){let c=this.lexerActions[h];if(c instanceof i){let d=c.offset;o.seek(a+d),c=c.action,u=a+d!==l;}else c.isPositionDependent&&(o.seek(l),u=!1);c.execute(n);}}finally{u&&o.seek(l);}}hashCode(){return this.cachedHashCode}updateHashCode(n){n.update(this.cachedHashCode);}equals(n){if(this===n)return !0;if(n instanceof s){if(this.cachedHashCode!=n.cachedHashCode)return !1;if(this.lexerActions.length!=n.lexerActions.length)return !1;{let o=this.lexerActions.length;for(let a=0;a<o;++a)if(!this.lexerActions[a].equals(n.lexerActions[a]))return !1;return !0}}else return !1}static append(n,o){if(n===null)return new s([o]);let a=n.lexerActions.concat([o]);return new s(a)}};e.exports=s;}),k8=te((t,e)=>{var{Token:r}=$t(),i=_c(),s=ho(),n=Kb(),{DFAState:o}=Ka(),{OrderedATNConfigSet:a}=fo(),{PredictionContext:u}=Xi(),{SingletonPredictionContext:l}=Xi(),{RuleStopState:h}=cn(),{LexerATNConfig:c}=gc(),{Transition:d}=za(),f=I8(),{LexerNoViableAltException:m}=Xr();function g(_){_.index=-1,_.line=0,_.column=-1,_.dfaState=null;}var v=class{constructor(){g(this);}reset(){g(this);}},x=class extends n{constructor(_,E,b,w){super(E,w),this.decisionToDFA=b,this.recog=_,this.startIndex=-1,this.line=1,this.column=0,this.mode=i.DEFAULT_MODE,this.prevAccept=new v;}copyState(_){this.column=_.column,this.line=_.line,this.mode=_.mode,this.startIndex=_.startIndex;}match(_,E){this.match_calls+=1,this.mode=E;let b=_.mark();try{this.startIndex=_.index,this.prevAccept.reset();let w=this.decisionToDFA[E];return w.s0===null?this.matchATN(_):this.execATN(_,w.s0)}finally{_.release(b);}}reset(){this.prevAccept.reset(),this.startIndex=-1,this.line=1,this.column=0,this.mode=i.DEFAULT_MODE;}matchATN(_){let E=this.atn.modeToStartState[this.mode];x.debug&&console.log("matchATN mode "+this.mode+" start: "+E);let b=this.mode,w=this.computeStartState(_,E),D=w.hasSemanticContext;w.hasSemanticContext=!1;let N=this.addDFAState(w);D||(this.decisionToDFA[this.mode].s0=N);let F=this.execATN(_,N);return x.debug&&console.log("DFA after matchATN: "+this.decisionToDFA[b].toLexerString()),F}execATN(_,E){x.debug&&console.log("start state closure="+E.configs),E.isAcceptState&&this.captureSimState(this.prevAccept,_,E);let b=_.LA(1),w=E;for(;;){x.debug&&console.log("execATN loop starting closure: "+w.configs);let D=this.getExistingTargetState(w,b);if(D===null&&(D=this.computeTargetState(_,w,b)),D===n.ERROR||(b!==r.EOF&&this.consume(_),D.isAcceptState&&(this.captureSimState(this.prevAccept,_,D),b===r.EOF)))break;b=_.LA(1),w=D;}return this.failOrAccept(this.prevAccept,_,w.configs,b)}getExistingTargetState(_,E){if(_.edges===null||E<x.MIN_DFA_EDGE||E>x.MAX_DFA_EDGE)return null;let b=_.edges[E-x.MIN_DFA_EDGE];return b===void 0&&(b=null),x.debug&&b!==null&&console.log("reuse state "+_.stateNumber+" edge to "+b.stateNumber),b}computeTargetState(_,E,b){let w=new a;return this.getReachableConfigSet(_,E.configs,w,b),w.items.length===0?(w.hasSemanticContext||this.addDFAEdge(E,b,n.ERROR),n.ERROR):this.addDFAEdge(E,b,null,w)}failOrAccept(_,E,b,w){if(this.prevAccept.dfaState!==null){let D=_.dfaState.lexerActionExecutor;return this.accept(E,D,this.startIndex,_.index,_.line,_.column),_.dfaState.prediction}else {if(w===r.EOF&&E.index===this.startIndex)return r.EOF;throw new m(this.recog,E,this.startIndex,b)}}getReachableConfigSet(_,E,b,w){let D=s.INVALID_ALT_NUMBER;for(let N=0;N<E.items.length;N++){let F=E.items[N],U=F.alt===D;if(!(U&&F.passedThroughNonGreedyDecision)){x.debug&&console.log(`testing %s at %s
83
+ `,this.getTokenName(w),F.toString(this.recog,!0));for(let Z=0;Z<F.state.transitions.length;Z++){let re=F.state.transitions[Z],ae=this.getReachableTarget(re,w);if(ae!==null){let k=F.lexerActionExecutor;k!==null&&(k=k.fixOffsetBeforeMatch(_.index-this.startIndex));let y=w===r.EOF,C=new c({state:ae,lexerActionExecutor:k},F);this.closure(_,C,b,U,!0,y)&&(D=F.alt);}}}}}accept(_,E,b,w,D,N){x.debug&&console.log(`ACTION %s
84
84
  `,E),_.seek(w),this.line=D,this.column=N,E!==null&&this.recog!==null&&E.execute(this.recog,_,b);}getReachableTarget(_,E){return _.matches(E,0,i.MAX_CHAR_VALUE)?_.target:null}computeStartState(_,E){let b=u.EMPTY,w=new a;for(let D=0;D<E.transitions.length;D++){let N=E.transitions[D].target,F=new c({state:N,alt:D+1,context:b},null);this.closure(_,F,w,!1,!1,!1);}return w}closure(_,E,b,w,D,N){let F=null;if(x.debug&&console.log("closure("+E.toString(this.recog,!0)+")"),E.state instanceof h){if(x.debug&&(this.recog!==null?console.log(`closure at %s rule stop %s
85
85
  `,this.recog.ruleNames[E.state.ruleIndex],E):console.log(`closure at rule stop %s
86
- `,E)),E.context===null||E.context.hasEmptyPath()){if(E.context===null||E.context.isEmpty())return b.add(E),!0;b.add(new c({state:E.state,context:u.EMPTY},E)),w=!0;}if(E.context!==null&&!E.context.isEmpty()){for(let V=0;V<E.context.length;V++)if(E.context.getReturnState(V)!==u.EMPTY_RETURN_STATE){let Z=E.context.getParent(V),te=this.atn.states[E.context.getReturnState(V)];F=new c({state:te,context:Z},E),w=this.closure(_,F,b,w,D,N);}}return w}E.state.epsilonOnlyTransitions||(!w||!E.passedThroughNonGreedyDecision)&&b.add(E);for(let V=0;V<E.state.transitions.length;V++){let Z=E.state.transitions[V];F=this.getEpsilonTarget(_,E,Z,b,D,N),F!==null&&(w=this.closure(_,F,b,w,D,N));}return w}getEpsilonTarget(_,E,b,w,D,N){let F=null;if(b.serializationType===d.RULE){let V=l.create(E.context,b.followState.stateNumber);F=new c({state:b.target,context:V},E);}else {if(b.serializationType===d.PRECEDENCE)throw "Precedence predicates are not supported in lexers.";if(b.serializationType===d.PREDICATE)x.debug&&console.log("EVAL rule "+b.ruleIndex+":"+b.predIndex),w.hasSemanticContext=!0,this.evaluatePredicate(_,b.ruleIndex,b.predIndex,D)&&(F=new c({state:b.target},E));else if(b.serializationType===d.ACTION)if(E.context===null||E.context.hasEmptyPath()){let V=f.append(E.lexerActionExecutor,this.atn.lexerActions[b.actionIndex]);F=new c({state:b.target,lexerActionExecutor:V},E);}else F=new c({state:b.target},E);else b.serializationType===d.EPSILON?F=new c({state:b.target},E):(b.serializationType===d.ATOM||b.serializationType===d.RANGE||b.serializationType===d.SET)&&N&&b.matches(r.EOF,0,i.MAX_CHAR_VALUE)&&(F=new c({state:b.target},E));}return F}evaluatePredicate(_,E,b,w){if(this.recog===null)return !0;if(!w)return this.recog.sempred(null,E,b);let D=this.column,N=this.line,F=_.index,V=_.mark();try{return this.consume(_),this.recog.sempred(null,E,b)}finally{this.column=D,this.line=N,_.seek(F),_.release(V);}}captureSimState(_,E,b){_.index=E.index,_.line=this.line,_.column=this.column,_.dfaState=b;}addDFAEdge(_,E,b,w){if(b===void 0&&(b=null),w===void 0&&(w=null),b===null&&w!==null){let D=w.hasSemanticContext;if(w.hasSemanticContext=!1,b=this.addDFAState(w),D)return b}return E<x.MIN_DFA_EDGE||E>x.MAX_DFA_EDGE||(x.debug&&console.log("EDGE "+_+" -> "+b+" upon "+E),_.edges===null&&(_.edges=[]),_.edges[E-x.MIN_DFA_EDGE]=b),b}addDFAState(_){let E=new o(null,_),b=null;for(let F=0;F<_.items.length;F++){let V=_.items[F];if(V.state instanceof h){b=V;break}}b!==null&&(E.isAcceptState=!0,E.lexerActionExecutor=b.lexerActionExecutor,E.prediction=this.atn.ruleToTokenType[b.state.ruleIndex]);let w=this.decisionToDFA[this.mode],D=w.states.get(E);if(D!==null)return D;let N=E;return N.stateNumber=w.states.length,_.setReadonly(!0),N.configs=_,w.states.add(N),N}getDFA(_){return this.decisionToDFA[_]}getText(_){return _.getText(this.startIndex,_.index-1)}consume(_){_.LA(1)===10?(this.line+=1,this.column=0):this.column+=1,_.consume();}getTokenName(_){return _===-1?"EOF":"'"+String.fromCharCode(_)+"'"}};x.debug=!1,x.dfa_debug=!1,x.MIN_DFA_EDGE=0,x.MAX_DFA_EDGE=127,x.match_calls=0,e.exports=x;}),Gb=re((t,e)=>{var{Map:r,BitSet:i,AltDict:s,hashStuff:n}=gr(),o=ho(),{RuleStopState:a}=cn(),{ATNConfigSet:u}=fo(),{ATNConfig:l}=gc(),{SemanticContext:h}=$a(),c={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(d,f){if(c.allConfigsInRuleStopStates(f))return !0;if(d===c.SLL&&f.hasSemanticContext){let g=new u;for(let v=0;v<f.items.length;v++){let x=f.items[v];x=new l({semanticContext:h.NONE},x),g.add(x);}f=g;}let m=c.getConflictingAltSubsets(f);return c.hasConflictingAltSet(m)&&!c.hasStateAssociatedWithOneAlt(f)},hasConfigInRuleStopState:function(d){for(let f=0;f<d.items.length;f++)if(d.items[f].state instanceof a)return !0;return !1},allConfigsInRuleStopStates:function(d){for(let f=0;f<d.items.length;f++)if(!(d.items[f].state instanceof a))return !1;return !0},resolvesToJustOneViableAlt:function(d){return c.getSingleViableAlt(d)},allSubsetsConflict:function(d){return !c.hasNonConflictingAltSet(d)},hasNonConflictingAltSet:function(d){for(let f=0;f<d.length;f++)if(d[f].length===1)return !0;return !1},hasConflictingAltSet:function(d){for(let f=0;f<d.length;f++)if(d[f].length>1)return !0;return !1},allSubsetsEqual:function(d){let f=null;for(let m=0;m<d.length;m++){let g=d[m];if(f===null)f=g;else if(g!==f)return !1}return !0},getUniqueAlt:function(d){let f=c.getAlts(d);return f.length===1?f.minValue():o.INVALID_ALT_NUMBER},getAlts:function(d){let f=new i;return d.map(function(m){f.or(m);}),f},getConflictingAltSubsets:function(d){let f=new r;return f.hashFunction=function(m){n(m.state.stateNumber,m.context);},f.equalsFunction=function(m,g){return m.state.stateNumber===g.state.stateNumber&&m.context.equals(g.context)},d.items.map(function(m){let g=f.get(m);g===null&&(g=new i,f.put(m,g)),g.add(m.alt);}),f.getValues()},getStateToAltMap:function(d){let f=new s;return d.items.map(function(m){let g=f.get(m.state);g===null&&(g=new i,f.put(m.state,g)),g.add(m.alt);}),f},hasStateAssociatedWithOneAlt:function(d){let f=c.getStateToAltMap(d).values();for(let m=0;m<f.length;m++)if(f[m].length===1)return !0;return !1},getSingleViableAlt:function(d){let f=null;for(let m=0;m<d.length;m++){let v=d[m].minValue();if(f===null)f=v;else if(f!==v)return o.INVALID_ALT_NUMBER}return f}};e.exports=c;}),Wb=re((t,e)=>{var r=Mp(),i=so(),s=i.INVALID_INTERVAL,n=i.TerminalNode,o=i.TerminalNodeImpl,a=i.ErrorNodeImpl,u=Ar().Interval,l=class extends r{constructor(h,c){h=h||null,c=c||null,super(h,c),this.ruleIndex=-1,this.children=null,this.start=null,this.stop=null,this.exception=null;}copyFrom(h){this.parentCtx=h.parentCtx,this.invokingState=h.invokingState,this.children=null,this.start=h.start,this.stop=h.stop,h.children&&(this.children=[],h.children.map(function(c){c instanceof a&&(this.children.push(c),c.parentCtx=this);},this));}enterRule(h){}exitRule(h){}addChild(h){return this.children===null&&(this.children=[]),this.children.push(h),h}removeLastChild(){this.children!==null&&this.children.pop();}addTokenNode(h){let c=new o(h);return this.addChild(c),c.parentCtx=this,c}addErrorNode(h){let c=new a(h);return this.addChild(c),c.parentCtx=this,c}getChild(h,c){if(c=c||null,this.children===null||h<0||h>=this.children.length)return null;if(c===null)return this.children[h];for(let d=0;d<this.children.length;d++){let f=this.children[d];if(f instanceof c){if(h===0)return f;h-=1;}}return null}getToken(h,c){if(this.children===null||c<0||c>=this.children.length)return null;for(let d=0;d<this.children.length;d++){let f=this.children[d];if(f instanceof n&&f.symbol.type===h){if(c===0)return f;c-=1;}}return null}getTokens(h){if(this.children===null)return [];{let c=[];for(let d=0;d<this.children.length;d++){let f=this.children[d];f instanceof n&&f.symbol.type===h&&c.push(f);}return c}}getTypedRuleContext(h,c){return this.getChild(c,h)}getTypedRuleContexts(h){if(this.children===null)return [];{let c=[];for(let d=0;d<this.children.length;d++){let f=this.children[d];f instanceof h&&c.push(f);}return c}}getChildCount(){return this.children===null?0:this.children.length}getSourceInterval(){return this.start===null||this.stop===null?s:new u(this.start.tokenIndex,this.stop.tokenIndex)}};r.EMPTY=new l,e.exports=l;}),M8=re((t,e)=>{var r=gr(),{Set:i,BitSet:s,DoubleDict:n}=r,o=ho(),{ATNState:a,RuleStopState:u}=cn(),{ATNConfig:l}=gc(),{ATNConfigSet:h}=fo(),{Token:c}=$t(),{DFAState:d,PredPrediction:f}=Ka(),m=Kb(),g=Gb(),v=Mp();Wb();var {SemanticContext:_}=$a(),{PredictionContext:E}=Xi(),{Interval:b}=Ar(),{Transition:w,SetTransition:D,NotSetTransition:N,RuleTransition:F,ActionTransition:V}=za(),{NoViableAltException:Z}=Xr(),{SingletonPredictionContext:te,predictionContextFromRuleContext:ae}=Xi(),k=class extends m{constructor(y,C,S,R){super(C,R),this.parser=y,this.decisionToDFA=S,this.predictionMode=g.LL,this._input=null,this._startIndex=0,this._outerContext=null,this._dfa=null,this.mergeCache=null,this.debug=!1,this.debug_closure=!1,this.debug_add=!1,this.debug_list_atn_decisions=!1,this.dfa_debug=!1,this.retry_debug=!1;}reset(){}adaptivePredict(y,C,S){(this.debug||this.debug_list_atn_decisions)&&console.log("adaptivePredict decision "+C+" exec LA(1)=="+this.getLookaheadName(y)+" line "+y.LT(1).line+":"+y.LT(1).column),this._input=y,this._startIndex=y.index,this._outerContext=S;let R=this.decisionToDFA[C];this._dfa=R;let L=y.mark(),I=y.index;try{let K;if(R.precedenceDfa?K=R.getPrecedenceStartState(this.parser.getPrecedence()):K=R.s0,K===null){S===null&&(S=v.EMPTY),(this.debug||this.debug_list_atn_decisions)&&console.log("predictATN decision "+R.decision+" exec LA(1)=="+this.getLookaheadName(y)+", outerContext="+S.toString(this.parser.ruleNames));let q=this.computeStartState(R.atnStartState,v.EMPTY,!1);R.precedenceDfa?(R.s0.configs=q,q=this.applyPrecedenceFilter(q),K=this.addDFAState(R,new d(null,q)),R.setPrecedenceStartState(this.parser.getPrecedence(),K)):(K=this.addDFAState(R,new d(null,q)),R.s0=K);}let j=this.execATN(R,K,y,I,S);return this.debug&&console.log("DFA after predictATN: "+R.toString(this.parser.literalNames)),j}finally{this._dfa=null,this.mergeCache=null,y.seek(I),y.release(L);}}execATN(y,C,S,R,L){(this.debug||this.debug_list_atn_decisions)&&console.log("execATN decision "+y.decision+" exec LA(1)=="+this.getLookaheadName(S)+" line "+S.LT(1).line+":"+S.LT(1).column);let I,K=C;this.debug&&console.log("s0 = "+C);let j=S.LA(1);for(;;){let A=this.getExistingTargetState(K,j);if(A===null&&(A=this.computeTargetState(y,K,j)),A===m.ERROR){let q=this.noViableAlt(S,L,K.configs,R);if(S.seek(R),I=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(K.configs,L),I!==o.INVALID_ALT_NUMBER)return I;throw q}if(A.requiresFullContext&&this.predictionMode!==g.SLL){let q=null;if(A.predicates!==null){this.debug&&console.log("DFA state has preds in DFA sim LL failover");let P=S.index;if(P!==R&&S.seek(R),q=this.evalSemanticContext(A.predicates,L,!0),q.length===1)return this.debug&&console.log("Full LL avoided"),q.minValue();P!==R&&S.seek(P);}this.dfa_debug&&console.log("ctx sensitive state "+L+" in "+A);let T=this.computeStartState(y.atnStartState,L,!0);return this.reportAttemptingFullContext(y,q,A.configs,R,S.index),I=this.execATNWithFullContext(y,A,T,S,R,L),I}if(A.isAcceptState){if(A.predicates===null)return A.prediction;let q=S.index;S.seek(R);let B=this.evalSemanticContext(A.predicates,L,!0);if(B.length===0)throw this.noViableAlt(S,L,A.configs,R);return B.length===1||this.reportAmbiguity(y,A,R,q,!1,B,A.configs),B.minValue()}K=A,j!==c.EOF&&(S.consume(),j=S.LA(1));}}getExistingTargetState(y,C){let S=y.edges;return S===null?null:S[C+1]||null}computeTargetState(y,C,S){let R=this.computeReachSet(C.configs,S,!1);if(R===null)return this.addDFAEdge(y,C,S,m.ERROR),m.ERROR;let L=new d(null,R),I=this.getUniqueAlt(R);if(this.debug){let K=g.getConflictingAltSubsets(R);console.log("SLL altSubSets="+r.arrayToString(K)+", previous="+C.configs+", configs="+R+", predict="+I+", allSubsetsConflict="+g.allSubsetsConflict(K)+", conflictingAlts="+this.getConflictingAlts(R));}return I!==o.INVALID_ALT_NUMBER?(L.isAcceptState=!0,L.configs.uniqueAlt=I,L.prediction=I):g.hasSLLConflictTerminatingPrediction(this.predictionMode,R)&&(L.configs.conflictingAlts=this.getConflictingAlts(R),L.requiresFullContext=!0,L.isAcceptState=!0,L.prediction=L.configs.conflictingAlts.minValue()),L.isAcceptState&&L.configs.hasSemanticContext&&(this.predicateDFAState(L,this.atn.getDecisionState(y.decision)),L.predicates!==null&&(L.prediction=o.INVALID_ALT_NUMBER)),L=this.addDFAEdge(y,C,S,L),L}predicateDFAState(y,C){let S=C.transitions.length,R=this.getConflictingAltsOrUniqueAlt(y.configs),L=this.getPredsForAmbigAlts(R,y.configs,S);L!==null?(y.predicates=this.getPredicatePredictions(R,L),y.prediction=o.INVALID_ALT_NUMBER):y.prediction=R.minValue();}execATNWithFullContext(y,C,S,R,L,I){(this.debug||this.debug_list_atn_decisions)&&console.log("execATNWithFullContext "+S);let K=!0,j=!1,A,q=S;R.seek(L);let B=R.LA(1),T=-1;for(;;){if(A=this.computeReachSet(q,B,K),A===null){let H=this.noViableAlt(R,I,q,L);R.seek(L);let z=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(q,I);if(z!==o.INVALID_ALT_NUMBER)return z;throw H}let P=g.getConflictingAltSubsets(A);if(this.debug&&console.log("LL altSubSets="+P+", predict="+g.getUniqueAlt(P)+", resolvesToJustOneViableAlt="+g.resolvesToJustOneViableAlt(P)),A.uniqueAlt=this.getUniqueAlt(A),A.uniqueAlt!==o.INVALID_ALT_NUMBER){T=A.uniqueAlt;break}else if(this.predictionMode!==g.LL_EXACT_AMBIG_DETECTION){if(T=g.resolvesToJustOneViableAlt(P),T!==o.INVALID_ALT_NUMBER)break}else if(g.allSubsetsConflict(P)&&g.allSubsetsEqual(P)){j=!0,T=g.getSingleViableAlt(P);break}q=A,B!==c.EOF&&(R.consume(),B=R.LA(1));}return A.uniqueAlt!==o.INVALID_ALT_NUMBER?(this.reportContextSensitivity(y,T,A,L,R.index),T):(this.reportAmbiguity(y,C,L,R.index,j,null,A),T)}computeReachSet(y,C,S){this.debug&&console.log("in computeReachSet, starting closure: "+y),this.mergeCache===null&&(this.mergeCache=new n);let R=new h(S),L=null;for(let K=0;K<y.items.length;K++){let j=y.items[K];if(this.debug&&console.log("testing "+this.getTokenName(C)+" at "+j),j.state instanceof u){(S||C===c.EOF)&&(L===null&&(L=[]),L.push(j),this.debug_add&&console.log("added "+j+" to skippedStopStates"));continue}for(let A=0;A<j.state.transitions.length;A++){let q=j.state.transitions[A],B=this.getReachableTarget(q,C);if(B!==null){let T=new l({state:B},j);R.add(T,this.mergeCache),this.debug_add&&console.log("added "+T+" to intermediate");}}}let I=null;if(L===null&&C!==c.EOF&&(R.items.length===1||this.getUniqueAlt(R)!==o.INVALID_ALT_NUMBER)&&(I=R),I===null){I=new h(S);let K=new i,j=C===c.EOF;for(let A=0;A<R.items.length;A++)this.closure(R.items[A],I,K,!1,S,j);}if(C===c.EOF&&(I=this.removeAllConfigsNotInRuleStopState(I,I===R)),L!==null&&(!S||!g.hasConfigInRuleStopState(I)))for(let K=0;K<L.length;K++)I.add(L[K],this.mergeCache);return I.items.length===0?null:I}removeAllConfigsNotInRuleStopState(y,C){if(g.allConfigsInRuleStopStates(y))return y;let S=new h(y.fullCtx);for(let R=0;R<y.items.length;R++){let L=y.items[R];if(L.state instanceof u){S.add(L,this.mergeCache);continue}if(C&&L.state.epsilonOnlyTransitions&&this.atn.nextTokens(L.state).contains(c.EPSILON)){let K=this.atn.ruleToStopState[L.state.ruleIndex];S.add(new l({state:K},L),this.mergeCache);}}return S}computeStartState(y,C,S){let R=ae(this.atn,C),L=new h(S);for(let I=0;I<y.transitions.length;I++){let K=y.transitions[I].target,j=new l({state:K,alt:I+1,context:R},null),A=new i;this.closure(j,L,A,!0,S,!1);}return L}applyPrecedenceFilter(y){let C,S=[],R=new h(y.fullCtx);for(let L=0;L<y.items.length;L++){if(C=y.items[L],C.alt!==1)continue;let I=C.semanticContext.evalPrecedence(this.parser,this._outerContext);I!==null&&(S[C.state.stateNumber]=C.context,I!==C.semanticContext?R.add(new l({semanticContext:I},C),this.mergeCache):R.add(C,this.mergeCache));}for(let L=0;L<y.items.length;L++)if(C=y.items[L],C.alt!==1){if(!C.precedenceFilterSuppressed){let I=S[C.state.stateNumber]||null;if(I!==null&&I.equals(C.context))continue}R.add(C,this.mergeCache);}return R}getReachableTarget(y,C){return y.matches(C,0,this.atn.maxTokenType)?y.target:null}getPredsForAmbigAlts(y,C,S){let R=[];for(let I=0;I<C.items.length;I++){let K=C.items[I];y.contains(K.alt)&&(R[K.alt]=_.orContext(R[K.alt]||null,K.semanticContext));}let L=0;for(let I=1;I<S+1;I++){let K=R[I]||null;K===null?R[I]=_.NONE:K!==_.NONE&&(L+=1);}return L===0&&(R=null),this.debug&&console.log("getPredsForAmbigAlts result "+r.arrayToString(R)),R}getPredicatePredictions(y,C){let S=[],R=!1;for(let L=1;L<C.length;L++){let I=C[L];y!==null&&y.contains(L)&&S.push(new f(I,L)),I!==_.NONE&&(R=!0);}return R?S:null}getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(y,C){let S=this.splitAccordingToSemanticValidity(y,C),R=S[0],L=S[1],I=this.getAltThatFinishedDecisionEntryRule(R);return I!==o.INVALID_ALT_NUMBER||L.items.length>0&&(I=this.getAltThatFinishedDecisionEntryRule(L),I!==o.INVALID_ALT_NUMBER)?I:o.INVALID_ALT_NUMBER}getAltThatFinishedDecisionEntryRule(y){let C=[];for(let S=0;S<y.items.length;S++){let R=y.items[S];(R.reachesIntoOuterContext>0||R.state instanceof u&&R.context.hasEmptyPath())&&C.indexOf(R.alt)<0&&C.push(R.alt);}return C.length===0?o.INVALID_ALT_NUMBER:Math.min.apply(null,C)}splitAccordingToSemanticValidity(y,C){let S=new h(y.fullCtx),R=new h(y.fullCtx);for(let L=0;L<y.items.length;L++){let I=y.items[L];I.semanticContext!==_.NONE?I.semanticContext.evaluate(this.parser,C)?S.add(I):R.add(I):S.add(I);}return [S,R]}evalSemanticContext(y,C,S){let R=new s;for(let L=0;L<y.length;L++){let I=y[L];if(I.pred===_.NONE){if(R.add(I.alt),!S)break;continue}let K=I.pred.evaluate(this.parser,C);if((this.debug||this.dfa_debug)&&console.log("eval pred "+I+"="+K),K&&((this.debug||this.dfa_debug)&&console.log("PREDICT "+I.alt),R.add(I.alt),!S))break}return R}closure(y,C,S,R,L,I){this.closureCheckingStopState(y,C,S,R,L,0,I);}closureCheckingStopState(y,C,S,R,L,I,K){if((this.debug||this.debug_closure)&&(console.log("closure("+y.toString(this.parser,!0)+")"),y.reachesIntoOuterContext>50))throw "problem";if(y.state instanceof u)if(y.context.isEmpty())if(L){C.add(y,this.mergeCache);return}else this.debug&&console.log("FALLING off rule "+this.getRuleName(y.state.ruleIndex));else {for(let j=0;j<y.context.length;j++){if(y.context.getReturnState(j)===E.EMPTY_RETURN_STATE){if(L){C.add(new l({state:y.state,context:E.EMPTY},y),this.mergeCache);continue}else this.debug&&console.log("FALLING off rule "+this.getRuleName(y.state.ruleIndex)),this.closure_(y,C,S,R,L,I,K);continue}let A=this.atn.states[y.context.getReturnState(j)],q=y.context.getParent(j),B={state:A,alt:y.alt,context:q,semanticContext:y.semanticContext},T=new l(B,null);T.reachesIntoOuterContext=y.reachesIntoOuterContext,this.closureCheckingStopState(T,C,S,R,L,I-1,K);}return}this.closure_(y,C,S,R,L,I,K);}closure_(y,C,S,R,L,I,K){let j=y.state;j.epsilonOnlyTransitions||C.add(y,this.mergeCache);for(let A=0;A<j.transitions.length;A++){if(A===0&&this.canDropLoopEntryEdgeInLeftRecursiveRule(y))continue;let q=j.transitions[A],B=R&&!(q instanceof V),T=this.getEpsilonTarget(y,q,B,I===0,L,K);if(T!==null){let P=I;if(y.state instanceof u){if(this._dfa!==null&&this._dfa.precedenceDfa&&q.outermostPrecedenceReturn===this._dfa.atnStartState.ruleIndex&&(T.precedenceFilterSuppressed=!0),T.reachesIntoOuterContext+=1,S.add(T)!==T)continue;C.dipsIntoOuterContext=!0,P-=1,this.debug&&console.log("dips into outer ctx: "+T);}else {if(!q.isEpsilon&&S.add(T)!==T)continue;q instanceof F&&P>=0&&(P+=1);}this.closureCheckingStopState(T,C,S,B,L,P,K);}}}canDropLoopEntryEdgeInLeftRecursiveRule(y){let C=y.state;if(C.stateType!==a.STAR_LOOP_ENTRY||C.stateType!==a.STAR_LOOP_ENTRY||!C.isPrecedenceDecision||y.context.isEmpty()||y.context.hasEmptyPath())return !1;let S=y.context.length;for(let K=0;K<S;K++)if(this.atn.states[y.context.getReturnState(K)].ruleIndex!==C.ruleIndex)return !1;let L=C.transitions[0].target.endState.stateNumber,I=this.atn.states[L];for(let K=0;K<S;K++){let j=y.context.getReturnState(K),A=this.atn.states[j];if(A.transitions.length!==1||!A.transitions[0].isEpsilon)return !1;let q=A.transitions[0].target;if(!(A.stateType===a.BLOCK_END&&q===C)&&A!==I&&q!==I&&!(q.stateType===a.BLOCK_END&&q.transitions.length===1&&q.transitions[0].isEpsilon&&q.transitions[0].target===C))return !1}return !0}getRuleName(y){return this.parser!==null&&y>=0?this.parser.ruleNames[y]:"<rule "+y+">"}getEpsilonTarget(y,C,S,R,L,I){switch(C.serializationType){case w.RULE:return this.ruleTransition(y,C);case w.PRECEDENCE:return this.precedenceTransition(y,C,S,R,L);case w.PREDICATE:return this.predTransition(y,C,S,R,L);case w.ACTION:return this.actionTransition(y,C);case w.EPSILON:return new l({state:C.target},y);case w.ATOM:case w.RANGE:case w.SET:return I&&C.matches(c.EOF,0,1)?new l({state:C.target},y):null;default:return null}}actionTransition(y,C){if(this.debug){let S=C.actionIndex===-1?65535:C.actionIndex;console.log("ACTION edge "+C.ruleIndex+":"+S);}return new l({state:C.target},y)}precedenceTransition(y,C,S,R,L){this.debug&&(console.log("PRED (collectPredicates="+S+") "+C.precedence+">=_p, ctx dependent=true"),this.parser!==null&&console.log("context surrounding pred is "+r.arrayToString(this.parser.getRuleInvocationStack())));let I=null;if(S&&R)if(L){let K=this._input.index;this._input.seek(this._startIndex);let j=C.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(K),j&&(I=new l({state:C.target},y));}else {let K=_.andContext(y.semanticContext,C.getPredicate());I=new l({state:C.target,semanticContext:K},y);}else I=new l({state:C.target},y);return this.debug&&console.log("config from pred transition="+I),I}predTransition(y,C,S,R,L){this.debug&&(console.log("PRED (collectPredicates="+S+") "+C.ruleIndex+":"+C.predIndex+", ctx dependent="+C.isCtxDependent),this.parser!==null&&console.log("context surrounding pred is "+r.arrayToString(this.parser.getRuleInvocationStack())));let I=null;if(S&&(C.isCtxDependent&&R||!C.isCtxDependent))if(L){let K=this._input.index;this._input.seek(this._startIndex);let j=C.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(K),j&&(I=new l({state:C.target},y));}else {let K=_.andContext(y.semanticContext,C.getPredicate());I=new l({state:C.target,semanticContext:K},y);}else I=new l({state:C.target},y);return this.debug&&console.log("config from pred transition="+I),I}ruleTransition(y,C){this.debug&&console.log("CALL rule "+this.getRuleName(C.target.ruleIndex)+", ctx="+y.context);let S=C.followState,R=te.create(y.context,S.stateNumber);return new l({state:C.target,context:R},y)}getConflictingAlts(y){let C=g.getConflictingAltSubsets(y);return g.getAlts(C)}getConflictingAltsOrUniqueAlt(y){let C=null;return y.uniqueAlt!==o.INVALID_ALT_NUMBER?(C=new s,C.add(y.uniqueAlt)):C=y.conflictingAlts,C}getTokenName(y){if(y===c.EOF)return "EOF";if(this.parser!==null&&this.parser.literalNames!==null)if(y>=this.parser.literalNames.length&&y>=this.parser.symbolicNames.length)console.log(""+y+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens());else return (this.parser.literalNames[y]||this.parser.symbolicNames[y])+"<"+y+">";return ""+y}getLookaheadName(y){return this.getTokenName(y.LA(1))}dumpDeadEndConfigs(y){console.log("dead end configs: ");let C=y.getDeadEndConfigs();for(let S=0;S<C.length;S++){let R=C[S],L="no edges";if(R.state.transitions.length>0){let I=R.state.transitions[0];I instanceof AtomTransition?L="Atom "+this.getTokenName(I.label):I instanceof D&&(L=(I instanceof N?"~":"")+"Set "+I.set);}console.error(R.toString(this.parser,!0)+":"+L);}}noViableAlt(y,C,S,R){return new Z(this.parser,y,y.get(R),y.LT(1),S,C)}getUniqueAlt(y){let C=o.INVALID_ALT_NUMBER;for(let S=0;S<y.items.length;S++){let R=y.items[S];if(C===o.INVALID_ALT_NUMBER)C=R.alt;else if(R.alt!==C)return o.INVALID_ALT_NUMBER}return C}addDFAEdge(y,C,S,R){if(this.debug&&console.log("EDGE "+C+" -> "+R+" upon "+this.getTokenName(S)),R===null)return null;if(R=this.addDFAState(y,R),C===null||S<-1||S>this.atn.maxTokenType)return R;if(C.edges===null&&(C.edges=[]),C.edges[S+1]=R,this.debug){let L=this.parser===null?null:this.parser.literalNames,I=this.parser===null?null:this.parser.symbolicNames;console.log(`DFA=
87
- `+y.toString(L,I));}return R}addDFAState(y,C){if(C===m.ERROR)return C;let S=y.states.get(C);return S!==null?S:(C.stateNumber=y.states.length,C.configs.readOnly||(C.configs.optimizeConfigs(this),C.configs.setReadonly(!0)),y.states.add(C),this.debug&&console.log("adding new DFA state: "+C),C)}reportAttemptingFullContext(y,C,S,R,L){if(this.debug||this.retry_debug){let I=new b(R,L+1);console.log("reportAttemptingFullContext decision="+y.decision+":"+S+", input="+this.parser.getTokenStream().getText(I));}this.parser!==null&&this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser,y,R,L,C,S);}reportContextSensitivity(y,C,S,R,L){if(this.debug||this.retry_debug){let I=new b(R,L+1);console.log("reportContextSensitivity decision="+y.decision+":"+S+", input="+this.parser.getTokenStream().getText(I));}this.parser!==null&&this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser,y,R,L,C,S);}reportAmbiguity(y,C,S,R,L,I,K){if(this.debug||this.retry_debug){let j=new b(S,R+1);console.log("reportAmbiguity "+I+":"+K+", input="+this.parser.getTokenStream().getText(j));}this.parser!==null&&this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser,y,S,R,L,I,K);}};e.exports=k;}),B8=re(t=>{t.ATN=ho(),t.ATNDeserializer=$b(),t.LexerATNSimulator=k8(),t.ParserATNSimulator=M8(),t.PredictionMode=Gb();}),Yb=re(()=>{String.prototype.codePointAt||function(){var t=function(){let r;try{let i={},s=Object.defineProperty;r=s(i,i,i)&&s;}catch(i){}return r}();let e=function(r){if(this==null)throw TypeError();let i=String(this),s=i.length,n=r?Number(r):0;if(n!==n&&(n=0),n<0||n>=s)return;let o=i.charCodeAt(n),a;return o>=55296&&o<=56319&&s>n+1&&(a=i.charCodeAt(n+1),a>=56320&&a<=57343)?(o-55296)*1024+a-56320+65536:o};t?t(String.prototype,"codePointAt",{value:e,configurable:!0,writable:!0}):String.prototype.codePointAt=e;}();}),Jl=re((t,e)=>{var r=class{constructor(s,n,o){this.dfa=s,this.literalNames=n||[],this.symbolicNames=o||[];}toString(){if(this.dfa.s0===null)return null;let s="",n=this.dfa.sortedStates();for(let o=0;o<n.length;o++){let a=n[o];if(a.edges!==null){let u=a.edges.length;for(let l=0;l<u;l++){let h=a.edges[l]||null;h!==null&&h.stateNumber!==2147483647&&(s=s.concat(this.getStateString(a)),s=s.concat("-"),s=s.concat(this.getEdgeLabel(l)),s=s.concat("->"),s=s.concat(this.getStateString(h)),s=s.concat(`
88
- `));}}}return s.length===0?null:s}getEdgeLabel(s){return s===0?"EOF":this.literalNames!==null||this.symbolicNames!==null?this.literalNames[s-1]||this.symbolicNames[s-1]:String.fromCharCode(s-1)}getStateString(s){let n=(s.isAcceptState?":":"")+"s"+s.stateNumber+(s.requiresFullContext?"^":"");return s.isAcceptState?s.predicates!==null?n+"=>"+s.predicates.toString():n+"=>"+s.prediction.toString():n}},i=class extends r{constructor(s){super(s,null);}getEdgeLabel(s){return "'"+String.fromCharCode(s)+"'"}};e.exports={DFASerializer:r,LexerDFASerializer:i};}),j8=re((t,e)=>{var{Set:r}=gr(),{DFAState:i}=Ka(),{StarLoopEntryState:s}=cn(),{ATNConfigSet:n}=fo(),{DFASerializer:o}=Jl(),{LexerDFASerializer:a}=Jl(),u=class{constructor(l,h){if(h===void 0&&(h=0),this.atnStartState=l,this.decision=h,this._states=new r,this.s0=null,this.precedenceDfa=!1,l instanceof s&&l.isPrecedenceDecision){this.precedenceDfa=!0;let c=new i(null,new n);c.edges=[],c.isAcceptState=!1,c.requiresFullContext=!1,this.s0=c;}}getPrecedenceStartState(l){if(!this.precedenceDfa)throw "Only precedence DFAs may contain a precedence start state.";return l<0||l>=this.s0.edges.length?null:this.s0.edges[l]||null}setPrecedenceStartState(l,h){if(!this.precedenceDfa)throw "Only precedence DFAs may contain a precedence start state.";l<0||(this.s0.edges[l]=h);}setPrecedenceDfa(l){if(this.precedenceDfa!==l){if(this._states=new r,l){let h=new i(null,new n);h.edges=[],h.isAcceptState=!1,h.requiresFullContext=!1,this.s0=h;}else this.s0=null;this.precedenceDfa=l;}}sortedStates(){return this._states.values().sort(function(h,c){return h.stateNumber-c.stateNumber})}toString(l,h){return l=l||null,h=h||null,this.s0===null?"":new o(this,l,h).toString()}toLexerString(){return this.s0===null?"":new a(this).toString()}get states(){return this._states}};e.exports=u;}),q8=re(t=>{t.DFA=j8(),t.DFASerializer=Jl().DFASerializer,t.LexerDFASerializer=Jl().LexerDFASerializer,t.PredPrediction=Ka().PredPrediction;}),Jb=re(()=>{String.fromCodePoint||function(){let t=function(){let s;try{let n={},o=Object.defineProperty;s=o(n,n,n)&&o;}catch(n){}return s}(),e=String.fromCharCode,r=Math.floor,i=function(s){let o=[],a,u,l=-1,h=arguments.length;if(!h)return "";let c="";for(;++l<h;){let d=Number(arguments[l]);if(!isFinite(d)||d<0||d>1114111||r(d)!==d)throw RangeError("Invalid code point: "+d);d<=65535?o.push(d):(d-=65536,a=(d>>10)+55296,u=d%1024+56320,o.push(a,u)),(l+1===h||o.length>16384)&&(c+=e.apply(null,o),o.length=0);}return c};t?t(String,"fromCodePoint",{value:i,configurable:!0,writable:!0}):String.fromCodePoint=i;}();}),H8=re((t,e)=>{var r=so(),i=qb();e.exports=Wl(Wl({},r),{Trees:i});}),U8=re((t,e)=>{var{BitSet:r}=gr(),{ErrorListener:i}=Yl(),{Interval:s}=Ar(),n=class extends i{constructor(o){super(),o=o||!0,this.exactOnly=o;}reportAmbiguity(o,a,u,l,h,c,d){if(this.exactOnly&&!h)return;let f="reportAmbiguity d="+this.getDecisionDescription(o,a)+": ambigAlts="+this.getConflictingAlts(c,d)+", input='"+o.getTokenStream().getText(new s(u,l))+"'";o.notifyErrorListeners(f);}reportAttemptingFullContext(o,a,u,l,h,c){let d="reportAttemptingFullContext d="+this.getDecisionDescription(o,a)+", input='"+o.getTokenStream().getText(new s(u,l))+"'";o.notifyErrorListeners(d);}reportContextSensitivity(o,a,u,l,h,c){let d="reportContextSensitivity d="+this.getDecisionDescription(o,a)+", input='"+o.getTokenStream().getText(new s(u,l))+"'";o.notifyErrorListeners(d);}getDecisionDescription(o,a){let u=a.decision,l=a.atnStartState.ruleIndex,h=o.ruleNames;if(l<0||l>=h.length)return ""+u;let c=h[l]||null;return c===null||c.length===0?""+u:`${u} (${c})`}getConflictingAlts(o,a){if(o!==null)return o;let u=new r;for(let l=0;l<a.items.length;l++)u.add(a.items[l].alt);return `{${u.values().join(", ")}}`}};e.exports=n;}),ep=re((t,e)=>{var{Token:r}=$t(),{NoViableAltException:i,InputMismatchException:s,FailedPredicateException:n,ParseCancellationException:o}=Xr(),{ATNState:a}=cn(),{Interval:u,IntervalSet:l}=Ar(),h=class{reset(f){}recoverInline(f){}recover(f,m){}sync(f){}inErrorRecoveryMode(f){}reportError(f){}},c=class extends h{constructor(){super(),this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.lastErrorStates=null,this.nextTokensContext=null,this.nextTokenState=0;}reset(f){this.endErrorCondition(f);}beginErrorCondition(f){this.errorRecoveryMode=!0;}inErrorRecoveryMode(f){return this.errorRecoveryMode}endErrorCondition(f){this.errorRecoveryMode=!1,this.lastErrorStates=null,this.lastErrorIndex=-1;}reportMatch(f){this.endErrorCondition(f);}reportError(f,m){this.inErrorRecoveryMode(f)||(this.beginErrorCondition(f),m instanceof i?this.reportNoViableAlternative(f,m):m instanceof s?this.reportInputMismatch(f,m):m instanceof n?this.reportFailedPredicate(f,m):(console.log("unknown recognition error type: "+m.constructor.name),console.log(m.stack),f.notifyErrorListeners(m.getOffendingToken(),m.getMessage(),m)));}recover(f,m){this.lastErrorIndex===f.getInputStream().index&&this.lastErrorStates!==null&&this.lastErrorStates.indexOf(f.state)>=0&&f.consume(),this.lastErrorIndex=f._input.index,this.lastErrorStates===null&&(this.lastErrorStates=[]),this.lastErrorStates.push(f.state);let g=this.getErrorRecoverySet(f);this.consumeUntil(f,g);}sync(f){if(this.inErrorRecoveryMode(f))return;let m=f._interp.atn.states[f.state],g=f.getTokenStream().LA(1),v=f.atn.nextTokens(m);if(v.contains(g)){this.nextTokensContext=null,this.nextTokenState=a.INVALID_STATE_NUMBER;return}else if(v.contains(r.EPSILON)){this.nextTokensContext===null&&(this.nextTokensContext=f._ctx,this.nextTokensState=f._stateNumber);return}switch(m.stateType){case a.BLOCK_START:case a.STAR_BLOCK_START:case a.PLUS_BLOCK_START:case a.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(f)!==null)return;throw new s(f);case a.PLUS_LOOP_BACK:case a.STAR_LOOP_BACK:this.reportUnwantedToken(f);let x=new l;x.addSet(f.getExpectedTokens());let _=x.addSet(this.getErrorRecoverySet(f));this.consumeUntil(f,_);break;}}reportNoViableAlternative(f,m){let g=f.getTokenStream(),v;g!==null?m.startToken.type===r.EOF?v="<EOF>":v=g.getText(new u(m.startToken.tokenIndex,m.offendingToken.tokenIndex)):v="<unknown input>";let x="no viable alternative at input "+this.escapeWSAndQuote(v);f.notifyErrorListeners(x,m.offendingToken,m);}reportInputMismatch(f,m){let g="mismatched input "+this.getTokenErrorDisplay(m.offendingToken)+" expecting "+m.getExpectedTokens().toString(f.literalNames,f.symbolicNames);f.notifyErrorListeners(g,m.offendingToken,m);}reportFailedPredicate(f,m){let v="rule "+f.ruleNames[f._ctx.ruleIndex]+" "+m.message;f.notifyErrorListeners(v,m.offendingToken,m);}reportUnwantedToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let m=f.getCurrentToken(),g=this.getTokenErrorDisplay(m),v=this.getExpectedTokens(f),x="extraneous input "+g+" expecting "+v.toString(f.literalNames,f.symbolicNames);f.notifyErrorListeners(x,m,null);}reportMissingToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let m=f.getCurrentToken(),v="missing "+this.getExpectedTokens(f).toString(f.literalNames,f.symbolicNames)+" at "+this.getTokenErrorDisplay(m);f.notifyErrorListeners(v,m,null);}recoverInline(f){let m=this.singleTokenDeletion(f);if(m!==null)return f.consume(),m;if(this.singleTokenInsertion(f))return this.getMissingSymbol(f);throw new s(f)}singleTokenInsertion(f){let m=f.getTokenStream().LA(1),g=f._interp.atn,x=g.states[f.state].transitions[0].target;return g.nextTokens(x,f._ctx).contains(m)?(this.reportMissingToken(f),!0):!1}singleTokenDeletion(f){let m=f.getTokenStream().LA(2);if(this.getExpectedTokens(f).contains(m)){this.reportUnwantedToken(f),f.consume();let v=f.getCurrentToken();return this.reportMatch(f),v}else return null}getMissingSymbol(f){let m=f.getCurrentToken(),v=this.getExpectedTokens(f).first(),x;v===r.EOF?x="<missing EOF>":x="<missing "+f.literalNames[v]+">";let _=m,E=f.getTokenStream().LT(-1);return _.type===r.EOF&&E!==null&&(_=E),f.getTokenFactory().create(_.source,v,x,r.DEFAULT_CHANNEL,-1,-1,_.line,_.column)}getExpectedTokens(f){return f.getExpectedTokens()}getTokenErrorDisplay(f){if(f===null)return "<no token>";let m=f.text;return m===null&&(f.type===r.EOF?m="<EOF>":m="<"+f.type+">"),this.escapeWSAndQuote(m)}escapeWSAndQuote(f){return f=f.replace(/\n/g,"\\n"),f=f.replace(/\r/g,"\\r"),f=f.replace(/\t/g,"\\t"),"'"+f+"'"}getErrorRecoverySet(f){let m=f._interp.atn,g=f._ctx,v=new l;for(;g!==null&&g.invokingState>=0;){let _=m.states[g.invokingState].transitions[0],E=m.nextTokens(_.followState);v.addSet(E),g=g.parentCtx;}return v.removeOne(r.EPSILON),v}consumeUntil(f,m){let g=f.getTokenStream().LA(1);for(;g!==r.EOF&&!m.contains(g);)f.consume(),g=f.getTokenStream().LA(1);}},d=class extends c{constructor(){super();}recover(f,m){let g=f._ctx;for(;g!==null;)g.exception=m,g=g.parentCtx;throw new o(m)}recoverInline(f){this.recover(f,new s(f));}sync(f){}};e.exports={BailErrorStrategy:d,DefaultErrorStrategy:c};}),V8=re((t,e)=>{e.exports.RecognitionException=Xr().RecognitionException,e.exports.NoViableAltException=Xr().NoViableAltException,e.exports.LexerNoViableAltException=Xr().LexerNoViableAltException,e.exports.InputMismatchException=Xr().InputMismatchException,e.exports.FailedPredicateException=Xr().FailedPredicateException,e.exports.DiagnosticErrorListener=U8(),e.exports.BailErrorStrategy=ep().BailErrorStrategy,e.exports.DefaultErrorStrategy=ep().DefaultErrorStrategy,e.exports.ErrorListener=Yl().ErrorListener;}),Bp=re((t,e)=>{var{Token:r}=$t();Yb(),Jb();var i=class{constructor(s,n){if(this.name="<empty>",this.strdata=s,this.decodeToUnicodeCodePoints=n||!1,this._index=0,this.data=[],this.decodeToUnicodeCodePoints)for(let o=0;o<this.strdata.length;){let a=this.strdata.codePointAt(o);this.data.push(a),o+=a<=65535?1:2;}else for(let o=0;o<this.strdata.length;o++){let a=this.strdata.charCodeAt(o);this.data.push(a);}this._size=this.data.length;}reset(){this._index=0;}consume(){if(this._index>=this._size)throw "cannot consume EOF";this._index+=1;}LA(s){if(s===0)return 0;s<0&&(s+=1);let n=this._index+s-1;return n<0||n>=this._size?r.EOF:this.data[n]}LT(s){return this.LA(s)}mark(){return -1}release(s){}seek(s){if(s<=this._index){this._index=s;return}this._index=Math.min(s,this._size);}getText(s,n){if(n>=this._size&&(n=this._size-1),s>=this._size)return "";if(this.decodeToUnicodeCodePoints){let o="";for(let a=s;a<=n;a++)o+=String.fromCodePoint(this.data[a]);return o}else return this.strdata.slice(s,n+1)}toString(){return this.strdata}get index(){return this._index}get size(){return this._size}};e.exports=i;}),$8=re((t,e)=>{var r=Bp(),i=ge("fs"),s={fromString:function(n){return new r(n,!0)},fromBlob:function(n,o,a,u){let l=new window.FileReader;l.onload=function(h){let c=new r(h.target.result,!0);a(c);},l.onerror=u,l.readAsText(n,o);},fromBuffer:function(n,o){return new r(n.toString(o),!0)},fromPath:function(n,o,a){i.readFile(n,o,function(u,l){let h=null;l!==null&&(h=new r(l,!0)),a(u,h);});},fromPathSync:function(n,o){let a=i.readFileSync(n,o);return new r(a,!0)}};e.exports=s;}),z8=re((t,e)=>{var r=Bp(),i=ge("fs"),s=class extends r{constructor(n,o){let a=i.readFileSync(n,"utf8");super(a,o),this.fileName=n;}};e.exports=s;}),K8=re((t,e)=>{var{Token:r}=$t(),i=_c(),{Interval:s}=Ar(),n=class{},o=class extends n{constructor(a){super(),this.tokenSource=a,this.tokens=[],this.index=-1,this.fetchedEOF=!1;}mark(){return 0}release(a){}reset(){this.seek(0);}seek(a){this.lazyInit(),this.index=this.adjustSeekIndex(a);}get(a){return this.lazyInit(),this.tokens[a]}consume(){let a=!1;if(this.index>=0?this.fetchedEOF?a=this.index<this.tokens.length-1:a=this.index<this.tokens.length:a=!1,!a&&this.LA(1)===r.EOF)throw "cannot consume EOF";this.sync(this.index+1)&&(this.index=this.adjustSeekIndex(this.index+1));}sync(a){let u=a-this.tokens.length+1;return u>0?this.fetch(u)>=u:!0}fetch(a){if(this.fetchedEOF)return 0;for(let u=0;u<a;u++){let l=this.tokenSource.nextToken();if(l.tokenIndex=this.tokens.length,this.tokens.push(l),l.type===r.EOF)return this.fetchedEOF=!0,u+1}return a}getTokens(a,u,l){if(l===void 0&&(l=null),a<0||u<0)return null;this.lazyInit();let h=[];u>=this.tokens.length&&(u=this.tokens.length-1);for(let c=a;c<u;c++){let d=this.tokens[c];if(d.type===r.EOF)break;(l===null||l.contains(d.type))&&h.push(d);}return h}LA(a){return this.LT(a).type}LB(a){return this.index-a<0?null:this.tokens[this.index-a]}LT(a){if(this.lazyInit(),a===0)return null;if(a<0)return this.LB(-a);let u=this.index+a-1;return this.sync(u),u>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[u]}adjustSeekIndex(a){return a}lazyInit(){this.index===-1&&this.setup();}setup(){this.sync(0),this.index=this.adjustSeekIndex(0);}setTokenSource(a){this.tokenSource=a,this.tokens=[],this.index=-1,this.fetchedEOF=!1;}nextTokenOnChannel(a,u){if(this.sync(a),a>=this.tokens.length)return -1;let l=this.tokens[a];for(;l.channel!==this.channel;){if(l.type===r.EOF)return -1;a+=1,this.sync(a),l=this.tokens[a];}return a}previousTokenOnChannel(a,u){for(;a>=0&&this.tokens[a].channel!==u;)a-=1;return a}getHiddenTokensToRight(a,u){if(u===void 0&&(u=-1),this.lazyInit(),a<0||a>=this.tokens.length)throw ""+a+" not in 0.."+this.tokens.length-1;let l=this.nextTokenOnChannel(a+1,i.DEFAULT_TOKEN_CHANNEL),h=a+1,c=l===-1?this.tokens.length-1:l;return this.filterForChannel(h,c,u)}getHiddenTokensToLeft(a,u){if(u===void 0&&(u=-1),this.lazyInit(),a<0||a>=this.tokens.length)throw ""+a+" not in 0.."+this.tokens.length-1;let l=this.previousTokenOnChannel(a-1,i.DEFAULT_TOKEN_CHANNEL);if(l===a-1)return null;let h=l+1,c=a-1;return this.filterForChannel(h,c,u)}filterForChannel(a,u,l){let h=[];for(let c=a;c<u+1;c++){let d=this.tokens[c];l===-1?d.channel!==i.DEFAULT_TOKEN_CHANNEL&&h.push(d):d.channel===l&&h.push(d);}return h.length===0?null:h}getSourceName(){return this.tokenSource.getSourceName()}getText(a){this.lazyInit(),this.fill(),a==null&&(a=new s(0,this.tokens.length-1));let u=a.start;u instanceof r&&(u=u.tokenIndex);let l=a.stop;if(l instanceof r&&(l=l.tokenIndex),u===null||l===null||u<0||l<0)return "";l>=this.tokens.length&&(l=this.tokens.length-1);let h="";for(let c=u;c<l+1;c++){let d=this.tokens[c];if(d.type===r.EOF)break;h=h+d.text;}return h}fill(){for(this.lazyInit();this.fetch(1e3)===1e3;);}};e.exports=o;}),G8=re((t,e)=>{var r=$t().Token,i=K8(),s=class extends i{constructor(n,o){super(n),this.channel=o===void 0?r.DEFAULT_CHANNEL:o;}adjustSeekIndex(n){return this.nextTokenOnChannel(n,this.channel)}LB(n){if(n===0||this.index-n<0)return null;let o=this.index,a=1;for(;a<=n;)o=this.previousTokenOnChannel(o-1,this.channel),a+=1;return o<0?null:this.tokens[o]}LT(n){if(this.lazyInit(),n===0)return null;if(n<0)return this.LB(-n);let o=this.index,a=1;for(;a<n;)this.sync(o+1)&&(o=this.nextTokenOnChannel(o+1,this.channel)),a+=1;return this.tokens[o]}getNumberOfOnChannelTokens(){let n=0;this.fill();for(let o=0;o<this.tokens.length;o++){let a=this.tokens[o];if(a.channel===this.channel&&(n+=1),a.type===r.EOF)break}return n}};e.exports=s;}),W8=re((t,e)=>{var{Token:r}=$t(),{ParseTreeListener:i,TerminalNode:s,ErrorNode:n}=so(),o=zb(),{DefaultErrorStrategy:a}=ep(),u=$b(),l=Ub(),h=_c(),c=class extends i{constructor(f){super(),this.parser=f;}enterEveryRule(f){console.log("enter "+this.parser.ruleNames[f.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text);}visitTerminal(f){console.log("consume "+f.symbol+" rule "+this.parser.ruleNames[this.parser._ctx.ruleIndex]);}exitEveryRule(f){console.log("exit "+this.parser.ruleNames[f.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text);}},d=class extends o{constructor(f){super(),this._input=null,this._errHandler=new a,this._precedenceStack=[],this._precedenceStack.push(0),this._ctx=null,this.buildParseTrees=!0,this._tracer=null,this._parseListeners=null,this._syntaxErrors=0,this.setInputStream(f);}reset(){this._input!==null&&this._input.seek(0),this._errHandler.reset(this),this._ctx=null,this._syntaxErrors=0,this.setTrace(!1),this._precedenceStack=[],this._precedenceStack.push(0),this._interp!==null&&this._interp.reset();}match(f){let m=this.getCurrentToken();return m.type===f?(this._errHandler.reportMatch(this),this.consume()):(m=this._errHandler.recoverInline(this),this.buildParseTrees&&m.tokenIndex===-1&&this._ctx.addErrorNode(m)),m}matchWildcard(){let f=this.getCurrentToken();return f.type>0?(this._errHandler.reportMatch(this),this.consume()):(f=this._errHandler.recoverInline(this),this._buildParseTrees&&f.tokenIndex===-1&&this._ctx.addErrorNode(f)),f}getParseListeners(){return this._parseListeners||[]}addParseListener(f){if(f===null)throw "listener";this._parseListeners===null&&(this._parseListeners=[]),this._parseListeners.push(f);}removeParseListener(f){if(this._parseListeners!==null){let m=this._parseListeners.indexOf(f);m>=0&&this._parseListeners.splice(m,1),this._parseListeners.length===0&&(this._parseListeners=null);}}removeParseListeners(){this._parseListeners=null;}triggerEnterRuleEvent(){if(this._parseListeners!==null){let f=this._ctx;this._parseListeners.map(function(m){m.enterEveryRule(f),f.enterRule(m);});}}triggerExitRuleEvent(){if(this._parseListeners!==null){let f=this._ctx;this._parseListeners.slice(0).reverse().map(function(m){f.exitRule(m),m.exitEveryRule(f);});}}getTokenFactory(){return this._input.tokenSource._factory}setTokenFactory(f){this._input.tokenSource._factory=f;}getATNWithBypassAlts(){let f=this.getSerializedATN();if(f===null)throw "The current parser does not support an ATN with bypass alternatives.";let m=this.bypassAltsAtnCache[f];if(m===null){let g=new l;g.generateRuleBypassTransitions=!0,m=new u(g).deserialize(f),this.bypassAltsAtnCache[f]=m;}return m}compileParseTreePattern(f,m,g){if(g=g||null,g===null&&this.getTokenStream()!==null){let x=this.getTokenStream().tokenSource;x instanceof h&&(g=x);}if(g===null)throw "Parser can't discover a lexer to use";return new ParseTreePatternMatcher(g,this).compile(f,m)}getInputStream(){return this.getTokenStream()}setInputStream(f){this.setTokenStream(f);}getTokenStream(){return this._input}setTokenStream(f){this._input=null,this.reset(),this._input=f;}getCurrentToken(){return this._input.LT(1)}notifyErrorListeners(f,m,g){m=m||null,g=g||null,m===null&&(m=this.getCurrentToken()),this._syntaxErrors+=1;let v=m.line,x=m.column;this.getErrorListenerDispatch().syntaxError(this,m,v,x,f,g);}consume(){let f=this.getCurrentToken();f.type!==r.EOF&&this.getInputStream().consume();let m=this._parseListeners!==null&&this._parseListeners.length>0;if(this.buildParseTrees||m){let g;this._errHandler.inErrorRecoveryMode(this)?g=this._ctx.addErrorNode(f):g=this._ctx.addTokenNode(f),g.invokingState=this.state,m&&this._parseListeners.map(function(v){g instanceof n||g.isErrorNode!==void 0&&g.isErrorNode()?v.visitErrorNode(g):g instanceof s&&v.visitTerminal(g);});}return f}addContextToParseTree(){this._ctx.parentCtx!==null&&this._ctx.parentCtx.addChild(this._ctx);}enterRule(f,m,g){this.state=m,this._ctx=f,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),this._parseListeners!==null&&this.triggerEnterRuleEvent();}exitRule(){this._ctx.stop=this._input.LT(-1),this._parseListeners!==null&&this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx;}enterOuterAlt(f,m){f.setAltNumber(m),this.buildParseTrees&&this._ctx!==f&&this._ctx.parentCtx!==null&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(f)),this._ctx=f;}getPrecedence(){return this._precedenceStack.length===0?-1:this._precedenceStack[this._precedenceStack.length-1]}enterRecursionRule(f,m,g,v){this.state=m,this._precedenceStack.push(v),this._ctx=f,this._ctx.start=this._input.LT(1),this._parseListeners!==null&&this.triggerEnterRuleEvent();}pushNewRecursionContext(f,m,g){let v=this._ctx;v.parentCtx=f,v.invokingState=m,v.stop=this._input.LT(-1),this._ctx=f,this._ctx.start=v.start,this.buildParseTrees&&this._ctx.addChild(v),this._parseListeners!==null&&this.triggerEnterRuleEvent();}unrollRecursionContexts(f){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);let m=this._ctx;if(this._parseListeners!==null)for(;this._ctx!==f;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=f;m.parentCtx=f,this.buildParseTrees&&f!==null&&f.addChild(m);}getInvokingContext(f){let m=this._ctx;for(;m!==null;){if(m.ruleIndex===f)return m;m=m.parentCtx;}return null}precpred(f,m){return m>=this._precedenceStack[this._precedenceStack.length-1]}inContext(f){return !1}isExpectedToken(f){let m=this._interp.atn,g=this._ctx,v=m.states[this.state],x=m.nextTokens(v);if(x.contains(f))return !0;if(!x.contains(r.EPSILON))return !1;for(;g!==null&&g.invokingState>=0&&x.contains(r.EPSILON);){let E=m.states[g.invokingState].transitions[0];if(x=m.nextTokens(E.followState),x.contains(f))return !0;g=g.parentCtx;}return !!(x.contains(r.EPSILON)&&f===r.EOF)}getExpectedTokens(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}getExpectedTokensWithinCurrentRule(){let f=this._interp.atn,m=f.states[this.state];return f.nextTokens(m)}getRuleIndex(f){let m=this.getRuleIndexMap()[f];return m!==null?m:-1}getRuleInvocationStack(f){f=f||null,f===null&&(f=this._ctx);let m=[];for(;f!==null;){let g=f.ruleIndex;g<0?m.push("n/a"):m.push(this.ruleNames[g]),f=f.parentCtx;}return m}getDFAStrings(){return this._interp.decisionToDFA.toString()}dumpDFA(){let f=!1;for(let m=0;m<this._interp.decisionToDFA.length;m++){let g=this._interp.decisionToDFA[m];g.states.length>0&&(f&&console.log(),this.printer.println("Decision "+g.decision+":"),this.printer.print(g.toString(this.literalNames,this.symbolicNames)),f=!0);}}getSourceName(){return this._input.sourceName}setTrace(f){f?(this._tracer!==null&&this.removeParseListener(this._tracer),this._tracer=new c(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null);}};d.bypassAltsAtnCache={},e.exports=d;}),Y8=re(t=>{t.atn=B8(),t.codepointat=Yb(),t.dfa=q8(),t.fromcodepoint=Jb(),t.tree=H8(),t.error=V8(),t.Token=$t().Token,t.CharStreams=$8(),t.CommonToken=$t().CommonToken,t.InputStream=Bp(),t.FileStream=z8(),t.CommonTokenStream=G8(),t.Lexer=_c(),t.Parser=W8();var e=Xi();t.PredictionContextCache=e.PredictionContextCache,t.ParserRuleContext=Wb(),t.Interval=Ar().Interval,t.IntervalSet=Ar().IntervalSet,t.Utils=gr(),t.LL1Analyzer=Hb().LL1Analyzer;}),J8=re((t,e)=>{e.exports="./Solidity-LWZUP6Z4.tokens";}),Z8=re((t,e)=>{typeof BROWSER!="undefined"?e.exports=J8():e.exports=ge("fs").readFileSync(ge("path").join(__dirname,"./antlr/Solidity.tokens")).toString();});hb(Jp);p7(Jp,{ParserError:()=>zE,parse:()=>wI,tokenize:()=>AI,visit:()=>bp});var tp=jt(O8()),X8=jt(pc()),Q8=jt(ln()),eI=jt(hc()),tI=jt(un()),Zb=jt(ei()),ir=class extends Q8.Lexer{get vocabulary(){return ir.VOCABULARY}constructor(t){super(t),this._interp=new eI.LexerATNSimulator(ir._ATN,this);}get grammarFileName(){return "Solidity.g4"}get ruleNames(){return ir.ruleNames}get serializedATN(){return ir._serializedATN}get channelNames(){return ir.channelNames}get modeNames(){return ir.modeNames}static get _ATN(){return ir.__ATN||(ir.__ATN=new X8.ATNDeserializer().deserialize(Zb.toCharArray(ir._serializedATN))),ir.__ATN}},ue=ir;ue.T__0=1;ue.T__1=2;ue.T__2=3;ue.T__3=4;ue.T__4=5;ue.T__5=6;ue.T__6=7;ue.T__7=8;ue.T__8=9;ue.T__9=10;ue.T__10=11;ue.T__11=12;ue.T__12=13;ue.T__13=14;ue.T__14=15;ue.T__15=16;ue.T__16=17;ue.T__17=18;ue.T__18=19;ue.T__19=20;ue.T__20=21;ue.T__21=22;ue.T__22=23;ue.T__23=24;ue.T__24=25;ue.T__25=26;ue.T__26=27;ue.T__27=28;ue.T__28=29;ue.T__29=30;ue.T__30=31;ue.T__31=32;ue.T__32=33;ue.T__33=34;ue.T__34=35;ue.T__35=36;ue.T__36=37;ue.T__37=38;ue.T__38=39;ue.T__39=40;ue.T__40=41;ue.T__41=42;ue.T__42=43;ue.T__43=44;ue.T__44=45;ue.T__45=46;ue.T__46=47;ue.T__47=48;ue.T__48=49;ue.T__49=50;ue.T__50=51;ue.T__51=52;ue.T__52=53;ue.T__53=54;ue.T__54=55;ue.T__55=56;ue.T__56=57;ue.T__57=58;ue.T__58=59;ue.T__59=60;ue.T__60=61;ue.T__61=62;ue.T__62=63;ue.T__63=64;ue.T__64=65;ue.T__65=66;ue.T__66=67;ue.T__67=68;ue.T__68=69;ue.T__69=70;ue.T__70=71;ue.T__71=72;ue.T__72=73;ue.T__73=74;ue.T__74=75;ue.T__75=76;ue.T__76=77;ue.T__77=78;ue.T__78=79;ue.T__79=80;ue.T__80=81;ue.T__81=82;ue.T__82=83;ue.T__83=84;ue.T__84=85;ue.T__85=86;ue.T__86=87;ue.T__87=88;ue.T__88=89;ue.T__89=90;ue.T__90=91;ue.T__91=92;ue.T__92=93;ue.T__93=94;ue.T__94=95;ue.T__95=96;ue.Int=97;ue.Uint=98;ue.Byte=99;ue.Fixed=100;ue.Ufixed=101;ue.BooleanLiteral=102;ue.DecimalNumber=103;ue.HexNumber=104;ue.NumberUnit=105;ue.HexLiteralFragment=106;ue.ReservedKeyword=107;ue.AnonymousKeyword=108;ue.BreakKeyword=109;ue.ConstantKeyword=110;ue.ImmutableKeyword=111;ue.ContinueKeyword=112;ue.LeaveKeyword=113;ue.ExternalKeyword=114;ue.IndexedKeyword=115;ue.InternalKeyword=116;ue.PayableKeyword=117;ue.PrivateKeyword=118;ue.PublicKeyword=119;ue.VirtualKeyword=120;ue.PureKeyword=121;ue.TypeKeyword=122;ue.ViewKeyword=123;ue.GlobalKeyword=124;ue.ConstructorKeyword=125;ue.FallbackKeyword=126;ue.ReceiveKeyword=127;ue.Identifier=128;ue.StringLiteralFragment=129;ue.VersionLiteral=130;ue.WS=131;ue.COMMENT=132;ue.LINE_COMMENT=133;ue.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"];ue.modeNames=["DEFAULT_MODE"];ue.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","T__32","T__33","T__34","T__35","T__36","T__37","T__38","T__39","T__40","T__41","T__42","T__43","T__44","T__45","T__46","T__47","T__48","T__49","T__50","T__51","T__52","T__53","T__54","T__55","T__56","T__57","T__58","T__59","T__60","T__61","T__62","T__63","T__64","T__65","T__66","T__67","T__68","T__69","T__70","T__71","T__72","T__73","T__74","T__75","T__76","T__77","T__78","T__79","T__80","T__81","T__82","T__83","T__84","T__85","T__86","T__87","T__88","T__89","T__90","T__91","T__92","T__93","T__94","T__95","Int","Uint","Byte","Fixed","Ufixed","NumberOfBits","NumberOfBytes","BooleanLiteral","DecimalNumber","DecimalDigits","HexNumber","HexDigits","NumberUnit","HexLiteralFragment","HexCharacter","ReservedKeyword","AnonymousKeyword","BreakKeyword","ConstantKeyword","ImmutableKeyword","ContinueKeyword","LeaveKeyword","ExternalKeyword","IndexedKeyword","InternalKeyword","PayableKeyword","PrivateKeyword","PublicKeyword","VirtualKeyword","PureKeyword","TypeKeyword","ViewKeyword","GlobalKeyword","ConstructorKeyword","FallbackKeyword","ReceiveKeyword","Identifier","IdentifierStart","IdentifierPart","StringLiteralFragment","DoubleQuotedStringCharacter","SingleQuotedStringCharacter","VersionLiteral","WS","COMMENT","LINE_COMMENT"];ue._LITERAL_NAMES=[void 0,"'pragma'","';'","'*'","'||'","'^'","'~'","'>='","'>'","'<'","'<='","'='","'as'","'import'","'from'","'{'","','","'}'","'abstract'","'contract'","'interface'","'library'","'is'","'('","')'","'error'","'using'","'for'","'|'","'&'","'+'","'-'","'/'","'%'","'=='","'!='","'struct'","'modifier'","'function'","'returns'","'event'","'enum'","'['","']'","'address'","'.'","'mapping'","'=>'","'memory'","'storage'","'calldata'","'if'","'else'","'try'","'catch'","'while'","'unchecked'","'assembly'","'do'","'return'","'throw'","'emit'","'revert'","'var'","'bool'","'string'","'byte'","'++'","'--'","'new'","':'","'delete'","'!'","'**'","'<<'","'>>'","'&&'","'?'","'|='","'^='","'&='","'<<='","'>>='","'+='","'-='","'*='","'/='","'%='","'let'","':='","'=:'","'switch'","'case'","'default'","'->'","'callback'","'override'",void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"'anonymous'","'break'","'constant'","'immutable'","'continue'","'leave'","'external'","'indexed'","'internal'","'payable'","'private'","'public'","'virtual'","'pure'","'type'","'view'","'global'","'constructor'","'fallback'","'receive'"];ue._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,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,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,"Int","Uint","Byte","Fixed","Ufixed","BooleanLiteral","DecimalNumber","HexNumber","NumberUnit","HexLiteralFragment","ReservedKeyword","AnonymousKeyword","BreakKeyword","ConstantKeyword","ImmutableKeyword","ContinueKeyword","LeaveKeyword","ExternalKeyword","IndexedKeyword","InternalKeyword","PayableKeyword","PrivateKeyword","PublicKeyword","VirtualKeyword","PureKeyword","TypeKeyword","ViewKeyword","GlobalKeyword","ConstructorKeyword","FallbackKeyword","ReceiveKeyword","Identifier","StringLiteralFragment","VersionLiteral","WS","COMMENT","LINE_COMMENT"];ue.VOCABULARY=new tI.VocabularyImpl(ir._LITERAL_NAMES,ir._SYMBOLIC_NAMES,[]);ue._serializedATNSegments=3;ue._serializedATNSegment0=`\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x87\u053A\b     \x07 \x07\b \b 
86
+ `,E)),E.context===null||E.context.hasEmptyPath()){if(E.context===null||E.context.isEmpty())return b.add(E),!0;b.add(new c({state:E.state,context:u.EMPTY},E)),w=!0;}if(E.context!==null&&!E.context.isEmpty()){for(let U=0;U<E.context.length;U++)if(E.context.getReturnState(U)!==u.EMPTY_RETURN_STATE){let Z=E.context.getParent(U),re=this.atn.states[E.context.getReturnState(U)];F=new c({state:re,context:Z},E),w=this.closure(_,F,b,w,D,N);}}return w}E.state.epsilonOnlyTransitions||(!w||!E.passedThroughNonGreedyDecision)&&b.add(E);for(let U=0;U<E.state.transitions.length;U++){let Z=E.state.transitions[U];F=this.getEpsilonTarget(_,E,Z,b,D,N),F!==null&&(w=this.closure(_,F,b,w,D,N));}return w}getEpsilonTarget(_,E,b,w,D,N){let F=null;if(b.serializationType===d.RULE){let U=l.create(E.context,b.followState.stateNumber);F=new c({state:b.target,context:U},E);}else {if(b.serializationType===d.PRECEDENCE)throw "Precedence predicates are not supported in lexers.";if(b.serializationType===d.PREDICATE)x.debug&&console.log("EVAL rule "+b.ruleIndex+":"+b.predIndex),w.hasSemanticContext=!0,this.evaluatePredicate(_,b.ruleIndex,b.predIndex,D)&&(F=new c({state:b.target},E));else if(b.serializationType===d.ACTION)if(E.context===null||E.context.hasEmptyPath()){let U=f.append(E.lexerActionExecutor,this.atn.lexerActions[b.actionIndex]);F=new c({state:b.target,lexerActionExecutor:U},E);}else F=new c({state:b.target},E);else b.serializationType===d.EPSILON?F=new c({state:b.target},E):(b.serializationType===d.ATOM||b.serializationType===d.RANGE||b.serializationType===d.SET)&&N&&b.matches(r.EOF,0,i.MAX_CHAR_VALUE)&&(F=new c({state:b.target},E));}return F}evaluatePredicate(_,E,b,w){if(this.recog===null)return !0;if(!w)return this.recog.sempred(null,E,b);let D=this.column,N=this.line,F=_.index,U=_.mark();try{return this.consume(_),this.recog.sempred(null,E,b)}finally{this.column=D,this.line=N,_.seek(F),_.release(U);}}captureSimState(_,E,b){_.index=E.index,_.line=this.line,_.column=this.column,_.dfaState=b;}addDFAEdge(_,E,b,w){if(b===void 0&&(b=null),w===void 0&&(w=null),b===null&&w!==null){let D=w.hasSemanticContext;if(w.hasSemanticContext=!1,b=this.addDFAState(w),D)return b}return E<x.MIN_DFA_EDGE||E>x.MAX_DFA_EDGE||(x.debug&&console.log("EDGE "+_+" -> "+b+" upon "+E),_.edges===null&&(_.edges=[]),_.edges[E-x.MIN_DFA_EDGE]=b),b}addDFAState(_){let E=new o(null,_),b=null;for(let F=0;F<_.items.length;F++){let U=_.items[F];if(U.state instanceof h){b=U;break}}b!==null&&(E.isAcceptState=!0,E.lexerActionExecutor=b.lexerActionExecutor,E.prediction=this.atn.ruleToTokenType[b.state.ruleIndex]);let w=this.decisionToDFA[this.mode],D=w.states.get(E);if(D!==null)return D;let N=E;return N.stateNumber=w.states.length,_.setReadonly(!0),N.configs=_,w.states.add(N),N}getDFA(_){return this.decisionToDFA[_]}getText(_){return _.getText(this.startIndex,_.index-1)}consume(_){_.LA(1)===10?(this.line+=1,this.column=0):this.column+=1,_.consume();}getTokenName(_){return _===-1?"EOF":"'"+String.fromCharCode(_)+"'"}};x.debug=!1,x.dfa_debug=!1,x.MIN_DFA_EDGE=0,x.MAX_DFA_EDGE=127,x.match_calls=0,e.exports=x;}),Gb=te((t,e)=>{var{Map:r,BitSet:i,AltDict:s,hashStuff:n}=gr(),o=ho(),{RuleStopState:a}=cn(),{ATNConfigSet:u}=fo(),{ATNConfig:l}=gc(),{SemanticContext:h}=$a(),c={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(d,f){if(c.allConfigsInRuleStopStates(f))return !0;if(d===c.SLL&&f.hasSemanticContext){let g=new u;for(let v=0;v<f.items.length;v++){let x=f.items[v];x=new l({semanticContext:h.NONE},x),g.add(x);}f=g;}let m=c.getConflictingAltSubsets(f);return c.hasConflictingAltSet(m)&&!c.hasStateAssociatedWithOneAlt(f)},hasConfigInRuleStopState:function(d){for(let f=0;f<d.items.length;f++)if(d.items[f].state instanceof a)return !0;return !1},allConfigsInRuleStopStates:function(d){for(let f=0;f<d.items.length;f++)if(!(d.items[f].state instanceof a))return !1;return !0},resolvesToJustOneViableAlt:function(d){return c.getSingleViableAlt(d)},allSubsetsConflict:function(d){return !c.hasNonConflictingAltSet(d)},hasNonConflictingAltSet:function(d){for(let f=0;f<d.length;f++)if(d[f].length===1)return !0;return !1},hasConflictingAltSet:function(d){for(let f=0;f<d.length;f++)if(d[f].length>1)return !0;return !1},allSubsetsEqual:function(d){let f=null;for(let m=0;m<d.length;m++){let g=d[m];if(f===null)f=g;else if(g!==f)return !1}return !0},getUniqueAlt:function(d){let f=c.getAlts(d);return f.length===1?f.minValue():o.INVALID_ALT_NUMBER},getAlts:function(d){let f=new i;return d.map(function(m){f.or(m);}),f},getConflictingAltSubsets:function(d){let f=new r;return f.hashFunction=function(m){n(m.state.stateNumber,m.context);},f.equalsFunction=function(m,g){return m.state.stateNumber===g.state.stateNumber&&m.context.equals(g.context)},d.items.map(function(m){let g=f.get(m);g===null&&(g=new i,f.put(m,g)),g.add(m.alt);}),f.getValues()},getStateToAltMap:function(d){let f=new s;return d.items.map(function(m){let g=f.get(m.state);g===null&&(g=new i,f.put(m.state,g)),g.add(m.alt);}),f},hasStateAssociatedWithOneAlt:function(d){let f=c.getStateToAltMap(d).values();for(let m=0;m<f.length;m++)if(f[m].length===1)return !0;return !1},getSingleViableAlt:function(d){let f=null;for(let m=0;m<d.length;m++){let v=d[m].minValue();if(f===null)f=v;else if(f!==v)return o.INVALID_ALT_NUMBER}return f}};e.exports=c;}),Wb=te((t,e)=>{var r=Mp(),i=so(),s=i.INVALID_INTERVAL,n=i.TerminalNode,o=i.TerminalNodeImpl,a=i.ErrorNodeImpl,u=Ar().Interval,l=class extends r{constructor(h,c){h=h||null,c=c||null,super(h,c),this.ruleIndex=-1,this.children=null,this.start=null,this.stop=null,this.exception=null;}copyFrom(h){this.parentCtx=h.parentCtx,this.invokingState=h.invokingState,this.children=null,this.start=h.start,this.stop=h.stop,h.children&&(this.children=[],h.children.map(function(c){c instanceof a&&(this.children.push(c),c.parentCtx=this);},this));}enterRule(h){}exitRule(h){}addChild(h){return this.children===null&&(this.children=[]),this.children.push(h),h}removeLastChild(){this.children!==null&&this.children.pop();}addTokenNode(h){let c=new o(h);return this.addChild(c),c.parentCtx=this,c}addErrorNode(h){let c=new a(h);return this.addChild(c),c.parentCtx=this,c}getChild(h,c){if(c=c||null,this.children===null||h<0||h>=this.children.length)return null;if(c===null)return this.children[h];for(let d=0;d<this.children.length;d++){let f=this.children[d];if(f instanceof c){if(h===0)return f;h-=1;}}return null}getToken(h,c){if(this.children===null||c<0||c>=this.children.length)return null;for(let d=0;d<this.children.length;d++){let f=this.children[d];if(f instanceof n&&f.symbol.type===h){if(c===0)return f;c-=1;}}return null}getTokens(h){if(this.children===null)return [];{let c=[];for(let d=0;d<this.children.length;d++){let f=this.children[d];f instanceof n&&f.symbol.type===h&&c.push(f);}return c}}getTypedRuleContext(h,c){return this.getChild(c,h)}getTypedRuleContexts(h){if(this.children===null)return [];{let c=[];for(let d=0;d<this.children.length;d++){let f=this.children[d];f instanceof h&&c.push(f);}return c}}getChildCount(){return this.children===null?0:this.children.length}getSourceInterval(){return this.start===null||this.stop===null?s:new u(this.start.tokenIndex,this.stop.tokenIndex)}};r.EMPTY=new l,e.exports=l;}),M8=te((t,e)=>{var r=gr(),{Set:i,BitSet:s,DoubleDict:n}=r,o=ho(),{ATNState:a,RuleStopState:u}=cn(),{ATNConfig:l}=gc(),{ATNConfigSet:h}=fo(),{Token:c}=$t(),{DFAState:d,PredPrediction:f}=Ka(),m=Kb(),g=Gb(),v=Mp();Wb();var {SemanticContext:_}=$a(),{PredictionContext:E}=Xi(),{Interval:b}=Ar(),{Transition:w,SetTransition:D,NotSetTransition:N,RuleTransition:F,ActionTransition:U}=za(),{NoViableAltException:Z}=Xr(),{SingletonPredictionContext:re,predictionContextFromRuleContext:ae}=Xi(),k=class extends m{constructor(y,C,S,R){super(C,R),this.parser=y,this.decisionToDFA=S,this.predictionMode=g.LL,this._input=null,this._startIndex=0,this._outerContext=null,this._dfa=null,this.mergeCache=null,this.debug=!1,this.debug_closure=!1,this.debug_add=!1,this.debug_list_atn_decisions=!1,this.dfa_debug=!1,this.retry_debug=!1;}reset(){}adaptivePredict(y,C,S){(this.debug||this.debug_list_atn_decisions)&&console.log("adaptivePredict decision "+C+" exec LA(1)=="+this.getLookaheadName(y)+" line "+y.LT(1).line+":"+y.LT(1).column),this._input=y,this._startIndex=y.index,this._outerContext=S;let R=this.decisionToDFA[C];this._dfa=R;let L=y.mark(),I=y.index;try{let K;if(R.precedenceDfa?K=R.getPrecedenceStartState(this.parser.getPrecedence()):K=R.s0,K===null){S===null&&(S=v.EMPTY),(this.debug||this.debug_list_atn_decisions)&&console.log("predictATN decision "+R.decision+" exec LA(1)=="+this.getLookaheadName(y)+", outerContext="+S.toString(this.parser.ruleNames));let q=this.computeStartState(R.atnStartState,v.EMPTY,!1);R.precedenceDfa?(R.s0.configs=q,q=this.applyPrecedenceFilter(q),K=this.addDFAState(R,new d(null,q)),R.setPrecedenceStartState(this.parser.getPrecedence(),K)):(K=this.addDFAState(R,new d(null,q)),R.s0=K);}let j=this.execATN(R,K,y,I,S);return this.debug&&console.log("DFA after predictATN: "+R.toString(this.parser.literalNames)),j}finally{this._dfa=null,this.mergeCache=null,y.seek(I),y.release(L);}}execATN(y,C,S,R,L){(this.debug||this.debug_list_atn_decisions)&&console.log("execATN decision "+y.decision+" exec LA(1)=="+this.getLookaheadName(S)+" line "+S.LT(1).line+":"+S.LT(1).column);let I,K=C;this.debug&&console.log("s0 = "+C);let j=S.LA(1);for(;;){let A=this.getExistingTargetState(K,j);if(A===null&&(A=this.computeTargetState(y,K,j)),A===m.ERROR){let q=this.noViableAlt(S,L,K.configs,R);if(S.seek(R),I=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(K.configs,L),I!==o.INVALID_ALT_NUMBER)return I;throw q}if(A.requiresFullContext&&this.predictionMode!==g.SLL){let q=null;if(A.predicates!==null){this.debug&&console.log("DFA state has preds in DFA sim LL failover");let P=S.index;if(P!==R&&S.seek(R),q=this.evalSemanticContext(A.predicates,L,!0),q.length===1)return this.debug&&console.log("Full LL avoided"),q.minValue();P!==R&&S.seek(P);}this.dfa_debug&&console.log("ctx sensitive state "+L+" in "+A);let T=this.computeStartState(y.atnStartState,L,!0);return this.reportAttemptingFullContext(y,q,A.configs,R,S.index),I=this.execATNWithFullContext(y,A,T,S,R,L),I}if(A.isAcceptState){if(A.predicates===null)return A.prediction;let q=S.index;S.seek(R);let B=this.evalSemanticContext(A.predicates,L,!0);if(B.length===0)throw this.noViableAlt(S,L,A.configs,R);return B.length===1||this.reportAmbiguity(y,A,R,q,!1,B,A.configs),B.minValue()}K=A,j!==c.EOF&&(S.consume(),j=S.LA(1));}}getExistingTargetState(y,C){let S=y.edges;return S===null?null:S[C+1]||null}computeTargetState(y,C,S){let R=this.computeReachSet(C.configs,S,!1);if(R===null)return this.addDFAEdge(y,C,S,m.ERROR),m.ERROR;let L=new d(null,R),I=this.getUniqueAlt(R);if(this.debug){let K=g.getConflictingAltSubsets(R);console.log("SLL altSubSets="+r.arrayToString(K)+", previous="+C.configs+", configs="+R+", predict="+I+", allSubsetsConflict="+g.allSubsetsConflict(K)+", conflictingAlts="+this.getConflictingAlts(R));}return I!==o.INVALID_ALT_NUMBER?(L.isAcceptState=!0,L.configs.uniqueAlt=I,L.prediction=I):g.hasSLLConflictTerminatingPrediction(this.predictionMode,R)&&(L.configs.conflictingAlts=this.getConflictingAlts(R),L.requiresFullContext=!0,L.isAcceptState=!0,L.prediction=L.configs.conflictingAlts.minValue()),L.isAcceptState&&L.configs.hasSemanticContext&&(this.predicateDFAState(L,this.atn.getDecisionState(y.decision)),L.predicates!==null&&(L.prediction=o.INVALID_ALT_NUMBER)),L=this.addDFAEdge(y,C,S,L),L}predicateDFAState(y,C){let S=C.transitions.length,R=this.getConflictingAltsOrUniqueAlt(y.configs),L=this.getPredsForAmbigAlts(R,y.configs,S);L!==null?(y.predicates=this.getPredicatePredictions(R,L),y.prediction=o.INVALID_ALT_NUMBER):y.prediction=R.minValue();}execATNWithFullContext(y,C,S,R,L,I){(this.debug||this.debug_list_atn_decisions)&&console.log("execATNWithFullContext "+S);let K=!0,j=!1,A,q=S;R.seek(L);let B=R.LA(1),T=-1;for(;;){if(A=this.computeReachSet(q,B,K),A===null){let H=this.noViableAlt(R,I,q,L);R.seek(L);let z=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(q,I);if(z!==o.INVALID_ALT_NUMBER)return z;throw H}let P=g.getConflictingAltSubsets(A);if(this.debug&&console.log("LL altSubSets="+P+", predict="+g.getUniqueAlt(P)+", resolvesToJustOneViableAlt="+g.resolvesToJustOneViableAlt(P)),A.uniqueAlt=this.getUniqueAlt(A),A.uniqueAlt!==o.INVALID_ALT_NUMBER){T=A.uniqueAlt;break}else if(this.predictionMode!==g.LL_EXACT_AMBIG_DETECTION){if(T=g.resolvesToJustOneViableAlt(P),T!==o.INVALID_ALT_NUMBER)break}else if(g.allSubsetsConflict(P)&&g.allSubsetsEqual(P)){j=!0,T=g.getSingleViableAlt(P);break}q=A,B!==c.EOF&&(R.consume(),B=R.LA(1));}return A.uniqueAlt!==o.INVALID_ALT_NUMBER?(this.reportContextSensitivity(y,T,A,L,R.index),T):(this.reportAmbiguity(y,C,L,R.index,j,null,A),T)}computeReachSet(y,C,S){this.debug&&console.log("in computeReachSet, starting closure: "+y),this.mergeCache===null&&(this.mergeCache=new n);let R=new h(S),L=null;for(let K=0;K<y.items.length;K++){let j=y.items[K];if(this.debug&&console.log("testing "+this.getTokenName(C)+" at "+j),j.state instanceof u){(S||C===c.EOF)&&(L===null&&(L=[]),L.push(j),this.debug_add&&console.log("added "+j+" to skippedStopStates"));continue}for(let A=0;A<j.state.transitions.length;A++){let q=j.state.transitions[A],B=this.getReachableTarget(q,C);if(B!==null){let T=new l({state:B},j);R.add(T,this.mergeCache),this.debug_add&&console.log("added "+T+" to intermediate");}}}let I=null;if(L===null&&C!==c.EOF&&(R.items.length===1||this.getUniqueAlt(R)!==o.INVALID_ALT_NUMBER)&&(I=R),I===null){I=new h(S);let K=new i,j=C===c.EOF;for(let A=0;A<R.items.length;A++)this.closure(R.items[A],I,K,!1,S,j);}if(C===c.EOF&&(I=this.removeAllConfigsNotInRuleStopState(I,I===R)),L!==null&&(!S||!g.hasConfigInRuleStopState(I)))for(let K=0;K<L.length;K++)I.add(L[K],this.mergeCache);return I.items.length===0?null:I}removeAllConfigsNotInRuleStopState(y,C){if(g.allConfigsInRuleStopStates(y))return y;let S=new h(y.fullCtx);for(let R=0;R<y.items.length;R++){let L=y.items[R];if(L.state instanceof u){S.add(L,this.mergeCache);continue}if(C&&L.state.epsilonOnlyTransitions&&this.atn.nextTokens(L.state).contains(c.EPSILON)){let K=this.atn.ruleToStopState[L.state.ruleIndex];S.add(new l({state:K},L),this.mergeCache);}}return S}computeStartState(y,C,S){let R=ae(this.atn,C),L=new h(S);for(let I=0;I<y.transitions.length;I++){let K=y.transitions[I].target,j=new l({state:K,alt:I+1,context:R},null),A=new i;this.closure(j,L,A,!0,S,!1);}return L}applyPrecedenceFilter(y){let C,S=[],R=new h(y.fullCtx);for(let L=0;L<y.items.length;L++){if(C=y.items[L],C.alt!==1)continue;let I=C.semanticContext.evalPrecedence(this.parser,this._outerContext);I!==null&&(S[C.state.stateNumber]=C.context,I!==C.semanticContext?R.add(new l({semanticContext:I},C),this.mergeCache):R.add(C,this.mergeCache));}for(let L=0;L<y.items.length;L++)if(C=y.items[L],C.alt!==1){if(!C.precedenceFilterSuppressed){let I=S[C.state.stateNumber]||null;if(I!==null&&I.equals(C.context))continue}R.add(C,this.mergeCache);}return R}getReachableTarget(y,C){return y.matches(C,0,this.atn.maxTokenType)?y.target:null}getPredsForAmbigAlts(y,C,S){let R=[];for(let I=0;I<C.items.length;I++){let K=C.items[I];y.contains(K.alt)&&(R[K.alt]=_.orContext(R[K.alt]||null,K.semanticContext));}let L=0;for(let I=1;I<S+1;I++){let K=R[I]||null;K===null?R[I]=_.NONE:K!==_.NONE&&(L+=1);}return L===0&&(R=null),this.debug&&console.log("getPredsForAmbigAlts result "+r.arrayToString(R)),R}getPredicatePredictions(y,C){let S=[],R=!1;for(let L=1;L<C.length;L++){let I=C[L];y!==null&&y.contains(L)&&S.push(new f(I,L)),I!==_.NONE&&(R=!0);}return R?S:null}getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(y,C){let S=this.splitAccordingToSemanticValidity(y,C),R=S[0],L=S[1],I=this.getAltThatFinishedDecisionEntryRule(R);return I!==o.INVALID_ALT_NUMBER||L.items.length>0&&(I=this.getAltThatFinishedDecisionEntryRule(L),I!==o.INVALID_ALT_NUMBER)?I:o.INVALID_ALT_NUMBER}getAltThatFinishedDecisionEntryRule(y){let C=[];for(let S=0;S<y.items.length;S++){let R=y.items[S];(R.reachesIntoOuterContext>0||R.state instanceof u&&R.context.hasEmptyPath())&&C.indexOf(R.alt)<0&&C.push(R.alt);}return C.length===0?o.INVALID_ALT_NUMBER:Math.min.apply(null,C)}splitAccordingToSemanticValidity(y,C){let S=new h(y.fullCtx),R=new h(y.fullCtx);for(let L=0;L<y.items.length;L++){let I=y.items[L];I.semanticContext!==_.NONE?I.semanticContext.evaluate(this.parser,C)?S.add(I):R.add(I):S.add(I);}return [S,R]}evalSemanticContext(y,C,S){let R=new s;for(let L=0;L<y.length;L++){let I=y[L];if(I.pred===_.NONE){if(R.add(I.alt),!S)break;continue}let K=I.pred.evaluate(this.parser,C);if((this.debug||this.dfa_debug)&&console.log("eval pred "+I+"="+K),K&&((this.debug||this.dfa_debug)&&console.log("PREDICT "+I.alt),R.add(I.alt),!S))break}return R}closure(y,C,S,R,L,I){this.closureCheckingStopState(y,C,S,R,L,0,I);}closureCheckingStopState(y,C,S,R,L,I,K){if((this.debug||this.debug_closure)&&(console.log("closure("+y.toString(this.parser,!0)+")"),y.reachesIntoOuterContext>50))throw "problem";if(y.state instanceof u)if(y.context.isEmpty())if(L){C.add(y,this.mergeCache);return}else this.debug&&console.log("FALLING off rule "+this.getRuleName(y.state.ruleIndex));else {for(let j=0;j<y.context.length;j++){if(y.context.getReturnState(j)===E.EMPTY_RETURN_STATE){if(L){C.add(new l({state:y.state,context:E.EMPTY},y),this.mergeCache);continue}else this.debug&&console.log("FALLING off rule "+this.getRuleName(y.state.ruleIndex)),this.closure_(y,C,S,R,L,I,K);continue}let A=this.atn.states[y.context.getReturnState(j)],q=y.context.getParent(j),B={state:A,alt:y.alt,context:q,semanticContext:y.semanticContext},T=new l(B,null);T.reachesIntoOuterContext=y.reachesIntoOuterContext,this.closureCheckingStopState(T,C,S,R,L,I-1,K);}return}this.closure_(y,C,S,R,L,I,K);}closure_(y,C,S,R,L,I,K){let j=y.state;j.epsilonOnlyTransitions||C.add(y,this.mergeCache);for(let A=0;A<j.transitions.length;A++){if(A===0&&this.canDropLoopEntryEdgeInLeftRecursiveRule(y))continue;let q=j.transitions[A],B=R&&!(q instanceof U),T=this.getEpsilonTarget(y,q,B,I===0,L,K);if(T!==null){let P=I;if(y.state instanceof u){if(this._dfa!==null&&this._dfa.precedenceDfa&&q.outermostPrecedenceReturn===this._dfa.atnStartState.ruleIndex&&(T.precedenceFilterSuppressed=!0),T.reachesIntoOuterContext+=1,S.add(T)!==T)continue;C.dipsIntoOuterContext=!0,P-=1,this.debug&&console.log("dips into outer ctx: "+T);}else {if(!q.isEpsilon&&S.add(T)!==T)continue;q instanceof F&&P>=0&&(P+=1);}this.closureCheckingStopState(T,C,S,B,L,P,K);}}}canDropLoopEntryEdgeInLeftRecursiveRule(y){let C=y.state;if(C.stateType!==a.STAR_LOOP_ENTRY||C.stateType!==a.STAR_LOOP_ENTRY||!C.isPrecedenceDecision||y.context.isEmpty()||y.context.hasEmptyPath())return !1;let S=y.context.length;for(let K=0;K<S;K++)if(this.atn.states[y.context.getReturnState(K)].ruleIndex!==C.ruleIndex)return !1;let L=C.transitions[0].target.endState.stateNumber,I=this.atn.states[L];for(let K=0;K<S;K++){let j=y.context.getReturnState(K),A=this.atn.states[j];if(A.transitions.length!==1||!A.transitions[0].isEpsilon)return !1;let q=A.transitions[0].target;if(!(A.stateType===a.BLOCK_END&&q===C)&&A!==I&&q!==I&&!(q.stateType===a.BLOCK_END&&q.transitions.length===1&&q.transitions[0].isEpsilon&&q.transitions[0].target===C))return !1}return !0}getRuleName(y){return this.parser!==null&&y>=0?this.parser.ruleNames[y]:"<rule "+y+">"}getEpsilonTarget(y,C,S,R,L,I){switch(C.serializationType){case w.RULE:return this.ruleTransition(y,C);case w.PRECEDENCE:return this.precedenceTransition(y,C,S,R,L);case w.PREDICATE:return this.predTransition(y,C,S,R,L);case w.ACTION:return this.actionTransition(y,C);case w.EPSILON:return new l({state:C.target},y);case w.ATOM:case w.RANGE:case w.SET:return I&&C.matches(c.EOF,0,1)?new l({state:C.target},y):null;default:return null}}actionTransition(y,C){if(this.debug){let S=C.actionIndex===-1?65535:C.actionIndex;console.log("ACTION edge "+C.ruleIndex+":"+S);}return new l({state:C.target},y)}precedenceTransition(y,C,S,R,L){this.debug&&(console.log("PRED (collectPredicates="+S+") "+C.precedence+">=_p, ctx dependent=true"),this.parser!==null&&console.log("context surrounding pred is "+r.arrayToString(this.parser.getRuleInvocationStack())));let I=null;if(S&&R)if(L){let K=this._input.index;this._input.seek(this._startIndex);let j=C.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(K),j&&(I=new l({state:C.target},y));}else {let K=_.andContext(y.semanticContext,C.getPredicate());I=new l({state:C.target,semanticContext:K},y);}else I=new l({state:C.target},y);return this.debug&&console.log("config from pred transition="+I),I}predTransition(y,C,S,R,L){this.debug&&(console.log("PRED (collectPredicates="+S+") "+C.ruleIndex+":"+C.predIndex+", ctx dependent="+C.isCtxDependent),this.parser!==null&&console.log("context surrounding pred is "+r.arrayToString(this.parser.getRuleInvocationStack())));let I=null;if(S&&(C.isCtxDependent&&R||!C.isCtxDependent))if(L){let K=this._input.index;this._input.seek(this._startIndex);let j=C.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(K),j&&(I=new l({state:C.target},y));}else {let K=_.andContext(y.semanticContext,C.getPredicate());I=new l({state:C.target,semanticContext:K},y);}else I=new l({state:C.target},y);return this.debug&&console.log("config from pred transition="+I),I}ruleTransition(y,C){this.debug&&console.log("CALL rule "+this.getRuleName(C.target.ruleIndex)+", ctx="+y.context);let S=C.followState,R=re.create(y.context,S.stateNumber);return new l({state:C.target,context:R},y)}getConflictingAlts(y){let C=g.getConflictingAltSubsets(y);return g.getAlts(C)}getConflictingAltsOrUniqueAlt(y){let C=null;return y.uniqueAlt!==o.INVALID_ALT_NUMBER?(C=new s,C.add(y.uniqueAlt)):C=y.conflictingAlts,C}getTokenName(y){if(y===c.EOF)return "EOF";if(this.parser!==null&&this.parser.literalNames!==null)if(y>=this.parser.literalNames.length&&y>=this.parser.symbolicNames.length)console.log(""+y+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens());else return (this.parser.literalNames[y]||this.parser.symbolicNames[y])+"<"+y+">";return ""+y}getLookaheadName(y){return this.getTokenName(y.LA(1))}dumpDeadEndConfigs(y){console.log("dead end configs: ");let C=y.getDeadEndConfigs();for(let S=0;S<C.length;S++){let R=C[S],L="no edges";if(R.state.transitions.length>0){let I=R.state.transitions[0];I instanceof AtomTransition?L="Atom "+this.getTokenName(I.label):I instanceof D&&(L=(I instanceof N?"~":"")+"Set "+I.set);}console.error(R.toString(this.parser,!0)+":"+L);}}noViableAlt(y,C,S,R){return new Z(this.parser,y,y.get(R),y.LT(1),S,C)}getUniqueAlt(y){let C=o.INVALID_ALT_NUMBER;for(let S=0;S<y.items.length;S++){let R=y.items[S];if(C===o.INVALID_ALT_NUMBER)C=R.alt;else if(R.alt!==C)return o.INVALID_ALT_NUMBER}return C}addDFAEdge(y,C,S,R){if(this.debug&&console.log("EDGE "+C+" -> "+R+" upon "+this.getTokenName(S)),R===null)return null;if(R=this.addDFAState(y,R),C===null||S<-1||S>this.atn.maxTokenType)return R;if(C.edges===null&&(C.edges=[]),C.edges[S+1]=R,this.debug){let L=this.parser===null?null:this.parser.literalNames,I=this.parser===null?null:this.parser.symbolicNames;console.log(`DFA=
87
+ `+y.toString(L,I));}return R}addDFAState(y,C){if(C===m.ERROR)return C;let S=y.states.get(C);return S!==null?S:(C.stateNumber=y.states.length,C.configs.readOnly||(C.configs.optimizeConfigs(this),C.configs.setReadonly(!0)),y.states.add(C),this.debug&&console.log("adding new DFA state: "+C),C)}reportAttemptingFullContext(y,C,S,R,L){if(this.debug||this.retry_debug){let I=new b(R,L+1);console.log("reportAttemptingFullContext decision="+y.decision+":"+S+", input="+this.parser.getTokenStream().getText(I));}this.parser!==null&&this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser,y,R,L,C,S);}reportContextSensitivity(y,C,S,R,L){if(this.debug||this.retry_debug){let I=new b(R,L+1);console.log("reportContextSensitivity decision="+y.decision+":"+S+", input="+this.parser.getTokenStream().getText(I));}this.parser!==null&&this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser,y,R,L,C,S);}reportAmbiguity(y,C,S,R,L,I,K){if(this.debug||this.retry_debug){let j=new b(S,R+1);console.log("reportAmbiguity "+I+":"+K+", input="+this.parser.getTokenStream().getText(j));}this.parser!==null&&this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser,y,S,R,L,I,K);}};e.exports=k;}),B8=te(t=>{t.ATN=ho(),t.ATNDeserializer=$b(),t.LexerATNSimulator=k8(),t.ParserATNSimulator=M8(),t.PredictionMode=Gb();}),Yb=te(()=>{String.prototype.codePointAt||function(){var t=function(){let r;try{let i={},s=Object.defineProperty;r=s(i,i,i)&&s;}catch(i){}return r}();let e=function(r){if(this==null)throw TypeError();let i=String(this),s=i.length,n=r?Number(r):0;if(n!==n&&(n=0),n<0||n>=s)return;let o=i.charCodeAt(n),a;return o>=55296&&o<=56319&&s>n+1&&(a=i.charCodeAt(n+1),a>=56320&&a<=57343)?(o-55296)*1024+a-56320+65536:o};t?t(String.prototype,"codePointAt",{value:e,configurable:!0,writable:!0}):String.prototype.codePointAt=e;}();}),Jl=te((t,e)=>{var r=class{constructor(s,n,o){this.dfa=s,this.literalNames=n||[],this.symbolicNames=o||[];}toString(){if(this.dfa.s0===null)return null;let s="",n=this.dfa.sortedStates();for(let o=0;o<n.length;o++){let a=n[o];if(a.edges!==null){let u=a.edges.length;for(let l=0;l<u;l++){let h=a.edges[l]||null;h!==null&&h.stateNumber!==2147483647&&(s=s.concat(this.getStateString(a)),s=s.concat("-"),s=s.concat(this.getEdgeLabel(l)),s=s.concat("->"),s=s.concat(this.getStateString(h)),s=s.concat(`
88
+ `));}}}return s.length===0?null:s}getEdgeLabel(s){return s===0?"EOF":this.literalNames!==null||this.symbolicNames!==null?this.literalNames[s-1]||this.symbolicNames[s-1]:String.fromCharCode(s-1)}getStateString(s){let n=(s.isAcceptState?":":"")+"s"+s.stateNumber+(s.requiresFullContext?"^":"");return s.isAcceptState?s.predicates!==null?n+"=>"+s.predicates.toString():n+"=>"+s.prediction.toString():n}},i=class extends r{constructor(s){super(s,null);}getEdgeLabel(s){return "'"+String.fromCharCode(s)+"'"}};e.exports={DFASerializer:r,LexerDFASerializer:i};}),j8=te((t,e)=>{var{Set:r}=gr(),{DFAState:i}=Ka(),{StarLoopEntryState:s}=cn(),{ATNConfigSet:n}=fo(),{DFASerializer:o}=Jl(),{LexerDFASerializer:a}=Jl(),u=class{constructor(l,h){if(h===void 0&&(h=0),this.atnStartState=l,this.decision=h,this._states=new r,this.s0=null,this.precedenceDfa=!1,l instanceof s&&l.isPrecedenceDecision){this.precedenceDfa=!0;let c=new i(null,new n);c.edges=[],c.isAcceptState=!1,c.requiresFullContext=!1,this.s0=c;}}getPrecedenceStartState(l){if(!this.precedenceDfa)throw "Only precedence DFAs may contain a precedence start state.";return l<0||l>=this.s0.edges.length?null:this.s0.edges[l]||null}setPrecedenceStartState(l,h){if(!this.precedenceDfa)throw "Only precedence DFAs may contain a precedence start state.";l<0||(this.s0.edges[l]=h);}setPrecedenceDfa(l){if(this.precedenceDfa!==l){if(this._states=new r,l){let h=new i(null,new n);h.edges=[],h.isAcceptState=!1,h.requiresFullContext=!1,this.s0=h;}else this.s0=null;this.precedenceDfa=l;}}sortedStates(){return this._states.values().sort(function(h,c){return h.stateNumber-c.stateNumber})}toString(l,h){return l=l||null,h=h||null,this.s0===null?"":new o(this,l,h).toString()}toLexerString(){return this.s0===null?"":new a(this).toString()}get states(){return this._states}};e.exports=u;}),q8=te(t=>{t.DFA=j8(),t.DFASerializer=Jl().DFASerializer,t.LexerDFASerializer=Jl().LexerDFASerializer,t.PredPrediction=Ka().PredPrediction;}),Jb=te(()=>{String.fromCodePoint||function(){let t=function(){let s;try{let n={},o=Object.defineProperty;s=o(n,n,n)&&o;}catch(n){}return s}(),e=String.fromCharCode,r=Math.floor,i=function(s){let o=[],a,u,l=-1,h=arguments.length;if(!h)return "";let c="";for(;++l<h;){let d=Number(arguments[l]);if(!isFinite(d)||d<0||d>1114111||r(d)!==d)throw RangeError("Invalid code point: "+d);d<=65535?o.push(d):(d-=65536,a=(d>>10)+55296,u=d%1024+56320,o.push(a,u)),(l+1===h||o.length>16384)&&(c+=e.apply(null,o),o.length=0);}return c};t?t(String,"fromCodePoint",{value:i,configurable:!0,writable:!0}):String.fromCodePoint=i;}();}),H8=te((t,e)=>{var r=so(),i=qb();e.exports=Wl(Wl({},r),{Trees:i});}),U8=te((t,e)=>{var{BitSet:r}=gr(),{ErrorListener:i}=Yl(),{Interval:s}=Ar(),n=class extends i{constructor(o){super(),o=o||!0,this.exactOnly=o;}reportAmbiguity(o,a,u,l,h,c,d){if(this.exactOnly&&!h)return;let f="reportAmbiguity d="+this.getDecisionDescription(o,a)+": ambigAlts="+this.getConflictingAlts(c,d)+", input='"+o.getTokenStream().getText(new s(u,l))+"'";o.notifyErrorListeners(f);}reportAttemptingFullContext(o,a,u,l,h,c){let d="reportAttemptingFullContext d="+this.getDecisionDescription(o,a)+", input='"+o.getTokenStream().getText(new s(u,l))+"'";o.notifyErrorListeners(d);}reportContextSensitivity(o,a,u,l,h,c){let d="reportContextSensitivity d="+this.getDecisionDescription(o,a)+", input='"+o.getTokenStream().getText(new s(u,l))+"'";o.notifyErrorListeners(d);}getDecisionDescription(o,a){let u=a.decision,l=a.atnStartState.ruleIndex,h=o.ruleNames;if(l<0||l>=h.length)return ""+u;let c=h[l]||null;return c===null||c.length===0?""+u:`${u} (${c})`}getConflictingAlts(o,a){if(o!==null)return o;let u=new r;for(let l=0;l<a.items.length;l++)u.add(a.items[l].alt);return `{${u.values().join(", ")}}`}};e.exports=n;}),ep=te((t,e)=>{var{Token:r}=$t(),{NoViableAltException:i,InputMismatchException:s,FailedPredicateException:n,ParseCancellationException:o}=Xr(),{ATNState:a}=cn(),{Interval:u,IntervalSet:l}=Ar(),h=class{reset(f){}recoverInline(f){}recover(f,m){}sync(f){}inErrorRecoveryMode(f){}reportError(f){}},c=class extends h{constructor(){super(),this.errorRecoveryMode=!1,this.lastErrorIndex=-1,this.lastErrorStates=null,this.nextTokensContext=null,this.nextTokenState=0;}reset(f){this.endErrorCondition(f);}beginErrorCondition(f){this.errorRecoveryMode=!0;}inErrorRecoveryMode(f){return this.errorRecoveryMode}endErrorCondition(f){this.errorRecoveryMode=!1,this.lastErrorStates=null,this.lastErrorIndex=-1;}reportMatch(f){this.endErrorCondition(f);}reportError(f,m){this.inErrorRecoveryMode(f)||(this.beginErrorCondition(f),m instanceof i?this.reportNoViableAlternative(f,m):m instanceof s?this.reportInputMismatch(f,m):m instanceof n?this.reportFailedPredicate(f,m):(console.log("unknown recognition error type: "+m.constructor.name),console.log(m.stack),f.notifyErrorListeners(m.getOffendingToken(),m.getMessage(),m)));}recover(f,m){this.lastErrorIndex===f.getInputStream().index&&this.lastErrorStates!==null&&this.lastErrorStates.indexOf(f.state)>=0&&f.consume(),this.lastErrorIndex=f._input.index,this.lastErrorStates===null&&(this.lastErrorStates=[]),this.lastErrorStates.push(f.state);let g=this.getErrorRecoverySet(f);this.consumeUntil(f,g);}sync(f){if(this.inErrorRecoveryMode(f))return;let m=f._interp.atn.states[f.state],g=f.getTokenStream().LA(1),v=f.atn.nextTokens(m);if(v.contains(g)){this.nextTokensContext=null,this.nextTokenState=a.INVALID_STATE_NUMBER;return}else if(v.contains(r.EPSILON)){this.nextTokensContext===null&&(this.nextTokensContext=f._ctx,this.nextTokensState=f._stateNumber);return}switch(m.stateType){case a.BLOCK_START:case a.STAR_BLOCK_START:case a.PLUS_BLOCK_START:case a.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(f)!==null)return;throw new s(f);case a.PLUS_LOOP_BACK:case a.STAR_LOOP_BACK:this.reportUnwantedToken(f);let x=new l;x.addSet(f.getExpectedTokens());let _=x.addSet(this.getErrorRecoverySet(f));this.consumeUntil(f,_);break;}}reportNoViableAlternative(f,m){let g=f.getTokenStream(),v;g!==null?m.startToken.type===r.EOF?v="<EOF>":v=g.getText(new u(m.startToken.tokenIndex,m.offendingToken.tokenIndex)):v="<unknown input>";let x="no viable alternative at input "+this.escapeWSAndQuote(v);f.notifyErrorListeners(x,m.offendingToken,m);}reportInputMismatch(f,m){let g="mismatched input "+this.getTokenErrorDisplay(m.offendingToken)+" expecting "+m.getExpectedTokens().toString(f.literalNames,f.symbolicNames);f.notifyErrorListeners(g,m.offendingToken,m);}reportFailedPredicate(f,m){let v="rule "+f.ruleNames[f._ctx.ruleIndex]+" "+m.message;f.notifyErrorListeners(v,m.offendingToken,m);}reportUnwantedToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let m=f.getCurrentToken(),g=this.getTokenErrorDisplay(m),v=this.getExpectedTokens(f),x="extraneous input "+g+" expecting "+v.toString(f.literalNames,f.symbolicNames);f.notifyErrorListeners(x,m,null);}reportMissingToken(f){if(this.inErrorRecoveryMode(f))return;this.beginErrorCondition(f);let m=f.getCurrentToken(),v="missing "+this.getExpectedTokens(f).toString(f.literalNames,f.symbolicNames)+" at "+this.getTokenErrorDisplay(m);f.notifyErrorListeners(v,m,null);}recoverInline(f){let m=this.singleTokenDeletion(f);if(m!==null)return f.consume(),m;if(this.singleTokenInsertion(f))return this.getMissingSymbol(f);throw new s(f)}singleTokenInsertion(f){let m=f.getTokenStream().LA(1),g=f._interp.atn,x=g.states[f.state].transitions[0].target;return g.nextTokens(x,f._ctx).contains(m)?(this.reportMissingToken(f),!0):!1}singleTokenDeletion(f){let m=f.getTokenStream().LA(2);if(this.getExpectedTokens(f).contains(m)){this.reportUnwantedToken(f),f.consume();let v=f.getCurrentToken();return this.reportMatch(f),v}else return null}getMissingSymbol(f){let m=f.getCurrentToken(),v=this.getExpectedTokens(f).first(),x;v===r.EOF?x="<missing EOF>":x="<missing "+f.literalNames[v]+">";let _=m,E=f.getTokenStream().LT(-1);return _.type===r.EOF&&E!==null&&(_=E),f.getTokenFactory().create(_.source,v,x,r.DEFAULT_CHANNEL,-1,-1,_.line,_.column)}getExpectedTokens(f){return f.getExpectedTokens()}getTokenErrorDisplay(f){if(f===null)return "<no token>";let m=f.text;return m===null&&(f.type===r.EOF?m="<EOF>":m="<"+f.type+">"),this.escapeWSAndQuote(m)}escapeWSAndQuote(f){return f=f.replace(/\n/g,"\\n"),f=f.replace(/\r/g,"\\r"),f=f.replace(/\t/g,"\\t"),"'"+f+"'"}getErrorRecoverySet(f){let m=f._interp.atn,g=f._ctx,v=new l;for(;g!==null&&g.invokingState>=0;){let _=m.states[g.invokingState].transitions[0],E=m.nextTokens(_.followState);v.addSet(E),g=g.parentCtx;}return v.removeOne(r.EPSILON),v}consumeUntil(f,m){let g=f.getTokenStream().LA(1);for(;g!==r.EOF&&!m.contains(g);)f.consume(),g=f.getTokenStream().LA(1);}},d=class extends c{constructor(){super();}recover(f,m){let g=f._ctx;for(;g!==null;)g.exception=m,g=g.parentCtx;throw new o(m)}recoverInline(f){this.recover(f,new s(f));}sync(f){}};e.exports={BailErrorStrategy:d,DefaultErrorStrategy:c};}),V8=te((t,e)=>{e.exports.RecognitionException=Xr().RecognitionException,e.exports.NoViableAltException=Xr().NoViableAltException,e.exports.LexerNoViableAltException=Xr().LexerNoViableAltException,e.exports.InputMismatchException=Xr().InputMismatchException,e.exports.FailedPredicateException=Xr().FailedPredicateException,e.exports.DiagnosticErrorListener=U8(),e.exports.BailErrorStrategy=ep().BailErrorStrategy,e.exports.DefaultErrorStrategy=ep().DefaultErrorStrategy,e.exports.ErrorListener=Yl().ErrorListener;}),Bp=te((t,e)=>{var{Token:r}=$t();Yb(),Jb();var i=class{constructor(s,n){if(this.name="<empty>",this.strdata=s,this.decodeToUnicodeCodePoints=n||!1,this._index=0,this.data=[],this.decodeToUnicodeCodePoints)for(let o=0;o<this.strdata.length;){let a=this.strdata.codePointAt(o);this.data.push(a),o+=a<=65535?1:2;}else for(let o=0;o<this.strdata.length;o++){let a=this.strdata.charCodeAt(o);this.data.push(a);}this._size=this.data.length;}reset(){this._index=0;}consume(){if(this._index>=this._size)throw "cannot consume EOF";this._index+=1;}LA(s){if(s===0)return 0;s<0&&(s+=1);let n=this._index+s-1;return n<0||n>=this._size?r.EOF:this.data[n]}LT(s){return this.LA(s)}mark(){return -1}release(s){}seek(s){if(s<=this._index){this._index=s;return}this._index=Math.min(s,this._size);}getText(s,n){if(n>=this._size&&(n=this._size-1),s>=this._size)return "";if(this.decodeToUnicodeCodePoints){let o="";for(let a=s;a<=n;a++)o+=String.fromCodePoint(this.data[a]);return o}else return this.strdata.slice(s,n+1)}toString(){return this.strdata}get index(){return this._index}get size(){return this._size}};e.exports=i;}),$8=te((t,e)=>{var r=Bp(),i=ge("fs"),s={fromString:function(n){return new r(n,!0)},fromBlob:function(n,o,a,u){let l=new window.FileReader;l.onload=function(h){let c=new r(h.target.result,!0);a(c);},l.onerror=u,l.readAsText(n,o);},fromBuffer:function(n,o){return new r(n.toString(o),!0)},fromPath:function(n,o,a){i.readFile(n,o,function(u,l){let h=null;l!==null&&(h=new r(l,!0)),a(u,h);});},fromPathSync:function(n,o){let a=i.readFileSync(n,o);return new r(a,!0)}};e.exports=s;}),z8=te((t,e)=>{var r=Bp(),i=ge("fs"),s=class extends r{constructor(n,o){let a=i.readFileSync(n,"utf8");super(a,o),this.fileName=n;}};e.exports=s;}),K8=te((t,e)=>{var{Token:r}=$t(),i=_c(),{Interval:s}=Ar(),n=class{},o=class extends n{constructor(a){super(),this.tokenSource=a,this.tokens=[],this.index=-1,this.fetchedEOF=!1;}mark(){return 0}release(a){}reset(){this.seek(0);}seek(a){this.lazyInit(),this.index=this.adjustSeekIndex(a);}get(a){return this.lazyInit(),this.tokens[a]}consume(){let a=!1;if(this.index>=0?this.fetchedEOF?a=this.index<this.tokens.length-1:a=this.index<this.tokens.length:a=!1,!a&&this.LA(1)===r.EOF)throw "cannot consume EOF";this.sync(this.index+1)&&(this.index=this.adjustSeekIndex(this.index+1));}sync(a){let u=a-this.tokens.length+1;return u>0?this.fetch(u)>=u:!0}fetch(a){if(this.fetchedEOF)return 0;for(let u=0;u<a;u++){let l=this.tokenSource.nextToken();if(l.tokenIndex=this.tokens.length,this.tokens.push(l),l.type===r.EOF)return this.fetchedEOF=!0,u+1}return a}getTokens(a,u,l){if(l===void 0&&(l=null),a<0||u<0)return null;this.lazyInit();let h=[];u>=this.tokens.length&&(u=this.tokens.length-1);for(let c=a;c<u;c++){let d=this.tokens[c];if(d.type===r.EOF)break;(l===null||l.contains(d.type))&&h.push(d);}return h}LA(a){return this.LT(a).type}LB(a){return this.index-a<0?null:this.tokens[this.index-a]}LT(a){if(this.lazyInit(),a===0)return null;if(a<0)return this.LB(-a);let u=this.index+a-1;return this.sync(u),u>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[u]}adjustSeekIndex(a){return a}lazyInit(){this.index===-1&&this.setup();}setup(){this.sync(0),this.index=this.adjustSeekIndex(0);}setTokenSource(a){this.tokenSource=a,this.tokens=[],this.index=-1,this.fetchedEOF=!1;}nextTokenOnChannel(a,u){if(this.sync(a),a>=this.tokens.length)return -1;let l=this.tokens[a];for(;l.channel!==this.channel;){if(l.type===r.EOF)return -1;a+=1,this.sync(a),l=this.tokens[a];}return a}previousTokenOnChannel(a,u){for(;a>=0&&this.tokens[a].channel!==u;)a-=1;return a}getHiddenTokensToRight(a,u){if(u===void 0&&(u=-1),this.lazyInit(),a<0||a>=this.tokens.length)throw ""+a+" not in 0.."+this.tokens.length-1;let l=this.nextTokenOnChannel(a+1,i.DEFAULT_TOKEN_CHANNEL),h=a+1,c=l===-1?this.tokens.length-1:l;return this.filterForChannel(h,c,u)}getHiddenTokensToLeft(a,u){if(u===void 0&&(u=-1),this.lazyInit(),a<0||a>=this.tokens.length)throw ""+a+" not in 0.."+this.tokens.length-1;let l=this.previousTokenOnChannel(a-1,i.DEFAULT_TOKEN_CHANNEL);if(l===a-1)return null;let h=l+1,c=a-1;return this.filterForChannel(h,c,u)}filterForChannel(a,u,l){let h=[];for(let c=a;c<u+1;c++){let d=this.tokens[c];l===-1?d.channel!==i.DEFAULT_TOKEN_CHANNEL&&h.push(d):d.channel===l&&h.push(d);}return h.length===0?null:h}getSourceName(){return this.tokenSource.getSourceName()}getText(a){this.lazyInit(),this.fill(),a==null&&(a=new s(0,this.tokens.length-1));let u=a.start;u instanceof r&&(u=u.tokenIndex);let l=a.stop;if(l instanceof r&&(l=l.tokenIndex),u===null||l===null||u<0||l<0)return "";l>=this.tokens.length&&(l=this.tokens.length-1);let h="";for(let c=u;c<l+1;c++){let d=this.tokens[c];if(d.type===r.EOF)break;h=h+d.text;}return h}fill(){for(this.lazyInit();this.fetch(1e3)===1e3;);}};e.exports=o;}),G8=te((t,e)=>{var r=$t().Token,i=K8(),s=class extends i{constructor(n,o){super(n),this.channel=o===void 0?r.DEFAULT_CHANNEL:o;}adjustSeekIndex(n){return this.nextTokenOnChannel(n,this.channel)}LB(n){if(n===0||this.index-n<0)return null;let o=this.index,a=1;for(;a<=n;)o=this.previousTokenOnChannel(o-1,this.channel),a+=1;return o<0?null:this.tokens[o]}LT(n){if(this.lazyInit(),n===0)return null;if(n<0)return this.LB(-n);let o=this.index,a=1;for(;a<n;)this.sync(o+1)&&(o=this.nextTokenOnChannel(o+1,this.channel)),a+=1;return this.tokens[o]}getNumberOfOnChannelTokens(){let n=0;this.fill();for(let o=0;o<this.tokens.length;o++){let a=this.tokens[o];if(a.channel===this.channel&&(n+=1),a.type===r.EOF)break}return n}};e.exports=s;}),W8=te((t,e)=>{var{Token:r}=$t(),{ParseTreeListener:i,TerminalNode:s,ErrorNode:n}=so(),o=zb(),{DefaultErrorStrategy:a}=ep(),u=$b(),l=Ub(),h=_c(),c=class extends i{constructor(f){super(),this.parser=f;}enterEveryRule(f){console.log("enter "+this.parser.ruleNames[f.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text);}visitTerminal(f){console.log("consume "+f.symbol+" rule "+this.parser.ruleNames[this.parser._ctx.ruleIndex]);}exitEveryRule(f){console.log("exit "+this.parser.ruleNames[f.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text);}},d=class extends o{constructor(f){super(),this._input=null,this._errHandler=new a,this._precedenceStack=[],this._precedenceStack.push(0),this._ctx=null,this.buildParseTrees=!0,this._tracer=null,this._parseListeners=null,this._syntaxErrors=0,this.setInputStream(f);}reset(){this._input!==null&&this._input.seek(0),this._errHandler.reset(this),this._ctx=null,this._syntaxErrors=0,this.setTrace(!1),this._precedenceStack=[],this._precedenceStack.push(0),this._interp!==null&&this._interp.reset();}match(f){let m=this.getCurrentToken();return m.type===f?(this._errHandler.reportMatch(this),this.consume()):(m=this._errHandler.recoverInline(this),this.buildParseTrees&&m.tokenIndex===-1&&this._ctx.addErrorNode(m)),m}matchWildcard(){let f=this.getCurrentToken();return f.type>0?(this._errHandler.reportMatch(this),this.consume()):(f=this._errHandler.recoverInline(this),this._buildParseTrees&&f.tokenIndex===-1&&this._ctx.addErrorNode(f)),f}getParseListeners(){return this._parseListeners||[]}addParseListener(f){if(f===null)throw "listener";this._parseListeners===null&&(this._parseListeners=[]),this._parseListeners.push(f);}removeParseListener(f){if(this._parseListeners!==null){let m=this._parseListeners.indexOf(f);m>=0&&this._parseListeners.splice(m,1),this._parseListeners.length===0&&(this._parseListeners=null);}}removeParseListeners(){this._parseListeners=null;}triggerEnterRuleEvent(){if(this._parseListeners!==null){let f=this._ctx;this._parseListeners.map(function(m){m.enterEveryRule(f),f.enterRule(m);});}}triggerExitRuleEvent(){if(this._parseListeners!==null){let f=this._ctx;this._parseListeners.slice(0).reverse().map(function(m){f.exitRule(m),m.exitEveryRule(f);});}}getTokenFactory(){return this._input.tokenSource._factory}setTokenFactory(f){this._input.tokenSource._factory=f;}getATNWithBypassAlts(){let f=this.getSerializedATN();if(f===null)throw "The current parser does not support an ATN with bypass alternatives.";let m=this.bypassAltsAtnCache[f];if(m===null){let g=new l;g.generateRuleBypassTransitions=!0,m=new u(g).deserialize(f),this.bypassAltsAtnCache[f]=m;}return m}compileParseTreePattern(f,m,g){if(g=g||null,g===null&&this.getTokenStream()!==null){let x=this.getTokenStream().tokenSource;x instanceof h&&(g=x);}if(g===null)throw "Parser can't discover a lexer to use";return new ParseTreePatternMatcher(g,this).compile(f,m)}getInputStream(){return this.getTokenStream()}setInputStream(f){this.setTokenStream(f);}getTokenStream(){return this._input}setTokenStream(f){this._input=null,this.reset(),this._input=f;}getCurrentToken(){return this._input.LT(1)}notifyErrorListeners(f,m,g){m=m||null,g=g||null,m===null&&(m=this.getCurrentToken()),this._syntaxErrors+=1;let v=m.line,x=m.column;this.getErrorListenerDispatch().syntaxError(this,m,v,x,f,g);}consume(){let f=this.getCurrentToken();f.type!==r.EOF&&this.getInputStream().consume();let m=this._parseListeners!==null&&this._parseListeners.length>0;if(this.buildParseTrees||m){let g;this._errHandler.inErrorRecoveryMode(this)?g=this._ctx.addErrorNode(f):g=this._ctx.addTokenNode(f),g.invokingState=this.state,m&&this._parseListeners.map(function(v){g instanceof n||g.isErrorNode!==void 0&&g.isErrorNode()?v.visitErrorNode(g):g instanceof s&&v.visitTerminal(g);});}return f}addContextToParseTree(){this._ctx.parentCtx!==null&&this._ctx.parentCtx.addChild(this._ctx);}enterRule(f,m,g){this.state=m,this._ctx=f,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),this._parseListeners!==null&&this.triggerEnterRuleEvent();}exitRule(){this._ctx.stop=this._input.LT(-1),this._parseListeners!==null&&this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx;}enterOuterAlt(f,m){f.setAltNumber(m),this.buildParseTrees&&this._ctx!==f&&this._ctx.parentCtx!==null&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(f)),this._ctx=f;}getPrecedence(){return this._precedenceStack.length===0?-1:this._precedenceStack[this._precedenceStack.length-1]}enterRecursionRule(f,m,g,v){this.state=m,this._precedenceStack.push(v),this._ctx=f,this._ctx.start=this._input.LT(1),this._parseListeners!==null&&this.triggerEnterRuleEvent();}pushNewRecursionContext(f,m,g){let v=this._ctx;v.parentCtx=f,v.invokingState=m,v.stop=this._input.LT(-1),this._ctx=f,this._ctx.start=v.start,this.buildParseTrees&&this._ctx.addChild(v),this._parseListeners!==null&&this.triggerEnterRuleEvent();}unrollRecursionContexts(f){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);let m=this._ctx;if(this._parseListeners!==null)for(;this._ctx!==f;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=f;m.parentCtx=f,this.buildParseTrees&&f!==null&&f.addChild(m);}getInvokingContext(f){let m=this._ctx;for(;m!==null;){if(m.ruleIndex===f)return m;m=m.parentCtx;}return null}precpred(f,m){return m>=this._precedenceStack[this._precedenceStack.length-1]}inContext(f){return !1}isExpectedToken(f){let m=this._interp.atn,g=this._ctx,v=m.states[this.state],x=m.nextTokens(v);if(x.contains(f))return !0;if(!x.contains(r.EPSILON))return !1;for(;g!==null&&g.invokingState>=0&&x.contains(r.EPSILON);){let E=m.states[g.invokingState].transitions[0];if(x=m.nextTokens(E.followState),x.contains(f))return !0;g=g.parentCtx;}return !!(x.contains(r.EPSILON)&&f===r.EOF)}getExpectedTokens(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}getExpectedTokensWithinCurrentRule(){let f=this._interp.atn,m=f.states[this.state];return f.nextTokens(m)}getRuleIndex(f){let m=this.getRuleIndexMap()[f];return m!==null?m:-1}getRuleInvocationStack(f){f=f||null,f===null&&(f=this._ctx);let m=[];for(;f!==null;){let g=f.ruleIndex;g<0?m.push("n/a"):m.push(this.ruleNames[g]),f=f.parentCtx;}return m}getDFAStrings(){return this._interp.decisionToDFA.toString()}dumpDFA(){let f=!1;for(let m=0;m<this._interp.decisionToDFA.length;m++){let g=this._interp.decisionToDFA[m];g.states.length>0&&(f&&console.log(),this.printer.println("Decision "+g.decision+":"),this.printer.print(g.toString(this.literalNames,this.symbolicNames)),f=!0);}}getSourceName(){return this._input.sourceName}setTrace(f){f?(this._tracer!==null&&this.removeParseListener(this._tracer),this._tracer=new c(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null);}};d.bypassAltsAtnCache={},e.exports=d;}),Y8=te(t=>{t.atn=B8(),t.codepointat=Yb(),t.dfa=q8(),t.fromcodepoint=Jb(),t.tree=H8(),t.error=V8(),t.Token=$t().Token,t.CharStreams=$8(),t.CommonToken=$t().CommonToken,t.InputStream=Bp(),t.FileStream=z8(),t.CommonTokenStream=G8(),t.Lexer=_c(),t.Parser=W8();var e=Xi();t.PredictionContextCache=e.PredictionContextCache,t.ParserRuleContext=Wb(),t.Interval=Ar().Interval,t.IntervalSet=Ar().IntervalSet,t.Utils=gr(),t.LL1Analyzer=Hb().LL1Analyzer;}),J8=te((t,e)=>{e.exports="./Solidity-LWZUP6Z4.tokens";}),Z8=te((t,e)=>{typeof BROWSER!="undefined"?e.exports=J8():e.exports=ge("fs").readFileSync(ge("path").join(__dirname,"./antlr/Solidity.tokens")).toString();});hb(Jp);p7(Jp,{ParserError:()=>zE,parse:()=>wI,tokenize:()=>AI,visit:()=>bp});var tp=jt(O8()),X8=jt(pc()),Q8=jt(ln()),eI=jt(hc()),tI=jt(un()),Zb=jt(ei()),ir=class extends Q8.Lexer{get vocabulary(){return ir.VOCABULARY}constructor(t){super(t),this._interp=new eI.LexerATNSimulator(ir._ATN,this);}get grammarFileName(){return "Solidity.g4"}get ruleNames(){return ir.ruleNames}get serializedATN(){return ir._serializedATN}get channelNames(){return ir.channelNames}get modeNames(){return ir.modeNames}static get _ATN(){return ir.__ATN||(ir.__ATN=new X8.ATNDeserializer().deserialize(Zb.toCharArray(ir._serializedATN))),ir.__ATN}},ue=ir;ue.T__0=1;ue.T__1=2;ue.T__2=3;ue.T__3=4;ue.T__4=5;ue.T__5=6;ue.T__6=7;ue.T__7=8;ue.T__8=9;ue.T__9=10;ue.T__10=11;ue.T__11=12;ue.T__12=13;ue.T__13=14;ue.T__14=15;ue.T__15=16;ue.T__16=17;ue.T__17=18;ue.T__18=19;ue.T__19=20;ue.T__20=21;ue.T__21=22;ue.T__22=23;ue.T__23=24;ue.T__24=25;ue.T__25=26;ue.T__26=27;ue.T__27=28;ue.T__28=29;ue.T__29=30;ue.T__30=31;ue.T__31=32;ue.T__32=33;ue.T__33=34;ue.T__34=35;ue.T__35=36;ue.T__36=37;ue.T__37=38;ue.T__38=39;ue.T__39=40;ue.T__40=41;ue.T__41=42;ue.T__42=43;ue.T__43=44;ue.T__44=45;ue.T__45=46;ue.T__46=47;ue.T__47=48;ue.T__48=49;ue.T__49=50;ue.T__50=51;ue.T__51=52;ue.T__52=53;ue.T__53=54;ue.T__54=55;ue.T__55=56;ue.T__56=57;ue.T__57=58;ue.T__58=59;ue.T__59=60;ue.T__60=61;ue.T__61=62;ue.T__62=63;ue.T__63=64;ue.T__64=65;ue.T__65=66;ue.T__66=67;ue.T__67=68;ue.T__68=69;ue.T__69=70;ue.T__70=71;ue.T__71=72;ue.T__72=73;ue.T__73=74;ue.T__74=75;ue.T__75=76;ue.T__76=77;ue.T__77=78;ue.T__78=79;ue.T__79=80;ue.T__80=81;ue.T__81=82;ue.T__82=83;ue.T__83=84;ue.T__84=85;ue.T__85=86;ue.T__86=87;ue.T__87=88;ue.T__88=89;ue.T__89=90;ue.T__90=91;ue.T__91=92;ue.T__92=93;ue.T__93=94;ue.T__94=95;ue.T__95=96;ue.Int=97;ue.Uint=98;ue.Byte=99;ue.Fixed=100;ue.Ufixed=101;ue.BooleanLiteral=102;ue.DecimalNumber=103;ue.HexNumber=104;ue.NumberUnit=105;ue.HexLiteralFragment=106;ue.ReservedKeyword=107;ue.AnonymousKeyword=108;ue.BreakKeyword=109;ue.ConstantKeyword=110;ue.ImmutableKeyword=111;ue.ContinueKeyword=112;ue.LeaveKeyword=113;ue.ExternalKeyword=114;ue.IndexedKeyword=115;ue.InternalKeyword=116;ue.PayableKeyword=117;ue.PrivateKeyword=118;ue.PublicKeyword=119;ue.VirtualKeyword=120;ue.PureKeyword=121;ue.TypeKeyword=122;ue.ViewKeyword=123;ue.GlobalKeyword=124;ue.ConstructorKeyword=125;ue.FallbackKeyword=126;ue.ReceiveKeyword=127;ue.Identifier=128;ue.StringLiteralFragment=129;ue.VersionLiteral=130;ue.WS=131;ue.COMMENT=132;ue.LINE_COMMENT=133;ue.channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"];ue.modeNames=["DEFAULT_MODE"];ue.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","T__32","T__33","T__34","T__35","T__36","T__37","T__38","T__39","T__40","T__41","T__42","T__43","T__44","T__45","T__46","T__47","T__48","T__49","T__50","T__51","T__52","T__53","T__54","T__55","T__56","T__57","T__58","T__59","T__60","T__61","T__62","T__63","T__64","T__65","T__66","T__67","T__68","T__69","T__70","T__71","T__72","T__73","T__74","T__75","T__76","T__77","T__78","T__79","T__80","T__81","T__82","T__83","T__84","T__85","T__86","T__87","T__88","T__89","T__90","T__91","T__92","T__93","T__94","T__95","Int","Uint","Byte","Fixed","Ufixed","NumberOfBits","NumberOfBytes","BooleanLiteral","DecimalNumber","DecimalDigits","HexNumber","HexDigits","NumberUnit","HexLiteralFragment","HexCharacter","ReservedKeyword","AnonymousKeyword","BreakKeyword","ConstantKeyword","ImmutableKeyword","ContinueKeyword","LeaveKeyword","ExternalKeyword","IndexedKeyword","InternalKeyword","PayableKeyword","PrivateKeyword","PublicKeyword","VirtualKeyword","PureKeyword","TypeKeyword","ViewKeyword","GlobalKeyword","ConstructorKeyword","FallbackKeyword","ReceiveKeyword","Identifier","IdentifierStart","IdentifierPart","StringLiteralFragment","DoubleQuotedStringCharacter","SingleQuotedStringCharacter","VersionLiteral","WS","COMMENT","LINE_COMMENT"];ue._LITERAL_NAMES=[void 0,"'pragma'","';'","'*'","'||'","'^'","'~'","'>='","'>'","'<'","'<='","'='","'as'","'import'","'from'","'{'","','","'}'","'abstract'","'contract'","'interface'","'library'","'is'","'('","')'","'error'","'using'","'for'","'|'","'&'","'+'","'-'","'/'","'%'","'=='","'!='","'struct'","'modifier'","'function'","'returns'","'event'","'enum'","'['","']'","'address'","'.'","'mapping'","'=>'","'memory'","'storage'","'calldata'","'if'","'else'","'try'","'catch'","'while'","'unchecked'","'assembly'","'do'","'return'","'throw'","'emit'","'revert'","'var'","'bool'","'string'","'byte'","'++'","'--'","'new'","':'","'delete'","'!'","'**'","'<<'","'>>'","'&&'","'?'","'|='","'^='","'&='","'<<='","'>>='","'+='","'-='","'*='","'/='","'%='","'let'","':='","'=:'","'switch'","'case'","'default'","'->'","'callback'","'override'",void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,"'anonymous'","'break'","'constant'","'immutable'","'continue'","'leave'","'external'","'indexed'","'internal'","'payable'","'private'","'public'","'virtual'","'pure'","'type'","'view'","'global'","'constructor'","'fallback'","'receive'"];ue._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,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,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,"Int","Uint","Byte","Fixed","Ufixed","BooleanLiteral","DecimalNumber","HexNumber","NumberUnit","HexLiteralFragment","ReservedKeyword","AnonymousKeyword","BreakKeyword","ConstantKeyword","ImmutableKeyword","ContinueKeyword","LeaveKeyword","ExternalKeyword","IndexedKeyword","InternalKeyword","PayableKeyword","PrivateKeyword","PublicKeyword","VirtualKeyword","PureKeyword","TypeKeyword","ViewKeyword","GlobalKeyword","ConstructorKeyword","FallbackKeyword","ReceiveKeyword","Identifier","StringLiteralFragment","VersionLiteral","WS","COMMENT","LINE_COMMENT"];ue.VOCABULARY=new tI.VocabularyImpl(ir._LITERAL_NAMES,ir._SYMBOLIC_NAMES,[]);ue._serializedATNSegments=3;ue._serializedATNSegment0=`\uC91D\uCABA\u058D\uAFBA\u4F53\u0607\uEA8B\uC241\x87\u053A\b     \x07 \x07\b \b 
89
89
 
90
90
  \v \v\f \f\r \r             \x1B \x1B     ! !" "# #$ $% %& &' '( () )* *+ +, ,- -. ./ /0 01 12 23 34 45 56 67 78 89 9: :; ;< <= => >? ?@ @A AB BC CD DE EF FG GH HI IJ JK KL LM MN NO OP PQ QR RS ST TU UV VW WX XY YZ Z[ [\\ \\] ]^ ^_ _\` \`a ab bc cd de ef fg gh hi ij jk kl lm mn no op pq qr rs st tu uv vw wx xy yz z{ {| |} }~ ~\x7F \x7F\x80 \x80\x81 \x81\x82 \x82\x83 \x83\x84 \x84\x85 \x85\x86 \x86\x87 \x87\x88 \x88\x89 \x89\x8A \x8A\x8B \x8B\x8C \x8C\x8D \x8D\x8E \x8E\x8F \x8F\x07\x07\b\b\b  
91
91
  
@@ -308,21 +308,21 @@ Found: ${e.toString().split(`
308
308
  `)!=-1,i=this._styles,s=i.length;s--;){var n=ds[i[s]];e=n.open+e.replace(n.closeRe,n.open)+n.close,r&&(e=e.replace(LI,function(o){return n.close+o+n.open}));}return e}ze.setTheme=function(t){if(typeof t=="string"){console.log("colors.setTheme now only accepts an object, not a string. If you are trying to set a theme from a file, it is now your (the caller's) responsibility to require the file. The old syntax looked like colors.setTheme(__dirname + '/../themes/generic-logging.js'); The new syntax looks like colors.setTheme(require(__dirname + '/../themes/generic-logging.js'));");return}for(var e in t)(function(r){ze[r]=function(i){if(typeof t[r]=="object"){var s=i;for(var n in t[r])s=ze[t[r][n]](s);return s}return ze[t[r]](i)};})(e);};function BI(){var t={};return Object.keys(N2).forEach(function(e){t[e]={get:function(){return R2([e])}};}),t}var jI=function(e,r){var i=r.split("");return i=i.map(e),i.join("")};ze.trap=g2();ze.zalgo=y2();ze.maps={};ze.maps.america=x2()(ze);ze.maps.zebra=E2()(ze);ze.maps.rainbow=T2()(ze);ze.maps.random=w2()(ze);for(D2 in ze.maps)(function(t){ze[t]=function(e){return jI(ze.maps[t],e)};})(D2);var D2;S2(ze,BI());});var rm=$((Xse,L2)=>{var qI=F2();L2.exports=qI;});var P2=$(im=>{im.levels={error:0,warn:1,help:2,data:3,info:4,debug:5,prompt:6,verbose:7,input:8,silly:9};im.colors={error:"red",warn:"yellow",help:"cyan",data:"grey",info:"green",debug:"blue",prompt:"grey",verbose:"cyan",input:"grey",silly:"magenta"};});var I2=$(nm=>{nm.levels={error:0,warn:1,info:2,http:3,verbose:4,debug:5,silly:6};nm.colors={error:"red",warn:"yellow",info:"green",http:"green",verbose:"cyan",debug:"blue",silly:"magenta"};});var k2=$(sm=>{sm.levels={emerg:0,alert:1,crit:2,error:3,warning:4,notice:5,info:6,debug:7};sm.colors={emerg:"red",alert:"yellow",crit:"red",error:"red",warning:"red",notice:"yellow",info:"green",debug:"blue"};});var M2=$(Tc=>{Object.defineProperty(Tc,"cli",{value:P2()});Object.defineProperty(Tc,"npm",{value:I2()});Object.defineProperty(Tc,"syslog",{value:k2()});});var Ut=$(Ya=>{Object.defineProperty(Ya,"LEVEL",{value:Symbol.for("level")});Object.defineProperty(Ya,"MESSAGE",{value:Symbol.for("message")});Object.defineProperty(Ya,"SPLAT",{value:Symbol.for("splat")});Object.defineProperty(Ya,"configs",{value:M2()});});var Dc=$((noe,wc)=>{var um=rm(),{LEVEL:om,MESSAGE:am}=Ut();um.enabled=!0;var B2=/\s+/,Ac=class t{constructor(e={}){e.colors&&this.addColors(e.colors),this.options=e;}static addColors(e){let r=Object.keys(e).reduce((i,s)=>(i[s]=B2.test(e[s])?e[s].split(B2):e[s],i),{});return t.allColors=Object.assign({},t.allColors||{},r),t.allColors}addColors(e){return t.addColors(e)}colorize(e,r,i){if(typeof i=="undefined"&&(i=r),!Array.isArray(t.allColors[e]))return um[t.allColors[e]](i);for(let s=0,n=t.allColors[e].length;s<n;s++)i=um[t.allColors[e][s]](i);return i}transform(e,r){return r.all&&typeof e[am]=="string"&&(e[am]=this.colorize(e[om],e.level,e[am])),(r.level||r.all||!r.message)&&(e.level=this.colorize(e[om],e.level)),(r.all||r.message)&&(e.message=this.colorize(e[om],e.level,e.message)),e}};wc.exports=t=>new Ac(t);wc.exports.Colorizer=wc.exports.Format=Ac;});var q2=$((soe,j2)=>{var{Colorizer:HI}=Dc();j2.exports=t=>(HI.addColors(t.colors||t),t);});var U2=$((ooe,H2)=>{var UI=_r();H2.exports=UI(t=>(t.message=` ${t.message}`,t));});var z2=$((aoe,$2)=>{var VI=_r(),{LEVEL:V2,MESSAGE:lm}=Ut();$2.exports=VI((t,{stack:e,cause:r})=>{if(t instanceof Error){let s=Object.assign({},t,{level:t.level,[V2]:t[V2]||t.level,message:t.message,[lm]:t[lm]||t.message});return e&&(s.stack=t.stack),r&&(s.cause=t.cause),s}if(!(t.message instanceof Error))return t;let i=t.message;return Object.assign(t,i),t.message=i.message,t[lm]=i.message,e&&(t.stack=i.stack),r&&(t.cause=i.cause),t});});var hm=$((uoe,Rc)=>{var{configs:$I,LEVEL:K2,MESSAGE:cm}=Ut(),Sc=class t{constructor(e={levels:$I.npm.levels}){this.paddings=t.paddingForLevels(e.levels,e.filler),this.options=e;}static getLongestLevel(e){let r=Object.keys(e).map(i=>i.length);return Math.max(...r)}static paddingForLevel(e,r,i){let s=i+1-e.length,n=Math.floor(s/r.length);return `${r}${r.repeat(n)}`.slice(0,s)}static paddingForLevels(e,r=" "){let i=t.getLongestLevel(e);return Object.keys(e).reduce((s,n)=>(s[n]=t.paddingForLevel(n,r,i),s),{})}transform(e,r){return e.message=`${this.paddings[e[K2]]}${e.message}`,e[cm]&&(e[cm]=`${this.paddings[e[K2]]}${e[cm]}`),e}};Rc.exports=t=>new Sc(t);Rc.exports.Padder=Rc.exports.Format=Sc;});var G2=$((loe,fm)=>{var{Colorizer:zI}=Dc(),{Padder:KI}=hm(),{configs:GI,MESSAGE:WI}=Ut(),Nc=class{constructor(e={}){e.levels||(e.levels=GI.cli.levels),this.colorizer=new zI(e),this.padder=new KI(e),this.options=e;}transform(e,r){return this.colorizer.transform(this.padder.transform(e,r),r),e[WI]=`${e.level}:${e.message}`,e}};fm.exports=t=>new Nc(t);fm.exports.Format=Nc;});var Y2=$((coe,dm)=>{var YI=_r();function W2(t){if(t.every(JI))return e=>{let r=e;for(let i=0;i<t.length;i++)if(r=t[i].transform(r,t[i].options),!r)return !1;return r}}function JI(t){if(typeof t.transform!="function")throw new Error(["No transform function found on format. Did you create a format instance?","const myFormat = format(formatFn);","const instance = myFormat();"].join(`
309
309
  `));return !0}dm.exports=(...t)=>{let e=YI(W2(t)),r=e();return r.Format=e.Format,r};dm.exports.cascade=W2;});var Ja=$((_m,Q2)=>{var{hasOwnProperty:Oc}=Object.prototype,ms=gm();ms.configure=gm;ms.stringify=ms;ms.default=ms;_m.stringify=ms;_m.configure=gm;Q2.exports=ms;var ZI=/[\u0000-\u001f\u0022\u005c\ud800-\udfff]|[\ud800-\udbff](?![\udc00-\udfff])|(?:[^\ud800-\udbff]|^)[\udc00-\udfff]/;function hn(t){return t.length<5e3&&!ZI.test(t)?`"${t}"`:JSON.stringify(t)}function pm(t){if(t.length>200)return t.sort();for(let e=1;e<t.length;e++){let r=t[e],i=e;for(;i!==0&&t[i-1]>r;)t[i]=t[i-1],i--;t[i]=r;}return t}var XI=Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Object.getPrototypeOf(new Int8Array)),Symbol.toStringTag).get;function mm(t){return XI.call(t)!==void 0&&t.length!==0}function J2(t,e,r){t.length<r&&(r=t.length);let i=e===","?"":" ",s=`"0":${i}${t[0]}`;for(let n=1;n<r;n++)s+=`${e}"${n}":${i}${t[n]}`;return s}function QI(t){if(Oc.call(t,"circularValue")){let e=t.circularValue;if(typeof e=="string")return `"${e}"`;if(e==null)return e;if(e===Error||e===TypeError)return {toString(){throw new TypeError("Converting circular structure to JSON")}};throw new TypeError('The "circularValue" argument must be of type string or the value null or undefined')}return '"[Circular]"'}function Z2(t,e){let r;if(Oc.call(t,e)&&(r=t[e],typeof r!="boolean"))throw new TypeError(`The "${e}" argument must be of type boolean`);return r===void 0?!0:r}function X2(t,e){let r;if(Oc.call(t,e)){if(r=t[e],typeof r!="number")throw new TypeError(`The "${e}" argument must be of type number`);if(!Number.isInteger(r))throw new TypeError(`The "${e}" argument must be an integer`);if(r<1)throw new RangeError(`The "${e}" argument must be >= 1`)}return r===void 0?1/0:r}function ps(t){return t===1?"1 item":`${t} items`}function e6(t){let e=new Set;for(let r of t)(typeof r=="string"||typeof r=="number")&&e.add(String(r));return e}function t6(t){if(Oc.call(t,"strict")){let e=t.strict;if(typeof e!="boolean")throw new TypeError('The "strict" argument must be of type boolean');if(e)return r=>{let i=`Object can not safely be stringified. Received type ${typeof r}`;throw typeof r!="function"&&(i+=` (${r.toString()})`),new Error(i)}}}function gm(t){t={...t};let e=t6(t);e&&(t.bigint===void 0&&(t.bigint=!1),"circularValue"in t||(t.circularValue=Error));let r=QI(t),i=Z2(t,"bigint"),s=Z2(t,"deterministic"),n=X2(t,"maximumDepth"),o=X2(t,"maximumBreadth");function a(d,f,m,g,v,x){let _=f[d];switch(typeof _=="object"&&_!==null&&typeof _.toJSON=="function"&&(_=_.toJSON(d)),_=g.call(f,d,_),typeof _){case"string":return hn(_);case"object":{if(_===null)return "null";if(m.indexOf(_)!==-1)return r;let E="",b=",",w=x;if(Array.isArray(_)){if(_.length===0)return "[]";if(n<m.length+1)return '"[Array]"';m.push(_),v!==""&&(x+=v,E+=`
310
310
  ${x}`,b=`,
311
- ${x}`);let te=Math.min(_.length,o),ae=0;for(;ae<te-1;ae++){let y=a(String(ae),_,m,g,v,x);E+=y!==void 0?y:"null",E+=b;}let k=a(String(ae),_,m,g,v,x);if(E+=k!==void 0?k:"null",_.length-1>o){let y=_.length-o-1;E+=`${b}"... ${ps(y)} not stringified"`;}return v!==""&&(E+=`
312
- ${w}`),m.pop(),`[${E}]`}let D=Object.keys(_),N=D.length;if(N===0)return "{}";if(n<m.length+1)return '"[Object]"';let F="",V="";v!==""&&(x+=v,b=`,
313
- ${x}`,F=" ");let Z=Math.min(N,o);s&&!mm(_)&&(D=pm(D)),m.push(_);for(let te=0;te<Z;te++){let ae=D[te],k=a(ae,_,m,g,v,x);k!==void 0&&(E+=`${V}${hn(ae)}:${F}${k}`,V=b);}if(N>o){let te=N-o;E+=`${V}"...":${F}"${ps(te)} not stringified"`,V=b;}return v!==""&&V.length>1&&(E=`
311
+ ${x}`);let re=Math.min(_.length,o),ae=0;for(;ae<re-1;ae++){let y=a(String(ae),_,m,g,v,x);E+=y!==void 0?y:"null",E+=b;}let k=a(String(ae),_,m,g,v,x);if(E+=k!==void 0?k:"null",_.length-1>o){let y=_.length-o-1;E+=`${b}"... ${ps(y)} not stringified"`;}return v!==""&&(E+=`
312
+ ${w}`),m.pop(),`[${E}]`}let D=Object.keys(_),N=D.length;if(N===0)return "{}";if(n<m.length+1)return '"[Object]"';let F="",U="";v!==""&&(x+=v,b=`,
313
+ ${x}`,F=" ");let Z=Math.min(N,o);s&&!mm(_)&&(D=pm(D)),m.push(_);for(let re=0;re<Z;re++){let ae=D[re],k=a(ae,_,m,g,v,x);k!==void 0&&(E+=`${U}${hn(ae)}:${F}${k}`,U=b);}if(N>o){let re=N-o;E+=`${U}"...":${F}"${ps(re)} not stringified"`,U=b;}return v!==""&&U.length>1&&(E=`
314
314
  ${x}${E}
315
315
  ${w}`),m.pop(),`{${E}}`}case"number":return isFinite(_)?String(_):e?e(_):"null";case"boolean":return _===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(_);default:return e?e(_):void 0}}function u(d,f,m,g,v,x){switch(typeof f=="object"&&f!==null&&typeof f.toJSON=="function"&&(f=f.toJSON(d)),typeof f){case"string":return hn(f);case"object":{if(f===null)return "null";if(m.indexOf(f)!==-1)return r;let _=x,E="",b=",";if(Array.isArray(f)){if(f.length===0)return "[]";if(n<m.length+1)return '"[Array]"';m.push(f),v!==""&&(x+=v,E+=`
316
316
  ${x}`,b=`,
317
- ${x}`);let N=Math.min(f.length,o),F=0;for(;F<N-1;F++){let Z=u(String(F),f[F],m,g,v,x);E+=Z!==void 0?Z:"null",E+=b;}let V=u(String(F),f[F],m,g,v,x);if(E+=V!==void 0?V:"null",f.length-1>o){let Z=f.length-o-1;E+=`${b}"... ${ps(Z)} not stringified"`;}return v!==""&&(E+=`
317
+ ${x}`);let N=Math.min(f.length,o),F=0;for(;F<N-1;F++){let Z=u(String(F),f[F],m,g,v,x);E+=Z!==void 0?Z:"null",E+=b;}let U=u(String(F),f[F],m,g,v,x);if(E+=U!==void 0?U:"null",f.length-1>o){let Z=f.length-o-1;E+=`${b}"... ${ps(Z)} not stringified"`;}return v!==""&&(E+=`
318
318
  ${_}`),m.pop(),`[${E}]`}m.push(f);let w="";v!==""&&(x+=v,b=`,
319
319
  ${x}`,w=" ");let D="";for(let N of g){let F=u(N,f[N],m,g,v,x);F!==void 0&&(E+=`${D}${hn(N)}:${w}${F}`,D=b);}return v!==""&&D.length>1&&(E=`
320
320
  ${x}${E}
321
321
  ${_}`),m.pop(),`{${E}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function l(d,f,m,g,v){switch(typeof f){case"string":return hn(f);case"object":{if(f===null)return "null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return l(d,f,m,g,v);if(f===null)return "null"}if(m.indexOf(f)!==-1)return r;let x=v;if(Array.isArray(f)){if(f.length===0)return "[]";if(n<m.length+1)return '"[Array]"';m.push(f),v+=g;let F=`
322
- ${v}`,V=`,
323
- ${v}`,Z=Math.min(f.length,o),te=0;for(;te<Z-1;te++){let k=l(String(te),f[te],m,g,v);F+=k!==void 0?k:"null",F+=V;}let ae=l(String(te),f[te],m,g,v);if(F+=ae!==void 0?ae:"null",f.length-1>o){let k=f.length-o-1;F+=`${V}"... ${ps(k)} not stringified"`;}return F+=`
322
+ ${v}`,U=`,
323
+ ${v}`,Z=Math.min(f.length,o),re=0;for(;re<Z-1;re++){let k=l(String(re),f[re],m,g,v);F+=k!==void 0?k:"null",F+=U;}let ae=l(String(re),f[re],m,g,v);if(F+=ae!==void 0?ae:"null",f.length-1>o){let k=f.length-o-1;F+=`${U}"... ${ps(k)} not stringified"`;}return F+=`
324
324
  ${x}`,m.pop(),`[${F}]`}let _=Object.keys(f),E=_.length;if(E===0)return "{}";if(n<m.length+1)return '"[Object]"';v+=g;let b=`,
325
- ${v}`,w="",D="",N=Math.min(E,o);mm(f)&&(w+=J2(f,b,o),_=_.slice(f.length),N-=f.length,D=b),s&&(_=pm(_)),m.push(f);for(let F=0;F<N;F++){let V=_[F],Z=l(V,f[V],m,g,v);Z!==void 0&&(w+=`${D}${hn(V)}: ${Z}`,D=b);}if(E>o){let F=E-o;w+=`${D}"...": "${ps(F)} not stringified"`,D=b;}return D!==""&&(w=`
325
+ ${v}`,w="",D="",N=Math.min(E,o);mm(f)&&(w+=J2(f,b,o),_=_.slice(f.length),N-=f.length,D=b),s&&(_=pm(_)),m.push(f);for(let F=0;F<N;F++){let U=_[F],Z=l(U,f[U],m,g,v);Z!==void 0&&(w+=`${D}${hn(U)}: ${Z}`,D=b);}if(E>o){let F=E-o;w+=`${D}"...": "${ps(F)} not stringified"`,D=b;}return D!==""&&(w=`
326
326
  ${v}${w}
327
327
  ${x}`),m.pop(),`{${w}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function h(d,f,m){switch(typeof f){case"string":return hn(f);case"object":{if(f===null)return "null";if(typeof f.toJSON=="function"){if(f=f.toJSON(d),typeof f!="object")return h(d,f,m);if(f===null)return "null"}if(m.indexOf(f)!==-1)return r;let g="";if(Array.isArray(f)){if(f.length===0)return "[]";if(n<m.length+1)return '"[Array]"';m.push(f);let b=Math.min(f.length,o),w=0;for(;w<b-1;w++){let N=h(String(w),f[w],m);g+=N!==void 0?N:"null",g+=",";}let D=h(String(w),f[w],m);if(g+=D!==void 0?D:"null",f.length-1>o){let N=f.length-o-1;g+=`,"... ${ps(N)} not stringified"`;}return m.pop(),`[${g}]`}let v=Object.keys(f),x=v.length;if(x===0)return "{}";if(n<m.length+1)return '"[Object]"';let _="",E=Math.min(x,o);mm(f)&&(g+=J2(f,",",o),v=v.slice(f.length),E-=f.length,_=","),s&&(v=pm(v)),m.push(f);for(let b=0;b<E;b++){let w=v[b],D=h(w,f[w],m);D!==void 0&&(g+=`${_}${hn(w)}:${D}`,_=",");}if(x>o){let b=x-o;g+=`${_}"...":"${ps(b)} not stringified"`;}return m.pop(),`{${g}}`}case"number":return isFinite(f)?String(f):e?e(f):"null";case"boolean":return f===!0?"true":"false";case"undefined":return;case"bigint":if(i)return String(f);default:return e?e(f):void 0}}function c(d,f,m){if(arguments.length>1){let g="";if(typeof m=="number"?g=" ".repeat(Math.min(m,10)):typeof m=="string"&&(g=m.slice(0,10)),f!=null){if(typeof f=="function")return a("",{"":d},[],f,g,"");if(Array.isArray(f))return u("",d,[],e6(f),g,"")}if(g.length!==0)return l("",d,[],g,"")}return h("",d,[])}return c}});var ym=$((hoe,eC)=>{var r6=_r(),{MESSAGE:i6}=Ut(),n6=Ja();function s6(t,e){return typeof e=="bigint"?e.toString():e}eC.exports=r6((t,e)=>{let r=n6.configure(e);return t[i6]=r(t,e.replacer||s6,e.space),t});});var rC=$((foe,tC)=>{var o6=_r();tC.exports=o6((t,e)=>e.message?(t.message=`[${e.label}] ${t.message}`,t):(t.label=e.label,t));});var nC=$((doe,iC)=>{var a6=_r(),{MESSAGE:u6}=Ut(),l6=Ja();iC.exports=a6(t=>{let e={};return t.message&&(e["@message"]=t.message,delete t.message),t.timestamp&&(e["@timestamp"]=t.timestamp,delete t.timestamp),e["@fields"]=t,t[u6]=l6(e),t});});var oC=$((poe,sC)=>{var c6=_r();function h6(t,e,r){let i=e.reduce((n,o)=>(n[o]=t[o],delete t[o],n),{}),s=Object.keys(t).reduce((n,o)=>(n[o]=t[o],delete t[o],n),{});return Object.assign(t,i,{[r]:s}),t}function f6(t,e,r){return t[r]=e.reduce((i,s)=>(i[s]=t[s],delete t[s],i),{}),t}sC.exports=c6((t,e={})=>{let r="metadata";e.key&&(r=e.key);let i=[];return !e.fillExcept&&!e.fillWith&&(i.push("level"),i.push("message")),e.fillExcept&&(i=e.fillExcept),i.length>0?h6(t,i,r):e.fillWith?f6(t,e.fillWith,r):t});});var uC=$((moe,aC)=>{var go=1e3,_o=go*60,yo=_o*60,gs=yo*24,d6=gs*7,p6=gs*365.25;aC.exports=function(t,e){e=e||{};var r=typeof t;if(r==="string"&&t.length>0)return m6(t);if(r==="number"&&isFinite(t))return e.long?_6(t):g6(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))};function m6(t){if(t=String(t),!(t.length>100)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var r=parseFloat(e[1]),i=(e[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"yrs":case"yr":case"y":return r*p6;case"weeks":case"week":case"w":return r*d6;case"days":case"day":case"d":return r*gs;case"hours":case"hour":case"hrs":case"hr":case"h":return r*yo;case"minutes":case"minute":case"mins":case"min":case"m":return r*_o;case"seconds":case"second":case"secs":case"sec":case"s":return r*go;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function g6(t){var e=Math.abs(t);return e>=gs?Math.round(t/gs)+"d":e>=yo?Math.round(t/yo)+"h":e>=_o?Math.round(t/_o)+"m":e>=go?Math.round(t/go)+"s":t+"ms"}function _6(t){var e=Math.abs(t);return e>=gs?Fc(t,e,gs,"day"):e>=yo?Fc(t,e,yo,"hour"):e>=_o?Fc(t,e,_o,"minute"):e>=go?Fc(t,e,go,"second"):t+" ms"}function Fc(t,e,r,i){var s=e>=r*1.5;return Math.round(t/r)+" "+i+(s?"s":"")}});var cC=$((Za,lC)=>{var y6=_r(),v6=uC();lC.exports=y6(t=>{let e=+new Date;return Za.diff=e-(Za.prevTime||e),Za.prevTime=e,t.ms=`+${v6(Za.diff)}`,t});});var dC=$((goe,fC)=>{var x6=ge("util").inspect,b6=_r(),{LEVEL:E6,MESSAGE:hC,SPLAT:C6}=Ut();fC.exports=b6((t,e={})=>{let r=Object.assign({},t);return delete r[E6],delete r[hC],delete r[C6],t[hC]=x6(r,!1,e.depth||null,e.colorize),t});});var pC=$((_oe,Pc)=>{var{MESSAGE:T6}=Ut(),Lc=class{constructor(e){this.template=e;}transform(e){return e[T6]=this.template(e),e}};Pc.exports=t=>new Lc(t);Pc.exports.Printf=Pc.exports.Format=Lc;});var _C=$((yoe,gC)=>{var A6=_r(),{MESSAGE:mC}=Ut(),w6=Ja();gC.exports=A6(t=>{let e=w6(Object.assign({},t,{level:void 0,message:void 0,splat:void 0})),r=t.padding&&t.padding[t.level]||"";return e!=="{}"?t[mC]=`${t.level}:${r} ${t.message} ${e}`:t[mC]=`${t.level}:${r} ${t.message}`,t});});var xC=$((voe,vC)=>{var D6=ge("util"),{SPLAT:yC}=Ut(),S6=/%[scdjifoO%]/g,R6=/%%/g,vm=class{constructor(e){this.options=e;}_splat(e,r){let i=e.message,s=e[yC]||e.splat||[],n=i.match(R6),o=n&&n.length||0,u=r.length-o-s.length,l=u<0?s.splice(u,-1*u):[],h=l.length;if(h)for(let c=0;c<h;c++)Object.assign(e,l[c]);return e.message=D6.format(i,...s),e}transform(e){let r=e.message,i=e[yC]||e.splat;if(!i||!i.length)return e;let s=r&&r.match&&r.match(S6);if(!s&&(i||i.length)){let n=i.length>1?i.splice(0):i,o=n.length;if(o)for(let a=0;a<o;a++)Object.assign(e,n[a]);return e}return s?this._splat(e,s):e}};vC.exports=t=>new vm(t);});var MC={};R4(MC,{assign:()=>pn,default:()=>M6,defaultI18n:()=>xm,format:()=>IC,parse:()=>kC,setGlobalDateI18n:()=>LC,setGlobalDateMasks:()=>PC});function NC(t,e){for(var r=[],i=0,s=t.length;i<s;i++)r.push(t[i].substr(0,e));return r}function pn(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];for(var i=0,s=e;i<s.length;i++){var n=s[i];for(var o in n)t[o]=n[o];}return t}function kC(t,e,r){if(r===void 0&&(r={}),typeof e!="string")throw new Error("Invalid format in fecha parse");if(e=kc[e]||e,t.length>1e3)return null;var i=new Date,s={year:i.getFullYear(),month:0,day:1,hour:0,minute:0,second:0,millisecond:0,isPm:null,timezoneOffset:null},n=[],o=[],a=e.replace(RC,function(b,w){return o.push(EC(w)),"@@@"}),u={},l={};a=EC(a).replace(SC,function(b){var w=I6[b],D=w[0],N=w[1],F=w[3];if(u[D])throw new Error("Invalid format. "+D+" specified twice in format");return u[D]=!0,F&&(l[F]=!0),n.push(w),"("+N+")"}),Object.keys(l).forEach(function(b){if(!u[b])throw new Error("Invalid format. "+b+" is required in specified format")}),a=a.replace(/@@@/g,function(){return o.shift()});var h=t.match(new RegExp(a,"i"));if(!h)return null;for(var c=pn(pn({},Ic),r),d=1;d<h.length;d++){var f=n[d-1],m=f[0],g=f[2],v=g?g(h[d],c):+h[d];if(v==null)return null;s[m]=v;}s.isPm===1&&s.hour!=null&&+s.hour!=12?s.hour=+s.hour+12:s.isPm===0&&+s.hour==12&&(s.hour=0);var x;if(s.timezoneOffset==null){x=new Date(s.year,s.month,s.day,s.hour,s.minute,s.second,s.millisecond);for(var _=[["month","getMonth"],["day","getDate"],["hour","getHours"],["minute","getMinutes"],["second","getSeconds"]],d=0,E=_.length;d<E;d++)if(u[_[d][0]]&&s[_[d][0]]!==x[_[d][1]]())return null}else if(x=new Date(Date.UTC(s.year,s.month,s.day,s.hour,s.minute-s.timezoneOffset,s.second,s.millisecond)),s.month>11||s.month<0||s.day>31||s.day<1||s.hour>23||s.hour<0||s.minute>59||s.minute<0||s.second>59||s.second<0)return null;return x}var SC,dn,fn,N6,O6,Xa,RC,bC,OC,FC,F6,L6,xm,Ic,LC,EC,yr,P6,CC,TC,AC,wC,DC,I6,kc,PC,IC,k6,M6,BC=S4(()=>{SC=/d{1,4}|M{1,4}|YY(?:YY)?|S{1,3}|Do|ZZ|Z|([HhMsDm])\1?|[aA]|"[^"]*"|'[^']*'/g,dn="\\d\\d?",fn="\\d\\d",N6="\\d{3}",O6="\\d{4}",Xa="[^\\s]+",RC=/\[([^]*?)\]/gm;bC=function(t){return function(e,r){var i=r[t].map(function(n){return n.toLowerCase()}),s=i.indexOf(e.toLowerCase());return s>-1?s:null}};OC=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],FC=["January","February","March","April","May","June","July","August","September","October","November","December"],F6=NC(FC,3),L6=NC(OC,3),xm={dayNamesShort:L6,dayNames:OC,monthNamesShort:F6,monthNames:FC,amPm:["am","pm"],DoFn:function(t){return t+["th","st","nd","rd"][t%10>3?0:(t-t%10!==10?1:0)*t%10]}},Ic=pn({},xm),LC=function(t){return Ic=pn(Ic,t)},EC=function(t){return t.replace(/[|\\{()[^$+*?.-]/g,"\\$&")},yr=function(t,e){for(e===void 0&&(e=2),t=String(t);t.length<e;)t="0"+t;return t},P6={D:function(t){return String(t.getDate())},DD:function(t){return yr(t.getDate())},Do:function(t,e){return e.DoFn(t.getDate())},d:function(t){return String(t.getDay())},dd:function(t){return yr(t.getDay())},ddd:function(t,e){return e.dayNamesShort[t.getDay()]},dddd:function(t,e){return e.dayNames[t.getDay()]},M:function(t){return String(t.getMonth()+1)},MM:function(t){return yr(t.getMonth()+1)},MMM:function(t,e){return e.monthNamesShort[t.getMonth()]},MMMM:function(t,e){return e.monthNames[t.getMonth()]},YY:function(t){return yr(String(t.getFullYear()),4).substr(2)},YYYY:function(t){return yr(t.getFullYear(),4)},h:function(t){return String(t.getHours()%12||12)},hh:function(t){return yr(t.getHours()%12||12)},H:function(t){return String(t.getHours())},HH:function(t){return yr(t.getHours())},m:function(t){return String(t.getMinutes())},mm:function(t){return yr(t.getMinutes())},s:function(t){return String(t.getSeconds())},ss:function(t){return yr(t.getSeconds())},S:function(t){return String(Math.round(t.getMilliseconds()/100))},SS:function(t){return yr(Math.round(t.getMilliseconds()/10),2)},SSS:function(t){return yr(t.getMilliseconds(),3)},a:function(t,e){return t.getHours()<12?e.amPm[0]:e.amPm[1]},A:function(t,e){return t.getHours()<12?e.amPm[0].toUpperCase():e.amPm[1].toUpperCase()},ZZ:function(t){var e=t.getTimezoneOffset();return (e>0?"-":"+")+yr(Math.floor(Math.abs(e)/60)*100+Math.abs(e)%60,4)},Z:function(t){var e=t.getTimezoneOffset();return (e>0?"-":"+")+yr(Math.floor(Math.abs(e)/60),2)+":"+yr(Math.abs(e)%60,2)}},CC=function(t){return +t-1},TC=[null,dn],AC=[null,Xa],wC=["isPm",Xa,function(t,e){var r=t.toLowerCase();return r===e.amPm[0]?0:r===e.amPm[1]?1:null}],DC=["timezoneOffset","[^\\s]*?[\\+\\-]\\d\\d:?\\d\\d|[^\\s]*?Z?",function(t){var e=(t+"").match(/([+-]|\d\d)/gi);if(e){var r=+e[1]*60+parseInt(e[2],10);return e[0]==="+"?r:-r}return 0}],I6={D:["day",dn],DD:["day",fn],Do:["day",dn+Xa,function(t){return parseInt(t,10)}],M:["month",dn,CC],MM:["month",fn,CC],YY:["year",fn,function(t){var e=new Date,r=+(""+e.getFullYear()).substr(0,2);return +(""+(+t>68?r-1:r)+t)}],h:["hour",dn,void 0,"isPm"],hh:["hour",fn,void 0,"isPm"],H:["hour",dn],HH:["hour",fn],m:["minute",dn],mm:["minute",fn],s:["second",dn],ss:["second",fn],YYYY:["year",O6],S:["millisecond","\\d",function(t){return +t*100}],SS:["millisecond",fn,function(t){return +t*10}],SSS:["millisecond",N6],d:TC,dd:TC,ddd:AC,dddd:AC,MMM:["month",Xa,bC("monthNamesShort")],MMMM:["month",Xa,bC("monthNames")],a:wC,A:wC,ZZ:DC,Z:DC},kc={default:"ddd MMM DD YYYY HH:mm:ss",shortDate:"M/D/YY",mediumDate:"MMM D, YYYY",longDate:"MMMM D, YYYY",fullDate:"dddd, MMMM D, YYYY",isoDate:"YYYY-MM-DD",isoDateTime:"YYYY-MM-DDTHH:mm:ssZ",shortTime:"HH:mm",mediumTime:"HH:mm:ss",longTime:"HH:mm:ss.SSS"},PC=function(t){return pn(kc,t)},IC=function(t,e,r){if(e===void 0&&(e=kc.default),r===void 0&&(r={}),typeof t=="number"&&(t=new Date(t)),Object.prototype.toString.call(t)!=="[object Date]"||isNaN(t.getTime()))throw new Error("Invalid Date pass to format");e=kc[e]||e;var i=[];e=e.replace(RC,function(n,o){return i.push(o),"@@@"});var s=pn(pn({},Ic),r);return e=e.replace(SC,function(n){return P6[n](t,s)}),e.replace(/@@@/g,function(){return i.shift()})};k6={format:IC,parse:kC,defaultI18n:xm,setGlobalDateI18n:LC,setGlobalDateMasks:PC},M6=k6;});var qC=$((xoe,jC)=>{var B6=(BC(),N4(MC)),j6=_r();jC.exports=j6((t,e={})=>(e.format&&(t.timestamp=typeof e.format=="function"?e.format():B6.format(new Date,e.format)),t.timestamp||(t.timestamp=new Date().toISOString()),e.alias&&(t[e.alias]=t.timestamp),t));});var UC=$((boe,HC)=>{var bm=rm(),q6=_r(),{MESSAGE:Em}=Ut();HC.exports=q6((t,e)=>(e.level!==!1&&(t.level=bm.strip(t.level)),e.message!==!1&&(t.message=bm.strip(String(t.message))),e.raw!==!1&&t[Em]&&(t[Em]=bm.strip(String(t[Em]))),t));});var Tm=$(Cm=>{var H6=Cm.format=_r();Cm.levels=q2();function er(t,e){Object.defineProperty(H6,t,{get(){return e()},configurable:!0});}er("align",function(){return U2()});er("errors",function(){return z2()});er("cli",function(){return G2()});er("combine",function(){return Y2()});er("colorize",function(){return Dc()});er("json",function(){return ym()});er("label",function(){return rC()});er("logstash",function(){return nC()});er("metadata",function(){return oC()});er("ms",function(){return cC()});er("padLevels",function(){return hm()});er("prettyPrint",function(){return dC()});er("printf",function(){return pC()});er("simple",function(){return _C()});er("splat",function(){return xC()});er("timestamp",function(){return qC()});er("uncolorize",function(){return UC()});});var Am=$(Mc=>{var{format:VC}=ge("util");Mc.warn={deprecated(t){return ()=>{throw new Error(VC("{ %s } was removed in winston@3.0.0.",t))}},useFormat(t){return ()=>{throw new Error([VC("{ %s } was removed in winston@3.0.0.",t),"Use a custom winston.format = winston.format(function) instead."].join(`
328
328
  `))}},forFunctions(t,e,r){r.forEach(i=>{t[i]=Mc.warn[e](i);});},forProperties(t,e,r){r.forEach(i=>{let s=Mc.warn[e](i);Object.defineProperty(t,i,{get:s,set:s});});}};});var $C=$((Toe,U6)=>{U6.exports={name:"winston",description:"A logger for just about everything.",version:"3.11.0",author:"Charlie Robbins <charlie.robbins@gmail.com>",maintainers:["David Hyde <dabh@alumni.stanford.edu>"],repository:{type:"git",url:"https://github.com/winstonjs/winston.git"},keywords:["winston","logger","logging","logs","sysadmin","bunyan","pino","loglevel","tools","json","stream"],dependencies:{"@dabh/diagnostics":"^2.0.2","@colors/colors":"^1.6.0",async:"^3.2.3","is-stream":"^2.0.0",logform:"^2.4.0","one-time":"^1.0.0","readable-stream":"^3.4.0","safe-stable-stringify":"^2.3.1","stack-trace":"0.0.x","triple-beam":"^1.3.0","winston-transport":"^4.5.0"},devDependencies:{"@babel/cli":"^7.17.0","@babel/core":"^7.17.2","@babel/preset-env":"^7.16.7","@dabh/eslint-config-populist":"^5.0.0","@types/node":"^20.3.1","abstract-winston-transport":"^0.5.1",assume:"^2.2.0","cross-spawn-async":"^2.2.5",eslint:"^8.9.0",hock:"^1.4.1",mocha:"8.1.3",nyc:"^15.1.0",rimraf:"^5.0.5",split2:"^4.1.0","std-mocks":"^1.0.1",through2:"^4.0.2","winston-compat":"^0.1.5"},main:"./lib/winston.js",browser:"./dist/winston",types:"./index.d.ts",scripts:{lint:"eslint lib/*.js lib/winston/*.js lib/winston/**/*.js --resolve-plugins-relative-to ./node_modules/@dabh/eslint-config-populist",test:"mocha","test:coverage":"nyc npm run test:unit","test:unit":"mocha test/unit","test:integration":"mocha test/integration",build:"rimraf dist && babel lib -d dist",prepublishOnly:"npm run build"},engines:{node:">= 12.0.0"},license:"MIT"};});var KC=$((Aoe,zC)=>{zC.exports=ge("util").deprecate;});var wm=$((woe,GC)=>{GC.exports=ge("stream");});var Sm=$((Doe,YC)=>{function V6(t,e){var r=this,i=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return i||s?(e?e(t):t&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(Dm,this,t)):process.nextTick(Dm,this,t)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(t||null,function(n){!e&&n?r._writableState?r._writableState.errorEmitted?process.nextTick(Bc,r):(r._writableState.errorEmitted=!0,process.nextTick(WC,r,n)):process.nextTick(WC,r,n):e?(process.nextTick(Bc,r),e(n)):process.nextTick(Bc,r);}),this)}function WC(t,e){Dm(t,e),Bc(t);}function Bc(t){t._writableState&&!t._writableState.emitClose||t._readableState&&!t._readableState.emitClose||t.emit("close");}function $6(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1);}function Dm(t,e){t.emit("error",e);}function z6(t,e){var r=t._readableState,i=t._writableState;r&&r.autoDestroy||i&&i.autoDestroy?t.destroy(e):t.emit("error",e);}YC.exports={destroy:V6,undestroy:$6,errorOrDestroy:z6};});var mn=$((Soe,XC)=>{var ZC={};function kr(t,e,r){r||(r=Error);function i(n,o,a){return typeof e=="string"?e:e(n,o,a)}class s extends r{constructor(o,a,u){super(i(o,a,u));}}s.prototype.name=r.name,s.prototype.code=t,ZC[t]=s;}function JC(t,e){if(Array.isArray(t)){let r=t.length;return t=t.map(i=>String(i)),r>2?`one of ${e} ${t.slice(0,r-1).join(", ")}, or `+t[r-1]:r===2?`one of ${e} ${t[0]} or ${t[1]}`:`of ${e} ${t[0]}`}else return `of ${e} ${String(t)}`}function K6(t,e,r){return t.substr(!r||r<0?0:+r,e.length)===e}function G6(t,e,r){return (r===void 0||r>t.length)&&(r=t.length),t.substring(r-e.length,r)===e}function W6(t,e,r){return typeof r!="number"&&(r=0),r+e.length>t.length?!1:t.indexOf(e,r)!==-1}kr("ERR_INVALID_OPT_VALUE",function(t,e){return 'The value "'+e+'" is invalid for option "'+t+'"'},TypeError);kr("ERR_INVALID_ARG_TYPE",function(t,e,r){let i;typeof e=="string"&&K6(e,"not ")?(i="must not be",e=e.replace(/^not /,"")):i="must be";let s;if(G6(t," argument"))s=`The ${t} ${i} ${JC(e,"type")}`;else {let n=W6(t,".")?"property":"argument";s=`The "${t}" ${n} ${i} ${JC(e,"type")}`;}return s+=`. Received type ${typeof r}`,s},TypeError);kr("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");kr("ERR_METHOD_NOT_IMPLEMENTED",function(t){return "The "+t+" method is not implemented"});kr("ERR_STREAM_PREMATURE_CLOSE","Premature close");kr("ERR_STREAM_DESTROYED",function(t){return "Cannot call "+t+" after a stream was destroyed"});kr("ERR_MULTIPLE_CALLBACK","Callback called multiple times");kr("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");kr("ERR_STREAM_WRITE_AFTER_END","write after end");kr("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);kr("ERR_UNKNOWN_ENCODING",function(t){return "Unknown encoding: "+t},TypeError);kr("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");XC.exports.codes=ZC;});var Rm=$((Roe,QC)=>{var Y6=mn().codes.ERR_INVALID_OPT_VALUE;function J6(t,e,r){return t.highWaterMark!=null?t.highWaterMark:e?t[r]:null}function Z6(t,e,r,i){var s=J6(e,i,r);if(s!=null){if(!(isFinite(s)&&Math.floor(s)===s)||s<0){var n=i?r:"highWaterMark";throw new Y6(n,s)}return Math.floor(s)}return t.objectMode?16:16*1024}QC.exports={getHighWaterMark:Z6};});var eT=$((Noe,Nm)=>{typeof Object.create=="function"?Nm.exports=function(e,r){r&&(e.super_=r,e.prototype=Object.create(r.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}));}:Nm.exports=function(e,r){if(r){e.super_=r;var i=function(){};i.prototype=r.prototype,e.prototype=new i,e.prototype.constructor=e;}};});var vo=$((Ooe,Fm)=>{try{if(Om=ge("util"),typeof Om.inherits!="function")throw "";Fm.exports=Om.inherits;}catch(t){Fm.exports=eT();}var Om;});var oT=$((Foe,sT)=>{function tT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,i);}return r}function rT(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?tT(Object(r),!0).forEach(function(i){X6(t,i,r[i]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):tT(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i));});}return t}function X6(t,e,r){return e=nT(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Q6(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function iT(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,nT(i.key),i);}}function ek(t,e,r){return e&&iT(t.prototype,e),r&&iT(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function nT(t){var e=tk(t,"string");return typeof e=="symbol"?e:String(e)}function tk(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return (e==="string"?String:Number)(t)}var rk=ge("buffer"),jc=rk.Buffer,ik=ge("util"),Lm=ik.inspect,nk=Lm&&Lm.custom||"inspect";function sk(t,e,r){jc.prototype.copy.call(t,e,r);}sT.exports=function(){function t(){Q6(this,t),this.head=null,this.tail=null,this.length=0;}return ek(t,[{key:"push",value:function(r){var i={data:r,next:null};this.length>0?this.tail.next=i:this.head=i,this.tail=i,++this.length;}},{key:"unshift",value:function(r){var i={data:r,next:this.head};this.length===0&&(this.tail=i),this.head=i,++this.length;}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0;}},{key:"join",value:function(r){if(this.length===0)return "";for(var i=this.head,s=""+i.data;i=i.next;)s+=r+i.data;return s}},{key:"concat",value:function(r){if(this.length===0)return jc.alloc(0);for(var i=jc.allocUnsafe(r>>>0),s=this.head,n=0;s;)sk(s.data,i,n),n+=s.data.length,s=s.next;return i}},{key:"consume",value:function(r,i){var s;return r<this.head.data.length?(s=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):r===this.head.data.length?s=this.shift():s=i?this._getString(r):this._getBuffer(r),s}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var i=this.head,s=1,n=i.data;for(r-=n.length;i=i.next;){var o=i.data,a=r>o.length?o.length:r;if(a===o.length?n+=o:n+=o.slice(0,r),r-=a,r===0){a===o.length?(++s,i.next?this.head=i.next:this.head=this.tail=null):(this.head=i,i.data=o.slice(a));break}++s;}return this.length-=s,n}},{key:"_getBuffer",value:function(r){var i=jc.allocUnsafe(r),s=this.head,n=1;for(s.data.copy(i),r-=s.data.length;s=s.next;){var o=s.data,a=r>o.length?o.length:r;if(o.copy(i,i.length-r,0,a),r-=a,r===0){a===o.length?(++n,s.next?this.head=s.next:this.head=this.tail=null):(this.head=s,s.data=o.slice(a));break}++n;}return this.length-=n,i}},{key:nk,value:function(r,i){return Lm(this,rT(rT({},i),{},{depth:0,customInspect:!1}))}}]),t}();});var lT=$((Pm,uT)=>{var qc=ge("buffer"),ri=qc.Buffer;function aT(t,e){for(var r in t)e[r]=t[r];}ri.from&&ri.alloc&&ri.allocUnsafe&&ri.allocUnsafeSlow?uT.exports=qc:(aT(qc,Pm),Pm.Buffer=_s);function _s(t,e,r){return ri(t,e,r)}_s.prototype=Object.create(ri.prototype);aT(ri,_s);_s.from=function(t,e,r){if(typeof t=="number")throw new TypeError("Argument must not be a number");return ri(t,e,r)};_s.alloc=function(t,e,r){if(typeof t!="number")throw new TypeError("Argument must be a number");var i=ri(t);return e!==void 0?typeof r=="string"?i.fill(e,r):i.fill(e):i.fill(0),i};_s.allocUnsafe=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return ri(t)};_s.allocUnsafeSlow=function(t){if(typeof t!="number")throw new TypeError("Argument must be a number");return qc.SlowBuffer(t)};});var Mm=$(hT=>{var km=lT().Buffer,cT=km.isEncoding||function(t){switch(t=""+t,t&&t.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return !0;default:return !1}};function ok(t){if(!t)return "utf8";for(var e;;)switch(t){case"utf8":case"utf-8":return "utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return "utf16le";case"latin1":case"binary":return "latin1";case"base64":case"ascii":case"hex":return t;default:if(e)return;t=(""+t).toLowerCase(),e=!0;}}function ak(t){var e=ok(t);if(typeof e!="string"&&(km.isEncoding===cT||!cT(t)))throw new Error("Unknown encoding: "+t);return e||t}hT.StringDecoder=Qa;function Qa(t){this.encoding=ak(t);var e;switch(this.encoding){case"utf16le":this.text=dk,this.end=pk,e=4;break;case"utf8":this.fillLast=ck,e=4;break;case"base64":this.text=mk,this.end=gk,e=3;break;default:this.write=_k,this.end=yk;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=km.allocUnsafe(e);}Qa.prototype.write=function(t){if(t.length===0)return "";var e,r;if(this.lastNeed){if(e=this.fillLast(t),e===void 0)return "";r=this.lastNeed,this.lastNeed=0;}else r=0;return r<t.length?e?e+this.text(t,r):this.text(t,r):e||""};Qa.prototype.end=fk;Qa.prototype.text=hk;Qa.prototype.fillLast=function(t){if(this.lastNeed<=t.length)return t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,this.lastTotal-this.lastNeed,0,t.length),this.lastNeed-=t.length;};function Im(t){return t<=127?0:t>>5===6?2:t>>4===14?3:t>>3===30?4:t>>6===2?-1:-2}function uk(t,e,r){var i=e.length-1;if(i<r)return 0;var s=Im(e[i]);return s>=0?(s>0&&(t.lastNeed=s-1),s):--i<r||s===-2?0:(s=Im(e[i]),s>=0?(s>0&&(t.lastNeed=s-2),s):--i<r||s===-2?0:(s=Im(e[i]),s>=0?(s>0&&(s===2?s=0:t.lastNeed=s-3),s):0))}function lk(t,e,r){if((e[0]&192)!==128)return t.lastNeed=0,"\uFFFD";if(t.lastNeed>1&&e.length>1){if((e[1]&192)!==128)return t.lastNeed=1,"\uFFFD";if(t.lastNeed>2&&e.length>2&&(e[2]&192)!==128)return t.lastNeed=2,"\uFFFD"}}function ck(t){var e=this.lastTotal-this.lastNeed,r=lk(this,t);if(r!==void 0)return r;if(this.lastNeed<=t.length)return t.copy(this.lastChar,e,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);t.copy(this.lastChar,e,0,t.length),this.lastNeed-=t.length;}function hk(t,e){var r=uk(this,t,e);if(!this.lastNeed)return t.toString("utf8",e);this.lastTotal=r;var i=t.length-(r-this.lastNeed);return t.copy(this.lastChar,0,i),t.toString("utf8",e,i)}function fk(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+"\uFFFD":e}function dk(t,e){if((t.length-e)%2===0){var r=t.toString("utf16le",e);if(r){var i=r.charCodeAt(r.length-1);if(i>=55296&&i<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=t[t.length-1],t.toString("utf16le",e,t.length-1)}function pk(t){var e=t&&t.length?this.write(t):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return e+this.lastChar.toString("utf16le",0,r)}return e}function mk(t,e){var r=(t.length-e)%3;return r===0?t.toString("base64",e):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=t[t.length-1]:(this.lastChar[0]=t[t.length-2],this.lastChar[1]=t[t.length-1]),t.toString("base64",e,t.length-r))}function gk(t){var e=t&&t.length?this.write(t):"";return this.lastNeed?e+this.lastChar.toString("base64",0,3-this.lastNeed):e}function _k(t){return t.toString(this.encoding)}function yk(t){return t&&t.length?this.write(t):""}});var Hc=$((Poe,pT)=>{var fT=mn().codes.ERR_STREAM_PREMATURE_CLOSE;function vk(t){var e=!1;return function(){if(!e){e=!0;for(var r=arguments.length,i=new Array(r),s=0;s<r;s++)i[s]=arguments[s];t.apply(this,i);}}}function xk(){}function bk(t){return t.setHeader&&typeof t.abort=="function"}function dT(t,e,r){if(typeof e=="function")return dT(t,null,e);e||(e={}),r=vk(r||xk);var i=e.readable||e.readable!==!1&&t.readable,s=e.writable||e.writable!==!1&&t.writable,n=function(){t.writable||a();},o=t._writableState&&t._writableState.finished,a=function(){s=!1,o=!0,i||r.call(t);},u=t._readableState&&t._readableState.endEmitted,l=function(){i=!1,u=!0,s||r.call(t);},h=function(m){r.call(t,m);},c=function(){var m;if(i&&!u)return (!t._readableState||!t._readableState.ended)&&(m=new fT),r.call(t,m);if(s&&!o)return (!t._writableState||!t._writableState.ended)&&(m=new fT),r.call(t,m)},d=function(){t.req.on("finish",a);};return bk(t)?(t.on("complete",a),t.on("abort",c),t.req?d():t.on("request",d)):s&&!t._writableState&&(t.on("end",n),t.on("close",n)),t.on("end",l),t.on("finish",a),e.error!==!1&&t.on("error",h),t.on("close",c),function(){t.removeListener("complete",a),t.removeListener("abort",c),t.removeListener("request",d),t.req&&t.req.removeListener("finish",a),t.removeListener("end",n),t.removeListener("close",n),t.removeListener("finish",a),t.removeListener("end",l),t.removeListener("error",h),t.removeListener("close",c);}}pT.exports=dT;});var gT=$((Ioe,mT)=>{var Uc;function gn(t,e,r){return e=Ek(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ek(t){var e=Ck(t,"string");return typeof e=="symbol"?e:String(e)}function Ck(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return (e==="string"?String:Number)(t)}var Tk=Hc(),_n=Symbol("lastResolve"),ys=Symbol("lastReject"),eu=Symbol("error"),Vc=Symbol("ended"),vs=Symbol("lastPromise"),Bm=Symbol("handlePromise"),xs=Symbol("stream");function yn(t,e){return {value:t,done:e}}function Ak(t){var e=t[_n];if(e!==null){var r=t[xs].read();r!==null&&(t[vs]=null,t[_n]=null,t[ys]=null,e(yn(r,!1)));}}function wk(t){process.nextTick(Ak,t);}function Dk(t,e){return function(r,i){t.then(function(){if(e[Vc]){r(yn(void 0,!0));return}e[Bm](r,i);},i);}}var Sk=Object.getPrototypeOf(function(){}),Rk=Object.setPrototypeOf((Uc={get stream(){return this[xs]},next:function(){var e=this,r=this[eu];if(r!==null)return Promise.reject(r);if(this[Vc])return Promise.resolve(yn(void 0,!0));if(this[xs].destroyed)return new Promise(function(o,a){process.nextTick(function(){e[eu]?a(e[eu]):o(yn(void 0,!0));});});var i=this[vs],s;if(i)s=new Promise(Dk(i,this));else {var n=this[xs].read();if(n!==null)return Promise.resolve(yn(n,!1));s=new Promise(this[Bm]);}return this[vs]=s,s}},gn(Uc,Symbol.asyncIterator,function(){return this}),gn(Uc,"return",function(){var e=this;return new Promise(function(r,i){e[xs].destroy(null,function(s){if(s){i(s);return}r(yn(void 0,!0));});})}),Uc),Sk),Nk=function(e){var r,i=Object.create(Rk,(r={},gn(r,xs,{value:e,writable:!0}),gn(r,_n,{value:null,writable:!0}),gn(r,ys,{value:null,writable:!0}),gn(r,eu,{value:null,writable:!0}),gn(r,Vc,{value:e._readableState.endEmitted,writable:!0}),gn(r,Bm,{value:function(n,o){var a=i[xs].read();a?(i[vs]=null,i[_n]=null,i[ys]=null,n(yn(a,!1))):(i[_n]=n,i[ys]=o);},writable:!0}),r));return i[vs]=null,Tk(e,function(s){if(s&&s.code!=="ERR_STREAM_PREMATURE_CLOSE"){var n=i[ys];n!==null&&(i[vs]=null,i[_n]=null,i[ys]=null,n(s)),i[eu]=s;return}var o=i[_n];o!==null&&(i[vs]=null,i[_n]=null,i[ys]=null,o(yn(void 0,!0))),i[Vc]=!0;}),e.on("readable",wk.bind(null,i)),i};mT.exports=Nk;});var xT=$((koe,vT)=>{function _T(t,e,r,i,s,n,o){try{var a=t[n](o),u=a.value;}catch(l){r(l);return}a.done?e(u):Promise.resolve(u).then(i,s);}function Ok(t){return function(){var e=this,r=arguments;return new Promise(function(i,s){var n=t.apply(e,r);function o(u){_T(n,i,s,o,a,"next",u);}function a(u){_T(n,i,s,o,a,"throw",u);}o(void 0);})}}function yT(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(s){return Object.getOwnPropertyDescriptor(t,s).enumerable})),r.push.apply(r,i);}return r}function Fk(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?yT(Object(r),!0).forEach(function(i){Lk(t,i,r[i]);}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):yT(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i));});}return t}function Lk(t,e,r){return e=Pk(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Pk(t){var e=Ik(t,"string");return typeof e=="symbol"?e:String(e)}function Ik(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e||"default");if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return (e==="string"?String:Number)(t)}var kk=mn().codes.ERR_INVALID_ARG_TYPE;function Mk(t,e,r){var i;if(e&&typeof e.next=="function")i=e;else if(e&&e[Symbol.asyncIterator])i=e[Symbol.asyncIterator]();else if(e&&e[Symbol.iterator])i=e[Symbol.iterator]();else throw new kk("iterable",["Iterable"],e);var s=new t(Fk({objectMode:!0},r)),n=!1;s._read=function(){n||(n=!0,o());};function o(){return a.apply(this,arguments)}function a(){return a=Ok(function*(){try{var u=yield i.next(),l=u.value,h=u.done;h?s.push(null):s.push(yield l)?o():n=!1;}catch(c){s.destroy(c);}}),a.apply(this,arguments)}return s}vT.exports=Mk;});var Wm=$((Boe,NT)=>{NT.exports=Je;var xo;Je.ReadableState=TT;ge("events").EventEmitter;var CT=function(e,r){return e.listeners(r).length},ru=wm(),$c=ge("buffer").Buffer,Bk=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function jk(t){return $c.from(t)}function qk(t){return $c.isBuffer(t)||t instanceof Bk}var jm=ge("util"),$e;jm&&jm.debuglog?$e=jm.debuglog("stream"):$e=function(){};var Hk=oT(),Km=Sm(),Uk=Rm(),Vk=Uk.getHighWaterMark,zc=mn().codes,$k=zc.ERR_INVALID_ARG_TYPE,zk=zc.ERR_STREAM_PUSH_AFTER_EOF,Kk=zc.ERR_METHOD_NOT_IMPLEMENTED,Gk=zc.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,bo,qm,Hm;vo()(Je,ru);var tu=Km.errorOrDestroy,Um=["error","close","destroy","pause","resume"];function Wk(t,e,r){if(typeof t.prependListener=="function")return t.prependListener(e,r);!t._events||!t._events[e]?t.on(e,r):Array.isArray(t._events[e])?t._events[e].unshift(r):t._events[e]=[r,t._events[e]];}function TT(t,e,r){xo=xo||bs(),t=t||{},typeof r!="boolean"&&(r=e instanceof xo),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.readableObjectMode),this.highWaterMark=Vk(this,t,"readableHighWaterMark",r),this.buffer=new Hk,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.destroyed=!1,this.defaultEncoding=t.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,t.encoding&&(bo||(bo=Mm().StringDecoder),this.decoder=new bo(t.encoding),this.encoding=t.encoding);}function Je(t){if(xo=xo||bs(),!(this instanceof Je))return new Je(t);var e=this instanceof xo;this._readableState=new TT(t,this,e),this.readable=!0,t&&(typeof t.read=="function"&&(this._read=t.read),typeof t.destroy=="function"&&(this._destroy=t.destroy)),ru.call(this);}Object.defineProperty(Je.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e);}});Je.prototype.destroy=Km.destroy;Je.prototype._undestroy=Km.undestroy;Je.prototype._destroy=function(t,e){e(t);};Je.prototype.push=function(t,e){var r=this._readableState,i;return r.objectMode?i=!0:typeof t=="string"&&(e=e||r.defaultEncoding,e!==r.encoding&&(t=$c.from(t,e),e=""),i=!0),AT(this,t,e,!1,i)};Je.prototype.unshift=function(t){return AT(this,t,null,!0,!1)};function AT(t,e,r,i,s){$e("readableAddChunk",e);var n=t._readableState;if(e===null)n.reading=!1,Zk(t,n);else {var o;if(s||(o=Yk(n,e)),o)tu(t,o);else if(n.objectMode||e&&e.length>0)if(typeof e!="string"&&!n.objectMode&&Object.getPrototypeOf(e)!==$c.prototype&&(e=jk(e)),i)n.endEmitted?tu(t,new Gk):Vm(t,n,e,!0);else if(n.ended)tu(t,new zk);else {if(n.destroyed)return !1;n.reading=!1,n.decoder&&!r?(e=n.decoder.write(e),n.objectMode||e.length!==0?Vm(t,n,e,!1):zm(t,n)):Vm(t,n,e,!1);}else i||(n.reading=!1,zm(t,n));}return !n.ended&&(n.length<n.highWaterMark||n.length===0)}function Vm(t,e,r,i){e.flowing&&e.length===0&&!e.sync?(e.awaitDrain=0,t.emit("data",r)):(e.length+=e.objectMode?1:r.length,i?e.buffer.unshift(r):e.buffer.push(r),e.needReadable&&Kc(t)),zm(t,e);}function Yk(t,e){var r;return !qk(e)&&typeof e!="string"&&e!==void 0&&!t.objectMode&&(r=new $k("chunk",["string","Buffer","Uint8Array"],e)),r}Je.prototype.isPaused=function(){return this._readableState.flowing===!1};Je.prototype.setEncoding=function(t){bo||(bo=Mm().StringDecoder);var e=new bo(t);this._readableState.decoder=e,this._readableState.encoding=this._readableState.decoder.encoding;for(var r=this._readableState.buffer.head,i="";r!==null;)i+=e.write(r.data),r=r.next;return this._readableState.buffer.clear(),i!==""&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var bT=1073741824;function Jk(t){return t>=bT?t=bT:(t--,t|=t>>>1,t|=t>>>2,t|=t>>>4,t|=t>>>8,t|=t>>>16,t++),t}function ET(t,e){return t<=0||e.length===0&&e.ended?0:e.objectMode?1:t!==t?e.flowing&&e.length?e.buffer.head.data.length:e.length:(t>e.highWaterMark&&(e.highWaterMark=Jk(t)),t<=e.length?t:e.ended?e.length:(e.needReadable=!0,0))}Je.prototype.read=function(t){$e("read",t),t=parseInt(t,10);var e=this._readableState,r=t;if(t!==0&&(e.emittedReadable=!1),t===0&&e.needReadable&&((e.highWaterMark!==0?e.length>=e.highWaterMark:e.length>0)||e.ended))return $e("read: emitReadable",e.length,e.ended),e.length===0&&e.ended?$m(this):Kc(this),null;if(t=ET(t,e),t===0&&e.ended)return e.length===0&&$m(this),null;var i=e.needReadable;$e("need readable",i),(e.length===0||e.length-t<e.highWaterMark)&&(i=!0,$e("length less than watermark",i)),e.ended||e.reading?(i=!1,$e("reading or ended",i)):i&&($e("do read"),e.reading=!0,e.sync=!0,e.length===0&&(e.needReadable=!0),this._read(e.highWaterMark),e.sync=!1,e.reading||(t=ET(r,e)));var s;return t>0?s=ST(t,e):s=null,s===null?(e.needReadable=e.length<=e.highWaterMark,t=0):(e.length-=t,e.awaitDrain=0),e.length===0&&(e.ended||(e.needReadable=!0),r!==t&&e.ended&&$m(this)),s!==null&&this.emit("data",s),s};function Zk(t,e){if($e("onEofChunk"),!e.ended){if(e.decoder){var r=e.decoder.end();r&&r.length&&(e.buffer.push(r),e.length+=e.objectMode?1:r.length);}e.ended=!0,e.sync?Kc(t):(e.needReadable=!1,e.emittedReadable||(e.emittedReadable=!0,wT(t)));}}function Kc(t){var e=t._readableState;$e("emitReadable",e.needReadable,e.emittedReadable),e.needReadable=!1,e.emittedReadable||($e("emitReadable",e.flowing),e.emittedReadable=!0,process.nextTick(wT,t));}function wT(t){var e=t._readableState;$e("emitReadable_",e.destroyed,e.length,e.ended),!e.destroyed&&(e.length||e.ended)&&(t.emit("readable"),e.emittedReadable=!1),e.needReadable=!e.flowing&&!e.ended&&e.length<=e.highWaterMark,Gm(t);}function zm(t,e){e.readingMore||(e.readingMore=!0,process.nextTick(Xk,t,e));}function Xk(t,e){for(;!e.reading&&!e.ended&&(e.length<e.highWaterMark||e.flowing&&e.length===0);){var r=e.length;if($e("maybeReadMore read 0"),t.read(0),r===e.length)break}e.readingMore=!1;}Je.prototype._read=function(t){tu(this,new Kk("_read()"));};Je.prototype.pipe=function(t,e){var r=this,i=this._readableState;switch(i.pipesCount){case 0:i.pipes=t;break;case 1:i.pipes=[i.pipes,t];break;default:i.pipes.push(t);break}i.pipesCount+=1,$e("pipe count=%d opts=%j",i.pipesCount,e);var s=(!e||e.end!==!1)&&t!==process.stdout&&t!==process.stderr,n=s?a:g;i.endEmitted?process.nextTick(n):r.once("end",n),t.on("unpipe",o);function o(v,x){$e("onunpipe"),v===r&&x&&x.hasUnpiped===!1&&(x.hasUnpiped=!0,h());}function a(){$e("onend"),t.end();}var u=Qk(r);t.on("drain",u);var l=!1;function h(){$e("cleanup"),t.removeListener("close",f),t.removeListener("finish",m),t.removeListener("drain",u),t.removeListener("error",d),t.removeListener("unpipe",o),r.removeListener("end",a),r.removeListener("end",g),r.removeListener("data",c),l=!0,i.awaitDrain&&(!t._writableState||t._writableState.needDrain)&&u();}r.on("data",c);function c(v){$e("ondata");var x=t.write(v);$e("dest.write",x),x===!1&&((i.pipesCount===1&&i.pipes===t||i.pipesCount>1&&RT(i.pipes,t)!==-1)&&!l&&($e("false write response, pause",i.awaitDrain),i.awaitDrain++),r.pause());}function d(v){$e("onerror",v),g(),t.removeListener("error",d),CT(t,"error")===0&&tu(t,v);}Wk(t,"error",d);function f(){t.removeListener("finish",m),g();}t.once("close",f);function m(){$e("onfinish"),t.removeListener("close",f),g();}t.once("finish",m);function g(){$e("unpipe"),r.unpipe(t);}return t.emit("pipe",r),i.flowing||($e("pipe resume"),r.resume()),t};function Qk(t){return function(){var r=t._readableState;$e("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&CT(t,"data")&&(r.flowing=!0,Gm(t));}}Je.prototype.unpipe=function(t){var e=this._readableState,r={hasUnpiped:!1};if(e.pipesCount===0)return this;if(e.pipesCount===1)return t&&t!==e.pipes?this:(t||(t=e.pipes),e.pipes=null,e.pipesCount=0,e.flowing=!1,t&&t.emit("unpipe",this,r),this);if(!t){var i=e.pipes,s=e.pipesCount;e.pipes=null,e.pipesCount=0,e.flowing=!1;for(var n=0;n<s;n++)i[n].emit("unpipe",this,{hasUnpiped:!1});return this}var o=RT(e.pipes,t);return o===-1?this:(e.pipes.splice(o,1),e.pipesCount-=1,e.pipesCount===1&&(e.pipes=e.pipes[0]),t.emit("unpipe",this,r),this)};Je.prototype.on=function(t,e){var r=ru.prototype.on.call(this,t,e),i=this._readableState;return t==="data"?(i.readableListening=this.listenerCount("readable")>0,i.flowing!==!1&&this.resume()):t==="readable"&&!i.endEmitted&&!i.readableListening&&(i.readableListening=i.needReadable=!0,i.flowing=!1,i.emittedReadable=!1,$e("on readable",i.length,i.reading),i.length?Kc(this):i.reading||process.nextTick(eM,this)),r};Je.prototype.addListener=Je.prototype.on;Je.prototype.removeListener=function(t,e){var r=ru.prototype.removeListener.call(this,t,e);return t==="readable"&&process.nextTick(DT,this),r};Je.prototype.removeAllListeners=function(t){var e=ru.prototype.removeAllListeners.apply(this,arguments);return (t==="readable"||t===void 0)&&process.nextTick(DT,this),e};function DT(t){var e=t._readableState;e.readableListening=t.listenerCount("readable")>0,e.resumeScheduled&&!e.paused?e.flowing=!0:t.listenerCount("data")>0&&t.resume();}function eM(t){$e("readable nexttick read 0"),t.read(0);}Je.prototype.resume=function(){var t=this._readableState;return t.flowing||($e("resume"),t.flowing=!t.readableListening,tM(this,t)),t.paused=!1,this};function tM(t,e){e.resumeScheduled||(e.resumeScheduled=!0,process.nextTick(rM,t,e));}function rM(t,e){$e("resume",e.reading),e.reading||t.read(0),e.resumeScheduled=!1,t.emit("resume"),Gm(t),e.flowing&&!e.reading&&t.read(0);}Je.prototype.pause=function(){return $e("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&($e("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function Gm(t){var e=t._readableState;for($e("flow",e.flowing);e.flowing&&t.read()!==null;);}Je.prototype.wrap=function(t){var e=this,r=this._readableState,i=!1;t.on("end",function(){if($e("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&e.push(o);}e.push(null);}),t.on("data",function(o){if($e("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var a=e.push(o);a||(i=!0,t.pause());}});for(var s in t)this[s]===void 0&&typeof t[s]=="function"&&(this[s]=function(a){return function(){return t[a].apply(t,arguments)}}(s));for(var n=0;n<Um.length;n++)t.on(Um[n],this.emit.bind(this,Um[n]));return this._read=function(o){$e("wrapped _read",o),i&&(i=!1,t.resume());},this};typeof Symbol=="function"&&(Je.prototype[Symbol.asyncIterator]=function(){return qm===void 0&&(qm=gT()),qm(this)});Object.defineProperty(Je.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}});Object.defineProperty(Je.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}});Object.defineProperty(Je.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e);}});Je._fromList=ST;Object.defineProperty(Je.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function ST(t,e){if(e.length===0)return null;var r;return e.objectMode?r=e.buffer.shift():!t||t>=e.length?(e.decoder?r=e.buffer.join(""):e.buffer.length===1?r=e.buffer.first():r=e.buffer.concat(e.length),e.buffer.clear()):r=e.buffer.consume(t,e.decoder),r}function $m(t){var e=t._readableState;$e("endReadable",e.endEmitted),e.endEmitted||(e.ended=!0,process.nextTick(iM,e,t));}function iM(t,e){if($e("endReadableNT",t.endEmitted,t.length),!t.endEmitted&&t.length===0&&(t.endEmitted=!0,e.readable=!1,e.emit("end"),t.autoDestroy)){var r=e._writableState;(!r||r.autoDestroy&&r.finished)&&e.destroy();}}typeof Symbol=="function"&&(Je.from=function(t,e){return Hm===void 0&&(Hm=xT()),Hm(Je,t,e)});function RT(t,e){for(var r=0,i=t.length;r<i;r++)if(t[r]===e)return r;return -1}});var bs=$((joe,FT)=>{var nM=Object.keys||function(t){var e=[];for(var r in t)e.push(r);return e};FT.exports=ii;var OT=Wm(),Jm=Yc();vo()(ii,OT);for(Ym=nM(Jm.prototype),Gc=0;Gc<Ym.length;Gc++)Wc=Ym[Gc],ii.prototype[Wc]||(ii.prototype[Wc]=Jm.prototype[Wc]);var Ym,Wc,Gc;function ii(t){if(!(this instanceof ii))return new ii(t);OT.call(this,t),Jm.call(this,t),this.allowHalfOpen=!0,t&&(t.readable===!1&&(this.readable=!1),t.writable===!1&&(this.writable=!1),t.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",sM)));}Object.defineProperty(ii.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});Object.defineProperty(ii.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});Object.defineProperty(ii.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function sM(){this._writableState.ended||process.nextTick(oM,this);}function oM(t){t.end();}Object.defineProperty(ii.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(e){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=e,this._writableState.destroyed=e);}});});var Yc=$((qoe,BT)=>{BT.exports=kt;function PT(t){var e=this;this.next=null,this.entry=null,this.finish=function(){LM(e,t);};}var Eo;kt.WritableState=nu;var aM={deprecate:KC()},IT=wm(),Zc=ge("buffer").Buffer,uM=(typeof global!="undefined"?global:typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function lM(t){return Zc.from(t)}function cM(t){return Zc.isBuffer(t)||t instanceof uM}var Xm=Sm(),hM=Rm(),fM=hM.getHighWaterMark,vn=mn().codes,dM=vn.ERR_INVALID_ARG_TYPE,pM=vn.ERR_METHOD_NOT_IMPLEMENTED,mM=vn.ERR_MULTIPLE_CALLBACK,gM=vn.ERR_STREAM_CANNOT_PIPE,_M=vn.ERR_STREAM_DESTROYED,yM=vn.ERR_STREAM_NULL_VALUES,vM=vn.ERR_STREAM_WRITE_AFTER_END,xM=vn.ERR_UNKNOWN_ENCODING,Co=Xm.errorOrDestroy;vo()(kt,IT);function bM(){}function nu(t,e,r){Eo=Eo||bs(),t=t||{},typeof r!="boolean"&&(r=e instanceof Eo),this.objectMode=!!t.objectMode,r&&(this.objectMode=this.objectMode||!!t.writableObjectMode),this.highWaterMark=fM(this,t,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var i=t.decodeStrings===!1;this.decodeStrings=!i,this.defaultEncoding=t.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(s){SM(e,s);},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=t.emitClose!==!1,this.autoDestroy=!!t.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new PT(this);}nu.prototype.getBuffer=function(){for(var e=this.bufferedRequest,r=[];e;)r.push(e),e=e.next;return r};(function(){try{Object.defineProperty(nu.prototype,"buffer",{get:aM.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")});}catch(t){}})();var Jc;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(Jc=Function.prototype[Symbol.hasInstance],Object.defineProperty(kt,Symbol.hasInstance,{value:function(e){return Jc.call(this,e)?!0:this!==kt?!1:e&&e._writableState instanceof nu}})):Jc=function(e){return e instanceof this};function kt(t){Eo=Eo||bs();var e=this instanceof Eo;if(!e&&!Jc.call(kt,this))return new kt(t);this._writableState=new nu(t,this,e),this.writable=!0,t&&(typeof t.write=="function"&&(this._write=t.write),typeof t.writev=="function"&&(this._writev=t.writev),typeof t.destroy=="function"&&(this._destroy=t.destroy),typeof t.final=="function"&&(this._final=t.final)),IT.call(this);}kt.prototype.pipe=function(){Co(this,new gM);};function EM(t,e){var r=new vM;Co(t,r),process.nextTick(e,r);}function CM(t,e,r,i){var s;return r===null?s=new yM:typeof r!="string"&&!e.objectMode&&(s=new dM("chunk",["string","Buffer"],r)),s?(Co(t,s),process.nextTick(i,s),!1):!0}kt.prototype.write=function(t,e,r){var i=this._writableState,s=!1,n=!i.objectMode&&cM(t);return n&&!Zc.isBuffer(t)&&(t=lM(t)),typeof e=="function"&&(r=e,e=null),n?e="buffer":e||(e=i.defaultEncoding),typeof r!="function"&&(r=bM),i.ending?EM(this,r):(n||CM(this,i,t,r))&&(i.pendingcb++,s=AM(this,i,n,t,e,r)),s};kt.prototype.cork=function(){this._writableState.corked++;};kt.prototype.uncork=function(){var t=this._writableState;t.corked&&(t.corked--,!t.writing&&!t.corked&&!t.bufferProcessing&&t.bufferedRequest&&kT(this,t));};kt.prototype.setDefaultEncoding=function(e){if(typeof e=="string"&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new xM(e);return this._writableState.defaultEncoding=e,this};Object.defineProperty(kt.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function TM(t,e,r){return !t.objectMode&&t.decodeStrings!==!1&&typeof e=="string"&&(e=Zc.from(e,r)),e}Object.defineProperty(kt.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function AM(t,e,r,i,s,n){if(!r){var o=TM(e,i,s);i!==o&&(r=!0,s="buffer",i=o);}var a=e.objectMode?1:i.length;e.length+=a;var u=e.length<e.highWaterMark;if(u||(e.needDrain=!0),e.writing||e.corked){var l=e.lastBufferedRequest;e.lastBufferedRequest={chunk:i,encoding:s,isBuf:r,callback:n,next:null},l?l.next=e.lastBufferedRequest:e.bufferedRequest=e.lastBufferedRequest,e.bufferedRequestCount+=1;}else Zm(t,e,!1,a,i,s,n);return u}function Zm(t,e,r,i,s,n,o){e.writelen=i,e.writecb=o,e.writing=!0,e.sync=!0,e.destroyed?e.onwrite(new _M("write")):r?t._writev(s,e.onwrite):t._write(s,n,e.onwrite),e.sync=!1;}function wM(t,e,r,i,s){--e.pendingcb,r?(process.nextTick(s,i),process.nextTick(iu,t,e),t._writableState.errorEmitted=!0,Co(t,i)):(s(i),t._writableState.errorEmitted=!0,Co(t,i),iu(t,e));}function DM(t){t.writing=!1,t.writecb=null,t.length-=t.writelen,t.writelen=0;}function SM(t,e){var r=t._writableState,i=r.sync,s=r.writecb;if(typeof s!="function")throw new mM;if(DM(r),e)wM(t,r,i,e,s);else {var n=MT(r)||t.destroyed;!n&&!r.corked&&!r.bufferProcessing&&r.bufferedRequest&&kT(t,r),i?process.nextTick(LT,t,r,n,s):LT(t,r,n,s);}}function LT(t,e,r,i){r||RM(t,e),e.pendingcb--,i(),iu(t,e);}function RM(t,e){e.length===0&&e.needDrain&&(e.needDrain=!1,t.emit("drain"));}function kT(t,e){e.bufferProcessing=!0;var r=e.bufferedRequest;if(t._writev&&r&&r.next){var i=e.bufferedRequestCount,s=new Array(i),n=e.corkedRequestsFree;n.entry=r;for(var o=0,a=!0;r;)s[o]=r,r.isBuf||(a=!1),r=r.next,o+=1;s.allBuffers=a,Zm(t,e,!0,e.length,s,"",n.finish),e.pendingcb++,e.lastBufferedRequest=null,n.next?(e.corkedRequestsFree=n.next,n.next=null):e.corkedRequestsFree=new PT(e),e.bufferedRequestCount=0;}else {for(;r;){var u=r.chunk,l=r.encoding,h=r.callback,c=e.objectMode?1:u.length;if(Zm(t,e,!1,c,u,l,h),r=r.next,e.bufferedRequestCount--,e.writing)break}r===null&&(e.lastBufferedRequest=null);}e.bufferedRequest=r,e.bufferProcessing=!1;}kt.prototype._write=function(t,e,r){r(new pM("_write()"));};kt.prototype._writev=null;kt.prototype.end=function(t,e,r){var i=this._writableState;return typeof t=="function"?(r=t,t=null,e=null):typeof e=="function"&&(r=e,e=null),t!=null&&this.write(t,e),i.corked&&(i.corked=1,this.uncork()),i.ending||FM(this,i,r),this};Object.defineProperty(kt.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function MT(t){return t.ending&&t.length===0&&t.bufferedRequest===null&&!t.finished&&!t.writing}function NM(t,e){t._final(function(r){e.pendingcb--,r&&Co(t,r),e.prefinished=!0,t.emit("prefinish"),iu(t,e);});}function OM(t,e){!e.prefinished&&!e.finalCalled&&(typeof t._final=="function"&&!e.destroyed?(e.pendingcb++,e.finalCalled=!0,process.nextTick(NM,t,e)):(e.prefinished=!0,t.emit("prefinish")));}function iu(t,e){var r=MT(e);if(r&&(OM(t,e),e.pendingcb===0&&(e.finished=!0,t.emit("finish"),e.autoDestroy))){var i=t._readableState;(!i||i.autoDestroy&&i.endEmitted)&&t.destroy();}return r}function FM(t,e,r){e.ending=!0,iu(t,e),r&&(e.finished?process.nextTick(r):t.once("finish",r)),e.ended=!0,t.writable=!1;}function LM(t,e,r){var i=t.entry;for(t.entry=null;i;){var s=i.callback;e.pendingcb--,s(r),i=i.next;}e.corkedRequestsFree.next=t;}Object.defineProperty(kt.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e);}});kt.prototype.destroy=Xm.destroy;kt.prototype._undestroy=Xm.undestroy;kt.prototype._destroy=function(t,e){e(t);};});var eg=$((Hoe,qT)=>{var PM=ge("util"),{LEVEL:Qm}=Ut(),jT=Es(),su=qT.exports=function(e={}){if(jT.call(this,e),!e.transport||typeof e.transport.log!="function")throw new Error("Invalid transport, must be an object with a log method.");this.transport=e.transport,this.level=this.level||e.transport.level,this.handleExceptions=this.handleExceptions||e.transport.handleExceptions,this._deprecated();function r(i){this.emit("error",i,this.transport);}this.transport.__winstonError||(this.transport.__winstonError=r.bind(this),this.transport.on("error",this.transport.__winstonError));};PM.inherits(su,jT);su.prototype._write=function(e,r,i){if(this.silent||e.exception===!0&&!this.handleExceptions)return i(null);(!this.level||this.levels[this.level]>=this.levels[e[Qm]])&&this.transport.log(e[Qm],e.message,e,this._nop),i(null);};su.prototype._writev=function(e,r){for(let i=0;i<e.length;i++)this._accept(e[i])&&(this.transport.log(e[i].chunk[Qm],e[i].chunk.message,e[i].chunk,this._nop),e[i].callback());return r(null)};su.prototype._deprecated=function(){console.error([`${this.transport.name} is a legacy winston transport. Consider upgrading: `,"- Upgrade docs: https://github.com/winstonjs/winston/blob/master/UPGRADE-3.0.md"].join(`
@@ -439,15 +439,15 @@ Filtered results for: ${this.inputValue?this.inputValue:ki.gray("Enter something
439
439
  Please provide the API URL:
440
440
 
441
441
  - As an apiUrl config parameter in ${i} config
442
- - As a SCAN_API_URL_${i} enviornment variable
443
- - As a SCAN_API_URL_${ks(i)} enviornment variable
442
+ - As a SCAN_API_URL_${i} environment variable
443
+ - As a SCAN_API_URL_${ks(i)} environment variable
444
444
  `);let o=s.apiKey||TO(i);o||t.debug(`Could not find scan API key for network ${Ed.default.bold(i)}
445
445
 
446
446
  Please provide the API key:
447
447
 
448
448
  - As an apiKey config parameter in ${i} config
449
- - As a SCAN_API_KEY_${i} enviornment variable
450
- - As a SCAN_API_KEY_${ks(i)} enviornment variable`);let a=s.browserUrl||CO(i)||M1(n);return a||t.debug(`Could not find scan browser URL key for network ${Ed.default.bold(i)}
449
+ - As a SCAN_API_KEY_${i} environment variable
450
+ - As a SCAN_API_KEY_${ks(i)} environment variable`);let a=s.browserUrl||CO(i)||M1(n);return a||t.debug(`Could not find scan browser URL key for network ${Ed.default.bold(i)}
451
451
 
452
452
  Browser URL is used to display a link to the verified contract
453
453
  after successful verification.
@@ -455,8 +455,8 @@ Please provide the API key:
455
455
  Please provide the browser URL:
456
456
 
457
457
  - As an browserUrl config parameter in ${i} config
458
- - As a SCAN_BROWSER_URL_${i} enviornment variable
459
- - As a SCAN_BROWSER_URL_${ks(i)} enviornment variable`),{...r,[i]:{apiUrl:n,apiKey:o,browserUrl:a}}},{}),EO=t=>{var e,r;return ((e=process.env[`SCAN_API_URL_${t}`])==null?void 0:e.trim())||((r=process.env[`SCAN_API_URL_${ks(t)}`])==null?void 0:r.trim())},CO=t=>{var e,r;return ((e=process.env[`SCAN_BROWSER_URL_${t}`])==null?void 0:e.trim())||((r=process.env[`SCAN_BROWSER_URL_${ks(t)}`])==null?void 0:r.trim())},TO=t=>{var e,r;return ((e=process.env[`SCAN_API_KEY_${t}`])==null?void 0:e.trim())||((r=process.env[`SCAN_API_KEY_${ks(t)}`])==null?void 0:r.trim())},ks=t=>t.toUpperCase().replaceAll("-","_");var Td=(i=>(i[i.None=1]="None",i[i.Unlicense=2]="Unlicense",i[i.MIT=3]="MIT",i[i["GNU-GPLv2"]=4]="GNU-GPLv2",i[i["GNU-GPLv3"]=5]="GNU-GPLv3",i[i["GNU-LGPLv2.1"]=6]="GNU-LGPLv2.1",i[i["GNU-LGPLv3"]=7]="GNU-LGPLv3",i[i["BSD-2-Clause"]=8]="BSD-2-Clause",i[i["BSD-3-Clause"]=9]="BSD-3-Clause",i[i["MPL-2.0"]=10]="MPL-2.0",i[i["OSL-3.0"]=11]="OSL-3.0",i[i["Apache-2.0"]=12]="Apache-2.0",i[i["GNU-AGPLv3"]=13]="GNU-AGPLv3",i[i["BUSL-1.1"]=14]="BUSL-1.1",i))(Td||{}),Ad=t=>{let e=t.match(/\/\/\s*SPDX-License-Identifier:\s*(.*)\s*/i),r=e==null?void 0:e[1];return r==null?1:(r in Td||console.warn("Found unknown SPDX license identifier: %s",r),Td[r])};var Ze;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{let n={};for(let o of s)n[o]=o;return n},t.getValidEnumValues=s=>{let n=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(let a of n)o[a]=s[a];return t.objectValues(o)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let n=[];for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&n.push(o);return n},t.find=(s,n)=>{for(let o of s)if(n(o))return o},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function i(s,n=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(n)}t.joinValues=i,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n;})(Ze||(Ze={}));var Dd;(function(t){t.mergeShapes=(e,r)=>({...e,...r});})(Dd||(Dd={}));var Ee=Ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Vi=t=>{switch(typeof t){case"undefined":return Ee.undefined;case"string":return Ee.string;case"number":return isNaN(t)?Ee.nan:Ee.number;case"boolean":return Ee.boolean;case"function":return Ee.function;case"bigint":return Ee.bigint;case"symbol":return Ee.symbol;case"object":return Array.isArray(t)?Ee.array:t===null?Ee.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Ee.promise:typeof Map!="undefined"&&t instanceof Map?Ee.map:typeof Set!="undefined"&&t instanceof Set?Ee.set:typeof Date!="undefined"&&t instanceof Date?Ee.date:Ee.object;default:return Ee.unknown}},ve=Ze.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),AO=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Er=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i];},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i];};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e;}get errors(){return this.issues}format(e){let r=e||function(n){return n.message},i={_errors:[]},s=n=>{for(let o of n.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)i._errors.push(r(o));else {let a=i,u=0;for(;u<o.path.length;){let l=o.path[u];u===o.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(o))):a[l]=a[l]||{_errors:[]},a=a[l],u++;}}};return s(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ze.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},i=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(e(s))):i.push(e(s));return {formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};Er.create=t=>new Er(t);var Go=(t,e)=>{let r;switch(t.code){case ve.invalid_type:t.received===Ee.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case ve.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ze.jsonStringifyReplacer)}`;break;case ve.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ze.joinValues(t.keys,", ")}`;break;case ve.invalid_union:r="Invalid input";break;case ve.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ze.joinValues(t.options)}`;break;case ve.invalid_enum_value:r=`Invalid enum value. Expected ${Ze.joinValues(t.options)}, received '${t.received}'`;break;case ve.invalid_arguments:r="Invalid function arguments";break;case ve.invalid_return_type:r="Invalid function return type";break;case ve.invalid_date:r="Invalid date";break;case ve.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ze.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case ve.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case ve.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case ve.custom:r="Invalid input";break;case ve.invalid_intersection_types:r="Intersection results could not be merged";break;case ve.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case ve.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ze.assertNever(t);}return {message:r}},yy=Go;function wO(t){yy=t;}function zu(){return yy}var Ku=t=>{let{data:e,path:r,errorMaps:i,issueData:s}=t,n=[...r,...s.path||[]],o={...s,path:n},a="",u=i.filter(l=>!!l).slice().reverse();for(let l of u)a=l(o,{data:e,defaultError:a}).message;return {...s,path:n,message:s.message||a}},DO=[];function Te(t,e){let r=Ku({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,zu(),Go].filter(i=>!!i)});t.common.issues.push(r);}var rr=class t{constructor(){this.value="valid";}dirty(){this.value==="valid"&&(this.value="dirty");}abort(){this.value!=="aborted"&&(this.value="aborted");}static mergeArray(e,r){let i=[];for(let s of r){if(s.status==="aborted")return Pe;s.status==="dirty"&&e.dirty(),i.push(s.value);}return {status:e.value,value:i}}static async mergeObjectAsync(e,r){let i=[];for(let s of r)i.push({key:await s.key,value:await s.value});return t.mergeObjectSync(e,i)}static mergeObjectSync(e,r){let i={};for(let s of r){let{key:n,value:o}=s;if(n.status==="aborted"||o.status==="aborted")return Pe;n.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof o.value!="undefined"||s.alwaysSet)&&(i[n.value]=o.value);}return {status:e.value,value:i}}},Pe=Object.freeze({status:"aborted"}),vy=t=>({status:"dirty",value:t}),sr=t=>({status:"valid",value:t}),Sd=t=>t.status==="aborted",Rd=t=>t.status==="dirty",Wo=t=>t.status==="valid",Gu=t=>typeof Promise!="undefined"&&t instanceof Promise,Re;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message;})(Re||(Re={}));var Fr=class{constructor(e,r,i,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=i,this._key=s;}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},gy=(t,e)=>{if(Wo(e))return {success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return {success:!1,get error(){if(this._error)return this._error;let r=new Er(t.common.issues);return this._error=r,this._error}}};function Be(t){if(!t)return {};let{errorMap:e,invalid_type_error:r,required_error:i,description:s}=t;if(e&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,a)=>o.code!=="invalid_type"?{message:a.defaultError}:typeof a.data=="undefined"?{message:i!=null?i:a.defaultError}:{message:r!=null?r:a.defaultError},description:s}}var je=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this);}get description(){return this._def.description}_getType(e){return Vi(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Vi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return {status:new rr,ctx:{common:e.parent.common,data:e.data,parsedType:Vi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Gu(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let i=this.safeParse(e,r);if(i.success)return i.data;throw i.error}safeParse(e,r){var i;let s={common:{issues:[],async:(i=r==null?void 0:r.async)!==null&&i!==void 0?i:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Vi(e)},n=this._parseSync({data:e,path:s.path,parent:s});return gy(s,n)}async parseAsync(e,r){let i=await this.safeParseAsync(e,r);if(i.success)return i.data;throw i.error}async safeParseAsync(e,r){let i={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Vi(e)},s=this._parse({data:e,path:i.path,parent:i}),n=await(Gu(s)?s:Promise.resolve(s));return gy(i,n)}refine(e,r){let i=s=>typeof r=="string"||typeof r=="undefined"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,n)=>{let o=e(s),a=()=>n.addIssue({code:ve.custom,...i(s)});return typeof Promise!="undefined"&&o instanceof Promise?o.then(u=>u?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((i,s)=>e(i)?!0:(s.addIssue(typeof r=="function"?r(i,s):r),!1))}_refinement(e){return new Cr({schema:this,typeName:Oe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return jr.create(this,this._def)}nullable(){return yi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _i.create(this,this._def)}promise(){return Ki.create(this,this._def)}or(e){return Hn.create([this,e],this._def)}and(e){return Un.create(this,e,this._def)}transform(e){return new Cr({...Be(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Gn({...Be(this._def),innerType:this,defaultValue:r,typeName:Oe.ZodDefault})}brand(){return new Zu({typeName:Oe.ZodBranded,type:this,...Be(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Us({...Be(this._def),innerType:this,catchValue:r,typeName:Oe.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Yo.create(this,e)}readonly(){return $s.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},SO=/^c[^\s-]{8,}$/i,RO=/^[a-z][a-z0-9]*$/,NO=/^[0-9A-HJKMNP-TV-Z]{26}$/,OO=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,FO=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,LO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",wd,PO=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,IO=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,kO=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function MO(t,e){return !!((e==="v4"||!e)&&PO.test(t)||(e==="v6"||!e)&&IO.test(t))}var $i=class t extends je{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Ee.string){let n=this._getOrReturnCtx(e);return Te(n,{code:ve.invalid_type,expected:Ee.string,received:n.parsedType}),Pe}let i=new rr,s;for(let n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),i.dirty());else if(n.kind==="max")e.data.length>n.value&&(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),i.dirty());else if(n.kind==="length"){let o=e.data.length>n.value,a=e.data.length<n.value;(o||a)&&(s=this._getOrReturnCtx(e,s),o?Te(s,{code:ve.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):a&&Te(s,{code:ve.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),i.dirty());}else if(n.kind==="email")FO.test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"email",code:ve.invalid_string,message:n.message}),i.dirty());else if(n.kind==="emoji")wd||(wd=new RegExp(LO,"u")),wd.test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"emoji",code:ve.invalid_string,message:n.message}),i.dirty());else if(n.kind==="uuid")OO.test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"uuid",code:ve.invalid_string,message:n.message}),i.dirty());else if(n.kind==="cuid")SO.test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"cuid",code:ve.invalid_string,message:n.message}),i.dirty());else if(n.kind==="cuid2")RO.test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"cuid2",code:ve.invalid_string,message:n.message}),i.dirty());else if(n.kind==="ulid")NO.test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"ulid",code:ve.invalid_string,message:n.message}),i.dirty());else if(n.kind==="url")try{new URL(e.data);}catch(o){s=this._getOrReturnCtx(e,s),Te(s,{validation:"url",code:ve.invalid_string,message:n.message}),i.dirty();}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"regex",code:ve.invalid_string,message:n.message}),i.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),i.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.invalid_string,validation:{startsWith:n.value},message:n.message}),i.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.invalid_string,validation:{endsWith:n.value},message:n.message}),i.dirty()):n.kind==="datetime"?kO(n).test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.invalid_string,validation:"datetime",message:n.message}),i.dirty()):n.kind==="ip"?MO(e.data,n.version)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"ip",code:ve.invalid_string,message:n.message}),i.dirty()):Ze.assertNever(n);return {status:i.value,value:e.data}}_regex(e,r,i){return this.refinement(s=>e.test(s),{validation:r,code:ve.invalid_string,...Re.errToObj(i)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Re.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Re.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Re.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Re.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Re.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Re.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Re.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Re.errToObj(e)})}datetime(e){var r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,...Re.errToObj(e==null?void 0:e.message)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Re.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...Re.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Re.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Re.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Re.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Re.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Re.errToObj(r)})}nonempty(e){return this.min(1,Re.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return !!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return !!this._def.checks.find(e=>e.kind==="email")}get isURL(){return !!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return !!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return !!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return !!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return !!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return !!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return !!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};$i.create=t=>{var e;return new $i({checks:[],typeName:Oe.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Be(t)})};function BO(t,e){let r=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,s=r>i?r:i,n=parseInt(t.toFixed(s).replace(".","")),o=parseInt(e.toFixed(s).replace(".",""));return n%o/Math.pow(10,s)}var In=class t extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf;}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Ee.number){let n=this._getOrReturnCtx(e);return Te(n,{code:ve.invalid_type,expected:Ee.number,received:n.parsedType}),Pe}let i,s=new rr;for(let n of this._def.checks)n.kind==="int"?Ze.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.invalid_type,expected:"integer",received:"float",message:n.message}),s.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):n.kind==="multipleOf"?BO(e.data,n.value)!==0&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.not_finite,message:n.message}),s.dirty()):Ze.assertNever(n);return {status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Re.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Re.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Re.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Re.toString(r))}setLimit(e,r,i,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:Re.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Re.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Re.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Re.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Re.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Re.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Re.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Re.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Re.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Re.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return !!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ze.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return !0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value);}return Number.isFinite(r)&&Number.isFinite(e)}};In.create=t=>new In({checks:[],typeName:Oe.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Be(t)});var kn=class t extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte;}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==Ee.bigint){let n=this._getOrReturnCtx(e);return Te(n,{code:ve.invalid_type,expected:Ee.bigint,received:n.parsedType}),Pe}let i,s=new rr;for(let n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):Ze.assertNever(n);return {status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Re.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Re.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Re.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Re.toString(r))}setLimit(e,r,i,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:Re.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Re.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Re.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Re.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Re.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Re.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};kn.create=t=>{var e;return new kn({checks:[],typeName:Oe.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Be(t)})};var Mn=class extends je{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Ee.boolean){let i=this._getOrReturnCtx(e);return Te(i,{code:ve.invalid_type,expected:Ee.boolean,received:i.parsedType}),Pe}return sr(e.data)}};Mn.create=t=>new Mn({typeName:Oe.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Be(t)});var Bn=class t extends je{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Ee.date){let n=this._getOrReturnCtx(e);return Te(n,{code:ve.invalid_type,expected:Ee.date,received:n.parsedType}),Pe}if(isNaN(e.data.getTime())){let n=this._getOrReturnCtx(e);return Te(n,{code:ve.invalid_date}),Pe}let i=new rr,s;for(let n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),i.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),i.dirty()):Ze.assertNever(n);return {status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Re.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Re.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Bn.create=t=>new Bn({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Oe.ZodDate,...Be(t)});var Bs=class extends je{_parse(e){if(this._getType(e)!==Ee.symbol){let i=this._getOrReturnCtx(e);return Te(i,{code:ve.invalid_type,expected:Ee.symbol,received:i.parsedType}),Pe}return sr(e.data)}};Bs.create=t=>new Bs({typeName:Oe.ZodSymbol,...Be(t)});var jn=class extends je{_parse(e){if(this._getType(e)!==Ee.undefined){let i=this._getOrReturnCtx(e);return Te(i,{code:ve.invalid_type,expected:Ee.undefined,received:i.parsedType}),Pe}return sr(e.data)}};jn.create=t=>new jn({typeName:Oe.ZodUndefined,...Be(t)});var qn=class extends je{_parse(e){if(this._getType(e)!==Ee.null){let i=this._getOrReturnCtx(e);return Te(i,{code:ve.invalid_type,expected:Ee.null,received:i.parsedType}),Pe}return sr(e.data)}};qn.create=t=>new qn({typeName:Oe.ZodNull,...Be(t)});var zi=class extends je{constructor(){super(...arguments),this._any=!0;}_parse(e){return sr(e.data)}};zi.create=t=>new zi({typeName:Oe.ZodAny,...Be(t)});var gi=class extends je{constructor(){super(...arguments),this._unknown=!0;}_parse(e){return sr(e.data)}};gi.create=t=>new gi({typeName:Oe.ZodUnknown,...Be(t)});var qr=class extends je{_parse(e){let r=this._getOrReturnCtx(e);return Te(r,{code:ve.invalid_type,expected:Ee.never,received:r.parsedType}),Pe}};qr.create=t=>new qr({typeName:Oe.ZodNever,...Be(t)});var js=class extends je{_parse(e){if(this._getType(e)!==Ee.undefined){let i=this._getOrReturnCtx(e);return Te(i,{code:ve.invalid_type,expected:Ee.void,received:i.parsedType}),Pe}return sr(e.data)}};js.create=t=>new js({typeName:Oe.ZodVoid,...Be(t)});var _i=class t extends je{_parse(e){let{ctx:r,status:i}=this._processInputParams(e),s=this._def;if(r.parsedType!==Ee.array)return Te(r,{code:ve.invalid_type,expected:Ee.array,received:r.parsedType}),Pe;if(s.exactLength!==null){let o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&(Te(r,{code:o?ve.too_big:ve.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),i.dirty());}if(s.minLength!==null&&r.data.length<s.minLength.value&&(Te(r,{code:ve.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),i.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(Te(r,{code:ve.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new Fr(r,o,r.path,a)))).then(o=>rr.mergeArray(i,o));let n=[...r.data].map((o,a)=>s.type._parseSync(new Fr(r,o,r.path,a)));return rr.mergeArray(i,n)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:Re.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:Re.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:Re.toString(r)}})}nonempty(e){return this.min(1,e)}};_i.create=(t,e)=>new _i({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...Be(e)});function Ms(t){if(t instanceof cr){let e={};for(let r in t.shape){let i=t.shape[r];e[r]=jr.create(Ms(i));}return new cr({...t._def,shape:()=>e})}else return t instanceof _i?new _i({...t._def,type:Ms(t.element)}):t instanceof jr?jr.create(Ms(t.unwrap())):t instanceof yi?yi.create(Ms(t.unwrap())):t instanceof Jr?Jr.create(t.items.map(e=>Ms(e))):t}var cr=class t extends je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend;}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=Ze.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==Ee.object){let l=this._getOrReturnCtx(e);return Te(l,{code:ve.invalid_type,expected:Ee.object,received:l.parsedType}),Pe}let{status:i,ctx:s}=this._processInputParams(e),{shape:n,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof qr&&this._def.unknownKeys==="strip"))for(let l in s.data)o.includes(l)||a.push(l);let u=[];for(let l of o){let h=n[l],c=s.data[l];u.push({key:{status:"valid",value:l},value:h._parse(new Fr(s,c,s.path,l)),alwaysSet:l in s.data});}if(this._def.catchall instanceof qr){let l=this._def.unknownKeys;if(l==="passthrough")for(let h of a)u.push({key:{status:"valid",value:h},value:{status:"valid",value:s.data[h]}});else if(l==="strict")a.length>0&&(Te(s,{code:ve.unrecognized_keys,keys:a}),i.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else {let l=this._def.catchall;for(let h of a){let c=s.data[h];u.push({key:{status:"valid",value:h},value:l._parse(new Fr(s,c,s.path,h)),alwaysSet:h in s.data});}}return s.common.async?Promise.resolve().then(async()=>{let l=[];for(let h of u){let c=await h.key;l.push({key:c,value:await h.value,alwaysSet:h.alwaysSet});}return l}).then(l=>rr.mergeObjectSync(i,l)):rr.mergeObjectSync(i,u)}get shape(){return this._def.shape()}strict(e){return Re.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,i)=>{var s,n,o,a;let u=(o=(n=(s=this._def).errorMap)===null||n===void 0?void 0:n.call(s,r,i).message)!==null&&o!==void 0?o:i.defaultError;return r.code==="unrecognized_keys"?{message:(a=Re.errToObj(e).message)!==null&&a!==void 0?a:u}:{message:u}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Oe.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return Ze.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(r[i]=this.shape[i]);}),new t({...this._def,shape:()=>r})}omit(e){let r={};return Ze.objectKeys(this.shape).forEach(i=>{e[i]||(r[i]=this.shape[i]);}),new t({...this._def,shape:()=>r})}deepPartial(){return Ms(this)}partial(e){let r={};return Ze.objectKeys(this.shape).forEach(i=>{let s=this.shape[i];e&&!e[i]?r[i]=s:r[i]=s.optional();}),new t({...this._def,shape:()=>r})}required(e){let r={};return Ze.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])r[i]=this.shape[i];else {let n=this.shape[i];for(;n instanceof jr;)n=n._def.innerType;r[i]=n;}}),new t({...this._def,shape:()=>r})}keyof(){return xy(Ze.objectKeys(this.shape))}};cr.create=(t,e)=>new cr({shape:()=>t,unknownKeys:"strip",catchall:qr.create(),typeName:Oe.ZodObject,...Be(e)});cr.strictCreate=(t,e)=>new cr({shape:()=>t,unknownKeys:"strict",catchall:qr.create(),typeName:Oe.ZodObject,...Be(e)});cr.lazycreate=(t,e)=>new cr({shape:t,unknownKeys:"strip",catchall:qr.create(),typeName:Oe.ZodObject,...Be(e)});var Hn=class extends je{_parse(e){let{ctx:r}=this._processInputParams(e),i=this._def.options;function s(n){for(let a of n)if(a.result.status==="valid")return a.result;for(let a of n)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let o=n.map(a=>new Er(a.ctx.common.issues));return Te(r,{code:ve.invalid_union,unionErrors:o}),Pe}if(r.common.async)return Promise.all(i.map(async n=>{let o={...r,common:{...r.common,issues:[]},parent:null};return {result:await n._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let n,o=[];for(let u of i){let l={...r,common:{...r.common,issues:[]},parent:null},h=u._parseSync({data:r.data,path:r.path,parent:l});if(h.status==="valid")return h;h.status==="dirty"&&!n&&(n={result:h,ctx:l}),l.common.issues.length&&o.push(l.common.issues);}if(n)return r.common.issues.push(...n.ctx.common.issues),n.result;let a=o.map(u=>new Er(u));return Te(r,{code:ve.invalid_union,unionErrors:a}),Pe}}get options(){return this._def.options}};Hn.create=(t,e)=>new Hn({options:t,typeName:Oe.ZodUnion,...Be(e)});var $u=t=>t instanceof Vn?$u(t.schema):t instanceof Cr?$u(t.innerType()):t instanceof $n?[t.value]:t instanceof zn?t.options:t instanceof Kn?Object.keys(t.enum):t instanceof Gn?$u(t._def.innerType):t instanceof jn?[void 0]:t instanceof qn?[null]:null,Wu=class t extends je{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ee.object)return Te(r,{code:ve.invalid_type,expected:Ee.object,received:r.parsedType}),Pe;let i=this.discriminator,s=r.data[i],n=this.optionsMap.get(s);return n?r.common.async?n._parseAsync({data:r.data,path:r.path,parent:r}):n._parseSync({data:r.data,path:r.path,parent:r}):(Te(r,{code:ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),Pe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,i){let s=new Map;for(let n of r){let o=$u(n.shape[e]);if(!o)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of o){if(s.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);s.set(a,n);}}return new t({typeName:Oe.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:s,...Be(i)})}};function Nd(t,e){let r=Vi(t),i=Vi(e);if(t===e)return {valid:!0,data:t};if(r===Ee.object&&i===Ee.object){let s=Ze.objectKeys(e),n=Ze.objectKeys(t).filter(a=>s.indexOf(a)!==-1),o={...t,...e};for(let a of n){let u=Nd(t[a],e[a]);if(!u.valid)return {valid:!1};o[a]=u.data;}return {valid:!0,data:o}}else if(r===Ee.array&&i===Ee.array){if(t.length!==e.length)return {valid:!1};let s=[];for(let n=0;n<t.length;n++){let o=t[n],a=e[n],u=Nd(o,a);if(!u.valid)return {valid:!1};s.push(u.data);}return {valid:!0,data:s}}else return r===Ee.date&&i===Ee.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Un=class extends je{_parse(e){let{status:r,ctx:i}=this._processInputParams(e),s=(n,o)=>{if(Sd(n)||Sd(o))return Pe;let a=Nd(n.value,o.value);return a.valid?((Rd(n)||Rd(o))&&r.dirty(),{status:r.value,value:a.data}):(Te(i,{code:ve.invalid_intersection_types}),Pe)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([n,o])=>s(n,o)):s(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};Un.create=(t,e,r)=>new Un({left:t,right:e,typeName:Oe.ZodIntersection,...Be(r)});var Jr=class t extends je{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==Ee.array)return Te(i,{code:ve.invalid_type,expected:Ee.array,received:i.parsedType}),Pe;if(i.data.length<this._def.items.length)return Te(i,{code:ve.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Pe;!this._def.rest&&i.data.length>this._def.items.length&&(Te(i,{code:ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let n=[...i.data].map((o,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new Fr(i,o,i.path,a)):null}).filter(o=>!!o);return i.common.async?Promise.all(n).then(o=>rr.mergeArray(r,o)):rr.mergeArray(r,n)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Jr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jr({items:t,typeName:Oe.ZodTuple,rest:null,...Be(e)})};var Yu=class t extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==Ee.object)return Te(i,{code:ve.invalid_type,expected:Ee.object,received:i.parsedType}),Pe;let s=[],n=this._def.keyType,o=this._def.valueType;for(let a in i.data)s.push({key:n._parse(new Fr(i,a,i.path,a)),value:o._parse(new Fr(i,i.data[a],i.path,a))});return i.common.async?rr.mergeObjectAsync(r,s):rr.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(e,r,i){return r instanceof je?new t({keyType:e,valueType:r,typeName:Oe.ZodRecord,...Be(i)}):new t({keyType:$i.create(),valueType:e,typeName:Oe.ZodRecord,...Be(r)})}},qs=class extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==Ee.map)return Te(i,{code:ve.invalid_type,expected:Ee.map,received:i.parsedType}),Pe;let s=this._def.keyType,n=this._def.valueType,o=[...i.data.entries()].map(([a,u],l)=>({key:s._parse(new Fr(i,a,i.path,[l,"key"])),value:n._parse(new Fr(i,u,i.path,[l,"value"]))}));if(i.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of o){let l=await u.key,h=await u.value;if(l.status==="aborted"||h.status==="aborted")return Pe;(l.status==="dirty"||h.status==="dirty")&&r.dirty(),a.set(l.value,h.value);}return {status:r.value,value:a}})}else {let a=new Map;for(let u of o){let l=u.key,h=u.value;if(l.status==="aborted"||h.status==="aborted")return Pe;(l.status==="dirty"||h.status==="dirty")&&r.dirty(),a.set(l.value,h.value);}return {status:r.value,value:a}}}};qs.create=(t,e,r)=>new qs({valueType:e,keyType:t,typeName:Oe.ZodMap,...Be(r)});var Hs=class t extends je{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==Ee.set)return Te(i,{code:ve.invalid_type,expected:Ee.set,received:i.parsedType}),Pe;let s=this._def;s.minSize!==null&&i.data.size<s.minSize.value&&(Te(i,{code:ve.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&i.data.size>s.maxSize.value&&(Te(i,{code:ve.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let n=this._def.valueType;function o(u){let l=new Set;for(let h of u){if(h.status==="aborted")return Pe;h.status==="dirty"&&r.dirty(),l.add(h.value);}return {status:r.value,value:l}}let a=[...i.data.values()].map((u,l)=>n._parse(new Fr(i,u,i.path,l)));return i.common.async?Promise.all(a).then(u=>o(u)):o(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:Re.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:Re.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Hs.create=(t,e)=>new Hs({valueType:t,minSize:null,maxSize:null,typeName:Oe.ZodSet,...Be(e)});var Ju=class t extends je{constructor(){super(...arguments),this.validate=this.implement;}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ee.function)return Te(r,{code:ve.invalid_type,expected:Ee.function,received:r.parsedType}),Pe;function i(a,u){return Ku({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,zu(),Go].filter(l=>!!l),issueData:{code:ve.invalid_arguments,argumentsError:u}})}function s(a,u){return Ku({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,zu(),Go].filter(l=>!!l),issueData:{code:ve.invalid_return_type,returnTypeError:u}})}let n={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Ki){let a=this;return sr(async function(...u){let l=new Er([]),h=await a._def.args.parseAsync(u,n).catch(f=>{throw l.addIssue(i(u,f)),l}),c=await Reflect.apply(o,this,h);return await a._def.returns._def.type.parseAsync(c,n).catch(f=>{throw l.addIssue(s(c,f)),l})})}else {let a=this;return sr(function(...u){let l=a._def.args.safeParse(u,n);if(!l.success)throw new Er([i(u,l.error)]);let h=Reflect.apply(o,this,l.data),c=a._def.returns.safeParse(h,n);if(!c.success)throw new Er([s(h,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Jr.create(e).rest(gi.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,i){return new t({args:e||Jr.create([]).rest(gi.create()),returns:r||gi.create(),typeName:Oe.ZodFunction,...Be(i)})}},Vn=class extends je{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Vn.create=(t,e)=>new Vn({getter:t,typeName:Oe.ZodLazy,...Be(e)});var $n=class extends je{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return Te(r,{received:r.data,code:ve.invalid_literal,expected:this._def.value}),Pe}return {status:"valid",value:e.data}}get value(){return this._def.value}};$n.create=(t,e)=>new $n({value:t,typeName:Oe.ZodLiteral,...Be(e)});function xy(t,e){return new zn({values:t,typeName:Oe.ZodEnum,...Be(e)})}var zn=class t extends je{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),i=this._def.values;return Te(r,{expected:Ze.joinValues(i),received:r.parsedType,code:ve.invalid_type}),Pe}if(this._def.values.indexOf(e.data)===-1){let r=this._getOrReturnCtx(e),i=this._def.values;return Te(r,{received:r.data,code:ve.invalid_enum_value,options:i}),Pe}return sr(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e){return t.create(e)}exclude(e){return t.create(this.options.filter(r=>!e.includes(r)))}};zn.create=xy;var Kn=class extends je{_parse(e){let r=Ze.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==Ee.string&&i.parsedType!==Ee.number){let s=Ze.objectValues(r);return Te(i,{expected:Ze.joinValues(s),received:i.parsedType,code:ve.invalid_type}),Pe}if(r.indexOf(e.data)===-1){let s=Ze.objectValues(r);return Te(i,{received:i.data,code:ve.invalid_enum_value,options:s}),Pe}return sr(e.data)}get enum(){return this._def.values}};Kn.create=(t,e)=>new Kn({values:t,typeName:Oe.ZodNativeEnum,...Be(e)});var Ki=class extends je{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ee.promise&&r.common.async===!1)return Te(r,{code:ve.invalid_type,expected:Ee.promise,received:r.parsedType}),Pe;let i=r.parsedType===Ee.promise?r.data:Promise.resolve(r.data);return sr(i.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Ki.create=(t,e)=>new Ki({type:t,typeName:Oe.ZodPromise,...Be(e)});var Cr=class extends je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:i}=this._processInputParams(e),s=this._def.effect||null,n={addIssue:o=>{Te(i,o),o.fatal?r.abort():r.dirty();},get path(){return i.path}};if(n.addIssue=n.addIssue.bind(n),s.type==="preprocess"){let o=s.transform(i.data,n);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(o).then(a=>this._def.schema._parseAsync({data:a,path:i.path,parent:i})):this._def.schema._parseSync({data:o,path:i.path,parent:i})}if(s.type==="refinement"){let o=a=>{let u=s.refinement(a,n);if(i.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?Pe:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>a.status==="aborted"?Pe:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(i.common.async===!1){let o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Wo(o))return o;let a=s.transform(o.value,n);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return {status:r.value,value:a}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>Wo(o)?Promise.resolve(s.transform(o.value,n)).then(a=>({status:r.value,value:a})):o);Ze.assertNever(s);}};Cr.create=(t,e,r)=>new Cr({schema:t,typeName:Oe.ZodEffects,effect:e,...Be(r)});Cr.createWithPreprocess=(t,e,r)=>new Cr({schema:e,effect:{type:"preprocess",transform:t},typeName:Oe.ZodEffects,...Be(r)});var jr=class extends je{_parse(e){return this._getType(e)===Ee.undefined?sr(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};jr.create=(t,e)=>new jr({innerType:t,typeName:Oe.ZodOptional,...Be(e)});var yi=class extends je{_parse(e){return this._getType(e)===Ee.null?sr(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};yi.create=(t,e)=>new yi({innerType:t,typeName:Oe.ZodNullable,...Be(e)});var Gn=class extends je{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return r.parsedType===Ee.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Gn.create=(t,e)=>new Gn({innerType:t,typeName:Oe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Be(e)});var Us=class extends je{_parse(e){let{ctx:r}=this._processInputParams(e),i={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Gu(s)?s.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Er(i.common.issues)},input:i.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Er(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};Us.create=(t,e)=>new Us({innerType:t,typeName:Oe.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Be(e)});var Vs=class extends je{_parse(e){if(this._getType(e)!==Ee.nan){let i=this._getOrReturnCtx(e);return Te(i,{code:ve.invalid_type,expected:Ee.nan,received:i.parsedType}),Pe}return {status:"valid",value:e.data}}};Vs.create=t=>new Vs({typeName:Oe.ZodNaN,...Be(t)});var jO=Symbol("zod_brand"),Zu=class extends je{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},Yo=class t extends je{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.common.async)return (async()=>{let n=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?Pe:n.status==="dirty"?(r.dirty(),vy(n.value)):this._def.out._parseAsync({data:n.value,path:i.path,parent:i})})();{let s=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?Pe:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:i.path,parent:i})}}static create(e,r){return new t({in:e,out:r,typeName:Oe.ZodPipeline})}},$s=class extends je{_parse(e){let r=this._def.innerType._parse(e);return Wo(r)&&(r.value=Object.freeze(r.value)),r}};$s.create=(t,e)=>new $s({innerType:t,typeName:Oe.ZodReadonly,...Be(e)});var by=(t,e={},r)=>t?zi.create().superRefine((i,s)=>{var n,o;if(!t(i)){let a=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,u=(o=(n=a.fatal)!==null&&n!==void 0?n:r)!==null&&o!==void 0?o:!0,l=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...l,fatal:u});}}):zi.create(),qO={object:cr.lazycreate},Oe;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly";})(Oe||(Oe={}));var HO=(t,e={message:`Input not instance of ${t.name}`})=>by(r=>r instanceof t,e),Ey=$i.create,Cy=In.create,UO=Vs.create,VO=kn.create,Ty=Mn.create,$O=Bn.create,zO=Bs.create,KO=jn.create,GO=qn.create,WO=zi.create,YO=gi.create,JO=qr.create,ZO=js.create,XO=_i.create,QO=cr.create,eF=cr.strictCreate,tF=Hn.create,rF=Wu.create,iF=Un.create,nF=Jr.create,sF=Yu.create,oF=qs.create,aF=Hs.create,uF=Ju.create,lF=Vn.create,cF=$n.create,hF=zn.create,fF=Kn.create,dF=Ki.create,_y=Cr.create,pF=jr.create,mF=yi.create,gF=Cr.createWithPreprocess,_F=Yo.create,yF=()=>Ey().optional(),vF=()=>Cy().optional(),xF=()=>Ty().optional(),bF={string:t=>$i.create({...t,coerce:!0}),number:t=>In.create({...t,coerce:!0}),boolean:t=>Mn.create({...t,coerce:!0}),bigint:t=>kn.create({...t,coerce:!0}),date:t=>Bn.create({...t,coerce:!0})},EF=Pe,Ie=Object.freeze({__proto__:null,defaultErrorMap:Go,setErrorMap:wO,getErrorMap:zu,makeIssue:Ku,EMPTY_PATH:DO,addIssueToContext:Te,ParseStatus:rr,INVALID:Pe,DIRTY:vy,OK:sr,isAborted:Sd,isDirty:Rd,isValid:Wo,isAsync:Gu,get util(){return Ze},get objectUtil(){return Dd},ZodParsedType:Ee,getParsedType:Vi,ZodType:je,ZodString:$i,ZodNumber:In,ZodBigInt:kn,ZodBoolean:Mn,ZodDate:Bn,ZodSymbol:Bs,ZodUndefined:jn,ZodNull:qn,ZodAny:zi,ZodUnknown:gi,ZodNever:qr,ZodVoid:js,ZodArray:_i,ZodObject:cr,ZodUnion:Hn,ZodDiscriminatedUnion:Wu,ZodIntersection:Un,ZodTuple:Jr,ZodRecord:Yu,ZodMap:qs,ZodSet:Hs,ZodFunction:Ju,ZodLazy:Vn,ZodLiteral:$n,ZodEnum:zn,ZodNativeEnum:Kn,ZodPromise:Ki,ZodEffects:Cr,ZodTransformer:Cr,ZodOptional:jr,ZodNullable:yi,ZodDefault:Gn,ZodCatch:Us,ZodNaN:Vs,BRAND:jO,ZodBranded:Zu,ZodPipeline:Yo,ZodReadonly:$s,custom:by,Schema:je,ZodSchema:je,late:qO,get ZodFirstPartyTypeKind(){return Oe},coerce:bF,any:WO,array:XO,bigint:VO,boolean:Ty,date:$O,discriminatedUnion:rF,effect:_y,enum:hF,function:uF,instanceof:HO,intersection:iF,lazy:lF,literal:cF,map:oF,nan:UO,nativeEnum:fF,never:JO,null:GO,nullable:mF,number:Cy,object:QO,oboolean:xF,onumber:vF,optional:pF,ostring:yF,pipeline:_F,preprocess:gF,promise:dF,record:sF,set:aF,strictObject:eF,string:Ey,symbol:zO,transformer:_y,tuple:nF,undefined:KO,union:tF,unknown:YO,void:ZO,NEVER:EF,ZodIssueCode:ve,quotelessJson:AO,ZodError:Er});var Xu=t=>new Promise(e=>{setTimeout(e,t);}),Ay=async(t,e,r)=>{GE__default.default(e>0,`Number of attempts for retry must be larger than 0, got ${e}`);for(let i=0;i<e-1;i++)try{return await t()}catch(s){await(r==null?void 0:r(s,i));}return t()};var wy=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function TF(t){return wy.includes(t)}var AF=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...wy];function wF(t){return AF.includes(t)}var DF=["null","undefined","string","number","bigint","boolean","symbol"];function SF(t){return DF.includes(t)}function zs(t){return e=>typeof e===t}var{toString:RF}=Object.prototype,Jo=t=>{let e=RF.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&Y.domElement(t))return "HTMLElement";if(wF(e))return e},st=t=>e=>Jo(e)===t;function Y(t){if(t===null)return "null";switch(typeof t){case"undefined":return "undefined";case"string":return "string";case"number":return Number.isNaN(t)?"NaN":"number";case"boolean":return "boolean";case"function":return "Function";case"bigint":return "bigint";case"symbol":return "symbol";}if(Y.observable(t))return "Observable";if(Y.array(t))return "Array";if(Y.buffer(t))return "Buffer";let e=Jo(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return "Object"}Y.undefined=zs("undefined");Y.string=zs("string");var NF=zs("number");Y.number=t=>NF(t)&&!Y.nan(t);Y.positiveNumber=t=>Y.number(t)&&t>0;Y.negativeNumber=t=>Y.number(t)&&t<0;Y.bigint=zs("bigint");Y.function_=zs("function");Y.null_=t=>t===null;Y.class_=t=>Y.function_(t)&&t.toString().startsWith("class ");Y.boolean=t=>t===!0||t===!1;Y.symbol=zs("symbol");Y.numericString=t=>Y.string(t)&&!Y.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));Y.array=(t,e)=>Array.isArray(t)?Y.function_(e)?t.every(r=>e(r)):!0:!1;Y.buffer=t=>{var e,r,i;return (i=(r=(e=t==null?void 0:t.constructor)==null?void 0:e.isBuffer)==null?void 0:r.call(e,t))!=null?i:!1};Y.blob=t=>st("Blob")(t);Y.nullOrUndefined=t=>Y.null_(t)||Y.undefined(t);Y.object=t=>!Y.null_(t)&&(typeof t=="object"||Y.function_(t));Y.iterable=t=>Y.function_(t==null?void 0:t[Symbol.iterator]);Y.asyncIterable=t=>Y.function_(t==null?void 0:t[Symbol.asyncIterator]);Y.generator=t=>Y.iterable(t)&&Y.function_(t==null?void 0:t.next)&&Y.function_(t==null?void 0:t.throw);Y.asyncGenerator=t=>Y.asyncIterable(t)&&Y.function_(t.next)&&Y.function_(t.throw);Y.nativePromise=t=>st("Promise")(t);var OF=t=>Y.function_(t==null?void 0:t.then)&&Y.function_(t==null?void 0:t.catch);Y.promise=t=>Y.nativePromise(t)||OF(t);Y.generatorFunction=st("GeneratorFunction");Y.asyncGeneratorFunction=t=>Jo(t)==="AsyncGeneratorFunction";Y.asyncFunction=t=>Jo(t)==="AsyncFunction";Y.boundFunction=t=>Y.function_(t)&&!t.hasOwnProperty("prototype");Y.regExp=st("RegExp");Y.date=st("Date");Y.error=st("Error");Y.map=t=>st("Map")(t);Y.set=t=>st("Set")(t);Y.weakMap=t=>st("WeakMap")(t);Y.weakSet=t=>st("WeakSet")(t);Y.weakRef=t=>st("WeakRef")(t);Y.int8Array=st("Int8Array");Y.uint8Array=st("Uint8Array");Y.uint8ClampedArray=st("Uint8ClampedArray");Y.int16Array=st("Int16Array");Y.uint16Array=st("Uint16Array");Y.int32Array=st("Int32Array");Y.uint32Array=st("Uint32Array");Y.float32Array=st("Float32Array");Y.float64Array=st("Float64Array");Y.bigInt64Array=st("BigInt64Array");Y.bigUint64Array=st("BigUint64Array");Y.arrayBuffer=st("ArrayBuffer");Y.sharedArrayBuffer=st("SharedArrayBuffer");Y.dataView=st("DataView");Y.enumCase=(t,e)=>Object.values(e).includes(t);Y.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;Y.urlInstance=t=>st("URL")(t);Y.urlString=t=>{if(!Y.string(t))return !1;try{return new URL(t),!0}catch(e){return !1}};Y.truthy=t=>!!t;Y.falsy=t=>!t;Y.nan=t=>Number.isNaN(t);Y.primitive=t=>Y.null_(t)||SF(typeof t);Y.integer=t=>Number.isInteger(t);Y.safeInteger=t=>Number.isSafeInteger(t);Y.plainObject=t=>{if(typeof t!="object"||t===null)return !1;let e=Object.getPrototypeOf(t);return (e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};Y.typedArray=t=>TF(Jo(t));var FF=t=>Y.safeInteger(t)&&t>=0;Y.arrayLike=t=>!Y.nullOrUndefined(t)&&!Y.function_(t)&&FF(t.length);Y.tupleLike=(t,e)=>Y.array(e)&&Y.array(t)&&e.length===t.length?e.every((r,i)=>r(t[i])):!1;Y.inRange=(t,e)=>{if(Y.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(Y.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var LF=1,PF=["innerHTML","ownerDocument","style","attributes","nodeValue"];Y.domElement=t=>Y.object(t)&&t.nodeType===LF&&Y.string(t.nodeName)&&!Y.plainObject(t)&&PF.every(e=>e in t);Y.observable=t=>{var e,r;return t?t===((e=t[Symbol.observable])==null?void 0:e.call(t))||t===((r=t["@@observable"])==null?void 0:r.call(t)):!1};Y.nodeStream=t=>Y.object(t)&&Y.function_(t.pipe)&&!Y.observable(t);Y.infinite=t=>t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY;var Dy=t=>e=>Y.integer(e)&&Math.abs(e%2)===t;Y.evenInteger=Dy(0);Y.oddInteger=Dy(1);Y.emptyArray=t=>Y.array(t)&&t.length===0;Y.nonEmptyArray=t=>Y.array(t)&&t.length>0;Y.emptyString=t=>Y.string(t)&&t.length===0;var IF=t=>Y.string(t)&&!/\S/.test(t);Y.emptyStringOrWhitespace=t=>Y.emptyString(t)||IF(t);Y.nonEmptyString=t=>Y.string(t)&&t.length>0;Y.nonEmptyStringAndNotWhitespace=t=>Y.string(t)&&!Y.emptyStringOrWhitespace(t);Y.emptyObject=t=>Y.object(t)&&!Y.map(t)&&!Y.set(t)&&Object.keys(t).length===0;Y.nonEmptyObject=t=>Y.object(t)&&!Y.map(t)&&!Y.set(t)&&Object.keys(t).length>0;Y.emptySet=t=>Y.set(t)&&t.size===0;Y.nonEmptySet=t=>Y.set(t)&&t.size>0;Y.emptyMap=t=>Y.map(t)&&t.size===0;Y.nonEmptyMap=t=>Y.map(t)&&t.size>0;Y.propertyKey=t=>Y.any([Y.string,Y.number,Y.symbol],t);Y.formData=t=>st("FormData")(t);Y.urlSearchParams=t=>st("URLSearchParams")(t);var Sy=(t,e,r)=>{if(!Y.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};Y.any=(t,...e)=>(Y.array(t)?t:[t]).some(i=>Sy(Array.prototype.some,i,e));Y.all=(t,...e)=>Sy(Array.prototype.every,t,e);var xe=(t,e,r,i={})=>{if(!t){let{multipleValues:s}=i,n=s?`received values of types ${[...new Set(r.map(o=>`\`${Y(o)}\``))].join(", ")}`:`received value of type \`${Y(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${n}.`)}},de={undefined:t=>xe(Y.undefined(t),"undefined",t),string:t=>xe(Y.string(t),"string",t),number:t=>xe(Y.number(t),"number",t),positiveNumber:t=>xe(Y.positiveNumber(t),"positive number",t),negativeNumber:t=>xe(Y.negativeNumber(t),"negative number",t),bigint:t=>xe(Y.bigint(t),"bigint",t),function_:t=>xe(Y.function_(t),"Function",t),null_:t=>xe(Y.null_(t),"null",t),class_:t=>xe(Y.class_(t),"Class",t),boolean:t=>xe(Y.boolean(t),"boolean",t),symbol:t=>xe(Y.symbol(t),"symbol",t),numericString:t=>xe(Y.numericString(t),"string with a number",t),array:(t,e)=>{xe(Y.array(t),"Array",t),e&&t.forEach(e);},buffer:t=>xe(Y.buffer(t),"Buffer",t),blob:t=>xe(Y.blob(t),"Blob",t),nullOrUndefined:t=>xe(Y.nullOrUndefined(t),"null or undefined",t),object:t=>xe(Y.object(t),"Object",t),iterable:t=>xe(Y.iterable(t),"Iterable",t),asyncIterable:t=>xe(Y.asyncIterable(t),"AsyncIterable",t),generator:t=>xe(Y.generator(t),"Generator",t),asyncGenerator:t=>xe(Y.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>xe(Y.nativePromise(t),"native Promise",t),promise:t=>xe(Y.promise(t),"Promise",t),generatorFunction:t=>xe(Y.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>xe(Y.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>xe(Y.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>xe(Y.boundFunction(t),"Function",t),regExp:t=>xe(Y.regExp(t),"RegExp",t),date:t=>xe(Y.date(t),"Date",t),error:t=>xe(Y.error(t),"Error",t),map:t=>xe(Y.map(t),"Map",t),set:t=>xe(Y.set(t),"Set",t),weakMap:t=>xe(Y.weakMap(t),"WeakMap",t),weakSet:t=>xe(Y.weakSet(t),"WeakSet",t),weakRef:t=>xe(Y.weakRef(t),"WeakRef",t),int8Array:t=>xe(Y.int8Array(t),"Int8Array",t),uint8Array:t=>xe(Y.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>xe(Y.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>xe(Y.int16Array(t),"Int16Array",t),uint16Array:t=>xe(Y.uint16Array(t),"Uint16Array",t),int32Array:t=>xe(Y.int32Array(t),"Int32Array",t),uint32Array:t=>xe(Y.uint32Array(t),"Uint32Array",t),float32Array:t=>xe(Y.float32Array(t),"Float32Array",t),float64Array:t=>xe(Y.float64Array(t),"Float64Array",t),bigInt64Array:t=>xe(Y.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>xe(Y.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>xe(Y.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>xe(Y.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>xe(Y.dataView(t),"DataView",t),enumCase:(t,e)=>xe(Y.enumCase(t,e),"EnumCase",t),urlInstance:t=>xe(Y.urlInstance(t),"URL",t),urlString:t=>xe(Y.urlString(t),"string with a URL",t),truthy:t=>xe(Y.truthy(t),"truthy",t),falsy:t=>xe(Y.falsy(t),"falsy",t),nan:t=>xe(Y.nan(t),"NaN",t),primitive:t=>xe(Y.primitive(t),"primitive",t),integer:t=>xe(Y.integer(t),"integer",t),safeInteger:t=>xe(Y.safeInteger(t),"integer",t),plainObject:t=>xe(Y.plainObject(t),"plain object",t),typedArray:t=>xe(Y.typedArray(t),"TypedArray",t),arrayLike:t=>xe(Y.arrayLike(t),"array-like",t),tupleLike:(t,e)=>xe(Y.tupleLike(t,e),"tuple-like",t),domElement:t=>xe(Y.domElement(t),"HTMLElement",t),observable:t=>xe(Y.observable(t),"Observable",t),nodeStream:t=>xe(Y.nodeStream(t),"Node.js Stream",t),infinite:t=>xe(Y.infinite(t),"infinite number",t),emptyArray:t=>xe(Y.emptyArray(t),"empty array",t),nonEmptyArray:t=>xe(Y.nonEmptyArray(t),"non-empty array",t),emptyString:t=>xe(Y.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>xe(Y.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>xe(Y.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>xe(Y.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>xe(Y.emptyObject(t),"empty object",t),nonEmptyObject:t=>xe(Y.nonEmptyObject(t),"non-empty object",t),emptySet:t=>xe(Y.emptySet(t),"empty set",t),nonEmptySet:t=>xe(Y.nonEmptySet(t),"non-empty set",t),emptyMap:t=>xe(Y.emptyMap(t),"empty map",t),nonEmptyMap:t=>xe(Y.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>xe(Y.propertyKey(t),"PropertyKey",t),formData:t=>xe(Y.formData(t),"FormData",t),urlSearchParams:t=>xe(Y.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>xe(Y.evenInteger(t),"even integer",t),oddInteger:t=>xe(Y.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>xe(Y.directInstanceOf(t,e),"T",t),inRange:(t,e)=>xe(Y.inRange(t,e),"in range",t),any:(t,...e)=>xe(Y.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>xe(Y.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(Y,{class:{value:Y.class_},function:{value:Y.function_},null:{value:Y.null_}});Object.defineProperties(de,{class:{value:de.class_},function:{value:de.function_},null:{value:de.null_}});var ie=Y;var Od=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError";}get isCanceled(){return !0}},Ks=class t{static fn(e){return (...r)=>new t((i,s,n)=>{r.push(n),e(...r).then(i,s);})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,i)=>{this._reject=i;let s=a=>{(!this._isCanceled||!o.shouldReject)&&(this._isPending=!1,r(a));},n=a=>{this._isPending=!1,i(a);},o=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a);};Object.defineProperties(o,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a;}}}),e(s,n,o);});}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r();}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new Od(e));}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(Ks.prototype,Promise.prototype);function kF(t){return ie.object(t)&&"_onResponse"in t}var Dt=class extends Error{constructor(e,r,i){var s,n;if(super(e),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=(s=r.code)!=null?s:"ERR_GOT_REQUEST_ERROR",this.input=r.input,kF(i)?(Object.defineProperty(this,"request",{enumerable:!1,value:i}),Object.defineProperty(this,"response",{enumerable:!1,value:i.response}),this.options=i.options):this.options=i,this.timings=(n=this.request)==null?void 0:n.timings,ie.string(r.stack)&&ie.string(this.stack)){let o=this.stack.indexOf(this.message)+this.message.length,a=this.stack.slice(o).split(`
458
+ - As a SCAN_BROWSER_URL_${i} environment variable
459
+ - As a SCAN_BROWSER_URL_${ks(i)} environment variable`),{...r,[i]:{apiUrl:n,apiKey:o,browserUrl:a}}},{}),EO=t=>{var e,r;return ((e=process.env[`SCAN_API_URL_${t}`])==null?void 0:e.trim())||((r=process.env[`SCAN_API_URL_${ks(t)}`])==null?void 0:r.trim())},CO=t=>{var e,r;return ((e=process.env[`SCAN_BROWSER_URL_${t}`])==null?void 0:e.trim())||((r=process.env[`SCAN_BROWSER_URL_${ks(t)}`])==null?void 0:r.trim())},TO=t=>{var e,r;return ((e=process.env[`SCAN_API_KEY_${t}`])==null?void 0:e.trim())||((r=process.env[`SCAN_API_KEY_${ks(t)}`])==null?void 0:r.trim())},ks=t=>t.toUpperCase().replaceAll("-","_");var Td=(i=>(i[i.None=1]="None",i[i.Unlicense=2]="Unlicense",i[i.MIT=3]="MIT",i[i["GNU-GPLv2"]=4]="GNU-GPLv2",i[i["GNU-GPLv3"]=5]="GNU-GPLv3",i[i["GNU-LGPLv2.1"]=6]="GNU-LGPLv2.1",i[i["GNU-LGPLv3"]=7]="GNU-LGPLv3",i[i["BSD-2-Clause"]=8]="BSD-2-Clause",i[i["BSD-3-Clause"]=9]="BSD-3-Clause",i[i["MPL-2.0"]=10]="MPL-2.0",i[i["OSL-3.0"]=11]="OSL-3.0",i[i["Apache-2.0"]=12]="Apache-2.0",i[i["GNU-AGPLv3"]=13]="GNU-AGPLv3",i[i["BUSL-1.1"]=14]="BUSL-1.1",i))(Td||{}),Ad=t=>{let e=t.match(/\/\/\s*SPDX-License-Identifier:\s*(.*)\s*/i),r=e==null?void 0:e[1];return r==null?1:(r in Td||console.warn("Found unknown SPDX license identifier: %s",r),Td[r])};var Ze;(function(t){t.assertEqual=s=>s;function e(s){}t.assertIs=e;function r(s){throw new Error}t.assertNever=r,t.arrayToEnum=s=>{let n={};for(let o of s)n[o]=o;return n},t.getValidEnumValues=s=>{let n=t.objectKeys(s).filter(a=>typeof s[s[a]]!="number"),o={};for(let a of n)o[a]=s[a];return t.objectValues(o)},t.objectValues=s=>t.objectKeys(s).map(function(n){return s[n]}),t.objectKeys=typeof Object.keys=="function"?s=>Object.keys(s):s=>{let n=[];for(let o in s)Object.prototype.hasOwnProperty.call(s,o)&&n.push(o);return n},t.find=(s,n)=>{for(let o of s)if(n(o))return o},t.isInteger=typeof Number.isInteger=="function"?s=>Number.isInteger(s):s=>typeof s=="number"&&isFinite(s)&&Math.floor(s)===s;function i(s,n=" | "){return s.map(o=>typeof o=="string"?`'${o}'`:o).join(n)}t.joinValues=i,t.jsonStringifyReplacer=(s,n)=>typeof n=="bigint"?n.toString():n;})(Ze||(Ze={}));var Dd;(function(t){t.mergeShapes=(e,r)=>({...e,...r});})(Dd||(Dd={}));var Ee=Ze.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),Vi=t=>{switch(typeof t){case"undefined":return Ee.undefined;case"string":return Ee.string;case"number":return isNaN(t)?Ee.nan:Ee.number;case"boolean":return Ee.boolean;case"function":return Ee.function;case"bigint":return Ee.bigint;case"symbol":return Ee.symbol;case"object":return Array.isArray(t)?Ee.array:t===null?Ee.null:t.then&&typeof t.then=="function"&&t.catch&&typeof t.catch=="function"?Ee.promise:typeof Map!="undefined"&&t instanceof Map?Ee.map:typeof Set!="undefined"&&t instanceof Set?Ee.set:typeof Date!="undefined"&&t instanceof Date?Ee.date:Ee.object;default:return Ee.unknown}},ve=Ze.arrayToEnum(["invalid_type","invalid_literal","custom","invalid_union","invalid_union_discriminator","invalid_enum_value","unrecognized_keys","invalid_arguments","invalid_return_type","invalid_date","invalid_string","too_small","too_big","invalid_intersection_types","not_multiple_of","not_finite"]),AO=t=>JSON.stringify(t,null,2).replace(/"([^"]+)":/g,"$1:"),Er=class extends Error{constructor(e){super(),this.issues=[],this.addIssue=i=>{this.issues=[...this.issues,i];},this.addIssues=(i=[])=>{this.issues=[...this.issues,...i];};let r=new.target.prototype;Object.setPrototypeOf?Object.setPrototypeOf(this,r):this.__proto__=r,this.name="ZodError",this.issues=e;}get errors(){return this.issues}format(e){let r=e||function(n){return n.message},i={_errors:[]},s=n=>{for(let o of n.issues)if(o.code==="invalid_union")o.unionErrors.map(s);else if(o.code==="invalid_return_type")s(o.returnTypeError);else if(o.code==="invalid_arguments")s(o.argumentsError);else if(o.path.length===0)i._errors.push(r(o));else {let a=i,u=0;for(;u<o.path.length;){let l=o.path[u];u===o.path.length-1?(a[l]=a[l]||{_errors:[]},a[l]._errors.push(r(o))):a[l]=a[l]||{_errors:[]},a=a[l],u++;}}};return s(this),i}toString(){return this.message}get message(){return JSON.stringify(this.issues,Ze.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(e=r=>r.message){let r={},i=[];for(let s of this.issues)s.path.length>0?(r[s.path[0]]=r[s.path[0]]||[],r[s.path[0]].push(e(s))):i.push(e(s));return {formErrors:i,fieldErrors:r}}get formErrors(){return this.flatten()}};Er.create=t=>new Er(t);var Go=(t,e)=>{let r;switch(t.code){case ve.invalid_type:t.received===Ee.undefined?r="Required":r=`Expected ${t.expected}, received ${t.received}`;break;case ve.invalid_literal:r=`Invalid literal value, expected ${JSON.stringify(t.expected,Ze.jsonStringifyReplacer)}`;break;case ve.unrecognized_keys:r=`Unrecognized key(s) in object: ${Ze.joinValues(t.keys,", ")}`;break;case ve.invalid_union:r="Invalid input";break;case ve.invalid_union_discriminator:r=`Invalid discriminator value. Expected ${Ze.joinValues(t.options)}`;break;case ve.invalid_enum_value:r=`Invalid enum value. Expected ${Ze.joinValues(t.options)}, received '${t.received}'`;break;case ve.invalid_arguments:r="Invalid function arguments";break;case ve.invalid_return_type:r="Invalid function return type";break;case ve.invalid_date:r="Invalid date";break;case ve.invalid_string:typeof t.validation=="object"?"includes"in t.validation?(r=`Invalid input: must include "${t.validation.includes}"`,typeof t.validation.position=="number"&&(r=`${r} at one or more positions greater than or equal to ${t.validation.position}`)):"startsWith"in t.validation?r=`Invalid input: must start with "${t.validation.startsWith}"`:"endsWith"in t.validation?r=`Invalid input: must end with "${t.validation.endsWith}"`:Ze.assertNever(t.validation):t.validation!=="regex"?r=`Invalid ${t.validation}`:r="Invalid";break;case ve.too_small:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at least":"more than"} ${t.minimum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at least":"over"} ${t.minimum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${t.minimum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly equal to ":t.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(t.minimum))}`:r="Invalid input";break;case ve.too_big:t.type==="array"?r=`Array must contain ${t.exact?"exactly":t.inclusive?"at most":"less than"} ${t.maximum} element(s)`:t.type==="string"?r=`String must contain ${t.exact?"exactly":t.inclusive?"at most":"under"} ${t.maximum} character(s)`:t.type==="number"?r=`Number must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="bigint"?r=`BigInt must be ${t.exact?"exactly":t.inclusive?"less than or equal to":"less than"} ${t.maximum}`:t.type==="date"?r=`Date must be ${t.exact?"exactly":t.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(t.maximum))}`:r="Invalid input";break;case ve.custom:r="Invalid input";break;case ve.invalid_intersection_types:r="Intersection results could not be merged";break;case ve.not_multiple_of:r=`Number must be a multiple of ${t.multipleOf}`;break;case ve.not_finite:r="Number must be finite";break;default:r=e.defaultError,Ze.assertNever(t);}return {message:r}},yy=Go;function wO(t){yy=t;}function zu(){return yy}var Ku=t=>{let{data:e,path:r,errorMaps:i,issueData:s}=t,n=[...r,...s.path||[]],o={...s,path:n},a="",u=i.filter(l=>!!l).slice().reverse();for(let l of u)a=l(o,{data:e,defaultError:a}).message;return {...s,path:n,message:s.message||a}},DO=[];function Te(t,e){let r=Ku({issueData:e,data:t.data,path:t.path,errorMaps:[t.common.contextualErrorMap,t.schemaErrorMap,zu(),Go].filter(i=>!!i)});t.common.issues.push(r);}var rr=class t{constructor(){this.value="valid";}dirty(){this.value==="valid"&&(this.value="dirty");}abort(){this.value!=="aborted"&&(this.value="aborted");}static mergeArray(e,r){let i=[];for(let s of r){if(s.status==="aborted")return Pe;s.status==="dirty"&&e.dirty(),i.push(s.value);}return {status:e.value,value:i}}static async mergeObjectAsync(e,r){let i=[];for(let s of r)i.push({key:await s.key,value:await s.value});return t.mergeObjectSync(e,i)}static mergeObjectSync(e,r){let i={};for(let s of r){let{key:n,value:o}=s;if(n.status==="aborted"||o.status==="aborted")return Pe;n.status==="dirty"&&e.dirty(),o.status==="dirty"&&e.dirty(),n.value!=="__proto__"&&(typeof o.value!="undefined"||s.alwaysSet)&&(i[n.value]=o.value);}return {status:e.value,value:i}}},Pe=Object.freeze({status:"aborted"}),vy=t=>({status:"dirty",value:t}),sr=t=>({status:"valid",value:t}),Sd=t=>t.status==="aborted",Rd=t=>t.status==="dirty",Wo=t=>t.status==="valid",Gu=t=>typeof Promise!="undefined"&&t instanceof Promise,Re;(function(t){t.errToObj=e=>typeof e=="string"?{message:e}:e||{},t.toString=e=>typeof e=="string"?e:e==null?void 0:e.message;})(Re||(Re={}));var Fr=class{constructor(e,r,i,s){this._cachedPath=[],this.parent=e,this.data=r,this._path=i,this._key=s;}get path(){return this._cachedPath.length||(this._key instanceof Array?this._cachedPath.push(...this._path,...this._key):this._cachedPath.push(...this._path,this._key)),this._cachedPath}},gy=(t,e)=>{if(Wo(e))return {success:!0,data:e.value};if(!t.common.issues.length)throw new Error("Validation failed but no issues detected.");return {success:!1,get error(){if(this._error)return this._error;let r=new Er(t.common.issues);return this._error=r,this._error}}};function Be(t){if(!t)return {};let{errorMap:e,invalid_type_error:r,required_error:i,description:s}=t;if(e&&(r||i))throw new Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);return e?{errorMap:e,description:s}:{errorMap:(o,a)=>o.code!=="invalid_type"?{message:a.defaultError}:typeof a.data=="undefined"?{message:i!=null?i:a.defaultError}:{message:r!=null?r:a.defaultError},description:s}}var je=class{constructor(e){this.spa=this.safeParseAsync,this._def=e,this.parse=this.parse.bind(this),this.safeParse=this.safeParse.bind(this),this.parseAsync=this.parseAsync.bind(this),this.safeParseAsync=this.safeParseAsync.bind(this),this.spa=this.spa.bind(this),this.refine=this.refine.bind(this),this.refinement=this.refinement.bind(this),this.superRefine=this.superRefine.bind(this),this.optional=this.optional.bind(this),this.nullable=this.nullable.bind(this),this.nullish=this.nullish.bind(this),this.array=this.array.bind(this),this.promise=this.promise.bind(this),this.or=this.or.bind(this),this.and=this.and.bind(this),this.transform=this.transform.bind(this),this.brand=this.brand.bind(this),this.default=this.default.bind(this),this.catch=this.catch.bind(this),this.describe=this.describe.bind(this),this.pipe=this.pipe.bind(this),this.readonly=this.readonly.bind(this),this.isNullable=this.isNullable.bind(this),this.isOptional=this.isOptional.bind(this);}get description(){return this._def.description}_getType(e){return Vi(e.data)}_getOrReturnCtx(e,r){return r||{common:e.parent.common,data:e.data,parsedType:Vi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}_processInputParams(e){return {status:new rr,ctx:{common:e.parent.common,data:e.data,parsedType:Vi(e.data),schemaErrorMap:this._def.errorMap,path:e.path,parent:e.parent}}}_parseSync(e){let r=this._parse(e);if(Gu(r))throw new Error("Synchronous parse encountered promise.");return r}_parseAsync(e){let r=this._parse(e);return Promise.resolve(r)}parse(e,r){let i=this.safeParse(e,r);if(i.success)return i.data;throw i.error}safeParse(e,r){var i;let s={common:{issues:[],async:(i=r==null?void 0:r.async)!==null&&i!==void 0?i:!1,contextualErrorMap:r==null?void 0:r.errorMap},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Vi(e)},n=this._parseSync({data:e,path:s.path,parent:s});return gy(s,n)}async parseAsync(e,r){let i=await this.safeParseAsync(e,r);if(i.success)return i.data;throw i.error}async safeParseAsync(e,r){let i={common:{issues:[],contextualErrorMap:r==null?void 0:r.errorMap,async:!0},path:(r==null?void 0:r.path)||[],schemaErrorMap:this._def.errorMap,parent:null,data:e,parsedType:Vi(e)},s=this._parse({data:e,path:i.path,parent:i}),n=await(Gu(s)?s:Promise.resolve(s));return gy(i,n)}refine(e,r){let i=s=>typeof r=="string"||typeof r=="undefined"?{message:r}:typeof r=="function"?r(s):r;return this._refinement((s,n)=>{let o=e(s),a=()=>n.addIssue({code:ve.custom,...i(s)});return typeof Promise!="undefined"&&o instanceof Promise?o.then(u=>u?!0:(a(),!1)):o?!0:(a(),!1)})}refinement(e,r){return this._refinement((i,s)=>e(i)?!0:(s.addIssue(typeof r=="function"?r(i,s):r),!1))}_refinement(e){return new Cr({schema:this,typeName:Oe.ZodEffects,effect:{type:"refinement",refinement:e}})}superRefine(e){return this._refinement(e)}optional(){return jr.create(this,this._def)}nullable(){return yi.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return _i.create(this,this._def)}promise(){return Ki.create(this,this._def)}or(e){return Hn.create([this,e],this._def)}and(e){return Un.create(this,e,this._def)}transform(e){return new Cr({...Be(this._def),schema:this,typeName:Oe.ZodEffects,effect:{type:"transform",transform:e}})}default(e){let r=typeof e=="function"?e:()=>e;return new Gn({...Be(this._def),innerType:this,defaultValue:r,typeName:Oe.ZodDefault})}brand(){return new Zu({typeName:Oe.ZodBranded,type:this,...Be(this._def)})}catch(e){let r=typeof e=="function"?e:()=>e;return new Us({...Be(this._def),innerType:this,catchValue:r,typeName:Oe.ZodCatch})}describe(e){let r=this.constructor;return new r({...this._def,description:e})}pipe(e){return Yo.create(this,e)}readonly(){return $s.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}},SO=/^c[^\s-]{8,}$/i,RO=/^[a-z][a-z0-9]*$/,NO=/^[0-9A-HJKMNP-TV-Z]{26}$/,OO=/^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i,FO=/^(?!\.)(?!.*\.\.)([A-Z0-9_+-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,LO="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",wd,PO=/^(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))$/,IO=/^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/,kO=t=>t.precision?t.offset?new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}(([+-]\\d{2}(:?\\d{2})?)|Z)$`):new RegExp(`^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}\\.\\d{${t.precision}}Z$`):t.precision===0?t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}Z$"):t.offset?new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?(([+-]\\d{2}(:?\\d{2})?)|Z)$"):new RegExp("^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}(\\.\\d+)?Z$");function MO(t,e){return !!((e==="v4"||!e)&&PO.test(t)||(e==="v6"||!e)&&IO.test(t))}var $i=class t extends je{_parse(e){if(this._def.coerce&&(e.data=String(e.data)),this._getType(e)!==Ee.string){let n=this._getOrReturnCtx(e);return Te(n,{code:ve.invalid_type,expected:Ee.string,received:n.parsedType}),Pe}let i=new rr,s;for(let n of this._def.checks)if(n.kind==="min")e.data.length<n.value&&(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),i.dirty());else if(n.kind==="max")e.data.length>n.value&&(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!1,message:n.message}),i.dirty());else if(n.kind==="length"){let o=e.data.length>n.value,a=e.data.length<n.value;(o||a)&&(s=this._getOrReturnCtx(e,s),o?Te(s,{code:ve.too_big,maximum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}):a&&Te(s,{code:ve.too_small,minimum:n.value,type:"string",inclusive:!0,exact:!0,message:n.message}),i.dirty());}else if(n.kind==="email")FO.test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"email",code:ve.invalid_string,message:n.message}),i.dirty());else if(n.kind==="emoji")wd||(wd=new RegExp(LO,"u")),wd.test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"emoji",code:ve.invalid_string,message:n.message}),i.dirty());else if(n.kind==="uuid")OO.test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"uuid",code:ve.invalid_string,message:n.message}),i.dirty());else if(n.kind==="cuid")SO.test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"cuid",code:ve.invalid_string,message:n.message}),i.dirty());else if(n.kind==="cuid2")RO.test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"cuid2",code:ve.invalid_string,message:n.message}),i.dirty());else if(n.kind==="ulid")NO.test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"ulid",code:ve.invalid_string,message:n.message}),i.dirty());else if(n.kind==="url")try{new URL(e.data);}catch(o){s=this._getOrReturnCtx(e,s),Te(s,{validation:"url",code:ve.invalid_string,message:n.message}),i.dirty();}else n.kind==="regex"?(n.regex.lastIndex=0,n.regex.test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"regex",code:ve.invalid_string,message:n.message}),i.dirty())):n.kind==="trim"?e.data=e.data.trim():n.kind==="includes"?e.data.includes(n.value,n.position)||(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.invalid_string,validation:{includes:n.value,position:n.position},message:n.message}),i.dirty()):n.kind==="toLowerCase"?e.data=e.data.toLowerCase():n.kind==="toUpperCase"?e.data=e.data.toUpperCase():n.kind==="startsWith"?e.data.startsWith(n.value)||(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.invalid_string,validation:{startsWith:n.value},message:n.message}),i.dirty()):n.kind==="endsWith"?e.data.endsWith(n.value)||(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.invalid_string,validation:{endsWith:n.value},message:n.message}),i.dirty()):n.kind==="datetime"?kO(n).test(e.data)||(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.invalid_string,validation:"datetime",message:n.message}),i.dirty()):n.kind==="ip"?MO(e.data,n.version)||(s=this._getOrReturnCtx(e,s),Te(s,{validation:"ip",code:ve.invalid_string,message:n.message}),i.dirty()):Ze.assertNever(n);return {status:i.value,value:e.data}}_regex(e,r,i){return this.refinement(s=>e.test(s),{validation:r,code:ve.invalid_string,...Re.errToObj(i)})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}email(e){return this._addCheck({kind:"email",...Re.errToObj(e)})}url(e){return this._addCheck({kind:"url",...Re.errToObj(e)})}emoji(e){return this._addCheck({kind:"emoji",...Re.errToObj(e)})}uuid(e){return this._addCheck({kind:"uuid",...Re.errToObj(e)})}cuid(e){return this._addCheck({kind:"cuid",...Re.errToObj(e)})}cuid2(e){return this._addCheck({kind:"cuid2",...Re.errToObj(e)})}ulid(e){return this._addCheck({kind:"ulid",...Re.errToObj(e)})}ip(e){return this._addCheck({kind:"ip",...Re.errToObj(e)})}datetime(e){var r;return typeof e=="string"?this._addCheck({kind:"datetime",precision:null,offset:!1,message:e}):this._addCheck({kind:"datetime",precision:typeof(e==null?void 0:e.precision)=="undefined"?null:e==null?void 0:e.precision,offset:(r=e==null?void 0:e.offset)!==null&&r!==void 0?r:!1,...Re.errToObj(e==null?void 0:e.message)})}regex(e,r){return this._addCheck({kind:"regex",regex:e,...Re.errToObj(r)})}includes(e,r){return this._addCheck({kind:"includes",value:e,position:r==null?void 0:r.position,...Re.errToObj(r==null?void 0:r.message)})}startsWith(e,r){return this._addCheck({kind:"startsWith",value:e,...Re.errToObj(r)})}endsWith(e,r){return this._addCheck({kind:"endsWith",value:e,...Re.errToObj(r)})}min(e,r){return this._addCheck({kind:"min",value:e,...Re.errToObj(r)})}max(e,r){return this._addCheck({kind:"max",value:e,...Re.errToObj(r)})}length(e,r){return this._addCheck({kind:"length",value:e,...Re.errToObj(r)})}nonempty(e){return this.min(1,Re.errToObj(e))}trim(){return new t({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new t({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return !!this._def.checks.find(e=>e.kind==="datetime")}get isEmail(){return !!this._def.checks.find(e=>e.kind==="email")}get isURL(){return !!this._def.checks.find(e=>e.kind==="url")}get isEmoji(){return !!this._def.checks.find(e=>e.kind==="emoji")}get isUUID(){return !!this._def.checks.find(e=>e.kind==="uuid")}get isCUID(){return !!this._def.checks.find(e=>e.kind==="cuid")}get isCUID2(){return !!this._def.checks.find(e=>e.kind==="cuid2")}get isULID(){return !!this._def.checks.find(e=>e.kind==="ulid")}get isIP(){return !!this._def.checks.find(e=>e.kind==="ip")}get minLength(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxLength(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};$i.create=t=>{var e;return new $i({checks:[],typeName:Oe.ZodString,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Be(t)})};function BO(t,e){let r=(t.toString().split(".")[1]||"").length,i=(e.toString().split(".")[1]||"").length,s=r>i?r:i,n=parseInt(t.toFixed(s).replace(".","")),o=parseInt(e.toFixed(s).replace(".",""));return n%o/Math.pow(10,s)}var In=class t extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte,this.step=this.multipleOf;}_parse(e){if(this._def.coerce&&(e.data=Number(e.data)),this._getType(e)!==Ee.number){let n=this._getOrReturnCtx(e);return Te(n,{code:ve.invalid_type,expected:Ee.number,received:n.parsedType}),Pe}let i,s=new rr;for(let n of this._def.checks)n.kind==="int"?Ze.isInteger(e.data)||(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.invalid_type,expected:"integer",received:"float",message:n.message}),s.dirty()):n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.too_small,minimum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.too_big,maximum:n.value,type:"number",inclusive:n.inclusive,exact:!1,message:n.message}),s.dirty()):n.kind==="multipleOf"?BO(e.data,n.value)!==0&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):n.kind==="finite"?Number.isFinite(e.data)||(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.not_finite,message:n.message}),s.dirty()):Ze.assertNever(n);return {status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Re.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Re.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Re.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Re.toString(r))}setLimit(e,r,i,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:Re.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}int(e){return this._addCheck({kind:"int",message:Re.toString(e)})}positive(e){return this._addCheck({kind:"min",value:0,inclusive:!1,message:Re.toString(e)})}negative(e){return this._addCheck({kind:"max",value:0,inclusive:!1,message:Re.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:0,inclusive:!0,message:Re.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:0,inclusive:!0,message:Re.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Re.toString(r)})}finite(e){return this._addCheck({kind:"finite",message:Re.toString(e)})}safe(e){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:Re.toString(e)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:Re.toString(e)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}get isInt(){return !!this._def.checks.find(e=>e.kind==="int"||e.kind==="multipleOf"&&Ze.isInteger(e.value))}get isFinite(){let e=null,r=null;for(let i of this._def.checks){if(i.kind==="finite"||i.kind==="int"||i.kind==="multipleOf")return !0;i.kind==="min"?(r===null||i.value>r)&&(r=i.value):i.kind==="max"&&(e===null||i.value<e)&&(e=i.value);}return Number.isFinite(r)&&Number.isFinite(e)}};In.create=t=>new In({checks:[],typeName:Oe.ZodNumber,coerce:(t==null?void 0:t.coerce)||!1,...Be(t)});var kn=class t extends je{constructor(){super(...arguments),this.min=this.gte,this.max=this.lte;}_parse(e){if(this._def.coerce&&(e.data=BigInt(e.data)),this._getType(e)!==Ee.bigint){let n=this._getOrReturnCtx(e);return Te(n,{code:ve.invalid_type,expected:Ee.bigint,received:n.parsedType}),Pe}let i,s=new rr;for(let n of this._def.checks)n.kind==="min"?(n.inclusive?e.data<n.value:e.data<=n.value)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.too_small,type:"bigint",minimum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):n.kind==="max"?(n.inclusive?e.data>n.value:e.data>=n.value)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.too_big,type:"bigint",maximum:n.value,inclusive:n.inclusive,message:n.message}),s.dirty()):n.kind==="multipleOf"?e.data%n.value!==BigInt(0)&&(i=this._getOrReturnCtx(e,i),Te(i,{code:ve.not_multiple_of,multipleOf:n.value,message:n.message}),s.dirty()):Ze.assertNever(n);return {status:s.value,value:e.data}}gte(e,r){return this.setLimit("min",e,!0,Re.toString(r))}gt(e,r){return this.setLimit("min",e,!1,Re.toString(r))}lte(e,r){return this.setLimit("max",e,!0,Re.toString(r))}lt(e,r){return this.setLimit("max",e,!1,Re.toString(r))}setLimit(e,r,i,s){return new t({...this._def,checks:[...this._def.checks,{kind:e,value:r,inclusive:i,message:Re.toString(s)}]})}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}positive(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:Re.toString(e)})}negative(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:Re.toString(e)})}nonpositive(e){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:Re.toString(e)})}nonnegative(e){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:Re.toString(e)})}multipleOf(e,r){return this._addCheck({kind:"multipleOf",value:e,message:Re.toString(r)})}get minValue(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e}get maxValue(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e}};kn.create=t=>{var e;return new kn({checks:[],typeName:Oe.ZodBigInt,coerce:(e=t==null?void 0:t.coerce)!==null&&e!==void 0?e:!1,...Be(t)})};var Mn=class extends je{_parse(e){if(this._def.coerce&&(e.data=!!e.data),this._getType(e)!==Ee.boolean){let i=this._getOrReturnCtx(e);return Te(i,{code:ve.invalid_type,expected:Ee.boolean,received:i.parsedType}),Pe}return sr(e.data)}};Mn.create=t=>new Mn({typeName:Oe.ZodBoolean,coerce:(t==null?void 0:t.coerce)||!1,...Be(t)});var Bn=class t extends je{_parse(e){if(this._def.coerce&&(e.data=new Date(e.data)),this._getType(e)!==Ee.date){let n=this._getOrReturnCtx(e);return Te(n,{code:ve.invalid_type,expected:Ee.date,received:n.parsedType}),Pe}if(isNaN(e.data.getTime())){let n=this._getOrReturnCtx(e);return Te(n,{code:ve.invalid_date}),Pe}let i=new rr,s;for(let n of this._def.checks)n.kind==="min"?e.data.getTime()<n.value&&(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.too_small,message:n.message,inclusive:!0,exact:!1,minimum:n.value,type:"date"}),i.dirty()):n.kind==="max"?e.data.getTime()>n.value&&(s=this._getOrReturnCtx(e,s),Te(s,{code:ve.too_big,message:n.message,inclusive:!0,exact:!1,maximum:n.value,type:"date"}),i.dirty()):Ze.assertNever(n);return {status:i.value,value:new Date(e.data.getTime())}}_addCheck(e){return new t({...this._def,checks:[...this._def.checks,e]})}min(e,r){return this._addCheck({kind:"min",value:e.getTime(),message:Re.toString(r)})}max(e,r){return this._addCheck({kind:"max",value:e.getTime(),message:Re.toString(r)})}get minDate(){let e=null;for(let r of this._def.checks)r.kind==="min"&&(e===null||r.value>e)&&(e=r.value);return e!=null?new Date(e):null}get maxDate(){let e=null;for(let r of this._def.checks)r.kind==="max"&&(e===null||r.value<e)&&(e=r.value);return e!=null?new Date(e):null}};Bn.create=t=>new Bn({checks:[],coerce:(t==null?void 0:t.coerce)||!1,typeName:Oe.ZodDate,...Be(t)});var Bs=class extends je{_parse(e){if(this._getType(e)!==Ee.symbol){let i=this._getOrReturnCtx(e);return Te(i,{code:ve.invalid_type,expected:Ee.symbol,received:i.parsedType}),Pe}return sr(e.data)}};Bs.create=t=>new Bs({typeName:Oe.ZodSymbol,...Be(t)});var jn=class extends je{_parse(e){if(this._getType(e)!==Ee.undefined){let i=this._getOrReturnCtx(e);return Te(i,{code:ve.invalid_type,expected:Ee.undefined,received:i.parsedType}),Pe}return sr(e.data)}};jn.create=t=>new jn({typeName:Oe.ZodUndefined,...Be(t)});var qn=class extends je{_parse(e){if(this._getType(e)!==Ee.null){let i=this._getOrReturnCtx(e);return Te(i,{code:ve.invalid_type,expected:Ee.null,received:i.parsedType}),Pe}return sr(e.data)}};qn.create=t=>new qn({typeName:Oe.ZodNull,...Be(t)});var zi=class extends je{constructor(){super(...arguments),this._any=!0;}_parse(e){return sr(e.data)}};zi.create=t=>new zi({typeName:Oe.ZodAny,...Be(t)});var gi=class extends je{constructor(){super(...arguments),this._unknown=!0;}_parse(e){return sr(e.data)}};gi.create=t=>new gi({typeName:Oe.ZodUnknown,...Be(t)});var qr=class extends je{_parse(e){let r=this._getOrReturnCtx(e);return Te(r,{code:ve.invalid_type,expected:Ee.never,received:r.parsedType}),Pe}};qr.create=t=>new qr({typeName:Oe.ZodNever,...Be(t)});var js=class extends je{_parse(e){if(this._getType(e)!==Ee.undefined){let i=this._getOrReturnCtx(e);return Te(i,{code:ve.invalid_type,expected:Ee.void,received:i.parsedType}),Pe}return sr(e.data)}};js.create=t=>new js({typeName:Oe.ZodVoid,...Be(t)});var _i=class t extends je{_parse(e){let{ctx:r,status:i}=this._processInputParams(e),s=this._def;if(r.parsedType!==Ee.array)return Te(r,{code:ve.invalid_type,expected:Ee.array,received:r.parsedType}),Pe;if(s.exactLength!==null){let o=r.data.length>s.exactLength.value,a=r.data.length<s.exactLength.value;(o||a)&&(Te(r,{code:o?ve.too_big:ve.too_small,minimum:a?s.exactLength.value:void 0,maximum:o?s.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:s.exactLength.message}),i.dirty());}if(s.minLength!==null&&r.data.length<s.minLength.value&&(Te(r,{code:ve.too_small,minimum:s.minLength.value,type:"array",inclusive:!0,exact:!1,message:s.minLength.message}),i.dirty()),s.maxLength!==null&&r.data.length>s.maxLength.value&&(Te(r,{code:ve.too_big,maximum:s.maxLength.value,type:"array",inclusive:!0,exact:!1,message:s.maxLength.message}),i.dirty()),r.common.async)return Promise.all([...r.data].map((o,a)=>s.type._parseAsync(new Fr(r,o,r.path,a)))).then(o=>rr.mergeArray(i,o));let n=[...r.data].map((o,a)=>s.type._parseSync(new Fr(r,o,r.path,a)));return rr.mergeArray(i,n)}get element(){return this._def.type}min(e,r){return new t({...this._def,minLength:{value:e,message:Re.toString(r)}})}max(e,r){return new t({...this._def,maxLength:{value:e,message:Re.toString(r)}})}length(e,r){return new t({...this._def,exactLength:{value:e,message:Re.toString(r)}})}nonempty(e){return this.min(1,e)}};_i.create=(t,e)=>new _i({type:t,minLength:null,maxLength:null,exactLength:null,typeName:Oe.ZodArray,...Be(e)});function Ms(t){if(t instanceof cr){let e={};for(let r in t.shape){let i=t.shape[r];e[r]=jr.create(Ms(i));}return new cr({...t._def,shape:()=>e})}else return t instanceof _i?new _i({...t._def,type:Ms(t.element)}):t instanceof jr?jr.create(Ms(t.unwrap())):t instanceof yi?yi.create(Ms(t.unwrap())):t instanceof Jr?Jr.create(t.items.map(e=>Ms(e))):t}var cr=class t extends je{constructor(){super(...arguments),this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend;}_getCached(){if(this._cached!==null)return this._cached;let e=this._def.shape(),r=Ze.objectKeys(e);return this._cached={shape:e,keys:r}}_parse(e){if(this._getType(e)!==Ee.object){let l=this._getOrReturnCtx(e);return Te(l,{code:ve.invalid_type,expected:Ee.object,received:l.parsedType}),Pe}let{status:i,ctx:s}=this._processInputParams(e),{shape:n,keys:o}=this._getCached(),a=[];if(!(this._def.catchall instanceof qr&&this._def.unknownKeys==="strip"))for(let l in s.data)o.includes(l)||a.push(l);let u=[];for(let l of o){let h=n[l],c=s.data[l];u.push({key:{status:"valid",value:l},value:h._parse(new Fr(s,c,s.path,l)),alwaysSet:l in s.data});}if(this._def.catchall instanceof qr){let l=this._def.unknownKeys;if(l==="passthrough")for(let h of a)u.push({key:{status:"valid",value:h},value:{status:"valid",value:s.data[h]}});else if(l==="strict")a.length>0&&(Te(s,{code:ve.unrecognized_keys,keys:a}),i.dirty());else if(l!=="strip")throw new Error("Internal ZodObject error: invalid unknownKeys value.")}else {let l=this._def.catchall;for(let h of a){let c=s.data[h];u.push({key:{status:"valid",value:h},value:l._parse(new Fr(s,c,s.path,h)),alwaysSet:h in s.data});}}return s.common.async?Promise.resolve().then(async()=>{let l=[];for(let h of u){let c=await h.key;l.push({key:c,value:await h.value,alwaysSet:h.alwaysSet});}return l}).then(l=>rr.mergeObjectSync(i,l)):rr.mergeObjectSync(i,u)}get shape(){return this._def.shape()}strict(e){return Re.errToObj,new t({...this._def,unknownKeys:"strict",...e!==void 0?{errorMap:(r,i)=>{var s,n,o,a;let u=(o=(n=(s=this._def).errorMap)===null||n===void 0?void 0:n.call(s,r,i).message)!==null&&o!==void 0?o:i.defaultError;return r.code==="unrecognized_keys"?{message:(a=Re.errToObj(e).message)!==null&&a!==void 0?a:u}:{message:u}}}:{}})}strip(){return new t({...this._def,unknownKeys:"strip"})}passthrough(){return new t({...this._def,unknownKeys:"passthrough"})}extend(e){return new t({...this._def,shape:()=>({...this._def.shape(),...e})})}merge(e){return new t({unknownKeys:e._def.unknownKeys,catchall:e._def.catchall,shape:()=>({...this._def.shape(),...e._def.shape()}),typeName:Oe.ZodObject})}setKey(e,r){return this.augment({[e]:r})}catchall(e){return new t({...this._def,catchall:e})}pick(e){let r={};return Ze.objectKeys(e).forEach(i=>{e[i]&&this.shape[i]&&(r[i]=this.shape[i]);}),new t({...this._def,shape:()=>r})}omit(e){let r={};return Ze.objectKeys(this.shape).forEach(i=>{e[i]||(r[i]=this.shape[i]);}),new t({...this._def,shape:()=>r})}deepPartial(){return Ms(this)}partial(e){let r={};return Ze.objectKeys(this.shape).forEach(i=>{let s=this.shape[i];e&&!e[i]?r[i]=s:r[i]=s.optional();}),new t({...this._def,shape:()=>r})}required(e){let r={};return Ze.objectKeys(this.shape).forEach(i=>{if(e&&!e[i])r[i]=this.shape[i];else {let n=this.shape[i];for(;n instanceof jr;)n=n._def.innerType;r[i]=n;}}),new t({...this._def,shape:()=>r})}keyof(){return xy(Ze.objectKeys(this.shape))}};cr.create=(t,e)=>new cr({shape:()=>t,unknownKeys:"strip",catchall:qr.create(),typeName:Oe.ZodObject,...Be(e)});cr.strictCreate=(t,e)=>new cr({shape:()=>t,unknownKeys:"strict",catchall:qr.create(),typeName:Oe.ZodObject,...Be(e)});cr.lazycreate=(t,e)=>new cr({shape:t,unknownKeys:"strip",catchall:qr.create(),typeName:Oe.ZodObject,...Be(e)});var Hn=class extends je{_parse(e){let{ctx:r}=this._processInputParams(e),i=this._def.options;function s(n){for(let a of n)if(a.result.status==="valid")return a.result;for(let a of n)if(a.result.status==="dirty")return r.common.issues.push(...a.ctx.common.issues),a.result;let o=n.map(a=>new Er(a.ctx.common.issues));return Te(r,{code:ve.invalid_union,unionErrors:o}),Pe}if(r.common.async)return Promise.all(i.map(async n=>{let o={...r,common:{...r.common,issues:[]},parent:null};return {result:await n._parseAsync({data:r.data,path:r.path,parent:o}),ctx:o}})).then(s);{let n,o=[];for(let u of i){let l={...r,common:{...r.common,issues:[]},parent:null},h=u._parseSync({data:r.data,path:r.path,parent:l});if(h.status==="valid")return h;h.status==="dirty"&&!n&&(n={result:h,ctx:l}),l.common.issues.length&&o.push(l.common.issues);}if(n)return r.common.issues.push(...n.ctx.common.issues),n.result;let a=o.map(u=>new Er(u));return Te(r,{code:ve.invalid_union,unionErrors:a}),Pe}}get options(){return this._def.options}};Hn.create=(t,e)=>new Hn({options:t,typeName:Oe.ZodUnion,...Be(e)});var $u=t=>t instanceof Vn?$u(t.schema):t instanceof Cr?$u(t.innerType()):t instanceof $n?[t.value]:t instanceof zn?t.options:t instanceof Kn?Object.keys(t.enum):t instanceof Gn?$u(t._def.innerType):t instanceof jn?[void 0]:t instanceof qn?[null]:null,Wu=class t extends je{_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ee.object)return Te(r,{code:ve.invalid_type,expected:Ee.object,received:r.parsedType}),Pe;let i=this.discriminator,s=r.data[i],n=this.optionsMap.get(s);return n?r.common.async?n._parseAsync({data:r.data,path:r.path,parent:r}):n._parseSync({data:r.data,path:r.path,parent:r}):(Te(r,{code:ve.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[i]}),Pe)}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(e,r,i){let s=new Map;for(let n of r){let o=$u(n.shape[e]);if(!o)throw new Error(`A discriminator value for key \`${e}\` could not be extracted from all schema options`);for(let a of o){if(s.has(a))throw new Error(`Discriminator property ${String(e)} has duplicate value ${String(a)}`);s.set(a,n);}}return new t({typeName:Oe.ZodDiscriminatedUnion,discriminator:e,options:r,optionsMap:s,...Be(i)})}};function Nd(t,e){let r=Vi(t),i=Vi(e);if(t===e)return {valid:!0,data:t};if(r===Ee.object&&i===Ee.object){let s=Ze.objectKeys(e),n=Ze.objectKeys(t).filter(a=>s.indexOf(a)!==-1),o={...t,...e};for(let a of n){let u=Nd(t[a],e[a]);if(!u.valid)return {valid:!1};o[a]=u.data;}return {valid:!0,data:o}}else if(r===Ee.array&&i===Ee.array){if(t.length!==e.length)return {valid:!1};let s=[];for(let n=0;n<t.length;n++){let o=t[n],a=e[n],u=Nd(o,a);if(!u.valid)return {valid:!1};s.push(u.data);}return {valid:!0,data:s}}else return r===Ee.date&&i===Ee.date&&+t==+e?{valid:!0,data:t}:{valid:!1}}var Un=class extends je{_parse(e){let{status:r,ctx:i}=this._processInputParams(e),s=(n,o)=>{if(Sd(n)||Sd(o))return Pe;let a=Nd(n.value,o.value);return a.valid?((Rd(n)||Rd(o))&&r.dirty(),{status:r.value,value:a.data}):(Te(i,{code:ve.invalid_intersection_types}),Pe)};return i.common.async?Promise.all([this._def.left._parseAsync({data:i.data,path:i.path,parent:i}),this._def.right._parseAsync({data:i.data,path:i.path,parent:i})]).then(([n,o])=>s(n,o)):s(this._def.left._parseSync({data:i.data,path:i.path,parent:i}),this._def.right._parseSync({data:i.data,path:i.path,parent:i}))}};Un.create=(t,e,r)=>new Un({left:t,right:e,typeName:Oe.ZodIntersection,...Be(r)});var Jr=class t extends je{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==Ee.array)return Te(i,{code:ve.invalid_type,expected:Ee.array,received:i.parsedType}),Pe;if(i.data.length<this._def.items.length)return Te(i,{code:ve.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),Pe;!this._def.rest&&i.data.length>this._def.items.length&&(Te(i,{code:ve.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),r.dirty());let n=[...i.data].map((o,a)=>{let u=this._def.items[a]||this._def.rest;return u?u._parse(new Fr(i,o,i.path,a)):null}).filter(o=>!!o);return i.common.async?Promise.all(n).then(o=>rr.mergeArray(r,o)):rr.mergeArray(r,n)}get items(){return this._def.items}rest(e){return new t({...this._def,rest:e})}};Jr.create=(t,e)=>{if(!Array.isArray(t))throw new Error("You must pass an array of schemas to z.tuple([ ... ])");return new Jr({items:t,typeName:Oe.ZodTuple,rest:null,...Be(e)})};var Yu=class t extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==Ee.object)return Te(i,{code:ve.invalid_type,expected:Ee.object,received:i.parsedType}),Pe;let s=[],n=this._def.keyType,o=this._def.valueType;for(let a in i.data)s.push({key:n._parse(new Fr(i,a,i.path,a)),value:o._parse(new Fr(i,i.data[a],i.path,a))});return i.common.async?rr.mergeObjectAsync(r,s):rr.mergeObjectSync(r,s)}get element(){return this._def.valueType}static create(e,r,i){return r instanceof je?new t({keyType:e,valueType:r,typeName:Oe.ZodRecord,...Be(i)}):new t({keyType:$i.create(),valueType:e,typeName:Oe.ZodRecord,...Be(r)})}},qs=class extends je{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==Ee.map)return Te(i,{code:ve.invalid_type,expected:Ee.map,received:i.parsedType}),Pe;let s=this._def.keyType,n=this._def.valueType,o=[...i.data.entries()].map(([a,u],l)=>({key:s._parse(new Fr(i,a,i.path,[l,"key"])),value:n._parse(new Fr(i,u,i.path,[l,"value"]))}));if(i.common.async){let a=new Map;return Promise.resolve().then(async()=>{for(let u of o){let l=await u.key,h=await u.value;if(l.status==="aborted"||h.status==="aborted")return Pe;(l.status==="dirty"||h.status==="dirty")&&r.dirty(),a.set(l.value,h.value);}return {status:r.value,value:a}})}else {let a=new Map;for(let u of o){let l=u.key,h=u.value;if(l.status==="aborted"||h.status==="aborted")return Pe;(l.status==="dirty"||h.status==="dirty")&&r.dirty(),a.set(l.value,h.value);}return {status:r.value,value:a}}}};qs.create=(t,e,r)=>new qs({valueType:e,keyType:t,typeName:Oe.ZodMap,...Be(r)});var Hs=class t extends je{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.parsedType!==Ee.set)return Te(i,{code:ve.invalid_type,expected:Ee.set,received:i.parsedType}),Pe;let s=this._def;s.minSize!==null&&i.data.size<s.minSize.value&&(Te(i,{code:ve.too_small,minimum:s.minSize.value,type:"set",inclusive:!0,exact:!1,message:s.minSize.message}),r.dirty()),s.maxSize!==null&&i.data.size>s.maxSize.value&&(Te(i,{code:ve.too_big,maximum:s.maxSize.value,type:"set",inclusive:!0,exact:!1,message:s.maxSize.message}),r.dirty());let n=this._def.valueType;function o(u){let l=new Set;for(let h of u){if(h.status==="aborted")return Pe;h.status==="dirty"&&r.dirty(),l.add(h.value);}return {status:r.value,value:l}}let a=[...i.data.values()].map((u,l)=>n._parse(new Fr(i,u,i.path,l)));return i.common.async?Promise.all(a).then(u=>o(u)):o(a)}min(e,r){return new t({...this._def,minSize:{value:e,message:Re.toString(r)}})}max(e,r){return new t({...this._def,maxSize:{value:e,message:Re.toString(r)}})}size(e,r){return this.min(e,r).max(e,r)}nonempty(e){return this.min(1,e)}};Hs.create=(t,e)=>new Hs({valueType:t,minSize:null,maxSize:null,typeName:Oe.ZodSet,...Be(e)});var Ju=class t extends je{constructor(){super(...arguments),this.validate=this.implement;}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ee.function)return Te(r,{code:ve.invalid_type,expected:Ee.function,received:r.parsedType}),Pe;function i(a,u){return Ku({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,zu(),Go].filter(l=>!!l),issueData:{code:ve.invalid_arguments,argumentsError:u}})}function s(a,u){return Ku({data:a,path:r.path,errorMaps:[r.common.contextualErrorMap,r.schemaErrorMap,zu(),Go].filter(l=>!!l),issueData:{code:ve.invalid_return_type,returnTypeError:u}})}let n={errorMap:r.common.contextualErrorMap},o=r.data;if(this._def.returns instanceof Ki){let a=this;return sr(async function(...u){let l=new Er([]),h=await a._def.args.parseAsync(u,n).catch(f=>{throw l.addIssue(i(u,f)),l}),c=await Reflect.apply(o,this,h);return await a._def.returns._def.type.parseAsync(c,n).catch(f=>{throw l.addIssue(s(c,f)),l})})}else {let a=this;return sr(function(...u){let l=a._def.args.safeParse(u,n);if(!l.success)throw new Er([i(u,l.error)]);let h=Reflect.apply(o,this,l.data),c=a._def.returns.safeParse(h,n);if(!c.success)throw new Er([s(h,c.error)]);return c.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...e){return new t({...this._def,args:Jr.create(e).rest(gi.create())})}returns(e){return new t({...this._def,returns:e})}implement(e){return this.parse(e)}strictImplement(e){return this.parse(e)}static create(e,r,i){return new t({args:e||Jr.create([]).rest(gi.create()),returns:r||gi.create(),typeName:Oe.ZodFunction,...Be(i)})}},Vn=class extends je{get schema(){return this._def.getter()}_parse(e){let{ctx:r}=this._processInputParams(e);return this._def.getter()._parse({data:r.data,path:r.path,parent:r})}};Vn.create=(t,e)=>new Vn({getter:t,typeName:Oe.ZodLazy,...Be(e)});var $n=class extends je{_parse(e){if(e.data!==this._def.value){let r=this._getOrReturnCtx(e);return Te(r,{received:r.data,code:ve.invalid_literal,expected:this._def.value}),Pe}return {status:"valid",value:e.data}}get value(){return this._def.value}};$n.create=(t,e)=>new $n({value:t,typeName:Oe.ZodLiteral,...Be(e)});function xy(t,e){return new zn({values:t,typeName:Oe.ZodEnum,...Be(e)})}var zn=class t extends je{_parse(e){if(typeof e.data!="string"){let r=this._getOrReturnCtx(e),i=this._def.values;return Te(r,{expected:Ze.joinValues(i),received:r.parsedType,code:ve.invalid_type}),Pe}if(this._def.values.indexOf(e.data)===-1){let r=this._getOrReturnCtx(e),i=this._def.values;return Te(r,{received:r.data,code:ve.invalid_enum_value,options:i}),Pe}return sr(e.data)}get options(){return this._def.values}get enum(){let e={};for(let r of this._def.values)e[r]=r;return e}get Values(){let e={};for(let r of this._def.values)e[r]=r;return e}get Enum(){let e={};for(let r of this._def.values)e[r]=r;return e}extract(e){return t.create(e)}exclude(e){return t.create(this.options.filter(r=>!e.includes(r)))}};zn.create=xy;var Kn=class extends je{_parse(e){let r=Ze.getValidEnumValues(this._def.values),i=this._getOrReturnCtx(e);if(i.parsedType!==Ee.string&&i.parsedType!==Ee.number){let s=Ze.objectValues(r);return Te(i,{expected:Ze.joinValues(s),received:i.parsedType,code:ve.invalid_type}),Pe}if(r.indexOf(e.data)===-1){let s=Ze.objectValues(r);return Te(i,{received:i.data,code:ve.invalid_enum_value,options:s}),Pe}return sr(e.data)}get enum(){return this._def.values}};Kn.create=(t,e)=>new Kn({values:t,typeName:Oe.ZodNativeEnum,...Be(e)});var Ki=class extends je{unwrap(){return this._def.type}_parse(e){let{ctx:r}=this._processInputParams(e);if(r.parsedType!==Ee.promise&&r.common.async===!1)return Te(r,{code:ve.invalid_type,expected:Ee.promise,received:r.parsedType}),Pe;let i=r.parsedType===Ee.promise?r.data:Promise.resolve(r.data);return sr(i.then(s=>this._def.type.parseAsync(s,{path:r.path,errorMap:r.common.contextualErrorMap})))}};Ki.create=(t,e)=>new Ki({type:t,typeName:Oe.ZodPromise,...Be(e)});var Cr=class extends je{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Oe.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(e){let{status:r,ctx:i}=this._processInputParams(e),s=this._def.effect||null,n={addIssue:o=>{Te(i,o),o.fatal?r.abort():r.dirty();},get path(){return i.path}};if(n.addIssue=n.addIssue.bind(n),s.type==="preprocess"){let o=s.transform(i.data,n);return i.common.issues.length?{status:"dirty",value:i.data}:i.common.async?Promise.resolve(o).then(a=>this._def.schema._parseAsync({data:a,path:i.path,parent:i})):this._def.schema._parseSync({data:o,path:i.path,parent:i})}if(s.type==="refinement"){let o=a=>{let u=s.refinement(a,n);if(i.common.async)return Promise.resolve(u);if(u instanceof Promise)throw new Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return a};if(i.common.async===!1){let a=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});return a.status==="aborted"?Pe:(a.status==="dirty"&&r.dirty(),o(a.value),{status:r.value,value:a.value})}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(a=>a.status==="aborted"?Pe:(a.status==="dirty"&&r.dirty(),o(a.value).then(()=>({status:r.value,value:a.value}))))}if(s.type==="transform")if(i.common.async===!1){let o=this._def.schema._parseSync({data:i.data,path:i.path,parent:i});if(!Wo(o))return o;let a=s.transform(o.value,n);if(a instanceof Promise)throw new Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return {status:r.value,value:a}}else return this._def.schema._parseAsync({data:i.data,path:i.path,parent:i}).then(o=>Wo(o)?Promise.resolve(s.transform(o.value,n)).then(a=>({status:r.value,value:a})):o);Ze.assertNever(s);}};Cr.create=(t,e,r)=>new Cr({schema:t,typeName:Oe.ZodEffects,effect:e,...Be(r)});Cr.createWithPreprocess=(t,e,r)=>new Cr({schema:e,effect:{type:"preprocess",transform:t},typeName:Oe.ZodEffects,...Be(r)});var jr=class extends je{_parse(e){return this._getType(e)===Ee.undefined?sr(void 0):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};jr.create=(t,e)=>new jr({innerType:t,typeName:Oe.ZodOptional,...Be(e)});var yi=class extends je{_parse(e){return this._getType(e)===Ee.null?sr(null):this._def.innerType._parse(e)}unwrap(){return this._def.innerType}};yi.create=(t,e)=>new yi({innerType:t,typeName:Oe.ZodNullable,...Be(e)});var Gn=class extends je{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return r.parsedType===Ee.undefined&&(i=this._def.defaultValue()),this._def.innerType._parse({data:i,path:r.path,parent:r})}removeDefault(){return this._def.innerType}};Gn.create=(t,e)=>new Gn({innerType:t,typeName:Oe.ZodDefault,defaultValue:typeof e.default=="function"?e.default:()=>e.default,...Be(e)});var Us=class extends je{_parse(e){let{ctx:r}=this._processInputParams(e),i={...r,common:{...r.common,issues:[]}},s=this._def.innerType._parse({data:i.data,path:i.path,parent:{...i}});return Gu(s)?s.then(n=>({status:"valid",value:n.status==="valid"?n.value:this._def.catchValue({get error(){return new Er(i.common.issues)},input:i.data})})):{status:"valid",value:s.status==="valid"?s.value:this._def.catchValue({get error(){return new Er(i.common.issues)},input:i.data})}}removeCatch(){return this._def.innerType}};Us.create=(t,e)=>new Us({innerType:t,typeName:Oe.ZodCatch,catchValue:typeof e.catch=="function"?e.catch:()=>e.catch,...Be(e)});var Vs=class extends je{_parse(e){if(this._getType(e)!==Ee.nan){let i=this._getOrReturnCtx(e);return Te(i,{code:ve.invalid_type,expected:Ee.nan,received:i.parsedType}),Pe}return {status:"valid",value:e.data}}};Vs.create=t=>new Vs({typeName:Oe.ZodNaN,...Be(t)});var jO=Symbol("zod_brand"),Zu=class extends je{_parse(e){let{ctx:r}=this._processInputParams(e),i=r.data;return this._def.type._parse({data:i,path:r.path,parent:r})}unwrap(){return this._def.type}},Yo=class t extends je{_parse(e){let{status:r,ctx:i}=this._processInputParams(e);if(i.common.async)return (async()=>{let n=await this._def.in._parseAsync({data:i.data,path:i.path,parent:i});return n.status==="aborted"?Pe:n.status==="dirty"?(r.dirty(),vy(n.value)):this._def.out._parseAsync({data:n.value,path:i.path,parent:i})})();{let s=this._def.in._parseSync({data:i.data,path:i.path,parent:i});return s.status==="aborted"?Pe:s.status==="dirty"?(r.dirty(),{status:"dirty",value:s.value}):this._def.out._parseSync({data:s.value,path:i.path,parent:i})}}static create(e,r){return new t({in:e,out:r,typeName:Oe.ZodPipeline})}},$s=class extends je{_parse(e){let r=this._def.innerType._parse(e);return Wo(r)&&(r.value=Object.freeze(r.value)),r}};$s.create=(t,e)=>new $s({innerType:t,typeName:Oe.ZodReadonly,...Be(e)});var by=(t,e={},r)=>t?zi.create().superRefine((i,s)=>{var n,o;if(!t(i)){let a=typeof e=="function"?e(i):typeof e=="string"?{message:e}:e,u=(o=(n=a.fatal)!==null&&n!==void 0?n:r)!==null&&o!==void 0?o:!0,l=typeof a=="string"?{message:a}:a;s.addIssue({code:"custom",...l,fatal:u});}}):zi.create(),qO={object:cr.lazycreate},Oe;(function(t){t.ZodString="ZodString",t.ZodNumber="ZodNumber",t.ZodNaN="ZodNaN",t.ZodBigInt="ZodBigInt",t.ZodBoolean="ZodBoolean",t.ZodDate="ZodDate",t.ZodSymbol="ZodSymbol",t.ZodUndefined="ZodUndefined",t.ZodNull="ZodNull",t.ZodAny="ZodAny",t.ZodUnknown="ZodUnknown",t.ZodNever="ZodNever",t.ZodVoid="ZodVoid",t.ZodArray="ZodArray",t.ZodObject="ZodObject",t.ZodUnion="ZodUnion",t.ZodDiscriminatedUnion="ZodDiscriminatedUnion",t.ZodIntersection="ZodIntersection",t.ZodTuple="ZodTuple",t.ZodRecord="ZodRecord",t.ZodMap="ZodMap",t.ZodSet="ZodSet",t.ZodFunction="ZodFunction",t.ZodLazy="ZodLazy",t.ZodLiteral="ZodLiteral",t.ZodEnum="ZodEnum",t.ZodEffects="ZodEffects",t.ZodNativeEnum="ZodNativeEnum",t.ZodOptional="ZodOptional",t.ZodNullable="ZodNullable",t.ZodDefault="ZodDefault",t.ZodCatch="ZodCatch",t.ZodPromise="ZodPromise",t.ZodBranded="ZodBranded",t.ZodPipeline="ZodPipeline",t.ZodReadonly="ZodReadonly";})(Oe||(Oe={}));var HO=(t,e={message:`Input not instance of ${t.name}`})=>by(r=>r instanceof t,e),Ey=$i.create,Cy=In.create,UO=Vs.create,VO=kn.create,Ty=Mn.create,$O=Bn.create,zO=Bs.create,KO=jn.create,GO=qn.create,WO=zi.create,YO=gi.create,JO=qr.create,ZO=js.create,XO=_i.create,QO=cr.create,eF=cr.strictCreate,tF=Hn.create,rF=Wu.create,iF=Un.create,nF=Jr.create,sF=Yu.create,oF=qs.create,aF=Hs.create,uF=Ju.create,lF=Vn.create,cF=$n.create,hF=zn.create,fF=Kn.create,dF=Ki.create,_y=Cr.create,pF=jr.create,mF=yi.create,gF=Cr.createWithPreprocess,_F=Yo.create,yF=()=>Ey().optional(),vF=()=>Cy().optional(),xF=()=>Ty().optional(),bF={string:t=>$i.create({...t,coerce:!0}),number:t=>In.create({...t,coerce:!0}),boolean:t=>Mn.create({...t,coerce:!0}),bigint:t=>kn.create({...t,coerce:!0}),date:t=>Bn.create({...t,coerce:!0})},EF=Pe,Ie=Object.freeze({__proto__:null,defaultErrorMap:Go,setErrorMap:wO,getErrorMap:zu,makeIssue:Ku,EMPTY_PATH:DO,addIssueToContext:Te,ParseStatus:rr,INVALID:Pe,DIRTY:vy,OK:sr,isAborted:Sd,isDirty:Rd,isValid:Wo,isAsync:Gu,get util(){return Ze},get objectUtil(){return Dd},ZodParsedType:Ee,getParsedType:Vi,ZodType:je,ZodString:$i,ZodNumber:In,ZodBigInt:kn,ZodBoolean:Mn,ZodDate:Bn,ZodSymbol:Bs,ZodUndefined:jn,ZodNull:qn,ZodAny:zi,ZodUnknown:gi,ZodNever:qr,ZodVoid:js,ZodArray:_i,ZodObject:cr,ZodUnion:Hn,ZodDiscriminatedUnion:Wu,ZodIntersection:Un,ZodTuple:Jr,ZodRecord:Yu,ZodMap:qs,ZodSet:Hs,ZodFunction:Ju,ZodLazy:Vn,ZodLiteral:$n,ZodEnum:zn,ZodNativeEnum:Kn,ZodPromise:Ki,ZodEffects:Cr,ZodTransformer:Cr,ZodOptional:jr,ZodNullable:yi,ZodDefault:Gn,ZodCatch:Us,ZodNaN:Vs,BRAND:jO,ZodBranded:Zu,ZodPipeline:Yo,ZodReadonly:$s,custom:by,Schema:je,ZodSchema:je,late:qO,get ZodFirstPartyTypeKind(){return Oe},coerce:bF,any:WO,array:XO,bigint:VO,boolean:Ty,date:$O,discriminatedUnion:rF,effect:_y,enum:hF,function:uF,instanceof:HO,intersection:iF,lazy:lF,literal:cF,map:oF,nan:UO,nativeEnum:fF,never:JO,null:GO,nullable:mF,number:Cy,object:QO,oboolean:xF,onumber:vF,optional:pF,ostring:yF,pipeline:_F,preprocess:gF,promise:dF,record:sF,set:aF,strictObject:eF,string:Ey,symbol:zO,transformer:_y,tuple:nF,undefined:KO,union:tF,unknown:YO,void:ZO,NEVER:EF,ZodIssueCode:ve,quotelessJson:AO,ZodError:Er});var Xu=t=>new Promise(e=>{setTimeout(e,t);}),Ay=async(t,e,r)=>{GE__default.default(e>0,`Number of attempts for retry must be larger than 0, got ${e}`);for(let i=0;i<e-1;i++)try{return await t()}catch(s){await(r==null?void 0:r(s,i));}return t()};var wy=["Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Uint16Array","Int32Array","Uint32Array","Float32Array","Float64Array","BigInt64Array","BigUint64Array"];function TF(t){return wy.includes(t)}var AF=["Function","Generator","AsyncGenerator","GeneratorFunction","AsyncGeneratorFunction","AsyncFunction","Observable","Array","Buffer","Blob","Object","RegExp","Date","Error","Map","Set","WeakMap","WeakSet","WeakRef","ArrayBuffer","SharedArrayBuffer","DataView","Promise","URL","FormData","URLSearchParams","HTMLElement","NaN",...wy];function wF(t){return AF.includes(t)}var DF=["null","undefined","string","number","bigint","boolean","symbol"];function SF(t){return DF.includes(t)}function zs(t){return e=>typeof e===t}var{toString:RF}=Object.prototype,Jo=t=>{let e=RF.call(t).slice(8,-1);if(/HTML\w+Element/.test(e)&&Y.domElement(t))return "HTMLElement";if(wF(e))return e},st=t=>e=>Jo(e)===t;function Y(t){if(t===null)return "null";switch(typeof t){case"undefined":return "undefined";case"string":return "string";case"number":return Number.isNaN(t)?"NaN":"number";case"boolean":return "boolean";case"function":return "Function";case"bigint":return "bigint";case"symbol":return "symbol";}if(Y.observable(t))return "Observable";if(Y.array(t))return "Array";if(Y.buffer(t))return "Buffer";let e=Jo(t);if(e)return e;if(t instanceof String||t instanceof Boolean||t instanceof Number)throw new TypeError("Please don't use object wrappers for primitive types");return "Object"}Y.undefined=zs("undefined");Y.string=zs("string");var NF=zs("number");Y.number=t=>NF(t)&&!Y.nan(t);Y.positiveNumber=t=>Y.number(t)&&t>0;Y.negativeNumber=t=>Y.number(t)&&t<0;Y.bigint=zs("bigint");Y.function_=zs("function");Y.null_=t=>t===null;Y.class_=t=>Y.function_(t)&&t.toString().startsWith("class ");Y.boolean=t=>t===!0||t===!1;Y.symbol=zs("symbol");Y.numericString=t=>Y.string(t)&&!Y.emptyStringOrWhitespace(t)&&!Number.isNaN(Number(t));Y.array=(t,e)=>Array.isArray(t)?Y.function_(e)?t.every(r=>e(r)):!0:!1;Y.buffer=t=>{var e,r,i;return (i=(r=(e=t==null?void 0:t.constructor)==null?void 0:e.isBuffer)==null?void 0:r.call(e,t))!=null?i:!1};Y.blob=t=>st("Blob")(t);Y.nullOrUndefined=t=>Y.null_(t)||Y.undefined(t);Y.object=t=>!Y.null_(t)&&(typeof t=="object"||Y.function_(t));Y.iterable=t=>Y.function_(t==null?void 0:t[Symbol.iterator]);Y.asyncIterable=t=>Y.function_(t==null?void 0:t[Symbol.asyncIterator]);Y.generator=t=>Y.iterable(t)&&Y.function_(t==null?void 0:t.next)&&Y.function_(t==null?void 0:t.throw);Y.asyncGenerator=t=>Y.asyncIterable(t)&&Y.function_(t.next)&&Y.function_(t.throw);Y.nativePromise=t=>st("Promise")(t);var OF=t=>Y.function_(t==null?void 0:t.then)&&Y.function_(t==null?void 0:t.catch);Y.promise=t=>Y.nativePromise(t)||OF(t);Y.generatorFunction=st("GeneratorFunction");Y.asyncGeneratorFunction=t=>Jo(t)==="AsyncGeneratorFunction";Y.asyncFunction=t=>Jo(t)==="AsyncFunction";Y.boundFunction=t=>Y.function_(t)&&!t.hasOwnProperty("prototype");Y.regExp=st("RegExp");Y.date=st("Date");Y.error=st("Error");Y.map=t=>st("Map")(t);Y.set=t=>st("Set")(t);Y.weakMap=t=>st("WeakMap")(t);Y.weakSet=t=>st("WeakSet")(t);Y.weakRef=t=>st("WeakRef")(t);Y.int8Array=st("Int8Array");Y.uint8Array=st("Uint8Array");Y.uint8ClampedArray=st("Uint8ClampedArray");Y.int16Array=st("Int16Array");Y.uint16Array=st("Uint16Array");Y.int32Array=st("Int32Array");Y.uint32Array=st("Uint32Array");Y.float32Array=st("Float32Array");Y.float64Array=st("Float64Array");Y.bigInt64Array=st("BigInt64Array");Y.bigUint64Array=st("BigUint64Array");Y.arrayBuffer=st("ArrayBuffer");Y.sharedArrayBuffer=st("SharedArrayBuffer");Y.dataView=st("DataView");Y.enumCase=(t,e)=>Object.values(e).includes(t);Y.directInstanceOf=(t,e)=>Object.getPrototypeOf(t)===e.prototype;Y.urlInstance=t=>st("URL")(t);Y.urlString=t=>{if(!Y.string(t))return !1;try{return new URL(t),!0}catch(e){return !1}};Y.truthy=t=>!!t;Y.falsy=t=>!t;Y.nan=t=>Number.isNaN(t);Y.primitive=t=>Y.null_(t)||SF(typeof t);Y.integer=t=>Number.isInteger(t);Y.safeInteger=t=>Number.isSafeInteger(t);Y.plainObject=t=>{if(typeof t!="object"||t===null)return !1;let e=Object.getPrototypeOf(t);return (e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)};Y.typedArray=t=>TF(Jo(t));var FF=t=>Y.safeInteger(t)&&t>=0;Y.arrayLike=t=>!Y.nullOrUndefined(t)&&!Y.function_(t)&&FF(t.length);Y.tupleLike=(t,e)=>Y.array(e)&&Y.array(t)&&e.length===t.length?e.every((r,i)=>r(t[i])):!1;Y.inRange=(t,e)=>{if(Y.number(e))return t>=Math.min(0,e)&&t<=Math.max(e,0);if(Y.array(e)&&e.length===2)return t>=Math.min(...e)&&t<=Math.max(...e);throw new TypeError(`Invalid range: ${JSON.stringify(e)}`)};var LF=1,PF=["innerHTML","ownerDocument","style","attributes","nodeValue"];Y.domElement=t=>Y.object(t)&&t.nodeType===LF&&Y.string(t.nodeName)&&!Y.plainObject(t)&&PF.every(e=>e in t);Y.observable=t=>{var e,r;return t?t===((e=t[Symbol.observable])==null?void 0:e.call(t))||t===((r=t["@@observable"])==null?void 0:r.call(t)):!1};Y.nodeStream=t=>Y.object(t)&&Y.function_(t.pipe)&&!Y.observable(t);Y.infinite=t=>t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY;var Dy=t=>e=>Y.integer(e)&&Math.abs(e%2)===t;Y.evenInteger=Dy(0);Y.oddInteger=Dy(1);Y.emptyArray=t=>Y.array(t)&&t.length===0;Y.nonEmptyArray=t=>Y.array(t)&&t.length>0;Y.emptyString=t=>Y.string(t)&&t.length===0;var IF=t=>Y.string(t)&&!/\S/.test(t);Y.emptyStringOrWhitespace=t=>Y.emptyString(t)||IF(t);Y.nonEmptyString=t=>Y.string(t)&&t.length>0;Y.nonEmptyStringAndNotWhitespace=t=>Y.string(t)&&!Y.emptyStringOrWhitespace(t);Y.emptyObject=t=>Y.object(t)&&!Y.map(t)&&!Y.set(t)&&Object.keys(t).length===0;Y.nonEmptyObject=t=>Y.object(t)&&!Y.map(t)&&!Y.set(t)&&Object.keys(t).length>0;Y.emptySet=t=>Y.set(t)&&t.size===0;Y.nonEmptySet=t=>Y.set(t)&&t.size>0;Y.emptyMap=t=>Y.map(t)&&t.size===0;Y.nonEmptyMap=t=>Y.map(t)&&t.size>0;Y.propertyKey=t=>Y.any([Y.string,Y.number,Y.symbol],t);Y.formData=t=>st("FormData")(t);Y.urlSearchParams=t=>st("URLSearchParams")(t);var Sy=(t,e,r)=>{if(!Y.function_(e))throw new TypeError(`Invalid predicate: ${JSON.stringify(e)}`);if(r.length===0)throw new TypeError("Invalid number of values");return t.call(r,e)};Y.any=(t,...e)=>(Y.array(t)?t:[t]).some(i=>Sy(Array.prototype.some,i,e));Y.all=(t,...e)=>Sy(Array.prototype.every,t,e);var xe=(t,e,r,i={})=>{if(!t){let{multipleValues:s}=i,n=s?`received values of types ${[...new Set(r.map(o=>`\`${Y(o)}\``))].join(", ")}`:`received value of type \`${Y(r)}\``;throw new TypeError(`Expected value which is \`${e}\`, ${n}.`)}},de={undefined:t=>xe(Y.undefined(t),"undefined",t),string:t=>xe(Y.string(t),"string",t),number:t=>xe(Y.number(t),"number",t),positiveNumber:t=>xe(Y.positiveNumber(t),"positive number",t),negativeNumber:t=>xe(Y.negativeNumber(t),"negative number",t),bigint:t=>xe(Y.bigint(t),"bigint",t),function_:t=>xe(Y.function_(t),"Function",t),null_:t=>xe(Y.null_(t),"null",t),class_:t=>xe(Y.class_(t),"Class",t),boolean:t=>xe(Y.boolean(t),"boolean",t),symbol:t=>xe(Y.symbol(t),"symbol",t),numericString:t=>xe(Y.numericString(t),"string with a number",t),array:(t,e)=>{xe(Y.array(t),"Array",t),e&&t.forEach(e);},buffer:t=>xe(Y.buffer(t),"Buffer",t),blob:t=>xe(Y.blob(t),"Blob",t),nullOrUndefined:t=>xe(Y.nullOrUndefined(t),"null or undefined",t),object:t=>xe(Y.object(t),"Object",t),iterable:t=>xe(Y.iterable(t),"Iterable",t),asyncIterable:t=>xe(Y.asyncIterable(t),"AsyncIterable",t),generator:t=>xe(Y.generator(t),"Generator",t),asyncGenerator:t=>xe(Y.asyncGenerator(t),"AsyncGenerator",t),nativePromise:t=>xe(Y.nativePromise(t),"native Promise",t),promise:t=>xe(Y.promise(t),"Promise",t),generatorFunction:t=>xe(Y.generatorFunction(t),"GeneratorFunction",t),asyncGeneratorFunction:t=>xe(Y.asyncGeneratorFunction(t),"AsyncGeneratorFunction",t),asyncFunction:t=>xe(Y.asyncFunction(t),"AsyncFunction",t),boundFunction:t=>xe(Y.boundFunction(t),"Function",t),regExp:t=>xe(Y.regExp(t),"RegExp",t),date:t=>xe(Y.date(t),"Date",t),error:t=>xe(Y.error(t),"Error",t),map:t=>xe(Y.map(t),"Map",t),set:t=>xe(Y.set(t),"Set",t),weakMap:t=>xe(Y.weakMap(t),"WeakMap",t),weakSet:t=>xe(Y.weakSet(t),"WeakSet",t),weakRef:t=>xe(Y.weakRef(t),"WeakRef",t),int8Array:t=>xe(Y.int8Array(t),"Int8Array",t),uint8Array:t=>xe(Y.uint8Array(t),"Uint8Array",t),uint8ClampedArray:t=>xe(Y.uint8ClampedArray(t),"Uint8ClampedArray",t),int16Array:t=>xe(Y.int16Array(t),"Int16Array",t),uint16Array:t=>xe(Y.uint16Array(t),"Uint16Array",t),int32Array:t=>xe(Y.int32Array(t),"Int32Array",t),uint32Array:t=>xe(Y.uint32Array(t),"Uint32Array",t),float32Array:t=>xe(Y.float32Array(t),"Float32Array",t),float64Array:t=>xe(Y.float64Array(t),"Float64Array",t),bigInt64Array:t=>xe(Y.bigInt64Array(t),"BigInt64Array",t),bigUint64Array:t=>xe(Y.bigUint64Array(t),"BigUint64Array",t),arrayBuffer:t=>xe(Y.arrayBuffer(t),"ArrayBuffer",t),sharedArrayBuffer:t=>xe(Y.sharedArrayBuffer(t),"SharedArrayBuffer",t),dataView:t=>xe(Y.dataView(t),"DataView",t),enumCase:(t,e)=>xe(Y.enumCase(t,e),"EnumCase",t),urlInstance:t=>xe(Y.urlInstance(t),"URL",t),urlString:t=>xe(Y.urlString(t),"string with a URL",t),truthy:t=>xe(Y.truthy(t),"truthy",t),falsy:t=>xe(Y.falsy(t),"falsy",t),nan:t=>xe(Y.nan(t),"NaN",t),primitive:t=>xe(Y.primitive(t),"primitive",t),integer:t=>xe(Y.integer(t),"integer",t),safeInteger:t=>xe(Y.safeInteger(t),"integer",t),plainObject:t=>xe(Y.plainObject(t),"plain object",t),typedArray:t=>xe(Y.typedArray(t),"TypedArray",t),arrayLike:t=>xe(Y.arrayLike(t),"array-like",t),tupleLike:(t,e)=>xe(Y.tupleLike(t,e),"tuple-like",t),domElement:t=>xe(Y.domElement(t),"HTMLElement",t),observable:t=>xe(Y.observable(t),"Observable",t),nodeStream:t=>xe(Y.nodeStream(t),"Node.js Stream",t),infinite:t=>xe(Y.infinite(t),"infinite number",t),emptyArray:t=>xe(Y.emptyArray(t),"empty array",t),nonEmptyArray:t=>xe(Y.nonEmptyArray(t),"non-empty array",t),emptyString:t=>xe(Y.emptyString(t),"empty string",t),emptyStringOrWhitespace:t=>xe(Y.emptyStringOrWhitespace(t),"empty string or whitespace",t),nonEmptyString:t=>xe(Y.nonEmptyString(t),"non-empty string",t),nonEmptyStringAndNotWhitespace:t=>xe(Y.nonEmptyStringAndNotWhitespace(t),"non-empty string and not whitespace",t),emptyObject:t=>xe(Y.emptyObject(t),"empty object",t),nonEmptyObject:t=>xe(Y.nonEmptyObject(t),"non-empty object",t),emptySet:t=>xe(Y.emptySet(t),"empty set",t),nonEmptySet:t=>xe(Y.nonEmptySet(t),"non-empty set",t),emptyMap:t=>xe(Y.emptyMap(t),"empty map",t),nonEmptyMap:t=>xe(Y.nonEmptyMap(t),"non-empty map",t),propertyKey:t=>xe(Y.propertyKey(t),"PropertyKey",t),formData:t=>xe(Y.formData(t),"FormData",t),urlSearchParams:t=>xe(Y.urlSearchParams(t),"URLSearchParams",t),evenInteger:t=>xe(Y.evenInteger(t),"even integer",t),oddInteger:t=>xe(Y.oddInteger(t),"odd integer",t),directInstanceOf:(t,e)=>xe(Y.directInstanceOf(t,e),"T",t),inRange:(t,e)=>xe(Y.inRange(t,e),"in range",t),any:(t,...e)=>xe(Y.any(t,...e),"predicate returns truthy for any value",e,{multipleValues:!0}),all:(t,...e)=>xe(Y.all(t,...e),"predicate returns truthy for all values",e,{multipleValues:!0})};Object.defineProperties(Y,{class:{value:Y.class_},function:{value:Y.function_},null:{value:Y.null_}});Object.defineProperties(de,{class:{value:de.class_},function:{value:de.function_},null:{value:de.null_}});var ie=Y;var Od=class extends Error{constructor(e){super(e||"Promise was canceled"),this.name="CancelError";}get isCanceled(){return !0}},Ks=class t{static fn(e){return (...r)=>new t((i,s,n)=>{r.push(n),e(...r).then(i,s);})}constructor(e){this._cancelHandlers=[],this._isPending=!0,this._isCanceled=!1,this._rejectOnCancel=!0,this._promise=new Promise((r,i)=>{this._reject=i;let s=a=>{(!this._isCanceled||!o.shouldReject)&&(this._isPending=!1,r(a));},n=a=>{this._isPending=!1,i(a);},o=a=>{if(!this._isPending)throw new Error("The `onCancel` handler was attached after the promise settled.");this._cancelHandlers.push(a);};Object.defineProperties(o,{shouldReject:{get:()=>this._rejectOnCancel,set:a=>{this._rejectOnCancel=a;}}}),e(s,n,o);});}then(e,r){return this._promise.then(e,r)}catch(e){return this._promise.catch(e)}finally(e){return this._promise.finally(e)}cancel(e){if(!(!this._isPending||this._isCanceled)){if(this._isCanceled=!0,this._cancelHandlers.length>0)try{for(let r of this._cancelHandlers)r();}catch(r){this._reject(r);return}this._rejectOnCancel&&this._reject(new Od(e));}}get isCanceled(){return this._isCanceled}};Object.setPrototypeOf(Ks.prototype,Promise.prototype);function kF(t){return ie.object(t)&&"_onResponse"in t}var Dt=class extends Error{constructor(e,r,i){var s,n;if(super(e),Object.defineProperty(this,"input",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"code",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"stack",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"response",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"request",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Object.defineProperty(this,"timings",{enumerable:!0,configurable:!0,writable:!0,value:void 0}),Error.captureStackTrace(this,this.constructor),this.name="RequestError",this.code=(s=r.code)!=null?s:"ERR_GOT_REQUEST_ERROR",this.input=r.input,kF(i)?(Object.defineProperty(this,"request",{enumerable:!1,value:i}),Object.defineProperty(this,"response",{enumerable:!1,value:i.response}),this.options=i.options):this.options=i,this.timings=(n=this.request)==null?void 0:n.timings,ie.string(r.stack)&&ie.string(this.stack)){let o=this.stack.indexOf(this.message)+this.message.length,a=this.stack.slice(o).split(`
460
460
  `).reverse(),u=r.stack.slice(r.stack.indexOf(r.message)+r.message.length).split(`
461
461
  `).reverse();for(;u.length>0&&u[0]===a[0];)a.shift();this.stack=`${this.stack.slice(0,o)}${a.reverse().join(`
462
462
  `)}${u.reverse().join(`
@@ -470,7 +470,7 @@ ${JSON.stringify(r)}`),await Ay(async()=>{let i=await jP(this.props.apiUrl,r);if
470
470
 
471
471
  ${JSON.stringify(i)}`),Cx(i.result))throw new Error("API Rate limit has been exceeded");return i},3,async(i,s)=>{this.emit("retry",i,s),await Xu(2e3);})}async __poll(r){for(;;){this.emit("poll",r);let i=await qP(this.props.apiUrl,r);if(this.logger.verbose(`Received raw polling response from ${this.props.apiUrl}:
472
472
 
473
- ${JSON.stringify(i)}`),i.status===1)return {alreadyVerified:!1};if(Ex(i.result))return {alreadyVerified:!0};if(BP(i.result)){await Xu(1e4);continue}if(Cx(i.result)){await Xu(1e4);continue}throw new Error(`Verification failed with result "${i.result}", status ${i.status} (${i.message})`)}}},Tx=(t,e)=>new N0(t,e),BP=t=>!!(t!=null&&t.match(/Pending/gi)),Ex=t=>!!(t!=null&&t.match(/already verified/gi)),Cx=t=>!!(t!=null&&t.match(/rate/)),jP=async(t,e)=>{try{let r=await R0(t,{method:"POST",form:e,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).json();return Ax.parse(r)}catch(r){throw new Error(`Failed to submit verification request: ${r}`)}},qP=async(t,e)=>{let r=new URL(t);r.searchParams.set("module","contract"),r.searchParams.set("action","checkverifystatus"),r.searchParams.set("guid",e);try{let i=await R0(r).json();return Ax.parse(i)}catch(i){throw new Error(`Failed to check verification status: ${i}`)}},HP=({apiKey:t,address:e,contractName:r,constructorArguments:i,compilerVersion:s,optimizerRuns:n=0,sourceCode:o,evmVersion:a,licenseType:u})=>{let l={action:"verifysourcecode",module:"contract",codeformat:"solidity-standard-json-input",contractaddress:e,contractname:r,compilerversion:`v${s}`,optimizationUsed:n>0?"1":"0",sourceCode:o};return t!=null&&(l.apikey=t),n!=null&&(l.runs=String(n)),i!=null&&(l.constructorArguements=i),a!=null&&(l.evmversion=a),u!=null&&(l.licenseType=String(u)),l},Ax=Ie.object({status:Ie.coerce.number().nullish(),message:Ie.string().nullish(),result:Ie.string().nullish()});var Wa=Kt(Ko());Ie.object({enabled:Ie.boolean().optional(),runs:Ie.number().optional()});Ie.record(Ie.string(),Ie.object({content:Ie.string()}));var UP=Ie.array(Ie.record(Ie.string(),Ie.any())),VP=Ie.object({language:Ie.string(),compiler:Ie.object({version:Ie.string()}),settings:Ie.object({compilationTarget:Ie.record(Ie.string(),Ie.string()),evmVersion:Ie.string(),optimizer:Ie.object({enabled:Ie.boolean().optional(),runs:Ie.number().optional()})}),sources:Ie.record(Ie.string(),Ie.object({content:Ie.string()}))}),O0=Ie.object({address:Ie.string(),abi:UP,args:Ie.array(Ie.any()),solcInputHash:Ie.string(),metadata:Ie.string().transform((t,e)=>{try{return JSON.parse(t)}catch(r){return e.addIssue({code:"custom",message:"Invalid JSON"}),Ie.NEVER}}).pipe(VP),bytecode:Ie.string(),deployedBytecode:Ie.string()});var F0=t=>{let{compilationTarget:e,...r}=t.settings,i=Object.entries(t.sources).reduce((s,[n,o])=>({...s,[n]:{content:o.content}}),{});return {language:t.language,settings:r,sources:i}};var Hx=Kt(Dx());var Sx="logger/5.7.0";var Rx=!1,Nx=!1,Al={debug:1,default:2,info:2,warning:3,error:4,off:5},Ox=Al.default,P0=null;function $P(){try{let t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch(r){t.push(e);}}),t.length)throw new Error("missing "+t.join(", "));if("\xE9".normalize("NFD")!=="e\u0301")throw new Error("broken implementation")}catch(t){return t.message}return null}var Fx=$P(),I0;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF";})(I0||(I0={}));var Hr;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED";})(Hr||(Hr={}));var Lx="0123456789abcdef",ke=class t{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1});}_log(e,r){let i=e.toLowerCase();Al[i]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Ox>Al[i])&&console.log.apply(console,r);}debug(...e){this._log(t.levels.DEBUG,e);}info(...e){this._log(t.levels.INFO,e);}warn(...e){this._log(t.levels.WARNING,e);}makeError(e,r,i){if(Nx)return this.makeError("censored error",r,{});r||(r=t.errors.UNKNOWN_ERROR),i||(i={});let s=[];Object.keys(i).forEach(u=>{let l=i[u];try{if(l instanceof Uint8Array){let h="";for(let c=0;c<l.length;c++)h+=Lx[l[c]>>4],h+=Lx[l[c]&15];s.push(u+"=Uint8Array(0x"+h+")");}else s.push(u+"="+JSON.stringify(l));}catch(h){s.push(u+"="+JSON.stringify(i[u].toString()));}}),s.push(`code=${r}`),s.push(`version=${this.version}`);let n=e,o="";switch(r){case Hr.NUMERIC_FAULT:{o="NUMERIC_FAULT";let u=e;switch(u){case"overflow":case"underflow":case"division-by-zero":o+="-"+u;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case Hr.CALL_EXCEPTION:case Hr.INSUFFICIENT_FUNDS:case Hr.MISSING_NEW:case Hr.NONCE_EXPIRED:case Hr.REPLACEMENT_UNDERPRICED:case Hr.TRANSACTION_REPLACED:case Hr.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),s.length&&(e+=" ("+s.join(", ")+")");let a=new Error(e);return a.reason=n,a.code=r,Object.keys(i).forEach(function(u){a[u]=i[u];}),a}throwError(e,r,i){throw this.makeError(e,r,i)}throwArgumentError(e,r,i){return this.throwError(e,t.errors.INVALID_ARGUMENT,{argument:r,value:i})}assert(e,r,i,s){e||this.throwError(r,i,s);}assertArgument(e,r,i,s){e||this.throwArgumentError(r,i,s);}checkNormalize(e){Fx&&this.throwError("platform missing String.prototype.normalize",t.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Fx});}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}));}checkArgumentCount(e,r,i){i?i=": "+i:i="",e<r&&this.throwError("missing argument"+i,t.errors.MISSING_ARGUMENT,{count:e,expectedCount:r}),e>r&&this.throwError("too many arguments"+i,t.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r});}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name});}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",t.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name});}static globalLogger(){return P0||(P0=new t(Sx)),P0}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Rx){if(!e)return;this.globalLogger().throwError("error censorship permanent",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"});}Nx=!!e,Rx=!!r;}static setLogLevel(e){let r=Al[e.toLowerCase()];if(r==null){t.globalLogger().warn("invalid log level - "+e);return}Ox=r;}static from(e){return new t(e)}};ke.errors=Hr;ke.levels=I0;var Px="bytes/5.7.0";var xi=new ke(Px);function kx(t){return !!t.toHexString}function ya(t){return t.slice||(t.slice=function(){let e=Array.prototype.slice.call(arguments);return ya(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function Ix(t){return typeof t=="number"&&t==t&&t%1===0}function wl(t){if(t==null)return !1;if(t.constructor===Uint8Array)return !0;if(typeof t=="string"||!Ix(t.length)||t.length<0)return !1;for(let e=0;e<t.length;e++){let r=t[e];if(!Ix(r)||r<0||r>=256)return !1}return !0}function It(t,e){if(e||(e={}),typeof t=="number"){xi.checkSafeUint53(t,"invalid arrayify value");let r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),ya(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),kx(t)&&(t=t.toHexString()),hr(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":xi.throwArgumentError("hex data is odd-length","value",t));let i=[];for(let s=0;s<r.length;s+=2)i.push(parseInt(r.substring(s,s+2),16));return ya(new Uint8Array(i))}return wl(t)?ya(new Uint8Array(t)):xi.throwArgumentError("invalid arrayify value","value",t)}function bi(t){let e=t.map(s=>It(s)),r=e.reduce((s,n)=>s+n.length,0),i=new Uint8Array(r);return e.reduce((s,n)=>(i.set(n,s),s+n.length),0),ya(i)}function hr(t,e){return !(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}var k0="0123456789abcdef";function St(t,e){if(e||(e={}),typeof t=="number"){xi.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=k0[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),kx(t))return t.toHexString();if(hr(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":xi.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(wl(t)){let r="0x";for(let i=0;i<t.length;i++){let s=t[i];r+=k0[(s&240)>>4]+k0[s&15];}return r}return xi.throwArgumentError("invalid hexlify value","value",t)}function M0(t,e,r){return typeof t!="string"?t=St(t):(!hr(t)||t.length%2)&&xi.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Mx(t){let e="0x";return t.forEach(r=>{e+=St(r).substring(2);}),e}function Dl(t,e){for(typeof t!="string"?t=St(t):hr(t)||xi.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&xi.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}var Bx="bignumber/5.7.0";var Sl=Hx.default.BN,Ei=new ke(Bx),B0={},jx=9007199254740991;var qx=!1,Nt=class t{constructor(e,r){e!==B0&&Ei.throwError("cannot call constructor directly; use BigNumber.from",ke.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this);}fromTwos(e){return fr(Ke(this).fromTwos(e))}toTwos(e){return fr(Ke(this).toTwos(e))}abs(){return this._hex[0]==="-"?t.from(this._hex.substring(1)):this}add(e){return fr(Ke(this).add(Ke(e)))}sub(e){return fr(Ke(this).sub(Ke(e)))}div(e){return t.from(e).isZero()&&Ir("division-by-zero","div"),fr(Ke(this).div(Ke(e)))}mul(e){return fr(Ke(this).mul(Ke(e)))}mod(e){let r=Ke(e);return r.isNeg()&&Ir("division-by-zero","mod"),fr(Ke(this).umod(r))}pow(e){let r=Ke(e);return r.isNeg()&&Ir("negative-power","pow"),fr(Ke(this).pow(r))}and(e){let r=Ke(e);return (this.isNegative()||r.isNeg())&&Ir("unbound-bitwise-result","and"),fr(Ke(this).and(r))}or(e){let r=Ke(e);return (this.isNegative()||r.isNeg())&&Ir("unbound-bitwise-result","or"),fr(Ke(this).or(r))}xor(e){let r=Ke(e);return (this.isNegative()||r.isNeg())&&Ir("unbound-bitwise-result","xor"),fr(Ke(this).xor(r))}mask(e){return (this.isNegative()||e<0)&&Ir("negative-width","mask"),fr(Ke(this).maskn(e))}shl(e){return (this.isNegative()||e<0)&&Ir("negative-width","shl"),fr(Ke(this).shln(e))}shr(e){return (this.isNegative()||e<0)&&Ir("negative-width","shr"),fr(Ke(this).shrn(e))}eq(e){return Ke(this).eq(Ke(e))}lt(e){return Ke(this).lt(Ke(e))}lte(e){return Ke(this).lte(Ke(e))}gt(e){return Ke(this).gt(Ke(e))}gte(e){return Ke(this).gte(Ke(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Ke(this).isZero()}toNumber(){try{return Ke(this).toNumber()}catch(e){Ir("overflow","toNumber",this.toString());}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return Ei.throwError("this platform does not support BigInt",ke.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?qx||(qx=!0,Ei.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Ei.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ke.errors.UNEXPECTED_ARGUMENT,{}):Ei.throwError("BigNumber.toString does not accept parameters",ke.errors.UNEXPECTED_ARGUMENT,{})),Ke(this).toString(10)}toHexString(){return this._hex}toJSON(e){return {type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof t)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new t(B0,va(e)):e.match(/^-?[0-9]+$/)?new t(B0,va(new Sl(e))):Ei.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Ir("underflow","BigNumber.from",e),(e>=jx||e<=-jx)&&Ir("overflow","BigNumber.from",e),t.from(String(e));let r=e;if(typeof r=="bigint")return t.from(r.toString());if(wl(r))return t.from(St(r));if(r)if(r.toHexString){let i=r.toHexString();if(typeof i=="string")return t.from(i)}else {let i=r._hex;if(i==null&&r.type==="BigNumber"&&(i=r.hex),typeof i=="string"&&(hr(i)||i[0]==="-"&&hr(i.substring(1))))return t.from(i)}return Ei.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return !!(e&&e._isBigNumber)}};function va(t){if(typeof t!="string")return va(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Ei.throwArgumentError("invalid hex","value",t),t=va(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return "0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function fr(t){return Nt.from(va(t))}function Ke(t){let e=Nt.from(t).toHexString();return e[0]==="-"?new Sl("-"+e.substring(3),16):new Sl(e.substring(2),16)}function Ir(t,e,r){let i={fault:t,operation:e};return r!=null&&(i.value=r),Ei.throwError(t,ke.errors.NUMERIC_FAULT,i)}function j0(t){return new Sl(t,36).toString(16)}var Ux="properties/5.7.0";var Vx=new ke(Ux);function Bt(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1});}function xa(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor;}return null}var KP={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function $x(t){if(t==null||KP[typeof t])return !0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return !1;let e=Object.keys(t);for(let r=0;r<e.length;r++){let i=null;try{i=t[e[r]];}catch(s){continue}if(!$x(i))return !1}return !0}return Vx.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function GP(t){if($x(t))return t;if(Array.isArray(t))return Object.freeze(t.map(e=>q0(e)));if(typeof t=="object"){let e={};for(let r in t){let i=t[r];i!==void 0&&Bt(e,r,q0(i));}return e}return Vx.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function q0(t){return GP(t)}var Qn=class{constructor(e){for(let r in e)this[r]=q0(e[r]);}};var Zr="abi/5.7.0";var Ge=new ke(Zr),es={},zx={calldata:!0,memory:!0,storage:!0},WP={calldata:!0,memory:!0};function Rl(t,e){if(t==="bytes"||t==="string"){if(zx[e])return !0}else if(t==="address"){if(e==="payable")return !0}else if((t.indexOf("[")>=0||t==="tuple")&&WP[e])return !0;return (zx[e]||e==="payable")&&Ge.throwArgumentError("invalid modifier","name",e),!1}function YP(t,e){let r=t;function i(a){Ge.throwArgumentError(`unexpected character at position ${a}`,"param",t);}t=t.replace(/\s/g," ");function s(a){let u={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(u.indexed=!1),u}let n={type:"",name:"",state:{allowType:!0}},o=n;for(let a=0;a<t.length;a++){let u=t[a];switch(u){case"(":o.state.allowType&&o.type===""?o.type="tuple":o.state.allowParams||i(a),o.state.allowType=!1,o.type=to(o.type),o.components=[s(o)],o=o.components[0];break;case")":delete o.state,o.name==="indexed"&&(e||i(a),o.indexed=!0,o.name=""),Rl(o.type,o.name)&&(o.name=""),o.type=to(o.type);let l=o;o=o.parent,o||i(a),delete l.parent,o.state.allowParams=!1,o.state.allowName=!0,o.state.allowArray=!0;break;case",":delete o.state,o.name==="indexed"&&(e||i(a),o.indexed=!0,o.name=""),Rl(o.type,o.name)&&(o.name=""),o.type=to(o.type);let h=s(o.parent);o.parent.components.push(h),delete o.parent,o=h;break;case" ":o.state.allowType&&o.type!==""&&(o.type=to(o.type),delete o.state.allowType,o.state.allowName=!0,o.state.allowParams=!0),o.state.allowName&&o.name!==""&&(o.name==="indexed"?(e||i(a),o.indexed&&i(a),o.indexed=!0,o.name=""):Rl(o.type,o.name)?o.name="":o.state.allowName=!1);break;case"[":o.state.allowArray||i(a),o.type+=u,o.state.allowArray=!1,o.state.allowName=!1,o.state.readArray=!0;break;case"]":o.state.readArray||i(a),o.type+=u,o.state.readArray=!1,o.state.allowArray=!0,o.state.allowName=!0;break;default:o.state.allowType?(o.type+=u,o.state.allowParams=!0,o.state.allowArray=!0):o.state.allowName?(o.name+=u,delete o.state.allowArray):o.state.readArray?o.type+=u:i(a);}}return o.parent&&Ge.throwArgumentError("unexpected eof","param",t),delete n.state,o.name==="indexed"?(e||i(r.length-7),o.indexed&&i(r.length-7),o.indexed=!0,o.name=""):Rl(o.type,o.name)&&(o.name=""),n.type=to(n.type),n}function Nl(t,e){for(let r in e)Bt(t,r,e[r]);}var Ye=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),JP=new RegExp(/^(.*)\[([0-9]*)\]$/),dr=class t{constructor(e,r){e!==es&&Ge.throwError("use fromString",ke.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Nl(this,r);let i=this.type.match(JP);i?Nl(this,{arrayLength:parseInt(i[2]||"-1"),arrayChildren:t.fromObject({type:i[1],components:this.components}),baseType:"array"}):Nl(this,{arrayLength:null,arrayChildren:null,baseType:this.components!=null?"tuple":this.type}),this._isParamType=!0,Object.freeze(this);}format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json){let i={type:this.baseType==="tuple"?"tuple":this.type,name:this.name||void 0};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.components&&(i.components=this.components.map(s=>JSON.parse(s.format(e)))),JSON.stringify(i)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Ye.sighash&&(r+=this.type),r+="("+this.components.map(i=>i.format(e)).join(e===Ye.full?", ":",")+")"):r+=this.type,e!==Ye.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Ye.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?t.fromString(e,r):t.fromObject(e)}static fromObject(e){return t.isParamType(e)?e:new t(es,{name:e.name||null,type:to(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(t.fromObject):null})}static fromString(e,r){function i(s){return t.fromObject({name:s.name,type:s.type,indexed:s.indexed,components:s.components})}return i(YP(e,!!r))}static isParamType(e){return !!(e!=null&&e._isParamType)}};function ba(t,e){return XP(t).map(r=>dr.fromString(r,e))}var ts=class t{constructor(e,r){e!==es&&Ge.throwError("use a static from method",ke.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Nl(this,r),this._isFragment=!0,Object.freeze(this);}static from(e){return t.isFragment(e)?e:typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isFragment(e))return e;switch(e.type){case"function":return is.fromObject(e);case"event":return ro.fromObject(e);case"constructor":return rs.fromObject(e);case"error":return Ol.fromObject(e);case"fallback":case"receive":return null}return Ge.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?ro.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?is.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?rs.fromString(e.trim()):e.split(" ")[0]==="error"?Ol.fromString(e.substring(5).trim()):Ge.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return !!(e&&e._isFragment)}},ro=class t extends ts{format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(e)))});let r="";return e!==Ye.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(i=>i.format(e)).join(e===Ye.full?", ":",")+") ",e!==Ye.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isEventFragment(e))return e;e.type!=="event"&&Ge.throwArgumentError("invalid event object","value",e);let r={name:Ea(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(dr.fromObject):[],type:"event"};return new t(es,r)}static fromString(e){let r=e.match(Ca);r||Ge.throwArgumentError("invalid event string","value",e);let i=!1;return r[3].split(" ").forEach(s=>{switch(s.trim()){case"anonymous":i=!0;break;case"":break;default:Ge.warn("unknown modifier: "+s);}}),t.fromObject({name:r[1].trim(),anonymous:i,inputs:ba(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function Gx(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Ge.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Ge.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=Nt.from(r[1]),r[0]):t}function Wx(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r);}});}function Yx(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&Ge.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Ge.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&Ge.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Ge.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&Ge.throwArgumentError("unable to determine stateMutability","value",t),e}var rs=class t extends ts{format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(e)))});e===Ye.sighash&&Ge.throwError("cannot format a constructor for sighash",ke.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(i=>i.format(e)).join(e===Ye.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isConstructorFragment(e))return e;e.type!=="constructor"&&Ge.throwArgumentError("invalid constructor object","value",e);let r=Yx(e);r.constant&&Ge.throwArgumentError("constructor cannot be constant","value",e);let i={name:null,type:e.type,inputs:e.inputs?e.inputs.map(dr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Nt.from(e.gas):null};return new t(es,i)}static fromString(e){let r={type:"constructor"};e=Gx(e,r);let i=e.match(Ca);return (!i||i[1].trim()!=="constructor")&&Ge.throwArgumentError("invalid constructor string","value",e),r.inputs=ba(i[2].trim(),!1),Wx(i[3].trim(),r),t.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},is=class t extends rs{format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(e))),outputs:this.outputs.map(i=>JSON.parse(i.format(e)))});let r="";return e!==Ye.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(i=>i.format(e)).join(e===Ye.full?", ":",")+") ",e!==Ye.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(i=>i.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isFunctionFragment(e))return e;e.type!=="function"&&Ge.throwArgumentError("invalid function object","value",e);let r=Yx(e),i={type:e.type,name:Ea(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(dr.fromObject):[],outputs:e.outputs?e.outputs.map(dr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Nt.from(e.gas):null};return new t(es,i)}static fromString(e){let r={type:"function"};e=Gx(e,r);let i=e.split(" returns ");i.length>2&&Ge.throwArgumentError("invalid function string","value",e);let s=i[0].match(Ca);if(s||Ge.throwArgumentError("invalid function signature","value",e),r.name=s[1].trim(),r.name&&Ea(r.name),r.inputs=ba(s[2],!1),Wx(s[3].trim(),r),i.length>1){let n=i[1].match(Ca);(n[1].trim()!=""||n[3].trim()!="")&&Ge.throwArgumentError("unexpected tokens","value",e),r.outputs=ba(n[2],!1);}else r.outputs=[];return t.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function Kx(t){let e=t.format();return (e==="Error(string)"||e==="Panic(uint256)")&&Ge.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}var Ol=class t extends ts{format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(e)))});let r="";return e!==Ye.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(i=>i.format(e)).join(e===Ye.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isErrorFragment(e))return e;e.type!=="error"&&Ge.throwArgumentError("invalid error object","value",e);let r={type:e.type,name:Ea(e.name),inputs:e.inputs?e.inputs.map(dr.fromObject):[]};return Kx(new t(es,r))}static fromString(e){let r={type:"error"},i=e.match(Ca);return i||Ge.throwArgumentError("invalid error signature","value",e),r.name=i[1].trim(),r.name&&Ea(r.name),r.inputs=ba(i[2],!1),Kx(t.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function to(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}var ZP=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Ea(t){return (!t||!t.match(ZP))&&Ge.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}var Ca=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function XP(t){t=t.trim();let e=[],r="",i=0;for(let s=0;s<t.length;s++){let n=t[s];n===","&&i===0?(e.push(r),r=""):(r+=n,n==="("?i++:n===")"&&(i--,i===-1&&Ge.throwArgumentError("unbalanced parenthesis","value",t)));}return r&&e.push(r),e}var H0=new ke(Zr);var Ht=class{constructor(e,r,i,s){this.name=e,this.type=r,this.localName=i,this.dynamic=s;}_throwError(e,r){H0.throwArgumentError(e,this.localName,r);}},ns=class{constructor(e){Bt(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e);}get data(){return Mx(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData(bi(e._data))}writeBytes(e){let r=It(e),i=r.length%this.wordSize;return i&&(r=bi([r,this._padding.slice(i)])),this._writeData(r)}_getValue(e){let r=It(Nt.from(e));return r.length>this.wordSize&&H0.throwError("value out-of-bounds",ke.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=bi([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r);}}},Fl=class t{constructor(e,r,i,s){Bt(this,"_data",It(e)),Bt(this,"wordSize",r||32),Bt(this,"_coerceFunc",i),Bt(this,"allowLoose",s),this._offset=0;}get data(){return St(this._data)}get consumed(){return this._offset}static coerce(e,r){let i=e.match("^u?int([0-9]+)$");return i&&parseInt(i[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):t.coerce(e,r)}_peekBytes(e,r,i){let s=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+s>this._data.length&&(this.allowLoose&&i&&this._offset+r<=this._data.length?s=r:H0.throwError("data out-of-bounds",ke.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+s})),this._data.slice(this._offset,this._offset+s)}subReader(e){return new t(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let i=this._peekBytes(0,e,!!r);return this._offset+=i.length,i.slice(0,e)}readValue(){return Nt.from(this.readBytes(this.wordSize))}};var Zx=Kt(Jx());function ss(t){return "0x"+Zx.default.keccak_256(It(t))}var Xx="address/5.7.0";var Ta=new ke(Xx);function Qx(t){hr(t,20)||Ta.throwArgumentError("invalid address","address",t),t=t.toLowerCase();let e=t.substring(2).split(""),r=new Uint8Array(40);for(let s=0;s<40;s++)r[s]=e[s].charCodeAt(0);let i=It(ss(r));for(let s=0;s<40;s+=2)i[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(i[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return "0x"+e.join("")}var QP=9007199254740991;function e7(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}var U0={};for(let t=0;t<10;t++)U0[String(t)]=String(t);for(let t=0;t<26;t++)U0[String.fromCharCode(65+t)]=String(10+t);var eb=Math.floor(e7(QP));function t7(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(i=>U0[i]).join("");for(;e.length>=eb;){let i=e.substring(0,eb);e=parseInt(i,10)%97+e.substring(i.length);}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function Aa(t){let e=null;if(typeof t!="string"&&Ta.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=Qx(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Ta.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==t7(t)&&Ta.throwArgumentError("bad icap checksum","address",t),e=j0(t.substring(4));e.length<40;)e="0"+e;e=Qx("0x"+e);}else Ta.throwArgumentError("invalid address","address",t);return e}var Pl=class extends Ht{constructor(e){super("address","address",e,!1);}defaultValue(){return "0x0000000000000000000000000000000000000000"}encode(e,r){try{r=Aa(r);}catch(i){this._throwError(i.message,r);}return e.writeValue(r)}decode(e){return Aa(Dl(e.readValue().toHexString(),20))}};var Il=class extends Ht{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e;}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}};var io=new ke(Zr);function V0(t,e,r){let i=null;if(Array.isArray(r))i=r;else if(r&&typeof r=="object"){let u={};i=e.map(l=>{let h=l.localName;return h||io.throwError("cannot encode object for signature with missing names",ke.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),u[h]&&io.throwError("cannot encode object for signature with duplicate names",ke.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),u[h]=!0,r[h]});}else io.throwArgumentError("invalid tuple value","tuple",r);e.length!==i.length&&io.throwArgumentError("types/value length mismatch","tuple",r);let s=new ns(t.wordSize),n=new ns(t.wordSize),o=[];e.forEach((u,l)=>{let h=i[l];if(u.dynamic){let c=n.length;u.encode(n,h);let d=s.writeUpdatableValue();o.push(f=>{d(f+c);});}else u.encode(s,h);}),o.forEach(u=>{u(s.length);});let a=t.appendWriter(s);return a+=t.appendWriter(n),a}function $0(t,e){let r=[],i=t.subReader(0);e.forEach(n=>{let o=null;if(n.dynamic){let a=t.readValue(),u=i.subReader(a.toNumber());try{o=n.decode(u);}catch(l){if(l.code===ke.errors.BUFFER_OVERRUN)throw l;o=l,o.baseType=n.name,o.name=n.localName,o.type=n.type;}}else try{o=n.decode(t);}catch(a){if(a.code===ke.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=n.name,o.name=n.localName,o.type=n.type;}o!=null&&r.push(o);});let s=e.reduce((n,o)=>{let a=o.localName;return a&&(n[a]||(n[a]=0),n[a]++),n},{});e.forEach((n,o)=>{let a=n.localName;if(!a||s[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;let u=r[o];u instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw u}}):r[a]=u;});for(let n=0;n<r.length;n++){let o=r[n];o instanceof Error&&Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}});}return Object.freeze(r)}var kl=class extends Ht{constructor(e,r,i){let s=e.type+"["+(r>=0?r:"")+"]",n=r===-1||e.dynamic;super("array",s,i,n),this.coder=e,this.length=r;}defaultValue(){let e=this.coder.defaultValue(),r=[];for(let i=0;i<this.length;i++)r.push(e);return r}encode(e,r){Array.isArray(r)||this._throwError("expected array value",r);let i=this.length;i===-1&&(i=r.length,e.writeValue(r.length)),io.checkArgumentCount(r.length,i,"coder array"+(this.localName?" "+this.localName:""));let s=[];for(let n=0;n<r.length;n++)s.push(this.coder);return V0(e,s,r)}decode(e){let r=this.length;r===-1&&(r=e.readValue().toNumber(),r*32>e._data.length&&io.throwError("insufficient data length",ke.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let i=[];for(let s=0;s<r;s++)i.push(new Il(this.coder));return e.coerce(this.name,$0(e,i))}};var Ml=class extends Ht{constructor(e){super("bool","bool",e,!1);}defaultValue(){return !1}encode(e,r){return e.writeValue(r?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}};var wa=class extends Ht{constructor(e,r){super(e,e,r,!0);}defaultValue(){return "0x"}encode(e,r){r=It(r);let i=e.writeValue(r.length);return i+=e.writeBytes(r),i}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}},Bl=class extends wa{constructor(e){super("bytes",e);}decode(e){return e.coerce(this.name,St(super.decode(e)))}};var jl=class extends Ht{constructor(e,r){let i="bytes"+String(e);super(i,i,r,!1),this.size=e;}defaultValue(){return "0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(e,r){let i=It(r);return i.length!==this.size&&this._throwError("incorrect data length",r),e.writeBytes(i)}decode(e){return e.coerce(this.name,St(e.readBytes(this.size)))}};var ql=class extends Ht{constructor(e){super("null","",e,!1);}defaultValue(){return null}encode(e,r){return r!=null&&this._throwError("not null",r),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}};var z0=Nt.from(-1),K0=Nt.from(0),G0=Nt.from(1);var W0=Nt.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Hl=class extends Ht{constructor(e,r,i){let s=(r?"int":"uint")+e*8;super(s,s,i,!1),this.size=e,this.signed=r;}defaultValue(){return 0}encode(e,r){let i=Nt.from(r),s=W0.mask(e.wordSize*8);if(this.signed){let n=s.mask(this.size*8-1);(i.gt(n)||i.lt(n.add(G0).mul(z0)))&&this._throwError("value out-of-bounds",r);}else (i.lt(K0)||i.gt(s.mask(this.size*8)))&&this._throwError("value out-of-bounds",r);return i=i.toTwos(this.size*8).mask(this.size*8),this.signed&&(i=i.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(i)}decode(e){let r=e.readValue().mask(this.size*8);return this.signed&&(r=r.fromTwos(this.size*8)),e.coerce(this.name,r)}};var tb="strings/5.7.0";var rb=new ke(tb),Da;(function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD";})(Da||(Da={}));var pr;(function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation";})(pr||(pr={}));function r7(t,e,r,i,s){return rb.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",r)}function ib(t,e,r,i,s){if(t===pr.BAD_PREFIX||t===pr.UNEXPECTED_CONTINUE){let n=0;for(let o=e+1;o<r.length&&r[o]>>6===2;o++)n++;return n}return t===pr.OVERRUN?r.length-e-1:0}function i7(t,e,r,i,s){return t===pr.OVERLONG?(i.push(s),0):(i.push(65533),ib(t,e,r))}var nb=Object.freeze({error:r7,ignore:ib,replace:i7});function n7(t,e){e==null&&(e=nb.error),t=It(t);let r=[],i=0;for(;i<t.length;){let s=t[i++];if(!(s>>7)){r.push(s);continue}let n=null,o=null;if((s&224)===192)n=1,o=127;else if((s&240)===224)n=2,o=2047;else if((s&248)===240)n=3,o=65535;else {(s&192)===128?i+=e(pr.UNEXPECTED_CONTINUE,i-1,t,r):i+=e(pr.BAD_PREFIX,i-1,t,r);continue}if(i-1+n>=t.length){i+=e(pr.OVERRUN,i-1,t,r);continue}let a=s&(1<<8-n-1)-1;for(let u=0;u<n;u++){let l=t[i];if((l&192)!=128){i+=e(pr.MISSING_CONTINUE,i,t,r),a=null;break}a=a<<6|l&63,i++;}if(a!==null){if(a>1114111){i+=e(pr.OUT_OF_RANGE,i-1-n,t,r,a);continue}if(a>=55296&&a<=57343){i+=e(pr.UTF16_SURROGATE,i-1-n,t,r,a);continue}if(a<=o){i+=e(pr.OVERLONG,i-1-n,t,r,a);continue}r.push(a);}}return r}function Sa(t,e=Da.current){e!=Da.current&&(rb.checkNormalize(),t=t.normalize(e));let r=[];for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);if(s<128)r.push(s);else if(s<2048)r.push(s>>6|192),r.push(s&63|128);else if((s&64512)==55296){i++;let n=t.charCodeAt(i);if(i>=t.length||(n&64512)!==56320)throw new Error("invalid utf-8 string");let o=65536+((s&1023)<<10)+(n&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128);}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128);}return It(r)}function s7(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Y0(t,e){return s7(n7(t,e))}var Ul=class extends wa{constructor(e){super("string",e);}defaultValue(){return ""}encode(e,r){return super.encode(e,Sa(r))}decode(e){return Y0(super.decode(e))}};var os=class extends Ht{constructor(e,r){let i=!1,s=[];e.forEach(o=>{o.dynamic&&(i=!0),s.push(o.type);});let n="tuple("+s.join(",")+")";super("tuple",n,r,i),this.coders=e;}defaultValue(){let e=[];this.coders.forEach(i=>{e.push(i.defaultValue());});let r=this.coders.reduce((i,s)=>{let n=s.localName;return n&&(i[n]||(i[n]=0),i[n]++),i},{});return this.coders.forEach((i,s)=>{let n=i.localName;!n||r[n]!==1||(n==="length"&&(n="_length"),e[n]==null&&(e[n]=e[s]));}),Object.freeze(e)}encode(e,r){return V0(e,this.coders,r)}decode(e){return e.coerce(this.name,$0(e,this.coders))}};var Vl=new ke(Zr),o7=new RegExp(/^bytes([0-9]*)$/),a7=new RegExp(/^(u?int)([0-9]*)$/),J0=class{constructor(e){Bt(this,"coerceFunc",e||null);}_getCoder(e){switch(e.baseType){case"address":return new Pl(e.name);case"bool":return new Ml(e.name);case"string":return new Ul(e.name);case"bytes":return new Bl(e.name);case"array":return new kl(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new os((e.components||[]).map(i=>this._getCoder(i)),e.name);case"":return new ql(e.name)}let r=e.type.match(a7);if(r){let i=parseInt(r[2]||"256");return (i===0||i>256||i%8!==0)&&Vl.throwArgumentError("invalid "+r[1]+" bit length","param",e),new Hl(i/8,r[1]==="int",e.name)}if(r=e.type.match(o7),r){let i=parseInt(r[1]);return (i===0||i>32)&&Vl.throwArgumentError("invalid bytes length","param",e),new jl(i,e.name)}return Vl.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new Fl(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new ns(this._getWordSize())}getDefaultValue(e){let r=e.map(s=>this._getCoder(dr.from(s)));return new os(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Vl.throwError("types/values length mismatch",ke.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});let i=e.map(o=>this._getCoder(dr.from(o))),s=new os(i,"_"),n=this._getWriter();return s.encode(n,r),n.data}decode(e,r,i){let s=e.map(o=>this._getCoder(dr.from(o)));return new os(s,"_").decode(this._getReader(It(r),i))}},sb=new J0;function no(t){return ss(Sa(t))}var Ot=new ke(Zr);var $l=class extends Qn{},zl=class extends Qn{},Z0=class extends Qn{},Ra=class extends Qn{static isIndexed(e){return !!(e&&e._isIndexed)}},u7={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function ob(t,e){let r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}var Na=class{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,Bt(this,"fragments",r.map(i=>ts.from(i)).filter(i=>i!=null)),Bt(this,"_abiCoder",xa(new.target,"getAbiCoder")()),Bt(this,"functions",{}),Bt(this,"errors",{}),Bt(this,"events",{}),Bt(this,"structs",{}),this.fragments.forEach(i=>{let s=null;switch(i.type){case"constructor":if(this.deploy){Ot.warn("duplicate definition - constructor");return}Bt(this,"deploy",i);return;case"function":s=this.functions;break;case"event":s=this.events;break;case"error":s=this.errors;break;default:return}let n=i.format();if(s[n]){Ot.warn("duplicate definition - "+n);return}s[n]=i;}),this.deploy||Bt(this,"deploy",rs.from({payable:!1,type:"constructor"})),Bt(this,"_isInterface",!0);}format(e){e||(e=Ye.full),e===Ye.sighash&&Ot.throwArgumentError("interface does not support formatting sighash","format",e);let r=this.fragments.map(i=>i.format(e));return e===Ye.json?JSON.stringify(r.map(i=>JSON.parse(i))):r}static getAbiCoder(){return sb}static getAddress(e){return Aa(e)}static getSighash(e){return M0(no(e.format()),0,4)}static getEventTopic(e){return no(e.format())}getFunction(e){if(hr(e)){for(let i in this.functions)if(e===this.getSighash(i))return this.functions[i];Ot.throwArgumentError("no matching function","sighash",e);}if(e.indexOf("(")===-1){let i=e.trim(),s=Object.keys(this.functions).filter(n=>n.split("(")[0]===i);return s.length===0?Ot.throwArgumentError("no matching function","name",i):s.length>1&&Ot.throwArgumentError("multiple matching functions","name",i),this.functions[s[0]]}let r=this.functions[is.fromString(e).format()];return r||Ot.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(hr(e)){let i=e.toLowerCase();for(let s in this.events)if(i===this.getEventTopic(s))return this.events[s];Ot.throwArgumentError("no matching event","topichash",i);}if(e.indexOf("(")===-1){let i=e.trim(),s=Object.keys(this.events).filter(n=>n.split("(")[0]===i);return s.length===0?Ot.throwArgumentError("no matching event","name",i):s.length>1&&Ot.throwArgumentError("multiple matching events","name",i),this.events[s[0]]}let r=this.events[ro.fromString(e).format()];return r||Ot.throwArgumentError("no matching event","signature",e),r}getError(e){if(hr(e)){let i=xa(this.constructor,"getSighash");for(let s in this.errors){let n=this.errors[s];if(e===i(n))return this.errors[s]}Ot.throwArgumentError("no matching error","sighash",e);}if(e.indexOf("(")===-1){let i=e.trim(),s=Object.keys(this.errors).filter(n=>n.split("(")[0]===i);return s.length===0?Ot.throwArgumentError("no matching error","name",i):s.length>1&&Ot.throwArgumentError("multiple matching errors","name",i),this.errors[s[0]]}let r=this.errors[is.fromString(e).format()];return r||Ot.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e);}catch(r){try{e=this.getError(e);}catch(i){throw r}}return xa(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),xa(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));let i=It(r);return St(i.slice(0,4))!==this.getSighash(e)&&Ot.throwArgumentError(`data signature does not match error ${e.name}.`,"data",St(i)),this._decodeParams(e.inputs,i.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),St(bi([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));let i=It(r);return St(i.slice(0,4))!==this.getSighash(e)&&Ot.throwArgumentError(`data signature does not match function ${e.name}.`,"data",St(i)),this._decodeParams(e.inputs,i.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),St(bi([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let i=It(r),s=null,n="",o=null,a=null,u=null;switch(i.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,i)}catch(l){}break;case 4:{let l=St(i.slice(0,4)),h=u7[l];if(h)o=this._abiCoder.decode(h.inputs,i.slice(4)),a=h.name,u=h.signature,h.reason&&(s=o[0]),a==="Error"?n=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(n=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{let c=this.getError(l);o=this._abiCoder.decode(c.inputs,i.slice(4)),a=c.name,u=c.format();}catch(c){}break}}return Ot.throwError("call revert exception"+n,ke.errors.CALL_EXCEPTION,{method:e.format(),data:St(r),errorArgs:o,errorName:a,errorSignature:u,reason:s})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),St(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&Ot.throwError("too many arguments for "+e.format(),ke.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let i=[];e.anonymous||i.push(this.getEventTopic(e));let s=(n,o)=>n.type==="string"?no(o):n.type==="bytes"?ss(St(o)):(n.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),n.type.match(/^u?int/)&&(o=Nt.from(o).toHexString()),n.type==="address"&&this._abiCoder.encode(["address"],[o]),Dl(St(o),32));for(r.forEach((n,o)=>{let a=e.inputs[o];if(!a.indexed){n!=null&&Ot.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,n);return}n==null?i.push(null):a.baseType==="array"||a.baseType==="tuple"?Ot.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,n):Array.isArray(n)?i.push(n.map(u=>s(a,u))):i.push(s(a,n));});i.length&&i[i.length-1]===null;)i.pop();return i}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));let i=[],s=[],n=[];return e.anonymous||i.push(this.getEventTopic(e)),r.length!==e.inputs.length&&Ot.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{let u=r[a];if(o.indexed)if(o.type==="string")i.push(no(u));else if(o.type==="bytes")i.push(ss(u));else {if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");i.push(this._abiCoder.encode([o.type],[u]));}else s.push(o),n.push(u);}),{data:this._abiCoder.encode(s,n),topics:i}}decodeEventLog(e,r,i){if(typeof e=="string"&&(e=this.getEvent(e)),i!=null&&!e.anonymous){let d=this.getEventTopic(e);(!hr(i[0],32)||i[0].toLowerCase()!==d)&&Ot.throwError("fragment/topic mismatch",ke.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:i[0]}),i=i.slice(1);}let s=[],n=[],o=[];e.inputs.forEach((d,f)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(s.push(dr.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(s.push(d),o.push(!1)):(n.push(d),o.push(!1));});let a=i!=null?this._abiCoder.decode(s,bi(i)):null,u=this._abiCoder.decode(n,r,!0),l=[],h=0,c=0;e.inputs.forEach((d,f)=>{if(d.indexed)if(a==null)l[f]=new Ra({_isIndexed:!0,hash:null});else if(o[f])l[f]=new Ra({_isIndexed:!0,hash:a[c++]});else try{l[f]=a[c++];}catch(m){l[f]=m;}else try{l[f]=u[h++];}catch(m){l[f]=m;}if(d.name&&l[d.name]==null){let m=l[f];m instanceof Error?Object.defineProperty(l,d.name,{enumerable:!0,get:()=>{throw ob(`property ${JSON.stringify(d.name)}`,m)}}):l[d.name]=m;}});for(let d=0;d<l.length;d++){let f=l[d];f instanceof Error&&Object.defineProperty(l,d,{enumerable:!0,get:()=>{throw ob(`index ${d}`,f)}});}return Object.freeze(l)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new zl({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:Nt.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return !r||r.anonymous?null:new $l({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){let r=St(e),i=this.getError(r.substring(0,10).toLowerCase());return i?new Z0({args:this._abiCoder.decode(i.inputs,"0x"+r.substring(10)),errorFragment:i,name:i.name,signature:i.format(),sighash:this.getSighash(i)}):null}static isInterface(e){return !!(e&&e._isInterface)}};var Cc=Kt(KE()),Zp=(t,e)=>e==null||e.length===0?void 0:new Na(t).encodeDeploy(e).slice(2),WE=t=>{try{let e=Cc.parse(t),r;return Cc.visit(e,{FunctionDefinition:s=>{s.isConstructor&&(r=s);}}),GE__default.default(r!=null,"Could not find constructor definition"),[{type:"constructor",inputs:r.parameters.map(({typeName:s},n)=>(GE__default.default(s!=null,`Missing a type definition for constructor parameter at position ${n}`),{type:YE(s)}))}]}catch(e){throw new Error(`Could not get an ABI from contract source: ${e}`)}},YE=t=>{switch(t.type){case"ElementaryTypeName":return t.name;case"ArrayTypeName":return `${YE(t.baseTypeName)}[]`;default:throw new Error(`Only primitive and array types are currently supported when constructing ABI from contract source, got ${t.type}`)}};var Xp=t=>{var e;return {deployments:(e=t==null?void 0:t.deployments)!=null?e:SI__default.default.resolve(process.cwd(),"deployments")}},JE=t=>{if(t==null)return ()=>!0;switch(typeof t){case"boolean":return ()=>t;case"string":return e=>e===t;case"function":return t;case"object":if(Array.isArray(t)){let e=new Set(t);return r=>e.has(r)}if(t instanceof RegExp)return e=>t.test(e);throw new TypeError(`Invalid verify configuration: expected string, string[], boolean, function or a RegExp, got ${t}`);default:throw new TypeError(`Invalid verify configuration: expected string, string[], boolean, function or a RegExp, got ${t}`)}};var XE=t=>{try{return fs.lstatSync(t).isDirectory()}catch(e){return !1}},QE=t=>{try{return fs.lstatSync(t).isFile()}catch(e){return !1}};var r2=async(t,e)=>{let r=Cd(e,t.networks),i=Xp(t.paths),s=bd(e),n=n2(e),o=s2(s),a=t.contracts.flatMap(l=>{var te;let{address:h,network:c,contractName:d,deployment:f}=l;e.info(`Collecting information for contract ${d} on network ${c}`);let m=r[c];if(m==null)return e.info(`No network configured for contract ${d} on network ${c}`),[];let g=`${SI.basename(f,".json")}.json`,v=SI.resolve(i.deployments,c,g);if(!QE(v))return e.error(Jt.error`Deployment file ${v} does not exist or is not a file`),[];let x=ge(v),_=O0.safeParse(x);if(!_.success)return e.error(Jt.error`No network configured for contract ${d} on network ${c}`),[];let E=_.data,b=SI.basename(d,".sol"),w=E.metadata.sources[d];if(w==null)return e.error(Jt.error`Missing source for contract ${d} for network ${c} in ${g}`),[];let D=Ad(w.content),N=WE(w.content),F=Zp(N,l.constructorArguments),V=F0(E.metadata),Z={apiUrl:m.apiUrl,apiKey:m.apiKey,address:h,contractName:`${d}:${b}`,constructorArguments:F,licenseType:D,compilerVersion:E.metadata.compiler.version,sourceCode:JSON.stringify(V),evmVersion:E.metadata.settings.evmVersion,optimizerRuns:(te=E.metadata.settings.optimizer)==null?void 0:te.runs};return s({Contract:d,Network:c,Address:Z.address,License:Z.licenseType,Arguments:l.constructorArguments?JSON.stringify(l.constructorArguments):void 0,Sources:Object.keys(E.metadata.sources),"Scan URL":Z.apiUrl,"Scan API Key":Z.apiKey?xd(Z.apiKey):void 0}),[{networkName:c,networkConfig:m,submitProps:Z}]});if(a.length===0)return e.warn("No contracts match the verification criteria, exiting"),[];if(t.dryRun)return e.debug("Dry run enabled, exiting"),[];let u=await Promise.all(n(a));return u.forEach(o),u},i2=async(t,e)=>{let r=JE(t.filter),i=Cd(e,t.networks),s=Xp(t.paths),n=bd(e),o=n2(e),a=s2(n);if(!XE(s.deployments))throw new Error(`Path ${s.deployments} is not a directory`);let u=new Set(fs.readdirSync(s.deployments)),l=Object.entries(i);e.debug("Verifying deployments for following networks:"),l.forEach(([d,f])=>{e.debug(` - ${d} (API URL ${f.apiUrl})`);});let h=l.flatMap(([d,f])=>{if(e.info(`Collecting deployments for ${d}...`),!u.has(d))return e.warn(`Could not find deployment for network ${d} in ${s.deployments}`),[];let m=SI.resolve(s.deployments,d);return fs.readdirSync(m).filter(v=>v.endsWith(".json")).flatMap(v=>{e.info(`Inspecting deployment file ${v} on network ${d}`);let x=SI.resolve(m,v),_=ge(x),E=O0.safeParse(_);if(!E.success)throw new Error(`Error parsing deployment file ${v} on network ${d}: ${E.error}`);let b=E.data,w=b.metadata.settings.compilationTarget;return Object.entries(w).flatMap(([D,N])=>{var y;if(!r(N,D,d))return e.debug(`Not verifying ${N} in ${v} on network ${d}`),[];let V=b.metadata.sources[D];if(V==null)return e.error(Jt.error`Could not find source for ${N} (${D})`),[];let Z=Ad(V.content),te=Zp(b.abi,b.args),ae=F0(b.metadata),k={apiUrl:f.apiUrl,apiKey:f.apiKey,address:b.address,contractName:`${D}:${N}`,constructorArguments:te,licenseType:Z,compilerVersion:b.metadata.compiler.version,sourceCode:JSON.stringify(ae),evmVersion:b.metadata.settings.evmVersion,optimizerRuns:(y=b.metadata.settings.optimizer)==null?void 0:y.runs};return n({Contract:N,Network:d,Address:b.address,License:k.licenseType,Arguments:JSON.stringify(b.args),Sources:Object.keys(b.metadata.sources),"Scan URL":k.apiUrl,"Scan API Key":k.apiKey?xd(k.apiKey):void 0}),{submitProps:k,networkName:d,networkConfig:f}})})});if(h.length===0)return e.warn("No contracts match the verification criteria, exiting"),[];if(t.dryRun)return e.debug("Dry run enabled, exiting"),[];let c=await Promise.all(o(h));return c.forEach(a),c},n2=t=>e=>e.map(async(r,i)=>{let{submitProps:s}=r,n=Jt.palette[i%Jt.palette.length],o=`[${i+1}/${e.length}]`,a=Wa.default.bold(s.contractName),u=Wa.default.bold(r.networkName);t.info(n`Verifying contract ${a} for network ${u} ${o}`);try{let l=Tx(s,t);l.on("poll",c=>{t.info(n`Polling for verification status of ${a} for network ${u} (GUID ${c}) ${o}`);}),l.on("retry",(c,d)=>{t.verbose(`Received an error: ${c}`),t.info(n`Retrying failed verification attempt of ${a} for network ${u} (attempt ${d+1}) ${o}`);});let h=await l.verify();return {artifact:r,result:h}}catch(l){return t.error(Jt.error`Problem verifying contract ${a} for network ${u} ${o}: ${l} `),{artifact:r,error:l}}}),s2=t=>({artifact:e,response:r,error:i})=>{let s=Wa.default.bold(e.submitProps.contractName),n=Wa.default.bold(e.networkName),o=e.networkConfig.browserUrl?B1(e.networkConfig.browserUrl,e.submitProps.address):void 0;t({Contract:s,Network:n,Result:i==null,"Was verified":r==null?void 0:r.alreadyVerified,"Contract URL":o,Error:i?Jt.error(i):void 0});};var Os=Kt(f3(),1);Kt(kD(),1);var qo=Kt(Ko(),1);Kt(f4(),1);var p4=(t=>(t.error="error",t.warn="warn",t.info="info",t.http="http",t.verbose="verbose",t.debug="debug",t.silly="silly",t))(p4||{});Ie.nativeEnum(p4);var TK="info";var y1=(t=TK,e=Os.format.cli())=>(0, Os.createLogger)({level:t,format:e,transports:[new Os.transports.Console]});(0, Os.format)((t,{label:e})=>({...t,message:`${e?`[${e}] `:""}${t.message}`}));({TRUE:qo.default.rgb(0,153,0),FALSE:qo.default.rgb(255,0,0),NOT_APPLICABLE:qo.default.rgb(255,128,0),DEFAULT_KEY:qo.default.rgb(255,255,255),DEFAULT_VALUE:qo.default.rgb(167,125,255)});var m4="1.1.28";var g4=new Pn("-l,--log-level <level>","Log level").choices(["error","warn","info","http","verbose","debug","silly"]).default("info"),_4=new Pn("-d,--deployments <path>","Path to the deployments folder"),y4=new Pn("--dry-run","Do not verify anything, just output the verifications that would be performed"),v4=new Pn("-n,--network <network name>","Network to verify").makeOptionMandatory(),x4=new Pn("-u,--api-url <url>","Scan API URL (fully qualified, with protocol and path)"),b4=new Pn("-k,--api-key <key>","Scan API Key"),wK=new Mu("non-target").description("Verifies a contract that does not have its own deployment file, i.e. has not been a target of a deployment").addOption(g4).addOption(y4).addOption(_4).addOption(v4).addOption(x4).addOption(b4).requiredOption("--address <address>","Contract address to verify").requiredOption("--name <contract name>","Fully qualified contract name to verify, e.g. contracts/MyToken.sol").requiredOption("--deployment <deployment file name>","Deployment file name, e.g. MyOtherToken.json").option("--arguments <constructor arguments>",'JSON encoded array of constructor arguments, e.g. [1234, "0x0"]',t=>{try{let e=JSON.parse(t);if(!Array.isArray(e))throw new Error(`Constructor arguments must be an array, got ${e}`);return e}catch(e){throw new I1(`Malformed constructor arguments specified: ${e}`)}}).action(async t=>{let e=y1(t.logLevel),r={dryRun:t.dryRun,paths:{deployments:t.deployments},networks:{[t.network]:{apiUrl:t.apiUrl,apiKey:t.apiKey}},contracts:[{network:t.network,address:t.address,contractName:t.name,deployment:t.deployment,constructorArguments:t.arguments}]};try{await r2(r,e);}catch(i){e.error(Jt.error`The verification script exited with an error: ${i}`),process.exit(1);}}),DK=new Mu("target").description("Verifies contracts that have been a part of a deployment, i.e. have their own deployment files").addOption(g4).addOption(y4).addOption(_4).addOption(v4).addOption(x4).addOption(b4).option("-c,--contracts <contract names>","Comma-separated list of case-sensitive contract names to verify",t=>t!=null&&t.trim()?t.split(",").map(e=>e.trim()):void 0).action(async t=>{let e=y1(t.logLevel),r={dryRun:t.dryRun,paths:{deployments:t.deployments},networks:{[t.network]:{apiUrl:t.apiUrl,apiKey:t.apiKey}},filter:t.contracts};try{await i2(r,e);}catch(i){e.error(Jt.error`The verification script exited with an error: ${i}`),process.exit(1);}});new Mu("@layerzerolabs/verify-contract").version(m4).description("Verify a set of contracts based on hardhat-deploy outputs").addCommand(wK).addCommand(DK,{isDefault:!0}).parseAsync();
473
+ ${JSON.stringify(i)}`),i.status===1)return {alreadyVerified:!1};if(Ex(i.result))return {alreadyVerified:!0};if(BP(i.result)){await Xu(1e4);continue}if(Cx(i.result)){await Xu(1e4);continue}throw new Error(`Verification failed with result "${i.result}", status ${i.status} (${i.message})`)}}},Tx=(t,e)=>new N0(t,e),BP=t=>!!(t!=null&&t.match(/Pending/gi)),Ex=t=>!!(t!=null&&t.match(/already verified/gi)),Cx=t=>!!(t!=null&&t.match(/rate/)),jP=async(t,e)=>{try{let r=await R0(t,{method:"POST",form:e,headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"}}).json();return Ax.parse(r)}catch(r){throw new Error(`Failed to submit verification request: ${r}`)}},qP=async(t,e)=>{let r=new URL(t);r.searchParams.set("module","contract"),r.searchParams.set("action","checkverifystatus"),r.searchParams.set("guid",e);try{let i=await R0(r).json();return Ax.parse(i)}catch(i){throw new Error(`Failed to check verification status: ${i}`)}},HP=({apiKey:t,address:e,contractName:r,constructorArguments:i,compilerVersion:s,optimizerRuns:n=0,sourceCode:o,evmVersion:a,licenseType:u})=>{let l={action:"verifysourcecode",module:"contract",codeformat:"solidity-standard-json-input",contractaddress:e,contractname:r,compilerversion:`v${s}`,optimizationUsed:n>0?"1":"0",sourceCode:o};return t!=null&&(l.apikey=t),n!=null&&(l.runs=String(n)),i!=null&&(l.constructorArguements=i),a!=null&&(l.evmversion=a),u!=null&&(l.licenseType=String(u)),l},Ax=Ie.object({status:Ie.coerce.number().nullish(),message:Ie.string().nullish(),result:Ie.string().nullish()});var Wa=Kt(Ko());Ie.object({enabled:Ie.boolean().optional(),runs:Ie.number().optional()});Ie.record(Ie.string(),Ie.object({content:Ie.string()}));var UP=Ie.array(Ie.record(Ie.string(),Ie.any())),VP=Ie.object({language:Ie.string(),compiler:Ie.object({version:Ie.string()}),settings:Ie.object({compilationTarget:Ie.record(Ie.string(),Ie.string()),evmVersion:Ie.string(),optimizer:Ie.object({enabled:Ie.boolean().optional(),runs:Ie.number().optional()})}),sources:Ie.record(Ie.string(),Ie.object({content:Ie.string()}))}),O0=Ie.object({address:Ie.string(),abi:UP,args:Ie.array(Ie.any()),solcInputHash:Ie.string(),metadata:Ie.string().transform((t,e)=>{try{return JSON.parse(t)}catch(r){return e.addIssue({code:"custom",message:"Invalid JSON"}),Ie.NEVER}}).pipe(VP),bytecode:Ie.string(),deployedBytecode:Ie.string()});var F0=t=>{let{compilationTarget:e,...r}=t.settings,i=Object.entries(t.sources).reduce((s,[n,o])=>({...s,[n]:{content:o.content}}),{});return {language:t.language,settings:r,sources:i}};var Hx=Kt(Dx());var Sx="logger/5.7.0";var Rx=!1,Nx=!1,Al={debug:1,default:2,info:2,warning:3,error:4,off:5},Ox=Al.default,P0=null;function $P(){try{let t=[];if(["NFD","NFC","NFKD","NFKC"].forEach(e=>{try{if("test".normalize(e)!=="test")throw new Error("bad normalize")}catch(r){t.push(e);}}),t.length)throw new Error("missing "+t.join(", "));if("\xE9".normalize("NFD")!=="e\u0301")throw new Error("broken implementation")}catch(t){return t.message}return null}var Fx=$P(),I0;(function(t){t.DEBUG="DEBUG",t.INFO="INFO",t.WARNING="WARNING",t.ERROR="ERROR",t.OFF="OFF";})(I0||(I0={}));var Hr;(function(t){t.UNKNOWN_ERROR="UNKNOWN_ERROR",t.NOT_IMPLEMENTED="NOT_IMPLEMENTED",t.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",t.NETWORK_ERROR="NETWORK_ERROR",t.SERVER_ERROR="SERVER_ERROR",t.TIMEOUT="TIMEOUT",t.BUFFER_OVERRUN="BUFFER_OVERRUN",t.NUMERIC_FAULT="NUMERIC_FAULT",t.MISSING_NEW="MISSING_NEW",t.INVALID_ARGUMENT="INVALID_ARGUMENT",t.MISSING_ARGUMENT="MISSING_ARGUMENT",t.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",t.CALL_EXCEPTION="CALL_EXCEPTION",t.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",t.NONCE_EXPIRED="NONCE_EXPIRED",t.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",t.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",t.TRANSACTION_REPLACED="TRANSACTION_REPLACED",t.ACTION_REJECTED="ACTION_REJECTED";})(Hr||(Hr={}));var Lx="0123456789abcdef",ke=class t{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1});}_log(e,r){let i=e.toLowerCase();Al[i]==null&&this.throwArgumentError("invalid log level name","logLevel",e),!(Ox>Al[i])&&console.log.apply(console,r);}debug(...e){this._log(t.levels.DEBUG,e);}info(...e){this._log(t.levels.INFO,e);}warn(...e){this._log(t.levels.WARNING,e);}makeError(e,r,i){if(Nx)return this.makeError("censored error",r,{});r||(r=t.errors.UNKNOWN_ERROR),i||(i={});let s=[];Object.keys(i).forEach(u=>{let l=i[u];try{if(l instanceof Uint8Array){let h="";for(let c=0;c<l.length;c++)h+=Lx[l[c]>>4],h+=Lx[l[c]&15];s.push(u+"=Uint8Array(0x"+h+")");}else s.push(u+"="+JSON.stringify(l));}catch(h){s.push(u+"="+JSON.stringify(i[u].toString()));}}),s.push(`code=${r}`),s.push(`version=${this.version}`);let n=e,o="";switch(r){case Hr.NUMERIC_FAULT:{o="NUMERIC_FAULT";let u=e;switch(u){case"overflow":case"underflow":case"division-by-zero":o+="-"+u;break;case"negative-power":case"negative-width":o+="-unsupported";break;case"unbound-bitwise-result":o+="-unbound-result";break}break}case Hr.CALL_EXCEPTION:case Hr.INSUFFICIENT_FUNDS:case Hr.MISSING_NEW:case Hr.NONCE_EXPIRED:case Hr.REPLACEMENT_UNDERPRICED:case Hr.TRANSACTION_REPLACED:case Hr.UNPREDICTABLE_GAS_LIMIT:o=r;break}o&&(e+=" [ See: https://links.ethers.org/v5-errors-"+o+" ]"),s.length&&(e+=" ("+s.join(", ")+")");let a=new Error(e);return a.reason=n,a.code=r,Object.keys(i).forEach(function(u){a[u]=i[u];}),a}throwError(e,r,i){throw this.makeError(e,r,i)}throwArgumentError(e,r,i){return this.throwError(e,t.errors.INVALID_ARGUMENT,{argument:r,value:i})}assert(e,r,i,s){e||this.throwError(r,i,s);}assertArgument(e,r,i,s){e||this.throwArgumentError(r,i,s);}checkNormalize(e){Fx&&this.throwError("platform missing String.prototype.normalize",t.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:Fx});}checkSafeUint53(e,r){typeof e=="number"&&(r==null&&(r="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(r,t.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}));}checkArgumentCount(e,r,i){i?i=": "+i:i="",e<r&&this.throwError("missing argument"+i,t.errors.MISSING_ARGUMENT,{count:e,expectedCount:r}),e>r&&this.throwError("too many arguments"+i,t.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:r});}checkNew(e,r){(e===Object||e==null)&&this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name});}checkAbstract(e,r){e===r?this.throwError("cannot instantiate abstract class "+JSON.stringify(r.name)+" directly; use a sub-class",t.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):(e===Object||e==null)&&this.throwError("missing new",t.errors.MISSING_NEW,{name:r.name});}static globalLogger(){return P0||(P0=new t(Sx)),P0}static setCensorship(e,r){if(!e&&r&&this.globalLogger().throwError("cannot permanently disable censorship",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),Rx){if(!e)return;this.globalLogger().throwError("error censorship permanent",t.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"});}Nx=!!e,Rx=!!r;}static setLogLevel(e){let r=Al[e.toLowerCase()];if(r==null){t.globalLogger().warn("invalid log level - "+e);return}Ox=r;}static from(e){return new t(e)}};ke.errors=Hr;ke.levels=I0;var Px="bytes/5.7.0";var xi=new ke(Px);function kx(t){return !!t.toHexString}function ya(t){return t.slice||(t.slice=function(){let e=Array.prototype.slice.call(arguments);return ya(new Uint8Array(Array.prototype.slice.apply(t,e)))}),t}function Ix(t){return typeof t=="number"&&t==t&&t%1===0}function wl(t){if(t==null)return !1;if(t.constructor===Uint8Array)return !0;if(typeof t=="string"||!Ix(t.length)||t.length<0)return !1;for(let e=0;e<t.length;e++){let r=t[e];if(!Ix(r)||r<0||r>=256)return !1}return !0}function It(t,e){if(e||(e={}),typeof t=="number"){xi.checkSafeUint53(t,"invalid arrayify value");let r=[];for(;t;)r.unshift(t&255),t=parseInt(String(t/256));return r.length===0&&r.push(0),ya(new Uint8Array(r))}if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),kx(t)&&(t=t.toHexString()),hr(t)){let r=t.substring(2);r.length%2&&(e.hexPad==="left"?r="0"+r:e.hexPad==="right"?r+="0":xi.throwArgumentError("hex data is odd-length","value",t));let i=[];for(let s=0;s<r.length;s+=2)i.push(parseInt(r.substring(s,s+2),16));return ya(new Uint8Array(i))}return wl(t)?ya(new Uint8Array(t)):xi.throwArgumentError("invalid arrayify value","value",t)}function bi(t){let e=t.map(s=>It(s)),r=e.reduce((s,n)=>s+n.length,0),i=new Uint8Array(r);return e.reduce((s,n)=>(i.set(n,s),s+n.length),0),ya(i)}function hr(t,e){return !(typeof t!="string"||!t.match(/^0x[0-9A-Fa-f]*$/)||e&&t.length!==2+2*e)}var k0="0123456789abcdef";function St(t,e){if(e||(e={}),typeof t=="number"){xi.checkSafeUint53(t,"invalid hexlify value");let r="";for(;t;)r=k0[t&15]+r,t=Math.floor(t/16);return r.length?(r.length%2&&(r="0"+r),"0x"+r):"0x00"}if(typeof t=="bigint")return t=t.toString(16),t.length%2?"0x0"+t:"0x"+t;if(e.allowMissingPrefix&&typeof t=="string"&&t.substring(0,2)!=="0x"&&(t="0x"+t),kx(t))return t.toHexString();if(hr(t))return t.length%2&&(e.hexPad==="left"?t="0x0"+t.substring(2):e.hexPad==="right"?t+="0":xi.throwArgumentError("hex data is odd-length","value",t)),t.toLowerCase();if(wl(t)){let r="0x";for(let i=0;i<t.length;i++){let s=t[i];r+=k0[(s&240)>>4]+k0[s&15];}return r}return xi.throwArgumentError("invalid hexlify value","value",t)}function M0(t,e,r){return typeof t!="string"?t=St(t):(!hr(t)||t.length%2)&&xi.throwArgumentError("invalid hexData","value",t),e=2+2*e,r!=null?"0x"+t.substring(e,2+2*r):"0x"+t.substring(e)}function Mx(t){let e="0x";return t.forEach(r=>{e+=St(r).substring(2);}),e}function Dl(t,e){for(typeof t!="string"?t=St(t):hr(t)||xi.throwArgumentError("invalid hex string","value",t),t.length>2*e+2&&xi.throwArgumentError("value out of range","value",arguments[1]);t.length<2*e+2;)t="0x0"+t.substring(2);return t}var Bx="bignumber/5.7.0";var Sl=Hx.default.BN,Ei=new ke(Bx),B0={},jx=9007199254740991;var qx=!1,Nt=class t{constructor(e,r){e!==B0&&Ei.throwError("cannot call constructor directly; use BigNumber.from",ke.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=r,this._isBigNumber=!0,Object.freeze(this);}fromTwos(e){return fr(Ke(this).fromTwos(e))}toTwos(e){return fr(Ke(this).toTwos(e))}abs(){return this._hex[0]==="-"?t.from(this._hex.substring(1)):this}add(e){return fr(Ke(this).add(Ke(e)))}sub(e){return fr(Ke(this).sub(Ke(e)))}div(e){return t.from(e).isZero()&&Ir("division-by-zero","div"),fr(Ke(this).div(Ke(e)))}mul(e){return fr(Ke(this).mul(Ke(e)))}mod(e){let r=Ke(e);return r.isNeg()&&Ir("division-by-zero","mod"),fr(Ke(this).umod(r))}pow(e){let r=Ke(e);return r.isNeg()&&Ir("negative-power","pow"),fr(Ke(this).pow(r))}and(e){let r=Ke(e);return (this.isNegative()||r.isNeg())&&Ir("unbound-bitwise-result","and"),fr(Ke(this).and(r))}or(e){let r=Ke(e);return (this.isNegative()||r.isNeg())&&Ir("unbound-bitwise-result","or"),fr(Ke(this).or(r))}xor(e){let r=Ke(e);return (this.isNegative()||r.isNeg())&&Ir("unbound-bitwise-result","xor"),fr(Ke(this).xor(r))}mask(e){return (this.isNegative()||e<0)&&Ir("negative-width","mask"),fr(Ke(this).maskn(e))}shl(e){return (this.isNegative()||e<0)&&Ir("negative-width","shl"),fr(Ke(this).shln(e))}shr(e){return (this.isNegative()||e<0)&&Ir("negative-width","shr"),fr(Ke(this).shrn(e))}eq(e){return Ke(this).eq(Ke(e))}lt(e){return Ke(this).lt(Ke(e))}lte(e){return Ke(this).lte(Ke(e))}gt(e){return Ke(this).gt(Ke(e))}gte(e){return Ke(this).gte(Ke(e))}isNegative(){return this._hex[0]==="-"}isZero(){return Ke(this).isZero()}toNumber(){try{return Ke(this).toNumber()}catch(e){Ir("overflow","toNumber",this.toString());}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return Ei.throwError("this platform does not support BigInt",ke.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(arguments[0]===10?qx||(qx=!0,Ei.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):arguments[0]===16?Ei.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",ke.errors.UNEXPECTED_ARGUMENT,{}):Ei.throwError("BigNumber.toString does not accept parameters",ke.errors.UNEXPECTED_ARGUMENT,{})),Ke(this).toString(10)}toHexString(){return this._hex}toJSON(e){return {type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof t)return e;if(typeof e=="string")return e.match(/^-?0x[0-9a-f]+$/i)?new t(B0,va(e)):e.match(/^-?[0-9]+$/)?new t(B0,va(new Sl(e))):Ei.throwArgumentError("invalid BigNumber string","value",e);if(typeof e=="number")return e%1&&Ir("underflow","BigNumber.from",e),(e>=jx||e<=-jx)&&Ir("overflow","BigNumber.from",e),t.from(String(e));let r=e;if(typeof r=="bigint")return t.from(r.toString());if(wl(r))return t.from(St(r));if(r)if(r.toHexString){let i=r.toHexString();if(typeof i=="string")return t.from(i)}else {let i=r._hex;if(i==null&&r.type==="BigNumber"&&(i=r.hex),typeof i=="string"&&(hr(i)||i[0]==="-"&&hr(i.substring(1))))return t.from(i)}return Ei.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return !!(e&&e._isBigNumber)}};function va(t){if(typeof t!="string")return va(t.toString(16));if(t[0]==="-")return t=t.substring(1),t[0]==="-"&&Ei.throwArgumentError("invalid hex","value",t),t=va(t),t==="0x00"?t:"-"+t;if(t.substring(0,2)!=="0x"&&(t="0x"+t),t==="0x")return "0x00";for(t.length%2&&(t="0x0"+t.substring(2));t.length>4&&t.substring(0,4)==="0x00";)t="0x"+t.substring(4);return t}function fr(t){return Nt.from(va(t))}function Ke(t){let e=Nt.from(t).toHexString();return e[0]==="-"?new Sl("-"+e.substring(3),16):new Sl(e.substring(2),16)}function Ir(t,e,r){let i={fault:t,operation:e};return r!=null&&(i.value=r),Ei.throwError(t,ke.errors.NUMERIC_FAULT,i)}function j0(t){return new Sl(t,36).toString(16)}var Ux="properties/5.7.0";var Vx=new ke(Ux);function Bt(t,e,r){Object.defineProperty(t,e,{enumerable:!0,value:r,writable:!1});}function xa(t,e){for(let r=0;r<32;r++){if(t[e])return t[e];if(!t.prototype||typeof t.prototype!="object")break;t=Object.getPrototypeOf(t.prototype).constructor;}return null}var KP={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function $x(t){if(t==null||KP[typeof t])return !0;if(Array.isArray(t)||typeof t=="object"){if(!Object.isFrozen(t))return !1;let e=Object.keys(t);for(let r=0;r<e.length;r++){let i=null;try{i=t[e[r]];}catch(s){continue}if(!$x(i))return !1}return !0}return Vx.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function GP(t){if($x(t))return t;if(Array.isArray(t))return Object.freeze(t.map(e=>q0(e)));if(typeof t=="object"){let e={};for(let r in t){let i=t[r];i!==void 0&&Bt(e,r,q0(i));}return e}return Vx.throwArgumentError(`Cannot deepCopy ${typeof t}`,"object",t)}function q0(t){return GP(t)}var Qn=class{constructor(e){for(let r in e)this[r]=q0(e[r]);}};var Zr="abi/5.7.0";var Ge=new ke(Zr),es={},zx={calldata:!0,memory:!0,storage:!0},WP={calldata:!0,memory:!0};function Rl(t,e){if(t==="bytes"||t==="string"){if(zx[e])return !0}else if(t==="address"){if(e==="payable")return !0}else if((t.indexOf("[")>=0||t==="tuple")&&WP[e])return !0;return (zx[e]||e==="payable")&&Ge.throwArgumentError("invalid modifier","name",e),!1}function YP(t,e){let r=t;function i(a){Ge.throwArgumentError(`unexpected character at position ${a}`,"param",t);}t=t.replace(/\s/g," ");function s(a){let u={type:"",name:"",parent:a,state:{allowType:!0}};return e&&(u.indexed=!1),u}let n={type:"",name:"",state:{allowType:!0}},o=n;for(let a=0;a<t.length;a++){let u=t[a];switch(u){case"(":o.state.allowType&&o.type===""?o.type="tuple":o.state.allowParams||i(a),o.state.allowType=!1,o.type=to(o.type),o.components=[s(o)],o=o.components[0];break;case")":delete o.state,o.name==="indexed"&&(e||i(a),o.indexed=!0,o.name=""),Rl(o.type,o.name)&&(o.name=""),o.type=to(o.type);let l=o;o=o.parent,o||i(a),delete l.parent,o.state.allowParams=!1,o.state.allowName=!0,o.state.allowArray=!0;break;case",":delete o.state,o.name==="indexed"&&(e||i(a),o.indexed=!0,o.name=""),Rl(o.type,o.name)&&(o.name=""),o.type=to(o.type);let h=s(o.parent);o.parent.components.push(h),delete o.parent,o=h;break;case" ":o.state.allowType&&o.type!==""&&(o.type=to(o.type),delete o.state.allowType,o.state.allowName=!0,o.state.allowParams=!0),o.state.allowName&&o.name!==""&&(o.name==="indexed"?(e||i(a),o.indexed&&i(a),o.indexed=!0,o.name=""):Rl(o.type,o.name)?o.name="":o.state.allowName=!1);break;case"[":o.state.allowArray||i(a),o.type+=u,o.state.allowArray=!1,o.state.allowName=!1,o.state.readArray=!0;break;case"]":o.state.readArray||i(a),o.type+=u,o.state.readArray=!1,o.state.allowArray=!0,o.state.allowName=!0;break;default:o.state.allowType?(o.type+=u,o.state.allowParams=!0,o.state.allowArray=!0):o.state.allowName?(o.name+=u,delete o.state.allowArray):o.state.readArray?o.type+=u:i(a);}}return o.parent&&Ge.throwArgumentError("unexpected eof","param",t),delete n.state,o.name==="indexed"?(e||i(r.length-7),o.indexed&&i(r.length-7),o.indexed=!0,o.name=""):Rl(o.type,o.name)&&(o.name=""),n.type=to(n.type),n}function Nl(t,e){for(let r in e)Bt(t,r,e[r]);}var Ye=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),JP=new RegExp(/^(.*)\[([0-9]*)\]$/),dr=class t{constructor(e,r){e!==es&&Ge.throwError("use fromString",ke.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),Nl(this,r);let i=this.type.match(JP);i?Nl(this,{arrayLength:parseInt(i[2]||"-1"),arrayChildren:t.fromObject({type:i[1],components:this.components}),baseType:"array"}):Nl(this,{arrayLength:null,arrayChildren:null,baseType:this.components!=null?"tuple":this.type}),this._isParamType=!0,Object.freeze(this);}format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json){let i={type:this.baseType==="tuple"?"tuple":this.type,name:this.name||void 0};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.components&&(i.components=this.components.map(s=>JSON.parse(s.format(e)))),JSON.stringify(i)}let r="";return this.baseType==="array"?(r+=this.arrayChildren.format(e),r+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):this.baseType==="tuple"?(e!==Ye.sighash&&(r+=this.type),r+="("+this.components.map(i=>i.format(e)).join(e===Ye.full?", ":",")+")"):r+=this.type,e!==Ye.sighash&&(this.indexed===!0&&(r+=" indexed"),e===Ye.full&&this.name&&(r+=" "+this.name)),r}static from(e,r){return typeof e=="string"?t.fromString(e,r):t.fromObject(e)}static fromObject(e){return t.isParamType(e)?e:new t(es,{name:e.name||null,type:to(e.type),indexed:e.indexed==null?null:!!e.indexed,components:e.components?e.components.map(t.fromObject):null})}static fromString(e,r){function i(s){return t.fromObject({name:s.name,type:s.type,indexed:s.indexed,components:s.components})}return i(YP(e,!!r))}static isParamType(e){return !!(e!=null&&e._isParamType)}};function ba(t,e){return XP(t).map(r=>dr.fromString(r,e))}var ts=class t{constructor(e,r){e!==es&&Ge.throwError("use a static from method",ke.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),Nl(this,r),this._isFragment=!0,Object.freeze(this);}static from(e){return t.isFragment(e)?e:typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isFragment(e))return e;switch(e.type){case"function":return is.fromObject(e);case"event":return ro.fromObject(e);case"constructor":return rs.fromObject(e);case"error":return Ol.fromObject(e);case"fallback":case"receive":return null}return Ge.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return e=e.replace(/\s/g," "),e=e.replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," "),e=e.trim(),e.split(" ")[0]==="event"?ro.fromString(e.substring(5).trim()):e.split(" ")[0]==="function"?is.fromString(e.substring(8).trim()):e.split("(")[0].trim()==="constructor"?rs.fromString(e.trim()):e.split(" ")[0]==="error"?Ol.fromString(e.substring(5).trim()):Ge.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return !!(e&&e._isFragment)}},ro=class t extends ts{format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(e)))});let r="";return e!==Ye.sighash&&(r+="event "),r+=this.name+"("+this.inputs.map(i=>i.format(e)).join(e===Ye.full?", ":",")+") ",e!==Ye.sighash&&this.anonymous&&(r+="anonymous "),r.trim()}static from(e){return typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isEventFragment(e))return e;e.type!=="event"&&Ge.throwArgumentError("invalid event object","value",e);let r={name:Ea(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(dr.fromObject):[],type:"event"};return new t(es,r)}static fromString(e){let r=e.match(Ca);r||Ge.throwArgumentError("invalid event string","value",e);let i=!1;return r[3].split(" ").forEach(s=>{switch(s.trim()){case"anonymous":i=!0;break;case"":break;default:Ge.warn("unknown modifier: "+s);}}),t.fromObject({name:r[1].trim(),anonymous:i,inputs:ba(r[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&e.type==="event"}};function Gx(t,e){e.gas=null;let r=t.split("@");return r.length!==1?(r.length>2&&Ge.throwArgumentError("invalid human-readable ABI signature","value",t),r[1].match(/^[0-9]+$/)||Ge.throwArgumentError("invalid human-readable ABI signature gas","value",t),e.gas=Nt.from(r[1]),r[0]):t}function Wx(t,e){e.constant=!1,e.payable=!1,e.stateMutability="nonpayable",t.split(" ").forEach(r=>{switch(r.trim()){case"constant":e.constant=!0;break;case"payable":e.payable=!0,e.stateMutability="payable";break;case"nonpayable":e.payable=!1,e.stateMutability="nonpayable";break;case"pure":e.constant=!0,e.stateMutability="pure";break;case"view":e.constant=!0,e.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+r);}});}function Yx(t){let e={constant:!1,payable:!0,stateMutability:"payable"};return t.stateMutability!=null?(e.stateMutability=t.stateMutability,e.constant=e.stateMutability==="view"||e.stateMutability==="pure",t.constant!=null&&!!t.constant!==e.constant&&Ge.throwArgumentError("cannot have constant function with mutability "+e.stateMutability,"value",t),e.payable=e.stateMutability==="payable",t.payable!=null&&!!t.payable!==e.payable&&Ge.throwArgumentError("cannot have payable function with mutability "+e.stateMutability,"value",t)):t.payable!=null?(e.payable=!!t.payable,t.constant==null&&!e.payable&&t.type!=="constructor"&&Ge.throwArgumentError("unable to determine stateMutability","value",t),e.constant=!!t.constant,e.constant?e.stateMutability="view":e.stateMutability=e.payable?"payable":"nonpayable",e.payable&&e.constant&&Ge.throwArgumentError("cannot have constant payable function","value",t)):t.constant!=null?(e.constant=!!t.constant,e.payable=!e.constant,e.stateMutability=e.constant?"view":"payable"):t.type!=="constructor"&&Ge.throwArgumentError("unable to determine stateMutability","value",t),e}var rs=class t extends ts{format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json)return JSON.stringify({type:"constructor",stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(e)))});e===Ye.sighash&&Ge.throwError("cannot format a constructor for sighash",ke.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let r="constructor("+this.inputs.map(i=>i.format(e)).join(e===Ye.full?", ":",")+") ";return this.stateMutability&&this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "),r.trim()}static from(e){return typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isConstructorFragment(e))return e;e.type!=="constructor"&&Ge.throwArgumentError("invalid constructor object","value",e);let r=Yx(e);r.constant&&Ge.throwArgumentError("constructor cannot be constant","value",e);let i={name:null,type:e.type,inputs:e.inputs?e.inputs.map(dr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Nt.from(e.gas):null};return new t(es,i)}static fromString(e){let r={type:"constructor"};e=Gx(e,r);let i=e.match(Ca);return (!i||i[1].trim()!=="constructor")&&Ge.throwArgumentError("invalid constructor string","value",e),r.inputs=ba(i[2].trim(),!1),Wx(i[3].trim(),r),t.fromObject(r)}static isConstructorFragment(e){return e&&e._isFragment&&e.type==="constructor"}},is=class t extends rs{format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(e))),outputs:this.outputs.map(i=>JSON.parse(i.format(e)))});let r="";return e!==Ye.sighash&&(r+="function "),r+=this.name+"("+this.inputs.map(i=>i.format(e)).join(e===Ye.full?", ":",")+") ",e!==Ye.sighash&&(this.stateMutability?this.stateMutability!=="nonpayable"&&(r+=this.stateMutability+" "):this.constant&&(r+="view "),this.outputs&&this.outputs.length&&(r+="returns ("+this.outputs.map(i=>i.format(e)).join(", ")+") "),this.gas!=null&&(r+="@"+this.gas.toString()+" ")),r.trim()}static from(e){return typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isFunctionFragment(e))return e;e.type!=="function"&&Ge.throwArgumentError("invalid function object","value",e);let r=Yx(e),i={type:e.type,name:Ea(e.name),constant:r.constant,inputs:e.inputs?e.inputs.map(dr.fromObject):[],outputs:e.outputs?e.outputs.map(dr.fromObject):[],payable:r.payable,stateMutability:r.stateMutability,gas:e.gas?Nt.from(e.gas):null};return new t(es,i)}static fromString(e){let r={type:"function"};e=Gx(e,r);let i=e.split(" returns ");i.length>2&&Ge.throwArgumentError("invalid function string","value",e);let s=i[0].match(Ca);if(s||Ge.throwArgumentError("invalid function signature","value",e),r.name=s[1].trim(),r.name&&Ea(r.name),r.inputs=ba(s[2],!1),Wx(s[3].trim(),r),i.length>1){let n=i[1].match(Ca);(n[1].trim()!=""||n[3].trim()!="")&&Ge.throwArgumentError("unexpected tokens","value",e),r.outputs=ba(n[2],!1);}else r.outputs=[];return t.fromObject(r)}static isFunctionFragment(e){return e&&e._isFragment&&e.type==="function"}};function Kx(t){let e=t.format();return (e==="Error(string)"||e==="Panic(uint256)")&&Ge.throwArgumentError(`cannot specify user defined ${e} error`,"fragment",t),t}var Ol=class t extends ts{format(e){if(e||(e=Ye.sighash),Ye[e]||Ge.throwArgumentError("invalid format type","format",e),e===Ye.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(e)))});let r="";return e!==Ye.sighash&&(r+="error "),r+=this.name+"("+this.inputs.map(i=>i.format(e)).join(e===Ye.full?", ":",")+") ",r.trim()}static from(e){return typeof e=="string"?t.fromString(e):t.fromObject(e)}static fromObject(e){if(t.isErrorFragment(e))return e;e.type!=="error"&&Ge.throwArgumentError("invalid error object","value",e);let r={type:e.type,name:Ea(e.name),inputs:e.inputs?e.inputs.map(dr.fromObject):[]};return Kx(new t(es,r))}static fromString(e){let r={type:"error"},i=e.match(Ca);return i||Ge.throwArgumentError("invalid error signature","value",e),r.name=i[1].trim(),r.name&&Ea(r.name),r.inputs=ba(i[2],!1),Kx(t.fromObject(r))}static isErrorFragment(e){return e&&e._isFragment&&e.type==="error"}};function to(t){return t.match(/^uint($|[^1-9])/)?t="uint256"+t.substring(4):t.match(/^int($|[^1-9])/)&&(t="int256"+t.substring(3)),t}var ZP=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function Ea(t){return (!t||!t.match(ZP))&&Ge.throwArgumentError(`invalid identifier "${t}"`,"value",t),t}var Ca=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function XP(t){t=t.trim();let e=[],r="",i=0;for(let s=0;s<t.length;s++){let n=t[s];n===","&&i===0?(e.push(r),r=""):(r+=n,n==="("?i++:n===")"&&(i--,i===-1&&Ge.throwArgumentError("unbalanced parenthesis","value",t)));}return r&&e.push(r),e}var H0=new ke(Zr);var Ht=class{constructor(e,r,i,s){this.name=e,this.type=r,this.localName=i,this.dynamic=s;}_throwError(e,r){H0.throwArgumentError(e,this.localName,r);}},ns=class{constructor(e){Bt(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e);}get data(){return Mx(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData(bi(e._data))}writeBytes(e){let r=It(e),i=r.length%this.wordSize;return i&&(r=bi([r,this._padding.slice(i)])),this._writeData(r)}_getValue(e){let r=It(Nt.from(e));return r.length>this.wordSize&&H0.throwError("value out-of-bounds",ke.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:r.length}),r.length%this.wordSize&&(r=bi([this._padding.slice(r.length%this.wordSize),r])),r}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){let e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,r=>{this._data[e]=this._getValue(r);}}},Fl=class t{constructor(e,r,i,s){Bt(this,"_data",It(e)),Bt(this,"wordSize",r||32),Bt(this,"_coerceFunc",i),Bt(this,"allowLoose",s),this._offset=0;}get data(){return St(this._data)}get consumed(){return this._offset}static coerce(e,r){let i=e.match("^u?int([0-9]+)$");return i&&parseInt(i[1])<=48&&(r=r.toNumber()),r}coerce(e,r){return this._coerceFunc?this._coerceFunc(e,r):t.coerce(e,r)}_peekBytes(e,r,i){let s=Math.ceil(r/this.wordSize)*this.wordSize;return this._offset+s>this._data.length&&(this.allowLoose&&i&&this._offset+r<=this._data.length?s=r:H0.throwError("data out-of-bounds",ke.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+s})),this._data.slice(this._offset,this._offset+s)}subReader(e){return new t(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,r){let i=this._peekBytes(0,e,!!r);return this._offset+=i.length,i.slice(0,e)}readValue(){return Nt.from(this.readBytes(this.wordSize))}};var Zx=Kt(Jx());function ss(t){return "0x"+Zx.default.keccak_256(It(t))}var Xx="address/5.7.0";var Ta=new ke(Xx);function Qx(t){hr(t,20)||Ta.throwArgumentError("invalid address","address",t),t=t.toLowerCase();let e=t.substring(2).split(""),r=new Uint8Array(40);for(let s=0;s<40;s++)r[s]=e[s].charCodeAt(0);let i=It(ss(r));for(let s=0;s<40;s+=2)i[s>>1]>>4>=8&&(e[s]=e[s].toUpperCase()),(i[s>>1]&15)>=8&&(e[s+1]=e[s+1].toUpperCase());return "0x"+e.join("")}var QP=9007199254740991;function e7(t){return Math.log10?Math.log10(t):Math.log(t)/Math.LN10}var U0={};for(let t=0;t<10;t++)U0[String(t)]=String(t);for(let t=0;t<26;t++)U0[String.fromCharCode(65+t)]=String(10+t);var eb=Math.floor(e7(QP));function t7(t){t=t.toUpperCase(),t=t.substring(4)+t.substring(0,2)+"00";let e=t.split("").map(i=>U0[i]).join("");for(;e.length>=eb;){let i=e.substring(0,eb);e=parseInt(i,10)%97+e.substring(i.length);}let r=String(98-parseInt(e,10)%97);for(;r.length<2;)r="0"+r;return r}function Aa(t){let e=null;if(typeof t!="string"&&Ta.throwArgumentError("invalid address","address",t),t.match(/^(0x)?[0-9a-fA-F]{40}$/))t.substring(0,2)!=="0x"&&(t="0x"+t),e=Qx(t),t.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&e!==t&&Ta.throwArgumentError("bad address checksum","address",t);else if(t.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(t.substring(2,4)!==t7(t)&&Ta.throwArgumentError("bad icap checksum","address",t),e=j0(t.substring(4));e.length<40;)e="0"+e;e=Qx("0x"+e);}else Ta.throwArgumentError("invalid address","address",t);return e}var Pl=class extends Ht{constructor(e){super("address","address",e,!1);}defaultValue(){return "0x0000000000000000000000000000000000000000"}encode(e,r){try{r=Aa(r);}catch(i){this._throwError(i.message,r);}return e.writeValue(r)}decode(e){return Aa(Dl(e.readValue().toHexString(),20))}};var Il=class extends Ht{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e;}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}};var io=new ke(Zr);function V0(t,e,r){let i=null;if(Array.isArray(r))i=r;else if(r&&typeof r=="object"){let u={};i=e.map(l=>{let h=l.localName;return h||io.throwError("cannot encode object for signature with missing names",ke.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),u[h]&&io.throwError("cannot encode object for signature with duplicate names",ke.errors.INVALID_ARGUMENT,{argument:"values",coder:l,value:r}),u[h]=!0,r[h]});}else io.throwArgumentError("invalid tuple value","tuple",r);e.length!==i.length&&io.throwArgumentError("types/value length mismatch","tuple",r);let s=new ns(t.wordSize),n=new ns(t.wordSize),o=[];e.forEach((u,l)=>{let h=i[l];if(u.dynamic){let c=n.length;u.encode(n,h);let d=s.writeUpdatableValue();o.push(f=>{d(f+c);});}else u.encode(s,h);}),o.forEach(u=>{u(s.length);});let a=t.appendWriter(s);return a+=t.appendWriter(n),a}function $0(t,e){let r=[],i=t.subReader(0);e.forEach(n=>{let o=null;if(n.dynamic){let a=t.readValue(),u=i.subReader(a.toNumber());try{o=n.decode(u);}catch(l){if(l.code===ke.errors.BUFFER_OVERRUN)throw l;o=l,o.baseType=n.name,o.name=n.localName,o.type=n.type;}}else try{o=n.decode(t);}catch(a){if(a.code===ke.errors.BUFFER_OVERRUN)throw a;o=a,o.baseType=n.name,o.name=n.localName,o.type=n.type;}o!=null&&r.push(o);});let s=e.reduce((n,o)=>{let a=o.localName;return a&&(n[a]||(n[a]=0),n[a]++),n},{});e.forEach((n,o)=>{let a=n.localName;if(!a||s[a]!==1||(a==="length"&&(a="_length"),r[a]!=null))return;let u=r[o];u instanceof Error?Object.defineProperty(r,a,{enumerable:!0,get:()=>{throw u}}):r[a]=u;});for(let n=0;n<r.length;n++){let o=r[n];o instanceof Error&&Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw o}});}return Object.freeze(r)}var kl=class extends Ht{constructor(e,r,i){let s=e.type+"["+(r>=0?r:"")+"]",n=r===-1||e.dynamic;super("array",s,i,n),this.coder=e,this.length=r;}defaultValue(){let e=this.coder.defaultValue(),r=[];for(let i=0;i<this.length;i++)r.push(e);return r}encode(e,r){Array.isArray(r)||this._throwError("expected array value",r);let i=this.length;i===-1&&(i=r.length,e.writeValue(r.length)),io.checkArgumentCount(r.length,i,"coder array"+(this.localName?" "+this.localName:""));let s=[];for(let n=0;n<r.length;n++)s.push(this.coder);return V0(e,s,r)}decode(e){let r=this.length;r===-1&&(r=e.readValue().toNumber(),r*32>e._data.length&&io.throwError("insufficient data length",ke.errors.BUFFER_OVERRUN,{length:e._data.length,count:r}));let i=[];for(let s=0;s<r;s++)i.push(new Il(this.coder));return e.coerce(this.name,$0(e,i))}};var Ml=class extends Ht{constructor(e){super("bool","bool",e,!1);}defaultValue(){return !1}encode(e,r){return e.writeValue(r?1:0)}decode(e){return e.coerce(this.type,!e.readValue().isZero())}};var wa=class extends Ht{constructor(e,r){super(e,e,r,!0);}defaultValue(){return "0x"}encode(e,r){r=It(r);let i=e.writeValue(r.length);return i+=e.writeBytes(r),i}decode(e){return e.readBytes(e.readValue().toNumber(),!0)}},Bl=class extends wa{constructor(e){super("bytes",e);}decode(e){return e.coerce(this.name,St(super.decode(e)))}};var jl=class extends Ht{constructor(e,r){let i="bytes"+String(e);super(i,i,r,!1),this.size=e;}defaultValue(){return "0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(e,r){let i=It(r);return i.length!==this.size&&this._throwError("incorrect data length",r),e.writeBytes(i)}decode(e){return e.coerce(this.name,St(e.readBytes(this.size)))}};var ql=class extends Ht{constructor(e){super("null","",e,!1);}defaultValue(){return null}encode(e,r){return r!=null&&this._throwError("not null",r),e.writeBytes([])}decode(e){return e.readBytes(0),e.coerce(this.name,null)}};var z0=Nt.from(-1),K0=Nt.from(0),G0=Nt.from(1);var W0=Nt.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");var Hl=class extends Ht{constructor(e,r,i){let s=(r?"int":"uint")+e*8;super(s,s,i,!1),this.size=e,this.signed=r;}defaultValue(){return 0}encode(e,r){let i=Nt.from(r),s=W0.mask(e.wordSize*8);if(this.signed){let n=s.mask(this.size*8-1);(i.gt(n)||i.lt(n.add(G0).mul(z0)))&&this._throwError("value out-of-bounds",r);}else (i.lt(K0)||i.gt(s.mask(this.size*8)))&&this._throwError("value out-of-bounds",r);return i=i.toTwos(this.size*8).mask(this.size*8),this.signed&&(i=i.fromTwos(this.size*8).toTwos(8*e.wordSize)),e.writeValue(i)}decode(e){let r=e.readValue().mask(this.size*8);return this.signed&&(r=r.fromTwos(this.size*8)),e.coerce(this.name,r)}};var tb="strings/5.7.0";var rb=new ke(tb),Da;(function(t){t.current="",t.NFC="NFC",t.NFD="NFD",t.NFKC="NFKC",t.NFKD="NFKD";})(Da||(Da={}));var pr;(function(t){t.UNEXPECTED_CONTINUE="unexpected continuation byte",t.BAD_PREFIX="bad codepoint prefix",t.OVERRUN="string overrun",t.MISSING_CONTINUE="missing continuation byte",t.OUT_OF_RANGE="out of UTF-8 range",t.UTF16_SURROGATE="UTF-16 surrogate",t.OVERLONG="overlong representation";})(pr||(pr={}));function r7(t,e,r,i,s){return rb.throwArgumentError(`invalid codepoint at offset ${e}; ${t}`,"bytes",r)}function ib(t,e,r,i,s){if(t===pr.BAD_PREFIX||t===pr.UNEXPECTED_CONTINUE){let n=0;for(let o=e+1;o<r.length&&r[o]>>6===2;o++)n++;return n}return t===pr.OVERRUN?r.length-e-1:0}function i7(t,e,r,i,s){return t===pr.OVERLONG?(i.push(s),0):(i.push(65533),ib(t,e,r))}var nb=Object.freeze({error:r7,ignore:ib,replace:i7});function n7(t,e){e==null&&(e=nb.error),t=It(t);let r=[],i=0;for(;i<t.length;){let s=t[i++];if(!(s>>7)){r.push(s);continue}let n=null,o=null;if((s&224)===192)n=1,o=127;else if((s&240)===224)n=2,o=2047;else if((s&248)===240)n=3,o=65535;else {(s&192)===128?i+=e(pr.UNEXPECTED_CONTINUE,i-1,t,r):i+=e(pr.BAD_PREFIX,i-1,t,r);continue}if(i-1+n>=t.length){i+=e(pr.OVERRUN,i-1,t,r);continue}let a=s&(1<<8-n-1)-1;for(let u=0;u<n;u++){let l=t[i];if((l&192)!=128){i+=e(pr.MISSING_CONTINUE,i,t,r),a=null;break}a=a<<6|l&63,i++;}if(a!==null){if(a>1114111){i+=e(pr.OUT_OF_RANGE,i-1-n,t,r,a);continue}if(a>=55296&&a<=57343){i+=e(pr.UTF16_SURROGATE,i-1-n,t,r,a);continue}if(a<=o){i+=e(pr.OVERLONG,i-1-n,t,r,a);continue}r.push(a);}}return r}function Sa(t,e=Da.current){e!=Da.current&&(rb.checkNormalize(),t=t.normalize(e));let r=[];for(let i=0;i<t.length;i++){let s=t.charCodeAt(i);if(s<128)r.push(s);else if(s<2048)r.push(s>>6|192),r.push(s&63|128);else if((s&64512)==55296){i++;let n=t.charCodeAt(i);if(i>=t.length||(n&64512)!==56320)throw new Error("invalid utf-8 string");let o=65536+((s&1023)<<10)+(n&1023);r.push(o>>18|240),r.push(o>>12&63|128),r.push(o>>6&63|128),r.push(o&63|128);}else r.push(s>>12|224),r.push(s>>6&63|128),r.push(s&63|128);}return It(r)}function s7(t){return t.map(e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode((e>>10&1023)+55296,(e&1023)+56320))).join("")}function Y0(t,e){return s7(n7(t,e))}var Ul=class extends wa{constructor(e){super("string",e);}defaultValue(){return ""}encode(e,r){return super.encode(e,Sa(r))}decode(e){return Y0(super.decode(e))}};var os=class extends Ht{constructor(e,r){let i=!1,s=[];e.forEach(o=>{o.dynamic&&(i=!0),s.push(o.type);});let n="tuple("+s.join(",")+")";super("tuple",n,r,i),this.coders=e;}defaultValue(){let e=[];this.coders.forEach(i=>{e.push(i.defaultValue());});let r=this.coders.reduce((i,s)=>{let n=s.localName;return n&&(i[n]||(i[n]=0),i[n]++),i},{});return this.coders.forEach((i,s)=>{let n=i.localName;!n||r[n]!==1||(n==="length"&&(n="_length"),e[n]==null&&(e[n]=e[s]));}),Object.freeze(e)}encode(e,r){return V0(e,this.coders,r)}decode(e){return e.coerce(this.name,$0(e,this.coders))}};var Vl=new ke(Zr),o7=new RegExp(/^bytes([0-9]*)$/),a7=new RegExp(/^(u?int)([0-9]*)$/),J0=class{constructor(e){Bt(this,"coerceFunc",e||null);}_getCoder(e){switch(e.baseType){case"address":return new Pl(e.name);case"bool":return new Ml(e.name);case"string":return new Ul(e.name);case"bytes":return new Bl(e.name);case"array":return new kl(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new os((e.components||[]).map(i=>this._getCoder(i)),e.name);case"":return new ql(e.name)}let r=e.type.match(a7);if(r){let i=parseInt(r[2]||"256");return (i===0||i>256||i%8!==0)&&Vl.throwArgumentError("invalid "+r[1]+" bit length","param",e),new Hl(i/8,r[1]==="int",e.name)}if(r=e.type.match(o7),r){let i=parseInt(r[1]);return (i===0||i>32)&&Vl.throwArgumentError("invalid bytes length","param",e),new jl(i,e.name)}return Vl.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,r){return new Fl(e,this._getWordSize(),this.coerceFunc,r)}_getWriter(){return new ns(this._getWordSize())}getDefaultValue(e){let r=e.map(s=>this._getCoder(dr.from(s)));return new os(r,"_").defaultValue()}encode(e,r){e.length!==r.length&&Vl.throwError("types/values length mismatch",ke.errors.INVALID_ARGUMENT,{count:{types:e.length,values:r.length},value:{types:e,values:r}});let i=e.map(o=>this._getCoder(dr.from(o))),s=new os(i,"_"),n=this._getWriter();return s.encode(n,r),n.data}decode(e,r,i){let s=e.map(o=>this._getCoder(dr.from(o)));return new os(s,"_").decode(this._getReader(It(r),i))}},sb=new J0;function no(t){return ss(Sa(t))}var Ot=new ke(Zr);var $l=class extends Qn{},zl=class extends Qn{},Z0=class extends Qn{},Ra=class extends Qn{static isIndexed(e){return !!(e&&e._isIndexed)}},u7={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function ob(t,e){let r=new Error(`deferred error during ABI decoding triggered accessing ${t}`);return r.error=e,r}var Na=class{constructor(e){let r=[];typeof e=="string"?r=JSON.parse(e):r=e,Bt(this,"fragments",r.map(i=>ts.from(i)).filter(i=>i!=null)),Bt(this,"_abiCoder",xa(new.target,"getAbiCoder")()),Bt(this,"functions",{}),Bt(this,"errors",{}),Bt(this,"events",{}),Bt(this,"structs",{}),this.fragments.forEach(i=>{let s=null;switch(i.type){case"constructor":if(this.deploy){Ot.warn("duplicate definition - constructor");return}Bt(this,"deploy",i);return;case"function":s=this.functions;break;case"event":s=this.events;break;case"error":s=this.errors;break;default:return}let n=i.format();if(s[n]){Ot.warn("duplicate definition - "+n);return}s[n]=i;}),this.deploy||Bt(this,"deploy",rs.from({payable:!1,type:"constructor"})),Bt(this,"_isInterface",!0);}format(e){e||(e=Ye.full),e===Ye.sighash&&Ot.throwArgumentError("interface does not support formatting sighash","format",e);let r=this.fragments.map(i=>i.format(e));return e===Ye.json?JSON.stringify(r.map(i=>JSON.parse(i))):r}static getAbiCoder(){return sb}static getAddress(e){return Aa(e)}static getSighash(e){return M0(no(e.format()),0,4)}static getEventTopic(e){return no(e.format())}getFunction(e){if(hr(e)){for(let i in this.functions)if(e===this.getSighash(i))return this.functions[i];Ot.throwArgumentError("no matching function","sighash",e);}if(e.indexOf("(")===-1){let i=e.trim(),s=Object.keys(this.functions).filter(n=>n.split("(")[0]===i);return s.length===0?Ot.throwArgumentError("no matching function","name",i):s.length>1&&Ot.throwArgumentError("multiple matching functions","name",i),this.functions[s[0]]}let r=this.functions[is.fromString(e).format()];return r||Ot.throwArgumentError("no matching function","signature",e),r}getEvent(e){if(hr(e)){let i=e.toLowerCase();for(let s in this.events)if(i===this.getEventTopic(s))return this.events[s];Ot.throwArgumentError("no matching event","topichash",i);}if(e.indexOf("(")===-1){let i=e.trim(),s=Object.keys(this.events).filter(n=>n.split("(")[0]===i);return s.length===0?Ot.throwArgumentError("no matching event","name",i):s.length>1&&Ot.throwArgumentError("multiple matching events","name",i),this.events[s[0]]}let r=this.events[ro.fromString(e).format()];return r||Ot.throwArgumentError("no matching event","signature",e),r}getError(e){if(hr(e)){let i=xa(this.constructor,"getSighash");for(let s in this.errors){let n=this.errors[s];if(e===i(n))return this.errors[s]}Ot.throwArgumentError("no matching error","sighash",e);}if(e.indexOf("(")===-1){let i=e.trim(),s=Object.keys(this.errors).filter(n=>n.split("(")[0]===i);return s.length===0?Ot.throwArgumentError("no matching error","name",i):s.length>1&&Ot.throwArgumentError("multiple matching errors","name",i),this.errors[s[0]]}let r=this.errors[is.fromString(e).format()];return r||Ot.throwArgumentError("no matching error","signature",e),r}getSighash(e){if(typeof e=="string")try{e=this.getFunction(e);}catch(r){try{e=this.getError(e);}catch(i){throw r}}return xa(this.constructor,"getSighash")(e)}getEventTopic(e){return typeof e=="string"&&(e=this.getEvent(e)),xa(this.constructor,"getEventTopic")(e)}_decodeParams(e,r){return this._abiCoder.decode(e,r)}_encodeParams(e,r){return this._abiCoder.encode(e,r)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,r){typeof e=="string"&&(e=this.getError(e));let i=It(r);return St(i.slice(0,4))!==this.getSighash(e)&&Ot.throwArgumentError(`data signature does not match error ${e.name}.`,"data",St(i)),this._decodeParams(e.inputs,i.slice(4))}encodeErrorResult(e,r){return typeof e=="string"&&(e=this.getError(e)),St(bi([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionData(e,r){typeof e=="string"&&(e=this.getFunction(e));let i=It(r);return St(i.slice(0,4))!==this.getSighash(e)&&Ot.throwArgumentError(`data signature does not match function ${e.name}.`,"data",St(i)),this._decodeParams(e.inputs,i.slice(4))}encodeFunctionData(e,r){return typeof e=="string"&&(e=this.getFunction(e)),St(bi([this.getSighash(e),this._encodeParams(e.inputs,r||[])]))}decodeFunctionResult(e,r){typeof e=="string"&&(e=this.getFunction(e));let i=It(r),s=null,n="",o=null,a=null,u=null;switch(i.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,i)}catch(l){}break;case 4:{let l=St(i.slice(0,4)),h=u7[l];if(h)o=this._abiCoder.decode(h.inputs,i.slice(4)),a=h.name,u=h.signature,h.reason&&(s=o[0]),a==="Error"?n=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(o[0])}`:a==="Panic"&&(n=`; VM Exception while processing transaction: reverted with panic code ${o[0]}`);else try{let c=this.getError(l);o=this._abiCoder.decode(c.inputs,i.slice(4)),a=c.name,u=c.format();}catch(c){}break}}return Ot.throwError("call revert exception"+n,ke.errors.CALL_EXCEPTION,{method:e.format(),data:St(r),errorArgs:o,errorName:a,errorSignature:u,reason:s})}encodeFunctionResult(e,r){return typeof e=="string"&&(e=this.getFunction(e)),St(this._abiCoder.encode(e.outputs,r||[]))}encodeFilterTopics(e,r){typeof e=="string"&&(e=this.getEvent(e)),r.length>e.inputs.length&&Ot.throwError("too many arguments for "+e.format(),ke.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:r});let i=[];e.anonymous||i.push(this.getEventTopic(e));let s=(n,o)=>n.type==="string"?no(o):n.type==="bytes"?ss(St(o)):(n.type==="bool"&&typeof o=="boolean"&&(o=o?"0x01":"0x00"),n.type.match(/^u?int/)&&(o=Nt.from(o).toHexString()),n.type==="address"&&this._abiCoder.encode(["address"],[o]),Dl(St(o),32));for(r.forEach((n,o)=>{let a=e.inputs[o];if(!a.indexed){n!=null&&Ot.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+a.name,n);return}n==null?i.push(null):a.baseType==="array"||a.baseType==="tuple"?Ot.throwArgumentError("filtering with tuples or arrays not supported","contract."+a.name,n):Array.isArray(n)?i.push(n.map(u=>s(a,u))):i.push(s(a,n));});i.length&&i[i.length-1]===null;)i.pop();return i}encodeEventLog(e,r){typeof e=="string"&&(e=this.getEvent(e));let i=[],s=[],n=[];return e.anonymous||i.push(this.getEventTopic(e)),r.length!==e.inputs.length&&Ot.throwArgumentError("event arguments/values mismatch","values",r),e.inputs.forEach((o,a)=>{let u=r[a];if(o.indexed)if(o.type==="string")i.push(no(u));else if(o.type==="bytes")i.push(ss(u));else {if(o.baseType==="tuple"||o.baseType==="array")throw new Error("not implemented");i.push(this._abiCoder.encode([o.type],[u]));}else s.push(o),n.push(u);}),{data:this._abiCoder.encode(s,n),topics:i}}decodeEventLog(e,r,i){if(typeof e=="string"&&(e=this.getEvent(e)),i!=null&&!e.anonymous){let d=this.getEventTopic(e);(!hr(i[0],32)||i[0].toLowerCase()!==d)&&Ot.throwError("fragment/topic mismatch",ke.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:d,value:i[0]}),i=i.slice(1);}let s=[],n=[],o=[];e.inputs.forEach((d,f)=>{d.indexed?d.type==="string"||d.type==="bytes"||d.baseType==="tuple"||d.baseType==="array"?(s.push(dr.fromObject({type:"bytes32",name:d.name})),o.push(!0)):(s.push(d),o.push(!1)):(n.push(d),o.push(!1));});let a=i!=null?this._abiCoder.decode(s,bi(i)):null,u=this._abiCoder.decode(n,r,!0),l=[],h=0,c=0;e.inputs.forEach((d,f)=>{if(d.indexed)if(a==null)l[f]=new Ra({_isIndexed:!0,hash:null});else if(o[f])l[f]=new Ra({_isIndexed:!0,hash:a[c++]});else try{l[f]=a[c++];}catch(m){l[f]=m;}else try{l[f]=u[h++];}catch(m){l[f]=m;}if(d.name&&l[d.name]==null){let m=l[f];m instanceof Error?Object.defineProperty(l,d.name,{enumerable:!0,get:()=>{throw ob(`property ${JSON.stringify(d.name)}`,m)}}):l[d.name]=m;}});for(let d=0;d<l.length;d++){let f=l[d];f instanceof Error&&Object.defineProperty(l,d,{enumerable:!0,get:()=>{throw ob(`index ${d}`,f)}});}return Object.freeze(l)}parseTransaction(e){let r=this.getFunction(e.data.substring(0,10).toLowerCase());return r?new zl({args:this._abiCoder.decode(r.inputs,"0x"+e.data.substring(10)),functionFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r),value:Nt.from(e.value||"0")}):null}parseLog(e){let r=this.getEvent(e.topics[0]);return !r||r.anonymous?null:new $l({eventFragment:r,name:r.name,signature:r.format(),topic:this.getEventTopic(r),args:this.decodeEventLog(r,e.data,e.topics)})}parseError(e){let r=St(e),i=this.getError(r.substring(0,10).toLowerCase());return i?new Z0({args:this._abiCoder.decode(i.inputs,"0x"+r.substring(10)),errorFragment:i,name:i.name,signature:i.format(),sighash:this.getSighash(i)}):null}static isInterface(e){return !!(e&&e._isInterface)}};var Cc=Kt(KE()),Zp=(t,e)=>e==null||e.length===0?void 0:new Na(t).encodeDeploy(e).slice(2),WE=t=>{try{let e=Cc.parse(t),r;return Cc.visit(e,{FunctionDefinition:s=>{s.isConstructor&&(r=s);}}),GE__default.default(r!=null,"Could not find constructor definition"),[{type:"constructor",inputs:r.parameters.map(({typeName:s},n)=>(GE__default.default(s!=null,`Missing a type definition for constructor parameter at position ${n}`),{type:YE(s)}))}]}catch(e){throw new Error(`Could not get an ABI from contract source: ${e}`)}},YE=t=>{switch(t.type){case"ElementaryTypeName":return t.name;case"ArrayTypeName":return `${YE(t.baseTypeName)}[]`;default:throw new Error(`Only primitive and array types are currently supported when constructing ABI from contract source, got ${t.type}`)}};var Xp=t=>{var e;return {deployments:(e=t==null?void 0:t.deployments)!=null?e:SI__default.default.resolve(process.cwd(),"deployments")}},JE=t=>{if(t==null)return ()=>!0;switch(typeof t){case"boolean":return ()=>t;case"string":return e=>e===t;case"function":return t;case"object":if(Array.isArray(t)){let e=new Set(t);return r=>e.has(r)}if(t instanceof RegExp)return e=>t.test(e);throw new TypeError(`Invalid verify configuration: expected string, string[], boolean, function or a RegExp, got ${t}`);default:throw new TypeError(`Invalid verify configuration: expected string, string[], boolean, function or a RegExp, got ${t}`)}};var XE=t=>{try{return fs.lstatSync(t).isDirectory()}catch(e){return !1}},QE=t=>{try{return fs.lstatSync(t).isFile()}catch(e){return !1}};var r2=async(t,e)=>{let r=Cd(e,t.networks),i=Xp(t.paths),s=bd(e),n=n2(e),o=s2(s),a=t.contracts.flatMap(l=>{var Z;let{address:h,network:c,contractName:d,deployment:f}=l;e.info(`Collecting information for contract ${d} on network ${c}`);let m=r[c];if(m==null)return e.info(`No network configured for contract ${d} on network ${c}`),[];let g=`${SI.basename(f,".json")}.json`,v=SI.resolve(i.deployments,c,g);if(!QE(v))return e.error(Jt.error`Deployment file ${v} does not exist or is not a file`),[];let x=ge(v),_=O0.safeParse(x);if(!_.success)return e.error(Jt.error`No network configured for contract ${d} on network ${c}`),[];let E=_.data,b=SI.basename(d,".sol"),w=E.metadata.sources[d];if(w==null)return e.error(Jt.error`Missing source for contract ${d} for network ${c} in ${g}`),[];let D=Ad(w.content),N=l.constructorArguments==null?void 0:typeof l.constructorArguments=="string"?l.constructorArguments:Zp(WE(w.content),l.constructorArguments),F=F0(E.metadata),U={apiUrl:m.apiUrl,apiKey:m.apiKey,address:h,contractName:`${d}:${b}`,constructorArguments:N,licenseType:D,compilerVersion:E.metadata.compiler.version,sourceCode:JSON.stringify(F),evmVersion:E.metadata.settings.evmVersion,optimizerRuns:(Z=E.metadata.settings.optimizer)==null?void 0:Z.runs};return s({Contract:d,Network:c,Address:U.address,License:U.licenseType,Arguments:l.constructorArguments?JSON.stringify(l.constructorArguments):void 0,Sources:Object.keys(E.metadata.sources),"Scan URL":U.apiUrl,"Scan API Key":U.apiKey?xd(U.apiKey):void 0}),[{networkName:c,networkConfig:m,submitProps:U}]});if(a.length===0)return e.warn("No contracts match the verification criteria, exiting"),[];if(t.dryRun)return e.debug("Dry run enabled, exiting"),[];let u=await Promise.all(n(a));return u.forEach(o),u},i2=async(t,e)=>{let r=JE(t.filter),i=Cd(e,t.networks),s=Xp(t.paths),n=bd(e),o=n2(e),a=s2(n);if(!XE(s.deployments))throw new Error(`Path ${s.deployments} is not a directory`);let u=new Set(fs.readdirSync(s.deployments)),l=Object.entries(i);e.debug("Verifying deployments for following networks:"),l.forEach(([d,f])=>{e.debug(` - ${d} (API URL ${f.apiUrl})`);});let h=l.flatMap(([d,f])=>{if(e.info(`Collecting deployments for ${d}...`),!u.has(d))return e.warn(`Could not find deployment for network ${d} in ${s.deployments}`),[];let m=SI.resolve(s.deployments,d);return fs.readdirSync(m).filter(v=>v.endsWith(".json")).flatMap(v=>{e.info(`Inspecting deployment file ${v} on network ${d}`);let x=SI.resolve(m,v),_=ge(x),E=O0.safeParse(_);if(!E.success)throw new Error(`Error parsing deployment file ${v} on network ${d}: ${E.error}`);let b=E.data,w=b.metadata.settings.compilationTarget;return Object.entries(w).flatMap(([D,N])=>{var y;if(!r(N,D,d))return e.debug(`Not verifying ${N} in ${v} on network ${d}`),[];let U=b.metadata.sources[D];if(U==null)return e.error(Jt.error`Could not find source for ${N} (${D})`),[];let Z=Ad(U.content),re=Zp(b.abi,b.args),ae=F0(b.metadata),k={apiUrl:f.apiUrl,apiKey:f.apiKey,address:b.address,contractName:`${D}:${N}`,constructorArguments:re,licenseType:Z,compilerVersion:b.metadata.compiler.version,sourceCode:JSON.stringify(ae),evmVersion:b.metadata.settings.evmVersion,optimizerRuns:(y=b.metadata.settings.optimizer)==null?void 0:y.runs};return n({Contract:N,Network:d,Address:b.address,License:k.licenseType,Arguments:JSON.stringify(b.args),Sources:Object.keys(b.metadata.sources),"Scan URL":k.apiUrl,"Scan API Key":k.apiKey?xd(k.apiKey):void 0}),{submitProps:k,networkName:d,networkConfig:f}})})});if(h.length===0)return e.warn("No contracts match the verification criteria, exiting"),[];if(t.dryRun)return e.debug("Dry run enabled, exiting"),[];let c=await Promise.all(o(h));return c.forEach(a),c},n2=t=>e=>e.map(async(r,i)=>{let{submitProps:s}=r,n=Jt.palette[i%Jt.palette.length],o=`[${i+1}/${e.length}]`,a=Wa.default.bold(s.contractName),u=Wa.default.bold(r.networkName);t.info(n`Verifying contract ${a} for network ${u} ${o}`);try{let l=Tx(s,t);l.on("poll",c=>{t.info(n`Polling for verification status of ${a} for network ${u} (GUID ${c}) ${o}`);}),l.on("retry",(c,d)=>{t.verbose(`Received an error: ${c}`),t.info(n`Retrying failed verification attempt of ${a} for network ${u} (attempt ${d+1}) ${o}`);});let h=await l.verify();return {artifact:r,result:h}}catch(l){return t.error(Jt.error`Problem verifying contract ${a} for network ${u} ${o}: ${l} `),{artifact:r,error:l}}}),s2=t=>({artifact:e,response:r,error:i})=>{let s=Wa.default.bold(e.submitProps.contractName),n=Wa.default.bold(e.networkName),o=e.networkConfig.browserUrl?B1(e.networkConfig.browserUrl,e.submitProps.address):void 0;t({Contract:s,Network:n,Result:i==null,"Was verified":r==null?void 0:r.alreadyVerified,"Contract URL":o,Error:i?Jt.error(i):void 0});};var Os=Kt(f3(),1);Kt(kD(),1);var qo=Kt(Ko(),1);Kt(f4(),1);var p4=(t=>(t.error="error",t.warn="warn",t.info="info",t.http="http",t.verbose="verbose",t.debug="debug",t.silly="silly",t))(p4||{});Ie.nativeEnum(p4);var TK="info";var y1=(t=TK,e=Os.format.cli())=>(0, Os.createLogger)({level:t,format:e,transports:[new Os.transports.Console]});(0, Os.format)((t,{label:e})=>({...t,message:`${e?`[${e}] `:""}${t.message}`}));({TRUE:qo.default.rgb(0,153,0),FALSE:qo.default.rgb(255,0,0),NOT_APPLICABLE:qo.default.rgb(255,128,0),DEFAULT_KEY:qo.default.rgb(255,255,255),DEFAULT_VALUE:qo.default.rgb(167,125,255)});var m4="1.1.30";var g4=new Pn("-l,--log-level <level>","Log level").choices(["error","warn","info","http","verbose","debug","silly"]).default("info"),_4=new Pn("-d,--deployments <path>","Path to the deployments folder"),y4=new Pn("--dry-run","Do not verify anything, just output the verifications that would be performed"),v4=new Pn("-n,--network <network name>","Network to verify").makeOptionMandatory(),x4=new Pn("-u,--api-url <url>","Scan API URL (fully qualified, with protocol and path)"),b4=new Pn("-k,--api-key <key>","Scan API Key"),wK=new Mu("non-target").description("Verifies a contract that does not have its own deployment file, i.e. has not been a target of a deployment").addOption(g4).addOption(y4).addOption(_4).addOption(v4).addOption(x4).addOption(b4).requiredOption("--address <address>","Contract address to verify").requiredOption("--name <contract name>","Fully qualified contract name to verify, e.g. contracts/MyToken.sol").requiredOption("--deployment <deployment file name>","Deployment file name, e.g. MyOtherToken.json").option("--arguments <constructor arguments>",'JSON encoded array of constructor arguments, e.g. [1234, "0x0"]',t=>{if(t.startsWith("0x"))return t.slice(2);try{let e=JSON.parse(t);if(!Array.isArray(e))throw new Error(`Constructor arguments must be an array, got ${e}`);return e}catch(e){throw new I1(`Malformed constructor arguments specified: ${e}`)}}).action(async t=>{let e=y1(t.logLevel),r={dryRun:t.dryRun,paths:{deployments:t.deployments},networks:{[t.network]:{apiUrl:t.apiUrl,apiKey:t.apiKey}},contracts:[{network:t.network,address:t.address,contractName:t.name,deployment:t.deployment,constructorArguments:t.arguments}]};try{await r2(r,e);}catch(i){e.error(Jt.error`The verification script exited with an error: ${i}`),process.exit(1);}}),DK=new Mu("target").description("Verifies contracts that have been a part of a deployment, i.e. have their own deployment files").addOption(g4).addOption(y4).addOption(_4).addOption(v4).addOption(x4).addOption(b4).option("-c,--contracts <contract names>","Comma-separated list of case-sensitive contract names to verify",t=>t!=null&&t.trim()?t.split(",").map(e=>e.trim()):void 0).action(async t=>{let e=y1(t.logLevel),r={dryRun:t.dryRun,paths:{deployments:t.deployments},networks:{[t.network]:{apiUrl:t.apiUrl,apiKey:t.apiKey}},filter:t.contracts};try{await i2(r,e);}catch(i){e.error(Jt.error`The verification script exited with an error: ${i}`),process.exit(1);}});new Mu("@layerzerolabs/verify-contract").version(m4).description("Verify a set of contracts based on hardhat-deploy outputs").addCommand(wK).addCommand(DK,{isDefault:!0}).parseAsync();
474
474
  /*! Bundled license information:
475
475
 
476
476
  js-sha3/src/sha3.js: