@freik/pedroviz 0.2.0 → 0.2.2

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/entry.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env bun
2
- "use strict";var zy=Object.create;var Uu=Object.defineProperty;var Xy=Object.getOwnPropertyDescriptor;var Jy=Object.getOwnPropertyNames;var Qy=Object.getPrototypeOf,Zy=Object.prototype.hasOwnProperty;var _=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var $y=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Jy(t))!Zy.call(e,o)&&o!==r&&Uu(e,o,{get:()=>t[o],enumerable:!(n=Xy(t,o))||n.enumerable});return e};var Mt=(e,t,r)=>(r=e!=null?zy(Qy(e)):{},$y(t||!e||!e.__esModule?Uu(r,"default",{value:e,enumerable:!0}):r,e));var nm=_((KW,rm)=>{var nC=typeof global=="object"&&global&&global.Object===Object&&global;rm.exports=nC});var im=_((WW,om)=>{var oC=nm(),iC=typeof self=="object"&&self&&self.Object===Object&&self,aC=oC||iC||Function("return this")();om.exports=aC});var Ca=_((VW,am)=>{var sC=im(),cC=sC.Symbol;am.exports=cC});var cm=_((qW,sm)=>{function uC(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}sm.exports=uC});var lm=_((YW,um)=>{var lC=Array.isArray;um.exports=lC});var hm=_((zW,dm)=>{var fm=Ca(),pm=Object.prototype,fC=pm.hasOwnProperty,pC=pm.toString,wo=fm?fm.toStringTag:void 0;function dC(e){var t=fC.call(e,wo),r=e[wo];try{e[wo]=void 0;var n=!0}catch{}var o=pC.call(e);return n&&(t?e[wo]=r:delete e[wo]),o}dm.exports=dC});var gm=_((XW,mm)=>{var hC=Object.prototype,mC=hC.toString;function gC(e){return mC.call(e)}mm.exports=gC});var Tm=_((JW,Sm)=>{var Em=Ca(),EC=hm(),yC=gm(),SC="[object Null]",TC="[object Undefined]",ym=Em?Em.toStringTag:void 0;function RC(e){return e==null?e===void 0?TC:SC:ym&&ym in Object(e)?EC(e):yC(e)}Sm.exports=RC});var xm=_((QW,Rm)=>{function xC(e){return e!=null&&typeof e=="object"}Rm.exports=xC});var Lm=_((ZW,Om)=>{var OC=Tm(),LC=xm(),AC="[object Symbol]";function UC(e){return typeof e=="symbol"||LC(e)&&OC(e)==AC}Om.exports=UC});var Im=_(($W,bm)=>{var Am=Ca(),NC=cm(),CC=lm(),bC=Lm(),IC=1/0,Um=Am?Am.prototype:void 0,Nm=Um?Um.toString:void 0;function Cm(e){if(typeof e=="string")return e;if(CC(e))return NC(e,Cm)+"";if(bC(e))return Nm?Nm.call(e):"";var t=e+"";return t=="0"&&1/e==-IC?"-0":t}bm.exports=Cm});var _o=_((eV,Pm)=>{var PC=Im();function vC(e){return e==null?"":PC(e)}Pm.exports=vC});var Mm=_((tV,vm)=>{function MC(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}vm.exports=MC});var wm=_((rV,km)=>{var kC=Mm();function wC(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:kC(e,t,r)}km.exports=wC});var Ac=_((nV,_m)=>{var _C="\\ud800-\\udfff",BC="\\u0300-\\u036f",FC="\\ufe20-\\ufe2f",DC="\\u20d0-\\u20ff",jC=BC+FC+DC,GC="\\ufe0e\\ufe0f",HC="\\u200d",KC=RegExp("["+HC+_C+jC+GC+"]");function WC(e){return KC.test(e)}_m.exports=WC});var Fm=_((oV,Bm)=>{function VC(e){return e.split("")}Bm.exports=VC});var qm=_((iV,Vm)=>{var Dm="\\ud800-\\udfff",qC="\\u0300-\\u036f",YC="\\ufe20-\\ufe2f",zC="\\u20d0-\\u20ff",XC=qC+YC+zC,JC="\\ufe0e\\ufe0f",QC="["+Dm+"]",Uc="["+XC+"]",Nc="\\ud83c[\\udffb-\\udfff]",ZC="(?:"+Uc+"|"+Nc+")",jm="[^"+Dm+"]",Gm="(?:\\ud83c[\\udde6-\\uddff]){2}",Hm="[\\ud800-\\udbff][\\udc00-\\udfff]",$C="\\u200d",Km=ZC+"?",Wm="["+JC+"]?",eb="(?:"+$C+"(?:"+[jm,Gm,Hm].join("|")+")"+Wm+Km+")*",tb=Wm+Km+eb,rb="(?:"+[jm+Uc+"?",Uc,Gm,Hm,QC].join("|")+")",nb=RegExp(Nc+"(?="+Nc+")|"+rb+tb,"g");function ob(e){return e.match(nb)||[]}Vm.exports=ob});var zm=_((aV,Ym)=>{var ib=Fm(),ab=Ac(),sb=qm();function cb(e){return ab(e)?sb(e):ib(e)}Ym.exports=cb});var Jm=_((sV,Xm)=>{var ub=wm(),lb=Ac(),fb=zm(),pb=_o();function db(e){return function(t){t=pb(t);var r=lb(t)?fb(t):void 0,n=r?r[0]:t.charAt(0),o=r?ub(r,1).join(""):t.slice(1);return n[e]()+o}}Xm.exports=db});var Zm=_((cV,Qm)=>{var hb=Jm(),mb=hb("toUpperCase");Qm.exports=mb});var eg=_((uV,$m)=>{var gb=_o(),Eb=Zm();function yb(e){return Eb(gb(e).toLowerCase())}$m.exports=yb});var rg=_((lV,tg)=>{function Sb(e,t,r,n){var o=-1,i=e==null?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}tg.exports=Sb});var og=_((fV,ng)=>{function Tb(e){return function(t){return e?.[t]}}ng.exports=Tb});var ag=_((pV,ig)=>{var Rb=og(),xb={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Ob=Rb(xb);ig.exports=Ob});var cg=_((dV,sg)=>{var Lb=ag(),Ab=_o(),Ub=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nb="\\u0300-\\u036f",Cb="\\ufe20-\\ufe2f",bb="\\u20d0-\\u20ff",Ib=Nb+Cb+bb,Pb="["+Ib+"]",vb=RegExp(Pb,"g");function Mb(e){return e=Ab(e),e&&e.replace(Ub,Lb).replace(vb,"")}sg.exports=Mb});var lg=_((hV,ug)=>{var kb=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function wb(e){return e.match(kb)||[]}ug.exports=wb});var pg=_((mV,fg)=>{var _b=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Bb(e){return _b.test(e)}fg.exports=Bb});var Pg=_((gV,Ig)=>{var Eg="\\ud800-\\udfff",Fb="\\u0300-\\u036f",Db="\\ufe20-\\ufe2f",jb="\\u20d0-\\u20ff",Gb=Fb+Db+jb,yg="\\u2700-\\u27bf",Sg="a-z\\xdf-\\xf6\\xf8-\\xff",Hb="\\xac\\xb1\\xd7\\xf7",Kb="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Wb="\\u2000-\\u206f",Vb=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Tg="A-Z\\xc0-\\xd6\\xd8-\\xde",qb="\\ufe0e\\ufe0f",Rg=Hb+Kb+Wb+Vb,xg="['\u2019]",dg="["+Rg+"]",Yb="["+Gb+"]",Og="\\d+",zb="["+yg+"]",Lg="["+Sg+"]",Ag="[^"+Eg+Rg+Og+yg+Sg+Tg+"]",Xb="\\ud83c[\\udffb-\\udfff]",Jb="(?:"+Yb+"|"+Xb+")",Qb="[^"+Eg+"]",Ug="(?:\\ud83c[\\udde6-\\uddff]){2}",Ng="[\\ud800-\\udbff][\\udc00-\\udfff]",Kn="["+Tg+"]",Zb="\\u200d",hg="(?:"+Lg+"|"+Ag+")",$b="(?:"+Kn+"|"+Ag+")",mg="(?:"+xg+"(?:d|ll|m|re|s|t|ve))?",gg="(?:"+xg+"(?:D|LL|M|RE|S|T|VE))?",Cg=Jb+"?",bg="["+qb+"]?",eI="(?:"+Zb+"(?:"+[Qb,Ug,Ng].join("|")+")"+bg+Cg+")*",tI="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rI="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",nI=bg+Cg+eI,oI="(?:"+[zb,Ug,Ng].join("|")+")"+nI,iI=RegExp([Kn+"?"+Lg+"+"+mg+"(?="+[dg,Kn,"$"].join("|")+")",$b+"+"+gg+"(?="+[dg,Kn+hg,"$"].join("|")+")",Kn+"?"+hg+"+"+mg,Kn+"+"+gg,rI,tI,Og,oI].join("|"),"g");function aI(e){return e.match(iI)||[]}Ig.exports=aI});var Mg=_((EV,vg)=>{var sI=lg(),cI=pg(),uI=_o(),lI=Pg();function fI(e,t,r){return e=uI(e),t=r?void 0:t,t===void 0?cI(e)?lI(e):sI(e):e.match(t)||[]}vg.exports=fI});var wg=_((yV,kg)=>{var pI=rg(),dI=cg(),hI=Mg(),mI="['\u2019]",gI=RegExp(mI,"g");function EI(e){return function(t){return pI(hI(dI(t).replace(gI,"")),e,"")}}kg.exports=EI});var Bg=_((SV,_g)=>{var yI=eg(),SI=wg(),TI=SI(function(e,t,r){return t=t.toLowerCase(),e+(r?yI(t):t)});_g.exports=TI});var Vy=Mt(require("node:path"),1),$a=Mt(require("node:process"),1);var ns=Symbol.for("freik.typetag");function A(e){return e===void 0}function I(e){return!A(e)}function oo(e){return e===null}function e1(e){return e==null}function t1(e){return!e1(e)}function r1(e,...t){return t.some(r=>r(e))}function ke(...e){return t=>r1(t,...e)}function n1(e,...t){return t.every(r=>r(e))}function st(e){return n1(e,o1,t1)}function o1(e){return typeof e=="object"}function or(e){return Array.isArray(e)}function k(e){return typeof e=="string"}function en(e){return typeof e=="number"&&!isNaN(e-0)}var $7=ke(k,en);function is(e){return typeof e=="boolean"}function i1(e){return e instanceof Date}function a1(e){return typeof e=="bigint"}function rr(e){return typeof e=="function"}function s1(e){return e instanceof RegExp}function Cu(e){return e instanceof Map}function c1(e){return e instanceof Set}function Zo(e,t){if(!or(e))return!1;for(let r of e)if(!t(r))return!1;return!0}function kt(e){return t=>Zo(t,e)}function u1(e,...t){return or(e)&&e.length===t.length&&t.every((r,n)=>r(e[n]))}function l1(...e){return t=>u1(t,...e)}function f1(e,t,r){if(!Cu(e))return!1;for(let[n,o]of e)if(!t(n)||!r(o))return!1;return!0}function $o(e,t){return r=>f1(r,e,t)}function p1(e,t){if(!st(e))return!1;for(let r of[...Object.keys(e),...Object.getOwnPropertySymbols(e)])if(!tt(e,r,t))return!1;return!0}function ei(e){return typeof e=="symbol"}function ne(e,t){return st(e)&&t in e}function ir(e,t,r){return ne(e,t)&&r(e[t])}function as(e,t){return r=>tt(r,e,t)}var tt=ir;function no(e,t){return tt(e,t,k)}function d1(e){return ne(e,Symbol.iterator)}function os(e){return e===null||k(e)||en(e)||is(e)||Zo(e,os)||st(e)&&Zo(Object.keys(e),ke(k,en))&&p1(e,os)}function bu(e,t,r,n){if(!st(t))return!1;let o=Object.keys(r).length,i=Object.keys(t),a=i.length;for(let s of i){if(!ne(t,s))continue;let c=t[s];if(A(c)||t[s]===null){delete t[s],a--;continue}if(tt(n,s,rr)){let u=n[s];if(!u(c))return!1;a--}else if(tt(r,s,rr)){let u=r[s];if(!u(c))return!1;o--,a--}}return o===0&&(a===0||!e)}function h1(e,t={}){return r=>bu(!1,r,e,t)}function oe(e,t={}){return r=>bu(!0,r,e,t)}function m1(e,t,r){if(!st(e))return!1;let n=Object.keys(e),o=n.length;for(let i of n){if(!ne(e,i))continue;let a=e[i];if(!t(i)||!r(a))return!1;o--}return o===0}function Iu(e,t){return r=>m1(r,e,t)}var Pu=Function("try {return this===global;}catch(e){ return false;}"),vu=Function("try {return this===window;}catch(e){ return false;}");function ss(){return typeof globalThis<"u"}function g1(e){return no(e,"@dataType")&&tt(e,"@dataValue",os)}function E1(e,t){return{"@dataType":e,"@dataValue":t}}function y1(e){return[e["@dataType"],e["@dataValue"]]}var cs=Symbol.for("freik.Set"),us=Symbol.for("freik.Map"),ls=Symbol.for("freik.Symbol"),fs=Symbol.for("freik.RegExp"),ps=Symbol.for("freik.Date"),ds=Symbol.for("freik.BigInt");function S1(e){return[...e.entries()]}function T1(e){return Zo(e,l1(I,I))?new Map(e):void 0}function R1(e){return[...e]}function x1(e){return or(e)?new Set(e):void 0}function O1(e){let t=Symbol.keyFor(e);if(t===void 0)throw Error("Unable to get a key for a symbol for pickling");return t}function L1(e){return k(e)?Symbol.for(e):void 0}function A1(e){return{source:e.source,flags:e.flags}}function U1(e){if(no(e,"source")&&no(e,"flags"))return new RegExp(e.source,e.flags)}function N1(e){return e.toJSON()}function C1(e){try{return k(e)?new Date(e):void 0}catch{return}}function b1(e){return e.toString()}function I1(e){try{return k(e)?BigInt(e):void 0}catch{return}}var P1=[[Cu,us],[c1,cs],[ei,ls],[s1,fs],[i1,ps],[a1,ds]],v1=new Map([[us,S1],[cs,R1],[ls,O1],[fs,A1],[ps,N1],[ds,b1]]),M1=new Map([[us,T1],[cs,x1],[ls,L1],[fs,U1],[ps,C1],[ds,I1]]),k1;(e=>{e[e.Success=0]="Success",e[e.Already=1]="Already",e[e.Fail=2]="Fail",e[e.DetectionFailure=3]="DetectionFailure"})(k1||={});var re=ns;function rs(e){return ne(e,re)?tt(e,re,h1({to:$o(ke(ei,k),rr),from:$o(ke(ei,k),rr)}))?1:2:(e[re]={to:v1,from:M1},0)}function w1(){return ss()?rs(globalThis):vu()?rs(window):Pu()?rs(global):3}switch(w1()){case 2:throw Error(`Invalid <global>[${String(re)}] object`);case 3:throw Error("Unable to determine environment for pickling");default:break}function _1(){if(ss()&&st(globalThis)&&ne(globalThis,re)&&ne(globalThis[re],"to"))return globalThis[re].to;if(Pu()&&st(global)&&ne(global,re)&&ne(global[re],"to"))return global[re].to;if(vu()&&st(window)&&ne(window,re)&&ne(window[re],"to"))return window[re].to;throw Error("Pickling not registered!")}function Nu(e){return _1().get(e)}function B1(){if(ss()&&st(globalThis)&&ne(globalThis,re)&&ne(globalThis[re],"from"))return globalThis[re].from;if(st(process)&&!ne(process,"browser")&&ne(global,re)&&ne(global[re],"from"))return global[re].from;if(!st(process)&&!ne(process,"browser")&&ne(window,re)&&ne(window[re],"from"))return window[re].from;throw Error("Unpickling not registered!")}function F1(e){return B1().get(e)}function D1(e){if(tt(e,ns,ei)){let t=e[ns],r=Nu(t);if(r)return[t,r];if(tt(e,"toJSON",rr))return[t,n=>tt(n,"toJSON",rr)?n.toJSON():"ERROR"]}for(let[t,r]of P1)if(t(e)){let n=Nu(r);if(n)return[r,n]}}function j1(e){return F1(Symbol.for(e))}function G1(e,t){let r=this[e],n=D1(r);if(n){let[o,i]=n,a=Symbol.keyFor(o);return a?E1(a,i(r)):t}else if(d1(r))return[...r];return t}function H1(e,t){if(g1(t)){let[r,n]=y1(t),o=j1(r);if(o){let i=o(n);if(i!==void 0)return i}}return t}function hs(e){return JSON.stringify(e,G1)}function K1(e){return JSON.parse(e,H1)}function W1(e){return K1(e)}function Mu(e,t){let r=W1(e);return t(r)?r:void 0}var nr=oe({errors:rr,[Symbol.toPrimitive]:rr});function io(e,t){let r=[];return r.push(...k(e)?[e]:nr(e)?e.errors():e),I(t)&&r.push(...k(t)?[t]:nr(t)?t.errors():t),{errors:()=>r,[Symbol.toPrimitive]:n=>n==="string"?r.join(`
3
- `):null}}var ft=Mt(require("node:fs"),1),Ge=Mt(require("node:path"),1);var ao=Symbol.for("freik.typetag");function Fu(e){return e===void 0}function ku(e){return!Fu(e)}function ri(e){return e==null}function ni(e){return!ri(e)}function V1(e,...t){return t.some(r=>r(e))}function gs(...e){return t=>V1(t,...e)}function q1(e,...t){return t.every(r=>r(e))}function ar(e){return q1(e,Y1,ni)}function Y1(e){return typeof e=="object"}function Es(e){return Array.isArray(e)}function sr(e){return typeof e=="string"}function z1(e){return typeof e=="number"&&!isNaN(e-0)}var tP=gs(sr,z1);function so(e){return typeof e=="function"}function X1(e){return e instanceof Map}function oi(e,t){if(!Es(e))return!1;for(let r of e)if(!t(r))return!1;return!0}function Du(e){return t=>oi(t,e)}function J1(e,...t){return Es(e)&&e.length===t.length&&t.every((r,n)=>r(e[n]))}function ys(...e){return t=>J1(t,...e)}function Q1(e,t,r){if(!X1(e))return!1;for(let[n,o]of e)if(!t(n)||!r(o))return!1;return!0}function wu(e,t){return r=>Q1(r,e,t)}function _u(e){return typeof e=="symbol"}function Ee(e,t){return ar(e)&&t in e}function Z1(e,t,r){return Ee(e,t)&&r(e[t])}var ti=Z1;function Bu(e,t){return ti(e,t,sr)}function ju(e,t){return Ee(e,ao)&&e[ao]===t}function $1(e,t,r,n){if(!ar(t))return!1;let o=Object.keys(r).length,i=Object.keys(t),a=i.length;for(let s of i){if(!Ee(t,s))continue;let c=t[s];if(Fu(c)||t[s]===null){delete t[s],a--;continue}if(ti(n,s,so)){let u=n[s];if(!u(c))return!1;a--}else if(ti(r,s,so)){let u=r[s];if(!u(c))return!1;o--,a--}}return o===0&&(a===0||!e)}function eS(e,t={}){return r=>$1(!1,r,e,t)}var Gu=Function("try {return this===global;}catch(e){ return false;}"),Hu=Function("try {return this===window;}catch(e){ return false;}");function Ss(){return typeof globalThis<"u"}var Ku=Symbol.for("freik.Set"),Wu=Symbol.for("freik.Map"),Vu=Symbol.for("freik.Symbol"),qu=Symbol.for("freik.RegExp"),Yu=Symbol.for("freik.Date"),zu=Symbol.for("freik.BigInt");function tS(e){return[...e.entries()]}function rS(e){return oi(e,ys(ku,ku))?new Map(e):void 0}function nS(e){return[...e]}function oS(e){return Es(e)?new Set(e):void 0}function iS(e){let t=Symbol.keyFor(e);if(t===void 0)throw Error("Unable to get a key for a symbol for pickling");return t}function aS(e){return sr(e)?Symbol.for(e):void 0}function sS(e){return{source:e.source,flags:e.flags}}function cS(e){if(Bu(e,"source")&&Bu(e,"flags"))return new RegExp(e.source,e.flags)}function uS(e){return e.toJSON()}function lS(e){try{return sr(e)?new Date(e):void 0}catch{return}}function fS(e){return e.toString()}function pS(e){try{return sr(e)?BigInt(e):void 0}catch{return}}var dS=new Map([[Wu,tS],[Ku,nS],[Vu,iS],[qu,sS],[Yu,uS],[zu,fS]]),hS=new Map([[Wu,rS],[Ku,oS],[Vu,aS],[qu,cS],[Yu,lS],[zu,pS]]),mS;(e=>{e[e.Success=0]="Success",e[e.Already=1]="Already",e[e.Fail=2]="Fail",e[e.DetectionFailure=3]="DetectionFailure"})(mS||={});var ie=ao;function ms(e){return Ee(e,ie)?ti(e,ie,eS({to:wu(gs(_u,sr),so),from:wu(gs(_u,sr),so)}))?1:2:(e[ie]={to:dS,from:hS},0)}function gS(){return Ss()?ms(globalThis):Hu()?ms(window):Gu()?ms(global):3}switch(gS()){case 2:throw Error(`Invalid <global>[${String(ie)}] object`);case 3:throw Error("Unable to determine environment for pickling");default:break}function ES(){if(Ss()&&ar(globalThis)&&Ee(globalThis,ie)&&Ee(globalThis[ie],"to"))return globalThis[ie].to;if(Gu()&&ar(global)&&Ee(global,ie)&&Ee(global[ie],"to"))return global[ie].to;if(Hu()&&ar(window)&&Ee(window,ie)&&Ee(window[ie],"to"))return window[ie].to;throw Error("Pickling not registered!")}function yS(e,t){ES().set(e,t)}function SS(){if(Ss()&&ar(globalThis)&&Ee(globalThis,ie)&&Ee(globalThis[ie],"from"))return globalThis[ie].from;if(ar(process)&&!Ee(process,"browser")&&Ee(global,ie)&&Ee(global[ie],"from"))return global[ie].from;if(!ar(process)&&!Ee(process,"browser")&&Ee(window,ie)&&Ee(window[ie],"from"))return window[ie].from;throw Error("Unpickling not registered!")}function TS(e,t){SS().set(e,t)}function Xu(e,t,r){r&&yS(e,r),TS(e,t)}var RS=Symbol.for("freik.typetag");function el(e){return e===void 0}function Ju(e){return!el(e)}function xS(e){return e==null}function OS(e){return!xS(e)}function LS(e,...t){return t.some(r=>r(e))}function Rs(...e){return t=>LS(t,...e)}function AS(e,...t){return t.every(r=>r(e))}function xs(e){return AS(e,US,OS)}function US(e){return typeof e=="object"}function ci(e){return Array.isArray(e)}function cr(e){return typeof e=="string"}function tl(e){return typeof e=="number"&&!isNaN(e-0)}var nP=Rs(cr,tl);function ai(e){return typeof e=="function"}function rl(e){return e instanceof Map}function NS(e,t){if(!ci(e))return!1;for(let r of e)if(!t(r))return!1;return!0}function CS(e,...t){return ci(e)&&e.length===t.length&&t.every((r,n)=>r(e[n]))}function bS(...e){return t=>CS(t,...e)}function IS(e,t,r){if(!rl(e))return!1;for(let[n,o]of e)if(!t(n)||!r(o))return!1;return!0}function Qu(e,t){return r=>IS(r,e,t)}function Zu(e){return typeof e=="symbol"}function Os(e,t){return xs(e)&&t in e}function PS(e,t,r){return Os(e,t)&&r(e[t])}var si=PS;function $u(e,t){return si(e,t,cr)}function vS(e,t,r,n){if(!xs(t))return!1;let o=Object.keys(r).length,i=Object.keys(t),a=i.length;for(let s of i){if(!Os(t,s))continue;let c=t[s];if(el(c)||t[s]===null){delete t[s],a--;continue}if(si(n,s,ai)){let u=n[s];if(!u(c))return!1;a--}else if(si(r,s,ai)){let u=r[s];if(!u(c))return!1;o--,a--}}return o===0&&(a===0||!e)}function MS(e,t={}){return r=>vS(!1,r,e,t)}var kS=Function("try {return this===global;}catch(e){ return false;}"),wS=Function("try {return this===window;}catch(e){ return false;}");function _S(){return typeof globalThis<"u"}var nl=Symbol.for("freik.Set"),ol=Symbol.for("freik.Map"),il=Symbol.for("freik.Symbol"),al=Symbol.for("freik.RegExp"),sl=Symbol.for("freik.Date"),cl=Symbol.for("freik.BigInt");function BS(e){return[...e.entries()]}function FS(e){return NS(e,bS(Ju,Ju))?new Map(e):void 0}function DS(e){return[...e]}function jS(e){return ci(e)?new Set(e):void 0}function GS(e){let t=Symbol.keyFor(e);if(t===void 0)throw Error("Unable to get a key for a symbol for pickling");return t}function HS(e){return cr(e)?Symbol.for(e):void 0}function KS(e){return{source:e.source,flags:e.flags}}function WS(e){if($u(e,"source")&&$u(e,"flags"))return new RegExp(e.source,e.flags)}function VS(e){return e.toJSON()}function qS(e){try{return cr(e)?new Date(e):void 0}catch{return}}function YS(e){return e.toString()}function zS(e){try{return cr(e)?BigInt(e):void 0}catch{return}}var XS=new Map([[ol,BS],[nl,DS],[il,GS],[al,KS],[sl,VS],[cl,YS]]),JS=new Map([[ol,FS],[nl,jS],[il,HS],[al,WS],[sl,qS],[cl,zS]]),QS;(e=>{e[e.Success=0]="Success",e[e.Already=1]="Already",e[e.Fail=2]="Fail",e[e.DetectionFailure=3]="DetectionFailure"})(QS||={});var ii=RS;function Ts(e){return Os(e,ii)?si(e,ii,MS({to:Qu(Rs(Zu,cr),ai),from:Qu(Rs(Zu,cr),ai)}))?1:2:(e[ii]={to:XS,from:JS},0)}function ZS(){return _S()?Ts(globalThis):wS()?Ts(window):kS()?Ts(global):3}switch(ZS()){case 2:throw Error(`Invalid <global>[${String(ii)}] object`);case 3:throw Error("Unable to determine environment for pickling");default:break}function ui(e,t){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}var Ls=Symbol.for("freik.MultiMapTypeTag");function wt(e){let t=e?new Map([...e].map(([d,g])=>[d,new Set(g)])):new Map,r=()=>t.clear(),n=d=>t.delete(d),o=(d,g)=>{let m=c(d);if(m!==void 0){let x=m.delete(g);return m.size===0&&t.delete(d),x}return!1},i=()=>t.keys(),a=(d,g)=>t.forEach((m,x)=>d(m,x,S),g),s=async(d,g)=>{for(let[m,x]of t)g?await d.apply(g,[x,m,S]):await d(x,m,S)},c=d=>t.get(d),u=d=>t.has(d);function l(d,g){let m=t.get(d);return m===void 0?t.set(d,new Set([g])):m.add(g),S}function f(d,g){let m=t.get(d);if(m===void 0)t.set(d,new Set(g));else for(let x of g)m.add(x);return S}function*p(){for(let[d,g]of t)yield[d,g.values()]}let h=()=>t.size;function E(d){if(h()!==d.size())return!1;for(let[g,m]of t){let x=d.get(g);if(!x||!ui(new Set(m),new Set(x)))return!1}return!0}function y(){return[...S]}let S={clear:r,delete:n,remove:o,keys:i,forEach:a,forEachAwaitable:s,get:c,has:u,set:l,add:f,size:h,[Symbol.iterator]:p,[ao]:Ls,toJSON:y,valueEqual:E};return S}function $S(e){if(oi(e,ys(ni,Du(ni))))return wt(e)}Xu(Ls,$S);function eT(e){return ju(e,Ls)}function tT(e,t,r){if(!eT(e))return!1;for(let[n,o]of e){if(!t(n))return!1;for(let i of o)if(!r(i))return!1}return!0}function As(e,t){return r=>tT(r,e,t)}var tn=Object.freeze({Line:"line",Curve:"curve"}),he=Object.freeze({Reversed:"reversed",Tangent:"tangent",Constant:"constant",Linear:"linear",Point:"point",Piecewise:"piecewise"});var Us={name:"",fullName:"",imports:[],container:{fileName:""},children:{},values:[],poses:[],beziers:[],pathChains:[],pathChainHelpers:[]},ul=k,rT=k,nT=oe({int:en}),oT=oe({double:en}),Ns=ke(nT,oT),Br=ke(rT,Ns),fi=oe({radians:Br}),iT=oe({name:k,value:ke(Br,fi)}),li=ke(Br,fi),aT=k,ll=oe({x:Br,y:Br},{heading:li}),sT=oe({name:k,pose:ll}),fl=ke(aT,ll);function cT(e){return e===tn.Line||e===tn.Curve}var uT=k,pl=oe({type:cT,points:kt(fl)}),lT=oe({name:k,points:pl}),fT=ke(uT,pl);function pT(e){return e===he.Tangent}function dT(e){return e===he.Constant}function hT(e){return e===he.Linear}function mT(e){return e===he.Point}function gT(e){return e===he.Reversed}function ET(e){return e===he.Piecewise}var dl=oe({type:pT}),hl=oe({type:dT,heading:li}),ml=oe({type:hT,start:li,end:li}),gl=oe({type:mT,point:fl}),El=ke(dl,hl,ml,gl),yT=oe({start:Br,end:Br}),yl=oe({type:gT,facing:El}),ST=ke(El,yl),TT=oe({timing:yT,heading:ST}),RT=oe({type:ET,pieces:kt(TT)}),xT=e=>ke(dl,hl,ml,gl,RT,yl)(e),OT=oe({name:k,paths:kt(fT),heading:xT}),LT=oe({name:k,staticType:k}),AT=ke(as("fileName",k),as("className",k));function Cs(e){let t=no(e,"name");return t=t&&ir(e,"container",AT),t=t&&ir(e,"values",kt(iT)),t=t&&ir(e,"poses",kt(sT)),t=t&&ir(e,"beziers",kt(lT)),t=t&&ir(e,"pathChains",kt(OT)),t=t&&ir(e,"pathChainHelpers",kt(LT)),t=t&&tt(e,"children",Iu(k,Cs)),t}function rn(e,t){return`${e}*${t}`}function Tl(e){return e.split("*").pop()||""}function bs(e){return k(e)?e.split("*").length===2:!1}function Is(e,t){return`${e};${t}`}function Rl(e){return e.split(";").pop()||""}function Sl(e){if(!k(e))return!1;let t=e.split(";");return t.length===2&&bs(t[0])}var xl=oe({HasFieldImage:is,TeamPaths:As(k,bs),PathClasses:As(bs,Sl),ParsedClasses:$o(Sl,Cs)}),ov=Object.freeze({HasFieldImage:!1,TeamPaths:wt(),PathClasses:wt(),ParsedClasses:new Map});var Ol=Mt(require("node:path"),1),Ll=Mt(require("node:url"),1);var nn={},co=I(__dirname)?__dirname:Ol.default.dirname(Ll.default.fileURLToPath(nn.url));function Al(e){co=e}function on(){return co}console.log("global_dirname:",co);var sv=UT();function UT(){try{if(I(nn)&&I(nn.env)&&I(nn.dir)){let e=nn.env.NODE_ENV==="production"||nn.dir.includes("node_modules");return console.log("WE ARE HERE",e),e}}catch{}return console.log("Nah:WE ARE HERE:",co),process.env.NODE_ENV==="production"||co.endsWith("/dist")}var Ul=require("node:fs");async function Ps(e){try{return(await Ul.promises.stat(e)).isDirectory()}catch{return!1}}var _t=null,Nl=[];function Cl(e){Nl=e}async function NT(e){return await bT(e)?(_t=e,!0):!1}function vs(){if(oo(_t))throw new Error("Unable to find FtcRobotController/TeamCode home");return _t}async function CT(e,t=8){let r="",n=k(e)?[e]:e;for(let o of n){let i=t;for(;o!=r&&i>0;){if(await NT(o))return console.log("Found directory",o),o;r=o,o=Ge.default.dirname(o),i--}}return console.error("Unable to find any potential repositories:",e),null}async function bT(e){return await ft.promises.exists(Ge.default.join(e,"settings.gradle"))&&await ft.promises.exists(Ge.default.join(e,"build.gradle"))&&await ft.promises.exists(Ge.default.join(e,"FtcRobotController"))&&await Ps(Ge.default.join(e,"FtcRobotController"))}async function bl(){if(oo(_t)&&await CT([...Nl,process.cwd(),on()]),oo(_t))throw new Error("Unable to find repository root");let e=await kT(),t=wt();for(let r of e){let o=(await PT(_t,r)).map(i=>rn(r,i));t.add(r,o)}return t}var IT=/[^\/\\]*(Path|Pose)[^\/\\]*\.java$/;async function PT(e,t){let r=Ge.default.join(e,t,Ms,t.toLocaleLowerCase()),n=[],o=[r];for(;o.length>0;){let i=o.pop(),a=await ft.promises.readdir(i,{withFileTypes:!0});for(let s of a){let c=Ge.default.join(i,s.name);s.isDirectory()?o.push(c):await MT(s)&&n.push(Ge.default.relative(r,c))}}return n}var vT=[/^\s*import\s+com\.pedropathing\.follower\.Follower\s*;/,/^\s*import\s+com\.pedropathing\.geometry\.(Bezier[A-Za-z]+|Pose)\s*;/,/^\s*import\s+com\.pedropathing\.paths\.(HeadingInterpolator|PathChain)\s*;/,/^\s*import\s+com\.bylazar\.configurables\.annotations\.Configurable\s*;/];async function MT(e){return!e.isFile()||!IT.test(e.name)?!1:(await ft.promises.readFile(Ge.default.join(e.parentPath,e.name),"utf-8")).split(`
4
- `).filter(n=>{for(let o of vT)if(o.test(n.trim()))return!0;return!1}).length!==0}async function kT(){if(oo(_t))throw new Error("Unknonw repository location");return(await ft.promises.readdir(_t,{withFileTypes:!0})).filter(r=>wT(_t,r)).map(r=>r.name)}function wT(e,t){if(!t.isDirectory())return!1;let r=t.name;if(r[0]==="."||r==="FtcRobotController")return!1;let n=Ge.default.join(e,t.name,"build.gradle");if(!ft.default.existsSync(n))return!1;let o=Ge.default.join(e,t.name,Ms,t.name.toLocaleLowerCase());return!(!ft.default.existsSync(o)||!Ps(o))}function Il(e,t){return Ge.default.join(vs(),e,Ms,e.toLocaleLowerCase(),t)}var Ms=Ge.default.join("src","main","java","org","firstinspires","ftc");var _s=Symbol.for("freik.typetag");function wl(e){return e===void 0}function Pl(e){return!wl(e)}function di(e){return e==null}function hi(e){return!di(e)}function _T(e,...t){return t.some(r=>r(e))}function ws(...e){return t=>_T(t,...e)}function BT(e,...t){return t.every(r=>r(e))}function ur(e){return BT(e,FT,hi)}function FT(e){return typeof e=="object"}function Bs(e){return Array.isArray(e)}function lr(e){return typeof e=="string"}function DT(e){return typeof e=="number"&&!isNaN(e-0)}var gv=ws(lr,DT);function uo(e){return typeof e=="function"}function jT(e){return e instanceof Map}function mi(e,t){if(!Bs(e))return!1;for(let r of e)if(!t(r))return!1;return!0}function _l(e){return t=>mi(t,e)}function GT(e,...t){return Bs(e)&&e.length===t.length&&t.every((r,n)=>r(e[n]))}function Fs(...e){return t=>GT(t,...e)}function HT(e,t,r){if(!jT(e))return!1;for(let[n,o]of e)if(!t(n)||!r(o))return!1;return!0}function vl(e,t){return r=>HT(r,e,t)}function Ml(e){return typeof e=="symbol"}function Le(e,t){return ur(e)&&t in e}function KT(e,t,r){return Le(e,t)&&r(e[t])}var pi=KT;function kl(e,t){return pi(e,t,lr)}function WT(e,t,r,n){if(!ur(t))return!1;let o=Object.keys(r).length,i=Object.keys(t),a=i.length;for(let s of i){if(!Le(t,s))continue;let c=t[s];if(wl(c)||t[s]===null){delete t[s],a--;continue}if(pi(n,s,uo)){let u=n[s];if(!u(c))return!1;a--}else if(pi(r,s,uo)){let u=r[s];if(!u(c))return!1;o--,a--}}return o===0&&(a===0||!e)}function VT(e,t={}){return r=>WT(!1,r,e,t)}var Bl=Function("try {return this===global;}catch(e){ return false;}"),Fl=Function("try {return this===window;}catch(e){ return false;}");function Ds(){return typeof globalThis<"u"}var Dl=Symbol.for("freik.Set"),jl=Symbol.for("freik.Map"),Gl=Symbol.for("freik.Symbol"),Hl=Symbol.for("freik.RegExp"),Kl=Symbol.for("freik.Date"),Wl=Symbol.for("freik.BigInt");function qT(e){return[...e.entries()]}function YT(e){return mi(e,Fs(Pl,Pl))?new Map(e):void 0}function zT(e){return[...e]}function XT(e){return Bs(e)?new Set(e):void 0}function JT(e){let t=Symbol.keyFor(e);if(t===void 0)throw Error("Unable to get a key for a symbol for pickling");return t}function QT(e){return lr(e)?Symbol.for(e):void 0}function ZT(e){return{source:e.source,flags:e.flags}}function $T(e){if(kl(e,"source")&&kl(e,"flags"))return new RegExp(e.source,e.flags)}function eR(e){return e.toJSON()}function tR(e){try{return lr(e)?new Date(e):void 0}catch{return}}function rR(e){return e.toString()}function nR(e){try{return lr(e)?BigInt(e):void 0}catch{return}}var oR=new Map([[jl,qT],[Dl,zT],[Gl,JT],[Hl,ZT],[Kl,eR],[Wl,rR]]),iR=new Map([[jl,YT],[Dl,XT],[Gl,QT],[Hl,$T],[Kl,tR],[Wl,nR]]),aR;(e=>{e[e.Success=0]="Success",e[e.Already=1]="Already",e[e.Fail=2]="Fail",e[e.DetectionFailure=3]="DetectionFailure"})(aR||={});var ae=_s;function ks(e){return Le(e,ae)?pi(e,ae,VT({to:vl(ws(Ml,lr),uo),from:vl(ws(Ml,lr),uo)}))?1:2:(e[ae]={to:oR,from:iR},0)}function sR(){return Ds()?ks(globalThis):Fl()?ks(window):Bl()?ks(global):3}switch(sR()){case 2:throw Error(`Invalid <global>[${String(ae)}] object`);case 3:throw Error("Unable to determine environment for pickling");default:break}function cR(){if(Ds()&&ur(globalThis)&&Le(globalThis,ae)&&Le(globalThis[ae],"to"))return globalThis[ae].to;if(Bl()&&ur(global)&&Le(global,ae)&&Le(global[ae],"to"))return global[ae].to;if(Fl()&&ur(window)&&Le(window,ae)&&Le(window[ae],"to"))return window[ae].to;throw Error("Pickling not registered!")}function uR(e,t){cR().set(e,t)}function lR(){if(Ds()&&ur(globalThis)&&Le(globalThis,ae)&&Le(globalThis[ae],"from"))return globalThis[ae].from;if(ur(process)&&!Le(process,"browser")&&Le(global,ae)&&Le(global[ae],"from"))return global[ae].from;if(!ur(process)&&!Le(process,"browser")&&Le(window,ae)&&Le(window[ae],"from"))return window[ae].from;throw Error("Unpickling not registered!")}function fR(e,t){lR().set(e,t)}function Vl(e,t,r){r&&uR(e,r),fR(e,t)}var ql=Symbol.for("freik.MultiMapTypeTag");function pR(e){let t=e?new Map([...e].map(([d,g])=>[d,new Set(g)])):new Map,r=()=>t.clear(),n=d=>t.delete(d),o=(d,g)=>{let m=c(d);if(m!==void 0){let x=m.delete(g);return m.size===0&&t.delete(d),x}return!1},i=()=>t.keys(),a=(d,g)=>t.forEach((m,x)=>d(m,x,S),g),s=async(d,g)=>{for(let[m,x]of t)g?await d.apply(g,[x,m,S]):await d(x,m,S)},c=d=>t.get(d),u=d=>t.has(d);function l(d,g){let m=t.get(d);return m===void 0?t.set(d,new Set([g])):m.add(g),S}function f(d,g){let m=t.get(d);if(m===void 0)t.set(d,new Set(g));else for(let x of g)m.add(x);return S}function*p(){for(let[d,g]of t)yield[d,g.values()]}let h=()=>t.size;function E(d){if(h()!==d.size())return!1;for(let[g,m]of t){let x=d.get(g);if(!x||!ui(new Set(m),new Set(x)))return!1}return!0}function y(){return[...S]}let S={clear:r,delete:n,remove:o,keys:i,forEach:a,forEachAwaitable:s,get:c,has:u,set:l,add:f,size:h,[Symbol.iterator]:p,[_s]:ql,toJSON:y,valueEqual:E};return S}function dR(e){if(mi(e,Fs(hi,_l(hi))))return pR(e)}Vl(ql,dR);function Yl(e){return new Promise(t=>setTimeout(t,Math.max(0,e)))}var zl=require("node:fs"),an=Mt(require("node:path"),1);var pt=new Map;async function Xl(){pt.clear();let e=vs(),t=await zl.promises.readdir(e,{withFileTypes:!0});for(let r of t){let n=an.extname(r.name).toLocaleLowerCase();if(n===".png"||n===".jpg"||n===".jpeg"){let o=an.basename(r.name.toLocaleLowerCase(),n);(o==="field"||o==="field-light"||o==="field-dark")&&pt.set(o+n,an.join(e,r.name))}}return pt.size>0}function hR(){return pt.size!==0}function Jl(e){if(hR())return pt.get(`field-${e}.png`)||pt.get(`field-${e}.jpg`)||pt.get(`field-${e}.jpeg`)||pt.get("field.png")||pt.get("field.jpg")||pt.get("field.jpeg")}var mR="#ccc",gR="#333",ER=`<svg viewBox="5 5 1130 1130" version="1.1" xmlns="http://www.w3.org/2000/svg">
2
+ "use strict";var zy=Object.create;var Uu=Object.defineProperty;var Xy=Object.getOwnPropertyDescriptor;var Jy=Object.getOwnPropertyNames;var Qy=Object.getPrototypeOf,Zy=Object.prototype.hasOwnProperty;var _=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var $y=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of Jy(t))!Zy.call(e,o)&&o!==r&&Uu(e,o,{get:()=>t[o],enumerable:!(n=Xy(t,o))||n.enumerable});return e};var Mt=(e,t,r)=>(r=e!=null?zy(Qy(e)):{},$y(t||!e||!e.__esModule?Uu(r,"default",{value:e,enumerable:!0}):r,e));var nm=_((KW,rm)=>{var nC=typeof global=="object"&&global&&global.Object===Object&&global;rm.exports=nC});var im=_((WW,om)=>{var oC=nm(),iC=typeof self=="object"&&self&&self.Object===Object&&self,aC=oC||iC||Function("return this")();om.exports=aC});var Na=_((VW,am)=>{var sC=im(),cC=sC.Symbol;am.exports=cC});var cm=_((qW,sm)=>{function uC(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}sm.exports=uC});var lm=_((YW,um)=>{var lC=Array.isArray;um.exports=lC});var hm=_((zW,dm)=>{var fm=Na(),pm=Object.prototype,fC=pm.hasOwnProperty,pC=pm.toString,ko=fm?fm.toStringTag:void 0;function dC(e){var t=fC.call(e,ko),r=e[ko];try{e[ko]=void 0;var n=!0}catch{}var o=pC.call(e);return n&&(t?e[ko]=r:delete e[ko]),o}dm.exports=dC});var gm=_((XW,mm)=>{var hC=Object.prototype,mC=hC.toString;function gC(e){return mC.call(e)}mm.exports=gC});var Tm=_((JW,Sm)=>{var Em=Na(),EC=hm(),yC=gm(),SC="[object Null]",TC="[object Undefined]",ym=Em?Em.toStringTag:void 0;function RC(e){return e==null?e===void 0?TC:SC:ym&&ym in Object(e)?EC(e):yC(e)}Sm.exports=RC});var xm=_((QW,Rm)=>{function xC(e){return e!=null&&typeof e=="object"}Rm.exports=xC});var Lm=_((ZW,Om)=>{var OC=Tm(),LC=xm(),AC="[object Symbol]";function UC(e){return typeof e=="symbol"||LC(e)&&OC(e)==AC}Om.exports=UC});var Im=_(($W,bm)=>{var Am=Na(),NC=cm(),CC=lm(),bC=Lm(),IC=1/0,Um=Am?Am.prototype:void 0,Nm=Um?Um.toString:void 0;function Cm(e){if(typeof e=="string")return e;if(CC(e))return NC(e,Cm)+"";if(bC(e))return Nm?Nm.call(e):"";var t=e+"";return t=="0"&&1/e==-IC?"-0":t}bm.exports=Cm});var wo=_((eV,Pm)=>{var PC=Im();function vC(e){return e==null?"":PC(e)}Pm.exports=vC});var Mm=_((tV,vm)=>{function MC(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}vm.exports=MC});var wm=_((rV,km)=>{var kC=Mm();function wC(e,t,r){var n=e.length;return r=r===void 0?n:r,!t&&r>=n?e:kC(e,t,r)}km.exports=wC});var Ac=_((nV,_m)=>{var _C="\\ud800-\\udfff",BC="\\u0300-\\u036f",FC="\\ufe20-\\ufe2f",DC="\\u20d0-\\u20ff",jC=BC+FC+DC,GC="\\ufe0e\\ufe0f",HC="\\u200d",KC=RegExp("["+HC+_C+jC+GC+"]");function WC(e){return KC.test(e)}_m.exports=WC});var Fm=_((oV,Bm)=>{function VC(e){return e.split("")}Bm.exports=VC});var qm=_((iV,Vm)=>{var Dm="\\ud800-\\udfff",qC="\\u0300-\\u036f",YC="\\ufe20-\\ufe2f",zC="\\u20d0-\\u20ff",XC=qC+YC+zC,JC="\\ufe0e\\ufe0f",QC="["+Dm+"]",Uc="["+XC+"]",Nc="\\ud83c[\\udffb-\\udfff]",ZC="(?:"+Uc+"|"+Nc+")",jm="[^"+Dm+"]",Gm="(?:\\ud83c[\\udde6-\\uddff]){2}",Hm="[\\ud800-\\udbff][\\udc00-\\udfff]",$C="\\u200d",Km=ZC+"?",Wm="["+JC+"]?",eb="(?:"+$C+"(?:"+[jm,Gm,Hm].join("|")+")"+Wm+Km+")*",tb=Wm+Km+eb,rb="(?:"+[jm+Uc+"?",Uc,Gm,Hm,QC].join("|")+")",nb=RegExp(Nc+"(?="+Nc+")|"+rb+tb,"g");function ob(e){return e.match(nb)||[]}Vm.exports=ob});var zm=_((aV,Ym)=>{var ib=Fm(),ab=Ac(),sb=qm();function cb(e){return ab(e)?sb(e):ib(e)}Ym.exports=cb});var Jm=_((sV,Xm)=>{var ub=wm(),lb=Ac(),fb=zm(),pb=wo();function db(e){return function(t){t=pb(t);var r=lb(t)?fb(t):void 0,n=r?r[0]:t.charAt(0),o=r?ub(r,1).join(""):t.slice(1);return n[e]()+o}}Xm.exports=db});var Zm=_((cV,Qm)=>{var hb=Jm(),mb=hb("toUpperCase");Qm.exports=mb});var eg=_((uV,$m)=>{var gb=wo(),Eb=Zm();function yb(e){return Eb(gb(e).toLowerCase())}$m.exports=yb});var rg=_((lV,tg)=>{function Sb(e,t,r,n){var o=-1,i=e==null?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}tg.exports=Sb});var og=_((fV,ng)=>{function Tb(e){return function(t){return e?.[t]}}ng.exports=Tb});var ag=_((pV,ig)=>{var Rb=og(),xb={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"s"},Ob=Rb(xb);ig.exports=Ob});var cg=_((dV,sg)=>{var Lb=ag(),Ab=wo(),Ub=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Nb="\\u0300-\\u036f",Cb="\\ufe20-\\ufe2f",bb="\\u20d0-\\u20ff",Ib=Nb+Cb+bb,Pb="["+Ib+"]",vb=RegExp(Pb,"g");function Mb(e){return e=Ab(e),e&&e.replace(Ub,Lb).replace(vb,"")}sg.exports=Mb});var lg=_((hV,ug)=>{var kb=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function wb(e){return e.match(kb)||[]}ug.exports=wb});var pg=_((mV,fg)=>{var _b=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function Bb(e){return _b.test(e)}fg.exports=Bb});var Pg=_((gV,Ig)=>{var Eg="\\ud800-\\udfff",Fb="\\u0300-\\u036f",Db="\\ufe20-\\ufe2f",jb="\\u20d0-\\u20ff",Gb=Fb+Db+jb,yg="\\u2700-\\u27bf",Sg="a-z\\xdf-\\xf6\\xf8-\\xff",Hb="\\xac\\xb1\\xd7\\xf7",Kb="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Wb="\\u2000-\\u206f",Vb=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Tg="A-Z\\xc0-\\xd6\\xd8-\\xde",qb="\\ufe0e\\ufe0f",Rg=Hb+Kb+Wb+Vb,xg="['\u2019]",dg="["+Rg+"]",Yb="["+Gb+"]",Og="\\d+",zb="["+yg+"]",Lg="["+Sg+"]",Ag="[^"+Eg+Rg+Og+yg+Sg+Tg+"]",Xb="\\ud83c[\\udffb-\\udfff]",Jb="(?:"+Yb+"|"+Xb+")",Qb="[^"+Eg+"]",Ug="(?:\\ud83c[\\udde6-\\uddff]){2}",Ng="[\\ud800-\\udbff][\\udc00-\\udfff]",Kn="["+Tg+"]",Zb="\\u200d",hg="(?:"+Lg+"|"+Ag+")",$b="(?:"+Kn+"|"+Ag+")",mg="(?:"+xg+"(?:d|ll|m|re|s|t|ve))?",gg="(?:"+xg+"(?:D|LL|M|RE|S|T|VE))?",Cg=Jb+"?",bg="["+qb+"]?",eI="(?:"+Zb+"(?:"+[Qb,Ug,Ng].join("|")+")"+bg+Cg+")*",tI="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",rI="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",nI=bg+Cg+eI,oI="(?:"+[zb,Ug,Ng].join("|")+")"+nI,iI=RegExp([Kn+"?"+Lg+"+"+mg+"(?="+[dg,Kn,"$"].join("|")+")",$b+"+"+gg+"(?="+[dg,Kn+hg,"$"].join("|")+")",Kn+"?"+hg+"+"+mg,Kn+"+"+gg,rI,tI,Og,oI].join("|"),"g");function aI(e){return e.match(iI)||[]}Ig.exports=aI});var Mg=_((EV,vg)=>{var sI=lg(),cI=pg(),uI=wo(),lI=Pg();function fI(e,t,r){return e=uI(e),t=r?void 0:t,t===void 0?cI(e)?lI(e):sI(e):e.match(t)||[]}vg.exports=fI});var wg=_((yV,kg)=>{var pI=rg(),dI=cg(),hI=Mg(),mI="['\u2019]",gI=RegExp(mI,"g");function EI(e){return function(t){return pI(hI(dI(t).replace(gI,"")),e,"")}}kg.exports=EI});var Bg=_((SV,_g)=>{var yI=eg(),SI=wg(),TI=SI(function(e,t,r){return t=t.toLowerCase(),e+(r?yI(t):t)});_g.exports=TI});var Vy=Mt(require("node:path"),1),Za=Mt(require("node:process"),1);var rs=Symbol.for("freik.typetag");function A(e){return e===void 0}function I(e){return!A(e)}function oo(e){return e===null}function e1(e){return e==null}function t1(e){return!e1(e)}function r1(e,...t){return t.some(r=>r(e))}function ke(...e){return t=>r1(t,...e)}function n1(e,...t){return t.every(r=>r(e))}function st(e){return n1(e,o1,t1)}function o1(e){return typeof e=="object"}function or(e){return Array.isArray(e)}function k(e){return typeof e=="string"}function en(e){return typeof e=="number"&&!isNaN(e-0)}var $7=ke(k,en);function os(e){return typeof e=="boolean"}function i1(e){return e instanceof Date}function a1(e){return typeof e=="bigint"}function rr(e){return typeof e=="function"}function s1(e){return e instanceof RegExp}function Cu(e){return e instanceof Map}function c1(e){return e instanceof Set}function Qo(e,t){if(!or(e))return!1;for(let r of e)if(!t(r))return!1;return!0}function kt(e){return t=>Qo(t,e)}function u1(e,...t){return or(e)&&e.length===t.length&&t.every((r,n)=>r(e[n]))}function l1(...e){return t=>u1(t,...e)}function f1(e,t,r){if(!Cu(e))return!1;for(let[n,o]of e)if(!t(n)||!r(o))return!1;return!0}function Zo(e,t){return r=>f1(r,e,t)}function p1(e,t){if(!st(e))return!1;for(let r of[...Object.keys(e),...Object.getOwnPropertySymbols(e)])if(!tt(e,r,t))return!1;return!0}function $o(e){return typeof e=="symbol"}function ne(e,t){return st(e)&&t in e}function ir(e,t,r){return ne(e,t)&&r(e[t])}function is(e,t){return r=>tt(r,e,t)}var tt=ir;function no(e,t){return tt(e,t,k)}function d1(e){return ne(e,Symbol.iterator)}function ns(e){return e===null||k(e)||en(e)||os(e)||Qo(e,ns)||st(e)&&Qo(Object.keys(e),ke(k,en))&&p1(e,ns)}function bu(e,t,r,n){if(!st(t))return!1;let o=Object.keys(r).length,i=Object.keys(t),a=i.length;for(let s of i){if(!ne(t,s))continue;let c=t[s];if(A(c)||t[s]===null){delete t[s],a--;continue}if(tt(n,s,rr)){let u=n[s];if(!u(c))return!1;a--}else if(tt(r,s,rr)){let u=r[s];if(!u(c))return!1;o--,a--}}return o===0&&(a===0||!e)}function h1(e,t={}){return r=>bu(!1,r,e,t)}function oe(e,t={}){return r=>bu(!0,r,e,t)}function m1(e,t,r){if(!st(e))return!1;let n=Object.keys(e),o=n.length;for(let i of n){if(!ne(e,i))continue;let a=e[i];if(!t(i)||!r(a))return!1;o--}return o===0}function Iu(e,t){return r=>m1(r,e,t)}var Pu=Function("try {return this===global;}catch(e){ return false;}"),vu=Function("try {return this===window;}catch(e){ return false;}");function as(){return typeof globalThis<"u"}function g1(e){return no(e,"@dataType")&&tt(e,"@dataValue",ns)}function E1(e,t){return{"@dataType":e,"@dataValue":t}}function y1(e){return[e["@dataType"],e["@dataValue"]]}var ss=Symbol.for("freik.Set"),cs=Symbol.for("freik.Map"),us=Symbol.for("freik.Symbol"),ls=Symbol.for("freik.RegExp"),fs=Symbol.for("freik.Date"),ps=Symbol.for("freik.BigInt");function S1(e){return[...e.entries()]}function T1(e){return Qo(e,l1(I,I))?new Map(e):void 0}function R1(e){return[...e]}function x1(e){return or(e)?new Set(e):void 0}function O1(e){let t=Symbol.keyFor(e);if(t===void 0)throw Error("Unable to get a key for a symbol for pickling");return t}function L1(e){return k(e)?Symbol.for(e):void 0}function A1(e){return{source:e.source,flags:e.flags}}function U1(e){if(no(e,"source")&&no(e,"flags"))return new RegExp(e.source,e.flags)}function N1(e){return e.toJSON()}function C1(e){try{return k(e)?new Date(e):void 0}catch{return}}function b1(e){return e.toString()}function I1(e){try{return k(e)?BigInt(e):void 0}catch{return}}var P1=[[Cu,cs],[c1,ss],[$o,us],[s1,ls],[i1,fs],[a1,ps]],v1=new Map([[cs,S1],[ss,R1],[us,O1],[ls,A1],[fs,N1],[ps,b1]]),M1=new Map([[cs,T1],[ss,x1],[us,L1],[ls,U1],[fs,C1],[ps,I1]]),k1;(e=>{e[e.Success=0]="Success",e[e.Already=1]="Already",e[e.Fail=2]="Fail",e[e.DetectionFailure=3]="DetectionFailure"})(k1||={});var re=rs;function ts(e){return ne(e,re)?tt(e,re,h1({to:Zo(ke($o,k),rr),from:Zo(ke($o,k),rr)}))?1:2:(e[re]={to:v1,from:M1},0)}function w1(){return as()?ts(globalThis):vu()?ts(window):Pu()?ts(global):3}switch(w1()){case 2:throw Error(`Invalid <global>[${String(re)}] object`);case 3:throw Error("Unable to determine environment for pickling");default:break}function _1(){if(as()&&st(globalThis)&&ne(globalThis,re)&&ne(globalThis[re],"to"))return globalThis[re].to;if(Pu()&&st(global)&&ne(global,re)&&ne(global[re],"to"))return global[re].to;if(vu()&&st(window)&&ne(window,re)&&ne(window[re],"to"))return window[re].to;throw Error("Pickling not registered!")}function Nu(e){return _1().get(e)}function B1(){if(as()&&st(globalThis)&&ne(globalThis,re)&&ne(globalThis[re],"from"))return globalThis[re].from;if(st(process)&&!ne(process,"browser")&&ne(global,re)&&ne(global[re],"from"))return global[re].from;if(!st(process)&&!ne(process,"browser")&&ne(window,re)&&ne(window[re],"from"))return window[re].from;throw Error("Unpickling not registered!")}function F1(e){return B1().get(e)}function D1(e){if(tt(e,rs,$o)){let t=e[rs],r=Nu(t);if(r)return[t,r];if(tt(e,"toJSON",rr))return[t,n=>tt(n,"toJSON",rr)?n.toJSON():"ERROR"]}for(let[t,r]of P1)if(t(e)){let n=Nu(r);if(n)return[r,n]}}function j1(e){return F1(Symbol.for(e))}function G1(e,t){let r=this[e],n=D1(r);if(n){let[o,i]=n,a=Symbol.keyFor(o);return a?E1(a,i(r)):t}else if(d1(r))return[...r];return t}function H1(e,t){if(g1(t)){let[r,n]=y1(t),o=j1(r);if(o){let i=o(n);if(i!==void 0)return i}}return t}function ds(e){return JSON.stringify(e,G1)}function K1(e){return JSON.parse(e,H1)}function W1(e){return K1(e)}function Mu(e,t){let r=W1(e);return t(r)?r:void 0}var nr=oe({errors:rr,[Symbol.toPrimitive]:rr});function io(e,t){let r=[];return r.push(...k(e)?[e]:nr(e)?e.errors():e),I(t)&&r.push(...k(t)?[t]:nr(t)?t.errors():t),{errors:()=>r,[Symbol.toPrimitive]:n=>n==="string"?r.join(`
3
+ `):null}}var ft=Mt(require("node:fs"),1),Ge=Mt(require("node:path"),1);var ao=Symbol.for("freik.typetag");function Fu(e){return e===void 0}function ku(e){return!Fu(e)}function ti(e){return e==null}function ri(e){return!ti(e)}function V1(e,...t){return t.some(r=>r(e))}function ms(...e){return t=>V1(t,...e)}function q1(e,...t){return t.every(r=>r(e))}function ar(e){return q1(e,Y1,ri)}function Y1(e){return typeof e=="object"}function gs(e){return Array.isArray(e)}function sr(e){return typeof e=="string"}function z1(e){return typeof e=="number"&&!isNaN(e-0)}var tP=ms(sr,z1);function so(e){return typeof e=="function"}function X1(e){return e instanceof Map}function ni(e,t){if(!gs(e))return!1;for(let r of e)if(!t(r))return!1;return!0}function Du(e){return t=>ni(t,e)}function J1(e,...t){return gs(e)&&e.length===t.length&&t.every((r,n)=>r(e[n]))}function Es(...e){return t=>J1(t,...e)}function Q1(e,t,r){if(!X1(e))return!1;for(let[n,o]of e)if(!t(n)||!r(o))return!1;return!0}function wu(e,t){return r=>Q1(r,e,t)}function _u(e){return typeof e=="symbol"}function Ee(e,t){return ar(e)&&t in e}function Z1(e,t,r){return Ee(e,t)&&r(e[t])}var ei=Z1;function Bu(e,t){return ei(e,t,sr)}function ju(e,t){return Ee(e,ao)&&e[ao]===t}function $1(e,t,r,n){if(!ar(t))return!1;let o=Object.keys(r).length,i=Object.keys(t),a=i.length;for(let s of i){if(!Ee(t,s))continue;let c=t[s];if(Fu(c)||t[s]===null){delete t[s],a--;continue}if(ei(n,s,so)){let u=n[s];if(!u(c))return!1;a--}else if(ei(r,s,so)){let u=r[s];if(!u(c))return!1;o--,a--}}return o===0&&(a===0||!e)}function eS(e,t={}){return r=>$1(!1,r,e,t)}var Gu=Function("try {return this===global;}catch(e){ return false;}"),Hu=Function("try {return this===window;}catch(e){ return false;}");function ys(){return typeof globalThis<"u"}var Ku=Symbol.for("freik.Set"),Wu=Symbol.for("freik.Map"),Vu=Symbol.for("freik.Symbol"),qu=Symbol.for("freik.RegExp"),Yu=Symbol.for("freik.Date"),zu=Symbol.for("freik.BigInt");function tS(e){return[...e.entries()]}function rS(e){return ni(e,Es(ku,ku))?new Map(e):void 0}function nS(e){return[...e]}function oS(e){return gs(e)?new Set(e):void 0}function iS(e){let t=Symbol.keyFor(e);if(t===void 0)throw Error("Unable to get a key for a symbol for pickling");return t}function aS(e){return sr(e)?Symbol.for(e):void 0}function sS(e){return{source:e.source,flags:e.flags}}function cS(e){if(Bu(e,"source")&&Bu(e,"flags"))return new RegExp(e.source,e.flags)}function uS(e){return e.toJSON()}function lS(e){try{return sr(e)?new Date(e):void 0}catch{return}}function fS(e){return e.toString()}function pS(e){try{return sr(e)?BigInt(e):void 0}catch{return}}var dS=new Map([[Wu,tS],[Ku,nS],[Vu,iS],[qu,sS],[Yu,uS],[zu,fS]]),hS=new Map([[Wu,rS],[Ku,oS],[Vu,aS],[qu,cS],[Yu,lS],[zu,pS]]),mS;(e=>{e[e.Success=0]="Success",e[e.Already=1]="Already",e[e.Fail=2]="Fail",e[e.DetectionFailure=3]="DetectionFailure"})(mS||={});var ie=ao;function hs(e){return Ee(e,ie)?ei(e,ie,eS({to:wu(ms(_u,sr),so),from:wu(ms(_u,sr),so)}))?1:2:(e[ie]={to:dS,from:hS},0)}function gS(){return ys()?hs(globalThis):Hu()?hs(window):Gu()?hs(global):3}switch(gS()){case 2:throw Error(`Invalid <global>[${String(ie)}] object`);case 3:throw Error("Unable to determine environment for pickling");default:break}function ES(){if(ys()&&ar(globalThis)&&Ee(globalThis,ie)&&Ee(globalThis[ie],"to"))return globalThis[ie].to;if(Gu()&&ar(global)&&Ee(global,ie)&&Ee(global[ie],"to"))return global[ie].to;if(Hu()&&ar(window)&&Ee(window,ie)&&Ee(window[ie],"to"))return window[ie].to;throw Error("Pickling not registered!")}function yS(e,t){ES().set(e,t)}function SS(){if(ys()&&ar(globalThis)&&Ee(globalThis,ie)&&Ee(globalThis[ie],"from"))return globalThis[ie].from;if(ar(process)&&!Ee(process,"browser")&&Ee(global,ie)&&Ee(global[ie],"from"))return global[ie].from;if(!ar(process)&&!Ee(process,"browser")&&Ee(window,ie)&&Ee(window[ie],"from"))return window[ie].from;throw Error("Unpickling not registered!")}function TS(e,t){SS().set(e,t)}function Xu(e,t,r){r&&yS(e,r),TS(e,t)}var RS=Symbol.for("freik.typetag");function el(e){return e===void 0}function Ju(e){return!el(e)}function xS(e){return e==null}function OS(e){return!xS(e)}function LS(e,...t){return t.some(r=>r(e))}function Ts(...e){return t=>LS(t,...e)}function AS(e,...t){return t.every(r=>r(e))}function Rs(e){return AS(e,US,OS)}function US(e){return typeof e=="object"}function si(e){return Array.isArray(e)}function cr(e){return typeof e=="string"}function tl(e){return typeof e=="number"&&!isNaN(e-0)}var nP=Ts(cr,tl);function ii(e){return typeof e=="function"}function rl(e){return e instanceof Map}function NS(e,t){if(!si(e))return!1;for(let r of e)if(!t(r))return!1;return!0}function CS(e,...t){return si(e)&&e.length===t.length&&t.every((r,n)=>r(e[n]))}function bS(...e){return t=>CS(t,...e)}function IS(e,t,r){if(!rl(e))return!1;for(let[n,o]of e)if(!t(n)||!r(o))return!1;return!0}function Qu(e,t){return r=>IS(r,e,t)}function Zu(e){return typeof e=="symbol"}function xs(e,t){return Rs(e)&&t in e}function PS(e,t,r){return xs(e,t)&&r(e[t])}var ai=PS;function $u(e,t){return ai(e,t,cr)}function vS(e,t,r,n){if(!Rs(t))return!1;let o=Object.keys(r).length,i=Object.keys(t),a=i.length;for(let s of i){if(!xs(t,s))continue;let c=t[s];if(el(c)||t[s]===null){delete t[s],a--;continue}if(ai(n,s,ii)){let u=n[s];if(!u(c))return!1;a--}else if(ai(r,s,ii)){let u=r[s];if(!u(c))return!1;o--,a--}}return o===0&&(a===0||!e)}function MS(e,t={}){return r=>vS(!1,r,e,t)}var kS=Function("try {return this===global;}catch(e){ return false;}"),wS=Function("try {return this===window;}catch(e){ return false;}");function _S(){return typeof globalThis<"u"}var nl=Symbol.for("freik.Set"),ol=Symbol.for("freik.Map"),il=Symbol.for("freik.Symbol"),al=Symbol.for("freik.RegExp"),sl=Symbol.for("freik.Date"),cl=Symbol.for("freik.BigInt");function BS(e){return[...e.entries()]}function FS(e){return NS(e,bS(Ju,Ju))?new Map(e):void 0}function DS(e){return[...e]}function jS(e){return si(e)?new Set(e):void 0}function GS(e){let t=Symbol.keyFor(e);if(t===void 0)throw Error("Unable to get a key for a symbol for pickling");return t}function HS(e){return cr(e)?Symbol.for(e):void 0}function KS(e){return{source:e.source,flags:e.flags}}function WS(e){if($u(e,"source")&&$u(e,"flags"))return new RegExp(e.source,e.flags)}function VS(e){return e.toJSON()}function qS(e){try{return cr(e)?new Date(e):void 0}catch{return}}function YS(e){return e.toString()}function zS(e){try{return cr(e)?BigInt(e):void 0}catch{return}}var XS=new Map([[ol,BS],[nl,DS],[il,GS],[al,KS],[sl,VS],[cl,YS]]),JS=new Map([[ol,FS],[nl,jS],[il,HS],[al,WS],[sl,qS],[cl,zS]]),QS;(e=>{e[e.Success=0]="Success",e[e.Already=1]="Already",e[e.Fail=2]="Fail",e[e.DetectionFailure=3]="DetectionFailure"})(QS||={});var oi=RS;function Ss(e){return xs(e,oi)?ai(e,oi,MS({to:Qu(Ts(Zu,cr),ii),from:Qu(Ts(Zu,cr),ii)}))?1:2:(e[oi]={to:XS,from:JS},0)}function ZS(){return _S()?Ss(globalThis):wS()?Ss(window):kS()?Ss(global):3}switch(ZS()){case 2:throw Error(`Invalid <global>[${String(oi)}] object`);case 3:throw Error("Unable to determine environment for pickling");default:break}function ci(e,t){if(e.size!==t.size)return!1;for(let r of e)if(!t.has(r))return!1;return!0}var Os=Symbol.for("freik.MultiMapTypeTag");function wt(e){let t=e?new Map([...e].map(([d,g])=>[d,new Set(g)])):new Map,r=()=>t.clear(),n=d=>t.delete(d),o=(d,g)=>{let m=c(d);if(m!==void 0){let x=m.delete(g);return m.size===0&&t.delete(d),x}return!1},i=()=>t.keys(),a=(d,g)=>t.forEach((m,x)=>d(m,x,S),g),s=async(d,g)=>{for(let[m,x]of t)g?await d.apply(g,[x,m,S]):await d(x,m,S)},c=d=>t.get(d),u=d=>t.has(d);function l(d,g){let m=t.get(d);return m===void 0?t.set(d,new Set([g])):m.add(g),S}function f(d,g){let m=t.get(d);if(m===void 0)t.set(d,new Set(g));else for(let x of g)m.add(x);return S}function*p(){for(let[d,g]of t)yield[d,g.values()]}let h=()=>t.size;function E(d){if(h()!==d.size())return!1;for(let[g,m]of t){let x=d.get(g);if(!x||!ci(new Set(m),new Set(x)))return!1}return!0}function y(){return[...S]}let S={clear:r,delete:n,remove:o,keys:i,forEach:a,forEachAwaitable:s,get:c,has:u,set:l,add:f,size:h,[Symbol.iterator]:p,[ao]:Os,toJSON:y,valueEqual:E};return S}function $S(e){if(ni(e,Es(ri,Du(ri))))return wt(e)}Xu(Os,$S);function eT(e){return ju(e,Os)}function tT(e,t,r){if(!eT(e))return!1;for(let[n,o]of e){if(!t(n))return!1;for(let i of o)if(!r(i))return!1}return!0}function Ls(e,t){return r=>tT(r,e,t)}var tn=Object.freeze({Line:"line",Curve:"curve"}),he=Object.freeze({Reversed:"reversed",Tangent:"tangent",Constant:"constant",Linear:"linear",Point:"point",Piecewise:"piecewise"});var As={name:"",fullName:"",imports:[],container:{fileName:""},children:{},values:[],poses:[],beziers:[],pathChains:[],pathChainHelpers:[]},ul=k,rT=k,nT=oe({int:en}),oT=oe({double:en}),Us=ke(nT,oT),Br=ke(rT,Us),li=oe({radians:Br}),iT=oe({name:k,value:ke(Br,li)}),ui=ke(Br,li),aT=k,ll=oe({x:Br,y:Br},{heading:ui}),sT=oe({name:k,pose:ll}),fl=ke(aT,ll);function cT(e){return e===tn.Line||e===tn.Curve}var uT=k,pl=oe({type:cT,points:kt(fl)}),lT=oe({name:k,points:pl}),fT=ke(uT,pl);function pT(e){return e===he.Tangent}function dT(e){return e===he.Constant}function hT(e){return e===he.Linear}function mT(e){return e===he.Point}function gT(e){return e===he.Reversed}function ET(e){return e===he.Piecewise}var dl=oe({type:pT}),hl=oe({type:dT,heading:ui}),ml=oe({type:hT,start:ui,end:ui}),gl=oe({type:mT,point:fl}),El=ke(dl,hl,ml,gl),yT=oe({start:Br,end:Br}),yl=oe({type:gT,facing:El}),ST=ke(El,yl),TT=oe({timing:yT,heading:ST}),RT=oe({type:ET,pieces:kt(TT)}),xT=e=>ke(dl,hl,ml,gl,RT,yl)(e),OT=oe({name:k,paths:kt(fT),heading:xT}),LT=oe({name:k,staticType:k}),AT=ke(is("fileName",k),is("className",k));function Ns(e){let t=no(e,"name");return t=t&&ir(e,"container",AT),t=t&&ir(e,"values",kt(iT)),t=t&&ir(e,"poses",kt(sT)),t=t&&ir(e,"beziers",kt(lT)),t=t&&ir(e,"pathChains",kt(OT)),t=t&&ir(e,"pathChainHelpers",kt(LT)),t=t&&tt(e,"children",Iu(k,Ns)),t}function rn(e,t){return`${e}*${t}`}function Tl(e){return e.split("*").pop()||""}function Cs(e){return k(e)?e.split("*").length===2:!1}function bs(e,t){return`${e};${t}`}function Rl(e){return e.split(";").pop()||""}function Sl(e){if(!k(e))return!1;let t=e.split(";");return t.length===2&&Cs(t[0])}var xl=oe({HasFieldImage:os,TeamPaths:Ls(k,Cs),PathClasses:Ls(Cs,Sl),ParsedClasses:Zo(Sl,Ns)}),ov=Object.freeze({HasFieldImage:!1,TeamPaths:wt(),PathClasses:wt(),ParsedClasses:new Map});var Ol=Mt(require("node:path"),1),Ll=Mt(require("node:url"),1);var nn={},Is=I(__dirname)?__dirname:Ol.default.dirname(Ll.default.fileURLToPath(nn.url));function Al(e){Is=e}function on(){return Is}var sv=UT();function UT(){try{if(I(nn)&&I(nn.env)&&I(nn.dir))return nn.env.NODE_ENV==="production"||nn.dir.includes("node_modules")}catch{}return process.env.NODE_ENV==="production"||Is.endsWith("/dist")}var Ul=require("node:fs");async function Ps(e){try{return(await Ul.promises.stat(e)).isDirectory()}catch{return!1}}var _t=null,Nl=[];function Cl(e){Nl=e}async function NT(e){return await bT(e)?(_t=e,!0):!1}function vs(){if(oo(_t))throw new Error("Unable to find FtcRobotController/TeamCode home");return _t}async function CT(e,t=8){let r="",n=k(e)?[e]:e;for(let o of n){let i=t;for(;o!=r&&i>0;){if(await NT(o))return o;r=o,o=Ge.default.dirname(o),i--}}return console.error("Unable to find any potential repositories:",e),null}async function bT(e){return await ft.promises.exists(Ge.default.join(e,"settings.gradle"))&&await ft.promises.exists(Ge.default.join(e,"build.gradle"))&&await ft.promises.exists(Ge.default.join(e,"FtcRobotController"))&&await Ps(Ge.default.join(e,"FtcRobotController"))}async function bl(){if(oo(_t)&&await CT([...Nl,process.cwd(),on()]),oo(_t))throw new Error("Unable to find repository root");let e=await kT(),t=wt();for(let r of e){let o=(await PT(_t,r)).map(i=>rn(r,i));t.add(r,o)}return t}var IT=/[^\/\\]*(Path|Pose)[^\/\\]*\.java$/;async function PT(e,t){let r=Ge.default.join(e,t,Ms,t.toLocaleLowerCase()),n=[],o=[r];for(;o.length>0;){let i=o.pop(),a=await ft.promises.readdir(i,{withFileTypes:!0});for(let s of a){let c=Ge.default.join(i,s.name);s.isDirectory()?o.push(c):await MT(s)&&n.push(Ge.default.relative(r,c))}}return n}var vT=[/^\s*import\s+com\.pedropathing\.follower\.Follower\s*;/,/^\s*import\s+com\.pedropathing\.geometry\.(Bezier[A-Za-z]+|Pose)\s*;/,/^\s*import\s+com\.pedropathing\.paths\.(HeadingInterpolator|PathChain)\s*;/,/^\s*import\s+com\.bylazar\.configurables\.annotations\.Configurable\s*;/];async function MT(e){return!e.isFile()||!IT.test(e.name)?!1:(await ft.promises.readFile(Ge.default.join(e.parentPath,e.name),"utf-8")).split(`
4
+ `).filter(n=>{for(let o of vT)if(o.test(n.trim()))return!0;return!1}).length!==0}async function kT(){if(oo(_t))throw new Error("Unknonw repository location");return(await ft.promises.readdir(_t,{withFileTypes:!0})).filter(r=>wT(_t,r)).map(r=>r.name)}function wT(e,t){if(!t.isDirectory())return!1;let r=t.name;if(r[0]==="."||r==="FtcRobotController")return!1;let n=Ge.default.join(e,t.name,"build.gradle");if(!ft.default.existsSync(n))return!1;let o=Ge.default.join(e,t.name,Ms,t.name.toLocaleLowerCase());return!(!ft.default.existsSync(o)||!Ps(o))}function Il(e,t){return Ge.default.join(vs(),e,Ms,e.toLocaleLowerCase(),t)}var Ms=Ge.default.join("src","main","java","org","firstinspires","ftc");var _s=Symbol.for("freik.typetag");function wl(e){return e===void 0}function Pl(e){return!wl(e)}function pi(e){return e==null}function di(e){return!pi(e)}function _T(e,...t){return t.some(r=>r(e))}function ws(...e){return t=>_T(t,...e)}function BT(e,...t){return t.every(r=>r(e))}function ur(e){return BT(e,FT,di)}function FT(e){return typeof e=="object"}function Bs(e){return Array.isArray(e)}function lr(e){return typeof e=="string"}function DT(e){return typeof e=="number"&&!isNaN(e-0)}var gv=ws(lr,DT);function co(e){return typeof e=="function"}function jT(e){return e instanceof Map}function hi(e,t){if(!Bs(e))return!1;for(let r of e)if(!t(r))return!1;return!0}function _l(e){return t=>hi(t,e)}function GT(e,...t){return Bs(e)&&e.length===t.length&&t.every((r,n)=>r(e[n]))}function Fs(...e){return t=>GT(t,...e)}function HT(e,t,r){if(!jT(e))return!1;for(let[n,o]of e)if(!t(n)||!r(o))return!1;return!0}function vl(e,t){return r=>HT(r,e,t)}function Ml(e){return typeof e=="symbol"}function Le(e,t){return ur(e)&&t in e}function KT(e,t,r){return Le(e,t)&&r(e[t])}var fi=KT;function kl(e,t){return fi(e,t,lr)}function WT(e,t,r,n){if(!ur(t))return!1;let o=Object.keys(r).length,i=Object.keys(t),a=i.length;for(let s of i){if(!Le(t,s))continue;let c=t[s];if(wl(c)||t[s]===null){delete t[s],a--;continue}if(fi(n,s,co)){let u=n[s];if(!u(c))return!1;a--}else if(fi(r,s,co)){let u=r[s];if(!u(c))return!1;o--,a--}}return o===0&&(a===0||!e)}function VT(e,t={}){return r=>WT(!1,r,e,t)}var Bl=Function("try {return this===global;}catch(e){ return false;}"),Fl=Function("try {return this===window;}catch(e){ return false;}");function Ds(){return typeof globalThis<"u"}var Dl=Symbol.for("freik.Set"),jl=Symbol.for("freik.Map"),Gl=Symbol.for("freik.Symbol"),Hl=Symbol.for("freik.RegExp"),Kl=Symbol.for("freik.Date"),Wl=Symbol.for("freik.BigInt");function qT(e){return[...e.entries()]}function YT(e){return hi(e,Fs(Pl,Pl))?new Map(e):void 0}function zT(e){return[...e]}function XT(e){return Bs(e)?new Set(e):void 0}function JT(e){let t=Symbol.keyFor(e);if(t===void 0)throw Error("Unable to get a key for a symbol for pickling");return t}function QT(e){return lr(e)?Symbol.for(e):void 0}function ZT(e){return{source:e.source,flags:e.flags}}function $T(e){if(kl(e,"source")&&kl(e,"flags"))return new RegExp(e.source,e.flags)}function eR(e){return e.toJSON()}function tR(e){try{return lr(e)?new Date(e):void 0}catch{return}}function rR(e){return e.toString()}function nR(e){try{return lr(e)?BigInt(e):void 0}catch{return}}var oR=new Map([[jl,qT],[Dl,zT],[Gl,JT],[Hl,ZT],[Kl,eR],[Wl,rR]]),iR=new Map([[jl,YT],[Dl,XT],[Gl,QT],[Hl,$T],[Kl,tR],[Wl,nR]]),aR;(e=>{e[e.Success=0]="Success",e[e.Already=1]="Already",e[e.Fail=2]="Fail",e[e.DetectionFailure=3]="DetectionFailure"})(aR||={});var ae=_s;function ks(e){return Le(e,ae)?fi(e,ae,VT({to:vl(ws(Ml,lr),co),from:vl(ws(Ml,lr),co)}))?1:2:(e[ae]={to:oR,from:iR},0)}function sR(){return Ds()?ks(globalThis):Fl()?ks(window):Bl()?ks(global):3}switch(sR()){case 2:throw Error(`Invalid <global>[${String(ae)}] object`);case 3:throw Error("Unable to determine environment for pickling");default:break}function cR(){if(Ds()&&ur(globalThis)&&Le(globalThis,ae)&&Le(globalThis[ae],"to"))return globalThis[ae].to;if(Bl()&&ur(global)&&Le(global,ae)&&Le(global[ae],"to"))return global[ae].to;if(Fl()&&ur(window)&&Le(window,ae)&&Le(window[ae],"to"))return window[ae].to;throw Error("Pickling not registered!")}function uR(e,t){cR().set(e,t)}function lR(){if(Ds()&&ur(globalThis)&&Le(globalThis,ae)&&Le(globalThis[ae],"from"))return globalThis[ae].from;if(ur(process)&&!Le(process,"browser")&&Le(global,ae)&&Le(global[ae],"from"))return global[ae].from;if(!ur(process)&&!Le(process,"browser")&&Le(window,ae)&&Le(window[ae],"from"))return window[ae].from;throw Error("Unpickling not registered!")}function fR(e,t){lR().set(e,t)}function Vl(e,t,r){r&&uR(e,r),fR(e,t)}var ql=Symbol.for("freik.MultiMapTypeTag");function pR(e){let t=e?new Map([...e].map(([d,g])=>[d,new Set(g)])):new Map,r=()=>t.clear(),n=d=>t.delete(d),o=(d,g)=>{let m=c(d);if(m!==void 0){let x=m.delete(g);return m.size===0&&t.delete(d),x}return!1},i=()=>t.keys(),a=(d,g)=>t.forEach((m,x)=>d(m,x,S),g),s=async(d,g)=>{for(let[m,x]of t)g?await d.apply(g,[x,m,S]):await d(x,m,S)},c=d=>t.get(d),u=d=>t.has(d);function l(d,g){let m=t.get(d);return m===void 0?t.set(d,new Set([g])):m.add(g),S}function f(d,g){let m=t.get(d);if(m===void 0)t.set(d,new Set(g));else for(let x of g)m.add(x);return S}function*p(){for(let[d,g]of t)yield[d,g.values()]}let h=()=>t.size;function E(d){if(h()!==d.size())return!1;for(let[g,m]of t){let x=d.get(g);if(!x||!ci(new Set(m),new Set(x)))return!1}return!0}function y(){return[...S]}let S={clear:r,delete:n,remove:o,keys:i,forEach:a,forEachAwaitable:s,get:c,has:u,set:l,add:f,size:h,[Symbol.iterator]:p,[_s]:ql,toJSON:y,valueEqual:E};return S}function dR(e){if(hi(e,Fs(di,_l(di))))return pR(e)}Vl(ql,dR);function Yl(e){return new Promise(t=>setTimeout(t,Math.max(0,e)))}var zl=require("node:fs"),an=Mt(require("node:path"),1);var pt=new Map;async function Xl(){pt.clear();let e=vs(),t=await zl.promises.readdir(e,{withFileTypes:!0});for(let r of t){let n=an.extname(r.name).toLocaleLowerCase();if(n===".png"||n===".jpg"||n===".jpeg"){let o=an.basename(r.name.toLocaleLowerCase(),n);(o==="field"||o==="field-light"||o==="field-dark")&&pt.set(o+n,an.join(e,r.name))}}return pt.size>0}function hR(){return pt.size!==0}function Jl(e){if(hR())return pt.get(`field-${e}.png`)||pt.get(`field-${e}.jpg`)||pt.get(`field-${e}.jpeg`)||pt.get("field.png")||pt.get("field.jpg")||pt.get("field.jpeg")}var mR="#ccc",gR="#333",ER=`<svg viewBox="5 5 1130 1130" version="1.1" xmlns="http://www.w3.org/2000/svg">
5
5
  <!--
6
6
  Copyright (C) 2026 Kevin Frei
7
7
  Licensed under the GNU Affero General Public License v3.0 or later.
@@ -11,7 +11,7 @@ See https://www.gnu.org/licenses/agpl-3.0.html
11
11
  <clipPath id="bounds">
12
12
  <rect x="5" y="5" width="1130" height="1130"/>
13
13
  </clipPath>
14
- <path id="ln" fill="none" stroke="%%%FG%%%" stroke-width="0.8" stroke-linejoin="round" d="M0,4L5,8L7,8L5,0L17,0L15,8L27,8L25,0L37,0L35,8L47,8L45,0L57,0L55,8L67,8L65,0L77,0L75,8L87,8L85,0L93,0L94.25,4"/>
14
+ <path id="ln" fill="none" stroke="%%%FG%%%" stroke-width="0.8" stroke-linejoin="round" d="M0,4L5,6L7,6L5,2L17,2L15,6L27,6L25,2L37,2L35,6L47,6L45,2L57,2L55,6L67,6L65,2L77,2L75,6L87,6L85,2L93,2L94.25,4"/>
15
15
  <g id="corner">
16
16
  <use href="#ln" x="4" y="0"/>
17
17
  <use href="#ln" x="-192.5" y="-8" transform="rotate(180)"/>
@@ -37,28 +37,28 @@ See https://www.gnu.org/licenses/agpl-3.0.html
37
37
  <use href="#row" y="942.5"/>
38
38
  <use href="#row" y="1131"/>
39
39
  </g>
40
- </svg>`;function js(e){return ER.replace("%%%FG%%%",e==="light"?gR:mR)}var gE=require("node:fs");var yR=typeof global=="object"&&global&&global.Object===Object&&global,gi=yR;var SR=typeof self=="object"&&self&&self.Object===Object&&self,TR=gi||SR||Function("return this")(),fe=TR;var RR=fe.Symbol,ye=RR;var Ql=Object.prototype,xR=Ql.hasOwnProperty,OR=Ql.toString,lo=ye?ye.toStringTag:void 0;function LR(e){var t=xR.call(e,lo),r=e[lo];try{e[lo]=void 0;var n=!0}catch{}var o=OR.call(e);return n&&(t?e[lo]=r:delete e[lo]),o}var Zl=LR;var AR=Object.prototype,UR=AR.toString;function NR(e){return UR.call(e)}var $l=NR;var CR="[object Null]",bR="[object Undefined]",ef=ye?ye.toStringTag:void 0;function IR(e){return e==null?e===void 0?bR:CR:ef&&ef in Object(e)?Zl(e):$l(e)}var we=IR;function PR(e){return e!=null&&typeof e=="object"}var ce=PR;var vR="[object Symbol]";function MR(e){return typeof e=="symbol"||ce(e)&&we(e)==vR}var dt=MR;function kR(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var ht=kR;var wR=Array.isArray,N=wR;var _R=1/0,tf=ye?ye.prototype:void 0,rf=tf?tf.toString:void 0;function nf(e){if(typeof e=="string")return e;if(N(e))return ht(e,nf)+"";if(dt(e))return rf?rf.call(e):"";var t=e+"";return t=="0"&&1/e==-_R?"-0":t}var of=nf;var BR=/\s/;function FR(e){for(var t=e.length;t--&&BR.test(e.charAt(t)););return t}var af=FR;var DR=/^\s+/;function jR(e){return e&&e.slice(0,af(e)+1).replace(DR,"")}var sf=jR;function GR(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var $=GR;var cf=NaN,HR=/^[-+]0x[0-9a-f]+$/i,KR=/^0b[01]+$/i,WR=/^0o[0-7]+$/i,VR=parseInt;function qR(e){if(typeof e=="number")return e;if(dt(e))return cf;if($(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=$(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=sf(e);var r=KR.test(e);return r||WR.test(e)?VR(e.slice(2),r?2:8):HR.test(e)?cf:+e}var uf=qR;var lf=1/0,YR=17976931348623157e292;function zR(e){if(!e)return e===0?e:0;if(e=uf(e),e===lf||e===-lf){var t=e<0?-1:1;return t*YR}return e===e?e:0}var ff=zR;function XR(e){var t=ff(e),r=t%1;return t===t?r?t-r:t:0}var mt=XR;function JR(e){return e}var He=JR;var QR="[object AsyncFunction]",ZR="[object Function]",$R="[object GeneratorFunction]",ex="[object Proxy]";function tx(e){if(!$(e))return!1;var t=we(e);return t==ZR||t==$R||t==QR||t==ex}var _e=tx;var rx=fe["__core-js_shared__"],Ei=rx;var pf=(function(){var e=/[^.]+$/.exec(Ei&&Ei.keys&&Ei.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function nx(e){return!!pf&&pf in e}var df=nx;var ox=Function.prototype,ix=ox.toString;function ax(e){if(e!=null){try{return ix.call(e)}catch{}try{return e+""}catch{}}return""}var Bt=ax;var sx=/[\\^$.*+?()[\]{}|]/g,cx=/^\[object .+?Constructor\]$/,ux=Function.prototype,lx=Object.prototype,fx=ux.toString,px=lx.hasOwnProperty,dx=RegExp("^"+fx.call(px).replace(sx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hx(e){if(!$(e)||df(e))return!1;var t=_e(e)?dx:cx;return t.test(Bt(e))}var hf=hx;function mx(e,t){return e?.[t]}var mf=mx;function gx(e,t){var r=mf(e,t);return hf(r)?r:void 0}var Ke=gx;var Ex=Ke(fe,"WeakMap"),yi=Ex;var gf=Object.create,yx=(function(){function e(){}return function(t){if(!$(t))return{};if(gf)return gf(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),Ef=yx;function Sx(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var yf=Sx;function Tx(){}var ee=Tx;function Rx(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Sf=Rx;var xx=800,Ox=16,Lx=Date.now;function Ax(e){var t=0,r=0;return function(){var n=Lx(),o=Ox-(n-r);if(r=n,o>0){if(++t>=xx)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Tf=Ax;function Ux(e){return function(){return e}}var Rf=Ux;var Nx=(function(){try{var e=Ke(Object,"defineProperty");return e({},"",{}),e}catch{}})(),sn=Nx;var Cx=sn?function(e,t){return sn(e,"toString",{configurable:!0,enumerable:!1,value:Rf(t),writable:!0})}:He,xf=Cx;var bx=Tf(xf),Of=bx;function Ix(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var Si=Ix;function Px(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}var Ti=Px;function vx(e){return e!==e}var Lf=vx;function Mx(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}var Af=Mx;function kx(e,t,r){return t===t?Af(e,t,r):Ti(e,Lf,r)}var cn=kx;function wx(e,t){var r=e==null?0:e.length;return!!r&&cn(e,t,0)>-1}var Ri=wx;var _x=9007199254740991,Bx=/^(?:0|[1-9]\d*)$/;function Fx(e,t){var r=typeof e;return t=t??_x,!!t&&(r=="number"||r!="symbol"&&Bx.test(e))&&e>-1&&e%1==0&&e<t}var fr=Fx;function Dx(e,t,r){t=="__proto__"&&sn?sn(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var un=Dx;function jx(e,t){return e===t||e!==e&&t!==t}var gt=jx;var Gx=Object.prototype,Hx=Gx.hasOwnProperty;function Kx(e,t,r){var n=e[t];(!(Hx.call(e,t)&&gt(n,r))||r===void 0&&!(t in e))&&un(e,t,r)}var pr=Kx;function Wx(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var s=t[i],c=n?n(r[s],e[s],s,r,e):void 0;c===void 0&&(c=e[s]),o?un(r,s,c):pr(r,s,c)}return r}var Et=Wx;var Uf=Math.max;function Vx(e,t,r){return t=Uf(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=Uf(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),yf(e,this,s)}}var Nf=Vx;function qx(e,t){return Of(Nf(e,t,He),e+"")}var ln=qx;var Yx=9007199254740991;function zx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Yx}var fn=zx;function Xx(e){return e!=null&&fn(e.length)&&!_e(e)}var pe=Xx;function Jx(e,t,r){if(!$(r))return!1;var n=typeof t;return(n=="number"?pe(r)&&fr(t,r.length):n=="string"&&t in r)?gt(r[t],e):!1}var dr=Jx;function Qx(e){return ln(function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&dr(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t})}var Cf=Qx;var Zx=Object.prototype;function $x(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Zx;return e===r}var yt=$x;function eO(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var bf=eO;var tO="[object Arguments]";function rO(e){return ce(e)&&we(e)==tO}var Gs=rO;var If=Object.prototype,nO=If.hasOwnProperty,oO=If.propertyIsEnumerable,iO=Gs((function(){return arguments})())?Gs:function(e){return ce(e)&&nO.call(e,"callee")&&!oO.call(e,"callee")},hr=iO;function aO(){return!1}var Pf=aO;var kf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vf=kf&&typeof module=="object"&&module&&!module.nodeType&&module,sO=vf&&vf.exports===kf,Mf=sO?fe.Buffer:void 0,cO=Mf?Mf.isBuffer:void 0,uO=cO||Pf,Ft=uO;var lO="[object Arguments]",fO="[object Array]",pO="[object Boolean]",dO="[object Date]",hO="[object Error]",mO="[object Function]",gO="[object Map]",EO="[object Number]",yO="[object Object]",SO="[object RegExp]",TO="[object Set]",RO="[object String]",xO="[object WeakMap]",OO="[object ArrayBuffer]",LO="[object DataView]",AO="[object Float32Array]",UO="[object Float64Array]",NO="[object Int8Array]",CO="[object Int16Array]",bO="[object Int32Array]",IO="[object Uint8Array]",PO="[object Uint8ClampedArray]",vO="[object Uint16Array]",MO="[object Uint32Array]",X={};X[AO]=X[UO]=X[NO]=X[CO]=X[bO]=X[IO]=X[PO]=X[vO]=X[MO]=!0;X[lO]=X[fO]=X[OO]=X[pO]=X[LO]=X[dO]=X[hO]=X[mO]=X[gO]=X[EO]=X[yO]=X[SO]=X[TO]=X[RO]=X[xO]=!1;function kO(e){return ce(e)&&fn(e.length)&&!!X[we(e)]}var wf=kO;function wO(e){return function(t){return e(t)}}var St=wO;var _f=typeof exports=="object"&&exports&&!exports.nodeType&&exports,fo=_f&&typeof module=="object"&&module&&!module.nodeType&&module,_O=fo&&fo.exports===_f,Hs=_O&&gi.process,BO=(function(){try{var e=fo&&fo.require&&fo.require("util").types;return e||Hs&&Hs.binding&&Hs.binding("util")}catch{}})(),rt=BO;var Bf=rt&&rt.isTypedArray,FO=Bf?St(Bf):wf,pn=FO;var DO=Object.prototype,jO=DO.hasOwnProperty;function GO(e,t){var r=N(e),n=!r&&hr(e),o=!r&&!n&&Ft(e),i=!r&&!n&&!o&&pn(e),a=r||n||o||i,s=a?bf(e.length,String):[],c=s.length;for(var u in e)(t||jO.call(e,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||fr(u,c)))&&s.push(u);return s}var xi=GO;function HO(e,t){return function(r){return e(t(r))}}var Oi=HO;var KO=Oi(Object.keys,Object),Ff=KO;var WO=Object.prototype,VO=WO.hasOwnProperty;function qO(e){if(!yt(e))return Ff(e);var t=[];for(var r in Object(e))VO.call(e,r)&&r!="constructor"&&t.push(r);return t}var Li=qO;function YO(e){return pe(e)?xi(e):Li(e)}var K=YO;var zO=Object.prototype,XO=zO.hasOwnProperty,JO=Cf(function(e,t){if(yt(t)||pe(t)){Et(t,K(t),e);return}for(var r in t)XO.call(t,r)&&pr(e,r,t[r])}),Ae=JO;function QO(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Df=QO;var ZO=Object.prototype,$O=ZO.hasOwnProperty;function eL(e){if(!$(e))return Df(e);var t=yt(e),r=[];for(var n in e)n=="constructor"&&(t||!$O.call(e,n))||r.push(n);return r}var jf=eL;function tL(e){return pe(e)?xi(e,!0):jf(e)}var mr=tL;var rL=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nL=/^\w*$/;function oL(e,t){if(N(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||dt(e)?!0:nL.test(e)||!rL.test(e)||t!=null&&e in Object(t)}var dn=oL;var iL=Ke(Object,"create"),Dt=iL;function aL(){this.__data__=Dt?Dt(null):{},this.size=0}var Gf=aL;function sL(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Hf=sL;var cL="__lodash_hash_undefined__",uL=Object.prototype,lL=uL.hasOwnProperty;function fL(e){var t=this.__data__;if(Dt){var r=t[e];return r===cL?void 0:r}return lL.call(t,e)?t[e]:void 0}var Kf=fL;var pL=Object.prototype,dL=pL.hasOwnProperty;function hL(e){var t=this.__data__;return Dt?t[e]!==void 0:dL.call(t,e)}var Wf=hL;var mL="__lodash_hash_undefined__";function gL(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Dt&&t===void 0?mL:t,this}var Vf=gL;function hn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}hn.prototype.clear=Gf;hn.prototype.delete=Hf;hn.prototype.get=Kf;hn.prototype.has=Wf;hn.prototype.set=Vf;var Ks=hn;function EL(){this.__data__=[],this.size=0}var qf=EL;function yL(e,t){for(var r=e.length;r--;)if(gt(e[r][0],t))return r;return-1}var gr=yL;var SL=Array.prototype,TL=SL.splice;function RL(e){var t=this.__data__,r=gr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():TL.call(t,r,1),--this.size,!0}var Yf=RL;function xL(e){var t=this.__data__,r=gr(t,e);return r<0?void 0:t[r][1]}var zf=xL;function OL(e){return gr(this.__data__,e)>-1}var Xf=OL;function LL(e,t){var r=this.__data__,n=gr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Jf=LL;function mn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}mn.prototype.clear=qf;mn.prototype.delete=Yf;mn.prototype.get=zf;mn.prototype.has=Xf;mn.prototype.set=Jf;var Er=mn;var AL=Ke(fe,"Map"),yr=AL;function UL(){this.size=0,this.__data__={hash:new Ks,map:new(yr||Er),string:new Ks}}var Qf=UL;function NL(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Zf=NL;function CL(e,t){var r=e.__data__;return Zf(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Sr=CL;function bL(e){var t=Sr(this,e).delete(e);return this.size-=t?1:0,t}var $f=bL;function IL(e){return Sr(this,e).get(e)}var ep=IL;function PL(e){return Sr(this,e).has(e)}var tp=PL;function vL(e,t){var r=Sr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var rp=vL;function gn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}gn.prototype.clear=Qf;gn.prototype.delete=$f;gn.prototype.get=ep;gn.prototype.has=tp;gn.prototype.set=rp;var Fr=gn;var ML="Expected a function";function Ws(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ML);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Ws.Cache||Fr),r}Ws.Cache=Fr;var np=Ws;var kL=500;function wL(e){var t=np(e,function(n){return r.size===kL&&r.clear(),n}),r=t.cache;return t}var op=wL;var _L=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,BL=/\\(\\)?/g,FL=op(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(_L,function(r,n,o,i){t.push(o?i.replace(BL,"$1"):n||r)}),t}),ip=FL;function DL(e){return e==null?"":of(e)}var ap=DL;function jL(e,t){return N(e)?e:dn(e,t)?[e]:ip(ap(e))}var Tr=jL;var GL=1/0;function HL(e){if(typeof e=="string"||dt(e))return e;var t=e+"";return t=="0"&&1/e==-GL?"-0":t}var Tt=HL;function KL(e,t){t=Tr(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Tt(t[r++])];return r&&r==n?e:void 0}var En=KL;function WL(e,t,r){var n=e==null?void 0:En(e,t);return n===void 0?r:n}var sp=WL;function VL(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var yn=VL;var cp=ye?ye.isConcatSpreadable:void 0;function qL(e){return N(e)||hr(e)||!!(cp&&e&&e[cp])}var up=qL;function lp(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=up),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?lp(s,t-1,r,n,o):yn(o,s):n||(o[o.length]=s)}return o}var Sn=lp;function YL(e){var t=e==null?0:e.length;return t?Sn(e,1):[]}var ue=YL;var zL=Oi(Object.getPrototypeOf,Object),Ai=zL;function XL(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}var Ui=XL;function JL(e,t,r,n){var o=-1,i=e==null?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}var fp=JL;function QL(){this.__data__=new Er,this.size=0}var pp=QL;function ZL(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var dp=ZL;function $L(e){return this.__data__.get(e)}var hp=$L;function e0(e){return this.__data__.has(e)}var mp=e0;var t0=200;function r0(e,t){var r=this.__data__;if(r instanceof Er){var n=r.__data__;if(!yr||n.length<t0-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Fr(n)}return r.set(e,t),this.size=r.size,this}var gp=r0;function Tn(e){var t=this.__data__=new Er(e);this.size=t.size}Tn.prototype.clear=pp;Tn.prototype.delete=dp;Tn.prototype.get=hp;Tn.prototype.has=mp;Tn.prototype.set=gp;var Rr=Tn;function n0(e,t){return e&&Et(t,K(t),e)}var Ep=n0;function o0(e,t){return e&&Et(t,mr(t),e)}var yp=o0;var xp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Sp=xp&&typeof module=="object"&&module&&!module.nodeType&&module,i0=Sp&&Sp.exports===xp,Tp=i0?fe.Buffer:void 0,Rp=Tp?Tp.allocUnsafe:void 0;function a0(e,t){if(t)return e.slice();var r=e.length,n=Rp?Rp(r):new e.constructor(r);return e.copy(n),n}var Op=a0;function s0(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}var Rn=s0;function c0(){return[]}var Ni=c0;var u0=Object.prototype,l0=u0.propertyIsEnumerable,Lp=Object.getOwnPropertySymbols,f0=Lp?function(e){return e==null?[]:(e=Object(e),Rn(Lp(e),function(t){return l0.call(e,t)}))}:Ni,xn=f0;function p0(e,t){return Et(e,xn(e),t)}var Ap=p0;var d0=Object.getOwnPropertySymbols,h0=d0?function(e){for(var t=[];e;)yn(t,xn(e)),e=Ai(e);return t}:Ni,Ci=h0;function m0(e,t){return Et(e,Ci(e),t)}var Up=m0;function g0(e,t,r){var n=t(e);return N(e)?n:yn(n,r(e))}var bi=g0;function E0(e){return bi(e,K,xn)}var po=E0;function y0(e){return bi(e,mr,Ci)}var Ii=y0;var S0=Ke(fe,"DataView"),Pi=S0;var T0=Ke(fe,"Promise"),vi=T0;var R0=Ke(fe,"Set"),xr=R0;var Np="[object Map]",x0="[object Object]",Cp="[object Promise]",bp="[object Set]",Ip="[object WeakMap]",Pp="[object DataView]",O0=Bt(Pi),L0=Bt(yr),A0=Bt(vi),U0=Bt(xr),N0=Bt(yi),Dr=we;(Pi&&Dr(new Pi(new ArrayBuffer(1)))!=Pp||yr&&Dr(new yr)!=Np||vi&&Dr(vi.resolve())!=Cp||xr&&Dr(new xr)!=bp||yi&&Dr(new yi)!=Ip)&&(Dr=function(e){var t=we(e),r=t==x0?e.constructor:void 0,n=r?Bt(r):"";if(n)switch(n){case O0:return Pp;case L0:return Np;case A0:return Cp;case U0:return bp;case N0:return Ip}return t});var ct=Dr;var C0=Object.prototype,b0=C0.hasOwnProperty;function I0(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&b0.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var vp=I0;var P0=fe.Uint8Array,On=P0;function v0(e){var t=new e.constructor(e.byteLength);return new On(t).set(new On(e)),t}var Ln=v0;function M0(e,t){var r=t?Ln(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Mp=M0;var k0=/\w*$/;function w0(e){var t=new e.constructor(e.source,k0.exec(e));return t.lastIndex=e.lastIndex,t}var kp=w0;var wp=ye?ye.prototype:void 0,_p=wp?wp.valueOf:void 0;function _0(e){return _p?Object(_p.call(e)):{}}var Bp=_0;function B0(e,t){var r=t?Ln(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Fp=B0;var F0="[object Boolean]",D0="[object Date]",j0="[object Map]",G0="[object Number]",H0="[object RegExp]",K0="[object Set]",W0="[object String]",V0="[object Symbol]",q0="[object ArrayBuffer]",Y0="[object DataView]",z0="[object Float32Array]",X0="[object Float64Array]",J0="[object Int8Array]",Q0="[object Int16Array]",Z0="[object Int32Array]",$0="[object Uint8Array]",eA="[object Uint8ClampedArray]",tA="[object Uint16Array]",rA="[object Uint32Array]";function nA(e,t,r){var n=e.constructor;switch(t){case q0:return Ln(e);case F0:case D0:return new n(+e);case Y0:return Mp(e,r);case z0:case X0:case J0:case Q0:case Z0:case $0:case eA:case tA:case rA:return Fp(e,r);case j0:return new n;case G0:case W0:return new n(e);case H0:return kp(e);case K0:return new n;case V0:return Bp(e)}}var Dp=nA;function oA(e){return typeof e.constructor=="function"&&!yt(e)?Ef(Ai(e)):{}}var jp=oA;var iA="[object Map]";function aA(e){return ce(e)&&ct(e)==iA}var Gp=aA;var Hp=rt&&rt.isMap,sA=Hp?St(Hp):Gp,Kp=sA;var cA="[object Set]";function uA(e){return ce(e)&&ct(e)==cA}var Wp=uA;var Vp=rt&&rt.isSet,lA=Vp?St(Vp):Wp,qp=lA;var fA=1,pA=2,dA=4,Yp="[object Arguments]",hA="[object Array]",mA="[object Boolean]",gA="[object Date]",EA="[object Error]",zp="[object Function]",yA="[object GeneratorFunction]",SA="[object Map]",TA="[object Number]",Xp="[object Object]",RA="[object RegExp]",xA="[object Set]",OA="[object String]",LA="[object Symbol]",AA="[object WeakMap]",UA="[object ArrayBuffer]",NA="[object DataView]",CA="[object Float32Array]",bA="[object Float64Array]",IA="[object Int8Array]",PA="[object Int16Array]",vA="[object Int32Array]",MA="[object Uint8Array]",kA="[object Uint8ClampedArray]",wA="[object Uint16Array]",_A="[object Uint32Array]",W={};W[Yp]=W[hA]=W[UA]=W[NA]=W[mA]=W[gA]=W[CA]=W[bA]=W[IA]=W[PA]=W[vA]=W[SA]=W[TA]=W[Xp]=W[RA]=W[xA]=W[OA]=W[LA]=W[MA]=W[kA]=W[wA]=W[_A]=!0;W[EA]=W[zp]=W[AA]=!1;function Mi(e,t,r,n,o,i){var a,s=t&fA,c=t&pA,u=t&dA;if(r&&(a=o?r(e,n,o,i):r(e)),a!==void 0)return a;if(!$(e))return e;var l=N(e);if(l){if(a=vp(e),!s)return Sf(e,a)}else{var f=ct(e),p=f==zp||f==yA;if(Ft(e))return Op(e,s);if(f==Xp||f==Yp||p&&!o){if(a=c||p?{}:jp(e),!s)return c?Up(e,yp(a,e)):Ap(e,Ep(a,e))}else{if(!W[f])return o?e:{};a=Dp(e,f,s)}}i||(i=new Rr);var h=i.get(e);if(h)return h;i.set(e,a),qp(e)?e.forEach(function(S){a.add(Mi(S,t,r,S,e,i))}):Kp(e)&&e.forEach(function(S,d){a.set(d,Mi(S,t,r,d,e,i))});var E=u?c?Ii:po:c?mr:K,y=l?void 0:E(e);return Si(y||e,function(S,d){y&&(d=S,S=e[d]),pr(a,d,Mi(S,t,r,d,e,i))}),a}var Jp=Mi;var BA=4;function FA(e){return Jp(e,BA)}var V=FA;function DA(e){for(var t=-1,r=e==null?0:e.length,n=0,o=[];++t<r;){var i=e[t];i&&(o[n++]=i)}return o}var Rt=DA;var jA="__lodash_hash_undefined__";function GA(e){return this.__data__.set(e,jA),this}var Qp=GA;function HA(e){return this.__data__.has(e)}var Zp=HA;function ki(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Fr;++t<r;)this.add(e[t])}ki.prototype.add=ki.prototype.push=Qp;ki.prototype.has=Zp;var An=ki;function KA(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var wi=KA;function WA(e,t){return e.has(t)}var Un=WA;var VA=1,qA=2;function YA(e,t,r,n,o,i){var a=r&VA,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var f=-1,p=!0,h=r&qA?new An:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var E=e[f],y=t[f];if(n)var S=a?n(y,E,f,t,e,i):n(E,y,f,e,t,i);if(S!==void 0){if(S)continue;p=!1;break}if(h){if(!wi(t,function(d,g){if(!Un(h,g)&&(E===d||o(E,d,r,n,i)))return h.push(g)})){p=!1;break}}else if(!(E===y||o(E,y,r,n,i))){p=!1;break}}return i.delete(e),i.delete(t),p}var _i=YA;function zA(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}var $p=zA;function XA(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Nn=XA;var JA=1,QA=2,ZA="[object Boolean]",$A="[object Date]",eU="[object Error]",tU="[object Map]",rU="[object Number]",nU="[object RegExp]",oU="[object Set]",iU="[object String]",aU="[object Symbol]",sU="[object ArrayBuffer]",cU="[object DataView]",ed=ye?ye.prototype:void 0,Vs=ed?ed.valueOf:void 0;function uU(e,t,r,n,o,i,a){switch(r){case cU:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case sU:return!(e.byteLength!=t.byteLength||!i(new On(e),new On(t)));case ZA:case $A:case rU:return gt(+e,+t);case eU:return e.name==t.name&&e.message==t.message;case nU:case iU:return e==t+"";case tU:var s=$p;case oU:var c=n&JA;if(s||(s=Nn),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=QA,a.set(e,t);var l=_i(s(e),s(t),n,o,i,a);return a.delete(e),l;case aU:if(Vs)return Vs.call(e)==Vs.call(t)}return!1}var td=uU;var lU=1,fU=Object.prototype,pU=fU.hasOwnProperty;function dU(e,t,r,n,o,i){var a=r&lU,s=po(e),c=s.length,u=po(t),l=u.length;if(c!=l&&!a)return!1;for(var f=c;f--;){var p=s[f];if(!(a?p in t:pU.call(t,p)))return!1}var h=i.get(e),E=i.get(t);if(h&&E)return h==t&&E==e;var y=!0;i.set(e,t),i.set(t,e);for(var S=a;++f<c;){p=s[f];var d=e[p],g=t[p];if(n)var m=a?n(g,d,p,t,e,i):n(d,g,p,e,t,i);if(!(m===void 0?d===g||o(d,g,r,n,i):m)){y=!1;break}S||(S=p=="constructor")}if(y&&!S){var x=e.constructor,C=t.constructor;x!=C&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof C=="function"&&C instanceof C)&&(y=!1)}return i.delete(e),i.delete(t),y}var rd=dU;var hU=1,nd="[object Arguments]",od="[object Array]",Bi="[object Object]",mU=Object.prototype,id=mU.hasOwnProperty;function gU(e,t,r,n,o,i){var a=N(e),s=N(t),c=a?od:ct(e),u=s?od:ct(t);c=c==nd?Bi:c,u=u==nd?Bi:u;var l=c==Bi,f=u==Bi,p=c==u;if(p&&Ft(e)){if(!Ft(t))return!1;a=!0,l=!1}if(p&&!l)return i||(i=new Rr),a||pn(e)?_i(e,t,r,n,o,i):td(e,t,c,r,n,o,i);if(!(r&hU)){var h=l&&id.call(e,"__wrapped__"),E=f&&id.call(t,"__wrapped__");if(h||E){var y=h?e.value():e,S=E?t.value():t;return i||(i=new Rr),o(y,S,r,n,i)}}return p?(i||(i=new Rr),rd(e,t,r,n,o,i)):!1}var ad=gU;function sd(e,t,r,n,o){return e===t?!0:e==null||t==null||!ce(e)&&!ce(t)?e!==e&&t!==t:ad(e,t,r,n,sd,o)}var Fi=sd;var EU=1,yU=2;function SU(e,t,r,n){var o=r.length,i=o,a=!n;if(e==null)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){s=r[o];var c=s[0],u=e[c],l=s[1];if(a&&s[2]){if(u===void 0&&!(c in e))return!1}else{var f=new Rr;if(n)var p=n(u,l,c,e,t,f);if(!(p===void 0?Fi(l,u,EU|yU,n,f):p))return!1}}return!0}var cd=SU;function TU(e){return e===e&&!$(e)}var Di=TU;function RU(e){for(var t=K(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Di(o)]}return t}var ud=RU;function xU(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var ji=xU;function OU(e){var t=ud(e);return t.length==1&&t[0][2]?ji(t[0][0],t[0][1]):function(r){return r===e||cd(r,e,t)}}var ld=OU;function LU(e,t){return e!=null&&t in Object(e)}var fd=LU;function AU(e,t,r){t=Tr(t,e);for(var n=-1,o=t.length,i=!1;++n<o;){var a=Tt(t[n]);if(!(i=e!=null&&r(e,a)))break;e=e[a]}return i||++n!=o?i:(o=e==null?0:e.length,!!o&&fn(o)&&fr(a,o)&&(N(e)||hr(e)))}var Gi=AU;function UU(e,t){return e!=null&&Gi(e,t,fd)}var pd=UU;var NU=1,CU=2;function bU(e,t){return dn(e)&&Di(t)?ji(Tt(e),t):function(r){var n=sp(r,e);return n===void 0&&n===t?pd(r,e):Fi(t,n,NU|CU)}}var dd=bU;function IU(e){return function(t){return t?.[e]}}var hd=IU;function PU(e){return function(t){return En(t,e)}}var md=PU;function vU(e){return dn(e)?hd(Tt(e)):md(e)}var gd=vU;function MU(e){return typeof e=="function"?e:e==null?He:typeof e=="object"?N(e)?dd(e[0],e[1]):ld(e):gd(e)}var se=MU;function kU(e,t,r,n){for(var o=-1,i=e==null?0:e.length;++o<i;){var a=e[o];t(n,a,r(a),e)}return n}var Ed=kU;function wU(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var c=a[e?s:++o];if(r(i[c],c,i)===!1)break}return t}}var yd=wU;var _U=yd(),Sd=_U;function BU(e,t){return e&&Sd(e,t,K)}var Td=BU;function FU(e,t){return function(r,n){if(r==null)return r;if(!pe(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Object(r);(t?i--:++i<o)&&n(a[i],i,a)!==!1;);return r}}var Rd=FU;var DU=Rd(Td),We=DU;function jU(e,t,r,n){return We(e,function(o,i,a){t(n,o,r(o),a)}),n}var xd=jU;function GU(e,t){return function(r,n){var o=N(r)?Ed:xd,i=t?t():{};return o(r,e,se(n,2),i)}}var Od=GU;var Ld=Object.prototype,HU=Ld.hasOwnProperty,KU=ln(function(e,t){e=Object(e);var r=-1,n=t.length,o=n>2?t[2]:void 0;for(o&&dr(t[0],t[1],o)&&(n=1);++r<n;)for(var i=t[r],a=mr(i),s=-1,c=a.length;++s<c;){var u=a[s],l=e[u];(l===void 0||gt(l,Ld[u])&&!HU.call(e,u))&&(e[u]=i[u])}return e}),Cn=KU;function WU(e){return ce(e)&&pe(e)}var qs=WU;function VU(e,t,r){for(var n=-1,o=e==null?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}var Hi=VU;var qU=200;function YU(e,t,r,n){var o=-1,i=Ri,a=!0,s=e.length,c=[],u=t.length;if(!s)return c;r&&(t=ht(t,St(r))),n?(i=Hi,a=!1):t.length>=qU&&(i=Un,a=!1,t=new An(t));e:for(;++o<s;){var l=e[o],f=r==null?l:r(l);if(l=n||l!==0?l:0,a&&f===f){for(var p=u;p--;)if(t[p]===f)continue e;c.push(l)}else i(t,f,n)||c.push(l)}return c}var Ad=YU;var zU=ln(function(e,t){return qs(e)?Ad(e,Sn(t,1,qs,!0)):[]}),Or=zU;function XU(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var xt=XU;function JU(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:mt(t),Ui(e,t<0?0:t,n)):[]}var le=JU;function QU(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:mt(t),t=n-t,Ui(e,0,t<0?0:t)):[]}var jt=QU;function ZU(e){return typeof e=="function"?e:He}var Ud=ZU;function $U(e,t){var r=N(e)?Si:We;return r(e,Ud(t))}var L=$U;function e2(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var Nd=e2;function t2(e,t){var r=!0;return We(e,function(n,o,i){return r=!!t(n,o,i),r}),r}var Cd=t2;function r2(e,t,r){var n=N(e)?Nd:Cd;return r&&dr(e,t,r)&&(t=void 0),n(e,se(t,3))}var Ie=r2;function n2(e,t){var r=[];return We(e,function(n,o,i){t(n,o,i)&&r.push(n)}),r}var Ki=n2;function o2(e,t){var r=N(e)?Rn:Ki;return r(e,se(t,3))}var Se=o2;function i2(e){return function(t,r,n){var o=Object(t);if(!pe(t)){var i=se(r,3);t=K(t),r=function(s){return i(o[s],s,o)}}var a=e(t,r,n);return a>-1?o[i?t[a]:a]:void 0}}var bd=i2;var a2=Math.max;function s2(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var o=r==null?0:mt(r);return o<0&&(o=a2(n+o,0)),Ti(e,se(t,3),o)}var Id=s2;var c2=bd(Id),Ot=c2;function u2(e){return e&&e.length?e[0]:void 0}var Te=u2;function l2(e,t){var r=-1,n=pe(e)?Array(e.length):[];return We(e,function(o,i,a){n[++r]=t(o,i,a)}),n}var Pd=l2;function f2(e,t){var r=N(e)?ht:Pd;return r(e,se(t,3))}var R=f2;function p2(e,t){return Sn(R(e,t),1)}var Ue=p2;var d2=Object.prototype,h2=d2.hasOwnProperty,m2=Od(function(e,t,r){h2.call(e,r)?e[r].push(t):un(e,r,[t])}),Ys=m2;var g2=Object.prototype,E2=g2.hasOwnProperty;function y2(e,t){return e!=null&&E2.call(e,t)}var vd=y2;function S2(e,t){return e!=null&&Gi(e,t,vd)}var U=S2;var T2="[object String]";function R2(e){return typeof e=="string"||!N(e)&&ce(e)&&we(e)==T2}var me=R2;function x2(e,t){return ht(t,function(r){return e[r]})}var Md=x2;function O2(e){return e==null?[]:Md(e,K(e))}var j=O2;var L2=Math.max;function A2(e,t,r,n){e=pe(e)?e:j(e),r=r&&!n?mt(r):0;var o=e.length;return r<0&&(r=L2(o+r,0)),me(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&cn(e,t,r)>-1}var J=A2;var U2=Math.max;function N2(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var o=r==null?0:mt(r);return o<0&&(o=U2(n+o,0)),cn(e,t,o)}var Wi=N2;var C2="[object Map]",b2="[object Set]",I2=Object.prototype,P2=I2.hasOwnProperty;function v2(e){if(e==null)return!0;if(pe(e)&&(N(e)||typeof e=="string"||typeof e.splice=="function"||Ft(e)||pn(e)||hr(e)))return!e.length;var t=ct(e);if(t==C2||t==b2)return!e.size;if(yt(e))return!Li(e).length;for(var r in e)if(P2.call(e,r))return!1;return!0}var v=v2;var M2="[object RegExp]";function k2(e){return ce(e)&&we(e)==M2}var kd=k2;var wd=rt&&rt.isRegExp,w2=wd?St(wd):kd,nt=w2;function _2(e){return e===void 0}var Pe=_2;function B2(e,t){return e<t}var _d=B2;function F2(e,t,r){for(var n=-1,o=e.length;++n<o;){var i=e[n],a=t(i);if(a!=null&&(s===void 0?a===a&&!dt(a):r(a,s)))var s=a,c=i}return c}var Bd=F2;function D2(e){return e&&e.length?Bd(e,He,_d):void 0}var Fd=D2;var j2="Expected a function";function G2(e){if(typeof e!="function")throw new TypeError(j2);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var Dd=G2;function H2(e,t,r,n){if(!$(e))return e;t=Tr(t,e);for(var o=-1,i=t.length,a=i-1,s=e;s!=null&&++o<i;){var c=Tt(t[o]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(o!=a){var l=s[c];u=n?n(l,c,s):void 0,u===void 0&&(u=$(l)?l:fr(t[o+1])?[]:{})}pr(s,c,u),s=s[c]}return e}var jd=H2;function K2(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=En(e,a);r(s,a)&&jd(i,Tr(a,e),s)}return i}var Gd=K2;function W2(e,t){if(e==null)return{};var r=ht(Ii(e),function(n){return[n]});return t=se(t),Gd(e,r,function(n,o){return t(n,o[0])})}var Ve=W2;function V2(e,t,r,n,o){return o(e,function(i,a,s){r=n?(n=!1,i):t(r,i,a,s)}),r}var Hd=V2;function q2(e,t,r){var n=N(e)?fp:Hd,o=arguments.length<3;return n(e,se(t,4),r,o,We)}var te=q2;function Y2(e,t){var r=N(e)?Rn:Ki;return r(e,Dd(se(t,3)))}var Lr=Y2;function z2(e,t){var r;return We(e,function(n,o,i){return r=t(n,o,i),!r}),!!r}var Kd=z2;function X2(e,t,r){var n=N(e)?wi:Kd;return r&&dr(e,t,r)&&(t=void 0),n(e,se(t,3))}var ho=X2;var J2=1/0,Q2=xr&&1/Nn(new xr([,-0]))[1]==J2?function(e){return new xr(e)}:ee,Wd=Q2;var Z2=200;function $2(e,t,r){var n=-1,o=Ri,i=e.length,a=!0,s=[],c=s;if(r)a=!1,o=Hi;else if(i>=Z2){var u=t?null:Wd(e);if(u)return Nn(u);a=!1,o=Un,c=new An}else c=t?[]:s;e:for(;++n<i;){var l=e[n],f=t?t(l):l;if(l=r||l!==0?l:0,a&&f===f){for(var p=c.length;p--;)if(c[p]===f)continue e;t&&c.push(f),s.push(l)}else o(c,f,r)||(c!==s&&c.push(f),s.push(l))}return s}var Vi=$2;function eN(e){return e&&e.length?Vi(e):[]}var bn=eN;function tN(e,t){return e&&e.length?Vi(e,se(t,2)):[]}var Vd=tN;function In(e){console&&console.error&&console.error(`Error: ${e}`)}function mo(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function go(e){let t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}function Eo(e){function t(){}t.prototype=e;let r=new t;function n(){return typeof r.bar}return n(),n(),e;(0,eval)(e)}function rN(e){return nN(e)?e.LABEL:e.name}function nN(e){return me(e.LABEL)&&e.LABEL!==""}var Xe=class{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),L(this.definition,r=>{r.accept(t)})}},B=class extends Xe{constructor(t){super([]),this.idx=1,Ae(this,Ve(t,r=>r!==void 0))}set definition(t){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(t){t.visit(this)}},Be=class extends Xe{constructor(t){super(t.definition),this.orgText="",Ae(this,Ve(t,r=>r!==void 0))}},q=class extends Xe{constructor(t){super(t.definition),this.ignoreAmbiguities=!1,Ae(this,Ve(t,r=>r!==void 0))}},F=class extends Xe{constructor(t){super(t.definition),this.idx=1,Ae(this,Ve(t,r=>r!==void 0))}},Y=class extends Xe{constructor(t){super(t.definition),this.idx=1,Ae(this,Ve(t,r=>r!==void 0))}},z=class extends Xe{constructor(t){super(t.definition),this.idx=1,Ae(this,Ve(t,r=>r!==void 0))}},w=class extends Xe{constructor(t){super(t.definition),this.idx=1,Ae(this,Ve(t,r=>r!==void 0))}},G=class extends Xe{constructor(t){super(t.definition),this.idx=1,Ae(this,Ve(t,r=>r!==void 0))}},H=class extends Xe{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Ae(this,Ve(t,r=>r!==void 0))}},M=class{constructor(t){this.idx=1,Ae(this,Ve(t,r=>r!==void 0))}accept(t){t.visit(this)}};function qi(e){return R(e,Pn)}function Pn(e){function t(r){return R(r,Pn)}if(e instanceof B){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return me(e.label)&&(r.label=e.label),r}else{if(e instanceof q)return{type:"Alternative",definition:t(e.definition)};if(e instanceof F)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Y)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof z)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Pn(new M({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof G)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Pn(new M({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof w)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof H)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof M){let r={type:"Terminal",name:e.terminalType.name,label:rN(e.terminalType),idx:e.idx};me(e.label)&&(r.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=nt(n)?n.source:n),r}else{if(e instanceof Be)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}var Fe=class{visit(t){let r=t;switch(r.constructor){case B:return this.visitNonTerminal(r);case q:return this.visitAlternative(r);case F:return this.visitOption(r);case Y:return this.visitRepetitionMandatory(r);case z:return this.visitRepetitionMandatoryWithSeparator(r);case G:return this.visitRepetitionWithSeparator(r);case w:return this.visitRepetition(r);case H:return this.visitAlternation(r);case M:return this.visitTerminal(r);case Be:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}};function zs(e){return e instanceof q||e instanceof F||e instanceof w||e instanceof Y||e instanceof z||e instanceof G||e instanceof M||e instanceof Be}function jr(e,t=[]){return e instanceof F||e instanceof w||e instanceof G?!0:e instanceof H?ho(e.definition,n=>jr(n,t)):e instanceof B&&J(t,e)?!1:e instanceof Xe?(e instanceof B&&t.push(e),Ie(e.definition,n=>jr(n,t))):!1}function Xs(e){return e instanceof H}function qe(e){if(e instanceof B)return"SUBRULE";if(e instanceof F)return"OPTION";if(e instanceof H)return"OR";if(e instanceof Y)return"AT_LEAST_ONE";if(e instanceof z)return"AT_LEAST_ONE_SEP";if(e instanceof G)return"MANY_SEP";if(e instanceof w)return"MANY";if(e instanceof M)return"CONSUME";throw Error("non exhaustive match")}var Gt=class{walk(t,r=[]){L(t.definition,(n,o)=>{let i=le(t.definition,o+1);if(n instanceof B)this.walkProdRef(n,i,r);else if(n instanceof M)this.walkTerminal(n,i,r);else if(n instanceof q)this.walkFlat(n,i,r);else if(n instanceof F)this.walkOption(n,i,r);else if(n instanceof Y)this.walkAtLeastOne(n,i,r);else if(n instanceof z)this.walkAtLeastOneSep(n,i,r);else if(n instanceof G)this.walkManySep(n,i,r);else if(n instanceof w)this.walkMany(n,i,r);else if(n instanceof H)this.walkOr(n,i,r);else throw Error("non exhaustive match")})}walkTerminal(t,r,n){}walkProdRef(t,r,n){}walkFlat(t,r,n){let o=r.concat(n);this.walk(t,o)}walkOption(t,r,n){let o=r.concat(n);this.walk(t,o)}walkAtLeastOne(t,r,n){let o=[new F({definition:t.definition})].concat(r,n);this.walk(t,o)}walkAtLeastOneSep(t,r,n){let o=qd(t,r,n);this.walk(t,o)}walkMany(t,r,n){let o=[new F({definition:t.definition})].concat(r,n);this.walk(t,o)}walkManySep(t,r,n){let o=qd(t,r,n);this.walk(t,o)}walkOr(t,r,n){let o=r.concat(n);L(t.definition,i=>{let a=new q({definition:[i]});this.walk(a,o)})}};function qd(e,t,r){return[new F({definition:[new M({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function Gr(e){if(e instanceof B)return Gr(e.referencedRule);if(e instanceof M)return aN(e);if(zs(e))return oN(e);if(Xs(e))return iN(e);throw Error("non exhaustive match")}function oN(e){let t=[],r=e.definition,n=0,o=r.length>n,i,a=!0;for(;o&&a;)i=r[n],a=jr(i),t=t.concat(Gr(i)),n=n+1,o=r.length>n;return bn(t)}function iN(e){let t=R(e.definition,r=>Gr(r));return bn(ue(t))}function aN(e){return[e.terminalType]}var Yi="_~IN~_";var Js=class extends Gt{constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,r,n){}walkProdRef(t,r,n){let o=sN(t.referencedRule,t.idx)+this.topProd.name,i=r.concat(n),a=new q({definition:i}),s=Gr(a);this.follows[o]=s}};function Yd(e){let t={};return L(e,r=>{let n=new Js(r).startWalking();Ae(t,n)}),t}function sN(e,t){return e.name+t+Yi}function b(e){return e.charCodeAt(0)}function zi(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}function vn(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}function Hr(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}function yo(){throw Error("Internal Error - Should never get here!")}function Qs(e){return e.type==="Character"}var So=[];for(let e=b("0");e<=b("9");e++)So.push(e);var To=[b("_")].concat(So);for(let e=b("a");e<=b("z");e++)To.push(e);for(let e=b("A");e<=b("Z");e++)To.push(e);var Zs=[b(" "),b("\f"),b(`
41
- `),b("\r"),b(" "),b("\v"),b(" "),b("\xA0"),b("\u1680"),b("\u2000"),b("\u2001"),b("\u2002"),b("\u2003"),b("\u2004"),b("\u2005"),b("\u2006"),b("\u2007"),b("\u2008"),b("\u2009"),b("\u200A"),b("\u2028"),b("\u2029"),b("\u202F"),b("\u205F"),b("\u3000"),b("\uFEFF")];var cN=/[0-9a-fA-F]/,Xi=/[0-9]/,uN=/[1-9]/,Ro=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":vn(n,"global");break;case"i":vn(n,"ignoreCase");break;case"m":vn(n,"multiLine");break;case"u":vn(n,"unicode");break;case"y":vn(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let t=[],r=this.idx;for(t.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(r)}}alternative(){let t=[],r=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}Hr(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(t)}}return yo()}quantifier(t=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let o=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:o,atMost:o};break;case",":let i;this.isDigit()?(i=this.integerIncludingZero(),r={atLeast:o,atMost:i}):r={atLeast:o,atMost:1/0},this.consumeChar("}");break}if(t===!0&&r===void 0)return;Hr(r);break}if(!(t===!0&&r===void 0)&&Hr(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let t,r=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group();break}return t===void 0&&this.isPatternCharacter()&&(t=this.patternCharacter()),Hr(t)?(t.loc=this.loc(r),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):yo()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[b(`
42
- `),b("\r"),b("\u2028"),b("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,r=!1;switch(this.popChar()){case"d":t=So;break;case"D":t=So,r=!0;break;case"s":t=Zs;break;case"S":t=Zs,r=!0;break;case"w":t=To;break;case"W":t=To,r=!0;break}return Hr(t)?{type:"Set",value:t,complement:r}:yo()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=b("\f");break;case"n":t=b(`
43
- `);break;case"r":t=b("\r");break;case"t":t=b(" ");break;case"v":t=b("\v");break}return Hr(t)?{type:"Character",value:t}:yo()}controlLetterEscapeAtom(){this.consumeChar("c");let t=this.popChar();if(/[a-zA-Z]/.test(t)===!1)throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:b("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let t=this.popChar();return{type:"Character",value:b(t)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
44
- `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let t=this.popChar();return{type:"Character",value:b(t)}}}characterClass(){let t=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),o=n.type==="Character";if(Qs(n)&&this.isRangeDash()){this.consumeChar("-");let i=this.classAtom(),a=i.type==="Character";if(Qs(i)){if(i.value<n.value)throw Error("Range out of order in character class");t.push({from:n.value,to:i.value})}else zi(n.value,t),t.push(b("-")),zi(i.value,t)}else zi(n.value,t)}return this.consumeChar("]"),{type:"Set",complement:r,value:t}}classAtom(){switch(this.peekChar()){case"]":case`
45
- `:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:b("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let t=!0;this.consumeChar("("),this.peekChar(0)==="?"?(this.consumeChar("?"),this.consumeChar(":"),t=!1):this.groupIdx++;let r=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:t,value:r};return t&&(n.idx=this.groupIdx),n}positiveInteger(){let t=this.popChar();if(uN.test(t)===!1)throw Error("Expecting a positive integer");for(;Xi.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}integerIncludingZero(){let t=this.popChar();if(Xi.test(t)===!1)throw Error("Expecting an integer");for(;Xi.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}patternCharacter(){let t=this.popChar();switch(t){case`
46
- `:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:b(t)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return Xi.test(this.peekChar(0))}isClassAtom(t=0){switch(this.peekChar(t)){case"]":case`
40
+ </svg>`;function js(e){return ER.replace("%%%FG%%%",e==="light"?gR:mR)}var gE=require("node:fs");var yR=typeof global=="object"&&global&&global.Object===Object&&global,mi=yR;var SR=typeof self=="object"&&self&&self.Object===Object&&self,TR=mi||SR||Function("return this")(),fe=TR;var RR=fe.Symbol,ye=RR;var Ql=Object.prototype,xR=Ql.hasOwnProperty,OR=Ql.toString,uo=ye?ye.toStringTag:void 0;function LR(e){var t=xR.call(e,uo),r=e[uo];try{e[uo]=void 0;var n=!0}catch{}var o=OR.call(e);return n&&(t?e[uo]=r:delete e[uo]),o}var Zl=LR;var AR=Object.prototype,UR=AR.toString;function NR(e){return UR.call(e)}var $l=NR;var CR="[object Null]",bR="[object Undefined]",ef=ye?ye.toStringTag:void 0;function IR(e){return e==null?e===void 0?bR:CR:ef&&ef in Object(e)?Zl(e):$l(e)}var we=IR;function PR(e){return e!=null&&typeof e=="object"}var ce=PR;var vR="[object Symbol]";function MR(e){return typeof e=="symbol"||ce(e)&&we(e)==vR}var dt=MR;function kR(e,t){for(var r=-1,n=e==null?0:e.length,o=Array(n);++r<n;)o[r]=t(e[r],r,e);return o}var ht=kR;var wR=Array.isArray,N=wR;var _R=1/0,tf=ye?ye.prototype:void 0,rf=tf?tf.toString:void 0;function nf(e){if(typeof e=="string")return e;if(N(e))return ht(e,nf)+"";if(dt(e))return rf?rf.call(e):"";var t=e+"";return t=="0"&&1/e==-_R?"-0":t}var of=nf;var BR=/\s/;function FR(e){for(var t=e.length;t--&&BR.test(e.charAt(t)););return t}var af=FR;var DR=/^\s+/;function jR(e){return e&&e.slice(0,af(e)+1).replace(DR,"")}var sf=jR;function GR(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}var $=GR;var cf=NaN,HR=/^[-+]0x[0-9a-f]+$/i,KR=/^0b[01]+$/i,WR=/^0o[0-7]+$/i,VR=parseInt;function qR(e){if(typeof e=="number")return e;if(dt(e))return cf;if($(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=$(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=sf(e);var r=KR.test(e);return r||WR.test(e)?VR(e.slice(2),r?2:8):HR.test(e)?cf:+e}var uf=qR;var lf=1/0,YR=17976931348623157e292;function zR(e){if(!e)return e===0?e:0;if(e=uf(e),e===lf||e===-lf){var t=e<0?-1:1;return t*YR}return e===e?e:0}var ff=zR;function XR(e){var t=ff(e),r=t%1;return t===t?r?t-r:t:0}var mt=XR;function JR(e){return e}var He=JR;var QR="[object AsyncFunction]",ZR="[object Function]",$R="[object GeneratorFunction]",ex="[object Proxy]";function tx(e){if(!$(e))return!1;var t=we(e);return t==ZR||t==$R||t==QR||t==ex}var _e=tx;var rx=fe["__core-js_shared__"],gi=rx;var pf=(function(){var e=/[^.]+$/.exec(gi&&gi.keys&&gi.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function nx(e){return!!pf&&pf in e}var df=nx;var ox=Function.prototype,ix=ox.toString;function ax(e){if(e!=null){try{return ix.call(e)}catch{}try{return e+""}catch{}}return""}var Bt=ax;var sx=/[\\^$.*+?()[\]{}|]/g,cx=/^\[object .+?Constructor\]$/,ux=Function.prototype,lx=Object.prototype,fx=ux.toString,px=lx.hasOwnProperty,dx=RegExp("^"+fx.call(px).replace(sx,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function hx(e){if(!$(e)||df(e))return!1;var t=_e(e)?dx:cx;return t.test(Bt(e))}var hf=hx;function mx(e,t){return e?.[t]}var mf=mx;function gx(e,t){var r=mf(e,t);return hf(r)?r:void 0}var Ke=gx;var Ex=Ke(fe,"WeakMap"),Ei=Ex;var gf=Object.create,yx=(function(){function e(){}return function(t){if(!$(t))return{};if(gf)return gf(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),Ef=yx;function Sx(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}var yf=Sx;function Tx(){}var ee=Tx;function Rx(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}var Sf=Rx;var xx=800,Ox=16,Lx=Date.now;function Ax(e){var t=0,r=0;return function(){var n=Lx(),o=Ox-(n-r);if(r=n,o>0){if(++t>=xx)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}var Tf=Ax;function Ux(e){return function(){return e}}var Rf=Ux;var Nx=(function(){try{var e=Ke(Object,"defineProperty");return e({},"",{}),e}catch{}})(),sn=Nx;var Cx=sn?function(e,t){return sn(e,"toString",{configurable:!0,enumerable:!1,value:Rf(t),writable:!0})}:He,xf=Cx;var bx=Tf(xf),Of=bx;function Ix(e,t){for(var r=-1,n=e==null?0:e.length;++r<n&&t(e[r],r,e)!==!1;);return e}var yi=Ix;function Px(e,t,r,n){for(var o=e.length,i=r+(n?1:-1);n?i--:++i<o;)if(t(e[i],i,e))return i;return-1}var Si=Px;function vx(e){return e!==e}var Lf=vx;function Mx(e,t,r){for(var n=r-1,o=e.length;++n<o;)if(e[n]===t)return n;return-1}var Af=Mx;function kx(e,t,r){return t===t?Af(e,t,r):Si(e,Lf,r)}var cn=kx;function wx(e,t){var r=e==null?0:e.length;return!!r&&cn(e,t,0)>-1}var Ti=wx;var _x=9007199254740991,Bx=/^(?:0|[1-9]\d*)$/;function Fx(e,t){var r=typeof e;return t=t??_x,!!t&&(r=="number"||r!="symbol"&&Bx.test(e))&&e>-1&&e%1==0&&e<t}var fr=Fx;function Dx(e,t,r){t=="__proto__"&&sn?sn(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var un=Dx;function jx(e,t){return e===t||e!==e&&t!==t}var gt=jx;var Gx=Object.prototype,Hx=Gx.hasOwnProperty;function Kx(e,t,r){var n=e[t];(!(Hx.call(e,t)&&gt(n,r))||r===void 0&&!(t in e))&&un(e,t,r)}var pr=Kx;function Wx(e,t,r,n){var o=!r;r||(r={});for(var i=-1,a=t.length;++i<a;){var s=t[i],c=n?n(r[s],e[s],s,r,e):void 0;c===void 0&&(c=e[s]),o?un(r,s,c):pr(r,s,c)}return r}var Et=Wx;var Uf=Math.max;function Vx(e,t,r){return t=Uf(t===void 0?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=Uf(n.length-t,0),a=Array(i);++o<i;)a[o]=n[t+o];o=-1;for(var s=Array(t+1);++o<t;)s[o]=n[o];return s[t]=r(a),yf(e,this,s)}}var Nf=Vx;function qx(e,t){return Of(Nf(e,t,He),e+"")}var ln=qx;var Yx=9007199254740991;function zx(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=Yx}var fn=zx;function Xx(e){return e!=null&&fn(e.length)&&!_e(e)}var pe=Xx;function Jx(e,t,r){if(!$(r))return!1;var n=typeof t;return(n=="number"?pe(r)&&fr(t,r.length):n=="string"&&t in r)?gt(r[t],e):!1}var dr=Jx;function Qx(e){return ln(function(t,r){var n=-1,o=r.length,i=o>1?r[o-1]:void 0,a=o>2?r[2]:void 0;for(i=e.length>3&&typeof i=="function"?(o--,i):void 0,a&&dr(r[0],r[1],a)&&(i=o<3?void 0:i,o=1),t=Object(t);++n<o;){var s=r[n];s&&e(t,s,n,i)}return t})}var Cf=Qx;var Zx=Object.prototype;function $x(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||Zx;return e===r}var yt=$x;function eO(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}var bf=eO;var tO="[object Arguments]";function rO(e){return ce(e)&&we(e)==tO}var Gs=rO;var If=Object.prototype,nO=If.hasOwnProperty,oO=If.propertyIsEnumerable,iO=Gs((function(){return arguments})())?Gs:function(e){return ce(e)&&nO.call(e,"callee")&&!oO.call(e,"callee")},hr=iO;function aO(){return!1}var Pf=aO;var kf=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vf=kf&&typeof module=="object"&&module&&!module.nodeType&&module,sO=vf&&vf.exports===kf,Mf=sO?fe.Buffer:void 0,cO=Mf?Mf.isBuffer:void 0,uO=cO||Pf,Ft=uO;var lO="[object Arguments]",fO="[object Array]",pO="[object Boolean]",dO="[object Date]",hO="[object Error]",mO="[object Function]",gO="[object Map]",EO="[object Number]",yO="[object Object]",SO="[object RegExp]",TO="[object Set]",RO="[object String]",xO="[object WeakMap]",OO="[object ArrayBuffer]",LO="[object DataView]",AO="[object Float32Array]",UO="[object Float64Array]",NO="[object Int8Array]",CO="[object Int16Array]",bO="[object Int32Array]",IO="[object Uint8Array]",PO="[object Uint8ClampedArray]",vO="[object Uint16Array]",MO="[object Uint32Array]",X={};X[AO]=X[UO]=X[NO]=X[CO]=X[bO]=X[IO]=X[PO]=X[vO]=X[MO]=!0;X[lO]=X[fO]=X[OO]=X[pO]=X[LO]=X[dO]=X[hO]=X[mO]=X[gO]=X[EO]=X[yO]=X[SO]=X[TO]=X[RO]=X[xO]=!1;function kO(e){return ce(e)&&fn(e.length)&&!!X[we(e)]}var wf=kO;function wO(e){return function(t){return e(t)}}var St=wO;var _f=typeof exports=="object"&&exports&&!exports.nodeType&&exports,lo=_f&&typeof module=="object"&&module&&!module.nodeType&&module,_O=lo&&lo.exports===_f,Hs=_O&&mi.process,BO=(function(){try{var e=lo&&lo.require&&lo.require("util").types;return e||Hs&&Hs.binding&&Hs.binding("util")}catch{}})(),rt=BO;var Bf=rt&&rt.isTypedArray,FO=Bf?St(Bf):wf,pn=FO;var DO=Object.prototype,jO=DO.hasOwnProperty;function GO(e,t){var r=N(e),n=!r&&hr(e),o=!r&&!n&&Ft(e),i=!r&&!n&&!o&&pn(e),a=r||n||o||i,s=a?bf(e.length,String):[],c=s.length;for(var u in e)(t||jO.call(e,u))&&!(a&&(u=="length"||o&&(u=="offset"||u=="parent")||i&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||fr(u,c)))&&s.push(u);return s}var Ri=GO;function HO(e,t){return function(r){return e(t(r))}}var xi=HO;var KO=xi(Object.keys,Object),Ff=KO;var WO=Object.prototype,VO=WO.hasOwnProperty;function qO(e){if(!yt(e))return Ff(e);var t=[];for(var r in Object(e))VO.call(e,r)&&r!="constructor"&&t.push(r);return t}var Oi=qO;function YO(e){return pe(e)?Ri(e):Oi(e)}var K=YO;var zO=Object.prototype,XO=zO.hasOwnProperty,JO=Cf(function(e,t){if(yt(t)||pe(t)){Et(t,K(t),e);return}for(var r in t)XO.call(t,r)&&pr(e,r,t[r])}),Ae=JO;function QO(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}var Df=QO;var ZO=Object.prototype,$O=ZO.hasOwnProperty;function eL(e){if(!$(e))return Df(e);var t=yt(e),r=[];for(var n in e)n=="constructor"&&(t||!$O.call(e,n))||r.push(n);return r}var jf=eL;function tL(e){return pe(e)?Ri(e,!0):jf(e)}var mr=tL;var rL=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nL=/^\w*$/;function oL(e,t){if(N(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||dt(e)?!0:nL.test(e)||!rL.test(e)||t!=null&&e in Object(t)}var dn=oL;var iL=Ke(Object,"create"),Dt=iL;function aL(){this.__data__=Dt?Dt(null):{},this.size=0}var Gf=aL;function sL(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}var Hf=sL;var cL="__lodash_hash_undefined__",uL=Object.prototype,lL=uL.hasOwnProperty;function fL(e){var t=this.__data__;if(Dt){var r=t[e];return r===cL?void 0:r}return lL.call(t,e)?t[e]:void 0}var Kf=fL;var pL=Object.prototype,dL=pL.hasOwnProperty;function hL(e){var t=this.__data__;return Dt?t[e]!==void 0:dL.call(t,e)}var Wf=hL;var mL="__lodash_hash_undefined__";function gL(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Dt&&t===void 0?mL:t,this}var Vf=gL;function hn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}hn.prototype.clear=Gf;hn.prototype.delete=Hf;hn.prototype.get=Kf;hn.prototype.has=Wf;hn.prototype.set=Vf;var Ks=hn;function EL(){this.__data__=[],this.size=0}var qf=EL;function yL(e,t){for(var r=e.length;r--;)if(gt(e[r][0],t))return r;return-1}var gr=yL;var SL=Array.prototype,TL=SL.splice;function RL(e){var t=this.__data__,r=gr(t,e);if(r<0)return!1;var n=t.length-1;return r==n?t.pop():TL.call(t,r,1),--this.size,!0}var Yf=RL;function xL(e){var t=this.__data__,r=gr(t,e);return r<0?void 0:t[r][1]}var zf=xL;function OL(e){return gr(this.__data__,e)>-1}var Xf=OL;function LL(e,t){var r=this.__data__,n=gr(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Jf=LL;function mn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}mn.prototype.clear=qf;mn.prototype.delete=Yf;mn.prototype.get=zf;mn.prototype.has=Xf;mn.prototype.set=Jf;var Er=mn;var AL=Ke(fe,"Map"),yr=AL;function UL(){this.size=0,this.__data__={hash:new Ks,map:new(yr||Er),string:new Ks}}var Qf=UL;function NL(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}var Zf=NL;function CL(e,t){var r=e.__data__;return Zf(t)?r[typeof t=="string"?"string":"hash"]:r.map}var Sr=CL;function bL(e){var t=Sr(this,e).delete(e);return this.size-=t?1:0,t}var $f=bL;function IL(e){return Sr(this,e).get(e)}var ep=IL;function PL(e){return Sr(this,e).has(e)}var tp=PL;function vL(e,t){var r=Sr(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var rp=vL;function gn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}gn.prototype.clear=Qf;gn.prototype.delete=$f;gn.prototype.get=ep;gn.prototype.has=tp;gn.prototype.set=rp;var Fr=gn;var ML="Expected a function";function Ws(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(ML);var r=function(){var n=arguments,o=t?t.apply(this,n):n[0],i=r.cache;if(i.has(o))return i.get(o);var a=e.apply(this,n);return r.cache=i.set(o,a)||i,a};return r.cache=new(Ws.Cache||Fr),r}Ws.Cache=Fr;var np=Ws;var kL=500;function wL(e){var t=np(e,function(n){return r.size===kL&&r.clear(),n}),r=t.cache;return t}var op=wL;var _L=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,BL=/\\(\\)?/g,FL=op(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(_L,function(r,n,o,i){t.push(o?i.replace(BL,"$1"):n||r)}),t}),ip=FL;function DL(e){return e==null?"":of(e)}var ap=DL;function jL(e,t){return N(e)?e:dn(e,t)?[e]:ip(ap(e))}var Tr=jL;var GL=1/0;function HL(e){if(typeof e=="string"||dt(e))return e;var t=e+"";return t=="0"&&1/e==-GL?"-0":t}var Tt=HL;function KL(e,t){t=Tr(t,e);for(var r=0,n=t.length;e!=null&&r<n;)e=e[Tt(t[r++])];return r&&r==n?e:void 0}var En=KL;function WL(e,t,r){var n=e==null?void 0:En(e,t);return n===void 0?r:n}var sp=WL;function VL(e,t){for(var r=-1,n=t.length,o=e.length;++r<n;)e[o+r]=t[r];return e}var yn=VL;var cp=ye?ye.isConcatSpreadable:void 0;function qL(e){return N(e)||hr(e)||!!(cp&&e&&e[cp])}var up=qL;function lp(e,t,r,n,o){var i=-1,a=e.length;for(r||(r=up),o||(o=[]);++i<a;){var s=e[i];t>0&&r(s)?t>1?lp(s,t-1,r,n,o):yn(o,s):n||(o[o.length]=s)}return o}var Sn=lp;function YL(e){var t=e==null?0:e.length;return t?Sn(e,1):[]}var ue=YL;var zL=xi(Object.getPrototypeOf,Object),Li=zL;function XL(e,t,r){var n=-1,o=e.length;t<0&&(t=-t>o?0:o+t),r=r>o?o:r,r<0&&(r+=o),o=t>r?0:r-t>>>0,t>>>=0;for(var i=Array(o);++n<o;)i[n]=e[n+t];return i}var Ai=XL;function JL(e,t,r,n){var o=-1,i=e==null?0:e.length;for(n&&i&&(r=e[++o]);++o<i;)r=t(r,e[o],o,e);return r}var fp=JL;function QL(){this.__data__=new Er,this.size=0}var pp=QL;function ZL(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}var dp=ZL;function $L(e){return this.__data__.get(e)}var hp=$L;function e0(e){return this.__data__.has(e)}var mp=e0;var t0=200;function r0(e,t){var r=this.__data__;if(r instanceof Er){var n=r.__data__;if(!yr||n.length<t0-1)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new Fr(n)}return r.set(e,t),this.size=r.size,this}var gp=r0;function Tn(e){var t=this.__data__=new Er(e);this.size=t.size}Tn.prototype.clear=pp;Tn.prototype.delete=dp;Tn.prototype.get=hp;Tn.prototype.has=mp;Tn.prototype.set=gp;var Rr=Tn;function n0(e,t){return e&&Et(t,K(t),e)}var Ep=n0;function o0(e,t){return e&&Et(t,mr(t),e)}var yp=o0;var xp=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Sp=xp&&typeof module=="object"&&module&&!module.nodeType&&module,i0=Sp&&Sp.exports===xp,Tp=i0?fe.Buffer:void 0,Rp=Tp?Tp.allocUnsafe:void 0;function a0(e,t){if(t)return e.slice();var r=e.length,n=Rp?Rp(r):new e.constructor(r);return e.copy(n),n}var Op=a0;function s0(e,t){for(var r=-1,n=e==null?0:e.length,o=0,i=[];++r<n;){var a=e[r];t(a,r,e)&&(i[o++]=a)}return i}var Rn=s0;function c0(){return[]}var Ui=c0;var u0=Object.prototype,l0=u0.propertyIsEnumerable,Lp=Object.getOwnPropertySymbols,f0=Lp?function(e){return e==null?[]:(e=Object(e),Rn(Lp(e),function(t){return l0.call(e,t)}))}:Ui,xn=f0;function p0(e,t){return Et(e,xn(e),t)}var Ap=p0;var d0=Object.getOwnPropertySymbols,h0=d0?function(e){for(var t=[];e;)yn(t,xn(e)),e=Li(e);return t}:Ui,Ni=h0;function m0(e,t){return Et(e,Ni(e),t)}var Up=m0;function g0(e,t,r){var n=t(e);return N(e)?n:yn(n,r(e))}var Ci=g0;function E0(e){return Ci(e,K,xn)}var fo=E0;function y0(e){return Ci(e,mr,Ni)}var bi=y0;var S0=Ke(fe,"DataView"),Ii=S0;var T0=Ke(fe,"Promise"),Pi=T0;var R0=Ke(fe,"Set"),xr=R0;var Np="[object Map]",x0="[object Object]",Cp="[object Promise]",bp="[object Set]",Ip="[object WeakMap]",Pp="[object DataView]",O0=Bt(Ii),L0=Bt(yr),A0=Bt(Pi),U0=Bt(xr),N0=Bt(Ei),Dr=we;(Ii&&Dr(new Ii(new ArrayBuffer(1)))!=Pp||yr&&Dr(new yr)!=Np||Pi&&Dr(Pi.resolve())!=Cp||xr&&Dr(new xr)!=bp||Ei&&Dr(new Ei)!=Ip)&&(Dr=function(e){var t=we(e),r=t==x0?e.constructor:void 0,n=r?Bt(r):"";if(n)switch(n){case O0:return Pp;case L0:return Np;case A0:return Cp;case U0:return bp;case N0:return Ip}return t});var ct=Dr;var C0=Object.prototype,b0=C0.hasOwnProperty;function I0(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&b0.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var vp=I0;var P0=fe.Uint8Array,On=P0;function v0(e){var t=new e.constructor(e.byteLength);return new On(t).set(new On(e)),t}var Ln=v0;function M0(e,t){var r=t?Ln(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}var Mp=M0;var k0=/\w*$/;function w0(e){var t=new e.constructor(e.source,k0.exec(e));return t.lastIndex=e.lastIndex,t}var kp=w0;var wp=ye?ye.prototype:void 0,_p=wp?wp.valueOf:void 0;function _0(e){return _p?Object(_p.call(e)):{}}var Bp=_0;function B0(e,t){var r=t?Ln(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}var Fp=B0;var F0="[object Boolean]",D0="[object Date]",j0="[object Map]",G0="[object Number]",H0="[object RegExp]",K0="[object Set]",W0="[object String]",V0="[object Symbol]",q0="[object ArrayBuffer]",Y0="[object DataView]",z0="[object Float32Array]",X0="[object Float64Array]",J0="[object Int8Array]",Q0="[object Int16Array]",Z0="[object Int32Array]",$0="[object Uint8Array]",eA="[object Uint8ClampedArray]",tA="[object Uint16Array]",rA="[object Uint32Array]";function nA(e,t,r){var n=e.constructor;switch(t){case q0:return Ln(e);case F0:case D0:return new n(+e);case Y0:return Mp(e,r);case z0:case X0:case J0:case Q0:case Z0:case $0:case eA:case tA:case rA:return Fp(e,r);case j0:return new n;case G0:case W0:return new n(e);case H0:return kp(e);case K0:return new n;case V0:return Bp(e)}}var Dp=nA;function oA(e){return typeof e.constructor=="function"&&!yt(e)?Ef(Li(e)):{}}var jp=oA;var iA="[object Map]";function aA(e){return ce(e)&&ct(e)==iA}var Gp=aA;var Hp=rt&&rt.isMap,sA=Hp?St(Hp):Gp,Kp=sA;var cA="[object Set]";function uA(e){return ce(e)&&ct(e)==cA}var Wp=uA;var Vp=rt&&rt.isSet,lA=Vp?St(Vp):Wp,qp=lA;var fA=1,pA=2,dA=4,Yp="[object Arguments]",hA="[object Array]",mA="[object Boolean]",gA="[object Date]",EA="[object Error]",zp="[object Function]",yA="[object GeneratorFunction]",SA="[object Map]",TA="[object Number]",Xp="[object Object]",RA="[object RegExp]",xA="[object Set]",OA="[object String]",LA="[object Symbol]",AA="[object WeakMap]",UA="[object ArrayBuffer]",NA="[object DataView]",CA="[object Float32Array]",bA="[object Float64Array]",IA="[object Int8Array]",PA="[object Int16Array]",vA="[object Int32Array]",MA="[object Uint8Array]",kA="[object Uint8ClampedArray]",wA="[object Uint16Array]",_A="[object Uint32Array]",W={};W[Yp]=W[hA]=W[UA]=W[NA]=W[mA]=W[gA]=W[CA]=W[bA]=W[IA]=W[PA]=W[vA]=W[SA]=W[TA]=W[Xp]=W[RA]=W[xA]=W[OA]=W[LA]=W[MA]=W[kA]=W[wA]=W[_A]=!0;W[EA]=W[zp]=W[AA]=!1;function vi(e,t,r,n,o,i){var a,s=t&fA,c=t&pA,u=t&dA;if(r&&(a=o?r(e,n,o,i):r(e)),a!==void 0)return a;if(!$(e))return e;var l=N(e);if(l){if(a=vp(e),!s)return Sf(e,a)}else{var f=ct(e),p=f==zp||f==yA;if(Ft(e))return Op(e,s);if(f==Xp||f==Yp||p&&!o){if(a=c||p?{}:jp(e),!s)return c?Up(e,yp(a,e)):Ap(e,Ep(a,e))}else{if(!W[f])return o?e:{};a=Dp(e,f,s)}}i||(i=new Rr);var h=i.get(e);if(h)return h;i.set(e,a),qp(e)?e.forEach(function(S){a.add(vi(S,t,r,S,e,i))}):Kp(e)&&e.forEach(function(S,d){a.set(d,vi(S,t,r,d,e,i))});var E=u?c?bi:fo:c?mr:K,y=l?void 0:E(e);return yi(y||e,function(S,d){y&&(d=S,S=e[d]),pr(a,d,vi(S,t,r,d,e,i))}),a}var Jp=vi;var BA=4;function FA(e){return Jp(e,BA)}var V=FA;function DA(e){for(var t=-1,r=e==null?0:e.length,n=0,o=[];++t<r;){var i=e[t];i&&(o[n++]=i)}return o}var Rt=DA;var jA="__lodash_hash_undefined__";function GA(e){return this.__data__.set(e,jA),this}var Qp=GA;function HA(e){return this.__data__.has(e)}var Zp=HA;function Mi(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new Fr;++t<r;)this.add(e[t])}Mi.prototype.add=Mi.prototype.push=Qp;Mi.prototype.has=Zp;var An=Mi;function KA(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(t(e[r],r,e))return!0;return!1}var ki=KA;function WA(e,t){return e.has(t)}var Un=WA;var VA=1,qA=2;function YA(e,t,r,n,o,i){var a=r&VA,s=e.length,c=t.length;if(s!=c&&!(a&&c>s))return!1;var u=i.get(e),l=i.get(t);if(u&&l)return u==t&&l==e;var f=-1,p=!0,h=r&qA?new An:void 0;for(i.set(e,t),i.set(t,e);++f<s;){var E=e[f],y=t[f];if(n)var S=a?n(y,E,f,t,e,i):n(E,y,f,e,t,i);if(S!==void 0){if(S)continue;p=!1;break}if(h){if(!ki(t,function(d,g){if(!Un(h,g)&&(E===d||o(E,d,r,n,i)))return h.push(g)})){p=!1;break}}else if(!(E===y||o(E,y,r,n,i))){p=!1;break}}return i.delete(e),i.delete(t),p}var wi=YA;function zA(e){var t=-1,r=Array(e.size);return e.forEach(function(n,o){r[++t]=[o,n]}),r}var $p=zA;function XA(e){var t=-1,r=Array(e.size);return e.forEach(function(n){r[++t]=n}),r}var Nn=XA;var JA=1,QA=2,ZA="[object Boolean]",$A="[object Date]",eU="[object Error]",tU="[object Map]",rU="[object Number]",nU="[object RegExp]",oU="[object Set]",iU="[object String]",aU="[object Symbol]",sU="[object ArrayBuffer]",cU="[object DataView]",ed=ye?ye.prototype:void 0,Vs=ed?ed.valueOf:void 0;function uU(e,t,r,n,o,i,a){switch(r){case cU:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case sU:return!(e.byteLength!=t.byteLength||!i(new On(e),new On(t)));case ZA:case $A:case rU:return gt(+e,+t);case eU:return e.name==t.name&&e.message==t.message;case nU:case iU:return e==t+"";case tU:var s=$p;case oU:var c=n&JA;if(s||(s=Nn),e.size!=t.size&&!c)return!1;var u=a.get(e);if(u)return u==t;n|=QA,a.set(e,t);var l=wi(s(e),s(t),n,o,i,a);return a.delete(e),l;case aU:if(Vs)return Vs.call(e)==Vs.call(t)}return!1}var td=uU;var lU=1,fU=Object.prototype,pU=fU.hasOwnProperty;function dU(e,t,r,n,o,i){var a=r&lU,s=fo(e),c=s.length,u=fo(t),l=u.length;if(c!=l&&!a)return!1;for(var f=c;f--;){var p=s[f];if(!(a?p in t:pU.call(t,p)))return!1}var h=i.get(e),E=i.get(t);if(h&&E)return h==t&&E==e;var y=!0;i.set(e,t),i.set(t,e);for(var S=a;++f<c;){p=s[f];var d=e[p],g=t[p];if(n)var m=a?n(g,d,p,t,e,i):n(d,g,p,e,t,i);if(!(m===void 0?d===g||o(d,g,r,n,i):m)){y=!1;break}S||(S=p=="constructor")}if(y&&!S){var x=e.constructor,C=t.constructor;x!=C&&"constructor"in e&&"constructor"in t&&!(typeof x=="function"&&x instanceof x&&typeof C=="function"&&C instanceof C)&&(y=!1)}return i.delete(e),i.delete(t),y}var rd=dU;var hU=1,nd="[object Arguments]",od="[object Array]",_i="[object Object]",mU=Object.prototype,id=mU.hasOwnProperty;function gU(e,t,r,n,o,i){var a=N(e),s=N(t),c=a?od:ct(e),u=s?od:ct(t);c=c==nd?_i:c,u=u==nd?_i:u;var l=c==_i,f=u==_i,p=c==u;if(p&&Ft(e)){if(!Ft(t))return!1;a=!0,l=!1}if(p&&!l)return i||(i=new Rr),a||pn(e)?wi(e,t,r,n,o,i):td(e,t,c,r,n,o,i);if(!(r&hU)){var h=l&&id.call(e,"__wrapped__"),E=f&&id.call(t,"__wrapped__");if(h||E){var y=h?e.value():e,S=E?t.value():t;return i||(i=new Rr),o(y,S,r,n,i)}}return p?(i||(i=new Rr),rd(e,t,r,n,o,i)):!1}var ad=gU;function sd(e,t,r,n,o){return e===t?!0:e==null||t==null||!ce(e)&&!ce(t)?e!==e&&t!==t:ad(e,t,r,n,sd,o)}var Bi=sd;var EU=1,yU=2;function SU(e,t,r,n){var o=r.length,i=o,a=!n;if(e==null)return!i;for(e=Object(e);o--;){var s=r[o];if(a&&s[2]?s[1]!==e[s[0]]:!(s[0]in e))return!1}for(;++o<i;){s=r[o];var c=s[0],u=e[c],l=s[1];if(a&&s[2]){if(u===void 0&&!(c in e))return!1}else{var f=new Rr;if(n)var p=n(u,l,c,e,t,f);if(!(p===void 0?Bi(l,u,EU|yU,n,f):p))return!1}}return!0}var cd=SU;function TU(e){return e===e&&!$(e)}var Fi=TU;function RU(e){for(var t=K(e),r=t.length;r--;){var n=t[r],o=e[n];t[r]=[n,o,Fi(o)]}return t}var ud=RU;function xU(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}var Di=xU;function OU(e){var t=ud(e);return t.length==1&&t[0][2]?Di(t[0][0],t[0][1]):function(r){return r===e||cd(r,e,t)}}var ld=OU;function LU(e,t){return e!=null&&t in Object(e)}var fd=LU;function AU(e,t,r){t=Tr(t,e);for(var n=-1,o=t.length,i=!1;++n<o;){var a=Tt(t[n]);if(!(i=e!=null&&r(e,a)))break;e=e[a]}return i||++n!=o?i:(o=e==null?0:e.length,!!o&&fn(o)&&fr(a,o)&&(N(e)||hr(e)))}var ji=AU;function UU(e,t){return e!=null&&ji(e,t,fd)}var pd=UU;var NU=1,CU=2;function bU(e,t){return dn(e)&&Fi(t)?Di(Tt(e),t):function(r){var n=sp(r,e);return n===void 0&&n===t?pd(r,e):Bi(t,n,NU|CU)}}var dd=bU;function IU(e){return function(t){return t?.[e]}}var hd=IU;function PU(e){return function(t){return En(t,e)}}var md=PU;function vU(e){return dn(e)?hd(Tt(e)):md(e)}var gd=vU;function MU(e){return typeof e=="function"?e:e==null?He:typeof e=="object"?N(e)?dd(e[0],e[1]):ld(e):gd(e)}var se=MU;function kU(e,t,r,n){for(var o=-1,i=e==null?0:e.length;++o<i;){var a=e[o];t(n,a,r(a),e)}return n}var Ed=kU;function wU(e){return function(t,r,n){for(var o=-1,i=Object(t),a=n(t),s=a.length;s--;){var c=a[e?s:++o];if(r(i[c],c,i)===!1)break}return t}}var yd=wU;var _U=yd(),Sd=_U;function BU(e,t){return e&&Sd(e,t,K)}var Td=BU;function FU(e,t){return function(r,n){if(r==null)return r;if(!pe(r))return e(r,n);for(var o=r.length,i=t?o:-1,a=Object(r);(t?i--:++i<o)&&n(a[i],i,a)!==!1;);return r}}var Rd=FU;var DU=Rd(Td),We=DU;function jU(e,t,r,n){return We(e,function(o,i,a){t(n,o,r(o),a)}),n}var xd=jU;function GU(e,t){return function(r,n){var o=N(r)?Ed:xd,i=t?t():{};return o(r,e,se(n,2),i)}}var Od=GU;var Ld=Object.prototype,HU=Ld.hasOwnProperty,KU=ln(function(e,t){e=Object(e);var r=-1,n=t.length,o=n>2?t[2]:void 0;for(o&&dr(t[0],t[1],o)&&(n=1);++r<n;)for(var i=t[r],a=mr(i),s=-1,c=a.length;++s<c;){var u=a[s],l=e[u];(l===void 0||gt(l,Ld[u])&&!HU.call(e,u))&&(e[u]=i[u])}return e}),Cn=KU;function WU(e){return ce(e)&&pe(e)}var qs=WU;function VU(e,t,r){for(var n=-1,o=e==null?0:e.length;++n<o;)if(r(t,e[n]))return!0;return!1}var Gi=VU;var qU=200;function YU(e,t,r,n){var o=-1,i=Ti,a=!0,s=e.length,c=[],u=t.length;if(!s)return c;r&&(t=ht(t,St(r))),n?(i=Gi,a=!1):t.length>=qU&&(i=Un,a=!1,t=new An(t));e:for(;++o<s;){var l=e[o],f=r==null?l:r(l);if(l=n||l!==0?l:0,a&&f===f){for(var p=u;p--;)if(t[p]===f)continue e;c.push(l)}else i(t,f,n)||c.push(l)}return c}var Ad=YU;var zU=ln(function(e,t){return qs(e)?Ad(e,Sn(t,1,qs,!0)):[]}),Or=zU;function XU(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}var xt=XU;function JU(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:mt(t),Ai(e,t<0?0:t,n)):[]}var le=JU;function QU(e,t,r){var n=e==null?0:e.length;return n?(t=r||t===void 0?1:mt(t),t=n-t,Ai(e,0,t<0?0:t)):[]}var jt=QU;function ZU(e){return typeof e=="function"?e:He}var Ud=ZU;function $U(e,t){var r=N(e)?yi:We;return r(e,Ud(t))}var L=$U;function e2(e,t){for(var r=-1,n=e==null?0:e.length;++r<n;)if(!t(e[r],r,e))return!1;return!0}var Nd=e2;function t2(e,t){var r=!0;return We(e,function(n,o,i){return r=!!t(n,o,i),r}),r}var Cd=t2;function r2(e,t,r){var n=N(e)?Nd:Cd;return r&&dr(e,t,r)&&(t=void 0),n(e,se(t,3))}var Ie=r2;function n2(e,t){var r=[];return We(e,function(n,o,i){t(n,o,i)&&r.push(n)}),r}var Hi=n2;function o2(e,t){var r=N(e)?Rn:Hi;return r(e,se(t,3))}var Se=o2;function i2(e){return function(t,r,n){var o=Object(t);if(!pe(t)){var i=se(r,3);t=K(t),r=function(s){return i(o[s],s,o)}}var a=e(t,r,n);return a>-1?o[i?t[a]:a]:void 0}}var bd=i2;var a2=Math.max;function s2(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var o=r==null?0:mt(r);return o<0&&(o=a2(n+o,0)),Si(e,se(t,3),o)}var Id=s2;var c2=bd(Id),Ot=c2;function u2(e){return e&&e.length?e[0]:void 0}var Te=u2;function l2(e,t){var r=-1,n=pe(e)?Array(e.length):[];return We(e,function(o,i,a){n[++r]=t(o,i,a)}),n}var Pd=l2;function f2(e,t){var r=N(e)?ht:Pd;return r(e,se(t,3))}var R=f2;function p2(e,t){return Sn(R(e,t),1)}var Ue=p2;var d2=Object.prototype,h2=d2.hasOwnProperty,m2=Od(function(e,t,r){h2.call(e,r)?e[r].push(t):un(e,r,[t])}),Ys=m2;var g2=Object.prototype,E2=g2.hasOwnProperty;function y2(e,t){return e!=null&&E2.call(e,t)}var vd=y2;function S2(e,t){return e!=null&&ji(e,t,vd)}var U=S2;var T2="[object String]";function R2(e){return typeof e=="string"||!N(e)&&ce(e)&&we(e)==T2}var me=R2;function x2(e,t){return ht(t,function(r){return e[r]})}var Md=x2;function O2(e){return e==null?[]:Md(e,K(e))}var j=O2;var L2=Math.max;function A2(e,t,r,n){e=pe(e)?e:j(e),r=r&&!n?mt(r):0;var o=e.length;return r<0&&(r=L2(o+r,0)),me(e)?r<=o&&e.indexOf(t,r)>-1:!!o&&cn(e,t,r)>-1}var J=A2;var U2=Math.max;function N2(e,t,r){var n=e==null?0:e.length;if(!n)return-1;var o=r==null?0:mt(r);return o<0&&(o=U2(n+o,0)),cn(e,t,o)}var Ki=N2;var C2="[object Map]",b2="[object Set]",I2=Object.prototype,P2=I2.hasOwnProperty;function v2(e){if(e==null)return!0;if(pe(e)&&(N(e)||typeof e=="string"||typeof e.splice=="function"||Ft(e)||pn(e)||hr(e)))return!e.length;var t=ct(e);if(t==C2||t==b2)return!e.size;if(yt(e))return!Oi(e).length;for(var r in e)if(P2.call(e,r))return!1;return!0}var v=v2;var M2="[object RegExp]";function k2(e){return ce(e)&&we(e)==M2}var kd=k2;var wd=rt&&rt.isRegExp,w2=wd?St(wd):kd,nt=w2;function _2(e){return e===void 0}var Pe=_2;function B2(e,t){return e<t}var _d=B2;function F2(e,t,r){for(var n=-1,o=e.length;++n<o;){var i=e[n],a=t(i);if(a!=null&&(s===void 0?a===a&&!dt(a):r(a,s)))var s=a,c=i}return c}var Bd=F2;function D2(e){return e&&e.length?Bd(e,He,_d):void 0}var Fd=D2;var j2="Expected a function";function G2(e){if(typeof e!="function")throw new TypeError(j2);return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var Dd=G2;function H2(e,t,r,n){if(!$(e))return e;t=Tr(t,e);for(var o=-1,i=t.length,a=i-1,s=e;s!=null&&++o<i;){var c=Tt(t[o]),u=r;if(c==="__proto__"||c==="constructor"||c==="prototype")return e;if(o!=a){var l=s[c];u=n?n(l,c,s):void 0,u===void 0&&(u=$(l)?l:fr(t[o+1])?[]:{})}pr(s,c,u),s=s[c]}return e}var jd=H2;function K2(e,t,r){for(var n=-1,o=t.length,i={};++n<o;){var a=t[n],s=En(e,a);r(s,a)&&jd(i,Tr(a,e),s)}return i}var Gd=K2;function W2(e,t){if(e==null)return{};var r=ht(bi(e),function(n){return[n]});return t=se(t),Gd(e,r,function(n,o){return t(n,o[0])})}var Ve=W2;function V2(e,t,r,n,o){return o(e,function(i,a,s){r=n?(n=!1,i):t(r,i,a,s)}),r}var Hd=V2;function q2(e,t,r){var n=N(e)?fp:Hd,o=arguments.length<3;return n(e,se(t,4),r,o,We)}var te=q2;function Y2(e,t){var r=N(e)?Rn:Hi;return r(e,Dd(se(t,3)))}var Lr=Y2;function z2(e,t){var r;return We(e,function(n,o,i){return r=t(n,o,i),!r}),!!r}var Kd=z2;function X2(e,t,r){var n=N(e)?ki:Kd;return r&&dr(e,t,r)&&(t=void 0),n(e,se(t,3))}var po=X2;var J2=1/0,Q2=xr&&1/Nn(new xr([,-0]))[1]==J2?function(e){return new xr(e)}:ee,Wd=Q2;var Z2=200;function $2(e,t,r){var n=-1,o=Ti,i=e.length,a=!0,s=[],c=s;if(r)a=!1,o=Gi;else if(i>=Z2){var u=t?null:Wd(e);if(u)return Nn(u);a=!1,o=Un,c=new An}else c=t?[]:s;e:for(;++n<i;){var l=e[n],f=t?t(l):l;if(l=r||l!==0?l:0,a&&f===f){for(var p=c.length;p--;)if(c[p]===f)continue e;t&&c.push(f),s.push(l)}else o(c,f,r)||(c!==s&&c.push(f),s.push(l))}return s}var Wi=$2;function eN(e){return e&&e.length?Wi(e):[]}var bn=eN;function tN(e,t){return e&&e.length?Wi(e,se(t,2)):[]}var Vd=tN;function In(e){console&&console.error&&console.error(`Error: ${e}`)}function ho(e){console&&console.warn&&console.warn(`Warning: ${e}`)}function mo(e){let t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}function go(e){function t(){}t.prototype=e;let r=new t;function n(){return typeof r.bar}return n(),n(),e;(0,eval)(e)}function rN(e){return nN(e)?e.LABEL:e.name}function nN(e){return me(e.LABEL)&&e.LABEL!==""}var Xe=class{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),L(this.definition,r=>{r.accept(t)})}},B=class extends Xe{constructor(t){super([]),this.idx=1,Ae(this,Ve(t,r=>r!==void 0))}set definition(t){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(t){t.visit(this)}},Be=class extends Xe{constructor(t){super(t.definition),this.orgText="",Ae(this,Ve(t,r=>r!==void 0))}},q=class extends Xe{constructor(t){super(t.definition),this.ignoreAmbiguities=!1,Ae(this,Ve(t,r=>r!==void 0))}},F=class extends Xe{constructor(t){super(t.definition),this.idx=1,Ae(this,Ve(t,r=>r!==void 0))}},Y=class extends Xe{constructor(t){super(t.definition),this.idx=1,Ae(this,Ve(t,r=>r!==void 0))}},z=class extends Xe{constructor(t){super(t.definition),this.idx=1,Ae(this,Ve(t,r=>r!==void 0))}},w=class extends Xe{constructor(t){super(t.definition),this.idx=1,Ae(this,Ve(t,r=>r!==void 0))}},G=class extends Xe{constructor(t){super(t.definition),this.idx=1,Ae(this,Ve(t,r=>r!==void 0))}},H=class extends Xe{get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,Ae(this,Ve(t,r=>r!==void 0))}},M=class{constructor(t){this.idx=1,Ae(this,Ve(t,r=>r!==void 0))}accept(t){t.visit(this)}};function Vi(e){return R(e,Pn)}function Pn(e){function t(r){return R(r,Pn)}if(e instanceof B){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return me(e.label)&&(r.label=e.label),r}else{if(e instanceof q)return{type:"Alternative",definition:t(e.definition)};if(e instanceof F)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Y)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof z)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Pn(new M({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof G)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Pn(new M({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof w)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof H)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof M){let r={type:"Terminal",name:e.terminalType.name,label:rN(e.terminalType),idx:e.idx};me(e.label)&&(r.terminalLabel=e.label);let n=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=nt(n)?n.source:n),r}else{if(e instanceof Be)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}var Fe=class{visit(t){let r=t;switch(r.constructor){case B:return this.visitNonTerminal(r);case q:return this.visitAlternative(r);case F:return this.visitOption(r);case Y:return this.visitRepetitionMandatory(r);case z:return this.visitRepetitionMandatoryWithSeparator(r);case G:return this.visitRepetitionWithSeparator(r);case w:return this.visitRepetition(r);case H:return this.visitAlternation(r);case M:return this.visitTerminal(r);case Be:return this.visitRule(r);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}};function zs(e){return e instanceof q||e instanceof F||e instanceof w||e instanceof Y||e instanceof z||e instanceof G||e instanceof M||e instanceof Be}function jr(e,t=[]){return e instanceof F||e instanceof w||e instanceof G?!0:e instanceof H?po(e.definition,n=>jr(n,t)):e instanceof B&&J(t,e)?!1:e instanceof Xe?(e instanceof B&&t.push(e),Ie(e.definition,n=>jr(n,t))):!1}function Xs(e){return e instanceof H}function qe(e){if(e instanceof B)return"SUBRULE";if(e instanceof F)return"OPTION";if(e instanceof H)return"OR";if(e instanceof Y)return"AT_LEAST_ONE";if(e instanceof z)return"AT_LEAST_ONE_SEP";if(e instanceof G)return"MANY_SEP";if(e instanceof w)return"MANY";if(e instanceof M)return"CONSUME";throw Error("non exhaustive match")}var Gt=class{walk(t,r=[]){L(t.definition,(n,o)=>{let i=le(t.definition,o+1);if(n instanceof B)this.walkProdRef(n,i,r);else if(n instanceof M)this.walkTerminal(n,i,r);else if(n instanceof q)this.walkFlat(n,i,r);else if(n instanceof F)this.walkOption(n,i,r);else if(n instanceof Y)this.walkAtLeastOne(n,i,r);else if(n instanceof z)this.walkAtLeastOneSep(n,i,r);else if(n instanceof G)this.walkManySep(n,i,r);else if(n instanceof w)this.walkMany(n,i,r);else if(n instanceof H)this.walkOr(n,i,r);else throw Error("non exhaustive match")})}walkTerminal(t,r,n){}walkProdRef(t,r,n){}walkFlat(t,r,n){let o=r.concat(n);this.walk(t,o)}walkOption(t,r,n){let o=r.concat(n);this.walk(t,o)}walkAtLeastOne(t,r,n){let o=[new F({definition:t.definition})].concat(r,n);this.walk(t,o)}walkAtLeastOneSep(t,r,n){let o=qd(t,r,n);this.walk(t,o)}walkMany(t,r,n){let o=[new F({definition:t.definition})].concat(r,n);this.walk(t,o)}walkManySep(t,r,n){let o=qd(t,r,n);this.walk(t,o)}walkOr(t,r,n){let o=r.concat(n);L(t.definition,i=>{let a=new q({definition:[i]});this.walk(a,o)})}};function qd(e,t,r){return[new F({definition:[new M({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}function Gr(e){if(e instanceof B)return Gr(e.referencedRule);if(e instanceof M)return aN(e);if(zs(e))return oN(e);if(Xs(e))return iN(e);throw Error("non exhaustive match")}function oN(e){let t=[],r=e.definition,n=0,o=r.length>n,i,a=!0;for(;o&&a;)i=r[n],a=jr(i),t=t.concat(Gr(i)),n=n+1,o=r.length>n;return bn(t)}function iN(e){let t=R(e.definition,r=>Gr(r));return bn(ue(t))}function aN(e){return[e.terminalType]}var qi="_~IN~_";var Js=class extends Gt{constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,r,n){}walkProdRef(t,r,n){let o=sN(t.referencedRule,t.idx)+this.topProd.name,i=r.concat(n),a=new q({definition:i}),s=Gr(a);this.follows[o]=s}};function Yd(e){let t={};return L(e,r=>{let n=new Js(r).startWalking();Ae(t,n)}),t}function sN(e,t){return e.name+t+qi}function b(e){return e.charCodeAt(0)}function Yi(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}function vn(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}function Hr(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}function Eo(){throw Error("Internal Error - Should never get here!")}function Qs(e){return e.type==="Character"}var yo=[];for(let e=b("0");e<=b("9");e++)yo.push(e);var So=[b("_")].concat(yo);for(let e=b("a");e<=b("z");e++)So.push(e);for(let e=b("A");e<=b("Z");e++)So.push(e);var Zs=[b(" "),b("\f"),b(`
41
+ `),b("\r"),b(" "),b("\v"),b(" "),b("\xA0"),b("\u1680"),b("\u2000"),b("\u2001"),b("\u2002"),b("\u2003"),b("\u2004"),b("\u2005"),b("\u2006"),b("\u2007"),b("\u2008"),b("\u2009"),b("\u200A"),b("\u2028"),b("\u2029"),b("\u202F"),b("\u205F"),b("\u3000"),b("\uFEFF")];var cN=/[0-9a-fA-F]/,zi=/[0-9]/,uN=/[1-9]/,To=class{constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");let r=this.disjunction();this.consumeChar("/");let n={type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1};for(;this.isRegExpFlag();)switch(this.popChar()){case"g":vn(n,"global");break;case"i":vn(n,"ignoreCase");break;case"m":vn(n,"multiLine");break;case"u":vn(n,"unicode");break;case"y":vn(n,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:n,value:r,loc:this.loc(0)}}disjunction(){let t=[],r=this.idx;for(t.push(this.alternative());this.peekChar()==="|";)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(r)}}alternative(){let t=[],r=this.idx;for(;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(r)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){let t=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(t)};case"$":return{type:"EndAnchor",loc:this.loc(t)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(t)};case"B":return{type:"NonWordBoundary",loc:this.loc(t)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let r;switch(this.popChar()){case"=":r="Lookahead";break;case"!":r="NegativeLookahead";break}Hr(r);let n=this.disjunction();return this.consumeChar(")"),{type:r,value:n,loc:this.loc(t)}}return Eo()}quantifier(t=!1){let r,n=this.idx;switch(this.popChar()){case"*":r={atLeast:0,atMost:1/0};break;case"+":r={atLeast:1,atMost:1/0};break;case"?":r={atLeast:0,atMost:1};break;case"{":let o=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:o,atMost:o};break;case",":let i;this.isDigit()?(i=this.integerIncludingZero(),r={atLeast:o,atMost:i}):r={atLeast:o,atMost:1/0},this.consumeChar("}");break}if(t===!0&&r===void 0)return;Hr(r);break}if(!(t===!0&&r===void 0)&&Hr(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(n),r}atom(){let t,r=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group();break}return t===void 0&&this.isPatternCharacter()&&(t=this.patternCharacter()),Hr(t)?(t.loc=this.loc(r),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):Eo()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[b(`
42
+ `),b("\r"),b("\u2028"),b("\u2029")]}}atomEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"1":case"2":case"3":case"4":case"5":case"6":case"7":case"8":case"9":return this.decimalEscapeAtom();case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}decimalEscapeAtom(){return{type:"GroupBackReference",value:this.positiveInteger()}}characterClassEscape(){let t,r=!1;switch(this.popChar()){case"d":t=yo;break;case"D":t=yo,r=!0;break;case"s":t=Zs;break;case"S":t=Zs,r=!0;break;case"w":t=So;break;case"W":t=So,r=!0;break}return Hr(t)?{type:"Set",value:t,complement:r}:Eo()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=b("\f");break;case"n":t=b(`
43
+ `);break;case"r":t=b("\r");break;case"t":t=b(" ");break;case"v":t=b("\v");break}return Hr(t)?{type:"Character",value:t}:Eo()}controlLetterEscapeAtom(){this.consumeChar("c");let t=this.popChar();if(/[a-zA-Z]/.test(t)===!1)throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:b("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){let t=this.popChar();return{type:"Character",value:b(t)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
44
+ `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let t=this.popChar();return{type:"Character",value:b(t)}}}characterClass(){let t=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let n=this.classAtom(),o=n.type==="Character";if(Qs(n)&&this.isRangeDash()){this.consumeChar("-");let i=this.classAtom(),a=i.type==="Character";if(Qs(i)){if(i.value<n.value)throw Error("Range out of order in character class");t.push({from:n.value,to:i.value})}else Yi(n.value,t),t.push(b("-")),Yi(i.value,t)}else Yi(n.value,t)}return this.consumeChar("]"),{type:"Set",complement:r,value:t}}classAtom(){switch(this.peekChar()){case"]":case`
45
+ `:case"\r":case"\u2028":case"\u2029":throw Error("TBD");case"\\":return this.classEscape();default:return this.classPatternCharacterAtom()}}classEscape(){switch(this.consumeChar("\\"),this.peekChar()){case"b":return this.consumeChar("b"),{type:"Character",value:b("\b")};case"d":case"D":case"s":case"S":case"w":case"W":return this.characterClassEscape();case"f":case"n":case"r":case"t":case"v":return this.controlEscapeAtom();case"c":return this.controlLetterEscapeAtom();case"0":return this.nulCharacterAtom();case"x":return this.hexEscapeSequenceAtom();case"u":return this.regExpUnicodeEscapeSequenceAtom();default:return this.identityEscapeAtom()}}group(){let t=!0;this.consumeChar("("),this.peekChar(0)==="?"?(this.consumeChar("?"),this.consumeChar(":"),t=!1):this.groupIdx++;let r=this.disjunction();this.consumeChar(")");let n={type:"Group",capturing:t,value:r};return t&&(n.idx=this.groupIdx),n}positiveInteger(){let t=this.popChar();if(uN.test(t)===!1)throw Error("Expecting a positive integer");for(;zi.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}integerIncludingZero(){let t=this.popChar();if(zi.test(t)===!1)throw Error("Expecting an integer");for(;zi.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}patternCharacter(){let t=this.popChar();switch(t){case`
46
+ `:case"\r":case"\u2028":case"\u2029":case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":throw Error("TBD");default:return{type:"Character",value:b(t)}}}isRegExpFlag(){switch(this.peekChar(0)){case"g":case"i":case"m":case"u":case"y":return!0;default:return!1}}isRangeDash(){return this.peekChar()==="-"&&this.isClassAtom(1)}isDigit(){return zi.test(this.peekChar(0))}isClassAtom(t=0){switch(this.peekChar(t)){case"]":case`
47
47
  `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}isTerm(){return this.isAtom()||this.isAssertion()}isAtom(){if(this.isPatternCharacter())return!0;switch(this.peekChar(0)){case".":case"\\":case"[":case"(":return!0;default:return!1}}isAssertion(){switch(this.peekChar(0)){case"^":case"$":return!0;case"\\":switch(this.peekChar(1)){case"b":case"B":return!0;default:return!1}case"(":return this.peekChar(1)==="?"&&(this.peekChar(2)==="="||this.peekChar(2)==="!");default:return!1}}isQuantifier(){let t=this.saveState();try{return this.quantifier(!0)!==void 0}catch{return!1}finally{this.restoreState(t)}}isPatternCharacter(){switch(this.peekChar()){case"^":case"$":case"\\":case".":case"*":case"+":case"?":case"(":case")":case"[":case"|":case"/":case`
48
- `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(t){let r="";for(let o=0;o<t;o++){let i=this.popChar();if(cN.test(i)===!1)throw Error("Expecting a HexDecimal digits");r+=i}return{type:"Character",value:parseInt(r,16)}}peekChar(t=0){return this.input[this.idx+t]}popChar(){let t=this.peekChar(0);return this.consumeChar(void 0),t}consumeChar(t){if(t!==void 0&&this.input[this.idx]!==t)throw Error("Expected: '"+t+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}};var Ar=class{visitChildren(t){for(let r in t){let n=t[r];t.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(o=>{this.visit(o)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t);break}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}};var Ji={},lN=new Ro;function Mn(e){let t=e.toString();if(Ji.hasOwnProperty(t))return Ji[t];{let r=lN.pattern(t);return Ji[t]=r,r}}function zd(){Ji={}}var Jd="Complement Sets are not supported for first char optimization",xo=`Unable to use "first char" lexer optimizations:
49
- `;function Qd(e,t=!1){try{let r=Mn(e);return $s(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===Jd)t&&mo(`${xo} Unable to optimize: < ${e.toString()} >
48
+ `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(t){let r="";for(let o=0;o<t;o++){let i=this.popChar();if(cN.test(i)===!1)throw Error("Expecting a HexDecimal digits");r+=i}return{type:"Character",value:parseInt(r,16)}}peekChar(t=0){return this.input[this.idx+t]}popChar(){let t=this.peekChar(0);return this.consumeChar(void 0),t}consumeChar(t){if(t!==void 0&&this.input[this.idx]!==t)throw Error("Expected: '"+t+"' but found: '"+this.input[this.idx]+"' at offset: "+this.idx);if(this.idx>=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}};var Ar=class{visitChildren(t){for(let r in t){let n=t[r];t.hasOwnProperty(r)&&(n.type!==void 0?this.visit(n):Array.isArray(n)&&n.forEach(o=>{this.visit(o)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t);break}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}};var Xi={},lN=new To;function Mn(e){let t=e.toString();if(Xi.hasOwnProperty(t))return Xi[t];{let r=lN.pattern(t);return Xi[t]=r,r}}function zd(){Xi={}}var Jd="Complement Sets are not supported for first char optimization",Ro=`Unable to use "first char" lexer optimizations:
49
+ `;function Qd(e,t=!1){try{let r=Mn(e);return $s(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===Jd)t&&ho(`${Ro} Unable to optimize: < ${e.toString()} >
50
50
  Complement Sets cannot be automatically optimized.
51
51
  This will disable the lexer's first char optimizations.
52
52
  See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let n="";t&&(n=`
53
53
  This will disable the lexer's first char optimizations.
54
- See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),In(`${xo}
54
+ See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),In(`${Ro}
55
55
  Failed parsing: < ${e.toString()} >
56
56
  Using the @chevrotain/regexp-to-ast library
57
- Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function $s(e,t,r){switch(e.type){case"Disjunction":for(let o=0;o<e.value.length;o++)$s(e.value[o],t,r);break;case"Alternative":let n=e.value;for(let o=0;o<n.length;o++){let i=n[o];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}let a=i;switch(a.type){case"Character":Qi(a.value,t,r);break;case"Set":if(a.complement===!0)throw Error(Jd);L(a.value,c=>{if(typeof c=="number")Qi(c,t,r);else{let u=c;if(r===!0)for(let l=u.from;l<=u.to;l++)Qi(l,t,r);else{for(let l=u.from;l<=u.to&&l<kn;l++)Qi(l,t,r);if(u.to>=kn){let l=u.from>=kn?u.from:kn,f=u.to,p=Lt(l),h=Lt(f);for(let E=p;E<=h;E++)t[E]=E}}}});break;case"Group":$s(a.value,t,r);break;default:throw Error("Non Exhaustive Match")}let s=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type==="Group"&&ec(a)===!1||a.type!=="Group"&&s===!1)break}break;default:throw Error("non exhaustive match!")}return j(t)}function Qi(e,t,r){let n=Lt(e);t[n]=n,r===!0&&fN(e,t)}function fN(e,t){let r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){let o=Lt(n.charCodeAt(0));t[o]=o}else{let o=r.toLowerCase();if(o!==r){let i=Lt(o.charCodeAt(0));t[i]=i}}}function Xd(e,t){return Ot(e.value,r=>{if(typeof r=="number")return J(t,r);{let n=r;return Ot(t,o=>n.from<=o&&o<=n.to)!==void 0}})}function ec(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?N(e.value)?Ie(e.value,ec):ec(e.value):!1}var tc=class extends Ar{constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}super.visitChildren(t)}}visitCharacter(t){J(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?Xd(t,this.targetCharCodes)===void 0&&(this.found=!0):Xd(t,this.targetCharCodes)!==void 0&&(this.found=!0)}};function Zi(e,t){if(t instanceof RegExp){let r=Mn(t),n=new tc(e);return n.visit(r),n.found}else return Ot(t,r=>J(e,r.charCodeAt(0)))!==void 0}var Kr="PATTERN",wn="defaultMode",$i="modes",nc=typeof new RegExp("(?:)").sticky=="boolean";function eh(e,t){t=Cn(t,{useSticky:nc,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
58
- `],tracer:(g,m)=>m()});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{bN()});let n;r("Reject Lexer.NA",()=>{n=Lr(e,g=>g[Kr]===D.NA)});let o=!1,i;r("Transform Patterns",()=>{o=!1,i=R(n,g=>{let m=g[Kr];if(nt(m)){let x=m.source;return x.length===1&&x!=="^"&&x!=="$"&&x!=="."&&!m.ignoreCase?x:x.length===2&&x[0]==="\\"&&!J(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],x[1])?x[1]:t.useSticky?$d(m):Zd(m)}else{if(_e(m))return o=!0,{exec:m};if(typeof m=="object")return o=!0,m;if(typeof m=="string"){if(m.length===1)return m;{let x=m.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),C=new RegExp(x);return t.useSticky?$d(C):Zd(C)}}else throw Error("non exhaustive match")}})});let a,s,c,u,l;r("misc mapping",()=>{a=R(n,g=>g.tokenTypeIdx),s=R(n,g=>{let m=g.GROUP;if(m!==D.SKIPPED){if(me(m))return m;if(Pe(m))return!1;throw Error("non exhaustive match")}}),c=R(n,g=>{let m=g.LONGER_ALT;if(m)return N(m)?R(m,C=>Wi(n,C)):[Wi(n,m)]}),u=R(n,g=>g.PUSH_MODE),l=R(n,g=>U(g,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let g=ch(t.lineTerminatorCharacters);f=R(n,m=>!1),t.positionTracking!=="onlyOffset"&&(f=R(n,m=>U(m,"LINE_BREAKS")?!!m.LINE_BREAKS:sh(m,g)===!1&&Zi(g,m.PATTERN)))});let p,h,E,y;r("Misc Mapping #2",()=>{p=R(n,ih),h=R(i,NN),E=te(n,(g,m)=>{let x=m.GROUP;return me(x)&&x!==D.SKIPPED&&(g[x]=[]),g},{}),y=R(i,(g,m)=>({pattern:i[m],longerAlt:c[m],canLineTerminator:f[m],isCustom:p[m],short:h[m],group:s[m],push:u[m],pop:l[m],tokenTypeIdx:a[m],tokenType:n[m]}))});let S=!0,d=[];return t.safeMode||r("First Char Optimization",()=>{d=te(n,(g,m,x)=>{if(typeof m.PATTERN=="string"){let C=m.PATTERN.charCodeAt(0),Ce=Lt(C);rc(g,Ce,y[x])}else if(N(m.START_CHARS_HINT)){let C;L(m.START_CHARS_HINT,Ce=>{let bt=typeof Ce=="string"?Ce.charCodeAt(0):Ce,Ye=Lt(bt);C!==Ye&&(C=Ye,rc(g,Ye,y[x]))})}else if(nt(m.PATTERN))if(m.PATTERN.unicode)S=!1,t.ensureOptimizations&&In(`${xo} Unable to analyze < ${m.PATTERN.toString()} > pattern.
57
+ Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+n)}}return[]}function $s(e,t,r){switch(e.type){case"Disjunction":for(let o=0;o<e.value.length;o++)$s(e.value[o],t,r);break;case"Alternative":let n=e.value;for(let o=0;o<n.length;o++){let i=n[o];switch(i.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}let a=i;switch(a.type){case"Character":Ji(a.value,t,r);break;case"Set":if(a.complement===!0)throw Error(Jd);L(a.value,c=>{if(typeof c=="number")Ji(c,t,r);else{let u=c;if(r===!0)for(let l=u.from;l<=u.to;l++)Ji(l,t,r);else{for(let l=u.from;l<=u.to&&l<kn;l++)Ji(l,t,r);if(u.to>=kn){let l=u.from>=kn?u.from:kn,f=u.to,p=Lt(l),h=Lt(f);for(let E=p;E<=h;E++)t[E]=E}}}});break;case"Group":$s(a.value,t,r);break;default:throw Error("Non Exhaustive Match")}let s=a.quantifier!==void 0&&a.quantifier.atLeast===0;if(a.type==="Group"&&ec(a)===!1||a.type!=="Group"&&s===!1)break}break;default:throw Error("non exhaustive match!")}return j(t)}function Ji(e,t,r){let n=Lt(e);t[n]=n,r===!0&&fN(e,t)}function fN(e,t){let r=String.fromCharCode(e),n=r.toUpperCase();if(n!==r){let o=Lt(n.charCodeAt(0));t[o]=o}else{let o=r.toLowerCase();if(o!==r){let i=Lt(o.charCodeAt(0));t[i]=i}}}function Xd(e,t){return Ot(e.value,r=>{if(typeof r=="number")return J(t,r);{let n=r;return Ot(t,o=>n.from<=o&&o<=n.to)!==void 0}})}function ec(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?N(e.value)?Ie(e.value,ec):ec(e.value):!1}var tc=class extends Ar{constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(this.found!==!0){switch(t.type){case"Lookahead":this.visitLookahead(t);return;case"NegativeLookahead":this.visitNegativeLookahead(t);return}super.visitChildren(t)}}visitCharacter(t){J(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?Xd(t,this.targetCharCodes)===void 0&&(this.found=!0):Xd(t,this.targetCharCodes)!==void 0&&(this.found=!0)}};function Qi(e,t){if(t instanceof RegExp){let r=Mn(t),n=new tc(e);return n.visit(r),n.found}else return Ot(t,r=>J(e,r.charCodeAt(0)))!==void 0}var Kr="PATTERN",wn="defaultMode",Zi="modes",nc=typeof new RegExp("(?:)").sticky=="boolean";function eh(e,t){t=Cn(t,{useSticky:nc,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
58
+ `],tracer:(g,m)=>m()});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{bN()});let n;r("Reject Lexer.NA",()=>{n=Lr(e,g=>g[Kr]===D.NA)});let o=!1,i;r("Transform Patterns",()=>{o=!1,i=R(n,g=>{let m=g[Kr];if(nt(m)){let x=m.source;return x.length===1&&x!=="^"&&x!=="$"&&x!=="."&&!m.ignoreCase?x:x.length===2&&x[0]==="\\"&&!J(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],x[1])?x[1]:t.useSticky?$d(m):Zd(m)}else{if(_e(m))return o=!0,{exec:m};if(typeof m=="object")return o=!0,m;if(typeof m=="string"){if(m.length===1)return m;{let x=m.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),C=new RegExp(x);return t.useSticky?$d(C):Zd(C)}}else throw Error("non exhaustive match")}})});let a,s,c,u,l;r("misc mapping",()=>{a=R(n,g=>g.tokenTypeIdx),s=R(n,g=>{let m=g.GROUP;if(m!==D.SKIPPED){if(me(m))return m;if(Pe(m))return!1;throw Error("non exhaustive match")}}),c=R(n,g=>{let m=g.LONGER_ALT;if(m)return N(m)?R(m,C=>Ki(n,C)):[Ki(n,m)]}),u=R(n,g=>g.PUSH_MODE),l=R(n,g=>U(g,"POP_MODE"))});let f;r("Line Terminator Handling",()=>{let g=ch(t.lineTerminatorCharacters);f=R(n,m=>!1),t.positionTracking!=="onlyOffset"&&(f=R(n,m=>U(m,"LINE_BREAKS")?!!m.LINE_BREAKS:sh(m,g)===!1&&Qi(g,m.PATTERN)))});let p,h,E,y;r("Misc Mapping #2",()=>{p=R(n,ih),h=R(i,NN),E=te(n,(g,m)=>{let x=m.GROUP;return me(x)&&x!==D.SKIPPED&&(g[x]=[]),g},{}),y=R(i,(g,m)=>({pattern:i[m],longerAlt:c[m],canLineTerminator:f[m],isCustom:p[m],short:h[m],group:s[m],push:u[m],pop:l[m],tokenTypeIdx:a[m],tokenType:n[m]}))});let S=!0,d=[];return t.safeMode||r("First Char Optimization",()=>{d=te(n,(g,m,x)=>{if(typeof m.PATTERN=="string"){let C=m.PATTERN.charCodeAt(0),Ce=Lt(C);rc(g,Ce,y[x])}else if(N(m.START_CHARS_HINT)){let C;L(m.START_CHARS_HINT,Ce=>{let bt=typeof Ce=="string"?Ce.charCodeAt(0):Ce,Ye=Lt(bt);C!==Ye&&(C=Ye,rc(g,Ye,y[x]))})}else if(nt(m.PATTERN))if(m.PATTERN.unicode)S=!1,t.ensureOptimizations&&In(`${Ro} Unable to analyze < ${m.PATTERN.toString()} > pattern.
59
59
  The regexp unicode flag is not currently supported by the regexp-to-ast library.
60
60
  This will disable the lexer's first char optimizations.
61
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let C=Qd(m.PATTERN,t.ensureOptimizations);v(C)&&(S=!1),L(C,Ce=>{rc(g,Ce,y[x])})}else t.ensureOptimizations&&In(`${xo} TokenType: <${m.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
61
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let C=Qd(m.PATTERN,t.ensureOptimizations);v(C)&&(S=!1),L(C,Ce=>{rc(g,Ce,y[x])})}else t.ensureOptimizations&&In(`${Ro} TokenType: <${m.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
62
62
  This will disable the lexer's first char optimizations.
63
63
  For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),S=!1;return g},[])}),{emptyGroups:E,patternIdxToConfig:y,charCodeToPatternIdxToConfig:d,hasCustom:o,canBeOptimized:S}}function th(e,t){let r=[],n=dN(e);r=r.concat(n.errors);let o=hN(n.valid),i=o.valid;return r=r.concat(o.errors),r=r.concat(pN(i)),r=r.concat(xN(i)),r=r.concat(ON(i,t)),r=r.concat(LN(i)),r}function pN(e){let t=[],r=Se(e,n=>nt(n[Kr]));return t=t.concat(gN(r)),t=t.concat(SN(r)),t=t.concat(TN(r)),t=t.concat(RN(r)),t=t.concat(EN(r)),t}function dN(e){let t=Se(e,o=>!U(o,Kr)),r=R(t,o=>({message:"Token Type: ->"+o.name+"<- missing static 'PATTERN' property",type:Q.MISSING_PATTERN,tokenTypes:[o]})),n=Or(e,t);return{errors:r,valid:n}}function hN(e){let t=Se(e,o=>{let i=o[Kr];return!nt(i)&&!_e(i)&&!U(i,"exec")&&!me(i)}),r=R(t,o=>({message:"Token Type: ->"+o.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Q.INVALID_PATTERN,tokenTypes:[o]})),n=Or(e,t);return{errors:r,valid:n}}var mN=/[^\\][$]/;function gN(e){class t extends Ar{constructor(){super(...arguments),this.found=!1}visitEndAnchor(i){this.found=!0}}let r=Se(e,o=>{let i=o.PATTERN;try{let a=Mn(i),s=new t;return s.visit(a),s.found}catch{return mN.test(i.source)}});return R(r,o=>({message:`Unexpected RegExp Anchor Error:
64
64
  Token Type: ->`+o.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
@@ -67,35 +67,35 @@ See https://www.gnu.org/licenses/agpl-3.0.html
67
67
  See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Q.SOI_ANCHOR_FOUND,tokenTypes:[o]}))}function TN(e){let t=Se(e,n=>{let o=n[Kr];return o instanceof RegExp&&(o.multiline||o.global)});return R(t,n=>({message:"Token Type: ->"+n.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Q.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[n]}))}function RN(e){let t=[],r=R(e,i=>te(e,(a,s)=>(i.PATTERN.source===s.PATTERN.source&&!J(t,s)&&s.PATTERN!==D.NA&&(t.push(s),a.push(s)),a),[]));r=Rt(r);let n=Se(r,i=>i.length>1);return R(n,i=>{let a=R(i,c=>c.name);return{message:`The same RegExp pattern ->${Te(i).PATTERN}<-has been used in all of the following Token Types: ${a.join(", ")} <-`,type:Q.DUPLICATE_PATTERNS_FOUND,tokenTypes:i}})}function xN(e){let t=Se(e,n=>{if(!U(n,"GROUP"))return!1;let o=n.GROUP;return o!==D.SKIPPED&&o!==D.NA&&!me(o)});return R(t,n=>({message:"Token Type: ->"+n.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Q.INVALID_GROUP_TYPE_FOUND,tokenTypes:[n]}))}function ON(e,t){let r=Se(e,o=>o.PUSH_MODE!==void 0&&!J(t,o.PUSH_MODE));return R(r,o=>({message:`Token Type: ->${o.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${o.PUSH_MODE}<-which does not exist`,type:Q.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[o]}))}function LN(e){let t=[],r=te(e,(n,o,i)=>{let a=o.PATTERN;return a===D.NA||(me(a)?n.push({str:a,idx:i,tokenType:o}):nt(a)&&UN(a)&&n.push({str:a.source,idx:i,tokenType:o})),n},[]);return L(e,(n,o)=>{L(r,({str:i,idx:a,tokenType:s})=>{if(o<a&&AN(i,n.PATTERN)){let c=`Token: ->${s.name}<- can never be matched.
68
68
  Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition.
69
69
  See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:c,type:Q.UNREACHABLE_PATTERN,tokenTypes:[n,s]})}})}),t}function AN(e,t){if(nt(t)){let r=t.exec(e);return r!==null&&r.index===0}else{if(_e(t))return t(e,0,[],{});if(U(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}function UN(e){return Ot([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>e.source.indexOf(r)!==-1)===void 0}function Zd(e){let t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function $d(e){let t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}function rh(e,t,r){let n=[];return U(e,wn)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+wn+`> property in its definition
70
- `,type:Q.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),U(e,$i)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+$i+`> property in its definition
71
- `,type:Q.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),U(e,$i)&&U(e,wn)&&!U(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${wn}: <${e.defaultMode}>which does not exist
72
- `,type:Q.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),U(e,$i)&&L(e.modes,(o,i)=>{L(o,(a,s)=>{if(Pe(a))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${s}>
70
+ `,type:Q.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),U(e,Zi)||n.push({message:"A MultiMode Lexer cannot be initialized without a <"+Zi+`> property in its definition
71
+ `,type:Q.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),U(e,Zi)&&U(e,wn)&&!U(e.modes,e.defaultMode)&&n.push({message:`A MultiMode Lexer cannot be initialized with a ${wn}: <${e.defaultMode}>which does not exist
72
+ `,type:Q.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),U(e,Zi)&&L(e.modes,(o,i)=>{L(o,(a,s)=>{if(Pe(a))n.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${i}> at index: <${s}>
73
73
  `,type:Q.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(U(a,"LONGER_ALT")){let c=N(a.LONGER_ALT)?a.LONGER_ALT:[a.LONGER_ALT];L(c,u=>{!Pe(u)&&!J(o,u)&&n.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${u.name}> on token <${a.name}> outside of mode <${i}>
74
- `,type:Q.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function nh(e,t,r){let n=[],o=!1,i=Rt(ue(j(e.modes))),a=Lr(i,c=>c[Kr]===D.NA),s=ch(r);return t&&L(a,c=>{let u=sh(c,s);if(u!==!1){let f={message:CN(c,u),type:u.issue,tokenType:c};n.push(f)}else U(c,"LINE_BREAKS")?c.LINE_BREAKS===!0&&(o=!0):Zi(s,c.PATTERN)&&(o=!0)}),t&&!o&&n.push({message:`Warning: No LINE_BREAKS Found.
74
+ `,type:Q.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),n}function nh(e,t,r){let n=[],o=!1,i=Rt(ue(j(e.modes))),a=Lr(i,c=>c[Kr]===D.NA),s=ch(r);return t&&L(a,c=>{let u=sh(c,s);if(u!==!1){let f={message:CN(c,u),type:u.issue,tokenType:c};n.push(f)}else U(c,"LINE_BREAKS")?c.LINE_BREAKS===!0&&(o=!0):Qi(s,c.PATTERN)&&(o=!0)}),t&&!o&&n.push({message:`Warning: No LINE_BREAKS Found.
75
75
  This Lexer has been defined to track line and column information,
76
76
  But none of the Token Types can be identified as matching a line terminator.
77
77
  See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
78
- for details.`,type:Q.NO_LINE_BREAKS_FLAGS}),n}function oh(e){let t={},r=K(e);return L(r,n=>{let o=e[n];if(N(o))t[n]=[];else throw Error("non exhaustive match")}),t}function ih(e){let t=e.PATTERN;if(nt(t))return!1;if(_e(t))return!0;if(U(t,"exec"))return!0;if(me(t))return!1;throw Error("non exhaustive match")}function NN(e){return me(e)&&e.length===1?e.charCodeAt(0):!1}var ah={test:function(e){let t=e.length;for(let r=this.lastIndex;r<t;r++){let n=e.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return e.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function sh(e,t){if(U(e,"LINE_BREAKS"))return!1;if(nt(e.PATTERN)){try{Zi(t,e.PATTERN)}catch(r){return{issue:Q.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(me(e.PATTERN))return!1;if(ih(e))return{issue:Q.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function CN(e,t){if(t.issue===Q.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
78
+ for details.`,type:Q.NO_LINE_BREAKS_FLAGS}),n}function oh(e){let t={},r=K(e);return L(r,n=>{let o=e[n];if(N(o))t[n]=[];else throw Error("non exhaustive match")}),t}function ih(e){let t=e.PATTERN;if(nt(t))return!1;if(_e(t))return!0;if(U(t,"exec"))return!0;if(me(t))return!1;throw Error("non exhaustive match")}function NN(e){return me(e)&&e.length===1?e.charCodeAt(0):!1}var ah={test:function(e){let t=e.length;for(let r=this.lastIndex;r<t;r++){let n=e.charCodeAt(r);if(n===10)return this.lastIndex=r+1,!0;if(n===13)return e.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},lastIndex:0};function sh(e,t){if(U(e,"LINE_BREAKS"))return!1;if(nt(e.PATTERN)){try{Qi(t,e.PATTERN)}catch(r){return{issue:Q.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(me(e.PATTERN))return!1;if(ih(e))return{issue:Q.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}function CN(e,t){if(t.issue===Q.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
79
79
  The problem is in the <${e.name}> Token Type
80
80
  Root cause: ${t.errMsg}.
81
81
  For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===Q.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
82
82
  The problem is in the <${e.name}> Token Type
83
- For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function ch(e){return R(e,r=>me(r)?r.charCodeAt(0):r)}function rc(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}var kn=256,ea=[];function Lt(e){return e<kn?e:ea[e]}function bN(){if(v(ea)){ea=new Array(65536);for(let e=0;e<65536;e++)ea[e]=e>255?255+~~(e/255):e}}function Ht(e,t){let r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}function _n(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var uh=1,fh={};function Kt(e){let t=IN(e);PN(t),MN(t),vN(t),L(t,r=>{r.isParent=r.categoryMatches.length>0})}function IN(e){let t=V(e),r=e,n=!0;for(;n;){r=Rt(ue(R(r,i=>i.CATEGORIES)));let o=Or(r,t);t=t.concat(o),v(o)?n=!1:r=o}return t}function PN(e){L(e,t=>{oc(t)||(fh[uh]=t,t.tokenTypeIdx=uh++),lh(t)&&!N(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),lh(t)||(t.CATEGORIES=[]),kN(t)||(t.categoryMatches=[]),wN(t)||(t.categoryMatchesMap={})})}function vN(e){L(e,t=>{t.categoryMatches=[],L(t.categoryMatchesMap,(r,n)=>{t.categoryMatches.push(fh[n].tokenTypeIdx)})})}function MN(e){L(e,t=>{ph([],t)})}function ph(e,t){L(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),L(t.CATEGORIES,r=>{let n=e.concat(t);J(n,r)||ph(n,r)})}function oc(e){return U(e,"tokenTypeIdx")}function lh(e){return U(e,"CATEGORIES")}function kN(e){return U(e,"categoryMatches")}function wN(e){return U(e,"categoryMatchesMap")}function dh(e){return U(e,"tokenTypeIdx")}var ic={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,o){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}};var Q;(function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Q||(Q={}));var Oo={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
84
- `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:ic,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Oo);var D=class{constructor(t,r=Oo){if(this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(o,i)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let a=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${a}--> <${o}>`);let{time:s,value:c}=go(i),u=s>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&u(`${a}<-- <${o}> time: ${s}ms`),this.traceInitIndent--,c}else return i()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
85
- a boolean 2nd argument is no longer supported`);this.config=Ae({},Oo,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let o,i=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Oo.lineTerminatorsPattern)this.config.lineTerminatorsPattern=ah;else if(this.config.lineTerminatorCharacters===Oo.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
83
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function ch(e){return R(e,r=>me(r)?r.charCodeAt(0):r)}function rc(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}var kn=256,$i=[];function Lt(e){return e<kn?e:$i[e]}function bN(){if(v($i)){$i=new Array(65536);for(let e=0;e<65536;e++)$i[e]=e>255?255+~~(e/255):e}}function Ht(e,t){let r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}function _n(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}var uh=1,fh={};function Kt(e){let t=IN(e);PN(t),MN(t),vN(t),L(t,r=>{r.isParent=r.categoryMatches.length>0})}function IN(e){let t=V(e),r=e,n=!0;for(;n;){r=Rt(ue(R(r,i=>i.CATEGORIES)));let o=Or(r,t);t=t.concat(o),v(o)?n=!1:r=o}return t}function PN(e){L(e,t=>{oc(t)||(fh[uh]=t,t.tokenTypeIdx=uh++),lh(t)&&!N(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),lh(t)||(t.CATEGORIES=[]),kN(t)||(t.categoryMatches=[]),wN(t)||(t.categoryMatchesMap={})})}function vN(e){L(e,t=>{t.categoryMatches=[],L(t.categoryMatchesMap,(r,n)=>{t.categoryMatches.push(fh[n].tokenTypeIdx)})})}function MN(e){L(e,t=>{ph([],t)})}function ph(e,t){L(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),L(t.CATEGORIES,r=>{let n=e.concat(t);J(n,r)||ph(n,r)})}function oc(e){return U(e,"tokenTypeIdx")}function lh(e){return U(e,"CATEGORIES")}function kN(e){return U(e,"categoryMatches")}function wN(e){return U(e,"categoryMatchesMap")}function dh(e){return U(e,"tokenTypeIdx")}var ic={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,o){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}};var Q;(function(e){e[e.MISSING_PATTERN=0]="MISSING_PATTERN",e[e.INVALID_PATTERN=1]="INVALID_PATTERN",e[e.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",e[e.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",e[e.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",e[e.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",e[e.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",e[e.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",e[e.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",e[e.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",e[e.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",e[e.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",e[e.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",e[e.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",e[e.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",e[e.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",e[e.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",e[e.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE"})(Q||(Q={}));var xo={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
84
+ `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:ic,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(xo);var D=class{constructor(t,r=xo){if(this.lexerDefinition=t,this.lexerDefinitionErrors=[],this.lexerDefinitionWarning=[],this.patternIdxToConfig={},this.charCodeToPatternIdxToConfig={},this.modes=[],this.emptyGroups={},this.trackStartLines=!0,this.trackEndLines=!0,this.hasCustom=!1,this.canModeBeOptimized={},this.TRACE_INIT=(o,i)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let a=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${a}--> <${o}>`);let{time:s,value:c}=mo(i),u=s>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&u(`${a}<-- <${o}> time: ${s}ms`),this.traceInitIndent--,c}else return i()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
85
+ a boolean 2nd argument is no longer supported`);this.config=Ae({},xo,r);let n=this.config.traceInitPerf;n===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof n=="number"&&(this.traceInitMaxIdent=n,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let o,i=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===xo.lineTerminatorsPattern)this.config.lineTerminatorsPattern=ah;else if(this.config.lineTerminatorCharacters===xo.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
86
86
  For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#MISSING_LINE_TERM_CHARS`);if(r.safeMode&&r.ensureOptimizations)throw Error('"safeMode" and "ensureOptimizations" flags are mutually exclusive.');this.trackStartLines=/full|onlyStart/i.test(this.config.positionTracking),this.trackEndLines=/full/i.test(this.config.positionTracking),N(t)?o={modes:{defaultMode:V(t)},defaultMode:wn}:(i=!1,o=V(t))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(rh(o,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(nh(o,this.trackStartLines,this.config.lineTerminatorCharacters))})),o.modes=o.modes?o.modes:{},L(o.modes,(s,c)=>{o.modes[c]=Lr(s,u=>Pe(u))});let a=K(o.modes);if(L(o.modes,(s,c)=>{this.TRACE_INIT(`Mode: <${c}> processing`,()=>{if(this.modes.push(c),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(th(s,a))}),v(this.lexerDefinitionErrors)){Kt(s);let u;this.TRACE_INIT("analyzeTokenTypes",()=>{u=eh(s,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[c]=u.patternIdxToConfig,this.charCodeToPatternIdxToConfig[c]=u.charCodeToPatternIdxToConfig,this.emptyGroups=Ae({},this.emptyGroups,u.emptyGroups),this.hasCustom=u.hasCustom||this.hasCustom,this.canModeBeOptimized[c]=u.canBeOptimized}})}),this.defaultMode=o.defaultMode,!v(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let c=R(this.lexerDefinitionErrors,u=>u.message).join(`-----------------------
87
87
  `);throw new Error(`Errors detected in definition of Lexer:
88
- `+c)}L(this.lexerDefinitionWarning,s=>{mo(s.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(nc?(this.chopInput=He,this.match=this.matchWithTest):(this.updateLastIndex=ee,this.match=this.matchWithExec),i&&(this.handleModes=ee),this.trackStartLines===!1&&(this.computeNewColumn=He),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=ee),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let s=te(this.canModeBeOptimized,(c,u,l)=>(u===!1&&c.push(l),c),[]);if(r.ensureOptimizations&&!v(s))throw Error(`Lexer Modes: < ${s.join(", ")} > cannot be optimized.
88
+ `+c)}L(this.lexerDefinitionWarning,s=>{ho(s.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(nc?(this.chopInput=He,this.match=this.matchWithTest):(this.updateLastIndex=ee,this.match=this.matchWithExec),i&&(this.handleModes=ee),this.trackStartLines===!1&&(this.computeNewColumn=He),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=ee),/full/i.test(this.config.positionTracking))this.createTokenInstance=this.createFullToken;else if(/onlyStart/i.test(this.config.positionTracking))this.createTokenInstance=this.createStartOnlyToken;else if(/onlyOffset/i.test(this.config.positionTracking))this.createTokenInstance=this.createOffsetOnlyToken;else throw Error(`Invalid <positionTracking> config option: "${this.config.positionTracking}"`);this.hasCustom?(this.addToken=this.addTokenUsingPush,this.handlePayload=this.handlePayloadWithCustom):(this.addToken=this.addTokenUsingMemberAccess,this.handlePayload=this.handlePayloadNoCustom)}),this.TRACE_INIT("Failed Optimization Warnings",()=>{let s=te(this.canModeBeOptimized,(c,u,l)=>(u===!1&&c.push(l),c),[]);if(r.ensureOptimizations&&!v(s))throw Error(`Lexer Modes: < ${s.join(", ")} > cannot be optimized.
89
89
  Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
90
- Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{zd()}),this.TRACE_INIT("toFastProperties",()=>{Eo(this)})})}tokenize(t,r=this.defaultMode){if(!v(this.lexerDefinitionErrors)){let o=R(this.lexerDefinitionErrors,i=>i.message).join(`-----------------------
90
+ Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{zd()}),this.TRACE_INIT("toFastProperties",()=>{go(this)})})}tokenize(t,r=this.defaultMode){if(!v(this.lexerDefinitionErrors)){let o=R(this.lexerDefinitionErrors,i=>i.message).join(`-----------------------
91
91
  `);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
92
- `+o)}return this.tokenizeInternal(t,r)}tokenizeInternal(t,r){let n,o,i,a,s,c,u,l,f,p,h,E,y,S,d,g,m=t,x=m.length,C=0,Ce=0,bt=this.hasCustom?0:Math.floor(t.length/10),Ye=new Array(bt),$t=[],It=this.trackStartLines?1:void 0,Me=this.trackStartLines?1:void 0,Zr=oh(this.emptyGroups),qy=this.trackStartLines,es=this.config.lineTerminatorsPattern,Jo=0,er=[],to=[],Qo=[],Tu=[];Object.freeze(Tu);let ro;function Ru(){return er}function xu(be){let et=Lt(be),$r=to[et];return $r===void 0?Tu:$r}let Yy=be=>{if(Qo.length===1&&be.tokenType.PUSH_MODE===void 0){let et=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(be);$t.push({offset:be.startOffset,line:be.startLine,column:be.startColumn,length:be.image.length,message:et})}else{Qo.pop();let et=xt(Qo);er=this.patternIdxToConfig[et],to=this.charCodeToPatternIdxToConfig[et],Jo=er.length;let $r=this.canModeBeOptimized[et]&&this.config.safeMode===!1;to&&$r?ro=xu:ro=Ru}};function Ou(be){Qo.push(be),to=this.charCodeToPatternIdxToConfig[be],er=this.patternIdxToConfig[be],Jo=er.length,Jo=er.length;let et=this.canModeBeOptimized[be]&&this.config.safeMode===!1;to&&et?ro=xu:ro=Ru}Ou.call(this,r);let at,Lu=this.config.recoveryEnabled;for(;C<x;){c=null;let be=m.charCodeAt(C),et=ro(be),$r=et.length;for(n=0;n<$r;n++){at=et[n];let ze=at.pattern;u=null;let Pt=at.short;if(Pt!==!1?be===Pt&&(c=ze):at.isCustom===!0?(g=ze.exec(m,C,Ye,Zr),g!==null?(c=g[0],g.payload!==void 0&&(u=g.payload)):c=null):(this.updateLastIndex(ze,C),c=this.match(ze,t,C)),c!==null){if(s=at.longerAlt,s!==void 0){let tr=s.length;for(i=0;i<tr;i++){let vt=er[s[i]],_r=vt.pattern;if(l=null,vt.isCustom===!0?(g=_r.exec(m,C,Ye,Zr),g!==null?(a=g[0],g.payload!==void 0&&(l=g.payload)):a=null):(this.updateLastIndex(_r,C),a=this.match(_r,t,C)),a&&a.length>c.length){c=a,u=l,at=vt;break}}}break}}if(c!==null){if(f=c.length,p=at.group,p!==void 0&&(h=at.tokenTypeIdx,E=this.createTokenInstance(c,C,h,at.tokenType,It,Me,f),this.handlePayload(E,u),p===!1?Ce=this.addToken(Ye,Ce,E):Zr[p].push(E)),t=this.chopInput(t,f),C=C+f,Me=this.computeNewColumn(Me,f),qy===!0&&at.canLineTerminator===!0){let ze=0,Pt,tr;es.lastIndex=0;do Pt=es.test(c),Pt===!0&&(tr=es.lastIndex-1,ze++);while(Pt===!0);ze!==0&&(It=It+ze,Me=f-tr,this.updateTokenEndLineColumnLocation(E,p,tr,ze,It,Me,f))}this.handleModes(at,Yy,Ou,E)}else{let ze=C,Pt=It,tr=Me,vt=Lu===!1;for(;vt===!1&&C<x;)for(t=this.chopInput(t,1),C++,o=0;o<Jo;o++){let _r=er[o],ts=_r.pattern,Au=_r.short;if(Au!==!1?m.charCodeAt(C)===Au&&(vt=!0):_r.isCustom===!0?vt=ts.exec(m,C,Ye,Zr)!==null:(this.updateLastIndex(ts,C),vt=ts.exec(t)!==null),vt===!0)break}if(y=C-ze,Me=this.computeNewColumn(Me,y),d=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(m,ze,y,Pt,tr),$t.push({offset:ze,line:Pt,column:tr,length:y,message:d}),Lu===!1)break}}return this.hasCustom||(Ye.length=Ce),{tokens:Ye,groups:Zr,errors:$t}}handleModes(t,r,n,o){if(t.pop===!0){let i=t.push;r(o),i!==void 0&&n.call(this,i)}else t.push!==void 0&&n.call(this,t.push)}chopInput(t,r){return t.substring(r)}updateLastIndex(t,r){t.lastIndex=r}updateTokenEndLineColumnLocation(t,r,n,o,i,a,s){let c,u;r!==void 0&&(c=n===s-1,u=c?-1:0,o===1&&c===!0||(t.endLine=i+u,t.endColumn=a-1+-u))}computeNewColumn(t,r){return t+r}createOffsetOnlyToken(t,r,n,o){return{image:t,startOffset:r,tokenTypeIdx:n,tokenType:o}}createStartOnlyToken(t,r,n,o,i,a){return{image:t,startOffset:r,startLine:i,startColumn:a,tokenTypeIdx:n,tokenType:o}}createFullToken(t,r,n,o,i,a,s){return{image:t,startOffset:r,endOffset:r+s-1,startLine:i,endLine:i,startColumn:a,endColumn:a+s-1,tokenTypeIdx:n,tokenType:o}}addTokenUsingPush(t,r,n){return t.push(n),r}addTokenUsingMemberAccess(t,r,n){return t[r]=n,r++,r}handlePayloadNoCustom(t,r){}handlePayloadWithCustom(t,r){r!==null&&(t.payload=r)}matchWithTest(t,r,n){return t.test(r)===!0?r.substring(n,t.lastIndex):null}matchWithExec(t,r){let n=t.exec(r);return n!==null?n[0]:null}};D.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";D.NA=/NOT_APPLICABLE/;function Wt(e){return ac(e)?e.LABEL:e.name}function ac(e){return me(e.LABEL)&&e.LABEL!==""}var _N="parent",hh="categories",mh="label",gh="group",Eh="push_mode",yh="pop_mode",Sh="longer_alt",Th="line_breaks",Rh="start_chars_hint";function Wr(e){return BN(e)}function BN(e){let t=e.pattern,r={};if(r.name=e.name,Pe(t)||(r.PATTERN=t),U(e,_N))throw`The parent property is no longer supported.
93
- See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return U(e,hh)&&(r.CATEGORIES=e[hh]),Kt([r]),U(e,mh)&&(r.LABEL=e[mh]),U(e,gh)&&(r.GROUP=e[gh]),U(e,yh)&&(r.POP_MODE=e[yh]),U(e,Eh)&&(r.PUSH_MODE=e[Eh]),U(e,Sh)&&(r.LONGER_ALT=e[Sh]),U(e,Th)&&(r.LINE_BREAKS=e[Th]),U(e,Rh)&&(r.START_CHARS_HINT=e[Rh]),r}var Je=Wr({name:"EOF",pattern:D.NA});Kt([Je]);function Vr(e,t,r,n,o,i,a,s){return{image:t,startOffset:r,endOffset:n,startLine:o,endLine:i,startColumn:a,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function P(e,t){return Ht(e,t)}var ta={buildMismatchTokenMessage({expected:e,actual:t,previous:r,ruleName:n}){return`Expecting ${ac(e)?`--> ${Wt(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:o}){let i="Expecting: ",s=`
92
+ `+o)}return this.tokenizeInternal(t,r)}tokenizeInternal(t,r){let n,o,i,a,s,c,u,l,f,p,h,E,y,S,d,g,m=t,x=m.length,C=0,Ce=0,bt=this.hasCustom?0:Math.floor(t.length/10),Ye=new Array(bt),$t=[],It=this.trackStartLines?1:void 0,Me=this.trackStartLines?1:void 0,Zr=oh(this.emptyGroups),qy=this.trackStartLines,$a=this.config.lineTerminatorsPattern,Xo=0,er=[],to=[],Jo=[],Tu=[];Object.freeze(Tu);let ro;function Ru(){return er}function xu(be){let et=Lt(be),$r=to[et];return $r===void 0?Tu:$r}let Yy=be=>{if(Jo.length===1&&be.tokenType.PUSH_MODE===void 0){let et=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(be);$t.push({offset:be.startOffset,line:be.startLine,column:be.startColumn,length:be.image.length,message:et})}else{Jo.pop();let et=xt(Jo);er=this.patternIdxToConfig[et],to=this.charCodeToPatternIdxToConfig[et],Xo=er.length;let $r=this.canModeBeOptimized[et]&&this.config.safeMode===!1;to&&$r?ro=xu:ro=Ru}};function Ou(be){Jo.push(be),to=this.charCodeToPatternIdxToConfig[be],er=this.patternIdxToConfig[be],Xo=er.length,Xo=er.length;let et=this.canModeBeOptimized[be]&&this.config.safeMode===!1;to&&et?ro=xu:ro=Ru}Ou.call(this,r);let at,Lu=this.config.recoveryEnabled;for(;C<x;){c=null;let be=m.charCodeAt(C),et=ro(be),$r=et.length;for(n=0;n<$r;n++){at=et[n];let ze=at.pattern;u=null;let Pt=at.short;if(Pt!==!1?be===Pt&&(c=ze):at.isCustom===!0?(g=ze.exec(m,C,Ye,Zr),g!==null?(c=g[0],g.payload!==void 0&&(u=g.payload)):c=null):(this.updateLastIndex(ze,C),c=this.match(ze,t,C)),c!==null){if(s=at.longerAlt,s!==void 0){let tr=s.length;for(i=0;i<tr;i++){let vt=er[s[i]],_r=vt.pattern;if(l=null,vt.isCustom===!0?(g=_r.exec(m,C,Ye,Zr),g!==null?(a=g[0],g.payload!==void 0&&(l=g.payload)):a=null):(this.updateLastIndex(_r,C),a=this.match(_r,t,C)),a&&a.length>c.length){c=a,u=l,at=vt;break}}}break}}if(c!==null){if(f=c.length,p=at.group,p!==void 0&&(h=at.tokenTypeIdx,E=this.createTokenInstance(c,C,h,at.tokenType,It,Me,f),this.handlePayload(E,u),p===!1?Ce=this.addToken(Ye,Ce,E):Zr[p].push(E)),t=this.chopInput(t,f),C=C+f,Me=this.computeNewColumn(Me,f),qy===!0&&at.canLineTerminator===!0){let ze=0,Pt,tr;$a.lastIndex=0;do Pt=$a.test(c),Pt===!0&&(tr=$a.lastIndex-1,ze++);while(Pt===!0);ze!==0&&(It=It+ze,Me=f-tr,this.updateTokenEndLineColumnLocation(E,p,tr,ze,It,Me,f))}this.handleModes(at,Yy,Ou,E)}else{let ze=C,Pt=It,tr=Me,vt=Lu===!1;for(;vt===!1&&C<x;)for(t=this.chopInput(t,1),C++,o=0;o<Xo;o++){let _r=er[o],es=_r.pattern,Au=_r.short;if(Au!==!1?m.charCodeAt(C)===Au&&(vt=!0):_r.isCustom===!0?vt=es.exec(m,C,Ye,Zr)!==null:(this.updateLastIndex(es,C),vt=es.exec(t)!==null),vt===!0)break}if(y=C-ze,Me=this.computeNewColumn(Me,y),d=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(m,ze,y,Pt,tr),$t.push({offset:ze,line:Pt,column:tr,length:y,message:d}),Lu===!1)break}}return this.hasCustom||(Ye.length=Ce),{tokens:Ye,groups:Zr,errors:$t}}handleModes(t,r,n,o){if(t.pop===!0){let i=t.push;r(o),i!==void 0&&n.call(this,i)}else t.push!==void 0&&n.call(this,t.push)}chopInput(t,r){return t.substring(r)}updateLastIndex(t,r){t.lastIndex=r}updateTokenEndLineColumnLocation(t,r,n,o,i,a,s){let c,u;r!==void 0&&(c=n===s-1,u=c?-1:0,o===1&&c===!0||(t.endLine=i+u,t.endColumn=a-1+-u))}computeNewColumn(t,r){return t+r}createOffsetOnlyToken(t,r,n,o){return{image:t,startOffset:r,tokenTypeIdx:n,tokenType:o}}createStartOnlyToken(t,r,n,o,i,a){return{image:t,startOffset:r,startLine:i,startColumn:a,tokenTypeIdx:n,tokenType:o}}createFullToken(t,r,n,o,i,a,s){return{image:t,startOffset:r,endOffset:r+s-1,startLine:i,endLine:i,startColumn:a,endColumn:a+s-1,tokenTypeIdx:n,tokenType:o}}addTokenUsingPush(t,r,n){return t.push(n),r}addTokenUsingMemberAccess(t,r,n){return t[r]=n,r++,r}handlePayloadNoCustom(t,r){}handlePayloadWithCustom(t,r){r!==null&&(t.payload=r)}matchWithTest(t,r,n){return t.test(r)===!0?r.substring(n,t.lastIndex):null}matchWithExec(t,r){let n=t.exec(r);return n!==null?n[0]:null}};D.SKIPPED="This marks a skipped Token pattern, this means each token identified by it willbe consumed and then thrown into oblivion, this can be used to for example to completely ignore whitespace.";D.NA=/NOT_APPLICABLE/;function Wt(e){return ac(e)?e.LABEL:e.name}function ac(e){return me(e.LABEL)&&e.LABEL!==""}var _N="parent",hh="categories",mh="label",gh="group",Eh="push_mode",yh="pop_mode",Sh="longer_alt",Th="line_breaks",Rh="start_chars_hint";function Wr(e){return BN(e)}function BN(e){let t=e.pattern,r={};if(r.name=e.name,Pe(t)||(r.PATTERN=t),U(e,_N))throw`The parent property is no longer supported.
93
+ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return U(e,hh)&&(r.CATEGORIES=e[hh]),Kt([r]),U(e,mh)&&(r.LABEL=e[mh]),U(e,gh)&&(r.GROUP=e[gh]),U(e,yh)&&(r.POP_MODE=e[yh]),U(e,Eh)&&(r.PUSH_MODE=e[Eh]),U(e,Sh)&&(r.LONGER_ALT=e[Sh]),U(e,Th)&&(r.LINE_BREAKS=e[Th]),U(e,Rh)&&(r.START_CHARS_HINT=e[Rh]),r}var Je=Wr({name:"EOF",pattern:D.NA});Kt([Je]);function Vr(e,t,r,n,o,i,a,s){return{image:t,startOffset:r,endOffset:n,startLine:o,endLine:i,startColumn:a,endColumn:s,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}function P(e,t){return Ht(e,t)}var ea={buildMismatchTokenMessage({expected:e,actual:t,previous:r,ruleName:n}){return`Expecting ${ac(e)?`--> ${Wt(e)} <--`:`token of type --> ${e.name} <--`} but found --> '${t.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:e,ruleName:t}){return"Redundant input, expecting EOF but found: "+e.image},buildNoViableAltMessage({expectedPathsPerAlt:e,actual:t,previous:r,customUserDescription:n,ruleName:o}){let i="Expecting: ",s=`
94
94
  but found: '`+Te(t).image+"'";if(n)return i+n+s;{let c=te(e,(p,h)=>p.concat(h),[]),u=R(c,p=>`[${R(p,h=>Wt(h)).join(", ")}]`),f=`one of these possible Token sequences:
95
95
  ${R(u,(p,h)=>` ${h+1}. ${p}`).join(`
96
96
  `)}`;return i+f+s}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:n}){let o="Expecting: ",a=`
97
97
  but found: '`+Te(t).image+"'";if(r)return o+r+a;{let c=`expecting at least one iteration which starts with one of these possible Token sequences::
98
- <${R(e,u=>`[${R(u,l=>Wt(l)).join(",")}]`).join(" ,")}>`;return o+c+a}}};Object.freeze(ta);var xh={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
98
+ <${R(e,u=>`[${R(u,l=>Wt(l)).join(",")}]`).join(" ,")}>`;return o+c+a}}};Object.freeze(ea);var xh={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
99
99
  inside top level rule: ->`+e.name+"<-"}},ut={buildDuplicateFoundError(e,t){function r(l){return l instanceof M?l.terminalType.name:l instanceof B?l.nonTerminalName:""}let n=e.name,o=Te(t),i=o.idx,a=qe(o),s=r(o),c=i>0,u=`->${a}${c?i:""}<- ${s?`with argument: ->${s}<-`:""}
100
100
  appears more than once (${t.length} times) in the top level rule: ->${n}<-.
101
101
  For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
@@ -120,43 +120,53 @@ rule: <${t}> can be invoked from itself (directly or indirectly)
120
120
  without consuming any Tokens. The grammar path that causes this is:
121
121
  ${n}
122
122
  To fix this refactor your grammar to remove the left recursion.
123
- see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof Be?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function Oh(e,t){let r=new sc(e,t);return r.resolveRefs(),r.errors}var sc=class extends Fe{constructor(t,r){super(),this.nameToTopRule=t,this.errMsgProvider=r,this.errors=[]}resolveRefs(){L(j(this.nameToTopRule),t=>{this.currTopLevel=t,t.accept(this)})}visitNonTerminal(t){let r=this.nameToTopRule[t.nonTerminalName];if(r)t.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:ge.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}};var cc=class extends Gt{constructor(t,r){super(),this.topProd=t,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=V(this.path.ruleStack).reverse(),this.occurrenceStack=V(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,r=[]){this.found||super.walk(t,r)}walkProdRef(t,r,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){let o=r.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,o)}}updateExpectedNext(){v(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},ra=class extends cc{constructor(t,r){super(t,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,r,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){let o=r.concat(n),i=new q({definition:o});this.possibleTokTypes=Gr(i),this.found=!0}}},Bn=class extends Gt{constructor(t,r){super(),this.topRule=t,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},na=class extends Bn{walkMany(t,r,n){if(t.idx===this.occurrence){let o=Te(r.concat(n));this.result.isEndOfRule=o===void 0,o instanceof M&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else super.walkMany(t,r,n)}},Lo=class extends Bn{walkManySep(t,r,n){if(t.idx===this.occurrence){let o=Te(r.concat(n));this.result.isEndOfRule=o===void 0,o instanceof M&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else super.walkManySep(t,r,n)}},oa=class extends Bn{walkAtLeastOne(t,r,n){if(t.idx===this.occurrence){let o=Te(r.concat(n));this.result.isEndOfRule=o===void 0,o instanceof M&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else super.walkAtLeastOne(t,r,n)}},Ao=class extends Bn{walkAtLeastOneSep(t,r,n){if(t.idx===this.occurrence){let o=Te(r.concat(n));this.result.isEndOfRule=o===void 0,o instanceof M&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else super.walkAtLeastOneSep(t,r,n)}};function ia(e,t,r=[]){r=V(r);let n=[],o=0;function i(s){return s.concat(le(e,o+1))}function a(s){let c=ia(i(s),t,r);return n.concat(c)}for(;r.length<t&&o<e.length;){let s=e[o];if(s instanceof q)return a(s.definition);if(s instanceof B)return a(s.definition);if(s instanceof F)n=a(s.definition);else if(s instanceof Y){let c=s.definition.concat([new w({definition:s.definition})]);return a(c)}else if(s instanceof z){let c=[new q({definition:s.definition}),new w({definition:[new M({terminalType:s.separator})].concat(s.definition)})];return a(c)}else if(s instanceof G){let c=s.definition.concat([new w({definition:[new M({terminalType:s.separator})].concat(s.definition)})]);n=a(c)}else if(s instanceof w){let c=s.definition.concat([new w({definition:s.definition})]);n=a(c)}else{if(s instanceof H)return L(s.definition,c=>{v(c.definition)===!1&&(n=a(c.definition))}),n;if(s instanceof M)r.push(s.terminalType);else throw Error("non exhaustive match")}o++}return n.push({partialPath:r,suffixDef:le(e,o)}),n}function aa(e,t,r,n){let o="EXIT_NONE_TERMINAL",i=[o],a="EXIT_ALTERNATIVE",s=!1,c=t.length,u=c-n-1,l=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!v(f);){let p=f.pop();if(p===a){s&&xt(f).idx<=u&&f.pop();continue}let h=p.def,E=p.idx,y=p.ruleStack,S=p.occurrenceStack;if(v(h))continue;let d=h[0];if(d===o){let g={idx:E,def:le(h),ruleStack:jt(y),occurrenceStack:jt(S)};f.push(g)}else if(d instanceof M)if(E<c-1){let g=E+1,m=t[g];if(r(m,d.terminalType)){let x={idx:g,def:le(h),ruleStack:y,occurrenceStack:S};f.push(x)}}else if(E===c-1)l.push({nextTokenType:d.terminalType,nextTokenOccurrence:d.idx,ruleStack:y,occurrenceStack:S}),s=!0;else throw Error("non exhaustive match");else if(d instanceof B){let g=V(y);g.push(d.nonTerminalName);let m=V(S);m.push(d.idx);let x={idx:E,def:d.definition.concat(i,le(h)),ruleStack:g,occurrenceStack:m};f.push(x)}else if(d instanceof F){let g={idx:E,def:le(h),ruleStack:y,occurrenceStack:S};f.push(g),f.push(a);let m={idx:E,def:d.definition.concat(le(h)),ruleStack:y,occurrenceStack:S};f.push(m)}else if(d instanceof Y){let g=new w({definition:d.definition,idx:d.idx}),m=d.definition.concat([g],le(h)),x={idx:E,def:m,ruleStack:y,occurrenceStack:S};f.push(x)}else if(d instanceof z){let g=new M({terminalType:d.separator}),m=new w({definition:[g].concat(d.definition),idx:d.idx}),x=d.definition.concat([m],le(h)),C={idx:E,def:x,ruleStack:y,occurrenceStack:S};f.push(C)}else if(d instanceof G){let g={idx:E,def:le(h),ruleStack:y,occurrenceStack:S};f.push(g),f.push(a);let m=new M({terminalType:d.separator}),x=new w({definition:[m].concat(d.definition),idx:d.idx}),C=d.definition.concat([x],le(h)),Ce={idx:E,def:C,ruleStack:y,occurrenceStack:S};f.push(Ce)}else if(d instanceof w){let g={idx:E,def:le(h),ruleStack:y,occurrenceStack:S};f.push(g),f.push(a);let m=new w({definition:d.definition,idx:d.idx}),x=d.definition.concat([m],le(h)),C={idx:E,def:x,ruleStack:y,occurrenceStack:S};f.push(C)}else if(d instanceof H)for(let g=d.definition.length-1;g>=0;g--){let m=d.definition[g],x={idx:E,def:m.definition.concat(le(h)),ruleStack:y,occurrenceStack:S};f.push(x),f.push(a)}else if(d instanceof q)f.push({idx:E,def:d.definition.concat(le(h)),ruleStack:y,occurrenceStack:S});else if(d instanceof Be)f.push(FN(d,E,y,S));else throw Error("non exhaustive match")}return l}function FN(e,t,r,n){let o=V(r);o.push(e.name);let i=V(n);return i.push(1),{idx:t,def:e.definition,ruleStack:o,occurrenceStack:i}}var Z;(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(Z||(Z={}));function Uo(e){if(e instanceof F||e==="Option")return Z.OPTION;if(e instanceof w||e==="Repetition")return Z.REPETITION;if(e instanceof Y||e==="RepetitionMandatory")return Z.REPETITION_MANDATORY;if(e instanceof z||e==="RepetitionMandatoryWithSeparator")return Z.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof G||e==="RepetitionWithSeparator")return Z.REPETITION_WITH_SEPARATOR;if(e instanceof H||e==="Alternation")return Z.ALTERNATION;throw Error("non exhaustive match")}function ca(e){let{occurrence:t,rule:r,prodType:n,maxLookahead:o}=e,i=Uo(n);return i===Z.ALTERNATION?Fn(t,r,o):Dn(t,r,i,o)}function Ah(e,t,r,n,o,i){let a=Fn(e,t,r),s=Ph(a)?_n:Ht;return i(a,n,s,o)}function Uh(e,t,r,n,o,i){let a=Dn(e,t,o,r),s=Ph(a)?_n:Ht;return i(a[0],s,n)}function Nh(e,t,r,n){let o=e.length,i=Ie(e,a=>Ie(a,s=>s.length===1));if(t)return function(a){let s=R(a,c=>c.GATE);for(let c=0;c<o;c++){let u=e[c],l=u.length,f=s[c];if(!(f!==void 0&&f.call(this)===!1))e:for(let p=0;p<l;p++){let h=u[p],E=h.length;for(let y=0;y<E;y++){let S=this.LA(y+1);if(r(S,h[y])===!1)continue e}return c}}};if(i&&!n){let a=R(e,c=>ue(c)),s=te(a,(c,u,l)=>(L(u,f=>{U(c,f.tokenTypeIdx)||(c[f.tokenTypeIdx]=l),L(f.categoryMatches,p=>{U(c,p)||(c[p]=l)})}),c),{});return function(){let c=this.LA(1);return s[c.tokenTypeIdx]}}else return function(){for(let a=0;a<o;a++){let s=e[a],c=s.length;e:for(let u=0;u<c;u++){let l=s[u],f=l.length;for(let p=0;p<f;p++){let h=this.LA(p+1);if(r(h,l[p])===!1)continue e}return a}}}}function Ch(e,t,r){let n=Ie(e,i=>i.length===1),o=e.length;if(n&&!r){let i=ue(e);if(i.length===1&&v(i[0].categoryMatches)){let s=i[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}else{let a=te(i,(s,c,u)=>(s[c.tokenTypeIdx]=!0,L(c.categoryMatches,l=>{s[l]=!0}),s),[]);return function(){let s=this.LA(1);return a[s.tokenTypeIdx]===!0}}}else return function(){e:for(let i=0;i<o;i++){let a=e[i],s=a.length;for(let c=0;c<s;c++){let u=this.LA(c+1);if(t(u,a[c])===!1)continue e}return!0}return!1}}var lc=class extends Gt{constructor(t,r,n){super(),this.topProd=t,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,r,n,o){return t.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(o),!0):!1}walkOption(t,r,n){this.checkIsTarget(t,Z.OPTION,r,n)||super.walkOption(t,r,n)}walkAtLeastOne(t,r,n){this.checkIsTarget(t,Z.REPETITION_MANDATORY,r,n)||super.walkOption(t,r,n)}walkAtLeastOneSep(t,r,n){this.checkIsTarget(t,Z.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}walkMany(t,r,n){this.checkIsTarget(t,Z.REPETITION,r,n)||super.walkOption(t,r,n)}walkManySep(t,r,n){this.checkIsTarget(t,Z.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}},sa=class extends Fe{constructor(t,r,n){super(),this.targetOccurrence=t,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(t,r){t.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||t===this.targetRef)&&(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,Z.OPTION)}visitRepetition(t){this.checkIsTarget(t,Z.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,Z.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,Z.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,Z.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,Z.ALTERNATION)}};function Lh(e){let t=new Array(e);for(let r=0;r<e;r++)t[r]=[];return t}function uc(e){let t=[""];for(let r=0;r<e.length;r++){let n=e[r],o=[];for(let i=0;i<t.length;i++){let a=t[i];o.push(a+"_"+n.tokenTypeIdx);for(let s=0;s<n.categoryMatches.length;s++){let c="_"+n.categoryMatches[s];o.push(a+c)}}t=o}return t}function DN(e,t,r){for(let n=0;n<e.length;n++){if(n===r)continue;let o=e[n];for(let i=0;i<t.length;i++){let a=t[i];if(o[a]===!0)return!1}}return!0}function bh(e,t){let r=R(e,a=>ia([a],1)),n=Lh(r.length),o=R(r,a=>{let s={};return L(a,c=>{let u=uc(c.partialPath);L(u,l=>{s[l]=!0})}),s}),i=r;for(let a=1;a<=t;a++){let s=i;i=Lh(s.length);for(let c=0;c<s.length;c++){let u=s[c];for(let l=0;l<u.length;l++){let f=u[l].partialPath,p=u[l].suffixDef,h=uc(f);if(DN(o,h,c)||v(p)||f.length===t){let y=n[c];if(ua(y,f)===!1){y.push(f);for(let S=0;S<h.length;S++){let d=h[S];o[c][d]=!0}}}else{let y=ia(p,a+1,f);i[c]=i[c].concat(y),L(y,S=>{let d=uc(S.partialPath);L(d,g=>{o[c][g]=!0})})}}}}return n}function Fn(e,t,r,n){let o=new sa(e,Z.ALTERNATION,n);return t.accept(o),bh(o.result,r)}function Dn(e,t,r,n){let o=new sa(e,r);t.accept(o);let i=o.result,s=new lc(t,e,r).startWalking(),c=new q({definition:i}),u=new q({definition:s});return bh([c,u],n)}function ua(e,t){e:for(let r=0;r<e.length;r++){let n=e[r];if(n.length===t.length){for(let o=0;o<n.length;o++){let i=t[o],a=n[o];if((i===a||a.categoryMatchesMap[i.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function Ih(e,t){return e.length<t.length&&Ie(e,(r,n)=>{let o=t[n];return r===o||o.categoryMatchesMap[r.tokenTypeIdx]})}function Ph(e){return Ie(e,t=>Ie(t,r=>Ie(r,n=>v(n.categoryMatches))))}function vh(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return R(t,r=>Object.assign({type:ge.CUSTOM_LOOKAHEAD_VALIDATION},r))}function Mh(e,t,r,n){let o=Ue(e,c=>jN(c,r)),i=qN(e,t,r),a=Ue(e,c=>KN(c,r)),s=Ue(e,c=>HN(c,e,n,r));return o.concat(i,a,s)}function jN(e,t){let r=new fc;e.accept(r);let n=r.allProductions,o=Ys(n,GN),i=Ve(o,s=>s.length>1);return R(j(i),s=>{let c=Te(s),u=t.buildDuplicateFoundError(e,s),l=qe(c),f={message:u,type:ge.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:l,occurrence:c.idx},p=kh(c);return p&&(f.parameter=p),f})}function GN(e){return`${qe(e)}_#_${e.idx}_#_${kh(e)}`}function kh(e){return e instanceof M?e.terminalType.name:e instanceof B?e.nonTerminalName:""}var fc=class extends Fe{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}};function HN(e,t,r,n){let o=[];if(te(t,(a,s)=>s.name===e.name?a+1:a,0)>1){let a=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});o.push({message:a,type:ge.DUPLICATE_RULE_NAME,ruleName:e.name})}return o}function wh(e,t,r){let n=[],o;return J(t,e)||(o=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:o,type:ge.INVALID_RULE_OVERRIDE,ruleName:e})),n}function dc(e,t,r,n=[]){let o=[],i=la(t.definition);if(v(i))return[];{let a=e.name;J(i,e)&&o.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:ge.LEFT_RECURSION,ruleName:a});let c=Or(i,n.concat([e])),u=Ue(c,l=>{let f=V(n);return f.push(l),dc(e,l,r,f)});return o.concat(u)}}function la(e){let t=[];if(v(e))return t;let r=Te(e);if(r instanceof B)t.push(r.referencedRule);else if(r instanceof q||r instanceof F||r instanceof Y||r instanceof z||r instanceof G||r instanceof w)t=t.concat(la(r.definition));else if(r instanceof H)t=ue(R(r.definition,i=>la(i.definition)));else if(!(r instanceof M))throw Error("non exhaustive match");let n=jr(r),o=e.length>1;if(n&&o){let i=le(e);return t.concat(la(i))}else return t}var No=class extends Fe{constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}};function _h(e,t){let r=new No;e.accept(r);let n=r.alternations;return Ue(n,i=>{let a=jt(i.definition);return Ue(a,(s,c)=>{let u=aa([s],[],Ht,1);return v(u)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:i,emptyChoiceIdx:c}),type:ge.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:i.idx,alternative:c+1}]:[]})})}function Bh(e,t,r){let n=new No;e.accept(n);let o=n.alternations;return o=Lr(o,a=>a.ignoreAmbiguities===!0),Ue(o,a=>{let s=a.idx,c=a.maxLookahead||t,u=Fn(s,e,c,a),l=WN(u,a,e,r),f=VN(u,a,e,r);return l.concat(f)})}var pc=class extends Fe{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}};function KN(e,t){let r=new No;e.accept(r);let n=r.alternations;return Ue(n,i=>i.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:i}),type:ge.TOO_MANY_ALTS,ruleName:e.name,occurrence:i.idx}]:[])}function Fh(e,t,r){let n=[];return L(e,o=>{let i=new pc;o.accept(i);let a=i.allProductions;L(a,s=>{let c=Uo(s),u=s.maxLookahead||t,l=s.idx,p=Dn(l,o,c,u)[0];if(v(ue(p))){let h=r.buildEmptyRepetitionError({topLevelRule:o,repetition:s});n.push({message:h,type:ge.NO_NON_EMPTY_LOOKAHEAD,ruleName:o.name})}})}),n}function WN(e,t,r,n){let o=[],i=te(e,(s,c,u)=>(t.definition[u].ignoreAmbiguities===!0||L(c,l=>{let f=[u];L(e,(p,h)=>{u!==h&&ua(p,l)&&t.definition[h].ignoreAmbiguities!==!0&&f.push(h)}),f.length>1&&!ua(o,l)&&(o.push(l),s.push({alts:f,path:l}))}),s),[]);return R(i,s=>{let c=R(s.alts,l=>l+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:c,prefixPath:s.path}),type:ge.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:s.alts}})}function VN(e,t,r,n){let o=te(e,(a,s,c)=>{let u=R(s,l=>({idx:c,path:l}));return a.concat(u)},[]);return Rt(Ue(o,a=>{if(t.definition[a.idx].ignoreAmbiguities===!0)return[];let c=a.idx,u=a.path,l=Se(o,p=>t.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<c&&Ih(p.path,u));return R(l,p=>{let h=[p.idx+1,c+1],E=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:h,prefixPath:p.path}),type:ge.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:E,alternatives:h}})}))}function qN(e,t,r){let n=[],o=R(t,i=>i.name);return L(e,i=>{let a=i.name;if(J(o,a)){let s=r.buildNamespaceConflictError(i);n.push({message:s,type:ge.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),n}function Dh(e){let t=Cn(e,{errMsgProvider:xh}),r={};return L(e.rules,n=>{r[n.name]=n}),Oh(r,t.errMsgProvider)}function jh(e){return e=Cn(e,{errMsgProvider:ut}),Mh(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var Gh="MismatchedTokenException",Hh="NoViableAltException",Kh="EarlyExitException",Wh="NotAllInputParsedException",Vh=[Gh,Hh,Kh,Wh];Object.freeze(Vh);function At(e){return J(Vh,e.name)}var jn=class extends Error{constructor(t,r){super(t),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},qr=class extends jn{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=Gh}},Co=class extends jn{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=Hh}},bo=class extends jn{constructor(t,r){super(t,r),this.name=Wh}},Io=class extends jn{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=Kh}};var hc={},gc="InRuleRecoveryException",mc=class extends Error{constructor(t){super(t),this.name=gc}},fa=class{initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=U(t,"recoveryEnabled")?t.recoveryEnabled:De.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=YN)}getTokenToInsert(t){let r=Vr(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,r,n,o){let i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],c=!1,u=this.LA(1),l=this.LA(1),f=()=>{let p=this.LA(0),h=this.errorMessageProvider.buildMismatchTokenMessage({expected:o,actual:u,previous:p,ruleName:this.getCurrRuleFullName()}),E=new qr(h,u,this.LA(0));E.resyncedTokens=jt(s),this.SAVE_ERROR(E)};for(;!c;)if(this.tokenMatcher(l,o)){f();return}else if(n.call(this)){f(),t.apply(this,r);return}else this.tokenMatcher(l,i)?c=!0:(l=this.SKIP_TOKEN(),this.addToResyncTokens(l,s));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,r)))}getFollowsForInRuleRecovery(t,r){let n=this.getCurrentGrammarPath(t,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(t,r){if(this.canRecoverWithSingleTokenInsertion(t,r))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new mc("sad sad panda")}canPerformInRuleRecovery(t,r){return this.canRecoverWithSingleTokenInsertion(t,r)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,r){if(!this.canTokenTypeBeInsertedInRecovery(t)||v(r))return!1;let n=this.LA(1);return Ot(r,i=>this.tokenMatcher(n,i))!==void 0}canRecoverWithSingleTokenDeletion(t){return this.canTokenTypeBeDeletedInRecovery(t)?this.tokenMatcher(this.LA(2),t):!1}isInCurrentRuleReSyncSet(t){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return J(n,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let o=Ot(t,i=>P(r,i));if(o!==void 0)return o;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return hc;let t=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let t=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return R(t,(n,o)=>o===0?hc:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[o],inRule:this.shortRuleNameToFullName(t[o-1])})}flattenFollowSet(){let t=R(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return ue(t)}getFollowSetFromFollowKey(t){if(t===hc)return[Je];let r=t.ruleName+t.idxInCallingRule+Yi+t.inRule;return this.resyncFollows[r]}addToResyncTokens(t,r){return this.tokenMatcher(t,Je)||r.push(t),r}reSyncTo(t){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,t)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return jt(r)}attemptInRepetitionRecovery(t,r,n,o,i,a,s){}getCurrentGrammarPath(t,r){let n=this.getHumanReadableRuleStack(),o=V(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:o,lastTok:t,lastTokOccurrence:r}}getHumanReadableRuleStack(){return R(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}};function YN(e,t,r,n,o,i,a){let s=this.getKeyForAutomaticLookahead(n,o),c=this.firstAfterRepMap[s];if(c===void 0){let p=this.getCurrRuleFullName(),h=this.getGAstProductions()[p];c=new i(h,o).startWalking(),this.firstAfterRepMap[s]=c}let u=c.token,l=c.occurrence,f=c.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=Je,l=1),!(u===void 0||l===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,l,a)&&this.tryInRepetitionRecovery(e,t,r,u)}function pa(e,t,r){return r|t|e}var Yr=class{constructor(t){var r;this.maxLookahead=(r=t?.maxLookahead)!==null&&r!==void 0?r:De.maxLookahead}validate(t){let r=this.validateNoLeftRecursion(t.rules);if(v(r)){let n=this.validateEmptyOrAlternatives(t.rules),o=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...r,...n,...o,...i]}return r}validateNoLeftRecursion(t){return Ue(t,r=>dc(r,r,ut))}validateEmptyOrAlternatives(t){return Ue(t,r=>_h(r,ut))}validateAmbiguousAlternationAlternatives(t,r){return Ue(t,n=>Bh(n,r,ut))}validateSomeNonEmptyLookaheadPath(t,r){return Fh(t,r,ut)}buildLookaheadForAlternation(t){return Ah(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,Nh)}buildLookaheadForOptional(t){return Uh(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,Uo(t.prodType),Ch)}};var ha=class{initLooksAhead(t){this.dynamicTokensEnabled=U(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:De.dynamicTokensEnabled,this.maxLookahead=U(t,"maxLookahead")?t.maxLookahead:De.maxLookahead,this.lookaheadStrategy=U(t,"lookaheadStrategy")?t.lookaheadStrategy:new Yr({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){L(t,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:o,option:i,repetitionMandatory:a,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:c}=zN(r);L(n,u=>{let l=u.idx===0?"":u.idx;this.TRACE_INIT(`${qe(u)}${l}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:r,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=pa(this.fullRuleNameToShort[r.name],256,u.idx);this.setLaFuncCache(p,f)})}),L(o,u=>{this.computeLookaheadFunc(r,u.idx,768,"Repetition",u.maxLookahead,qe(u))}),L(i,u=>{this.computeLookaheadFunc(r,u.idx,512,"Option",u.maxLookahead,qe(u))}),L(a,u=>{this.computeLookaheadFunc(r,u.idx,1024,"RepetitionMandatory",u.maxLookahead,qe(u))}),L(s,u=>{this.computeLookaheadFunc(r,u.idx,1536,"RepetitionMandatoryWithSeparator",u.maxLookahead,qe(u))}),L(c,u=>{this.computeLookaheadFunc(r,u.idx,1280,"RepetitionWithSeparator",u.maxLookahead,qe(u))})})})}computeLookaheadFunc(t,r,n,o,i,a){this.TRACE_INIT(`${a}${r===0?"":r}`,()=>{let s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:t,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:o}),c=pa(this.fullRuleNameToShort[t.name],n,r);this.setLaFuncCache(c,s)})}getKeyForAutomaticLookahead(t,r){let n=this.getLastExplicitRuleShortName();return pa(n,t,r)}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,r){this.lookAheadFuncsCache.set(t,r)}},Ec=class extends Fe{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},da=new Ec;function zN(e){da.reset(),e.accept(da);let t=da.dslMethods;return da.reset(),t}function Tc(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function Rc(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function qh(e,t,r){e.children[r]===void 0?e.children[r]=[t]:e.children[r].push(t)}function Yh(e,t,r){e.children[t]===void 0?e.children[t]=[r]:e.children[t].push(r)}var XN="name";function xc(e,t){Object.defineProperty(e,XN,{enumerable:!1,configurable:!0,writable:!1,value:t})}function JN(e,t){let r=K(e),n=r.length;for(let o=0;o<n;o++){let i=r[o],a=e[i],s=a.length;for(let c=0;c<s;c++){let u=a[c];u.tokenTypeIdx===void 0&&this[u.name](u.children,t)}}}function zh(e,t){let r=function(){};xc(r,e+"BaseSemantics");let n={visit:function(o,i){if(N(o)&&(o=o[0]),!Pe(o))return this[o.name](o.children,i)},validateVisitor:function(){let o=QN(this,t);if(!v(o)){let i=R(o,a=>a.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
123
+ see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof Be?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function Oh(e,t){let r=new sc(e,t);return r.resolveRefs(),r.errors}var sc=class extends Fe{constructor(t,r){super(),this.nameToTopRule=t,this.errMsgProvider=r,this.errors=[]}resolveRefs(){L(j(this.nameToTopRule),t=>{this.currTopLevel=t,t.accept(this)})}visitNonTerminal(t){let r=this.nameToTopRule[t.nonTerminalName];if(r)t.referencedRule=r;else{let n=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:n,type:ge.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}};var cc=class extends Gt{constructor(t,r){super(),this.topProd=t,this.path=r,this.possibleTokTypes=[],this.nextProductionName="",this.nextProductionOccurrence=0,this.found=!1,this.isAtEndOfPath=!1}startWalking(){if(this.found=!1,this.path.ruleStack[0]!==this.topProd.name)throw Error("The path does not start with the walker's top Rule!");return this.ruleStack=V(this.path.ruleStack).reverse(),this.occurrenceStack=V(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,r=[]){this.found||super.walk(t,r)}walkProdRef(t,r,n){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){let o=r.concat(n);this.updateExpectedNext(),this.walk(t.referencedRule,o)}}updateExpectedNext(){v(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},ta=class extends cc{constructor(t,r){super(t,r),this.path=r,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,r,n){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){let o=r.concat(n),i=new q({definition:o});this.possibleTokTypes=Gr(i),this.found=!0}}},Bn=class extends Gt{constructor(t,r){super(),this.topRule=t,this.occurrence=r,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},ra=class extends Bn{walkMany(t,r,n){if(t.idx===this.occurrence){let o=Te(r.concat(n));this.result.isEndOfRule=o===void 0,o instanceof M&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else super.walkMany(t,r,n)}},Oo=class extends Bn{walkManySep(t,r,n){if(t.idx===this.occurrence){let o=Te(r.concat(n));this.result.isEndOfRule=o===void 0,o instanceof M&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else super.walkManySep(t,r,n)}},na=class extends Bn{walkAtLeastOne(t,r,n){if(t.idx===this.occurrence){let o=Te(r.concat(n));this.result.isEndOfRule=o===void 0,o instanceof M&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else super.walkAtLeastOne(t,r,n)}},Lo=class extends Bn{walkAtLeastOneSep(t,r,n){if(t.idx===this.occurrence){let o=Te(r.concat(n));this.result.isEndOfRule=o===void 0,o instanceof M&&(this.result.token=o.terminalType,this.result.occurrence=o.idx)}else super.walkAtLeastOneSep(t,r,n)}};function oa(e,t,r=[]){r=V(r);let n=[],o=0;function i(s){return s.concat(le(e,o+1))}function a(s){let c=oa(i(s),t,r);return n.concat(c)}for(;r.length<t&&o<e.length;){let s=e[o];if(s instanceof q)return a(s.definition);if(s instanceof B)return a(s.definition);if(s instanceof F)n=a(s.definition);else if(s instanceof Y){let c=s.definition.concat([new w({definition:s.definition})]);return a(c)}else if(s instanceof z){let c=[new q({definition:s.definition}),new w({definition:[new M({terminalType:s.separator})].concat(s.definition)})];return a(c)}else if(s instanceof G){let c=s.definition.concat([new w({definition:[new M({terminalType:s.separator})].concat(s.definition)})]);n=a(c)}else if(s instanceof w){let c=s.definition.concat([new w({definition:s.definition})]);n=a(c)}else{if(s instanceof H)return L(s.definition,c=>{v(c.definition)===!1&&(n=a(c.definition))}),n;if(s instanceof M)r.push(s.terminalType);else throw Error("non exhaustive match")}o++}return n.push({partialPath:r,suffixDef:le(e,o)}),n}function ia(e,t,r,n){let o="EXIT_NONE_TERMINAL",i=[o],a="EXIT_ALTERNATIVE",s=!1,c=t.length,u=c-n-1,l=[],f=[];for(f.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!v(f);){let p=f.pop();if(p===a){s&&xt(f).idx<=u&&f.pop();continue}let h=p.def,E=p.idx,y=p.ruleStack,S=p.occurrenceStack;if(v(h))continue;let d=h[0];if(d===o){let g={idx:E,def:le(h),ruleStack:jt(y),occurrenceStack:jt(S)};f.push(g)}else if(d instanceof M)if(E<c-1){let g=E+1,m=t[g];if(r(m,d.terminalType)){let x={idx:g,def:le(h),ruleStack:y,occurrenceStack:S};f.push(x)}}else if(E===c-1)l.push({nextTokenType:d.terminalType,nextTokenOccurrence:d.idx,ruleStack:y,occurrenceStack:S}),s=!0;else throw Error("non exhaustive match");else if(d instanceof B){let g=V(y);g.push(d.nonTerminalName);let m=V(S);m.push(d.idx);let x={idx:E,def:d.definition.concat(i,le(h)),ruleStack:g,occurrenceStack:m};f.push(x)}else if(d instanceof F){let g={idx:E,def:le(h),ruleStack:y,occurrenceStack:S};f.push(g),f.push(a);let m={idx:E,def:d.definition.concat(le(h)),ruleStack:y,occurrenceStack:S};f.push(m)}else if(d instanceof Y){let g=new w({definition:d.definition,idx:d.idx}),m=d.definition.concat([g],le(h)),x={idx:E,def:m,ruleStack:y,occurrenceStack:S};f.push(x)}else if(d instanceof z){let g=new M({terminalType:d.separator}),m=new w({definition:[g].concat(d.definition),idx:d.idx}),x=d.definition.concat([m],le(h)),C={idx:E,def:x,ruleStack:y,occurrenceStack:S};f.push(C)}else if(d instanceof G){let g={idx:E,def:le(h),ruleStack:y,occurrenceStack:S};f.push(g),f.push(a);let m=new M({terminalType:d.separator}),x=new w({definition:[m].concat(d.definition),idx:d.idx}),C=d.definition.concat([x],le(h)),Ce={idx:E,def:C,ruleStack:y,occurrenceStack:S};f.push(Ce)}else if(d instanceof w){let g={idx:E,def:le(h),ruleStack:y,occurrenceStack:S};f.push(g),f.push(a);let m=new w({definition:d.definition,idx:d.idx}),x=d.definition.concat([m],le(h)),C={idx:E,def:x,ruleStack:y,occurrenceStack:S};f.push(C)}else if(d instanceof H)for(let g=d.definition.length-1;g>=0;g--){let m=d.definition[g],x={idx:E,def:m.definition.concat(le(h)),ruleStack:y,occurrenceStack:S};f.push(x),f.push(a)}else if(d instanceof q)f.push({idx:E,def:d.definition.concat(le(h)),ruleStack:y,occurrenceStack:S});else if(d instanceof Be)f.push(FN(d,E,y,S));else throw Error("non exhaustive match")}return l}function FN(e,t,r,n){let o=V(r);o.push(e.name);let i=V(n);return i.push(1),{idx:t,def:e.definition,ruleStack:o,occurrenceStack:i}}var Z;(function(e){e[e.OPTION=0]="OPTION",e[e.REPETITION=1]="REPETITION",e[e.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",e[e.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",e[e.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",e[e.ALTERNATION=5]="ALTERNATION"})(Z||(Z={}));function Ao(e){if(e instanceof F||e==="Option")return Z.OPTION;if(e instanceof w||e==="Repetition")return Z.REPETITION;if(e instanceof Y||e==="RepetitionMandatory")return Z.REPETITION_MANDATORY;if(e instanceof z||e==="RepetitionMandatoryWithSeparator")return Z.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof G||e==="RepetitionWithSeparator")return Z.REPETITION_WITH_SEPARATOR;if(e instanceof H||e==="Alternation")return Z.ALTERNATION;throw Error("non exhaustive match")}function sa(e){let{occurrence:t,rule:r,prodType:n,maxLookahead:o}=e,i=Ao(n);return i===Z.ALTERNATION?Fn(t,r,o):Dn(t,r,i,o)}function Ah(e,t,r,n,o,i){let a=Fn(e,t,r),s=Ph(a)?_n:Ht;return i(a,n,s,o)}function Uh(e,t,r,n,o,i){let a=Dn(e,t,o,r),s=Ph(a)?_n:Ht;return i(a[0],s,n)}function Nh(e,t,r,n){let o=e.length,i=Ie(e,a=>Ie(a,s=>s.length===1));if(t)return function(a){let s=R(a,c=>c.GATE);for(let c=0;c<o;c++){let u=e[c],l=u.length,f=s[c];if(!(f!==void 0&&f.call(this)===!1))e:for(let p=0;p<l;p++){let h=u[p],E=h.length;for(let y=0;y<E;y++){let S=this.LA(y+1);if(r(S,h[y])===!1)continue e}return c}}};if(i&&!n){let a=R(e,c=>ue(c)),s=te(a,(c,u,l)=>(L(u,f=>{U(c,f.tokenTypeIdx)||(c[f.tokenTypeIdx]=l),L(f.categoryMatches,p=>{U(c,p)||(c[p]=l)})}),c),{});return function(){let c=this.LA(1);return s[c.tokenTypeIdx]}}else return function(){for(let a=0;a<o;a++){let s=e[a],c=s.length;e:for(let u=0;u<c;u++){let l=s[u],f=l.length;for(let p=0;p<f;p++){let h=this.LA(p+1);if(r(h,l[p])===!1)continue e}return a}}}}function Ch(e,t,r){let n=Ie(e,i=>i.length===1),o=e.length;if(n&&!r){let i=ue(e);if(i.length===1&&v(i[0].categoryMatches)){let s=i[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===s}}else{let a=te(i,(s,c,u)=>(s[c.tokenTypeIdx]=!0,L(c.categoryMatches,l=>{s[l]=!0}),s),[]);return function(){let s=this.LA(1);return a[s.tokenTypeIdx]===!0}}}else return function(){e:for(let i=0;i<o;i++){let a=e[i],s=a.length;for(let c=0;c<s;c++){let u=this.LA(c+1);if(t(u,a[c])===!1)continue e}return!0}return!1}}var lc=class extends Gt{constructor(t,r,n){super(),this.topProd=t,this.targetOccurrence=r,this.targetProdType=n}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,r,n,o){return t.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=n.concat(o),!0):!1}walkOption(t,r,n){this.checkIsTarget(t,Z.OPTION,r,n)||super.walkOption(t,r,n)}walkAtLeastOne(t,r,n){this.checkIsTarget(t,Z.REPETITION_MANDATORY,r,n)||super.walkOption(t,r,n)}walkAtLeastOneSep(t,r,n){this.checkIsTarget(t,Z.REPETITION_MANDATORY_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}walkMany(t,r,n){this.checkIsTarget(t,Z.REPETITION,r,n)||super.walkOption(t,r,n)}walkManySep(t,r,n){this.checkIsTarget(t,Z.REPETITION_WITH_SEPARATOR,r,n)||super.walkOption(t,r,n)}},aa=class extends Fe{constructor(t,r,n){super(),this.targetOccurrence=t,this.targetProdType=r,this.targetRef=n,this.result=[]}checkIsTarget(t,r){t.idx===this.targetOccurrence&&this.targetProdType===r&&(this.targetRef===void 0||t===this.targetRef)&&(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,Z.OPTION)}visitRepetition(t){this.checkIsTarget(t,Z.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,Z.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,Z.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,Z.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,Z.ALTERNATION)}};function Lh(e){let t=new Array(e);for(let r=0;r<e;r++)t[r]=[];return t}function uc(e){let t=[""];for(let r=0;r<e.length;r++){let n=e[r],o=[];for(let i=0;i<t.length;i++){let a=t[i];o.push(a+"_"+n.tokenTypeIdx);for(let s=0;s<n.categoryMatches.length;s++){let c="_"+n.categoryMatches[s];o.push(a+c)}}t=o}return t}function DN(e,t,r){for(let n=0;n<e.length;n++){if(n===r)continue;let o=e[n];for(let i=0;i<t.length;i++){let a=t[i];if(o[a]===!0)return!1}}return!0}function bh(e,t){let r=R(e,a=>oa([a],1)),n=Lh(r.length),o=R(r,a=>{let s={};return L(a,c=>{let u=uc(c.partialPath);L(u,l=>{s[l]=!0})}),s}),i=r;for(let a=1;a<=t;a++){let s=i;i=Lh(s.length);for(let c=0;c<s.length;c++){let u=s[c];for(let l=0;l<u.length;l++){let f=u[l].partialPath,p=u[l].suffixDef,h=uc(f);if(DN(o,h,c)||v(p)||f.length===t){let y=n[c];if(ca(y,f)===!1){y.push(f);for(let S=0;S<h.length;S++){let d=h[S];o[c][d]=!0}}}else{let y=oa(p,a+1,f);i[c]=i[c].concat(y),L(y,S=>{let d=uc(S.partialPath);L(d,g=>{o[c][g]=!0})})}}}}return n}function Fn(e,t,r,n){let o=new aa(e,Z.ALTERNATION,n);return t.accept(o),bh(o.result,r)}function Dn(e,t,r,n){let o=new aa(e,r);t.accept(o);let i=o.result,s=new lc(t,e,r).startWalking(),c=new q({definition:i}),u=new q({definition:s});return bh([c,u],n)}function ca(e,t){e:for(let r=0;r<e.length;r++){let n=e[r];if(n.length===t.length){for(let o=0;o<n.length;o++){let i=t[o],a=n[o];if((i===a||a.categoryMatchesMap[i.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}function Ih(e,t){return e.length<t.length&&Ie(e,(r,n)=>{let o=t[n];return r===o||o.categoryMatchesMap[r.tokenTypeIdx]})}function Ph(e){return Ie(e,t=>Ie(t,r=>Ie(r,n=>v(n.categoryMatches))))}function vh(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return R(t,r=>Object.assign({type:ge.CUSTOM_LOOKAHEAD_VALIDATION},r))}function Mh(e,t,r,n){let o=Ue(e,c=>jN(c,r)),i=qN(e,t,r),a=Ue(e,c=>KN(c,r)),s=Ue(e,c=>HN(c,e,n,r));return o.concat(i,a,s)}function jN(e,t){let r=new fc;e.accept(r);let n=r.allProductions,o=Ys(n,GN),i=Ve(o,s=>s.length>1);return R(j(i),s=>{let c=Te(s),u=t.buildDuplicateFoundError(e,s),l=qe(c),f={message:u,type:ge.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:l,occurrence:c.idx},p=kh(c);return p&&(f.parameter=p),f})}function GN(e){return`${qe(e)}_#_${e.idx}_#_${kh(e)}`}function kh(e){return e instanceof M?e.terminalType.name:e instanceof B?e.nonTerminalName:""}var fc=class extends Fe{constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}};function HN(e,t,r,n){let o=[];if(te(t,(a,s)=>s.name===e.name?a+1:a,0)>1){let a=n.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});o.push({message:a,type:ge.DUPLICATE_RULE_NAME,ruleName:e.name})}return o}function wh(e,t,r){let n=[],o;return J(t,e)||(o=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,n.push({message:o,type:ge.INVALID_RULE_OVERRIDE,ruleName:e})),n}function dc(e,t,r,n=[]){let o=[],i=ua(t.definition);if(v(i))return[];{let a=e.name;J(i,e)&&o.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:n}),type:ge.LEFT_RECURSION,ruleName:a});let c=Or(i,n.concat([e])),u=Ue(c,l=>{let f=V(n);return f.push(l),dc(e,l,r,f)});return o.concat(u)}}function ua(e){let t=[];if(v(e))return t;let r=Te(e);if(r instanceof B)t.push(r.referencedRule);else if(r instanceof q||r instanceof F||r instanceof Y||r instanceof z||r instanceof G||r instanceof w)t=t.concat(ua(r.definition));else if(r instanceof H)t=ue(R(r.definition,i=>ua(i.definition)));else if(!(r instanceof M))throw Error("non exhaustive match");let n=jr(r),o=e.length>1;if(n&&o){let i=le(e);return t.concat(ua(i))}else return t}var Uo=class extends Fe{constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}};function _h(e,t){let r=new Uo;e.accept(r);let n=r.alternations;return Ue(n,i=>{let a=jt(i.definition);return Ue(a,(s,c)=>{let u=ia([s],[],Ht,1);return v(u)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:i,emptyChoiceIdx:c}),type:ge.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:i.idx,alternative:c+1}]:[]})})}function Bh(e,t,r){let n=new Uo;e.accept(n);let o=n.alternations;return o=Lr(o,a=>a.ignoreAmbiguities===!0),Ue(o,a=>{let s=a.idx,c=a.maxLookahead||t,u=Fn(s,e,c,a),l=WN(u,a,e,r),f=VN(u,a,e,r);return l.concat(f)})}var pc=class extends Fe{constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}};function KN(e,t){let r=new Uo;e.accept(r);let n=r.alternations;return Ue(n,i=>i.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:i}),type:ge.TOO_MANY_ALTS,ruleName:e.name,occurrence:i.idx}]:[])}function Fh(e,t,r){let n=[];return L(e,o=>{let i=new pc;o.accept(i);let a=i.allProductions;L(a,s=>{let c=Ao(s),u=s.maxLookahead||t,l=s.idx,p=Dn(l,o,c,u)[0];if(v(ue(p))){let h=r.buildEmptyRepetitionError({topLevelRule:o,repetition:s});n.push({message:h,type:ge.NO_NON_EMPTY_LOOKAHEAD,ruleName:o.name})}})}),n}function WN(e,t,r,n){let o=[],i=te(e,(s,c,u)=>(t.definition[u].ignoreAmbiguities===!0||L(c,l=>{let f=[u];L(e,(p,h)=>{u!==h&&ca(p,l)&&t.definition[h].ignoreAmbiguities!==!0&&f.push(h)}),f.length>1&&!ca(o,l)&&(o.push(l),s.push({alts:f,path:l}))}),s),[]);return R(i,s=>{let c=R(s.alts,l=>l+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:c,prefixPath:s.path}),type:ge.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:s.alts}})}function VN(e,t,r,n){let o=te(e,(a,s,c)=>{let u=R(s,l=>({idx:c,path:l}));return a.concat(u)},[]);return Rt(Ue(o,a=>{if(t.definition[a.idx].ignoreAmbiguities===!0)return[];let c=a.idx,u=a.path,l=Se(o,p=>t.definition[p.idx].ignoreAmbiguities!==!0&&p.idx<c&&Ih(p.path,u));return R(l,p=>{let h=[p.idx+1,c+1],E=t.idx===0?"":t.idx;return{message:n.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:h,prefixPath:p.path}),type:ge.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:E,alternatives:h}})}))}function qN(e,t,r){let n=[],o=R(t,i=>i.name);return L(e,i=>{let a=i.name;if(J(o,a)){let s=r.buildNamespaceConflictError(i);n.push({message:s,type:ge.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:a})}}),n}function Dh(e){let t=Cn(e,{errMsgProvider:xh}),r={};return L(e.rules,n=>{r[n.name]=n}),Oh(r,t.errMsgProvider)}function jh(e){return e=Cn(e,{errMsgProvider:ut}),Mh(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var Gh="MismatchedTokenException",Hh="NoViableAltException",Kh="EarlyExitException",Wh="NotAllInputParsedException",Vh=[Gh,Hh,Kh,Wh];Object.freeze(Vh);function At(e){return J(Vh,e.name)}var jn=class extends Error{constructor(t,r){super(t),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},qr=class extends jn{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=Gh}},No=class extends jn{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=Hh}},Co=class extends jn{constructor(t,r){super(t,r),this.name=Wh}},bo=class extends jn{constructor(t,r,n){super(t,r),this.previousToken=n,this.name=Kh}};var hc={},gc="InRuleRecoveryException",mc=class extends Error{constructor(t){super(t),this.name=gc}},la=class{initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=U(t,"recoveryEnabled")?t.recoveryEnabled:De.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=YN)}getTokenToInsert(t){let r=Vr(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,r,n,o){let i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],c=!1,u=this.LA(1),l=this.LA(1),f=()=>{let p=this.LA(0),h=this.errorMessageProvider.buildMismatchTokenMessage({expected:o,actual:u,previous:p,ruleName:this.getCurrRuleFullName()}),E=new qr(h,u,this.LA(0));E.resyncedTokens=jt(s),this.SAVE_ERROR(E)};for(;!c;)if(this.tokenMatcher(l,o)){f();return}else if(n.call(this)){f(),t.apply(this,r);return}else this.tokenMatcher(l,i)?c=!0:(l=this.SKIP_TOKEN(),this.addToResyncTokens(l,s));this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,r,n){return!(n===!1||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,r)))}getFollowsForInRuleRecovery(t,r){let n=this.getCurrentGrammarPath(t,r);return this.getNextPossibleTokenTypes(n)}tryInRuleRecovery(t,r){if(this.canRecoverWithSingleTokenInsertion(t,r))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){let n=this.SKIP_TOKEN();return this.consumeToken(),n}throw new mc("sad sad panda")}canPerformInRuleRecovery(t,r){return this.canRecoverWithSingleTokenInsertion(t,r)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,r){if(!this.canTokenTypeBeInsertedInRecovery(t)||v(r))return!1;let n=this.LA(1);return Ot(r,i=>this.tokenMatcher(n,i))!==void 0}canRecoverWithSingleTokenDeletion(t){return this.canTokenTypeBeDeletedInRecovery(t)?this.tokenMatcher(this.LA(2),t):!1}isInCurrentRuleReSyncSet(t){let r=this.getCurrFollowKey(),n=this.getFollowSetFromFollowKey(r);return J(n,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),r=this.LA(1),n=2;for(;;){let o=Ot(t,i=>P(r,i));if(o!==void 0)return o;r=this.LA(n),n++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return hc;let t=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),n=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(n)}}buildFullFollowKeyStack(){let t=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return R(t,(n,o)=>o===0?hc:{ruleName:this.shortRuleNameToFullName(n),idxInCallingRule:r[o],inRule:this.shortRuleNameToFullName(t[o-1])})}flattenFollowSet(){let t=R(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return ue(t)}getFollowSetFromFollowKey(t){if(t===hc)return[Je];let r=t.ruleName+t.idxInCallingRule+qi+t.inRule;return this.resyncFollows[r]}addToResyncTokens(t,r){return this.tokenMatcher(t,Je)||r.push(t),r}reSyncTo(t){let r=[],n=this.LA(1);for(;this.tokenMatcher(n,t)===!1;)n=this.SKIP_TOKEN(),this.addToResyncTokens(n,r);return jt(r)}attemptInRepetitionRecovery(t,r,n,o,i,a,s){}getCurrentGrammarPath(t,r){let n=this.getHumanReadableRuleStack(),o=V(this.RULE_OCCURRENCE_STACK);return{ruleStack:n,occurrenceStack:o,lastTok:t,lastTokOccurrence:r}}getHumanReadableRuleStack(){return R(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}};function YN(e,t,r,n,o,i,a){let s=this.getKeyForAutomaticLookahead(n,o),c=this.firstAfterRepMap[s];if(c===void 0){let p=this.getCurrRuleFullName(),h=this.getGAstProductions()[p];c=new i(h,o).startWalking(),this.firstAfterRepMap[s]=c}let u=c.token,l=c.occurrence,f=c.isEndOfRule;this.RULE_STACK.length===1&&f&&u===void 0&&(u=Je,l=1),!(u===void 0||l===void 0)&&this.shouldInRepetitionRecoveryBeTried(u,l,a)&&this.tryInRepetitionRecovery(e,t,r,u)}function fa(e,t,r){return r|t|e}var Yr=class{constructor(t){var r;this.maxLookahead=(r=t?.maxLookahead)!==null&&r!==void 0?r:De.maxLookahead}validate(t){let r=this.validateNoLeftRecursion(t.rules);if(v(r)){let n=this.validateEmptyOrAlternatives(t.rules),o=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),i=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...r,...n,...o,...i]}return r}validateNoLeftRecursion(t){return Ue(t,r=>dc(r,r,ut))}validateEmptyOrAlternatives(t){return Ue(t,r=>_h(r,ut))}validateAmbiguousAlternationAlternatives(t,r){return Ue(t,n=>Bh(n,r,ut))}validateSomeNonEmptyLookaheadPath(t,r){return Fh(t,r,ut)}buildLookaheadForAlternation(t){return Ah(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,Nh)}buildLookaheadForOptional(t){return Uh(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,Ao(t.prodType),Ch)}};var da=class{initLooksAhead(t){this.dynamicTokensEnabled=U(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:De.dynamicTokensEnabled,this.maxLookahead=U(t,"maxLookahead")?t.maxLookahead:De.maxLookahead,this.lookaheadStrategy=U(t,"lookaheadStrategy")?t.lookaheadStrategy:new Yr({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){L(t,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:n,repetition:o,option:i,repetitionMandatory:a,repetitionMandatoryWithSeparator:s,repetitionWithSeparator:c}=zN(r);L(n,u=>{let l=u.idx===0?"":u.idx;this.TRACE_INIT(`${qe(u)}${l}`,()=>{let f=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:u.idx,rule:r,maxLookahead:u.maxLookahead||this.maxLookahead,hasPredicates:u.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),p=fa(this.fullRuleNameToShort[r.name],256,u.idx);this.setLaFuncCache(p,f)})}),L(o,u=>{this.computeLookaheadFunc(r,u.idx,768,"Repetition",u.maxLookahead,qe(u))}),L(i,u=>{this.computeLookaheadFunc(r,u.idx,512,"Option",u.maxLookahead,qe(u))}),L(a,u=>{this.computeLookaheadFunc(r,u.idx,1024,"RepetitionMandatory",u.maxLookahead,qe(u))}),L(s,u=>{this.computeLookaheadFunc(r,u.idx,1536,"RepetitionMandatoryWithSeparator",u.maxLookahead,qe(u))}),L(c,u=>{this.computeLookaheadFunc(r,u.idx,1280,"RepetitionWithSeparator",u.maxLookahead,qe(u))})})})}computeLookaheadFunc(t,r,n,o,i,a){this.TRACE_INIT(`${a}${r===0?"":r}`,()=>{let s=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:t,maxLookahead:i||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:o}),c=fa(this.fullRuleNameToShort[t.name],n,r);this.setLaFuncCache(c,s)})}getKeyForAutomaticLookahead(t,r){let n=this.getLastExplicitRuleShortName();return fa(n,t,r)}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,r){this.lookAheadFuncsCache.set(t,r)}},Ec=class extends Fe{constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},pa=new Ec;function zN(e){pa.reset(),e.accept(pa);let t=pa.dslMethods;return pa.reset(),t}function Tc(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}function Rc(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.startColumn=t.startColumn,e.startLine=t.startLine,e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset,e.endColumn=t.endColumn,e.endLine=t.endLine)}function qh(e,t,r){e.children[r]===void 0?e.children[r]=[t]:e.children[r].push(t)}function Yh(e,t,r){e.children[t]===void 0?e.children[t]=[r]:e.children[t].push(r)}var XN="name";function xc(e,t){Object.defineProperty(e,XN,{enumerable:!1,configurable:!0,writable:!1,value:t})}function JN(e,t){let r=K(e),n=r.length;for(let o=0;o<n;o++){let i=r[o],a=e[i],s=a.length;for(let c=0;c<s;c++){let u=a[c];u.tokenTypeIdx===void 0&&this[u.name](u.children,t)}}}function zh(e,t){let r=function(){};xc(r,e+"BaseSemantics");let n={visit:function(o,i){if(N(o)&&(o=o[0]),!Pe(o))return this[o.name](o.children,i)},validateVisitor:function(){let o=QN(this,t);if(!v(o)){let i=R(o,a=>a.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
124
124
  ${i.join(`
125
125
 
126
126
  `).replace(/\n/g,`
127
- `)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function Xh(e,t,r){let n=function(){};xc(n,e+"BaseSemanticsWithDefaults");let o=Object.create(r.prototype);return L(t,i=>{o[i]=JN}),n.prototype=o,n.prototype.constructor=n,n}var Oc;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(Oc||(Oc={}));function QN(e,t){return ZN(e,t)}function ZN(e,t){let r=Se(t,o=>_e(e[o])===!1),n=R(r,o=>({msg:`Missing visitor method: <${o}> on ${e.constructor.name} CST Visitor.`,type:Oc.MISSING_METHOD,methodName:o}));return Rt(n)}var ya=class{initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=U(t,"nodeLocationTracking")?t.nodeLocationTracking:De.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=ee,this.cstFinallyStateUpdate=ee,this.cstPostTerminal=ee,this.cstPostNonTerminal=ee,this.cstPostRule=ee;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Rc,this.setNodeLocationFromNode=Rc,this.cstPostRule=ee,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=ee,this.setNodeLocationFromNode=ee,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Tc,this.setNodeLocationFromNode=Tc,this.cstPostRule=ee,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=ee,this.setNodeLocationFromNode=ee,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=ee,this.setNodeLocationFromNode=ee,this.cstPostRule=ee,this.setInitialNodeLocation=ee;else throw Error(`Invalid <nodeLocationTracking> config option: "${t.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){let r=this.LA(1);t.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){let r={name:t,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){let r=this.LA(0),n=t.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(t){let r=this.LA(0),n=t.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];qh(n,r,t),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];Yh(n,r,t),this.setNodeLocationFromNode(n.location,t.location)}getBaseCstVisitorConstructor(){if(Pe(this.baseCstVisitorConstructor)){let t=zh(this.className,K(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Pe(this.baseCstVisitorWithDefaultsConstructor)){let t=Xh(this.className,K(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){let t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){let t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}};var Sa=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Gn}LA(t){let r=this.currIdx+t;return r<0||this.tokVectorLength<=r?Gn:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}};var Ta=class{ACTION(t){return t.call(this)}consume(t,r,n){return this.consumeInternal(r,t,n)}subrule(t,r,n){return this.subruleInternal(r,t,n)}option(t,r){return this.optionInternal(r,t)}or(t,r){return this.orInternal(r,t)}many(t,r){return this.manyInternal(t,r)}atLeastOne(t,r){return this.atLeastOneInternal(t,r)}CONSUME(t,r){return this.consumeInternal(t,0,r)}CONSUME1(t,r){return this.consumeInternal(t,1,r)}CONSUME2(t,r){return this.consumeInternal(t,2,r)}CONSUME3(t,r){return this.consumeInternal(t,3,r)}CONSUME4(t,r){return this.consumeInternal(t,4,r)}CONSUME5(t,r){return this.consumeInternal(t,5,r)}CONSUME6(t,r){return this.consumeInternal(t,6,r)}CONSUME7(t,r){return this.consumeInternal(t,7,r)}CONSUME8(t,r){return this.consumeInternal(t,8,r)}CONSUME9(t,r){return this.consumeInternal(t,9,r)}SUBRULE(t,r){return this.subruleInternal(t,0,r)}SUBRULE1(t,r){return this.subruleInternal(t,1,r)}SUBRULE2(t,r){return this.subruleInternal(t,2,r)}SUBRULE3(t,r){return this.subruleInternal(t,3,r)}SUBRULE4(t,r){return this.subruleInternal(t,4,r)}SUBRULE5(t,r){return this.subruleInternal(t,5,r)}SUBRULE6(t,r){return this.subruleInternal(t,6,r)}SUBRULE7(t,r){return this.subruleInternal(t,7,r)}SUBRULE8(t,r){return this.subruleInternal(t,8,r)}SUBRULE9(t,r){return this.subruleInternal(t,9,r)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,r,n=Hn){if(J(this.definedRulesNames,t)){let a={message:ut.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:ge.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(a)}this.definedRulesNames.push(t);let o=this.defineRule(t,r,n);return this[t]=o,o}OVERRIDE_RULE(t,r,n=Hn){let o=wh(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(o);let i=this.defineRule(t,r,n);return this[t]=i,i}BACKTRACK(t,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return t.apply(this,r),!0}catch(o){if(At(o))return!1;throw o}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return qi(j(this.gastProductionsCache))}};var Ra=class{initRecognizerEngine(t,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=_n,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},U(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
127
+ `)}`)}}};return r.prototype=n,r.prototype.constructor=r,r._RULE_NAMES=t,r}function Xh(e,t,r){let n=function(){};xc(n,e+"BaseSemanticsWithDefaults");let o=Object.create(r.prototype);return L(t,i=>{o[i]=JN}),n.prototype=o,n.prototype.constructor=n,n}var Oc;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(Oc||(Oc={}));function QN(e,t){return ZN(e,t)}function ZN(e,t){let r=Se(t,o=>_e(e[o])===!1),n=R(r,o=>({msg:`Missing visitor method: <${o}> on ${e.constructor.name} CST Visitor.`,type:Oc.MISSING_METHOD,methodName:o}));return Rt(n)}var Ea=class{initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=U(t,"nodeLocationTracking")?t.nodeLocationTracking:De.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=ee,this.cstFinallyStateUpdate=ee,this.cstPostTerminal=ee,this.cstPostNonTerminal=ee,this.cstPostRule=ee;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Rc,this.setNodeLocationFromNode=Rc,this.cstPostRule=ee,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=ee,this.setNodeLocationFromNode=ee,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Tc,this.setNodeLocationFromNode=Tc,this.cstPostRule=ee,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=ee,this.setNodeLocationFromNode=ee,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=ee,this.setNodeLocationFromNode=ee,this.cstPostRule=ee,this.setInitialNodeLocation=ee;else throw Error(`Invalid <nodeLocationTracking> config option: "${t.nodeLocationTracking}"`)}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){let r=this.LA(1);t.location={startOffset:r.startOffset,startLine:r.startLine,startColumn:r.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){let r={name:t,children:Object.create(null)};this.setInitialNodeLocation(r),this.CST_STACK.push(r)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){let r=this.LA(0),n=t.location;n.startOffset<=r.startOffset?(n.endOffset=r.endOffset,n.endLine=r.endLine,n.endColumn=r.endColumn):(n.startOffset=NaN,n.startLine=NaN,n.startColumn=NaN)}cstPostRuleOnlyOffset(t){let r=this.LA(0),n=t.location;n.startOffset<=r.startOffset?n.endOffset=r.endOffset:n.startOffset=NaN}cstPostTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];qh(n,r,t),this.setNodeLocationFromToken(n.location,r)}cstPostNonTerminal(t,r){let n=this.CST_STACK[this.CST_STACK.length-1];Yh(n,r,t),this.setNodeLocationFromNode(n.location,t.location)}getBaseCstVisitorConstructor(){if(Pe(this.baseCstVisitorConstructor)){let t=zh(this.className,K(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(Pe(this.baseCstVisitorWithDefaultsConstructor)){let t=Xh(this.className,K(this.gastProductionsCache),this.getBaseCstVisitorConstructor());return this.baseCstVisitorWithDefaultsConstructor=t,t}return this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){let t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){let t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){let t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}};var ya=class{initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(this.selfAnalysisDone!==!0)throw Error("Missing <performSelfAnalysis> invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Gn}LA(t){let r=this.currIdx+t;return r<0||this.tokVectorLength<=r?Gn:this.tokVector[r]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}};var Sa=class{ACTION(t){return t.call(this)}consume(t,r,n){return this.consumeInternal(r,t,n)}subrule(t,r,n){return this.subruleInternal(r,t,n)}option(t,r){return this.optionInternal(r,t)}or(t,r){return this.orInternal(r,t)}many(t,r){return this.manyInternal(t,r)}atLeastOne(t,r){return this.atLeastOneInternal(t,r)}CONSUME(t,r){return this.consumeInternal(t,0,r)}CONSUME1(t,r){return this.consumeInternal(t,1,r)}CONSUME2(t,r){return this.consumeInternal(t,2,r)}CONSUME3(t,r){return this.consumeInternal(t,3,r)}CONSUME4(t,r){return this.consumeInternal(t,4,r)}CONSUME5(t,r){return this.consumeInternal(t,5,r)}CONSUME6(t,r){return this.consumeInternal(t,6,r)}CONSUME7(t,r){return this.consumeInternal(t,7,r)}CONSUME8(t,r){return this.consumeInternal(t,8,r)}CONSUME9(t,r){return this.consumeInternal(t,9,r)}SUBRULE(t,r){return this.subruleInternal(t,0,r)}SUBRULE1(t,r){return this.subruleInternal(t,1,r)}SUBRULE2(t,r){return this.subruleInternal(t,2,r)}SUBRULE3(t,r){return this.subruleInternal(t,3,r)}SUBRULE4(t,r){return this.subruleInternal(t,4,r)}SUBRULE5(t,r){return this.subruleInternal(t,5,r)}SUBRULE6(t,r){return this.subruleInternal(t,6,r)}SUBRULE7(t,r){return this.subruleInternal(t,7,r)}SUBRULE8(t,r){return this.subruleInternal(t,8,r)}SUBRULE9(t,r){return this.subruleInternal(t,9,r)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,r,n=Hn){if(J(this.definedRulesNames,t)){let a={message:ut.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:ge.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(a)}this.definedRulesNames.push(t);let o=this.defineRule(t,r,n);return this[t]=o,o}OVERRIDE_RULE(t,r,n=Hn){let o=wh(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(o);let i=this.defineRule(t,r,n);return this[t]=i,i}BACKTRACK(t,r){return function(){this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{return t.apply(this,r),!0}catch(o){if(At(o))return!1;throw o}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Vi(j(this.gastProductionsCache))}};var Ta=class{initRecognizerEngine(t,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=_n,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},U(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
128
128
  See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
129
129
  For Further details.`);if(N(t)){if(v(t))throw Error(`A Token Vocabulary cannot be empty.
130
130
  Note that the first argument for the parser constructor
131
131
  is no longer a Token vector (since v4.0).`);if(typeof t[0].startOffset=="number")throw Error(`The Parser constructor no longer accepts a token vector as the first argument.
132
132
  See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
133
133
  For Further details.`)}if(N(t))this.tokensMap=te(t,(i,a)=>(i[a.name]=a,i),{});else if(U(t,"modes")&&Ie(ue(j(t.modes)),dh)){let i=ue(j(t.modes)),a=bn(i);this.tokensMap=te(a,(s,c)=>(s[c.name]=c,s),{})}else if($(t))this.tokensMap=V(t);else throw new Error("<tokensDictionary> argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap.EOF=Je;let n=U(t,"modes")?ue(j(t.modes)):j(t),o=Ie(n,i=>v(i.categoryMatches));this.tokenMatcher=o?_n:Ht,Kt(j(this.tokensMap))}defineRule(t,r,n){if(this.selfAnalysisDone)throw Error(`Grammar rule <${t}> may not be defined after the 'performSelfAnalysis' method has been called'
134
- Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let o=U(n,"resyncEnabled")?n.resyncEnabled:Hn.resyncEnabled,i=U(n,"recoveryValueFunc")?n.recoveryValueFunc:Hn.recoveryValueFunc,a=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=t,this.fullRuleNameToShort[t]=a;let s;return this.outputCst===!0?s=function(...l){try{this.ruleInvocationStateUpdate(a,t,this.subruleIdx),r.apply(this,l);let f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,o,i)}finally{this.ruleFinallyStateUpdate()}}:s=function(...l){try{return this.ruleInvocationStateUpdate(a,t,this.subruleIdx),r.apply(this,l)}catch(f){return this.invokeRuleCatch(f,o,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(s,{ruleName:t,originalGrammarAction:r})}invokeRuleCatch(t,r,n){let o=this.RULE_STACK.length===1,i=r&&!this.isBackTracking()&&this.recoveryEnabled;if(At(t)){let a=t;if(i){let s=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(s))if(a.resyncedTokens=this.reSyncTo(s),this.outputCst){let c=this.CST_STACK[this.CST_STACK.length-1];return c.recoveredNode=!0,c}else return n(t);else{if(this.outputCst){let c=this.CST_STACK[this.CST_STACK.length-1];c.recoveredNode=!0,a.partialCstResult=c}throw a}}else{if(o)return this.moveToTerminatedState(),n(t);throw a}}else throw t}optionInternal(t,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(t,r,n)}optionInternalLogic(t,r,n){let o=this.getLaFuncFromCache(n),i;if(typeof t!="function"){i=t.DEF;let a=t.GATE;if(a!==void 0){let s=o;o=()=>a.call(this)&&s.call(this)}}else i=t;if(o.call(this)===!0)return i.call(this)}atLeastOneInternal(t,r){let n=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,r,n)}atLeastOneInternalLogic(t,r,n){let o=this.getLaFuncFromCache(n),i;if(typeof r!="function"){i=r.DEF;let a=r.GATE;if(a!==void 0){let s=o;o=()=>a.call(this)&&s.call(this)}}else i=r;if(o.call(this)===!0){let a=this.doSingleRepetition(i);for(;o.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(t,Z.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],o,1024,t,oa)}atLeastOneSepFirstInternal(t,r){let n=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,r,n)}atLeastOneSepFirstInternalLogic(t,r,n){let o=r.DEF,i=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){o.call(this);let s=()=>this.tokenMatcher(this.LA(1),i);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),o.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,s,o,Ao],s,1536,t,Ao)}else throw this.raiseEarlyExitException(t,Z.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(t,r){let n=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,r,n)}manyInternalLogic(t,r,n){let o=this.getLaFuncFromCache(n),i;if(typeof r!="function"){i=r.DEF;let s=r.GATE;if(s!==void 0){let c=o;o=()=>s.call(this)&&c.call(this)}}else i=r;let a=!0;for(;o.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],o,768,t,na,a)}manySepFirstInternal(t,r){let n=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,r,n)}manySepFirstInternalLogic(t,r,n){let o=r.DEF,i=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){o.call(this);let s=()=>this.tokenMatcher(this.LA(1),i);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),o.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,s,o,Lo],s,1280,t,Lo)}}repetitionSepSecondInternal(t,r,n,o,i){for(;n();)this.CONSUME(r),o.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,r,n,o,i],n,1536,t,i)}doSingleRepetition(t){let r=this.getLexerPosition();return t.call(this),this.getLexerPosition()>r}orInternal(t,r){let n=this.getKeyForAutomaticLookahead(256,r),o=N(t)?t:t.DEF,a=this.getLaFuncFromCache(n).call(this,o);if(a!==void 0)return o[a].ALT.call(this);this.raiseNoAltException(r,t.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let t=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new bo(r,t))}}subruleInternal(t,r,n){let o;try{let i=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,o=t.apply(this,i),this.cstPostNonTerminal(o,n!==void 0&&n.LABEL!==void 0?n.LABEL:t.ruleName),o}catch(i){throw this.subruleInternalError(i,n,t.ruleName)}}subruleInternalError(t,r,n){throw At(t)&&t.partialCstResult!==void 0&&(this.cstPostNonTerminal(t.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete t.partialCstResult),t}consumeInternal(t,r,n){let o;try{let i=this.LA(1);this.tokenMatcher(i,t)===!0?(this.consumeToken(),o=i):this.consumeInternalError(t,i,n)}catch(i){o=this.consumeInternalRecovery(t,r,i)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:t.name,o),o}consumeInternalError(t,r,n){let o,i=this.LA(0);throw n!==void 0&&n.ERR_MSG?o=n.ERR_MSG:o=this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:r,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new qr(o,r,i))}consumeInternalRecovery(t,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let o=this.getFollowsForInRuleRecovery(t,r);try{return this.tryInRuleRecovery(t,o)}catch(i){throw i.name===gc?n:i}}else throw n}saveRecogState(){let t=this.errors,r=V(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Je)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}};var xa=class{initErrorHandler(t){this._errors=[],this.errorMessageProvider=U(t,"errorMessageProvider")?t.errorMessageProvider:De.errorMessageProvider}SAVE_ERROR(t){if(At(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:V(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return V(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,r,n){let o=this.getCurrRuleFullName(),i=this.getGAstProductions()[o],s=Dn(t,i,r,this.maxLookahead)[0],c=[];for(let l=1;l<=this.maxLookahead;l++)c.push(this.LA(l));let u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:s,actual:c,previous:this.LA(0),customUserDescription:n,ruleName:o});throw this.SAVE_ERROR(new Io(u,this.LA(1),this.LA(0)))}raiseNoAltException(t,r){let n=this.getCurrRuleFullName(),o=this.getGAstProductions()[n],i=Fn(t,o,this.maxLookahead),a=[];for(let u=1;u<=this.maxLookahead;u++)a.push(this.LA(u));let s=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:a,previous:s,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Co(c,this.LA(1),s))}};var Oa=class{initContentAssist(){}computeContentAssist(t,r){let n=this.gastProductionsCache[t];if(Pe(n))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return aa([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){let r=Te(t.ruleStack),o=this.getGAstProductions()[r];return new ra(o,t).startWalking()}};var Ua={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Ua);var Jh=!0,Qh=Math.pow(2,8)-1,$h=Wr({name:"RECORDING_PHASE_TOKEN",pattern:D.NA});Kt([$h]);var em=Vr($h,`This IToken indicates the Parser is in Recording Phase
134
+ Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let o=U(n,"resyncEnabled")?n.resyncEnabled:Hn.resyncEnabled,i=U(n,"recoveryValueFunc")?n.recoveryValueFunc:Hn.recoveryValueFunc,a=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[a]=t,this.fullRuleNameToShort[t]=a;let s;return this.outputCst===!0?s=function(...l){try{this.ruleInvocationStateUpdate(a,t,this.subruleIdx),r.apply(this,l);let f=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(f),f}catch(f){return this.invokeRuleCatch(f,o,i)}finally{this.ruleFinallyStateUpdate()}}:s=function(...l){try{return this.ruleInvocationStateUpdate(a,t,this.subruleIdx),r.apply(this,l)}catch(f){return this.invokeRuleCatch(f,o,i)}finally{this.ruleFinallyStateUpdate()}},Object.assign(s,{ruleName:t,originalGrammarAction:r})}invokeRuleCatch(t,r,n){let o=this.RULE_STACK.length===1,i=r&&!this.isBackTracking()&&this.recoveryEnabled;if(At(t)){let a=t;if(i){let s=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(s))if(a.resyncedTokens=this.reSyncTo(s),this.outputCst){let c=this.CST_STACK[this.CST_STACK.length-1];return c.recoveredNode=!0,c}else return n(t);else{if(this.outputCst){let c=this.CST_STACK[this.CST_STACK.length-1];c.recoveredNode=!0,a.partialCstResult=c}throw a}}else{if(o)return this.moveToTerminatedState(),n(t);throw a}}else throw t}optionInternal(t,r){let n=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(t,r,n)}optionInternalLogic(t,r,n){let o=this.getLaFuncFromCache(n),i;if(typeof t!="function"){i=t.DEF;let a=t.GATE;if(a!==void 0){let s=o;o=()=>a.call(this)&&s.call(this)}}else i=t;if(o.call(this)===!0)return i.call(this)}atLeastOneInternal(t,r){let n=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,r,n)}atLeastOneInternalLogic(t,r,n){let o=this.getLaFuncFromCache(n),i;if(typeof r!="function"){i=r.DEF;let a=r.GATE;if(a!==void 0){let s=o;o=()=>a.call(this)&&s.call(this)}}else i=r;if(o.call(this)===!0){let a=this.doSingleRepetition(i);for(;o.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i)}else throw this.raiseEarlyExitException(t,Z.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],o,1024,t,na)}atLeastOneSepFirstInternal(t,r){let n=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,r,n)}atLeastOneSepFirstInternalLogic(t,r,n){let o=r.DEF,i=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){o.call(this);let s=()=>this.tokenMatcher(this.LA(1),i);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),o.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,s,o,Lo],s,1536,t,Lo)}else throw this.raiseEarlyExitException(t,Z.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(t,r){let n=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,r,n)}manyInternalLogic(t,r,n){let o=this.getLaFuncFromCache(n),i;if(typeof r!="function"){i=r.DEF;let s=r.GATE;if(s!==void 0){let c=o;o=()=>s.call(this)&&c.call(this)}}else i=r;let a=!0;for(;o.call(this)===!0&&a===!0;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],o,768,t,ra,a)}manySepFirstInternal(t,r){let n=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,r,n)}manySepFirstInternalLogic(t,r,n){let o=r.DEF,i=r.SEP;if(this.getLaFuncFromCache(n).call(this)===!0){o.call(this);let s=()=>this.tokenMatcher(this.LA(1),i);for(;this.tokenMatcher(this.LA(1),i)===!0;)this.CONSUME(i),o.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,s,o,Oo],s,1280,t,Oo)}}repetitionSepSecondInternal(t,r,n,o,i){for(;n();)this.CONSUME(r),o.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,r,n,o,i],n,1536,t,i)}doSingleRepetition(t){let r=this.getLexerPosition();return t.call(this),this.getLexerPosition()>r}orInternal(t,r){let n=this.getKeyForAutomaticLookahead(256,r),o=N(t)?t:t.DEF,a=this.getLaFuncFromCache(n).call(this,o);if(a!==void 0)return o[a].ALT.call(this);this.raiseNoAltException(r,t.ERR_MSG)}ruleFinallyStateUpdate(){if(this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),this.RULE_STACK.length===0&&this.isAtEndOfInput()===!1){let t=this.LA(1),r=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()});this.SAVE_ERROR(new Co(r,t))}}subruleInternal(t,r,n){let o;try{let i=n!==void 0?n.ARGS:void 0;return this.subruleIdx=r,o=t.apply(this,i),this.cstPostNonTerminal(o,n!==void 0&&n.LABEL!==void 0?n.LABEL:t.ruleName),o}catch(i){throw this.subruleInternalError(i,n,t.ruleName)}}subruleInternalError(t,r,n){throw At(t)&&t.partialCstResult!==void 0&&(this.cstPostNonTerminal(t.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:n),delete t.partialCstResult),t}consumeInternal(t,r,n){let o;try{let i=this.LA(1);this.tokenMatcher(i,t)===!0?(this.consumeToken(),o=i):this.consumeInternalError(t,i,n)}catch(i){o=this.consumeInternalRecovery(t,r,i)}return this.cstPostTerminal(n!==void 0&&n.LABEL!==void 0?n.LABEL:t.name,o),o}consumeInternalError(t,r,n){let o,i=this.LA(0);throw n!==void 0&&n.ERR_MSG?o=n.ERR_MSG:o=this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:r,previous:i,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new qr(o,r,i))}consumeInternalRecovery(t,r,n){if(this.recoveryEnabled&&n.name==="MismatchedTokenException"&&!this.isBackTracking()){let o=this.getFollowsForInRuleRecovery(t,r);try{return this.tryInRuleRecovery(t,o)}catch(i){throw i.name===gc?n:i}}else throw n}saveRecogState(){let t=this.errors,r=V(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:r,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,r,n){this.RULE_OCCURRENCE_STACK.push(n),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(r)}isBackTracking(){return this.isBackTrackingStack.length!==0}getCurrRuleFullName(){let t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),Je)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}};var Ra=class{initErrorHandler(t){this._errors=[],this.errorMessageProvider=U(t,"errorMessageProvider")?t.errorMessageProvider:De.errorMessageProvider}SAVE_ERROR(t){if(At(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:V(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return V(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,r,n){let o=this.getCurrRuleFullName(),i=this.getGAstProductions()[o],s=Dn(t,i,r,this.maxLookahead)[0],c=[];for(let l=1;l<=this.maxLookahead;l++)c.push(this.LA(l));let u=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:s,actual:c,previous:this.LA(0),customUserDescription:n,ruleName:o});throw this.SAVE_ERROR(new bo(u,this.LA(1),this.LA(0)))}raiseNoAltException(t,r){let n=this.getCurrRuleFullName(),o=this.getGAstProductions()[n],i=Fn(t,o,this.maxLookahead),a=[];for(let u=1;u<=this.maxLookahead;u++)a.push(this.LA(u));let s=this.LA(0),c=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:i,actual:a,previous:s,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new No(c,this.LA(1),s))}};var xa=class{initContentAssist(){}computeContentAssist(t,r){let n=this.gastProductionsCache[t];if(Pe(n))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return ia([n],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){let r=Te(t.ruleStack),o=this.getGAstProductions()[r];return new ta(o,t).startWalking()}};var Aa={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Aa);var Jh=!0,Qh=Math.pow(2,8)-1,$h=Wr({name:"RECORDING_PHASE_TOKEN",pattern:D.NA});Kt([$h]);var em=Vr($h,`This IToken indicates the Parser is in Recording Phase
135
135
  See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(em);var eC={name:`This CSTNode indicates the Parser is in Recording Phase
136
- See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},La=class{initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let t=0;t<10;t++){let r=t>0?t:"";this[`CONSUME${r}`]=function(n,o){return this.consumeInternalRecord(n,t,o)},this[`SUBRULE${r}`]=function(n,o){return this.subruleInternalRecord(n,t,o)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,t)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,t)},this[`MANY${r}`]=function(n){this.manyInternalRecord(t,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(t,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(t,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(t,n)}}this.consume=function(t,r,n){return this.consumeInternalRecord(r,t,n)},this.subrule=function(t,r,n){return this.subruleInternalRecord(r,t,n)},this.option=function(t,r){return this.optionInternalRecord(r,t)},this.or=function(t,r){return this.orInternalRecord(r,t)},this.many=function(t,r){this.manyInternalRecord(t,r)},this.atLeastOne=function(t,r){this.atLeastOneInternalRecord(t,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let t=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete t[`CONSUME${n}`],delete t[`SUBRULE${n}`],delete t[`OPTION${n}`],delete t[`OR${n}`],delete t[`MANY${n}`],delete t[`MANY_SEP${n}`],delete t[`AT_LEAST_ONE${n}`],delete t[`AT_LEAST_ONE_SEP${n}`]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA})}ACTION_RECORD(t){}BACKTRACK_RECORD(t,r){return()=>!0}LA_RECORD(t){return Gn}topLevelRuleRecord(t,r){try{let n=new Be({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+`
136
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},Oa=class{initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let t=0;t<10;t++){let r=t>0?t:"";this[`CONSUME${r}`]=function(n,o){return this.consumeInternalRecord(n,t,o)},this[`SUBRULE${r}`]=function(n,o){return this.subruleInternalRecord(n,t,o)},this[`OPTION${r}`]=function(n){return this.optionInternalRecord(n,t)},this[`OR${r}`]=function(n){return this.orInternalRecord(n,t)},this[`MANY${r}`]=function(n){this.manyInternalRecord(t,n)},this[`MANY_SEP${r}`]=function(n){this.manySepFirstInternalRecord(t,n)},this[`AT_LEAST_ONE${r}`]=function(n){this.atLeastOneInternalRecord(t,n)},this[`AT_LEAST_ONE_SEP${r}`]=function(n){this.atLeastOneSepFirstInternalRecord(t,n)}}this.consume=function(t,r,n){return this.consumeInternalRecord(r,t,n)},this.subrule=function(t,r,n){return this.subruleInternalRecord(r,t,n)},this.option=function(t,r){return this.optionInternalRecord(r,t)},this.or=function(t,r){return this.orInternalRecord(r,t)},this.many=function(t,r){this.manyInternalRecord(t,r)},this.atLeastOne=function(t,r){this.atLeastOneInternalRecord(t,r)},this.ACTION=this.ACTION_RECORD,this.BACKTRACK=this.BACKTRACK_RECORD,this.LA=this.LA_RECORD})}disableRecording(){this.RECORDING_PHASE=!1,this.TRACE_INIT("Deleting Recording methods",()=>{let t=this;for(let r=0;r<10;r++){let n=r>0?r:"";delete t[`CONSUME${n}`],delete t[`SUBRULE${n}`],delete t[`OPTION${n}`],delete t[`OR${n}`],delete t[`MANY${n}`],delete t[`MANY_SEP${n}`],delete t[`AT_LEAST_ONE${n}`],delete t[`AT_LEAST_ONE_SEP${n}`]}delete t.consume,delete t.subrule,delete t.option,delete t.or,delete t.many,delete t.atLeastOne,delete t.ACTION,delete t.BACKTRACK,delete t.LA})}ACTION_RECORD(t){}BACKTRACK_RECORD(t,r){return()=>!0}LA_RECORD(t){return Gn}topLevelRuleRecord(t,r){try{let n=new Be({definition:[],name:t});return n.name=t,this.recordingProdStack.push(n),r.call(this),this.recordingProdStack.pop(),n}catch(n){if(n.KNOWN_RECORDER_ERROR!==!0)try{n.message=n.message+`
137
137
  This error was thrown during the "grammar recording phase" For more info see:
138
- https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(t,r){return vo.call(this,F,t,r)}atLeastOneInternalRecord(t,r){vo.call(this,Y,r,t)}atLeastOneSepFirstInternalRecord(t,r){vo.call(this,z,r,t,Jh)}manyInternalRecord(t,r){vo.call(this,w,r,t)}manySepFirstInternalRecord(t,r){vo.call(this,G,r,t,Jh)}orInternalRecord(t,r){return tC.call(this,t,r)}subruleInternalRecord(t,r,n){if(Aa(r),!t||U(t,"ruleName")===!1){let s=new Error(`<SUBRULE${Zh(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>
139
- inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let o=xt(this.recordingProdStack),i=t.ruleName,a=new B({idx:r,nonTerminalName:i,label:n?.LABEL,referencedRule:void 0});return o.definition.push(a),this.outputCst?eC:Ua}consumeInternalRecord(t,r,n){if(Aa(r),!oc(t)){let a=new Error(`<CONSUME${Zh(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>
140
- inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let o=xt(this.recordingProdStack),i=new M({idx:r,terminalType:t,label:n?.LABEL});return o.definition.push(i),em}};function vo(e,t,r,n=!1){Aa(r);let o=xt(this.recordingProdStack),i=_e(t)?t:t.DEF,a=new e({definition:[],idx:r});return n&&(a.separator=t.SEP),U(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),i.call(this),o.definition.push(a),this.recordingProdStack.pop(),Ua}function tC(e,t){Aa(t);let r=xt(this.recordingProdStack),n=N(e)===!1,o=n===!1?e:e.DEF,i=new H({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});U(e,"MAX_LOOKAHEAD")&&(i.maxLookahead=e.MAX_LOOKAHEAD);let a=ho(o,s=>_e(s.GATE));return i.hasPredicates=a,r.definition.push(i),L(o,s=>{let c=new q({definition:[]});i.definition.push(c),U(s,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=s.IGNORE_AMBIGUITIES:U(s,"GATE")&&(c.ignoreAmbiguities=!0),this.recordingProdStack.push(c),s.ALT.call(this),this.recordingProdStack.pop()}),Ua}function Zh(e){return e===0?"":`${e}`}function Aa(e){if(e<0||e>Qh){let t=new Error(`Invalid DSL Method idx value: <${e}>
141
- Idx value must be a none negative value smaller than ${Qh+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}var Na=class{initPerformanceTracer(t){if(U(t,"traceInitPerf")){let r=t.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=De.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${t}>`);let{time:o,value:i}=go(r),a=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${t}> time: ${o}ms`),this.traceInitIndent--,i}else return r()}};function tm(e,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(o=>{if(o==="constructor")return;let i=Object.getOwnPropertyDescriptor(n,o);i&&(i.get||i.set)?Object.defineProperty(e.prototype,o,i):e.prototype[o]=r.prototype[o]})})}var Gn=Vr(Je,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Gn);var De=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:ta,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Hn=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0}),ge;(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(ge||(ge={}));var Mo=class e{static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{Eo(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),L(this.definedRulesNames,o=>{let a=this[o].originalGrammarAction,s;this.TRACE_INIT(`${o} Rule`,()=>{s=this.topLevelRuleRecord(o,a)}),this.gastProductionsCache[o]=s})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=Dh({rules:j(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(v(n)&&this.skipValidations===!1){let o=jh({rules:j(this.gastProductionsCache),tokenTypes:j(this.tokensMap),errMsgProvider:ut,grammarName:r}),i=vh({lookaheadStrategy:this.lookaheadStrategy,rules:j(this.gastProductionsCache),tokenTypes:j(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(o,i)}}),v(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let o=Yd(j(this.gastProductionsCache));this.resyncFollows=o}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var o,i;(i=(o=this.lookaheadStrategy).initialize)===null||i===void 0||i.call(o,{rules:j(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(j(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!v(this.definitionErrors))throw t=R(this.definitionErrors,o=>o.message),new Error(`Parser Definition Errors detected:
138
+ https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw n}throw n}}optionInternalRecord(t,r){return Po.call(this,F,t,r)}atLeastOneInternalRecord(t,r){Po.call(this,Y,r,t)}atLeastOneSepFirstInternalRecord(t,r){Po.call(this,z,r,t,Jh)}manyInternalRecord(t,r){Po.call(this,w,r,t)}manySepFirstInternalRecord(t,r){Po.call(this,G,r,t,Jh)}orInternalRecord(t,r){return tC.call(this,t,r)}subruleInternalRecord(t,r,n){if(La(r),!t||U(t,"ruleName")===!1){let s=new Error(`<SUBRULE${Zh(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>
139
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let o=xt(this.recordingProdStack),i=t.ruleName,a=new B({idx:r,nonTerminalName:i,label:n?.LABEL,referencedRule:void 0});return o.definition.push(a),this.outputCst?eC:Aa}consumeInternalRecord(t,r,n){if(La(r),!oc(t)){let a=new Error(`<CONSUME${Zh(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>
140
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw a.KNOWN_RECORDER_ERROR=!0,a}let o=xt(this.recordingProdStack),i=new M({idx:r,terminalType:t,label:n?.LABEL});return o.definition.push(i),em}};function Po(e,t,r,n=!1){La(r);let o=xt(this.recordingProdStack),i=_e(t)?t:t.DEF,a=new e({definition:[],idx:r});return n&&(a.separator=t.SEP),U(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(a),i.call(this),o.definition.push(a),this.recordingProdStack.pop(),Aa}function tC(e,t){La(t);let r=xt(this.recordingProdStack),n=N(e)===!1,o=n===!1?e:e.DEF,i=new H({definition:[],idx:t,ignoreAmbiguities:n&&e.IGNORE_AMBIGUITIES===!0});U(e,"MAX_LOOKAHEAD")&&(i.maxLookahead=e.MAX_LOOKAHEAD);let a=po(o,s=>_e(s.GATE));return i.hasPredicates=a,r.definition.push(i),L(o,s=>{let c=new q({definition:[]});i.definition.push(c),U(s,"IGNORE_AMBIGUITIES")?c.ignoreAmbiguities=s.IGNORE_AMBIGUITIES:U(s,"GATE")&&(c.ignoreAmbiguities=!0),this.recordingProdStack.push(c),s.ALT.call(this),this.recordingProdStack.pop()}),Aa}function Zh(e){return e===0?"":`${e}`}function La(e){if(e<0||e>Qh){let t=new Error(`Invalid DSL Method idx value: <${e}>
141
+ Idx value must be a none negative value smaller than ${Qh+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}var Ua=class{initPerformanceTracer(t){if(U(t,"traceInitPerf")){let r=t.traceInitPerf,n=typeof r=="number";this.traceInitMaxIdent=n?r:1/0,this.traceInitPerf=n?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=De.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let n=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${n}--> <${t}>`);let{time:o,value:i}=mo(r),a=o>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&a(`${n}<-- <${t}> time: ${o}ms`),this.traceInitIndent--,i}else return r()}};function tm(e,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(o=>{if(o==="constructor")return;let i=Object.getOwnPropertyDescriptor(n,o);i&&(i.get||i.set)?Object.defineProperty(e.prototype,o,i):e.prototype[o]=r.prototype[o]})})}var Gn=Vr(Je,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(Gn);var De=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:ea,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Hn=Object.freeze({recoveryValueFunc:()=>{},resyncEnabled:!0}),ge;(function(e){e[e.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",e[e.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",e[e.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",e[e.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",e[e.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",e[e.LEFT_RECURSION=5]="LEFT_RECURSION",e[e.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",e[e.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",e[e.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",e[e.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",e[e.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",e[e.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",e[e.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",e[e.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION"})(ge||(ge={}));var vo=class e{static performSelfAnalysis(t){throw Error("The **static** `performSelfAnalysis` method has been deprecated. \nUse the **instance** method with the same name instead.")}performSelfAnalysis(){this.TRACE_INIT("performSelfAnalysis",()=>{let t;this.selfAnalysisDone=!0;let r=this.className;this.TRACE_INIT("toFastProps",()=>{go(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),L(this.definedRulesNames,o=>{let a=this[o].originalGrammarAction,s;this.TRACE_INIT(`${o} Rule`,()=>{s=this.topLevelRuleRecord(o,a)}),this.gastProductionsCache[o]=s})}finally{this.disableRecording()}});let n=[];if(this.TRACE_INIT("Grammar Resolving",()=>{n=Dh({rules:j(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{if(v(n)&&this.skipValidations===!1){let o=jh({rules:j(this.gastProductionsCache),tokenTypes:j(this.tokensMap),errMsgProvider:ut,grammarName:r}),i=vh({lookaheadStrategy:this.lookaheadStrategy,rules:j(this.gastProductionsCache),tokenTypes:j(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(o,i)}}),v(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let o=Yd(j(this.gastProductionsCache));this.resyncFollows=o}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var o,i;(i=(o=this.lookaheadStrategy).initialize)===null||i===void 0||i.call(o,{rules:j(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(j(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!v(this.definitionErrors))throw t=R(this.definitionErrors,o=>o.message),new Error(`Parser Definition Errors detected:
142
142
  ${t.join(`
143
143
  -------------------------------
144
144
  `)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let n=this;if(n.initErrorHandler(r),n.initLexerAdapter(),n.initLooksAhead(r),n.initRecognizerEngine(t,r),n.initRecoverable(r),n.initTreeBuilder(r),n.initContentAssist(),n.initGastRecorder(r),n.initPerformanceTracer(r),U(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
145
145
  Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
146
146
  See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
147
- For further details.`);this.skipValidations=U(r,"skipValidations")?r.skipValidations:De.skipValidations}};Mo.DEFER_DEFINITION_ERRORS_HANDLING=!1;tm(Mo,[fa,ha,ya,Sa,Ra,Ta,xa,Oa,La,Na]);var ko=class extends Mo{constructor(t,r=De){let n=V(r);n.outputCst=!0,super(t,n)}};var Dg=Mt(Bg(),1);var Cc=(e,t)=>{for(let r=0;r<t.length;r++){let n=t[r],o=n[0],i=n[1];for(let a=o;a<=i;a++)e.add(a)}},Bo=new Set([181,257,259,261,263,265,267,269,271,273,275,277,279,281,283,285,287,289,291,293,295,297,299,301,303,305,307,309,314,316,318,320,322,324,326,331,333,335,337,339,341,343,345,347,349,351,353,355,357,359,361,363,365,367,369,371,373,375,378,380,387,389,392,402,405,414,417,419,421,424,429,432,436,438,454,457,460,462,464,466,468,470,472,474,479,481,483,485,487,489,491,493,499,501,505,507,509,511,513,515,517,519,521,523,525,527,529,531,533,535,537,539,541,543,545,547,549,551,553,555,557,559,561,572,578,583,585,587,589,881,883,887,912,985,987,989,991,993,995,997,999,1001,1003,1005,1013,1016,1121,1123,1125,1127,1129,1131,1133,1135,1137,1139,1141,1143,1145,1147,1149,1151,1153,1163,1165,1167,1169,1171,1173,1175,1177,1179,1181,1183,1185,1187,1189,1191,1193,1195,1197,1199,1201,1203,1205,1207,1209,1211,1213,1215,1218,1220,1222,1224,1226,1228,1233,1235,1237,1239,1241,1243,1245,1247,1249,1251,1253,1255,1257,1259,1261,1263,1265,1267,1269,1271,1273,1275,1277,1279,1281,1283,1285,1287,1289,1291,1293,1295,1297,1299,1301,1303,1305,1307,1309,1311,1313,1315,1317,1319,1321,1323,1325,1327,7681,7683,7685,7687,7689,7691,7693,7695,7697,7699,7701,7703,7705,7707,7709,7711,7713,7715,7717,7719,7721,7723,7725,7727,7729,7731,7733,7735,7737,7739,7741,7743,7745,7747,7749,7751,7753,7755,7757,7759,7761,7763,7765,7767,7769,7771,7773,7775,7777,7779,7781,7783,7785,7787,7789,7791,7793,7795,7797,7799,7801,7803,7805,7807,7809,7811,7813,7815,7817,7819,7821,7823,7825,7827,7839,7841,7843,7845,7847,7849,7851,7853,7855,7857,7859,7861,7863,7865,7867,7869,7871,7873,7875,7877,7879,7881,7883,7885,7887,7889,7891,7893,7895,7897,7899,7901,7903,7905,7907,7909,7911,7913,7915,7917,7919,7921,7923,7925,7927,7929,7931,7933,8126,8458,8467,8495,8500,8505,8526,8580,11361,11368,11370,11372,11377,11393,11395,11397,11399,11401,11403,11405,11407,11409,11411,11413,11415,11417,11419,11421,11423,11425,11427,11429,11431,11433,11435,11437,11439,11441,11443,11445,11447,11449,11451,11453,11455,11457,11459,11461,11463,11465,11467,11469,11471,11473,11475,11477,11479,11481,11483,11485,11487,11489,11500,11502,11507,11559,11565,42561,42563,42565,42567,42569,42571,42573,42575,42577,42579,42581,42583,42585,42587,42589,42591,42593,42595,42597,42599,42601,42603,42605,42625,42627,42629,42631,42633,42635,42637,42639,42641,42643,42645,42647,42649,42651,42787,42789,42791,42793,42795,42797,42803,42805,42807,42809,42811,42813,42815,42817,42819,42821,42823,42825,42827,42829,42831,42833,42835,42837,42839,42841,42843,42845,42847,42849,42851,42853,42855,42857,42859,42861,42863,42874,42876,42879,42881,42883,42885,42887,42892,42894,42897,42903,42905,42907,42909,42911,42913,42915,42917,42919,42921,42927,42933,42935,42937,42939,42941,42943,42947,43002,119995,120779,748,750,884,890,1369,1600,2042,2074,2084,2088,2417,3654,3782,4348,6103,6211,6823,7544,8305,8319,11631,11823,12293,12347,40981,42508,42623,42864,42888,43471,43494,43632,43741,65392,94179,125259,170,186,443,660,1749,1791,1808,1969,2365,2384,2482,2493,2510,2556,2654,2749,2768,2809,2877,2929,2947,2972,3024,3133,3200,3261,3294,3389,3406,3517,3716,3749,3773,3840,4159,4193,4238,4696,4800,6108,6314,7418,12294,12348,12447,12543,13312,19968,42606,42895,42999,43259,43642,43697,43712,43714,43762,44032,64285,64318,67592,67644,68096,69415,69956,70006,70106,70108,70280,70461,70480,70751,70855,71236,71352,71935,72161,72163,72192,72250,72272,72349,72768,73030,73112,94032,94208,123214,126500,126503,126521,126523,126530,126535,126537,126539,126548,126551,126553,126555,126557,126559,126564,126590,131072,173824,177984,178208,183984,453,456,459,498,8124,8140,8188,256,258,260,262,264,266,268,270,272,274,276,278,280,282,284,286,288,290,292,294,296,298,300,302,304,306,308,310,313,315,317,319,321,323,325,327,330,332,334,336,338,340,342,344,346,348,350,352,354,356,358,360,362,364,366,368,370,372,374,379,381,388,418,420,425,428,437,444,452,455,458,461,463,465,467,469,471,473,475,478,480,482,484,486,488,490,492,494,497,500,506,508,510,512,514,516,518,520,522,524,526,528,530,532,534,536,538,540,542,544,546,548,550,552,554,556,558,560,562,577,584,586,588,590,880,882,886,895,902,908,975,984,986,988,990,992,994,996,998,1e3,1002,1004,1006,1012,1015,1120,1122,1124,1126,1128,1130,1132,1134,1136,1138,1140,1142,1144,1146,1148,1150,1152,1162,1164,1166,1168,1170,1172,1174,1176,1178,1180,1182,1184,1186,1188,1190,1192,1194,1196,1198,1200,1202,1204,1206,1208,1210,1212,1214,1219,1221,1223,1225,1227,1229,1232,1234,1236,1238,1240,1242,1244,1246,1248,1250,1252,1254,1256,1258,1260,1262,1264,1266,1268,1270,1272,1274,1276,1278,1280,1282,1284,1286,1288,1290,1292,1294,1296,1298,1300,1302,1304,1306,1308,1310,1312,1314,1316,1318,1320,1322,1324,1326,4295,4301,7680,7682,7684,7686,7688,7690,7692,7694,7696,7698,7700,7702,7704,7706,7708,7710,7712,7714,7716,7718,7720,7722,7724,7726,7728,7730,7732,7734,7736,7738,7740,7742,7744,7746,7748,7750,7752,7754,7756,7758,7760,7762,7764,7766,7768,7770,7772,7774,7776,7778,7780,7782,7784,7786,7788,7790,7792,7794,7796,7798,7800,7802,7804,7806,7808,7810,7812,7814,7816,7818,7820,7822,7824,7826,7828,7838,7840,7842,7844,7846,7848,7850,7852,7854,7856,7858,7860,7862,7864,7866,7868,7870,7872,7874,7876,7878,7880,7882,7884,7886,7888,7890,7892,7894,7896,7898,7900,7902,7904,7906,7908,7910,7912,7914,7916,7918,7920,7922,7924,7926,7928,7930,7932,7934,8025,8027,8029,8031,8450,8455,8469,8484,8486,8488,8517,8579,11360,11367,11369,11371,11378,11381,11394,11396,11398,11400,11402,11404,11406,11408,11410,11412,11414,11416,11418,11420,11422,11424,11426,11428,11430,11432,11434,11436,11438,11440,11442,11444,11446,11448,11450,11452,11454,11456,11458,11460,11462,11464,11466,11468,11470,11472,11474,11476,11478,11480,11482,11484,11486,11488,11490,11499,11501,11506,42560,42562,42564,42566,42568,42570,42572,42574,42576,42578,42580,42582,42584,42586,42588,42590,42592,42594,42596,42598,42600,42602,42604,42624,42626,42628,42630,42632,42634,42636,42638,42640,42642,42644,42646,42648,42650,42786,42788,42790,42792,42794,42796,42798,42802,42804,42806,42808,42810,42812,42814,42816,42818,42820,42822,42824,42826,42828,42830,42832,42834,42836,42838,42840,42842,42844,42846,42848,42850,42852,42854,42856,42858,42860,42862,42873,42875,42880,42882,42884,42886,42891,42893,42896,42898,42902,42904,42906,42908,42910,42912,42914,42916,42918,42920,42934,42936,42938,42940,42942,42946,119964,119970,120134,120778,12295,66369,66378,36,1423,1547,2555,2801,3065,3647,6107,43064,65020,65129,65284,123647,126128,95,8276,65343]),RI=[[97,122],[223,246],[248,255],[311,312],[328,329],[382,384],[396,397],[409,411],[426,427],[441,442],[445,447],[476,477],[495,496],[563,569],[575,576],[591,659],[661,687],[891,893],[940,974],[976,977],[981,983],[1007,1011],[1019,1020],[1072,1119],[1230,1231],[1376,1416],[4304,4346],[4349,4351],[5112,5117],[7296,7304],[7424,7467],[7531,7543],[7545,7578],[7829,7837],[7935,7943],[7952,7957],[7968,7975],[7984,7991],[8e3,8005],[8016,8023],[8032,8039],[8048,8061],[8064,8071],[8080,8087],[8096,8103],[8112,8116],[8118,8119],[8130,8132],[8134,8135],[8144,8147],[8150,8151],[8160,8167],[8178,8180],[8182,8183],[8462,8463],[8508,8509],[8518,8521],[11312,11358],[11365,11366],[11379,11380],[11382,11387],[11491,11492],[11520,11557],[42799,42801],[42865,42872],[42899,42901],[43824,43866],[43872,43879],[43888,43967],[64256,64262],[64275,64279],[65345,65370],[66600,66639],[66776,66811],[68800,68850],[71872,71903],[93792,93823],[119834,119859],[119886,119892],[119894,119911],[119938,119963],[119990,119993],[119997,120003],[120005,120015],[120042,120067],[120094,120119],[120146,120171],[120198,120223],[120250,120275],[120302,120327],[120354,120379],[120406,120431],[120458,120485],[120514,120538],[120540,120545],[120572,120596],[120598,120603],[120630,120654],[120656,120661],[120688,120712],[120714,120719],[120746,120770],[120772,120777],[125218,125251],[688,705],[710,721],[736,740],[1765,1766],[2036,2037],[7288,7293],[7468,7530],[7579,7615],[8336,8348],[11388,11389],[12337,12341],[12445,12446],[12540,12542],[42232,42237],[42652,42653],[42775,42783],[43e3,43001],[43763,43764],[43868,43871],[65438,65439],[92992,92995],[94099,94111],[94176,94177],[123191,123197],[13313,19893],[19969,40943],[44033,55203],[94209,100343],[131073,173782],[173825,177972],[177985,178205],[178209,183969],[183985,191456],[448,451],[1488,1514],[1519,1522],[1568,1599],[1601,1610],[1646,1647],[1649,1747],[1774,1775],[1786,1788],[1810,1839],[1869,1957],[1994,2026],[2048,2069],[2112,2136],[2144,2154],[2208,2228],[2230,2237],[2308,2361],[2392,2401],[2418,2432],[2437,2444],[2447,2448],[2451,2472],[2474,2480],[2486,2489],[2524,2525],[2527,2529],[2544,2545],[2565,2570],[2575,2576],[2579,2600],[2602,2608],[2610,2611],[2613,2614],[2616,2617],[2649,2652],[2674,2676],[2693,2701],[2703,2705],[2707,2728],[2730,2736],[2738,2739],[2741,2745],[2784,2785],[2821,2828],[2831,2832],[2835,2856],[2858,2864],[2866,2867],[2869,2873],[2908,2909],[2911,2913],[2949,2954],[2958,2960],[2962,2965],[2969,2970],[2974,2975],[2979,2980],[2984,2986],[2990,3001],[3077,3084],[3086,3088],[3090,3112],[3114,3129],[3160,3162],[3168,3169],[3205,3212],[3214,3216],[3218,3240],[3242,3251],[3253,3257],[3296,3297],[3313,3314],[3333,3340],[3342,3344],[3346,3386],[3412,3414],[3423,3425],[3450,3455],[3461,3478],[3482,3505],[3507,3515],[3520,3526],[3585,3632],[3634,3635],[3648,3653],[3713,3714],[3718,3722],[3724,3747],[3751,3760],[3762,3763],[3776,3780],[3804,3807],[3904,3911],[3913,3948],[3976,3980],[4096,4138],[4176,4181],[4186,4189],[4197,4198],[4206,4208],[4213,4225],[4352,4680],[4682,4685],[4688,4694],[4698,4701],[4704,4744],[4746,4749],[4752,4784],[4786,4789],[4792,4798],[4802,4805],[4808,4822],[4824,4880],[4882,4885],[4888,4954],[4992,5007],[5121,5740],[5743,5759],[5761,5786],[5792,5866],[5873,5880],[5888,5900],[5902,5905],[5920,5937],[5952,5969],[5984,5996],[5998,6e3],[6016,6067],[6176,6210],[6212,6264],[6272,6276],[6279,6312],[6320,6389],[6400,6430],[6480,6509],[6512,6516],[6528,6571],[6576,6601],[6656,6678],[6688,6740],[6917,6963],[6981,6987],[7043,7072],[7086,7087],[7098,7141],[7168,7203],[7245,7247],[7258,7287],[7401,7404],[7406,7411],[7413,7414],[8501,8504],[11568,11623],[11648,11670],[11680,11686],[11688,11694],[11696,11702],[11704,11710],[11712,11718],[11720,11726],[11728,11734],[11736,11742],[12353,12438],[12449,12538],[12549,12591],[12593,12686],[12704,12730],[12784,12799],[40960,40980],[40982,42124],[42192,42231],[42240,42507],[42512,42527],[42538,42539],[42656,42725],[43003,43009],[43011,43013],[43015,43018],[43020,43042],[43072,43123],[43138,43187],[43250,43255],[43261,43262],[43274,43301],[43312,43334],[43360,43388],[43396,43442],[43488,43492],[43495,43503],[43514,43518],[43520,43560],[43584,43586],[43588,43595],[43616,43631],[43633,43638],[43646,43695],[43701,43702],[43705,43709],[43739,43740],[43744,43754],[43777,43782],[43785,43790],[43793,43798],[43808,43814],[43816,43822],[43968,44002],[55216,55238],[55243,55291],[63744,64109],[64112,64217],[64287,64296],[64298,64310],[64312,64316],[64320,64321],[64323,64324],[64326,64433],[64467,64829],[64848,64911],[64914,64967],[65008,65019],[65136,65140],[65142,65276],[65382,65391],[65393,65437],[65440,65470],[65474,65479],[65482,65487],[65490,65495],[65498,65500],[65536,65547],[65549,65574],[65576,65594],[65596,65597],[65599,65613],[65616,65629],[65664,65786],[66176,66204],[66208,66256],[66304,66335],[66349,66368],[66370,66377],[66384,66421],[66432,66461],[66464,66499],[66504,66511],[66640,66717],[66816,66855],[66864,66915],[67072,67382],[67392,67413],[67424,67431],[67584,67589],[67594,67637],[67639,67640],[67647,67669],[67680,67702],[67712,67742],[67808,67826],[67828,67829],[67840,67861],[67872,67897],[67968,68023],[68030,68031],[68112,68115],[68117,68119],[68121,68149],[68192,68220],[68224,68252],[68288,68295],[68297,68324],[68352,68405],[68416,68437],[68448,68466],[68480,68497],[68608,68680],[68864,68899],[69376,69404],[69424,69445],[69600,69622],[69635,69687],[69763,69807],[69840,69864],[69891,69926],[69968,70002],[70019,70066],[70081,70084],[70144,70161],[70163,70187],[70272,70278],[70282,70285],[70287,70301],[70303,70312],[70320,70366],[70405,70412],[70415,70416],[70419,70440],[70442,70448],[70450,70451],[70453,70457],[70493,70497],[70656,70708],[70727,70730],[70784,70831],[70852,70853],[71040,71086],[71128,71131],[71168,71215],[71296,71338],[71424,71450],[71680,71723],[72096,72103],[72106,72144],[72203,72242],[72284,72329],[72384,72440],[72704,72712],[72714,72750],[72818,72847],[72960,72966],[72968,72969],[72971,73008],[73056,73061],[73063,73064],[73066,73097],[73440,73458],[73728,74649],[74880,75075],[77824,78894],[82944,83526],[92160,92728],[92736,92766],[92880,92909],[92928,92975],[93027,93047],[93053,93071],[93952,94026],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[113664,113770],[113776,113788],[113792,113800],[113808,113817],[123136,123180],[123584,123627],[124928,125124],[126464,126467],[126469,126495],[126497,126498],[126505,126514],[126516,126519],[126541,126543],[126545,126546],[126561,126562],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[194560,195101],[8072,8079],[8088,8095],[8104,8111],[65,90],[192,214],[216,222],[376,377],[385,386],[390,391],[393,395],[398,401],[403,404],[406,408],[412,413],[415,416],[422,423],[430,431],[433,435],[439,440],[502,504],[570,571],[573,574],[579,582],[904,906],[910,911],[913,929],[931,939],[978,980],[1017,1018],[1021,1071],[1216,1217],[1329,1366],[4256,4293],[5024,5109],[7312,7354],[7357,7359],[7944,7951],[7960,7965],[7976,7983],[7992,7999],[8008,8013],[8040,8047],[8120,8123],[8136,8139],[8152,8155],[8168,8172],[8184,8187],[8459,8461],[8464,8466],[8473,8477],[8490,8493],[8496,8499],[8510,8511],[11264,11310],[11362,11364],[11373,11376],[11390,11392],[42877,42878],[42922,42926],[42928,42932],[42948,42950],[65313,65338],[66560,66599],[66736,66771],[68736,68786],[71840,71871],[93760,93791],[119808,119833],[119860,119885],[119912,119937],[119966,119967],[119973,119974],[119977,119980],[119982,119989],[120016,120041],[120068,120069],[120071,120074],[120077,120084],[120086,120092],[120120,120121],[120123,120126],[120128,120132],[120138,120144],[120172,120197],[120224,120249],[120276,120301],[120328,120353],[120380,120405],[120432,120457],[120488,120512],[120546,120570],[120604,120628],[120662,120686],[120720,120744],[125184,125217],[5870,5872],[8544,8578],[8581,8584],[12321,12329],[12344,12346],[42726,42735],[65856,65908],[66513,66517],[74752,74862],[162,165],[2046,2047],[2546,2547],[8352,8383],[65504,65505],[65509,65510],[73693,73696],[8255,8256],[65075,65076],[65101,65103]];Cc(Bo,RI);var bc=new Set([1471,1479,1648,1809,2045,2362,2364,2381,2433,2492,2509,2558,2620,2641,2677,2748,2765,2817,2876,2879,2893,2902,2946,3008,3021,3072,3076,3201,3260,3263,3270,3405,3530,3542,3633,3761,3893,3895,3897,4038,4226,4237,4253,6086,6109,6313,6450,6683,6742,6752,6754,6783,6964,6972,6978,7142,7149,7405,7412,8417,11647,42607,43010,43014,43019,43263,43443,43493,43587,43596,43644,43696,43713,43766,44005,44008,44013,64286,66045,66272,68159,69633,70003,70196,70206,70367,70464,70726,70750,70842,71229,71339,71341,71351,72160,72263,72767,73018,73031,73109,73111,94031,121461,121476,173,1564,1757,1807,2274,6158,65279,69821,69837,917505]),xI=[[768,879],[1155,1159],[1425,1469],[1473,1474],[1476,1477],[1552,1562],[1611,1631],[1750,1756],[1759,1764],[1767,1768],[1770,1773],[1840,1866],[1958,1968],[2027,2035],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2273],[2275,2306],[2369,2376],[2385,2391],[2402,2403],[2497,2500],[2530,2531],[2561,2562],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2753,2757],[2759,2760],[2786,2787],[2810,2815],[2881,2884],[2914,2915],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3426,3427],[3538,3540],[3636,3642],[3655,3662],[3764,3772],[3784,3789],[3864,3865],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4229,4230],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6089,6099],[6155,6157],[6277,6278],[6432,6434],[6439,6440],[6457,6459],[6679,6680],[6744,6750],[6757,6764],[6771,6780],[6832,6845],[6912,6915],[6966,6970],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7144,7145],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7416,7417],[7616,7673],[7675,7679],[8400,8412],[8421,8432],[11503,11505],[11744,11775],[12330,12333],[12441,12442],[42612,42621],[42654,42655],[42736,42737],[43045,43046],[43204,43205],[43232,43249],[43302,43309],[43335,43345],[43392,43394],[43446,43449],[43452,43453],[43561,43566],[43569,43570],[43573,43574],[43698,43700],[43703,43704],[43710,43711],[43756,43757],[65024,65039],[65056,65071],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68325,68326],[68900,68903],[69446,69456],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69888,69890],[69927,69931],[69933,69940],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70198,70199],[70371,70378],[70400,70401],[70459,70460],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70835,70840],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71231,71232],[71344,71349],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72193,72202],[72243,72248],[72251,72254],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73020,73021],[73023,73029],[73104,73105],[73459,73460],[92912,92916],[92976,92982],[94095,94098],[113821,113822],[119143,119145],[119163,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917760,917999],[1536,1541],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[65529,65531],[78896,78904],[113824,113827],[119155,119162],[917536,917631]];Cc(bc,xI);var OI=[[0,8],[14,27],[127,159],[768,879],[6832,6911],[7616,7679],[8400,8447],[65056,65071],[48,57]];Cc(bc,OI);var Fg=new Set((function*(){yield*Bo,yield*bc})());var Ic={};function jg(e){let t=e;return Object.keys(Ic).forEach(r=>{let n=Ic[r],o=new RegExp(`{{${r}}}`,"g");t=t.replace(o,n)}),t}function ve(e,t){Ic[e]=jg(t)}function Qe(e,t){let r=jg(e);return new RegExp(r,t)}ve("Digits","[0-9]([0-9_]*[0-9])?");ve("ExponentPart","[eE][+-]?{{Digits}}");ve("HexDigit","[0-9a-fA-F]");ve("HexDigits","{{HexDigit}}(({{HexDigit}}|'_')*{{HexDigit}})?");ve("FloatTypeSuffix","[fFdD]");ve("LineTerminator","(\\x0A|(\\x0D(\\x0A)?))");ve("UnicodeMarker","uu*");ve("UnicodeEscape","\\\\{{UnicodeMarker}}{{HexDigit}}{4}");ve("RawInputCharacter","\\\\{{UnicodeMarker}}[0-9a-fA-F]{4}");ve("UnicodeInputCharacter","({{UnicodeEscape}}|{{RawInputCharacter}})");ve("OctalDigit","[0-7]");ve("ZeroToThree","[0-3]");ve("OctalEscape","\\\\({{OctalDigit}}|{{ZeroToThree}}?{{OctalDigit}}{2})");ve("EscapeSequence",`\\\\[bstnfr"'\\\\]|{{OctalEscape}}`);ve("StringCharacter",'(?:(?:{{EscapeSequence}})|{{UnicodeEscape}}|(?!["\\\\]).)');ve("TextBlockCharacter","(?:(?:{{EscapeSequence}})|{{UnicodeEscape}}|(?!\\\\).|\\\\?{{LineTerminator}})");function AI(e,t){let r=t,n=e.codePointAt(r);for(Bo.has(n)&&(r++,n>65535&&r++,n=e.codePointAt(r));Fg.has(n);)r++,n>65535&&r++,n=e.codePointAt(r);return r===t?null:[e.substring(t,r)]}var zr=Wr({name:"Identifier",pattern:{exec:AI},line_breaks:!1,start_chars_hint:Array.from(Bo,e=>String.fromCharCode(e))}),Vt={modes:{global:[],stringTemplate:[],textBlockTemplate:[]},defaultMode:"global"},Gg=Object.keys(Vt.modes),Ze={};function O(e,t=Gg){e.label||(typeof e.pattern=="string"?e.label=`'${e.pattern}'`:e.pattern instanceof RegExp&&(e.label=`'${e.name}'`));let r=Wr(e);return t.forEach(n=>Vt.modes[n].push(r)),Ze[e.name]=r,r}function qt(e){return e.longer_alt=zr,O(e)}var UI=O({name:"RestrictedKeyword",pattern:D.NA}),Hg=O({name:"Keyword",pattern:D.NA}),ot=O({name:"AssignmentOperator",pattern:D.NA}),Re=O({name:"BinaryOperator",pattern:D.NA}),Wn=O({name:"UnaryPrefixOperator",pattern:D.NA}),ba=O({name:"UnaryPrefixOperatorNotPlusMinus",pattern:D.NA}),Kg=O({name:"UnarySuffixOperator",pattern:D.NA}),it=O({name:"Separators",pattern:D.NA});O({name:"WhiteSpace",pattern:Qe("[\\x09\\x20\\x0C]|{{LineTerminator}}"),group:D.SKIPPED});O({name:"LineComment",pattern:/\/\/[^\n\r]*/,group:"comments"});O({name:"TraditionalComment",pattern:/\/\*([^*]|\*(?!\/))*\*\//,group:"comments"});O({name:"BinaryLiteral",pattern:/0[bB][01]([01_]*[01])?[lL]?/});O({name:"FloatLiteral",pattern:Qe("{{Digits}}\\.({{Digits}})?({{ExponentPart}})?({{FloatTypeSuffix}})?|\\.{{Digits}}({{ExponentPart}})?({{FloatTypeSuffix}})?|{{Digits}}{{ExponentPart}}({{FloatTypeSuffix}})?|{{Digits}}({{ExponentPart}})?{{FloatTypeSuffix}}")});O({name:"OctalLiteral",pattern:/0_*[0-7]([0-7_]*[0-7])?[lL]?/});O({name:"HexFloatLiteral",pattern:Qe("0[xX]({{HexDigits}}\\.?|({{HexDigits}})?\\.{{HexDigits}})[pP][+-]?{{Digits}}[fFdD]?")});O({name:"HexLiteral",pattern:/0[xX][0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?[lL]?/});O({name:"DecimalLiteral",pattern:Qe("(0|[1-9](_+{{Digits}}|({{Digits}})?))[lL]?")});O({name:"CharLiteral",pattern:Qe("'(?:[^\\\\']|(?:(?:{{EscapeSequence}})|{{UnicodeInputCharacter}}))'")});O({name:"TextBlock",pattern:Qe('"""[\\x09\\x20\\x0C]*{{LineTerminator}}{{TextBlockCharacter}}*?"""')});O({name:"TextBlockTemplateBegin",pattern:Qe('"""{{LineTerminator}}{{TextBlockCharacter}}*?\\\\\\{'),push_mode:"textBlockTemplate"});O({name:"TextBlockTemplateEnd",pattern:Qe('\\}{{TextBlockCharacter}}*?"""'),pop_mode:!0},["textBlockTemplate"]);O({name:"StringLiteral",pattern:Qe('"{{StringCharacter}}*?"')});O({name:"StringTemplateBegin",pattern:Qe('"{{StringCharacter}}*?\\\\\\{'),push_mode:"stringTemplate"});O({name:"StringTemplateEnd",pattern:Qe('\\}{{StringCharacter}}*?"'),pop_mode:!0},["stringTemplate"]);O({name:"StringTemplateMid",pattern:Qe("\\}{{StringCharacter}}*?\\\\\\{")},["stringTemplate"]);O({name:"TextBlockTemplateMid",pattern:Qe("\\}{{TextBlockCharacter}}*?\\\\\\{")},["textBlockTemplate"]);var NI=["open","module","requires","transitive","exports","opens","to","uses","provides","when","with","sealed","non-sealed","permits"];Wg(NI).forEach(e=>{qt({name:e[0].toUpperCase()+(0,Dg.default)(e.substr(1)),pattern:e,categories:[zr,UI]})});var CI=["abstract","continue","for","new","switch","assert","default","if","package","synchronized","boolean","do","goto","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while",["_","underscore"]];Wg(CI).forEach(e=>{let t=Array.isArray(e),r=t?e[1]:e,n=t?e[0]:e,o={name:r[0].toUpperCase()+r.substr(1),pattern:n,categories:Hg};t&&(o.label=`'${r}'`),qt(o)});qt({name:"Instanceof",pattern:"instanceof",categories:[Hg,Re]});qt({name:"Var",pattern:"var",categories:zr});qt({name:"Yield",pattern:"yield",categories:zr});qt({name:"Record",pattern:"record",categories:zr});qt({name:"True",pattern:"true"});qt({name:"False",pattern:"false"});qt({name:"Null",pattern:"null"});O({name:"At",pattern:"@",categories:[it]});O({name:"Arrow",pattern:"->"});O({name:"DotDotDot",pattern:"...",categories:[it]});O({name:"Dot",pattern:".",categories:[it]});O({name:"Comma",pattern:",",categories:[it]});O({name:"Semicolon",pattern:";",categories:[it]});O({name:"ColonColon",pattern:"::",categories:[it]});O({name:"Colon",pattern:":"});O({name:"QuestionMark",pattern:"?"});O({name:"LBrace",pattern:"(",categories:[it]});O({name:"RBrace",pattern:")",categories:[it]});O({name:"LCurly",pattern:"{",categories:[it],push_mode:Vt.defaultMode});O({name:"RCurly",pattern:"}",categories:[it],pop_mode:!0},[Vt.defaultMode]);O({name:"LSquare",pattern:"[",categories:[it]});O({name:"RSquare",pattern:"]",categories:[it]});O({name:"MinusMinus",pattern:"--",categories:[Wn,Kg,ba]});O({name:"PlusPlus",pattern:"++",categories:[Wn,Kg,ba]});O({name:"Complement",pattern:"~",categories:[Wn,ba]});O({name:"LessEquals",pattern:"<=",categories:[Re]});O({name:"LessLessEquals",pattern:"<<=",categories:[ot]});O({name:"Less",pattern:"<",categories:[Re]});O({name:"GreaterEquals",pattern:">=",categories:[Re]});O({name:"GreaterGreaterEquals",pattern:">>=",categories:[ot]});O({name:"GreaterGreaterGreaterEquals",pattern:">>>=",categories:[ot]});O({name:"Greater",pattern:">",categories:[Re]});O({name:"EqualsEquals",pattern:"==",categories:[Re]});O({name:"Equals",pattern:"=",categories:[Re,ot]});O({name:"MinusEquals",pattern:"-=",categories:[ot]});O({name:"Minus",pattern:"-",categories:[Re,Wn]});O({name:"PlusEquals",pattern:"+=",categories:[ot]});O({name:"Plus",pattern:"+",categories:[Re,Wn]});O({name:"AndAnd",pattern:"&&",categories:[Re]});O({name:"AndEquals",pattern:"&=",categories:[ot]});O({name:"And",pattern:"&",categories:[Re]});O({name:"XorEquals",pattern:"^=",categories:[ot]});O({name:"Xor",pattern:"^",categories:[Re]});O({name:"NotEquals",pattern:"!=",categories:[Re]});O({name:"OrOr",pattern:"||",categories:[Re]});O({name:"OrEquals",pattern:"|=",categories:[ot]});O({name:"Or",pattern:"|",categories:[Re]});O({name:"MultiplyEquals",pattern:"*=",categories:[ot]});O({name:"Star",pattern:"*",categories:[Re]});O({name:"DivideEquals",pattern:"/=",categories:[ot]});O({name:"Divide",pattern:"/",categories:[Re]});O({name:"ModuloEquals",pattern:"%=",categories:[ot]});O({name:"Modulo",pattern:"%",categories:[Re]});O({name:"Not",pattern:"!",categories:[Wn,ba]});Gg.forEach(e=>Vt.modes[e].push(zr));Ze.Identifier=zr;function Wg(e){return e.sort((t,r)=>r.length-t.length)}function Fo(){return(typeof process<"u"&&process.env&&process.env["prettier-java-development-mode"]==="enabled")===!1}var Vg=new D(Vt,{ensureOptimizations:!0,skipValidations:Fo()});function Xr(e,t,r){return`${e.name}_${t}_${r}`}var Ur=1,bI=2,qg=4,Yg=5;var Yn=7,II=8,PI=9,vI=10,MI=11,zg=12,Do=class{constructor(t){this.target=t}isEpsilon(){return!1}},Vn=class extends Do{constructor(t,r){super(t),this.tokenType=r}},jo=class extends Do{constructor(t){super(t)}isEpsilon(){return!0}},qn=class extends Do{constructor(t,r,n){super(t),this.rule=r,this.followState=n}isEpsilon(){return!0}};function Xg(e){let t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};kI(t,e);let r=e.length;for(let n=0;n<r;n++){let o=e[n],i=Jr(t,o,o);i!==void 0&&VI(t,o,i)}return t}function kI(e,t){let r=t.length;for(let n=0;n<r;n++){let o=t[n],i=xe(e,o,void 0,{type:bI}),a=xe(e,o,void 0,{type:Yn});i.stop=a,e.ruleToStartState.set(o,i),e.ruleToStopState.set(o,a)}}function Jg(e,t,r){return r instanceof M?Pc(e,t,r.terminalType,r):r instanceof B?WI(e,t,r):r instanceof H?DI(e,t,r):r instanceof F?jI(e,t,r):r instanceof w?wI(e,t,r):r instanceof G?_I(e,t,r):r instanceof Y?BI(e,t,r):r instanceof z?FI(e,t,r):Jr(e,t,r)}function wI(e,t,r){let n=xe(e,t,r,{type:Yg});Nr(e,n);let o=zn(e,t,n,r,Jr(e,t,r));return Zg(e,t,r,o)}function _I(e,t,r){let n=xe(e,t,r,{type:Yg});Nr(e,n);let o=zn(e,t,n,r,Jr(e,t,r)),i=Pc(e,t,r.separator,r);return Zg(e,t,r,o,i)}function BI(e,t,r){let n=xe(e,t,r,{type:qg});Nr(e,n);let o=zn(e,t,n,r,Jr(e,t,r));return Qg(e,t,r,o)}function FI(e,t,r){let n=xe(e,t,r,{type:qg});Nr(e,n);let o=zn(e,t,n,r,Jr(e,t,r)),i=Pc(e,t,r.separator,r);return Qg(e,t,r,o,i)}function DI(e,t,r){let n=xe(e,t,r,{type:Ur});Nr(e,n);let o=R(r.definition,a=>Jg(e,t,a));return zn(e,t,n,r,...o)}function jI(e,t,r){let n=xe(e,t,r,{type:Ur});Nr(e,n);let o=zn(e,t,n,r,Jr(e,t,r));return GI(e,t,r,o)}function Jr(e,t,r){let n=Se(R(r.definition,o=>Jg(e,t,o)),o=>o!==void 0);return n.length===1?n[0]:n.length===0?void 0:KI(e,n)}function Qg(e,t,r,n,o){let i=n.left,a=n.right,s=xe(e,t,r,{type:MI});Nr(e,s);let c=xe(e,t,r,{type:zg});return i.loopback=s,c.loopback=s,e.decisionMap[Xr(t,o?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s,de(a,s),o===void 0?(de(s,i),de(s,c)):(de(s,c),de(s,o.left),de(o.right,i)),{left:i,right:c}}function Zg(e,t,r,n,o){let i=n.left,a=n.right,s=xe(e,t,r,{type:vI});Nr(e,s);let c=xe(e,t,r,{type:zg}),u=xe(e,t,r,{type:PI});return s.loopback=u,c.loopback=u,de(s,i),de(s,c),de(a,u),o!==void 0?(de(u,c),de(u,o.left),de(o.right,i)):de(u,s),e.decisionMap[Xr(t,o?"RepetitionWithSeparator":"Repetition",r.idx)]=s,{left:s,right:c}}function GI(e,t,r,n){let o=n.left,i=n.right;return de(o,i),e.decisionMap[Xr(t,"Option",r.idx)]=o,n}function Nr(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function zn(e,t,r,n,...o){let i=xe(e,t,n,{type:II,start:r});r.end=i;for(let s of o)s!==void 0?(de(r,s.left),de(s.right,i)):de(r,i);let a={left:r,right:i};return e.decisionMap[Xr(t,HI(n),n.idx)]=r,a}function HI(e){if(e instanceof H)return"Alternation";if(e instanceof F)return"Option";if(e instanceof w)return"Repetition";if(e instanceof G)return"RepetitionWithSeparator";if(e instanceof Y)return"RepetitionMandatory";if(e instanceof z)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function KI(e,t){let r=t.length;for(let i=0;i<r-1;i++){let a=t[i],s;a.left.transitions.length===1&&(s=a.left.transitions[0]);let c=s instanceof qn,u=s,l=t[i+1].left;a.left.type===Ur&&a.right.type===Ur&&s!==void 0&&(c&&u.followState===a.right||s.target===a.right)?(c?u.followState=l:s.target=l,qI(e,a.right)):de(a.right,l)}let n=t[0],o=t[r-1];return{left:n.left,right:o.right}}function Pc(e,t,r,n){let o=xe(e,t,n,{type:Ur}),i=xe(e,t,n,{type:Ur});return vc(o,new Vn(i,r)),{left:o,right:i}}function WI(e,t,r){let n=r.referencedRule,o=e.ruleToStartState.get(n),i=xe(e,t,r,{type:Ur}),a=xe(e,t,r,{type:Ur}),s=new qn(o,n,a);return vc(i,s),{left:i,right:a}}function VI(e,t,r){let n=e.ruleToStartState.get(t);de(n,r.left);let o=e.ruleToStopState.get(t);return de(r.right,o),{left:n,right:o}}function de(e,t){let r=new jo(t);vc(e,r)}function xe(e,t,r,n){let o=Object.assign({atn:e,production:r,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},n);return e.states.push(o),o}function vc(e,t){e.transitions.length===0&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function qI(e,t){e.states.splice(e.states.indexOf(t),1)}var Go={},Xn=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){let r=Mc(t);r in this.map||(this.map[r]=this.configs.length,this.configs.push(t))}get elements(){return this.configs}get alts(){return R(this.configs,t=>t.alt)}get key(){let t="";for(let r in this.map)t+=r+":";return t}};function Mc(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(r=>r.stateNumber.toString()).join("_")}`}function YI(e,t){let r={};return n=>{let o=n.toString(),i=r[o];return i!==void 0||(i={atnStartState:e,decision:t,states:{}},r[o]=i),i}}var Ia=class{constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,r){this.predicates[t]=r}toString(){let t="",r=this.predicates.length;for(let n=0;n<r;n++)t+=this.predicates[n]===!0?"1":"0";return t}},$g=new Ia,Ho=class extends Yr{constructor(t){var r;super(),this.logging=(r=t?.logging)!==null&&r!==void 0?r:(n=>console.log(n))}initialize(t){this.atn=Xg(t.rules),this.dfas=zI(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:r,rule:n,hasPredicates:o,dynamicTokensEnabled:i}=t,a=this.dfas,s=this.logging,c=Xr(n,"Alternation",r),l=this.atn.decisionMap[c].decision,f=R(ca({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),p=>R(p,h=>h[0]));if(eE(f,!1)&&!i){let p=te(f,(h,E,y)=>(L(E,S=>{S&&(h[S.tokenTypeIdx]=y,L(S.categoryMatches,d=>{h[d]=y}))}),h),{});return o?function(h){var E;let y=this.LA(1),S=p[y.tokenTypeIdx];if(h!==void 0&&S!==void 0){let d=(E=h[S])===null||E===void 0?void 0:E.GATE;if(d!==void 0&&d.call(this)===!1)return}return S}:function(){let h=this.LA(1);return p[h.tokenTypeIdx]}}else return o?function(p){let h=new Ia,E=p===void 0?0:p.length;for(let S=0;S<E;S++){let d=p?.[S].GATE;h.set(S,d===void 0||d.call(this))}let y=kc.call(this,a,l,h,s);return typeof y=="number"?y:void 0}:function(){let p=kc.call(this,a,l,$g,s);return typeof p=="number"?p:void 0}}buildLookaheadForOptional(t){let{prodOccurrence:r,rule:n,prodType:o,dynamicTokensEnabled:i}=t,a=this.dfas,s=this.logging,c=Xr(n,o,r),l=this.atn.decisionMap[c].decision,f=R(ca({maxLookahead:1,occurrence:r,prodType:o,rule:n}),p=>R(p,h=>h[0]));if(eE(f)&&f[0][0]&&!i){let p=f[0],h=ue(p);if(h.length===1&&v(h[0].categoryMatches)){let y=h[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===y}}else{let E=te(h,(y,S)=>(S!==void 0&&(y[S.tokenTypeIdx]=!0,L(S.categoryMatches,d=>{y[d]=!0})),y),{});return function(){let y=this.LA(1);return E[y.tokenTypeIdx]===!0}}}return function(){let p=kc.call(this,a,l,$g,s);return typeof p=="object"?!1:p===0}}};function eE(e,t=!0){let r=new Set;for(let n of e){let o=new Set;for(let i of n){if(i===void 0){if(t)break;return!1}let a=[i.tokenTypeIdx].concat(i.categoryMatches);for(let s of a)if(r.has(s)){if(!o.has(s))return!1}else r.add(s),o.add(s)}}return!0}function zI(e){let t=e.decisionStates.length,r=Array(t);for(let n=0;n<t;n++)r[n]=YI(e.decisionStates[n],n);return r}function kc(e,t,r,n){let o=e[t](r),i=o.start;if(i===void 0){let s=i4(o.atnStartState);i=nE(o,rE(s)),o.start=i}return XI.apply(this,[o,i,r,n])}function XI(e,t,r,n){let o=t,i=1,a=[],s=this.LA(i++);for(;;){let c=t4(o,s);if(c===void 0&&(c=JI.apply(this,[e,o,s,i,r,n])),c===Go)return e4(a,o,s);if(c.isAcceptState===!0)return c.prediction;o=c,a.push(s),s=this.LA(i++)}}function JI(e,t,r,n,o,i){let a=r4(t.configs,r,o);if(a.size===0)return tE(e,t,r,Go),Go;let s=rE(a),c=o4(a,o);if(c!==void 0)s.isAcceptState=!0,s.prediction=c,s.configs.uniqueAlt=c;else if(u4(a)){let u=Fd(a.alts);s.isAcceptState=!0,s.prediction=u,s.configs.uniqueAlt=u,QI.apply(this,[e,n,a.alts,i])}return s=tE(e,t,r,s),s}function QI(e,t,r,n){let o=[];for(let u=1;u<=t;u++)o.push(this.LA(u).tokenType);let i=e.atnStartState,a=i.rule,s=i.production,c=ZI({topLevelRule:a,ambiguityIndices:r,production:s,prefixPath:o});n(c)}function ZI(e){let t=R(e.prefixPath,o=>Wt(o)).join(", "),r=e.production.idx===0?"":e.production.idx,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${$I(e.production)}${r}> inside <${e.topLevelRule.name}> Rule,
147
+ For further details.`);this.skipValidations=U(r,"skipValidations")?r.skipValidations:De.skipValidations}};vo.DEFER_DEFINITION_ERRORS_HANDLING=!1;tm(vo,[la,da,Ea,ya,Ta,Sa,Ra,xa,Oa,Ua]);var Mo=class extends vo{constructor(t,r=De){let n=V(r);n.outputCst=!0,super(t,n)}};var Dg=Mt(Bg(),1);var Cc=(e,t)=>{for(let r=0;r<t.length;r++){let n=t[r],o=n[0],i=n[1];for(let a=o;a<=i;a++)e.add(a)}},_o=new Set([181,257,259,261,263,265,267,269,271,273,275,277,279,281,283,285,287,289,291,293,295,297,299,301,303,305,307,309,314,316,318,320,322,324,326,331,333,335,337,339,341,343,345,347,349,351,353,355,357,359,361,363,365,367,369,371,373,375,378,380,387,389,392,402,405,414,417,419,421,424,429,432,436,438,454,457,460,462,464,466,468,470,472,474,479,481,483,485,487,489,491,493,499,501,505,507,509,511,513,515,517,519,521,523,525,527,529,531,533,535,537,539,541,543,545,547,549,551,553,555,557,559,561,572,578,583,585,587,589,881,883,887,912,985,987,989,991,993,995,997,999,1001,1003,1005,1013,1016,1121,1123,1125,1127,1129,1131,1133,1135,1137,1139,1141,1143,1145,1147,1149,1151,1153,1163,1165,1167,1169,1171,1173,1175,1177,1179,1181,1183,1185,1187,1189,1191,1193,1195,1197,1199,1201,1203,1205,1207,1209,1211,1213,1215,1218,1220,1222,1224,1226,1228,1233,1235,1237,1239,1241,1243,1245,1247,1249,1251,1253,1255,1257,1259,1261,1263,1265,1267,1269,1271,1273,1275,1277,1279,1281,1283,1285,1287,1289,1291,1293,1295,1297,1299,1301,1303,1305,1307,1309,1311,1313,1315,1317,1319,1321,1323,1325,1327,7681,7683,7685,7687,7689,7691,7693,7695,7697,7699,7701,7703,7705,7707,7709,7711,7713,7715,7717,7719,7721,7723,7725,7727,7729,7731,7733,7735,7737,7739,7741,7743,7745,7747,7749,7751,7753,7755,7757,7759,7761,7763,7765,7767,7769,7771,7773,7775,7777,7779,7781,7783,7785,7787,7789,7791,7793,7795,7797,7799,7801,7803,7805,7807,7809,7811,7813,7815,7817,7819,7821,7823,7825,7827,7839,7841,7843,7845,7847,7849,7851,7853,7855,7857,7859,7861,7863,7865,7867,7869,7871,7873,7875,7877,7879,7881,7883,7885,7887,7889,7891,7893,7895,7897,7899,7901,7903,7905,7907,7909,7911,7913,7915,7917,7919,7921,7923,7925,7927,7929,7931,7933,8126,8458,8467,8495,8500,8505,8526,8580,11361,11368,11370,11372,11377,11393,11395,11397,11399,11401,11403,11405,11407,11409,11411,11413,11415,11417,11419,11421,11423,11425,11427,11429,11431,11433,11435,11437,11439,11441,11443,11445,11447,11449,11451,11453,11455,11457,11459,11461,11463,11465,11467,11469,11471,11473,11475,11477,11479,11481,11483,11485,11487,11489,11500,11502,11507,11559,11565,42561,42563,42565,42567,42569,42571,42573,42575,42577,42579,42581,42583,42585,42587,42589,42591,42593,42595,42597,42599,42601,42603,42605,42625,42627,42629,42631,42633,42635,42637,42639,42641,42643,42645,42647,42649,42651,42787,42789,42791,42793,42795,42797,42803,42805,42807,42809,42811,42813,42815,42817,42819,42821,42823,42825,42827,42829,42831,42833,42835,42837,42839,42841,42843,42845,42847,42849,42851,42853,42855,42857,42859,42861,42863,42874,42876,42879,42881,42883,42885,42887,42892,42894,42897,42903,42905,42907,42909,42911,42913,42915,42917,42919,42921,42927,42933,42935,42937,42939,42941,42943,42947,43002,119995,120779,748,750,884,890,1369,1600,2042,2074,2084,2088,2417,3654,3782,4348,6103,6211,6823,7544,8305,8319,11631,11823,12293,12347,40981,42508,42623,42864,42888,43471,43494,43632,43741,65392,94179,125259,170,186,443,660,1749,1791,1808,1969,2365,2384,2482,2493,2510,2556,2654,2749,2768,2809,2877,2929,2947,2972,3024,3133,3200,3261,3294,3389,3406,3517,3716,3749,3773,3840,4159,4193,4238,4696,4800,6108,6314,7418,12294,12348,12447,12543,13312,19968,42606,42895,42999,43259,43642,43697,43712,43714,43762,44032,64285,64318,67592,67644,68096,69415,69956,70006,70106,70108,70280,70461,70480,70751,70855,71236,71352,71935,72161,72163,72192,72250,72272,72349,72768,73030,73112,94032,94208,123214,126500,126503,126521,126523,126530,126535,126537,126539,126548,126551,126553,126555,126557,126559,126564,126590,131072,173824,177984,178208,183984,453,456,459,498,8124,8140,8188,256,258,260,262,264,266,268,270,272,274,276,278,280,282,284,286,288,290,292,294,296,298,300,302,304,306,308,310,313,315,317,319,321,323,325,327,330,332,334,336,338,340,342,344,346,348,350,352,354,356,358,360,362,364,366,368,370,372,374,379,381,388,418,420,425,428,437,444,452,455,458,461,463,465,467,469,471,473,475,478,480,482,484,486,488,490,492,494,497,500,506,508,510,512,514,516,518,520,522,524,526,528,530,532,534,536,538,540,542,544,546,548,550,552,554,556,558,560,562,577,584,586,588,590,880,882,886,895,902,908,975,984,986,988,990,992,994,996,998,1e3,1002,1004,1006,1012,1015,1120,1122,1124,1126,1128,1130,1132,1134,1136,1138,1140,1142,1144,1146,1148,1150,1152,1162,1164,1166,1168,1170,1172,1174,1176,1178,1180,1182,1184,1186,1188,1190,1192,1194,1196,1198,1200,1202,1204,1206,1208,1210,1212,1214,1219,1221,1223,1225,1227,1229,1232,1234,1236,1238,1240,1242,1244,1246,1248,1250,1252,1254,1256,1258,1260,1262,1264,1266,1268,1270,1272,1274,1276,1278,1280,1282,1284,1286,1288,1290,1292,1294,1296,1298,1300,1302,1304,1306,1308,1310,1312,1314,1316,1318,1320,1322,1324,1326,4295,4301,7680,7682,7684,7686,7688,7690,7692,7694,7696,7698,7700,7702,7704,7706,7708,7710,7712,7714,7716,7718,7720,7722,7724,7726,7728,7730,7732,7734,7736,7738,7740,7742,7744,7746,7748,7750,7752,7754,7756,7758,7760,7762,7764,7766,7768,7770,7772,7774,7776,7778,7780,7782,7784,7786,7788,7790,7792,7794,7796,7798,7800,7802,7804,7806,7808,7810,7812,7814,7816,7818,7820,7822,7824,7826,7828,7838,7840,7842,7844,7846,7848,7850,7852,7854,7856,7858,7860,7862,7864,7866,7868,7870,7872,7874,7876,7878,7880,7882,7884,7886,7888,7890,7892,7894,7896,7898,7900,7902,7904,7906,7908,7910,7912,7914,7916,7918,7920,7922,7924,7926,7928,7930,7932,7934,8025,8027,8029,8031,8450,8455,8469,8484,8486,8488,8517,8579,11360,11367,11369,11371,11378,11381,11394,11396,11398,11400,11402,11404,11406,11408,11410,11412,11414,11416,11418,11420,11422,11424,11426,11428,11430,11432,11434,11436,11438,11440,11442,11444,11446,11448,11450,11452,11454,11456,11458,11460,11462,11464,11466,11468,11470,11472,11474,11476,11478,11480,11482,11484,11486,11488,11490,11499,11501,11506,42560,42562,42564,42566,42568,42570,42572,42574,42576,42578,42580,42582,42584,42586,42588,42590,42592,42594,42596,42598,42600,42602,42604,42624,42626,42628,42630,42632,42634,42636,42638,42640,42642,42644,42646,42648,42650,42786,42788,42790,42792,42794,42796,42798,42802,42804,42806,42808,42810,42812,42814,42816,42818,42820,42822,42824,42826,42828,42830,42832,42834,42836,42838,42840,42842,42844,42846,42848,42850,42852,42854,42856,42858,42860,42862,42873,42875,42880,42882,42884,42886,42891,42893,42896,42898,42902,42904,42906,42908,42910,42912,42914,42916,42918,42920,42934,42936,42938,42940,42942,42946,119964,119970,120134,120778,12295,66369,66378,36,1423,1547,2555,2801,3065,3647,6107,43064,65020,65129,65284,123647,126128,95,8276,65343]),RI=[[97,122],[223,246],[248,255],[311,312],[328,329],[382,384],[396,397],[409,411],[426,427],[441,442],[445,447],[476,477],[495,496],[563,569],[575,576],[591,659],[661,687],[891,893],[940,974],[976,977],[981,983],[1007,1011],[1019,1020],[1072,1119],[1230,1231],[1376,1416],[4304,4346],[4349,4351],[5112,5117],[7296,7304],[7424,7467],[7531,7543],[7545,7578],[7829,7837],[7935,7943],[7952,7957],[7968,7975],[7984,7991],[8e3,8005],[8016,8023],[8032,8039],[8048,8061],[8064,8071],[8080,8087],[8096,8103],[8112,8116],[8118,8119],[8130,8132],[8134,8135],[8144,8147],[8150,8151],[8160,8167],[8178,8180],[8182,8183],[8462,8463],[8508,8509],[8518,8521],[11312,11358],[11365,11366],[11379,11380],[11382,11387],[11491,11492],[11520,11557],[42799,42801],[42865,42872],[42899,42901],[43824,43866],[43872,43879],[43888,43967],[64256,64262],[64275,64279],[65345,65370],[66600,66639],[66776,66811],[68800,68850],[71872,71903],[93792,93823],[119834,119859],[119886,119892],[119894,119911],[119938,119963],[119990,119993],[119997,120003],[120005,120015],[120042,120067],[120094,120119],[120146,120171],[120198,120223],[120250,120275],[120302,120327],[120354,120379],[120406,120431],[120458,120485],[120514,120538],[120540,120545],[120572,120596],[120598,120603],[120630,120654],[120656,120661],[120688,120712],[120714,120719],[120746,120770],[120772,120777],[125218,125251],[688,705],[710,721],[736,740],[1765,1766],[2036,2037],[7288,7293],[7468,7530],[7579,7615],[8336,8348],[11388,11389],[12337,12341],[12445,12446],[12540,12542],[42232,42237],[42652,42653],[42775,42783],[43e3,43001],[43763,43764],[43868,43871],[65438,65439],[92992,92995],[94099,94111],[94176,94177],[123191,123197],[13313,19893],[19969,40943],[44033,55203],[94209,100343],[131073,173782],[173825,177972],[177985,178205],[178209,183969],[183985,191456],[448,451],[1488,1514],[1519,1522],[1568,1599],[1601,1610],[1646,1647],[1649,1747],[1774,1775],[1786,1788],[1810,1839],[1869,1957],[1994,2026],[2048,2069],[2112,2136],[2144,2154],[2208,2228],[2230,2237],[2308,2361],[2392,2401],[2418,2432],[2437,2444],[2447,2448],[2451,2472],[2474,2480],[2486,2489],[2524,2525],[2527,2529],[2544,2545],[2565,2570],[2575,2576],[2579,2600],[2602,2608],[2610,2611],[2613,2614],[2616,2617],[2649,2652],[2674,2676],[2693,2701],[2703,2705],[2707,2728],[2730,2736],[2738,2739],[2741,2745],[2784,2785],[2821,2828],[2831,2832],[2835,2856],[2858,2864],[2866,2867],[2869,2873],[2908,2909],[2911,2913],[2949,2954],[2958,2960],[2962,2965],[2969,2970],[2974,2975],[2979,2980],[2984,2986],[2990,3001],[3077,3084],[3086,3088],[3090,3112],[3114,3129],[3160,3162],[3168,3169],[3205,3212],[3214,3216],[3218,3240],[3242,3251],[3253,3257],[3296,3297],[3313,3314],[3333,3340],[3342,3344],[3346,3386],[3412,3414],[3423,3425],[3450,3455],[3461,3478],[3482,3505],[3507,3515],[3520,3526],[3585,3632],[3634,3635],[3648,3653],[3713,3714],[3718,3722],[3724,3747],[3751,3760],[3762,3763],[3776,3780],[3804,3807],[3904,3911],[3913,3948],[3976,3980],[4096,4138],[4176,4181],[4186,4189],[4197,4198],[4206,4208],[4213,4225],[4352,4680],[4682,4685],[4688,4694],[4698,4701],[4704,4744],[4746,4749],[4752,4784],[4786,4789],[4792,4798],[4802,4805],[4808,4822],[4824,4880],[4882,4885],[4888,4954],[4992,5007],[5121,5740],[5743,5759],[5761,5786],[5792,5866],[5873,5880],[5888,5900],[5902,5905],[5920,5937],[5952,5969],[5984,5996],[5998,6e3],[6016,6067],[6176,6210],[6212,6264],[6272,6276],[6279,6312],[6320,6389],[6400,6430],[6480,6509],[6512,6516],[6528,6571],[6576,6601],[6656,6678],[6688,6740],[6917,6963],[6981,6987],[7043,7072],[7086,7087],[7098,7141],[7168,7203],[7245,7247],[7258,7287],[7401,7404],[7406,7411],[7413,7414],[8501,8504],[11568,11623],[11648,11670],[11680,11686],[11688,11694],[11696,11702],[11704,11710],[11712,11718],[11720,11726],[11728,11734],[11736,11742],[12353,12438],[12449,12538],[12549,12591],[12593,12686],[12704,12730],[12784,12799],[40960,40980],[40982,42124],[42192,42231],[42240,42507],[42512,42527],[42538,42539],[42656,42725],[43003,43009],[43011,43013],[43015,43018],[43020,43042],[43072,43123],[43138,43187],[43250,43255],[43261,43262],[43274,43301],[43312,43334],[43360,43388],[43396,43442],[43488,43492],[43495,43503],[43514,43518],[43520,43560],[43584,43586],[43588,43595],[43616,43631],[43633,43638],[43646,43695],[43701,43702],[43705,43709],[43739,43740],[43744,43754],[43777,43782],[43785,43790],[43793,43798],[43808,43814],[43816,43822],[43968,44002],[55216,55238],[55243,55291],[63744,64109],[64112,64217],[64287,64296],[64298,64310],[64312,64316],[64320,64321],[64323,64324],[64326,64433],[64467,64829],[64848,64911],[64914,64967],[65008,65019],[65136,65140],[65142,65276],[65382,65391],[65393,65437],[65440,65470],[65474,65479],[65482,65487],[65490,65495],[65498,65500],[65536,65547],[65549,65574],[65576,65594],[65596,65597],[65599,65613],[65616,65629],[65664,65786],[66176,66204],[66208,66256],[66304,66335],[66349,66368],[66370,66377],[66384,66421],[66432,66461],[66464,66499],[66504,66511],[66640,66717],[66816,66855],[66864,66915],[67072,67382],[67392,67413],[67424,67431],[67584,67589],[67594,67637],[67639,67640],[67647,67669],[67680,67702],[67712,67742],[67808,67826],[67828,67829],[67840,67861],[67872,67897],[67968,68023],[68030,68031],[68112,68115],[68117,68119],[68121,68149],[68192,68220],[68224,68252],[68288,68295],[68297,68324],[68352,68405],[68416,68437],[68448,68466],[68480,68497],[68608,68680],[68864,68899],[69376,69404],[69424,69445],[69600,69622],[69635,69687],[69763,69807],[69840,69864],[69891,69926],[69968,70002],[70019,70066],[70081,70084],[70144,70161],[70163,70187],[70272,70278],[70282,70285],[70287,70301],[70303,70312],[70320,70366],[70405,70412],[70415,70416],[70419,70440],[70442,70448],[70450,70451],[70453,70457],[70493,70497],[70656,70708],[70727,70730],[70784,70831],[70852,70853],[71040,71086],[71128,71131],[71168,71215],[71296,71338],[71424,71450],[71680,71723],[72096,72103],[72106,72144],[72203,72242],[72284,72329],[72384,72440],[72704,72712],[72714,72750],[72818,72847],[72960,72966],[72968,72969],[72971,73008],[73056,73061],[73063,73064],[73066,73097],[73440,73458],[73728,74649],[74880,75075],[77824,78894],[82944,83526],[92160,92728],[92736,92766],[92880,92909],[92928,92975],[93027,93047],[93053,93071],[93952,94026],[100352,101106],[110592,110878],[110928,110930],[110948,110951],[110960,111355],[113664,113770],[113776,113788],[113792,113800],[113808,113817],[123136,123180],[123584,123627],[124928,125124],[126464,126467],[126469,126495],[126497,126498],[126505,126514],[126516,126519],[126541,126543],[126545,126546],[126561,126562],[126567,126570],[126572,126578],[126580,126583],[126585,126588],[126592,126601],[126603,126619],[126625,126627],[126629,126633],[126635,126651],[194560,195101],[8072,8079],[8088,8095],[8104,8111],[65,90],[192,214],[216,222],[376,377],[385,386],[390,391],[393,395],[398,401],[403,404],[406,408],[412,413],[415,416],[422,423],[430,431],[433,435],[439,440],[502,504],[570,571],[573,574],[579,582],[904,906],[910,911],[913,929],[931,939],[978,980],[1017,1018],[1021,1071],[1216,1217],[1329,1366],[4256,4293],[5024,5109],[7312,7354],[7357,7359],[7944,7951],[7960,7965],[7976,7983],[7992,7999],[8008,8013],[8040,8047],[8120,8123],[8136,8139],[8152,8155],[8168,8172],[8184,8187],[8459,8461],[8464,8466],[8473,8477],[8490,8493],[8496,8499],[8510,8511],[11264,11310],[11362,11364],[11373,11376],[11390,11392],[42877,42878],[42922,42926],[42928,42932],[42948,42950],[65313,65338],[66560,66599],[66736,66771],[68736,68786],[71840,71871],[93760,93791],[119808,119833],[119860,119885],[119912,119937],[119966,119967],[119973,119974],[119977,119980],[119982,119989],[120016,120041],[120068,120069],[120071,120074],[120077,120084],[120086,120092],[120120,120121],[120123,120126],[120128,120132],[120138,120144],[120172,120197],[120224,120249],[120276,120301],[120328,120353],[120380,120405],[120432,120457],[120488,120512],[120546,120570],[120604,120628],[120662,120686],[120720,120744],[125184,125217],[5870,5872],[8544,8578],[8581,8584],[12321,12329],[12344,12346],[42726,42735],[65856,65908],[66513,66517],[74752,74862],[162,165],[2046,2047],[2546,2547],[8352,8383],[65504,65505],[65509,65510],[73693,73696],[8255,8256],[65075,65076],[65101,65103]];Cc(_o,RI);var bc=new Set([1471,1479,1648,1809,2045,2362,2364,2381,2433,2492,2509,2558,2620,2641,2677,2748,2765,2817,2876,2879,2893,2902,2946,3008,3021,3072,3076,3201,3260,3263,3270,3405,3530,3542,3633,3761,3893,3895,3897,4038,4226,4237,4253,6086,6109,6313,6450,6683,6742,6752,6754,6783,6964,6972,6978,7142,7149,7405,7412,8417,11647,42607,43010,43014,43019,43263,43443,43493,43587,43596,43644,43696,43713,43766,44005,44008,44013,64286,66045,66272,68159,69633,70003,70196,70206,70367,70464,70726,70750,70842,71229,71339,71341,71351,72160,72263,72767,73018,73031,73109,73111,94031,121461,121476,173,1564,1757,1807,2274,6158,65279,69821,69837,917505]),xI=[[768,879],[1155,1159],[1425,1469],[1473,1474],[1476,1477],[1552,1562],[1611,1631],[1750,1756],[1759,1764],[1767,1768],[1770,1773],[1840,1866],[1958,1968],[2027,2035],[2070,2073],[2075,2083],[2085,2087],[2089,2093],[2137,2139],[2259,2273],[2275,2306],[2369,2376],[2385,2391],[2402,2403],[2497,2500],[2530,2531],[2561,2562],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2753,2757],[2759,2760],[2786,2787],[2810,2815],[2881,2884],[2914,2915],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3170,3171],[3276,3277],[3298,3299],[3328,3329],[3387,3388],[3393,3396],[3426,3427],[3538,3540],[3636,3642],[3655,3662],[3764,3772],[3784,3789],[3864,3865],[3953,3966],[3968,3972],[3974,3975],[3981,3991],[3993,4028],[4141,4144],[4146,4151],[4153,4154],[4157,4158],[4184,4185],[4190,4192],[4209,4212],[4229,4230],[4957,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6089,6099],[6155,6157],[6277,6278],[6432,6434],[6439,6440],[6457,6459],[6679,6680],[6744,6750],[6757,6764],[6771,6780],[6832,6845],[6912,6915],[6966,6970],[7019,7027],[7040,7041],[7074,7077],[7080,7081],[7083,7085],[7144,7145],[7151,7153],[7212,7219],[7222,7223],[7376,7378],[7380,7392],[7394,7400],[7416,7417],[7616,7673],[7675,7679],[8400,8412],[8421,8432],[11503,11505],[11744,11775],[12330,12333],[12441,12442],[42612,42621],[42654,42655],[42736,42737],[43045,43046],[43204,43205],[43232,43249],[43302,43309],[43335,43345],[43392,43394],[43446,43449],[43452,43453],[43561,43566],[43569,43570],[43573,43574],[43698,43700],[43703,43704],[43710,43711],[43756,43757],[65024,65039],[65056,65071],[66422,66426],[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68325,68326],[68900,68903],[69446,69456],[69688,69702],[69759,69761],[69811,69814],[69817,69818],[69888,69890],[69927,69931],[69933,69940],[70016,70017],[70070,70078],[70089,70092],[70191,70193],[70198,70199],[70371,70378],[70400,70401],[70459,70460],[70502,70508],[70512,70516],[70712,70719],[70722,70724],[70835,70840],[70847,70848],[70850,70851],[71090,71093],[71100,71101],[71103,71104],[71132,71133],[71219,71226],[71231,71232],[71344,71349],[71453,71455],[71458,71461],[71463,71467],[71727,71735],[71737,71738],[72148,72151],[72154,72155],[72193,72202],[72243,72248],[72251,72254],[72273,72278],[72281,72283],[72330,72342],[72344,72345],[72752,72758],[72760,72765],[72850,72871],[72874,72880],[72882,72883],[72885,72886],[73009,73014],[73020,73021],[73023,73029],[73104,73105],[73459,73460],[92912,92916],[92976,92982],[94095,94098],[113821,113822],[119143,119145],[119163,119170],[119173,119179],[119210,119213],[119362,119364],[121344,121398],[121403,121452],[121499,121503],[121505,121519],[122880,122886],[122888,122904],[122907,122913],[122915,122916],[122918,122922],[123184,123190],[123628,123631],[125136,125142],[125252,125258],[917760,917999],[1536,1541],[8203,8207],[8234,8238],[8288,8292],[8294,8303],[65529,65531],[78896,78904],[113824,113827],[119155,119162],[917536,917631]];Cc(bc,xI);var OI=[[0,8],[14,27],[127,159],[768,879],[6832,6911],[7616,7679],[8400,8447],[65056,65071],[48,57]];Cc(bc,OI);var Fg=new Set((function*(){yield*_o,yield*bc})());var Ic={};function jg(e){let t=e;return Object.keys(Ic).forEach(r=>{let n=Ic[r],o=new RegExp(`{{${r}}}`,"g");t=t.replace(o,n)}),t}function ve(e,t){Ic[e]=jg(t)}function Qe(e,t){let r=jg(e);return new RegExp(r,t)}ve("Digits","[0-9]([0-9_]*[0-9])?");ve("ExponentPart","[eE][+-]?{{Digits}}");ve("HexDigit","[0-9a-fA-F]");ve("HexDigits","{{HexDigit}}(({{HexDigit}}|'_')*{{HexDigit}})?");ve("FloatTypeSuffix","[fFdD]");ve("LineTerminator","(\\x0A|(\\x0D(\\x0A)?))");ve("UnicodeMarker","uu*");ve("UnicodeEscape","\\\\{{UnicodeMarker}}{{HexDigit}}{4}");ve("RawInputCharacter","\\\\{{UnicodeMarker}}[0-9a-fA-F]{4}");ve("UnicodeInputCharacter","({{UnicodeEscape}}|{{RawInputCharacter}})");ve("OctalDigit","[0-7]");ve("ZeroToThree","[0-3]");ve("OctalEscape","\\\\({{OctalDigit}}|{{ZeroToThree}}?{{OctalDigit}}{2})");ve("EscapeSequence",`\\\\[bstnfr"'\\\\]|{{OctalEscape}}`);ve("StringCharacter",'(?:(?:{{EscapeSequence}})|{{UnicodeEscape}}|(?!["\\\\]).)');ve("TextBlockCharacter","(?:(?:{{EscapeSequence}})|{{UnicodeEscape}}|(?!\\\\).|\\\\?{{LineTerminator}})");function AI(e,t){let r=t,n=e.codePointAt(r);for(_o.has(n)&&(r++,n>65535&&r++,n=e.codePointAt(r));Fg.has(n);)r++,n>65535&&r++,n=e.codePointAt(r);return r===t?null:[e.substring(t,r)]}var zr=Wr({name:"Identifier",pattern:{exec:AI},line_breaks:!1,start_chars_hint:Array.from(_o,e=>String.fromCharCode(e))}),Vt={modes:{global:[],stringTemplate:[],textBlockTemplate:[]},defaultMode:"global"},Gg=Object.keys(Vt.modes),Ze={};function O(e,t=Gg){e.label||(typeof e.pattern=="string"?e.label=`'${e.pattern}'`:e.pattern instanceof RegExp&&(e.label=`'${e.name}'`));let r=Wr(e);return t.forEach(n=>Vt.modes[n].push(r)),Ze[e.name]=r,r}function qt(e){return e.longer_alt=zr,O(e)}var UI=O({name:"RestrictedKeyword",pattern:D.NA}),Hg=O({name:"Keyword",pattern:D.NA}),ot=O({name:"AssignmentOperator",pattern:D.NA}),Re=O({name:"BinaryOperator",pattern:D.NA}),Wn=O({name:"UnaryPrefixOperator",pattern:D.NA}),Ca=O({name:"UnaryPrefixOperatorNotPlusMinus",pattern:D.NA}),Kg=O({name:"UnarySuffixOperator",pattern:D.NA}),it=O({name:"Separators",pattern:D.NA});O({name:"WhiteSpace",pattern:Qe("[\\x09\\x20\\x0C]|{{LineTerminator}}"),group:D.SKIPPED});O({name:"LineComment",pattern:/\/\/[^\n\r]*/,group:"comments"});O({name:"TraditionalComment",pattern:/\/\*([^*]|\*(?!\/))*\*\//,group:"comments"});O({name:"BinaryLiteral",pattern:/0[bB][01]([01_]*[01])?[lL]?/});O({name:"FloatLiteral",pattern:Qe("{{Digits}}\\.({{Digits}})?({{ExponentPart}})?({{FloatTypeSuffix}})?|\\.{{Digits}}({{ExponentPart}})?({{FloatTypeSuffix}})?|{{Digits}}{{ExponentPart}}({{FloatTypeSuffix}})?|{{Digits}}({{ExponentPart}})?{{FloatTypeSuffix}}")});O({name:"OctalLiteral",pattern:/0_*[0-7]([0-7_]*[0-7])?[lL]?/});O({name:"HexFloatLiteral",pattern:Qe("0[xX]({{HexDigits}}\\.?|({{HexDigits}})?\\.{{HexDigits}})[pP][+-]?{{Digits}}[fFdD]?")});O({name:"HexLiteral",pattern:/0[xX][0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?[lL]?/});O({name:"DecimalLiteral",pattern:Qe("(0|[1-9](_+{{Digits}}|({{Digits}})?))[lL]?")});O({name:"CharLiteral",pattern:Qe("'(?:[^\\\\']|(?:(?:{{EscapeSequence}})|{{UnicodeInputCharacter}}))'")});O({name:"TextBlock",pattern:Qe('"""[\\x09\\x20\\x0C]*{{LineTerminator}}{{TextBlockCharacter}}*?"""')});O({name:"TextBlockTemplateBegin",pattern:Qe('"""{{LineTerminator}}{{TextBlockCharacter}}*?\\\\\\{'),push_mode:"textBlockTemplate"});O({name:"TextBlockTemplateEnd",pattern:Qe('\\}{{TextBlockCharacter}}*?"""'),pop_mode:!0},["textBlockTemplate"]);O({name:"StringLiteral",pattern:Qe('"{{StringCharacter}}*?"')});O({name:"StringTemplateBegin",pattern:Qe('"{{StringCharacter}}*?\\\\\\{'),push_mode:"stringTemplate"});O({name:"StringTemplateEnd",pattern:Qe('\\}{{StringCharacter}}*?"'),pop_mode:!0},["stringTemplate"]);O({name:"StringTemplateMid",pattern:Qe("\\}{{StringCharacter}}*?\\\\\\{")},["stringTemplate"]);O({name:"TextBlockTemplateMid",pattern:Qe("\\}{{TextBlockCharacter}}*?\\\\\\{")},["textBlockTemplate"]);var NI=["open","module","requires","transitive","exports","opens","to","uses","provides","when","with","sealed","non-sealed","permits"];Wg(NI).forEach(e=>{qt({name:e[0].toUpperCase()+(0,Dg.default)(e.substr(1)),pattern:e,categories:[zr,UI]})});var CI=["abstract","continue","for","new","switch","assert","default","if","package","synchronized","boolean","do","goto","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while",["_","underscore"]];Wg(CI).forEach(e=>{let t=Array.isArray(e),r=t?e[1]:e,n=t?e[0]:e,o={name:r[0].toUpperCase()+r.substr(1),pattern:n,categories:Hg};t&&(o.label=`'${r}'`),qt(o)});qt({name:"Instanceof",pattern:"instanceof",categories:[Hg,Re]});qt({name:"Var",pattern:"var",categories:zr});qt({name:"Yield",pattern:"yield",categories:zr});qt({name:"Record",pattern:"record",categories:zr});qt({name:"True",pattern:"true"});qt({name:"False",pattern:"false"});qt({name:"Null",pattern:"null"});O({name:"At",pattern:"@",categories:[it]});O({name:"Arrow",pattern:"->"});O({name:"DotDotDot",pattern:"...",categories:[it]});O({name:"Dot",pattern:".",categories:[it]});O({name:"Comma",pattern:",",categories:[it]});O({name:"Semicolon",pattern:";",categories:[it]});O({name:"ColonColon",pattern:"::",categories:[it]});O({name:"Colon",pattern:":"});O({name:"QuestionMark",pattern:"?"});O({name:"LBrace",pattern:"(",categories:[it]});O({name:"RBrace",pattern:")",categories:[it]});O({name:"LCurly",pattern:"{",categories:[it],push_mode:Vt.defaultMode});O({name:"RCurly",pattern:"}",categories:[it],pop_mode:!0},[Vt.defaultMode]);O({name:"LSquare",pattern:"[",categories:[it]});O({name:"RSquare",pattern:"]",categories:[it]});O({name:"MinusMinus",pattern:"--",categories:[Wn,Kg,Ca]});O({name:"PlusPlus",pattern:"++",categories:[Wn,Kg,Ca]});O({name:"Complement",pattern:"~",categories:[Wn,Ca]});O({name:"LessEquals",pattern:"<=",categories:[Re]});O({name:"LessLessEquals",pattern:"<<=",categories:[ot]});O({name:"Less",pattern:"<",categories:[Re]});O({name:"GreaterEquals",pattern:">=",categories:[Re]});O({name:"GreaterGreaterEquals",pattern:">>=",categories:[ot]});O({name:"GreaterGreaterGreaterEquals",pattern:">>>=",categories:[ot]});O({name:"Greater",pattern:">",categories:[Re]});O({name:"EqualsEquals",pattern:"==",categories:[Re]});O({name:"Equals",pattern:"=",categories:[Re,ot]});O({name:"MinusEquals",pattern:"-=",categories:[ot]});O({name:"Minus",pattern:"-",categories:[Re,Wn]});O({name:"PlusEquals",pattern:"+=",categories:[ot]});O({name:"Plus",pattern:"+",categories:[Re,Wn]});O({name:"AndAnd",pattern:"&&",categories:[Re]});O({name:"AndEquals",pattern:"&=",categories:[ot]});O({name:"And",pattern:"&",categories:[Re]});O({name:"XorEquals",pattern:"^=",categories:[ot]});O({name:"Xor",pattern:"^",categories:[Re]});O({name:"NotEquals",pattern:"!=",categories:[Re]});O({name:"OrOr",pattern:"||",categories:[Re]});O({name:"OrEquals",pattern:"|=",categories:[ot]});O({name:"Or",pattern:"|",categories:[Re]});O({name:"MultiplyEquals",pattern:"*=",categories:[ot]});O({name:"Star",pattern:"*",categories:[Re]});O({name:"DivideEquals",pattern:"/=",categories:[ot]});O({name:"Divide",pattern:"/",categories:[Re]});O({name:"ModuloEquals",pattern:"%=",categories:[ot]});O({name:"Modulo",pattern:"%",categories:[Re]});O({name:"Not",pattern:"!",categories:[Wn,Ca]});Gg.forEach(e=>Vt.modes[e].push(zr));Ze.Identifier=zr;function Wg(e){return e.sort((t,r)=>r.length-t.length)}function Bo(){return(typeof process<"u"&&process.env&&process.env["prettier-java-development-mode"]==="enabled")===!1}var Vg=new D(Vt,{ensureOptimizations:!0,skipValidations:Bo()});function Xr(e,t,r){return`${e.name}_${t}_${r}`}var Ur=1,bI=2,qg=4,Yg=5;var Yn=7,II=8,PI=9,vI=10,MI=11,zg=12,Fo=class{constructor(t){this.target=t}isEpsilon(){return!1}},Vn=class extends Fo{constructor(t,r){super(t),this.tokenType=r}},Do=class extends Fo{constructor(t){super(t)}isEpsilon(){return!0}},qn=class extends Fo{constructor(t,r,n){super(t),this.rule=r,this.followState=n}isEpsilon(){return!0}};function Xg(e){let t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};kI(t,e);let r=e.length;for(let n=0;n<r;n++){let o=e[n],i=Jr(t,o,o);i!==void 0&&VI(t,o,i)}return t}function kI(e,t){let r=t.length;for(let n=0;n<r;n++){let o=t[n],i=xe(e,o,void 0,{type:bI}),a=xe(e,o,void 0,{type:Yn});i.stop=a,e.ruleToStartState.set(o,i),e.ruleToStopState.set(o,a)}}function Jg(e,t,r){return r instanceof M?Pc(e,t,r.terminalType,r):r instanceof B?WI(e,t,r):r instanceof H?DI(e,t,r):r instanceof F?jI(e,t,r):r instanceof w?wI(e,t,r):r instanceof G?_I(e,t,r):r instanceof Y?BI(e,t,r):r instanceof z?FI(e,t,r):Jr(e,t,r)}function wI(e,t,r){let n=xe(e,t,r,{type:Yg});Nr(e,n);let o=zn(e,t,n,r,Jr(e,t,r));return Zg(e,t,r,o)}function _I(e,t,r){let n=xe(e,t,r,{type:Yg});Nr(e,n);let o=zn(e,t,n,r,Jr(e,t,r)),i=Pc(e,t,r.separator,r);return Zg(e,t,r,o,i)}function BI(e,t,r){let n=xe(e,t,r,{type:qg});Nr(e,n);let o=zn(e,t,n,r,Jr(e,t,r));return Qg(e,t,r,o)}function FI(e,t,r){let n=xe(e,t,r,{type:qg});Nr(e,n);let o=zn(e,t,n,r,Jr(e,t,r)),i=Pc(e,t,r.separator,r);return Qg(e,t,r,o,i)}function DI(e,t,r){let n=xe(e,t,r,{type:Ur});Nr(e,n);let o=R(r.definition,a=>Jg(e,t,a));return zn(e,t,n,r,...o)}function jI(e,t,r){let n=xe(e,t,r,{type:Ur});Nr(e,n);let o=zn(e,t,n,r,Jr(e,t,r));return GI(e,t,r,o)}function Jr(e,t,r){let n=Se(R(r.definition,o=>Jg(e,t,o)),o=>o!==void 0);return n.length===1?n[0]:n.length===0?void 0:KI(e,n)}function Qg(e,t,r,n,o){let i=n.left,a=n.right,s=xe(e,t,r,{type:MI});Nr(e,s);let c=xe(e,t,r,{type:zg});return i.loopback=s,c.loopback=s,e.decisionMap[Xr(t,o?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s,de(a,s),o===void 0?(de(s,i),de(s,c)):(de(s,c),de(s,o.left),de(o.right,i)),{left:i,right:c}}function Zg(e,t,r,n,o){let i=n.left,a=n.right,s=xe(e,t,r,{type:vI});Nr(e,s);let c=xe(e,t,r,{type:zg}),u=xe(e,t,r,{type:PI});return s.loopback=u,c.loopback=u,de(s,i),de(s,c),de(a,u),o!==void 0?(de(u,c),de(u,o.left),de(o.right,i)):de(u,s),e.decisionMap[Xr(t,o?"RepetitionWithSeparator":"Repetition",r.idx)]=s,{left:s,right:c}}function GI(e,t,r,n){let o=n.left,i=n.right;return de(o,i),e.decisionMap[Xr(t,"Option",r.idx)]=o,n}function Nr(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function zn(e,t,r,n,...o){let i=xe(e,t,n,{type:II,start:r});r.end=i;for(let s of o)s!==void 0?(de(r,s.left),de(s.right,i)):de(r,i);let a={left:r,right:i};return e.decisionMap[Xr(t,HI(n),n.idx)]=r,a}function HI(e){if(e instanceof H)return"Alternation";if(e instanceof F)return"Option";if(e instanceof w)return"Repetition";if(e instanceof G)return"RepetitionWithSeparator";if(e instanceof Y)return"RepetitionMandatory";if(e instanceof z)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function KI(e,t){let r=t.length;for(let i=0;i<r-1;i++){let a=t[i],s;a.left.transitions.length===1&&(s=a.left.transitions[0]);let c=s instanceof qn,u=s,l=t[i+1].left;a.left.type===Ur&&a.right.type===Ur&&s!==void 0&&(c&&u.followState===a.right||s.target===a.right)?(c?u.followState=l:s.target=l,qI(e,a.right)):de(a.right,l)}let n=t[0],o=t[r-1];return{left:n.left,right:o.right}}function Pc(e,t,r,n){let o=xe(e,t,n,{type:Ur}),i=xe(e,t,n,{type:Ur});return vc(o,new Vn(i,r)),{left:o,right:i}}function WI(e,t,r){let n=r.referencedRule,o=e.ruleToStartState.get(n),i=xe(e,t,r,{type:Ur}),a=xe(e,t,r,{type:Ur}),s=new qn(o,n,a);return vc(i,s),{left:i,right:a}}function VI(e,t,r){let n=e.ruleToStartState.get(t);de(n,r.left);let o=e.ruleToStopState.get(t);return de(r.right,o),{left:n,right:o}}function de(e,t){let r=new Do(t);vc(e,r)}function xe(e,t,r,n){let o=Object.assign({atn:e,production:r,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},n);return e.states.push(o),o}function vc(e,t){e.transitions.length===0&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}function qI(e,t){e.states.splice(e.states.indexOf(t),1)}var jo={},Xn=class{constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){let r=Mc(t);r in this.map||(this.map[r]=this.configs.length,this.configs.push(t))}get elements(){return this.configs}get alts(){return R(this.configs,t=>t.alt)}get key(){let t="";for(let r in this.map)t+=r+":";return t}};function Mc(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(r=>r.stateNumber.toString()).join("_")}`}function YI(e,t){let r={};return n=>{let o=n.toString(),i=r[o];return i!==void 0||(i={atnStartState:e,decision:t,states:{}},r[o]=i),i}}var ba=class{constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,r){this.predicates[t]=r}toString(){let t="",r=this.predicates.length;for(let n=0;n<r;n++)t+=this.predicates[n]===!0?"1":"0";return t}},$g=new ba,Go=class extends Yr{constructor(t){var r;super(),this.logging=(r=t?.logging)!==null&&r!==void 0?r:(n=>console.log(n))}initialize(t){this.atn=Xg(t.rules),this.dfas=zI(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:r,rule:n,hasPredicates:o,dynamicTokensEnabled:i}=t,a=this.dfas,s=this.logging,c=Xr(n,"Alternation",r),l=this.atn.decisionMap[c].decision,f=R(sa({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:n}),p=>R(p,h=>h[0]));if(eE(f,!1)&&!i){let p=te(f,(h,E,y)=>(L(E,S=>{S&&(h[S.tokenTypeIdx]=y,L(S.categoryMatches,d=>{h[d]=y}))}),h),{});return o?function(h){var E;let y=this.LA(1),S=p[y.tokenTypeIdx];if(h!==void 0&&S!==void 0){let d=(E=h[S])===null||E===void 0?void 0:E.GATE;if(d!==void 0&&d.call(this)===!1)return}return S}:function(){let h=this.LA(1);return p[h.tokenTypeIdx]}}else return o?function(p){let h=new ba,E=p===void 0?0:p.length;for(let S=0;S<E;S++){let d=p?.[S].GATE;h.set(S,d===void 0||d.call(this))}let y=kc.call(this,a,l,h,s);return typeof y=="number"?y:void 0}:function(){let p=kc.call(this,a,l,$g,s);return typeof p=="number"?p:void 0}}buildLookaheadForOptional(t){let{prodOccurrence:r,rule:n,prodType:o,dynamicTokensEnabled:i}=t,a=this.dfas,s=this.logging,c=Xr(n,o,r),l=this.atn.decisionMap[c].decision,f=R(sa({maxLookahead:1,occurrence:r,prodType:o,rule:n}),p=>R(p,h=>h[0]));if(eE(f)&&f[0][0]&&!i){let p=f[0],h=ue(p);if(h.length===1&&v(h[0].categoryMatches)){let y=h[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===y}}else{let E=te(h,(y,S)=>(S!==void 0&&(y[S.tokenTypeIdx]=!0,L(S.categoryMatches,d=>{y[d]=!0})),y),{});return function(){let y=this.LA(1);return E[y.tokenTypeIdx]===!0}}}return function(){let p=kc.call(this,a,l,$g,s);return typeof p=="object"?!1:p===0}}};function eE(e,t=!0){let r=new Set;for(let n of e){let o=new Set;for(let i of n){if(i===void 0){if(t)break;return!1}let a=[i.tokenTypeIdx].concat(i.categoryMatches);for(let s of a)if(r.has(s)){if(!o.has(s))return!1}else r.add(s),o.add(s)}}return!0}function zI(e){let t=e.decisionStates.length,r=Array(t);for(let n=0;n<t;n++)r[n]=YI(e.decisionStates[n],n);return r}function kc(e,t,r,n){let o=e[t](r),i=o.start;if(i===void 0){let s=i4(o.atnStartState);i=nE(o,rE(s)),o.start=i}return XI.apply(this,[o,i,r,n])}function XI(e,t,r,n){let o=t,i=1,a=[],s=this.LA(i++);for(;;){let c=t4(o,s);if(c===void 0&&(c=JI.apply(this,[e,o,s,i,r,n])),c===jo)return e4(a,o,s);if(c.isAcceptState===!0)return c.prediction;o=c,a.push(s),s=this.LA(i++)}}function JI(e,t,r,n,o,i){let a=r4(t.configs,r,o);if(a.size===0)return tE(e,t,r,jo),jo;let s=rE(a),c=o4(a,o);if(c!==void 0)s.isAcceptState=!0,s.prediction=c,s.configs.uniqueAlt=c;else if(u4(a)){let u=Fd(a.alts);s.isAcceptState=!0,s.prediction=u,s.configs.uniqueAlt=u,QI.apply(this,[e,n,a.alts,i])}return s=tE(e,t,r,s),s}function QI(e,t,r,n){let o=[];for(let u=1;u<=t;u++)o.push(this.LA(u).tokenType);let i=e.atnStartState,a=i.rule,s=i.production,c=ZI({topLevelRule:a,ambiguityIndices:r,production:s,prefixPath:o});n(c)}function ZI(e){let t=R(e.prefixPath,o=>Wt(o)).join(", "),r=e.production.idx===0?"":e.production.idx,n=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${$I(e.production)}${r}> inside <${e.topLevelRule.name}> Rule,
148
148
  <${t}> may appears as a prefix path in all these alternatives.
149
149
  `;return n=n+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
150
- For Further details.`,n}function $I(e){if(e instanceof B)return"SUBRULE";if(e instanceof F)return"OPTION";if(e instanceof H)return"OR";if(e instanceof Y)return"AT_LEAST_ONE";if(e instanceof z)return"AT_LEAST_ONE_SEP";if(e instanceof G)return"MANY_SEP";if(e instanceof w)return"MANY";if(e instanceof M)return"CONSUME";throw Error("non exhaustive match")}function e4(e,t,r){let n=Ue(t.configs.elements,i=>i.state.transitions),o=Vd(n.filter(i=>i instanceof Vn).map(i=>i.tokenType),i=>i.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:o,tokenPath:e}}function t4(e,t){return e.edges[t.tokenTypeIdx]}function r4(e,t,r){let n=new Xn,o=[];for(let a of e.elements){if(r.is(a.alt)===!1)continue;if(a.state.type===Yn){o.push(a);continue}let s=a.state.transitions.length;for(let c=0;c<s;c++){let u=a.state.transitions[c],l=n4(u,t);l!==void 0&&n.add({state:l,alt:a.alt,stack:a.stack})}}let i;if(o.length===0&&n.size===1&&(i=n),i===void 0){i=new Xn;for(let a of n.elements)Pa(a,i)}if(o.length>0&&!s4(i))for(let a of o)i.add(a);return i}function n4(e,t){if(e instanceof Vn&&P(t,e.tokenType))return e.target}function o4(e,t){let r;for(let n of e.elements)if(t.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function rE(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function tE(e,t,r,n){return n=nE(e,n),t.edges[r.tokenTypeIdx]=n,n}function nE(e,t){if(t===Go)return t;let r=t.configs.key,n=e.states[r];return n!==void 0?n:(t.configs.finalize(),e.states[r]=t,t)}function i4(e){let t=new Xn,r=e.transitions.length;for(let n=0;n<r;n++){let i={state:e.transitions[n].target,alt:n,stack:[]};Pa(i,t)}return t}function Pa(e,t){let r=e.state;if(r.type===Yn){if(e.stack.length>0){let o=[...e.stack],a={state:o.pop(),alt:e.alt,stack:o};Pa(a,t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);let n=r.transitions.length;for(let o=0;o<n;o++){let i=r.transitions[o],a=a4(e,i);a!==void 0&&Pa(a,t)}}function a4(e,t){if(t instanceof jo)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof qn){let r=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:r}}}function s4(e){for(let t of e.elements)if(t.state.type===Yn)return!0;return!1}function c4(e){for(let t of e.elements)if(t.state.type!==Yn)return!1;return!0}function u4(e){if(c4(e))return!0;let t=l4(e.elements);return f4(t)&&!p4(t)}function l4(e){let t=new Map;for(let r of e){let n=Mc(r,!1),o=t.get(n);o===void 0&&(o={},t.set(n,o)),o[r.alt]=!0}return t}function f4(e){for(let t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}function p4(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}function oE(e,t){e.RULE("literal",()=>{e.OR([{ALT:()=>e.SUBRULE(e.integerLiteral)},{ALT:()=>e.SUBRULE(e.floatingPointLiteral)},{ALT:()=>e.SUBRULE(e.booleanLiteral)},{ALT:()=>e.CONSUME(t.CharLiteral)},{ALT:()=>e.CONSUME(t.TextBlock)},{ALT:()=>e.CONSUME(t.StringLiteral)},{ALT:()=>e.CONSUME(t.Null)}])}),e.RULE("integerLiteral",()=>{e.OR([{ALT:()=>e.CONSUME(t.DecimalLiteral)},{ALT:()=>e.CONSUME(t.HexLiteral)},{ALT:()=>e.CONSUME(t.OctalLiteral)},{ALT:()=>e.CONSUME(t.BinaryLiteral)}])}),e.RULE("floatingPointLiteral",()=>{e.OR([{ALT:()=>e.CONSUME(t.FloatLiteral)},{ALT:()=>e.CONSUME(t.HexFloatLiteral)}])}),e.RULE("booleanLiteral",()=>{e.OR([{ALT:()=>e.CONSUME(t.True)},{ALT:()=>e.CONSUME(t.False)}])}),e.RULE("shiftOperator",()=>{e.OR([{GATE:()=>e.LA(1).startOffset+1===e.LA(2).startOffset,ALT:()=>{e.CONSUME(t.Less),e.CONSUME2(t.Less)}},{GATE:()=>e.LA(1).startOffset+1===e.LA(2).startOffset,ALT:()=>{e.CONSUME(t.Greater),e.CONSUME2(t.Greater),e.OPTION({GATE:()=>e.LA(0).startOffset+1===e.LA(1).startOffset,DEF:()=>e.CONSUME3(t.Greater)})}}])})}function iE(e,t){e.RULE("primitiveType",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.OR([{ALT:()=>e.SUBRULE(e.numericType)},{ALT:()=>e.CONSUME(t.Boolean)}])}),e.RULE("numericType",()=>{e.OR([{ALT:()=>e.SUBRULE(e.integralType)},{ALT:()=>e.SUBRULE(e.floatingPointType)}])}),e.RULE("integralType",()=>{e.OR([{ALT:()=>e.CONSUME(t.Byte)},{ALT:()=>e.CONSUME(t.Short)},{ALT:()=>e.CONSUME(t.Int)},{ALT:()=>e.CONSUME(t.Long)},{ALT:()=>e.CONSUME(t.Char)}])}),e.RULE("floatingPointType",()=>{e.OR([{ALT:()=>e.CONSUME(t.Float)},{ALT:()=>e.CONSUME(t.Double)}])}),e.RULE("referenceType",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.OR({DEF:[{ALT:()=>{e.SUBRULE(e.primitiveType),e.SUBRULE(e.dims)}},{ALT:()=>{e.SUBRULE(e.classOrInterfaceType),e.OPTION(()=>{e.SUBRULE2(e.dims)})}}],IGNORE_AMBIGUITIES:!0})}),e.RULE("classOrInterfaceType",()=>{e.SUBRULE(e.classType)}),e.RULE("classType",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.Identifier),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.MANY2(()=>{e.CONSUME(t.Dot),e.MANY3(()=>{e.SUBRULE2(e.annotation)}),e.CONSUME2(t.Identifier),e.OPTION2(()=>e.SUBRULE2(e.typeArguments))})}),e.RULE("interfaceType",()=>{e.SUBRULE(e.classType)}),e.RULE("typeVariable",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.Identifier)}),e.RULE("dims",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.LSquare),e.CONSUME(t.RSquare),e.MANY2({GATE:()=>e.BACKTRACK_LOOKAHEAD(e.isDims),DEF:()=>{e.MANY3(()=>{e.SUBRULE2(e.annotation)}),e.CONSUME2(t.LSquare),e.CONSUME2(t.RSquare)}})}),e.RULE("typeParameter",()=>{e.MANY(()=>{e.SUBRULE(e.typeParameterModifier)}),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.typeBound)})}),e.RULE("typeParameterModifier",()=>{e.SUBRULE(e.annotation)}),e.RULE("typeBound",()=>{e.CONSUME(t.Extends),e.SUBRULE(e.classOrInterfaceType),e.MANY(()=>{e.SUBRULE(e.additionalBound)})}),e.RULE("additionalBound",()=>{e.CONSUME(t.And),e.SUBRULE(e.interfaceType)}),e.RULE("typeArguments",()=>{e.CONSUME(t.Less),e.SUBRULE(e.typeArgumentList),e.CONSUME(t.Greater)}),e.RULE("typeArgumentList",()=>{e.SUBRULE(e.typeArgument),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.typeArgument)})}),e.RULE("typeArgument",()=>{e.OR([{ALT:()=>e.SUBRULE(e.referenceType)},{ALT:()=>e.SUBRULE(e.wildcard)}])}),e.RULE("wildcard",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.QuestionMark),e.OPTION(()=>{e.SUBRULE(e.wildcardBounds)})}),e.RULE("wildcardBounds",()=>{e.OR([{ALT:()=>e.CONSUME(t.Extends)},{ALT:()=>e.CONSUME(t.Super)}]),e.SUBRULE(e.referenceType)})}function aE(e,t){e.RULE("moduleName",()=>{e.CONSUME(t.Identifier),e.MANY(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)})}),e.RULE("packageName",()=>{e.CONSUME(t.Identifier),e.MANY(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)})}),e.RULE("typeName",()=>{e.CONSUME(t.Identifier),e.MANY(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)})}),e.RULE("expressionName",()=>{e.CONSUME(t.Identifier),e.MANY({GATE:()=>P(this.LA(2).tokenType,t.Identifier),DEF:()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)}})}),e.RULE("methodName",()=>{e.CONSUME(t.Identifier)}),e.RULE("packageOrTypeName",()=>{e.CONSUME(t.Identifier),e.MANY({GATE:()=>P(this.LA(2).tokenType,t.Star)===!1,DEF:()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)}})}),e.RULE("ambiguousName",()=>{e.CONSUME(t.Identifier),e.MANY(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)})})}function sE(e,t){e.RULE("compilationUnit",()=>{e.OR([{ALT:()=>e.SUBRULE(e.ordinaryCompilationUnit)},{ALT:()=>e.SUBRULE(e.modularCompilationUnit)},{ALT:()=>e.CONSUME(Je)}])}),e.RULE("ordinaryCompilationUnit",()=>{e.OPTION(()=>e.SUBRULE(e.packageDeclaration)),e.MANY(()=>{e.SUBRULE3(e.importDeclaration)}),e.MANY2(()=>{e.SUBRULE(e.typeDeclaration)})}),e.RULE("modularCompilationUnit",()=>{e.MANY(()=>{e.SUBRULE(e.importDeclaration)}),e.SUBRULE(e.moduleDeclaration)}),e.RULE("packageDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.packageModifier)}),e.CONSUME(t.Package),e.CONSUME(t.Identifier),e.MANY2(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)}),e.CONSUME2(t.Semicolon)}),e.RULE("packageModifier",()=>{e.SUBRULE(e.annotation)}),e.RULE("importDeclaration",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Import),e.OPTION(()=>{e.CONSUME(t.Static)}),e.SUBRULE(e.packageOrTypeName),e.OPTION2(()=>{e.CONSUME(t.Dot),e.CONSUME(t.Star)}),e.CONSUME(t.Semicolon)}},{ALT:()=>e.SUBRULE(e.emptyStatement)}])}),e.RULE("typeDeclaration",()=>{e.OR([{ALT:()=>e.CONSUME(t.Semicolon)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.SUBRULE(e.fieldDeclaration)},{ALT:()=>e.SUBRULE(e.methodDeclaration)}])}),e.RULE("moduleDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.OPTION(()=>{e.CONSUME(t.Open)}),e.CONSUME(t.Module),e.CONSUME(t.Identifier),e.MANY2(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)}),e.CONSUME(t.LCurly),e.MANY3(()=>{e.SUBRULE(e.moduleDirective)}),e.CONSUME(t.RCurly)}),e.RULE("moduleDirective",()=>{e.OR([{ALT:()=>e.SUBRULE(e.requiresModuleDirective)},{ALT:()=>e.SUBRULE(e.exportsModuleDirective)},{ALT:()=>e.SUBRULE(e.opensModuleDirective)},{ALT:()=>e.SUBRULE(e.usesModuleDirective)},{ALT:()=>e.SUBRULE(e.providesModuleDirective)}])}),e.RULE("requiresModuleDirective",()=>{e.CONSUME(t.Requires),e.MANY({GATE:()=>(P(e.LA(1).tokenType,t.Transitive)&&P(e.LA(2).tokenType,t.Separators))===!1,DEF:()=>{e.SUBRULE(e.requiresModifier)}}),e.SUBRULE(e.moduleName),e.CONSUME(t.Semicolon)}),e.RULE("exportsModuleDirective",()=>{e.CONSUME(t.Exports),e.SUBRULE(e.packageName),e.OPTION(()=>{e.CONSUME(t.To),e.SUBRULE(e.moduleName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.moduleName)})}),e.CONSUME(t.Semicolon)}),e.RULE("opensModuleDirective",()=>{e.CONSUME(t.Opens),e.SUBRULE(e.packageName),e.OPTION(()=>{e.CONSUME(t.To),e.SUBRULE(e.moduleName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.moduleName)})}),e.CONSUME(t.Semicolon)}),e.RULE("usesModuleDirective",()=>{e.CONSUME(t.Uses),e.SUBRULE(e.typeName),e.CONSUME(t.Semicolon)}),e.RULE("providesModuleDirective",()=>{e.CONSUME(t.Provides),e.SUBRULE(e.typeName),e.CONSUME(t.With),e.SUBRULE2(e.typeName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE3(e.typeName)}),e.CONSUME(t.Semicolon)}),e.RULE("requiresModifier",()=>{e.OR([{ALT:()=>e.CONSUME(t.Transitive)},{ALT:()=>e.CONSUME(t.Static)}])})}function cE(e,t){e.RULE("classDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.classModifier)}),e.OR([{ALT:()=>e.SUBRULE(e.normalClassDeclaration)},{ALT:()=>e.SUBRULE(e.enumDeclaration)},{ALT:()=>e.SUBRULE(e.recordDeclaration)}])}),e.RULE("normalClassDeclaration",()=>{e.CONSUME(t.Class),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.typeParameters)}),e.OPTION2(()=>{e.SUBRULE(e.classExtends)}),e.OPTION3(()=>{e.SUBRULE(e.classImplements)}),e.OPTION4(()=>{e.SUBRULE(e.classPermits)}),e.SUBRULE(e.classBody)}),e.RULE("classModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Abstract)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Final)},{ALT:()=>e.CONSUME(t.Sealed)},{ALT:()=>e.CONSUME(t.NonSealed)},{ALT:()=>e.CONSUME(t.Strictfp)}])}),e.RULE("typeParameters",()=>{e.CONSUME(t.Less),e.SUBRULE(e.typeParameterList),e.CONSUME(t.Greater)}),e.RULE("typeParameterList",()=>{e.SUBRULE(e.typeParameter),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.typeParameter)})}),e.RULE("classExtends",()=>{e.CONSUME(t.Extends),e.SUBRULE(e.classType)}),e.RULE("classImplements",()=>{e.CONSUME(t.Implements),e.SUBRULE(e.interfaceTypeList)}),e.RULE("interfaceTypeList",()=>{e.SUBRULE(e.interfaceType),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.interfaceType)})}),e.RULE("classPermits",()=>{e.CONSUME(t.Permits),e.SUBRULE(e.typeName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.typeName)})}),e.RULE("classBody",()=>{e.CONSUME(t.LCurly),e.MANY(()=>{e.SUBRULE(e.classBodyDeclaration)}),e.CONSUME(t.RCurly)}),e.RULE("classBodyDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.classMemberDeclaration)},{ALT:()=>e.SUBRULE(e.instanceInitializer)},{ALT:()=>e.SUBRULE(e.staticInitializer)},{ALT:()=>e.SUBRULE(e.constructorDeclaration)}])}),e.RULE("classMemberDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.fieldDeclaration)},{ALT:()=>e.SUBRULE(e.methodDeclaration)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.CONSUME(t.Semicolon)}])}),e.RULE("fieldDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.fieldModifier)}),e.SUBRULE(e.unannType),e.SUBRULE(e.variableDeclaratorList),e.CONSUME(t.Semicolon)}),e.RULE("fieldModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Final)},{ALT:()=>e.CONSUME(t.Transient)},{ALT:()=>e.CONSUME(t.Volatile)}])}),e.RULE("variableDeclaratorList",r=>{e.SUBRULE(e.variableDeclarator),e.MANY({GATE:()=>!r,DEF:()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.variableDeclarator)}})}),e.RULE("variableDeclarator",()=>{e.SUBRULE(e.variableDeclaratorId),e.OPTION(()=>{e.CONSUME(t.Equals),e.SUBRULE(e.variableInitializer)})}),e.RULE("variableDeclaratorId",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Identifier),e.OPTION(()=>{e.SUBRULE(e.dims)})}},{ALT:()=>e.CONSUME(t.Underscore)}])}),e.RULE("variableInitializer",()=>{e.OR([{ALT:()=>e.SUBRULE(e.expression)},{ALT:()=>e.SUBRULE(e.arrayInitializer)}])}),e.RULE("unannType",()=>{e.OR([{ALT:()=>e.SUBRULE(e.unannPrimitiveTypeWithOptionalDimsSuffix)},{ALT:()=>e.SUBRULE(e.unannReferenceType)}])}),e.RULE("unannPrimitiveTypeWithOptionalDimsSuffix",()=>{e.SUBRULE(e.unannPrimitiveType),e.OPTION({GATE:()=>this.BACKTRACK_LOOKAHEAD(e.isDims),DEF:()=>e.SUBRULE2(e.dims)})}),e.RULE("unannPrimitiveType",()=>{e.OR([{ALT:()=>e.SUBRULE(e.numericType)},{ALT:()=>e.CONSUME(t.Boolean)}])}),e.RULE("unannReferenceType",()=>{e.SUBRULE(e.unannClassOrInterfaceType),e.OPTION({GATE:()=>this.BACKTRACK_LOOKAHEAD(e.isDims),DEF:()=>e.SUBRULE2(e.dims)})}),e.RULE("unannClassOrInterfaceType",()=>{e.SUBRULE(e.unannClassType)}),e.RULE("unannClassType",()=>{e.CONSUME(t.Identifier),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.MANY2(()=>{e.CONSUME(t.Dot),e.MANY3(()=>{e.SUBRULE2(e.annotation)}),e.CONSUME2(t.Identifier),e.OPTION2(()=>{e.SUBRULE2(e.typeArguments)})})}),e.RULE("unannInterfaceType",()=>{e.SUBRULE(e.unannClassType)}),e.RULE("unannTypeVariable",()=>{e.CONSUME(t.Identifier)}),e.RULE("methodDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.methodModifier)}),e.SUBRULE(e.methodHeader),e.SUBRULE(e.methodBody)}),e.RULE("methodModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Abstract)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Final)},{ALT:()=>e.CONSUME(t.Synchronized)},{ALT:()=>e.CONSUME(t.Native)},{ALT:()=>e.CONSUME(t.Strictfp)}])}),e.RULE("methodHeader",()=>{e.OPTION(()=>{e.SUBRULE(e.typeParameters),e.MANY(()=>{e.SUBRULE(e.annotation)})}),e.SUBRULE(e.result),e.SUBRULE(e.methodDeclarator),e.OPTION2(()=>{e.SUBRULE(e.throws)})}),e.RULE("result",()=>{e.OR([{ALT:()=>e.SUBRULE(e.unannType)},{ALT:()=>e.CONSUME(t.Void)}])}),e.RULE("methodDeclarator",()=>{e.CONSUME(t.Identifier),e.CONSUME(t.LBrace),e.OR([{ALT:()=>{e.SUBRULE(e.receiverParameter),e.OPTION(()=>{e.CONSUME(t.Comma),e.SUBRULE(e.formalParameterList)})}},{ALT:()=>e.OPTION1(()=>e.SUBRULE1(e.formalParameterList))}]),e.CONSUME(t.RBrace),e.OPTION2(()=>{e.SUBRULE(e.dims)})}),e.RULE("receiverParameter",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.SUBRULE(e.unannType),e.OPTION(()=>{e.CONSUME(t.Identifier),e.CONSUME(t.Dot)}),e.CONSUME(t.This)}),e.RULE("formalParameterList",()=>{e.SUBRULE(e.formalParameter),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.formalParameter)})}),e.RULE("formalParameter",()=>{e.OR([{ALT:()=>e.SUBRULE(e.variableParaRegularParameter)},{ALT:()=>e.SUBRULE(e.variableArityParameter)}])}),e.RULE("variableParaRegularParameter",()=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.unannType),e.SUBRULE(e.variableDeclaratorId)}),e.RULE("variableArityParameter",()=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.unannType),e.MANY2(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.DotDotDot),e.CONSUME(t.Identifier)}),e.RULE("variableModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Final)}])}),e.RULE("throws",()=>{e.CONSUME(t.Throws),e.SUBRULE(e.exceptionTypeList)}),e.RULE("exceptionTypeList",()=>{e.SUBRULE(e.exceptionType),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.exceptionType)})}),e.RULE("exceptionType",()=>{e.SUBRULE(e.classType)}),e.RULE("methodBody",()=>{e.OR([{ALT:()=>e.SUBRULE(e.block)},{ALT:()=>e.CONSUME(t.Semicolon)}])}),e.RULE("instanceInitializer",()=>{e.SUBRULE(e.block)}),e.RULE("staticInitializer",()=>{e.CONSUME(t.Static),e.SUBRULE(e.block)}),e.RULE("constructorDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.constructorModifier)}),e.SUBRULE(e.constructorDeclarator),e.OPTION(()=>{e.SUBRULE(e.throws)}),e.SUBRULE(e.constructorBody)}),e.RULE("constructorModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)}])}),e.RULE("constructorDeclarator",()=>{e.OPTION(()=>{e.SUBRULE(e.typeParameters)}),e.SUBRULE(e.simpleTypeName),e.CONSUME(t.LBrace),e.OR([{ALT:()=>{e.SUBRULE(e.receiverParameter),e.OPTION1(()=>{e.CONSUME(t.Comma),e.SUBRULE(e.formalParameterList)})}},{ALT:()=>e.OPTION2(()=>e.SUBRULE1(e.formalParameterList))}]),e.CONSUME(t.RBrace)}),e.RULE("simpleTypeName",()=>{e.SUBRULE(e.typeIdentifier)}),e.RULE("constructorBody",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.explicitConstructorInvocation)}),e.OPTION2(()=>{e.SUBRULE(e.blockStatements)}),e.CONSUME(t.RCurly)}),e.RULE("explicitConstructorInvocation",()=>{e.OR([{ALT:()=>e.SUBRULE(e.unqualifiedExplicitConstructorInvocation)},{ALT:()=>e.SUBRULE(e.qualifiedExplicitConstructorInvocation)}])}),e.RULE("unqualifiedExplicitConstructorInvocation",()=>{e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.OR([{ALT:()=>e.CONSUME(t.This)},{ALT:()=>e.CONSUME(t.Super)}]),e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace),e.CONSUME(t.Semicolon)}),e.RULE("qualifiedExplicitConstructorInvocation",()=>{e.SUBRULE(e.expressionName),e.CONSUME(t.Dot),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.CONSUME(t.Super),e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace),e.CONSUME(t.Semicolon)}),e.RULE("enumDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.classModifier)}),e.CONSUME(t.Enum),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.classImplements)}),e.SUBRULE(e.enumBody)}),e.RULE("enumBody",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.enumConstantList)}),e.OPTION2(()=>{e.CONSUME(t.Comma)}),e.OPTION3(()=>{e.SUBRULE(e.enumBodyDeclarations)}),e.CONSUME(t.RCurly)}),e.RULE("enumConstantList",()=>{e.SUBRULE(e.enumConstant),e.MANY({GATE:()=>{let r=e.LA(2);return P(r,t.Identifier)||P(r,t.At)},DEF:()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.enumConstant)}})}),e.RULE("enumConstant",()=>{e.MANY(()=>{e.SUBRULE(e.enumConstantModifier)}),e.CONSUME(t.Identifier),e.OPTION(()=>{e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace)}),e.OPTION3(()=>{e.SUBRULE(e.classBody)})}),e.RULE("enumConstantModifier",()=>{e.SUBRULE(e.annotation)}),e.RULE("enumBodyDeclarations",()=>{e.CONSUME(t.Semicolon),e.MANY(()=>{e.SUBRULE(e.classBodyDeclaration)})}),e.RULE("recordDeclaration",()=>{e.CONSUME(t.Record),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.typeParameters)}),e.SUBRULE(e.recordHeader),e.OPTION2(()=>{e.SUBRULE(e.classImplements)}),e.SUBRULE(e.recordBody)}),e.RULE("recordHeader",()=>{e.CONSUME(t.LBrace),e.OPTION(()=>{e.SUBRULE(e.recordComponentList)}),e.CONSUME(t.RBrace)}),e.RULE("recordComponentList",()=>{e.SUBRULE(e.recordComponent),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.recordComponent)})}),e.RULE("recordComponent",()=>{e.MANY(()=>{e.SUBRULE(e.recordComponentModifier)}),e.SUBRULE(e.unannType),e.OR([{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.SUBRULE(e.variableArityRecordComponent)}])}),e.RULE("variableArityRecordComponent",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.DotDotDot),e.CONSUME(t.Identifier)}),e.RULE("recordComponentModifier",()=>{e.SUBRULE(e.annotation)}),e.RULE("recordBody",()=>{e.CONSUME(t.LCurly),e.MANY(()=>{e.SUBRULE(e.recordBodyDeclaration)}),e.CONSUME(t.RCurly)}),e.RULE("recordBodyDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.compactConstructorDeclaration)},{ALT:()=>e.SUBRULE(e.classBodyDeclaration)}])}),e.RULE("compactConstructorDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.constructorModifier)}),e.SUBRULE(e.simpleTypeName),e.SUBRULE(e.constructorBody)}),e.RULE("isDims",()=>(e.MANY(e.annotation),P(this.LA(1),t.LSquare)&&P(this.LA(2),t.RSquare)))}function uE(e,t){e.RULE("interfaceDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.interfaceModifier)}),e.OR([{ALT:()=>e.SUBRULE(e.normalInterfaceDeclaration)},{ALT:()=>e.SUBRULE(e.annotationInterfaceDeclaration)}])}),e.RULE("normalInterfaceDeclaration",()=>{e.CONSUME(t.Interface),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.typeParameters)}),e.OPTION2(()=>{e.SUBRULE(e.interfaceExtends)}),e.OPTION3(()=>{e.SUBRULE(e.interfacePermits)}),e.SUBRULE(e.interfaceBody)}),e.RULE("interfaceModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Abstract)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Sealed)},{ALT:()=>e.CONSUME(t.NonSealed)},{ALT:()=>e.CONSUME(t.Strictfp)}])}),e.RULE("interfaceExtends",()=>{e.CONSUME(t.Extends),e.SUBRULE(e.interfaceTypeList)}),e.RULE("interfacePermits",()=>{e.CONSUME(t.Permits),e.SUBRULE(e.typeName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.typeName)})}),e.RULE("interfaceBody",()=>{e.CONSUME(t.LCurly),e.MANY(()=>{e.SUBRULE(e.interfaceMemberDeclaration)}),e.CONSUME(t.RCurly)}),e.RULE("interfaceMemberDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.constantDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceMethodDeclaration)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.CONSUME(t.Semicolon)}])}),e.RULE("constantDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.constantModifier)}),e.SUBRULE(e.unannType),e.SUBRULE(e.variableDeclaratorList),e.CONSUME(t.Semicolon)}),e.RULE("constantModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Final)}])}),e.RULE("interfaceMethodDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.interfaceMethodModifier)}),e.SUBRULE(e.methodHeader),e.SUBRULE(e.methodBody)}),e.RULE("interfaceMethodModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Abstract)},{ALT:()=>e.CONSUME(t.Default)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Strictfp)}])}),e.RULE("annotationInterfaceDeclaration",()=>{e.CONSUME(t.At),e.CONSUME(t.Interface),e.SUBRULE(e.typeIdentifier),e.SUBRULE(e.annotationInterfaceBody)}),e.RULE("annotationInterfaceBody",()=>{e.CONSUME(t.LCurly),e.MANY(()=>{e.SUBRULE(e.annotationInterfaceMemberDeclaration)}),e.CONSUME(t.RCurly)}),e.RULE("annotationInterfaceMemberDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotationInterfaceElementDeclaration)},{ALT:()=>e.SUBRULE(e.constantDeclaration)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.CONSUME(t.Semicolon)}])}),e.RULE("annotationInterfaceElementDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.annotationInterfaceElementModifier)}),e.SUBRULE(e.unannType),e.CONSUME(t.Identifier),e.CONSUME(t.LBrace),e.CONSUME(t.RBrace),e.OPTION(()=>{e.SUBRULE(e.dims)}),e.OPTION2(()=>{e.SUBRULE(e.defaultValue)}),e.CONSUME(t.Semicolon)}),e.RULE("annotationInterfaceElementModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Abstract)}])}),e.RULE("defaultValue",()=>{e.CONSUME(t.Default),e.SUBRULE(e.elementValue)}),e.RULE("annotation",()=>{e.CONSUME(t.At),e.SUBRULE(e.typeName),e.OPTION(()=>{e.CONSUME(t.LBrace),e.OR({DEF:[{ALT:()=>e.SUBRULE(e.elementValuePairList)},{ALT:()=>e.SUBRULE(e.elementValue)},{ALT:()=>{}}],IGNORE_AMBIGUITIES:!0}),e.CONSUME(t.RBrace)})}),e.RULE("elementValuePairList",()=>{e.SUBRULE(e.elementValuePair),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.elementValuePair)})}),e.RULE("elementValuePair",()=>{e.CONSUME(t.Identifier),e.CONSUME(t.Equals),e.SUBRULE(e.elementValue)}),e.RULE("elementValue",()=>{e.OR([{ALT:()=>e.SUBRULE(e.conditionalExpression)},{ALT:()=>e.SUBRULE(e.elementValueArrayInitializer)},{ALT:()=>e.SUBRULE(e.annotation)}])}),e.RULE("elementValueArrayInitializer",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.elementValueList)}),e.OPTION2(()=>{e.CONSUME(t.Comma)}),e.CONSUME(t.RCurly)}),e.RULE("elementValueList",()=>{e.SUBRULE(e.elementValue),e.MANY({GATE:()=>P(e.LA(2).tokenType,t.RCurly)===!1,DEF:()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.elementValue)}})})}function lE(e,t){e.RULE("arrayInitializer",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.variableInitializerList)}),e.OPTION2(()=>{e.CONSUME(t.Comma)}),e.CONSUME(t.RCurly)}),e.RULE("variableInitializerList",()=>{e.SUBRULE(e.variableInitializer),e.MANY({GATE:()=>P(this.LA(2).tokenType,t.RCurly)===!1,DEF:()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.variableInitializer)}})})}function fE(e,t){e.RULE("block",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.blockStatements)}),e.CONSUME(t.RCurly)}),e.RULE("blockStatements",()=>{e.SUBRULE(e.blockStatement),e.MANY(()=>{e.SUBRULE2(e.blockStatement)})}),e.RULE("blockStatement",()=>{e.OR({DEF:[{ALT:()=>e.SUBRULE(e.localVariableDeclarationStatement)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.SUBRULE(e.statement)}],IGNORE_AMBIGUITIES:!0})}),e.RULE("localVariableDeclarationStatement",()=>{e.SUBRULE(e.localVariableDeclaration),e.CONSUME(t.Semicolon)}),e.RULE("localVariableDeclaration",r=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.localVariableType),e.SUBRULE(e.variableDeclaratorList,{ARGS:[r]})}),e.RULE("localVariableType",()=>{e.OR({DEF:[{ALT:()=>e.SUBRULE(e.unannType)},{ALT:()=>e.CONSUME(t.Var)}],IGNORE_AMBIGUITIES:!0})}),e.RULE("statement",()=>{e.OR([{ALT:()=>e.SUBRULE(e.statementWithoutTrailingSubstatement)},{ALT:()=>e.SUBRULE(e.labeledStatement)},{ALT:()=>e.SUBRULE(e.ifStatement)},{ALT:()=>e.SUBRULE(e.whileStatement)},{ALT:()=>e.SUBRULE(e.forStatement)}])}),e.RULE("statementWithoutTrailingSubstatement",()=>{e.OR({DEF:[{ALT:()=>e.SUBRULE(e.block)},{ALT:()=>e.SUBRULE(e.yieldStatement)},{ALT:()=>e.SUBRULE(e.emptyStatement)},{GATE:()=>!P(this.LA(1).tokenType,t.Switch),ALT:()=>e.SUBRULE(e.expressionStatement)},{ALT:()=>e.SUBRULE(e.assertStatement)},{ALT:()=>e.SUBRULE(e.switchStatement)},{ALT:()=>e.SUBRULE(e.doStatement)},{ALT:()=>e.SUBRULE(e.breakStatement)},{ALT:()=>e.SUBRULE(e.continueStatement)},{ALT:()=>e.SUBRULE(e.returnStatement)},{ALT:()=>e.SUBRULE(e.synchronizedStatement)},{ALT:()=>e.SUBRULE(e.throwStatement)},{ALT:()=>e.SUBRULE(e.tryStatement)}],IGNORE_AMBIGUITIES:!0})}),e.RULE("emptyStatement",()=>{e.CONSUME(t.Semicolon)}),e.RULE("labeledStatement",()=>{e.CONSUME(t.Identifier),e.CONSUME(t.Colon),e.SUBRULE(e.statement)}),e.RULE("expressionStatement",()=>{e.SUBRULE(e.statementExpression),e.CONSUME(t.Semicolon)}),e.RULE("statementExpression",()=>{e.SUBRULE(e.expression)}),e.RULE("ifStatement",()=>{e.CONSUME(t.If),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.statement),e.OPTION(()=>{e.CONSUME(t.Else),e.SUBRULE2(e.statement)})}),e.RULE("assertStatement",()=>{e.CONSUME(t.Assert),e.SUBRULE(e.expression),e.OPTION(()=>{e.CONSUME(t.Colon),e.SUBRULE2(e.expression)}),e.CONSUME(t.Semicolon)}),e.RULE("switchStatement",()=>{e.CONSUME(t.Switch),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.switchBlock)}),e.RULE("switchBlock",()=>{e.CONSUME(t.LCurly),e.OR([{ALT:()=>{e.SUBRULE(e.switchRule),e.MANY(()=>e.SUBRULE2(e.switchRule))}},{ALT:()=>e.MANY2(()=>e.SUBRULE(e.switchBlockStatementGroup))}]),e.CONSUME(t.RCurly)}),e.RULE("switchBlockStatementGroup",()=>{e.SUBRULE(e.switchLabel),e.CONSUME(t.Colon),e.OPTION(()=>{e.SUBRULE(e.blockStatements)})}),e.RULE("switchLabel",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Case),e.OR2([{ALT:()=>{e.CONSUME(t.Null),e.OPTION2(()=>{e.CONSUME3(t.Comma),e.CONSUME(t.Default)})}},{ALT:()=>{e.SUBRULE(e.casePattern),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.casePattern)}),e.OPTION(()=>{e.SUBRULE(e.guard)})}},{GATE:()=>!P(e.LA(1).tokenType,t.Null),ALT:()=>{e.SUBRULE(e.caseConstant),e.MANY2(()=>{e.CONSUME2(t.Comma),e.SUBRULE2(e.caseConstant)})}}])}},{ALT:()=>e.CONSUME2(t.Default)}])}),e.RULE("switchRule",()=>{e.SUBRULE(e.switchLabel),e.CONSUME(t.Arrow),e.OR([{ALT:()=>e.SUBRULE(e.throwStatement)},{ALT:()=>e.SUBRULE(e.block)},{ALT:()=>{e.SUBRULE(e.expression),e.CONSUME(t.Semicolon)}}])}),e.RULE("caseConstant",()=>{e.SUBRULE(e.conditionalExpression)}),e.RULE("casePattern",()=>{e.SUBRULE(e.pattern)}),e.RULE("whileStatement",()=>{e.CONSUME(t.While),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.statement)}),e.RULE("doStatement",()=>{e.CONSUME(t.Do),e.SUBRULE(e.statement),e.CONSUME(t.While),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.CONSUME(t.Semicolon)}),e.RULE("forStatement",()=>{e.OR([{ALT:()=>e.SUBRULE(e.basicForStatement)},{ALT:()=>e.SUBRULE(e.enhancedForStatement)}])}),e.RULE("basicForStatement",()=>{e.CONSUME(t.For),e.CONSUME(t.LBrace),e.OPTION(()=>{e.SUBRULE(e.forInit)}),e.CONSUME(t.Semicolon),e.OPTION2(()=>{e.SUBRULE(e.expression)}),e.CONSUME2(t.Semicolon),e.OPTION3(()=>{e.SUBRULE(e.forUpdate)}),e.CONSUME(t.RBrace),e.SUBRULE(e.statement)}),e.RULE("forInit",()=>{e.OR([{ALT:()=>e.SUBRULE(e.localVariableDeclaration)},{ALT:()=>e.SUBRULE(e.statementExpressionList)}])}),e.RULE("forUpdate",()=>{e.SUBRULE(e.statementExpressionList)}),e.RULE("statementExpressionList",()=>{e.SUBRULE(e.statementExpression),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.statementExpression)})}),e.RULE("enhancedForStatement",()=>{e.CONSUME(t.For),e.CONSUME(t.LBrace),e.SUBRULE(e.localVariableDeclaration),e.CONSUME(t.Colon),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.statement)}),e.RULE("breakStatement",()=>{e.CONSUME(t.Break),e.OPTION(()=>{e.CONSUME(t.Identifier)}),e.CONSUME(t.Semicolon)}),e.RULE("continueStatement",()=>{e.CONSUME(t.Continue),e.OPTION(()=>{e.CONSUME(t.Identifier)}),e.CONSUME(t.Semicolon)}),e.RULE("returnStatement",()=>{e.CONSUME(t.Return),e.OPTION(()=>{e.SUBRULE(e.expression)}),e.CONSUME(t.Semicolon)}),e.RULE("throwStatement",()=>{e.CONSUME(t.Throw),e.SUBRULE(e.expression),e.CONSUME(t.Semicolon)}),e.RULE("synchronizedStatement",()=>{e.CONSUME(t.Synchronized),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.block)}),e.RULE("tryStatement",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Try),e.SUBRULE(e.block),e.OR2([{ALT:()=>{e.SUBRULE(e.catches),e.OPTION(()=>{e.SUBRULE(e.finally)})}},{ALT:()=>e.SUBRULE2(e.finally)}])}},{ALT:()=>e.SUBRULE(e.tryWithResourcesStatement)}])}),e.RULE("catches",()=>{e.SUBRULE(e.catchClause),e.MANY(()=>{e.SUBRULE2(e.catchClause)})}),e.RULE("catchClause",()=>{e.CONSUME(t.Catch),e.CONSUME(t.LBrace),e.SUBRULE(e.catchFormalParameter),e.CONSUME(t.RBrace),e.SUBRULE(e.block)}),e.RULE("catchFormalParameter",()=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.catchType),e.SUBRULE(e.variableDeclaratorId)}),e.RULE("catchType",()=>{e.SUBRULE(e.unannClassType),e.MANY(()=>{e.CONSUME(t.Or),e.SUBRULE2(e.classType)})}),e.RULE("finally",()=>{e.CONSUME(t.Finally),e.SUBRULE(e.block)}),e.RULE("tryWithResourcesStatement",()=>{e.CONSUME(t.Try),e.SUBRULE(e.resourceSpecification),e.SUBRULE(e.block),e.OPTION(()=>{e.SUBRULE(e.catches)}),e.OPTION2(()=>{e.SUBRULE(e.finally)})}),e.RULE("resourceSpecification",()=>{e.CONSUME(t.LBrace),e.SUBRULE(e.resourceList),e.OPTION(()=>{e.CONSUME(t.Semicolon)}),e.CONSUME(t.RBrace)}),e.RULE("resourceList",()=>{e.SUBRULE(e.resource),e.MANY({GATE:()=>P(e.LA(2).tokenType,t.RBrace)===!1,DEF:()=>{e.CONSUME(t.Semicolon),e.SUBRULE2(e.resource)}})}),e.RULE("resource",()=>{e.OR([{ALT:()=>e.SUBRULE(e.localVariableDeclaration)},{ALT:()=>e.SUBRULE(e.variableAccess)}])}),e.RULE("yieldStatement",()=>{e.CONSUME(t.Yield),e.SUBRULE(e.expression),e.CONSUME(t.Semicolon)}),e.RULE("variableAccess",()=>{e.SUBRULE(e.primary)})}function pE(e,t){e.RULE("expression",()=>{e.OR([{ALT:()=>e.SUBRULE(e.lambdaExpression)},{ALT:()=>e.SUBRULE(e.conditionalExpression)}])}),e.RULE("lambdaExpression",()=>{e.SUBRULE(e.lambdaParameters),e.CONSUME(t.Arrow),e.SUBRULE(e.lambdaBody)}),e.RULE("lambdaParameters",()=>{e.OR([{ALT:()=>e.SUBRULE(e.lambdaParametersWithBraces)},{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.CONSUME(t.Underscore)}])}),e.RULE("lambdaParametersWithBraces",()=>{e.CONSUME(t.LBrace),e.OPTION(()=>{e.SUBRULE(e.lambdaParameterList)}),e.CONSUME(t.RBrace)}),e.RULE("lambdaParameterList",()=>{e.OR([{GATE:()=>{let r=this.LA(1).tokenType,n=this.LA(2).tokenType;return(P(r,t.Identifier)||P(r,t.Underscore))&&(P(n,t.RBrace)||P(n,t.Comma))},ALT:()=>e.SUBRULE(e.conciseLambdaParameterList)},{ALT:()=>e.SUBRULE(e.normalLambdaParameterList)}])}),e.RULE("conciseLambdaParameterList",()=>{e.SUBRULE(e.conciseLambdaParameter),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.conciseLambdaParameter)})}),e.RULE("normalLambdaParameterList",()=>{e.SUBRULE(e.normalLambdaParameter),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.normalLambdaParameter)})}),e.RULE("normalLambdaParameter",()=>{e.OR([{ALT:()=>e.SUBRULE(e.regularLambdaParameter)},{ALT:()=>e.SUBRULE(e.variableArityParameter)}])}),e.RULE("regularLambdaParameter",()=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.lambdaParameterType),e.SUBRULE(e.variableDeclaratorId)}),e.RULE("lambdaParameterType",()=>{e.OR({DEF:[{ALT:()=>e.SUBRULE(e.unannType)},{ALT:()=>e.CONSUME(t.Var)}],IGNORE_AMBIGUITIES:!0})}),e.RULE("conciseLambdaParameter",()=>{e.OR([{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.CONSUME(t.Underscore)}])}),e.RULE("lambdaBody",()=>{e.OR([{ALT:()=>e.SUBRULE(e.expression)},{ALT:()=>e.SUBRULE(e.block)}])}),e.RULE("conditionalExpression",()=>{e.SUBRULE(e.binaryExpression),e.OPTION(()=>{e.CONSUME(t.QuestionMark),e.SUBRULE(e.expression),e.CONSUME(t.Colon),e.SUBRULE2(e.expression)})}),e.RULE("binaryExpression",()=>{e.SUBRULE(e.unaryExpression),e.MANY(()=>{e.OR({DEF:[{ALT:()=>{e.CONSUME(t.Instanceof),e.OR1([{ALT:()=>e.SUBRULE(e.pattern)},{ALT:()=>e.SUBRULE(e.referenceType)}])}},{ALT:()=>{e.CONSUME(t.AssignmentOperator),e.SUBRULE2(e.expression)}},{GATE:()=>P(e.LA(2).tokenType,t.Less)||P(e.LA(2).tokenType,t.Greater),ALT:()=>{e.SUBRULE(e.shiftOperator),e.SUBRULE2(e.unaryExpression)}},{ALT:()=>{e.CONSUME(t.BinaryOperator),e.SUBRULE3(e.unaryExpression)}}],IGNORE_AMBIGUITIES:!0})})}),e.RULE("unaryExpression",()=>{e.MANY(()=>{e.CONSUME(t.UnaryPrefixOperator)}),e.SUBRULE(e.primary),e.MANY2(()=>{e.CONSUME(t.UnarySuffixOperator)})}),e.RULE("unaryExpressionNotPlusMinus",()=>{e.MANY(()=>{e.CONSUME(t.UnaryPrefixOperatorNotPlusMinus)}),e.SUBRULE(e.primary),e.MANY2(()=>{e.CONSUME(t.UnarySuffixOperator)})}),e.RULE("primary",()=>{e.SUBRULE(e.primaryPrefix),e.MANY(()=>{e.SUBRULE(e.primarySuffix)})}),e.RULE("primaryPrefix",()=>{e.OR([{ALT:()=>e.SUBRULE(e.literal)},{ALT:()=>e.CONSUME(t.This)},{ALT:()=>e.CONSUME(t.Void)},{ALT:()=>e.SUBRULE(e.unannPrimitiveTypeWithOptionalDimsSuffix)},{ALT:()=>e.SUBRULE(e.fqnOrRefType)},{ALT:()=>e.SUBRULE(e.castExpression)},{ALT:()=>e.SUBRULE(e.parenthesisExpression)},{ALT:()=>e.SUBRULE(e.newExpression)},{ALT:()=>e.SUBRULE(e.switchStatement)}])}),e.RULE("primarySuffix",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Dot),e.OR2([{ALT:()=>e.CONSUME(t.This)},{ALT:()=>e.SUBRULE(e.unqualifiedClassInstanceCreationExpression)},{ALT:()=>{e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.CONSUME(t.Identifier)}},{ALT:()=>e.SUBRULE(e.templateArgument)}])}},{ALT:()=>e.SUBRULE(e.methodInvocationSuffix)},{ALT:()=>e.SUBRULE(e.classLiteralSuffix)},{ALT:()=>e.SUBRULE(e.arrayAccessSuffix)},{ALT:()=>e.SUBRULE(e.methodReferenceSuffix)}])}),e.RULE("fqnOrRefType",()=>{e.SUBRULE(e.fqnOrRefTypePartFirst),e.MANY({GATE:()=>{let r=e.LA(2);return!(P(r,t.Class)||P(r,t.This)||P(r,t.New)||P(r,t.StringLiteral)||P(r,t.TextBlock)||P(r,t.StringTemplateBegin)||P(r,t.TextBlockTemplateBegin))},DEF:()=>{e.CONSUME(t.Dot),e.SUBRULE2(e.fqnOrRefTypePartRest)}}),e.OPTION({GATE:()=>P(e.LA(1).tokenType,t.At)||P(e.LA(2).tokenType,t.RSquare),DEF:()=>{e.SUBRULE(e.dims)}})}),e.RULE("fqnOrRefTypePartRest",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.OPTION(()=>e.SUBRULE2(e.typeArguments)),e.SUBRULE(e.fqnOrRefTypePartCommon)}),e.RULE("fqnOrRefTypePartCommon",()=>{e.OR([{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.CONSUME(t.Super)}]);let r=!1;P(e.LA(1).tokenType,t.Less)&&(r=this.BACKTRACK_LOOKAHEAD(e.isRefTypeInMethodRef)),e.OPTION2({GATE:()=>r,DEF:()=>{e.SUBRULE3(e.typeArguments)}})}),e.RULE("fqnOrRefTypePartFirst",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.SUBRULE(e.fqnOrRefTypePartCommon)}),e.RULE("parenthesisExpression",()=>{e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace)}),e.RULE("castExpression",()=>{e.OR([{ALT:()=>e.SUBRULE(e.primitiveCastExpression)},{ALT:()=>e.SUBRULE(e.referenceTypeCastExpression)}])}),e.RULE("primitiveCastExpression",()=>{e.CONSUME(t.LBrace),e.SUBRULE(e.primitiveType),e.CONSUME(t.RBrace),e.SUBRULE(e.unaryExpression)}),e.RULE("referenceTypeCastExpression",()=>{e.CONSUME(t.LBrace),e.SUBRULE(e.referenceType),e.MANY(()=>{e.SUBRULE(e.additionalBound)}),e.CONSUME(t.RBrace),e.OR([{ALT:()=>e.SUBRULE(e.lambdaExpression)},{ALT:()=>e.SUBRULE(e.unaryExpressionNotPlusMinus)}])}),e.RULE("newExpression",()=>{e.OR([{ALT:()=>e.SUBRULE(e.arrayCreationExpression)},{ALT:()=>e.SUBRULE(e.unqualifiedClassInstanceCreationExpression)}])}),e.RULE("unqualifiedClassInstanceCreationExpression",()=>{e.CONSUME(t.New),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.SUBRULE(e.classOrInterfaceTypeToInstantiate),e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace),e.OPTION3(()=>{e.SUBRULE(e.classBody)})}),e.RULE("classOrInterfaceTypeToInstantiate",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.Identifier),e.MANY2(()=>{e.CONSUME(t.Dot),e.MANY3(()=>{e.SUBRULE2(e.annotation)}),e.CONSUME2(t.Identifier)}),e.OPTION(()=>{e.SUBRULE(e.typeArgumentsOrDiamond)})}),e.RULE("typeArgumentsOrDiamond",()=>{e.OR([{ALT:()=>e.SUBRULE(e.diamond)},{ALT:()=>e.SUBRULE(e.typeArguments)}])}),e.RULE("diamond",()=>{e.CONSUME(t.Less),e.CONSUME(t.Greater)}),e.RULE("methodInvocationSuffix",()=>{e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace)}),e.RULE("argumentList",()=>{e.SUBRULE(e.expression),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.expression)})}),e.RULE("arrayCreationExpression",()=>{e.CONSUME(t.New),e.OR([{ALT:()=>e.SUBRULE(e.primitiveType)},{ALT:()=>e.SUBRULE(e.classOrInterfaceType)}]),e.OR2([{ALT:()=>e.SUBRULE(e.arrayCreationExpressionWithoutInitializerSuffix)},{ALT:()=>e.SUBRULE(e.arrayCreationWithInitializerSuffix)}])}),e.RULE("arrayCreationExpressionWithoutInitializerSuffix",()=>{e.SUBRULE(e.dimExprs),e.OPTION(()=>{e.SUBRULE(e.dims)})}),e.RULE("arrayCreationWithInitializerSuffix",()=>{e.SUBRULE(e.dims),e.SUBRULE(e.arrayInitializer)}),e.RULE("dimExprs",()=>{e.SUBRULE(e.dimExpr),e.MANY({GATE:()=>P(e.LA(2).tokenType,t.RSquare)===!1,DEF:()=>e.SUBRULE2(e.dimExpr)})}),e.RULE("dimExpr",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.LSquare),e.SUBRULE(e.expression),e.CONSUME(t.RSquare)}),e.RULE("classLiteralSuffix",()=>{e.MANY(()=>{e.CONSUME(t.LSquare),e.CONSUME(t.RSquare)}),e.CONSUME(t.Dot),e.CONSUME(t.Class)}),e.RULE("arrayAccessSuffix",()=>{e.CONSUME(t.LSquare),e.SUBRULE(e.expression),e.CONSUME(t.RSquare)}),e.RULE("methodReferenceSuffix",()=>{e.CONSUME(t.ColonColon),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.OR([{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.CONSUME(t.New)}])}),e.RULE("templateArgument",()=>{e.OR([{ALT:()=>e.SUBRULE(e.template)},{ALT:()=>e.CONSUME(t.StringLiteral)},{ALT:()=>e.CONSUME(t.TextBlock)}])}),e.RULE("template",()=>{e.OR([{ALT:()=>e.SUBRULE(e.stringTemplate)},{ALT:()=>e.SUBRULE(e.textBlockTemplate)}])}),e.RULE("stringTemplate",()=>{e.CONSUME(t.StringTemplateBegin),e.SUBRULE(e.embeddedExpression),e.MANY(()=>{e.CONSUME(t.StringTemplateMid),e.SUBRULE1(e.embeddedExpression)}),e.CONSUME(t.StringTemplateEnd)}),e.RULE("textBlockTemplate",()=>{e.CONSUME(t.TextBlockTemplateBegin),e.SUBRULE(e.embeddedExpression),e.MANY(()=>{e.CONSUME(t.TextBlockTemplateMid),e.SUBRULE1(e.embeddedExpression)}),e.CONSUME(t.TextBlockTemplateEnd)}),e.RULE("embeddedExpression",()=>{e.OPTION(()=>{e.SUBRULE(e.expression)})}),e.RULE("pattern",()=>{e.OR([{ALT:()=>e.SUBRULE(e.typePattern)},{ALT:()=>e.SUBRULE(e.recordPattern)}])}),e.RULE("typePattern",()=>{e.SUBRULE(e.localVariableDeclaration,{ARGS:[!0]})}),e.RULE("recordPattern",()=>{e.SUBRULE(e.referenceType),e.CONSUME(t.LBrace),e.OPTION(()=>{e.SUBRULE(e.componentPatternList)}),e.CONSUME(t.RBrace)}),e.RULE("componentPatternList",()=>{e.SUBRULE(e.componentPattern),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.componentPattern)})}),e.RULE("componentPattern",()=>{e.OR([{ALT:()=>e.SUBRULE(e.pattern)},{ALT:()=>e.SUBRULE(e.matchAllPattern)}])}),e.RULE("matchAllPattern",()=>{e.CONSUME(t.Underscore)}),e.RULE("guard",()=>{e.CONSUME(t.When),e.SUBRULE(e.expression)}),e.RULE("isRefTypeInMethodRef",()=>{let r;e.SUBRULE(e.typeArguments);let n=e.OPTION(()=>{e.SUBRULE(e.dims)}),o=this.LA(1).tokenType;if(P(o,t.ColonColon)?r=!0:n&&(r=!1),e.OPTION2(()=>{e.CONSUME(t.Dot),e.SUBRULE(e.classOrInterfaceType)}),r!==void 0)return r;let i=this.LA(1).tokenType;return P(i,t.ColonColon)})}function dE(){return this.computeContentAssist("unaryExpressionNotPlusMinus",[]).map(r=>r.nextTokenType).filter((r,n,o)=>o.indexOf(r)===n)}var Ko=class extends ko{constructor(){super(Vt,{lookaheadStrategy:new Ho({logging:Fo()?()=>{}:void 0}),nodeLocationTracking:"full",skipValidations:Fo()});let t=this;t.RULE("typeIdentifier",()=>{t.CONSUME(Ze.Identifier)}),oE.call(this,t,Ze),iE.call(this,t,Ze),aE.call(this,t,Ze),cE.call(this,t,Ze),sE.call(this,t,Ze),uE.call(this,t,Ze),lE.call(this,t,Ze),fE.call(this,t,Ze),pE.call(this,t,Ze),this.firstForUnaryExpressionNotPlusMinus=[],this.performSelfAnalysis(),this.firstForUnaryExpressionNotPlusMinus=dE.call(this)}cstPostNonTerminal(t,r){this.isBackTracking()||super.cstPostNonTerminal(t,r)}BACKTRACK_LOOKAHEAD(t,r=!1){return this.ACTION(()=>{this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{let{ruleName:o,originalGrammarAction:i}=t;try{return this.ruleInvocationStateUpdate(this.fullRuleNameToShort[o],o,this.subruleIdx),i.call(this)}catch(a){return this.invokeRuleCatch(a,!0,()=>{})}finally{this.ruleFinallyStateUpdate()}}catch(o){if(At(o))return r;throw o}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}})}};var Jn=new Ko,sq=Jn.getBaseCstVisitorConstructor(),hE=Jn.getBaseCstVisitorConstructorWithDefaults();function x4(e,t="compilationUnit"){let r=Vg.tokenize(e);if(r.errors.length>0){let i=r.errors[0];throw Error("Sad sad panda, lexing errors detected in line: "+i.line+", column: "+i.column+`!
150
+ For Further details.`,n}function $I(e){if(e instanceof B)return"SUBRULE";if(e instanceof F)return"OPTION";if(e instanceof H)return"OR";if(e instanceof Y)return"AT_LEAST_ONE";if(e instanceof z)return"AT_LEAST_ONE_SEP";if(e instanceof G)return"MANY_SEP";if(e instanceof w)return"MANY";if(e instanceof M)return"CONSUME";throw Error("non exhaustive match")}function e4(e,t,r){let n=Ue(t.configs.elements,i=>i.state.transitions),o=Vd(n.filter(i=>i instanceof Vn).map(i=>i.tokenType),i=>i.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:o,tokenPath:e}}function t4(e,t){return e.edges[t.tokenTypeIdx]}function r4(e,t,r){let n=new Xn,o=[];for(let a of e.elements){if(r.is(a.alt)===!1)continue;if(a.state.type===Yn){o.push(a);continue}let s=a.state.transitions.length;for(let c=0;c<s;c++){let u=a.state.transitions[c],l=n4(u,t);l!==void 0&&n.add({state:l,alt:a.alt,stack:a.stack})}}let i;if(o.length===0&&n.size===1&&(i=n),i===void 0){i=new Xn;for(let a of n.elements)Ia(a,i)}if(o.length>0&&!s4(i))for(let a of o)i.add(a);return i}function n4(e,t){if(e instanceof Vn&&P(t,e.tokenType))return e.target}function o4(e,t){let r;for(let n of e.elements)if(t.is(n.alt)===!0){if(r===void 0)r=n.alt;else if(r!==n.alt)return}return r}function rE(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}function tE(e,t,r,n){return n=nE(e,n),t.edges[r.tokenTypeIdx]=n,n}function nE(e,t){if(t===jo)return t;let r=t.configs.key,n=e.states[r];return n!==void 0?n:(t.configs.finalize(),e.states[r]=t,t)}function i4(e){let t=new Xn,r=e.transitions.length;for(let n=0;n<r;n++){let i={state:e.transitions[n].target,alt:n,stack:[]};Ia(i,t)}return t}function Ia(e,t){let r=e.state;if(r.type===Yn){if(e.stack.length>0){let o=[...e.stack],a={state:o.pop(),alt:e.alt,stack:o};Ia(a,t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);let n=r.transitions.length;for(let o=0;o<n;o++){let i=r.transitions[o],a=a4(e,i);a!==void 0&&Ia(a,t)}}function a4(e,t){if(t instanceof Do)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof qn){let r=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:r}}}function s4(e){for(let t of e.elements)if(t.state.type===Yn)return!0;return!1}function c4(e){for(let t of e.elements)if(t.state.type!==Yn)return!1;return!0}function u4(e){if(c4(e))return!0;let t=l4(e.elements);return f4(t)&&!p4(t)}function l4(e){let t=new Map;for(let r of e){let n=Mc(r,!1),o=t.get(n);o===void 0&&(o={},t.set(n,o)),o[r.alt]=!0}return t}function f4(e){for(let t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}function p4(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}function oE(e,t){e.RULE("literal",()=>{e.OR([{ALT:()=>e.SUBRULE(e.integerLiteral)},{ALT:()=>e.SUBRULE(e.floatingPointLiteral)},{ALT:()=>e.SUBRULE(e.booleanLiteral)},{ALT:()=>e.CONSUME(t.CharLiteral)},{ALT:()=>e.CONSUME(t.TextBlock)},{ALT:()=>e.CONSUME(t.StringLiteral)},{ALT:()=>e.CONSUME(t.Null)}])}),e.RULE("integerLiteral",()=>{e.OR([{ALT:()=>e.CONSUME(t.DecimalLiteral)},{ALT:()=>e.CONSUME(t.HexLiteral)},{ALT:()=>e.CONSUME(t.OctalLiteral)},{ALT:()=>e.CONSUME(t.BinaryLiteral)}])}),e.RULE("floatingPointLiteral",()=>{e.OR([{ALT:()=>e.CONSUME(t.FloatLiteral)},{ALT:()=>e.CONSUME(t.HexFloatLiteral)}])}),e.RULE("booleanLiteral",()=>{e.OR([{ALT:()=>e.CONSUME(t.True)},{ALT:()=>e.CONSUME(t.False)}])}),e.RULE("shiftOperator",()=>{e.OR([{GATE:()=>e.LA(1).startOffset+1===e.LA(2).startOffset,ALT:()=>{e.CONSUME(t.Less),e.CONSUME2(t.Less)}},{GATE:()=>e.LA(1).startOffset+1===e.LA(2).startOffset,ALT:()=>{e.CONSUME(t.Greater),e.CONSUME2(t.Greater),e.OPTION({GATE:()=>e.LA(0).startOffset+1===e.LA(1).startOffset,DEF:()=>e.CONSUME3(t.Greater)})}}])})}function iE(e,t){e.RULE("primitiveType",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.OR([{ALT:()=>e.SUBRULE(e.numericType)},{ALT:()=>e.CONSUME(t.Boolean)}])}),e.RULE("numericType",()=>{e.OR([{ALT:()=>e.SUBRULE(e.integralType)},{ALT:()=>e.SUBRULE(e.floatingPointType)}])}),e.RULE("integralType",()=>{e.OR([{ALT:()=>e.CONSUME(t.Byte)},{ALT:()=>e.CONSUME(t.Short)},{ALT:()=>e.CONSUME(t.Int)},{ALT:()=>e.CONSUME(t.Long)},{ALT:()=>e.CONSUME(t.Char)}])}),e.RULE("floatingPointType",()=>{e.OR([{ALT:()=>e.CONSUME(t.Float)},{ALT:()=>e.CONSUME(t.Double)}])}),e.RULE("referenceType",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.OR({DEF:[{ALT:()=>{e.SUBRULE(e.primitiveType),e.SUBRULE(e.dims)}},{ALT:()=>{e.SUBRULE(e.classOrInterfaceType),e.OPTION(()=>{e.SUBRULE2(e.dims)})}}],IGNORE_AMBIGUITIES:!0})}),e.RULE("classOrInterfaceType",()=>{e.SUBRULE(e.classType)}),e.RULE("classType",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.Identifier),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.MANY2(()=>{e.CONSUME(t.Dot),e.MANY3(()=>{e.SUBRULE2(e.annotation)}),e.CONSUME2(t.Identifier),e.OPTION2(()=>e.SUBRULE2(e.typeArguments))})}),e.RULE("interfaceType",()=>{e.SUBRULE(e.classType)}),e.RULE("typeVariable",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.Identifier)}),e.RULE("dims",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.LSquare),e.CONSUME(t.RSquare),e.MANY2({GATE:()=>e.BACKTRACK_LOOKAHEAD(e.isDims),DEF:()=>{e.MANY3(()=>{e.SUBRULE2(e.annotation)}),e.CONSUME2(t.LSquare),e.CONSUME2(t.RSquare)}})}),e.RULE("typeParameter",()=>{e.MANY(()=>{e.SUBRULE(e.typeParameterModifier)}),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.typeBound)})}),e.RULE("typeParameterModifier",()=>{e.SUBRULE(e.annotation)}),e.RULE("typeBound",()=>{e.CONSUME(t.Extends),e.SUBRULE(e.classOrInterfaceType),e.MANY(()=>{e.SUBRULE(e.additionalBound)})}),e.RULE("additionalBound",()=>{e.CONSUME(t.And),e.SUBRULE(e.interfaceType)}),e.RULE("typeArguments",()=>{e.CONSUME(t.Less),e.SUBRULE(e.typeArgumentList),e.CONSUME(t.Greater)}),e.RULE("typeArgumentList",()=>{e.SUBRULE(e.typeArgument),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.typeArgument)})}),e.RULE("typeArgument",()=>{e.OR([{ALT:()=>e.SUBRULE(e.referenceType)},{ALT:()=>e.SUBRULE(e.wildcard)}])}),e.RULE("wildcard",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.QuestionMark),e.OPTION(()=>{e.SUBRULE(e.wildcardBounds)})}),e.RULE("wildcardBounds",()=>{e.OR([{ALT:()=>e.CONSUME(t.Extends)},{ALT:()=>e.CONSUME(t.Super)}]),e.SUBRULE(e.referenceType)})}function aE(e,t){e.RULE("moduleName",()=>{e.CONSUME(t.Identifier),e.MANY(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)})}),e.RULE("packageName",()=>{e.CONSUME(t.Identifier),e.MANY(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)})}),e.RULE("typeName",()=>{e.CONSUME(t.Identifier),e.MANY(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)})}),e.RULE("expressionName",()=>{e.CONSUME(t.Identifier),e.MANY({GATE:()=>P(this.LA(2).tokenType,t.Identifier),DEF:()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)}})}),e.RULE("methodName",()=>{e.CONSUME(t.Identifier)}),e.RULE("packageOrTypeName",()=>{e.CONSUME(t.Identifier),e.MANY({GATE:()=>P(this.LA(2).tokenType,t.Star)===!1,DEF:()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)}})}),e.RULE("ambiguousName",()=>{e.CONSUME(t.Identifier),e.MANY(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)})})}function sE(e,t){e.RULE("compilationUnit",()=>{e.OR([{ALT:()=>e.SUBRULE(e.ordinaryCompilationUnit)},{ALT:()=>e.SUBRULE(e.modularCompilationUnit)},{ALT:()=>e.CONSUME(Je)}])}),e.RULE("ordinaryCompilationUnit",()=>{e.OPTION(()=>e.SUBRULE(e.packageDeclaration)),e.MANY(()=>{e.SUBRULE3(e.importDeclaration)}),e.MANY2(()=>{e.SUBRULE(e.typeDeclaration)})}),e.RULE("modularCompilationUnit",()=>{e.MANY(()=>{e.SUBRULE(e.importDeclaration)}),e.SUBRULE(e.moduleDeclaration)}),e.RULE("packageDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.packageModifier)}),e.CONSUME(t.Package),e.CONSUME(t.Identifier),e.MANY2(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)}),e.CONSUME2(t.Semicolon)}),e.RULE("packageModifier",()=>{e.SUBRULE(e.annotation)}),e.RULE("importDeclaration",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Import),e.OPTION(()=>{e.CONSUME(t.Static)}),e.SUBRULE(e.packageOrTypeName),e.OPTION2(()=>{e.CONSUME(t.Dot),e.CONSUME(t.Star)}),e.CONSUME(t.Semicolon)}},{ALT:()=>e.SUBRULE(e.emptyStatement)}])}),e.RULE("typeDeclaration",()=>{e.OR([{ALT:()=>e.CONSUME(t.Semicolon)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.SUBRULE(e.fieldDeclaration)},{ALT:()=>e.SUBRULE(e.methodDeclaration)}])}),e.RULE("moduleDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.OPTION(()=>{e.CONSUME(t.Open)}),e.CONSUME(t.Module),e.CONSUME(t.Identifier),e.MANY2(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)}),e.CONSUME(t.LCurly),e.MANY3(()=>{e.SUBRULE(e.moduleDirective)}),e.CONSUME(t.RCurly)}),e.RULE("moduleDirective",()=>{e.OR([{ALT:()=>e.SUBRULE(e.requiresModuleDirective)},{ALT:()=>e.SUBRULE(e.exportsModuleDirective)},{ALT:()=>e.SUBRULE(e.opensModuleDirective)},{ALT:()=>e.SUBRULE(e.usesModuleDirective)},{ALT:()=>e.SUBRULE(e.providesModuleDirective)}])}),e.RULE("requiresModuleDirective",()=>{e.CONSUME(t.Requires),e.MANY({GATE:()=>(P(e.LA(1).tokenType,t.Transitive)&&P(e.LA(2).tokenType,t.Separators))===!1,DEF:()=>{e.SUBRULE(e.requiresModifier)}}),e.SUBRULE(e.moduleName),e.CONSUME(t.Semicolon)}),e.RULE("exportsModuleDirective",()=>{e.CONSUME(t.Exports),e.SUBRULE(e.packageName),e.OPTION(()=>{e.CONSUME(t.To),e.SUBRULE(e.moduleName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.moduleName)})}),e.CONSUME(t.Semicolon)}),e.RULE("opensModuleDirective",()=>{e.CONSUME(t.Opens),e.SUBRULE(e.packageName),e.OPTION(()=>{e.CONSUME(t.To),e.SUBRULE(e.moduleName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.moduleName)})}),e.CONSUME(t.Semicolon)}),e.RULE("usesModuleDirective",()=>{e.CONSUME(t.Uses),e.SUBRULE(e.typeName),e.CONSUME(t.Semicolon)}),e.RULE("providesModuleDirective",()=>{e.CONSUME(t.Provides),e.SUBRULE(e.typeName),e.CONSUME(t.With),e.SUBRULE2(e.typeName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE3(e.typeName)}),e.CONSUME(t.Semicolon)}),e.RULE("requiresModifier",()=>{e.OR([{ALT:()=>e.CONSUME(t.Transitive)},{ALT:()=>e.CONSUME(t.Static)}])})}function cE(e,t){e.RULE("classDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.classModifier)}),e.OR([{ALT:()=>e.SUBRULE(e.normalClassDeclaration)},{ALT:()=>e.SUBRULE(e.enumDeclaration)},{ALT:()=>e.SUBRULE(e.recordDeclaration)}])}),e.RULE("normalClassDeclaration",()=>{e.CONSUME(t.Class),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.typeParameters)}),e.OPTION2(()=>{e.SUBRULE(e.classExtends)}),e.OPTION3(()=>{e.SUBRULE(e.classImplements)}),e.OPTION4(()=>{e.SUBRULE(e.classPermits)}),e.SUBRULE(e.classBody)}),e.RULE("classModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Abstract)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Final)},{ALT:()=>e.CONSUME(t.Sealed)},{ALT:()=>e.CONSUME(t.NonSealed)},{ALT:()=>e.CONSUME(t.Strictfp)}])}),e.RULE("typeParameters",()=>{e.CONSUME(t.Less),e.SUBRULE(e.typeParameterList),e.CONSUME(t.Greater)}),e.RULE("typeParameterList",()=>{e.SUBRULE(e.typeParameter),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.typeParameter)})}),e.RULE("classExtends",()=>{e.CONSUME(t.Extends),e.SUBRULE(e.classType)}),e.RULE("classImplements",()=>{e.CONSUME(t.Implements),e.SUBRULE(e.interfaceTypeList)}),e.RULE("interfaceTypeList",()=>{e.SUBRULE(e.interfaceType),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.interfaceType)})}),e.RULE("classPermits",()=>{e.CONSUME(t.Permits),e.SUBRULE(e.typeName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.typeName)})}),e.RULE("classBody",()=>{e.CONSUME(t.LCurly),e.MANY(()=>{e.SUBRULE(e.classBodyDeclaration)}),e.CONSUME(t.RCurly)}),e.RULE("classBodyDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.classMemberDeclaration)},{ALT:()=>e.SUBRULE(e.instanceInitializer)},{ALT:()=>e.SUBRULE(e.staticInitializer)},{ALT:()=>e.SUBRULE(e.constructorDeclaration)}])}),e.RULE("classMemberDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.fieldDeclaration)},{ALT:()=>e.SUBRULE(e.methodDeclaration)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.CONSUME(t.Semicolon)}])}),e.RULE("fieldDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.fieldModifier)}),e.SUBRULE(e.unannType),e.SUBRULE(e.variableDeclaratorList),e.CONSUME(t.Semicolon)}),e.RULE("fieldModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Final)},{ALT:()=>e.CONSUME(t.Transient)},{ALT:()=>e.CONSUME(t.Volatile)}])}),e.RULE("variableDeclaratorList",r=>{e.SUBRULE(e.variableDeclarator),e.MANY({GATE:()=>!r,DEF:()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.variableDeclarator)}})}),e.RULE("variableDeclarator",()=>{e.SUBRULE(e.variableDeclaratorId),e.OPTION(()=>{e.CONSUME(t.Equals),e.SUBRULE(e.variableInitializer)})}),e.RULE("variableDeclaratorId",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Identifier),e.OPTION(()=>{e.SUBRULE(e.dims)})}},{ALT:()=>e.CONSUME(t.Underscore)}])}),e.RULE("variableInitializer",()=>{e.OR([{ALT:()=>e.SUBRULE(e.expression)},{ALT:()=>e.SUBRULE(e.arrayInitializer)}])}),e.RULE("unannType",()=>{e.OR([{ALT:()=>e.SUBRULE(e.unannPrimitiveTypeWithOptionalDimsSuffix)},{ALT:()=>e.SUBRULE(e.unannReferenceType)}])}),e.RULE("unannPrimitiveTypeWithOptionalDimsSuffix",()=>{e.SUBRULE(e.unannPrimitiveType),e.OPTION({GATE:()=>this.BACKTRACK_LOOKAHEAD(e.isDims),DEF:()=>e.SUBRULE2(e.dims)})}),e.RULE("unannPrimitiveType",()=>{e.OR([{ALT:()=>e.SUBRULE(e.numericType)},{ALT:()=>e.CONSUME(t.Boolean)}])}),e.RULE("unannReferenceType",()=>{e.SUBRULE(e.unannClassOrInterfaceType),e.OPTION({GATE:()=>this.BACKTRACK_LOOKAHEAD(e.isDims),DEF:()=>e.SUBRULE2(e.dims)})}),e.RULE("unannClassOrInterfaceType",()=>{e.SUBRULE(e.unannClassType)}),e.RULE("unannClassType",()=>{e.CONSUME(t.Identifier),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.MANY2(()=>{e.CONSUME(t.Dot),e.MANY3(()=>{e.SUBRULE2(e.annotation)}),e.CONSUME2(t.Identifier),e.OPTION2(()=>{e.SUBRULE2(e.typeArguments)})})}),e.RULE("unannInterfaceType",()=>{e.SUBRULE(e.unannClassType)}),e.RULE("unannTypeVariable",()=>{e.CONSUME(t.Identifier)}),e.RULE("methodDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.methodModifier)}),e.SUBRULE(e.methodHeader),e.SUBRULE(e.methodBody)}),e.RULE("methodModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Abstract)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Final)},{ALT:()=>e.CONSUME(t.Synchronized)},{ALT:()=>e.CONSUME(t.Native)},{ALT:()=>e.CONSUME(t.Strictfp)}])}),e.RULE("methodHeader",()=>{e.OPTION(()=>{e.SUBRULE(e.typeParameters),e.MANY(()=>{e.SUBRULE(e.annotation)})}),e.SUBRULE(e.result),e.SUBRULE(e.methodDeclarator),e.OPTION2(()=>{e.SUBRULE(e.throws)})}),e.RULE("result",()=>{e.OR([{ALT:()=>e.SUBRULE(e.unannType)},{ALT:()=>e.CONSUME(t.Void)}])}),e.RULE("methodDeclarator",()=>{e.CONSUME(t.Identifier),e.CONSUME(t.LBrace),e.OR([{ALT:()=>{e.SUBRULE(e.receiverParameter),e.OPTION(()=>{e.CONSUME(t.Comma),e.SUBRULE(e.formalParameterList)})}},{ALT:()=>e.OPTION1(()=>e.SUBRULE1(e.formalParameterList))}]),e.CONSUME(t.RBrace),e.OPTION2(()=>{e.SUBRULE(e.dims)})}),e.RULE("receiverParameter",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.SUBRULE(e.unannType),e.OPTION(()=>{e.CONSUME(t.Identifier),e.CONSUME(t.Dot)}),e.CONSUME(t.This)}),e.RULE("formalParameterList",()=>{e.SUBRULE(e.formalParameter),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.formalParameter)})}),e.RULE("formalParameter",()=>{e.OR([{ALT:()=>e.SUBRULE(e.variableParaRegularParameter)},{ALT:()=>e.SUBRULE(e.variableArityParameter)}])}),e.RULE("variableParaRegularParameter",()=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.unannType),e.SUBRULE(e.variableDeclaratorId)}),e.RULE("variableArityParameter",()=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.unannType),e.MANY2(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.DotDotDot),e.CONSUME(t.Identifier)}),e.RULE("variableModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Final)}])}),e.RULE("throws",()=>{e.CONSUME(t.Throws),e.SUBRULE(e.exceptionTypeList)}),e.RULE("exceptionTypeList",()=>{e.SUBRULE(e.exceptionType),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.exceptionType)})}),e.RULE("exceptionType",()=>{e.SUBRULE(e.classType)}),e.RULE("methodBody",()=>{e.OR([{ALT:()=>e.SUBRULE(e.block)},{ALT:()=>e.CONSUME(t.Semicolon)}])}),e.RULE("instanceInitializer",()=>{e.SUBRULE(e.block)}),e.RULE("staticInitializer",()=>{e.CONSUME(t.Static),e.SUBRULE(e.block)}),e.RULE("constructorDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.constructorModifier)}),e.SUBRULE(e.constructorDeclarator),e.OPTION(()=>{e.SUBRULE(e.throws)}),e.SUBRULE(e.constructorBody)}),e.RULE("constructorModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)}])}),e.RULE("constructorDeclarator",()=>{e.OPTION(()=>{e.SUBRULE(e.typeParameters)}),e.SUBRULE(e.simpleTypeName),e.CONSUME(t.LBrace),e.OR([{ALT:()=>{e.SUBRULE(e.receiverParameter),e.OPTION1(()=>{e.CONSUME(t.Comma),e.SUBRULE(e.formalParameterList)})}},{ALT:()=>e.OPTION2(()=>e.SUBRULE1(e.formalParameterList))}]),e.CONSUME(t.RBrace)}),e.RULE("simpleTypeName",()=>{e.SUBRULE(e.typeIdentifier)}),e.RULE("constructorBody",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.explicitConstructorInvocation)}),e.OPTION2(()=>{e.SUBRULE(e.blockStatements)}),e.CONSUME(t.RCurly)}),e.RULE("explicitConstructorInvocation",()=>{e.OR([{ALT:()=>e.SUBRULE(e.unqualifiedExplicitConstructorInvocation)},{ALT:()=>e.SUBRULE(e.qualifiedExplicitConstructorInvocation)}])}),e.RULE("unqualifiedExplicitConstructorInvocation",()=>{e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.OR([{ALT:()=>e.CONSUME(t.This)},{ALT:()=>e.CONSUME(t.Super)}]),e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace),e.CONSUME(t.Semicolon)}),e.RULE("qualifiedExplicitConstructorInvocation",()=>{e.SUBRULE(e.expressionName),e.CONSUME(t.Dot),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.CONSUME(t.Super),e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace),e.CONSUME(t.Semicolon)}),e.RULE("enumDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.classModifier)}),e.CONSUME(t.Enum),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.classImplements)}),e.SUBRULE(e.enumBody)}),e.RULE("enumBody",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.enumConstantList)}),e.OPTION2(()=>{e.CONSUME(t.Comma)}),e.OPTION3(()=>{e.SUBRULE(e.enumBodyDeclarations)}),e.CONSUME(t.RCurly)}),e.RULE("enumConstantList",()=>{e.SUBRULE(e.enumConstant),e.MANY({GATE:()=>{let r=e.LA(2);return P(r,t.Identifier)||P(r,t.At)},DEF:()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.enumConstant)}})}),e.RULE("enumConstant",()=>{e.MANY(()=>{e.SUBRULE(e.enumConstantModifier)}),e.CONSUME(t.Identifier),e.OPTION(()=>{e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace)}),e.OPTION3(()=>{e.SUBRULE(e.classBody)})}),e.RULE("enumConstantModifier",()=>{e.SUBRULE(e.annotation)}),e.RULE("enumBodyDeclarations",()=>{e.CONSUME(t.Semicolon),e.MANY(()=>{e.SUBRULE(e.classBodyDeclaration)})}),e.RULE("recordDeclaration",()=>{e.CONSUME(t.Record),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.typeParameters)}),e.SUBRULE(e.recordHeader),e.OPTION2(()=>{e.SUBRULE(e.classImplements)}),e.SUBRULE(e.recordBody)}),e.RULE("recordHeader",()=>{e.CONSUME(t.LBrace),e.OPTION(()=>{e.SUBRULE(e.recordComponentList)}),e.CONSUME(t.RBrace)}),e.RULE("recordComponentList",()=>{e.SUBRULE(e.recordComponent),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.recordComponent)})}),e.RULE("recordComponent",()=>{e.MANY(()=>{e.SUBRULE(e.recordComponentModifier)}),e.SUBRULE(e.unannType),e.OR([{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.SUBRULE(e.variableArityRecordComponent)}])}),e.RULE("variableArityRecordComponent",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.DotDotDot),e.CONSUME(t.Identifier)}),e.RULE("recordComponentModifier",()=>{e.SUBRULE(e.annotation)}),e.RULE("recordBody",()=>{e.CONSUME(t.LCurly),e.MANY(()=>{e.SUBRULE(e.recordBodyDeclaration)}),e.CONSUME(t.RCurly)}),e.RULE("recordBodyDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.compactConstructorDeclaration)},{ALT:()=>e.SUBRULE(e.classBodyDeclaration)}])}),e.RULE("compactConstructorDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.constructorModifier)}),e.SUBRULE(e.simpleTypeName),e.SUBRULE(e.constructorBody)}),e.RULE("isDims",()=>(e.MANY(e.annotation),P(this.LA(1),t.LSquare)&&P(this.LA(2),t.RSquare)))}function uE(e,t){e.RULE("interfaceDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.interfaceModifier)}),e.OR([{ALT:()=>e.SUBRULE(e.normalInterfaceDeclaration)},{ALT:()=>e.SUBRULE(e.annotationInterfaceDeclaration)}])}),e.RULE("normalInterfaceDeclaration",()=>{e.CONSUME(t.Interface),e.SUBRULE(e.typeIdentifier),e.OPTION(()=>{e.SUBRULE(e.typeParameters)}),e.OPTION2(()=>{e.SUBRULE(e.interfaceExtends)}),e.OPTION3(()=>{e.SUBRULE(e.interfacePermits)}),e.SUBRULE(e.interfaceBody)}),e.RULE("interfaceModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Protected)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Abstract)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Sealed)},{ALT:()=>e.CONSUME(t.NonSealed)},{ALT:()=>e.CONSUME(t.Strictfp)}])}),e.RULE("interfaceExtends",()=>{e.CONSUME(t.Extends),e.SUBRULE(e.interfaceTypeList)}),e.RULE("interfacePermits",()=>{e.CONSUME(t.Permits),e.SUBRULE(e.typeName),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.typeName)})}),e.RULE("interfaceBody",()=>{e.CONSUME(t.LCurly),e.MANY(()=>{e.SUBRULE(e.interfaceMemberDeclaration)}),e.CONSUME(t.RCurly)}),e.RULE("interfaceMemberDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.constantDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceMethodDeclaration)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.CONSUME(t.Semicolon)}])}),e.RULE("constantDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.constantModifier)}),e.SUBRULE(e.unannType),e.SUBRULE(e.variableDeclaratorList),e.CONSUME(t.Semicolon)}),e.RULE("constantModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Final)}])}),e.RULE("interfaceMethodDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.interfaceMethodModifier)}),e.SUBRULE(e.methodHeader),e.SUBRULE(e.methodBody)}),e.RULE("interfaceMethodModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Private)},{ALT:()=>e.CONSUME(t.Abstract)},{ALT:()=>e.CONSUME(t.Default)},{ALT:()=>e.CONSUME(t.Static)},{ALT:()=>e.CONSUME(t.Strictfp)}])}),e.RULE("annotationInterfaceDeclaration",()=>{e.CONSUME(t.At),e.CONSUME(t.Interface),e.SUBRULE(e.typeIdentifier),e.SUBRULE(e.annotationInterfaceBody)}),e.RULE("annotationInterfaceBody",()=>{e.CONSUME(t.LCurly),e.MANY(()=>{e.SUBRULE(e.annotationInterfaceMemberDeclaration)}),e.CONSUME(t.RCurly)}),e.RULE("annotationInterfaceMemberDeclaration",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotationInterfaceElementDeclaration)},{ALT:()=>e.SUBRULE(e.constantDeclaration)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.CONSUME(t.Semicolon)}])}),e.RULE("annotationInterfaceElementDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.annotationInterfaceElementModifier)}),e.SUBRULE(e.unannType),e.CONSUME(t.Identifier),e.CONSUME(t.LBrace),e.CONSUME(t.RBrace),e.OPTION(()=>{e.SUBRULE(e.dims)}),e.OPTION2(()=>{e.SUBRULE(e.defaultValue)}),e.CONSUME(t.Semicolon)}),e.RULE("annotationInterfaceElementModifier",()=>{e.OR([{ALT:()=>e.SUBRULE(e.annotation)},{ALT:()=>e.CONSUME(t.Public)},{ALT:()=>e.CONSUME(t.Abstract)}])}),e.RULE("defaultValue",()=>{e.CONSUME(t.Default),e.SUBRULE(e.elementValue)}),e.RULE("annotation",()=>{e.CONSUME(t.At),e.SUBRULE(e.typeName),e.OPTION(()=>{e.CONSUME(t.LBrace),e.OR({DEF:[{ALT:()=>e.SUBRULE(e.elementValuePairList)},{ALT:()=>e.SUBRULE(e.elementValue)},{ALT:()=>{}}],IGNORE_AMBIGUITIES:!0}),e.CONSUME(t.RBrace)})}),e.RULE("elementValuePairList",()=>{e.SUBRULE(e.elementValuePair),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.elementValuePair)})}),e.RULE("elementValuePair",()=>{e.CONSUME(t.Identifier),e.CONSUME(t.Equals),e.SUBRULE(e.elementValue)}),e.RULE("elementValue",()=>{e.OR([{ALT:()=>e.SUBRULE(e.conditionalExpression)},{ALT:()=>e.SUBRULE(e.elementValueArrayInitializer)},{ALT:()=>e.SUBRULE(e.annotation)}])}),e.RULE("elementValueArrayInitializer",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.elementValueList)}),e.OPTION2(()=>{e.CONSUME(t.Comma)}),e.CONSUME(t.RCurly)}),e.RULE("elementValueList",()=>{e.SUBRULE(e.elementValue),e.MANY({GATE:()=>P(e.LA(2).tokenType,t.RCurly)===!1,DEF:()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.elementValue)}})})}function lE(e,t){e.RULE("arrayInitializer",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.variableInitializerList)}),e.OPTION2(()=>{e.CONSUME(t.Comma)}),e.CONSUME(t.RCurly)}),e.RULE("variableInitializerList",()=>{e.SUBRULE(e.variableInitializer),e.MANY({GATE:()=>P(this.LA(2).tokenType,t.RCurly)===!1,DEF:()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.variableInitializer)}})})}function fE(e,t){e.RULE("block",()=>{e.CONSUME(t.LCurly),e.OPTION(()=>{e.SUBRULE(e.blockStatements)}),e.CONSUME(t.RCurly)}),e.RULE("blockStatements",()=>{e.SUBRULE(e.blockStatement),e.MANY(()=>{e.SUBRULE2(e.blockStatement)})}),e.RULE("blockStatement",()=>{e.OR({DEF:[{ALT:()=>e.SUBRULE(e.localVariableDeclarationStatement)},{ALT:()=>e.SUBRULE(e.classDeclaration)},{ALT:()=>e.SUBRULE(e.interfaceDeclaration)},{ALT:()=>e.SUBRULE(e.statement)}],IGNORE_AMBIGUITIES:!0})}),e.RULE("localVariableDeclarationStatement",()=>{e.SUBRULE(e.localVariableDeclaration),e.CONSUME(t.Semicolon)}),e.RULE("localVariableDeclaration",r=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.localVariableType),e.SUBRULE(e.variableDeclaratorList,{ARGS:[r]})}),e.RULE("localVariableType",()=>{e.OR({DEF:[{ALT:()=>e.SUBRULE(e.unannType)},{ALT:()=>e.CONSUME(t.Var)}],IGNORE_AMBIGUITIES:!0})}),e.RULE("statement",()=>{e.OR([{ALT:()=>e.SUBRULE(e.statementWithoutTrailingSubstatement)},{ALT:()=>e.SUBRULE(e.labeledStatement)},{ALT:()=>e.SUBRULE(e.ifStatement)},{ALT:()=>e.SUBRULE(e.whileStatement)},{ALT:()=>e.SUBRULE(e.forStatement)}])}),e.RULE("statementWithoutTrailingSubstatement",()=>{e.OR({DEF:[{ALT:()=>e.SUBRULE(e.block)},{ALT:()=>e.SUBRULE(e.yieldStatement)},{ALT:()=>e.SUBRULE(e.emptyStatement)},{GATE:()=>!P(this.LA(1).tokenType,t.Switch),ALT:()=>e.SUBRULE(e.expressionStatement)},{ALT:()=>e.SUBRULE(e.assertStatement)},{ALT:()=>e.SUBRULE(e.switchStatement)},{ALT:()=>e.SUBRULE(e.doStatement)},{ALT:()=>e.SUBRULE(e.breakStatement)},{ALT:()=>e.SUBRULE(e.continueStatement)},{ALT:()=>e.SUBRULE(e.returnStatement)},{ALT:()=>e.SUBRULE(e.synchronizedStatement)},{ALT:()=>e.SUBRULE(e.throwStatement)},{ALT:()=>e.SUBRULE(e.tryStatement)}],IGNORE_AMBIGUITIES:!0})}),e.RULE("emptyStatement",()=>{e.CONSUME(t.Semicolon)}),e.RULE("labeledStatement",()=>{e.CONSUME(t.Identifier),e.CONSUME(t.Colon),e.SUBRULE(e.statement)}),e.RULE("expressionStatement",()=>{e.SUBRULE(e.statementExpression),e.CONSUME(t.Semicolon)}),e.RULE("statementExpression",()=>{e.SUBRULE(e.expression)}),e.RULE("ifStatement",()=>{e.CONSUME(t.If),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.statement),e.OPTION(()=>{e.CONSUME(t.Else),e.SUBRULE2(e.statement)})}),e.RULE("assertStatement",()=>{e.CONSUME(t.Assert),e.SUBRULE(e.expression),e.OPTION(()=>{e.CONSUME(t.Colon),e.SUBRULE2(e.expression)}),e.CONSUME(t.Semicolon)}),e.RULE("switchStatement",()=>{e.CONSUME(t.Switch),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.switchBlock)}),e.RULE("switchBlock",()=>{e.CONSUME(t.LCurly),e.OR([{ALT:()=>{e.SUBRULE(e.switchRule),e.MANY(()=>e.SUBRULE2(e.switchRule))}},{ALT:()=>e.MANY2(()=>e.SUBRULE(e.switchBlockStatementGroup))}]),e.CONSUME(t.RCurly)}),e.RULE("switchBlockStatementGroup",()=>{e.SUBRULE(e.switchLabel),e.CONSUME(t.Colon),e.OPTION(()=>{e.SUBRULE(e.blockStatements)})}),e.RULE("switchLabel",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Case),e.OR2([{ALT:()=>{e.CONSUME(t.Null),e.OPTION2(()=>{e.CONSUME3(t.Comma),e.CONSUME(t.Default)})}},{ALT:()=>{e.SUBRULE(e.casePattern),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.casePattern)}),e.OPTION(()=>{e.SUBRULE(e.guard)})}},{GATE:()=>!P(e.LA(1).tokenType,t.Null),ALT:()=>{e.SUBRULE(e.caseConstant),e.MANY2(()=>{e.CONSUME2(t.Comma),e.SUBRULE2(e.caseConstant)})}}])}},{ALT:()=>e.CONSUME2(t.Default)}])}),e.RULE("switchRule",()=>{e.SUBRULE(e.switchLabel),e.CONSUME(t.Arrow),e.OR([{ALT:()=>e.SUBRULE(e.throwStatement)},{ALT:()=>e.SUBRULE(e.block)},{ALT:()=>{e.SUBRULE(e.expression),e.CONSUME(t.Semicolon)}}])}),e.RULE("caseConstant",()=>{e.SUBRULE(e.conditionalExpression)}),e.RULE("casePattern",()=>{e.SUBRULE(e.pattern)}),e.RULE("whileStatement",()=>{e.CONSUME(t.While),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.statement)}),e.RULE("doStatement",()=>{e.CONSUME(t.Do),e.SUBRULE(e.statement),e.CONSUME(t.While),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.CONSUME(t.Semicolon)}),e.RULE("forStatement",()=>{e.OR([{ALT:()=>e.SUBRULE(e.basicForStatement)},{ALT:()=>e.SUBRULE(e.enhancedForStatement)}])}),e.RULE("basicForStatement",()=>{e.CONSUME(t.For),e.CONSUME(t.LBrace),e.OPTION(()=>{e.SUBRULE(e.forInit)}),e.CONSUME(t.Semicolon),e.OPTION2(()=>{e.SUBRULE(e.expression)}),e.CONSUME2(t.Semicolon),e.OPTION3(()=>{e.SUBRULE(e.forUpdate)}),e.CONSUME(t.RBrace),e.SUBRULE(e.statement)}),e.RULE("forInit",()=>{e.OR([{ALT:()=>e.SUBRULE(e.localVariableDeclaration)},{ALT:()=>e.SUBRULE(e.statementExpressionList)}])}),e.RULE("forUpdate",()=>{e.SUBRULE(e.statementExpressionList)}),e.RULE("statementExpressionList",()=>{e.SUBRULE(e.statementExpression),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.statementExpression)})}),e.RULE("enhancedForStatement",()=>{e.CONSUME(t.For),e.CONSUME(t.LBrace),e.SUBRULE(e.localVariableDeclaration),e.CONSUME(t.Colon),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.statement)}),e.RULE("breakStatement",()=>{e.CONSUME(t.Break),e.OPTION(()=>{e.CONSUME(t.Identifier)}),e.CONSUME(t.Semicolon)}),e.RULE("continueStatement",()=>{e.CONSUME(t.Continue),e.OPTION(()=>{e.CONSUME(t.Identifier)}),e.CONSUME(t.Semicolon)}),e.RULE("returnStatement",()=>{e.CONSUME(t.Return),e.OPTION(()=>{e.SUBRULE(e.expression)}),e.CONSUME(t.Semicolon)}),e.RULE("throwStatement",()=>{e.CONSUME(t.Throw),e.SUBRULE(e.expression),e.CONSUME(t.Semicolon)}),e.RULE("synchronizedStatement",()=>{e.CONSUME(t.Synchronized),e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace),e.SUBRULE(e.block)}),e.RULE("tryStatement",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Try),e.SUBRULE(e.block),e.OR2([{ALT:()=>{e.SUBRULE(e.catches),e.OPTION(()=>{e.SUBRULE(e.finally)})}},{ALT:()=>e.SUBRULE2(e.finally)}])}},{ALT:()=>e.SUBRULE(e.tryWithResourcesStatement)}])}),e.RULE("catches",()=>{e.SUBRULE(e.catchClause),e.MANY(()=>{e.SUBRULE2(e.catchClause)})}),e.RULE("catchClause",()=>{e.CONSUME(t.Catch),e.CONSUME(t.LBrace),e.SUBRULE(e.catchFormalParameter),e.CONSUME(t.RBrace),e.SUBRULE(e.block)}),e.RULE("catchFormalParameter",()=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.catchType),e.SUBRULE(e.variableDeclaratorId)}),e.RULE("catchType",()=>{e.SUBRULE(e.unannClassType),e.MANY(()=>{e.CONSUME(t.Or),e.SUBRULE2(e.classType)})}),e.RULE("finally",()=>{e.CONSUME(t.Finally),e.SUBRULE(e.block)}),e.RULE("tryWithResourcesStatement",()=>{e.CONSUME(t.Try),e.SUBRULE(e.resourceSpecification),e.SUBRULE(e.block),e.OPTION(()=>{e.SUBRULE(e.catches)}),e.OPTION2(()=>{e.SUBRULE(e.finally)})}),e.RULE("resourceSpecification",()=>{e.CONSUME(t.LBrace),e.SUBRULE(e.resourceList),e.OPTION(()=>{e.CONSUME(t.Semicolon)}),e.CONSUME(t.RBrace)}),e.RULE("resourceList",()=>{e.SUBRULE(e.resource),e.MANY({GATE:()=>P(e.LA(2).tokenType,t.RBrace)===!1,DEF:()=>{e.CONSUME(t.Semicolon),e.SUBRULE2(e.resource)}})}),e.RULE("resource",()=>{e.OR([{ALT:()=>e.SUBRULE(e.localVariableDeclaration)},{ALT:()=>e.SUBRULE(e.variableAccess)}])}),e.RULE("yieldStatement",()=>{e.CONSUME(t.Yield),e.SUBRULE(e.expression),e.CONSUME(t.Semicolon)}),e.RULE("variableAccess",()=>{e.SUBRULE(e.primary)})}function pE(e,t){e.RULE("expression",()=>{e.OR([{ALT:()=>e.SUBRULE(e.lambdaExpression)},{ALT:()=>e.SUBRULE(e.conditionalExpression)}])}),e.RULE("lambdaExpression",()=>{e.SUBRULE(e.lambdaParameters),e.CONSUME(t.Arrow),e.SUBRULE(e.lambdaBody)}),e.RULE("lambdaParameters",()=>{e.OR([{ALT:()=>e.SUBRULE(e.lambdaParametersWithBraces)},{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.CONSUME(t.Underscore)}])}),e.RULE("lambdaParametersWithBraces",()=>{e.CONSUME(t.LBrace),e.OPTION(()=>{e.SUBRULE(e.lambdaParameterList)}),e.CONSUME(t.RBrace)}),e.RULE("lambdaParameterList",()=>{e.OR([{GATE:()=>{let r=this.LA(1).tokenType,n=this.LA(2).tokenType;return(P(r,t.Identifier)||P(r,t.Underscore))&&(P(n,t.RBrace)||P(n,t.Comma))},ALT:()=>e.SUBRULE(e.conciseLambdaParameterList)},{ALT:()=>e.SUBRULE(e.normalLambdaParameterList)}])}),e.RULE("conciseLambdaParameterList",()=>{e.SUBRULE(e.conciseLambdaParameter),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.conciseLambdaParameter)})}),e.RULE("normalLambdaParameterList",()=>{e.SUBRULE(e.normalLambdaParameter),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.normalLambdaParameter)})}),e.RULE("normalLambdaParameter",()=>{e.OR([{ALT:()=>e.SUBRULE(e.regularLambdaParameter)},{ALT:()=>e.SUBRULE(e.variableArityParameter)}])}),e.RULE("regularLambdaParameter",()=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.lambdaParameterType),e.SUBRULE(e.variableDeclaratorId)}),e.RULE("lambdaParameterType",()=>{e.OR({DEF:[{ALT:()=>e.SUBRULE(e.unannType)},{ALT:()=>e.CONSUME(t.Var)}],IGNORE_AMBIGUITIES:!0})}),e.RULE("conciseLambdaParameter",()=>{e.OR([{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.CONSUME(t.Underscore)}])}),e.RULE("lambdaBody",()=>{e.OR([{ALT:()=>e.SUBRULE(e.expression)},{ALT:()=>e.SUBRULE(e.block)}])}),e.RULE("conditionalExpression",()=>{e.SUBRULE(e.binaryExpression),e.OPTION(()=>{e.CONSUME(t.QuestionMark),e.SUBRULE(e.expression),e.CONSUME(t.Colon),e.SUBRULE2(e.expression)})}),e.RULE("binaryExpression",()=>{e.SUBRULE(e.unaryExpression),e.MANY(()=>{e.OR({DEF:[{ALT:()=>{e.CONSUME(t.Instanceof),e.OR1([{ALT:()=>e.SUBRULE(e.pattern)},{ALT:()=>e.SUBRULE(e.referenceType)}])}},{ALT:()=>{e.CONSUME(t.AssignmentOperator),e.SUBRULE2(e.expression)}},{GATE:()=>P(e.LA(2).tokenType,t.Less)||P(e.LA(2).tokenType,t.Greater),ALT:()=>{e.SUBRULE(e.shiftOperator),e.SUBRULE2(e.unaryExpression)}},{ALT:()=>{e.CONSUME(t.BinaryOperator),e.SUBRULE3(e.unaryExpression)}}],IGNORE_AMBIGUITIES:!0})})}),e.RULE("unaryExpression",()=>{e.MANY(()=>{e.CONSUME(t.UnaryPrefixOperator)}),e.SUBRULE(e.primary),e.MANY2(()=>{e.CONSUME(t.UnarySuffixOperator)})}),e.RULE("unaryExpressionNotPlusMinus",()=>{e.MANY(()=>{e.CONSUME(t.UnaryPrefixOperatorNotPlusMinus)}),e.SUBRULE(e.primary),e.MANY2(()=>{e.CONSUME(t.UnarySuffixOperator)})}),e.RULE("primary",()=>{e.SUBRULE(e.primaryPrefix),e.MANY(()=>{e.SUBRULE(e.primarySuffix)})}),e.RULE("primaryPrefix",()=>{e.OR([{ALT:()=>e.SUBRULE(e.literal)},{ALT:()=>e.CONSUME(t.This)},{ALT:()=>e.CONSUME(t.Void)},{ALT:()=>e.SUBRULE(e.unannPrimitiveTypeWithOptionalDimsSuffix)},{ALT:()=>e.SUBRULE(e.fqnOrRefType)},{ALT:()=>e.SUBRULE(e.castExpression)},{ALT:()=>e.SUBRULE(e.parenthesisExpression)},{ALT:()=>e.SUBRULE(e.newExpression)},{ALT:()=>e.SUBRULE(e.switchStatement)}])}),e.RULE("primarySuffix",()=>{e.OR([{ALT:()=>{e.CONSUME(t.Dot),e.OR2([{ALT:()=>e.CONSUME(t.This)},{ALT:()=>e.SUBRULE(e.unqualifiedClassInstanceCreationExpression)},{ALT:()=>{e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.CONSUME(t.Identifier)}},{ALT:()=>e.SUBRULE(e.templateArgument)}])}},{ALT:()=>e.SUBRULE(e.methodInvocationSuffix)},{ALT:()=>e.SUBRULE(e.classLiteralSuffix)},{ALT:()=>e.SUBRULE(e.arrayAccessSuffix)},{ALT:()=>e.SUBRULE(e.methodReferenceSuffix)}])}),e.RULE("fqnOrRefType",()=>{e.SUBRULE(e.fqnOrRefTypePartFirst),e.MANY({GATE:()=>{let r=e.LA(2);return!(P(r,t.Class)||P(r,t.This)||P(r,t.New)||P(r,t.StringLiteral)||P(r,t.TextBlock)||P(r,t.StringTemplateBegin)||P(r,t.TextBlockTemplateBegin))},DEF:()=>{e.CONSUME(t.Dot),e.SUBRULE2(e.fqnOrRefTypePartRest)}}),e.OPTION({GATE:()=>P(e.LA(1).tokenType,t.At)||P(e.LA(2).tokenType,t.RSquare),DEF:()=>{e.SUBRULE(e.dims)}})}),e.RULE("fqnOrRefTypePartRest",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.OPTION(()=>e.SUBRULE2(e.typeArguments)),e.SUBRULE(e.fqnOrRefTypePartCommon)}),e.RULE("fqnOrRefTypePartCommon",()=>{e.OR([{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.CONSUME(t.Super)}]);let r=!1;P(e.LA(1).tokenType,t.Less)&&(r=this.BACKTRACK_LOOKAHEAD(e.isRefTypeInMethodRef)),e.OPTION2({GATE:()=>r,DEF:()=>{e.SUBRULE3(e.typeArguments)}})}),e.RULE("fqnOrRefTypePartFirst",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.SUBRULE(e.fqnOrRefTypePartCommon)}),e.RULE("parenthesisExpression",()=>{e.CONSUME(t.LBrace),e.SUBRULE(e.expression),e.CONSUME(t.RBrace)}),e.RULE("castExpression",()=>{e.OR([{ALT:()=>e.SUBRULE(e.primitiveCastExpression)},{ALT:()=>e.SUBRULE(e.referenceTypeCastExpression)}])}),e.RULE("primitiveCastExpression",()=>{e.CONSUME(t.LBrace),e.SUBRULE(e.primitiveType),e.CONSUME(t.RBrace),e.SUBRULE(e.unaryExpression)}),e.RULE("referenceTypeCastExpression",()=>{e.CONSUME(t.LBrace),e.SUBRULE(e.referenceType),e.MANY(()=>{e.SUBRULE(e.additionalBound)}),e.CONSUME(t.RBrace),e.OR([{ALT:()=>e.SUBRULE(e.lambdaExpression)},{ALT:()=>e.SUBRULE(e.unaryExpressionNotPlusMinus)}])}),e.RULE("newExpression",()=>{e.OR([{ALT:()=>e.SUBRULE(e.arrayCreationExpression)},{ALT:()=>e.SUBRULE(e.unqualifiedClassInstanceCreationExpression)}])}),e.RULE("unqualifiedClassInstanceCreationExpression",()=>{e.CONSUME(t.New),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.SUBRULE(e.classOrInterfaceTypeToInstantiate),e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace),e.OPTION3(()=>{e.SUBRULE(e.classBody)})}),e.RULE("classOrInterfaceTypeToInstantiate",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.Identifier),e.MANY2(()=>{e.CONSUME(t.Dot),e.MANY3(()=>{e.SUBRULE2(e.annotation)}),e.CONSUME2(t.Identifier)}),e.OPTION(()=>{e.SUBRULE(e.typeArgumentsOrDiamond)})}),e.RULE("typeArgumentsOrDiamond",()=>{e.OR([{ALT:()=>e.SUBRULE(e.diamond)},{ALT:()=>e.SUBRULE(e.typeArguments)}])}),e.RULE("diamond",()=>{e.CONSUME(t.Less),e.CONSUME(t.Greater)}),e.RULE("methodInvocationSuffix",()=>{e.CONSUME(t.LBrace),e.OPTION2(()=>{e.SUBRULE(e.argumentList)}),e.CONSUME(t.RBrace)}),e.RULE("argumentList",()=>{e.SUBRULE(e.expression),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.expression)})}),e.RULE("arrayCreationExpression",()=>{e.CONSUME(t.New),e.OR([{ALT:()=>e.SUBRULE(e.primitiveType)},{ALT:()=>e.SUBRULE(e.classOrInterfaceType)}]),e.OR2([{ALT:()=>e.SUBRULE(e.arrayCreationExpressionWithoutInitializerSuffix)},{ALT:()=>e.SUBRULE(e.arrayCreationWithInitializerSuffix)}])}),e.RULE("arrayCreationExpressionWithoutInitializerSuffix",()=>{e.SUBRULE(e.dimExprs),e.OPTION(()=>{e.SUBRULE(e.dims)})}),e.RULE("arrayCreationWithInitializerSuffix",()=>{e.SUBRULE(e.dims),e.SUBRULE(e.arrayInitializer)}),e.RULE("dimExprs",()=>{e.SUBRULE(e.dimExpr),e.MANY({GATE:()=>P(e.LA(2).tokenType,t.RSquare)===!1,DEF:()=>e.SUBRULE2(e.dimExpr)})}),e.RULE("dimExpr",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.CONSUME(t.LSquare),e.SUBRULE(e.expression),e.CONSUME(t.RSquare)}),e.RULE("classLiteralSuffix",()=>{e.MANY(()=>{e.CONSUME(t.LSquare),e.CONSUME(t.RSquare)}),e.CONSUME(t.Dot),e.CONSUME(t.Class)}),e.RULE("arrayAccessSuffix",()=>{e.CONSUME(t.LSquare),e.SUBRULE(e.expression),e.CONSUME(t.RSquare)}),e.RULE("methodReferenceSuffix",()=>{e.CONSUME(t.ColonColon),e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.OR([{ALT:()=>e.CONSUME(t.Identifier)},{ALT:()=>e.CONSUME(t.New)}])}),e.RULE("templateArgument",()=>{e.OR([{ALT:()=>e.SUBRULE(e.template)},{ALT:()=>e.CONSUME(t.StringLiteral)},{ALT:()=>e.CONSUME(t.TextBlock)}])}),e.RULE("template",()=>{e.OR([{ALT:()=>e.SUBRULE(e.stringTemplate)},{ALT:()=>e.SUBRULE(e.textBlockTemplate)}])}),e.RULE("stringTemplate",()=>{e.CONSUME(t.StringTemplateBegin),e.SUBRULE(e.embeddedExpression),e.MANY(()=>{e.CONSUME(t.StringTemplateMid),e.SUBRULE1(e.embeddedExpression)}),e.CONSUME(t.StringTemplateEnd)}),e.RULE("textBlockTemplate",()=>{e.CONSUME(t.TextBlockTemplateBegin),e.SUBRULE(e.embeddedExpression),e.MANY(()=>{e.CONSUME(t.TextBlockTemplateMid),e.SUBRULE1(e.embeddedExpression)}),e.CONSUME(t.TextBlockTemplateEnd)}),e.RULE("embeddedExpression",()=>{e.OPTION(()=>{e.SUBRULE(e.expression)})}),e.RULE("pattern",()=>{e.OR([{ALT:()=>e.SUBRULE(e.typePattern)},{ALT:()=>e.SUBRULE(e.recordPattern)}])}),e.RULE("typePattern",()=>{e.SUBRULE(e.localVariableDeclaration,{ARGS:[!0]})}),e.RULE("recordPattern",()=>{e.SUBRULE(e.referenceType),e.CONSUME(t.LBrace),e.OPTION(()=>{e.SUBRULE(e.componentPatternList)}),e.CONSUME(t.RBrace)}),e.RULE("componentPatternList",()=>{e.SUBRULE(e.componentPattern),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.componentPattern)})}),e.RULE("componentPattern",()=>{e.OR([{ALT:()=>e.SUBRULE(e.pattern)},{ALT:()=>e.SUBRULE(e.matchAllPattern)}])}),e.RULE("matchAllPattern",()=>{e.CONSUME(t.Underscore)}),e.RULE("guard",()=>{e.CONSUME(t.When),e.SUBRULE(e.expression)}),e.RULE("isRefTypeInMethodRef",()=>{let r;e.SUBRULE(e.typeArguments);let n=e.OPTION(()=>{e.SUBRULE(e.dims)}),o=this.LA(1).tokenType;if(P(o,t.ColonColon)?r=!0:n&&(r=!1),e.OPTION2(()=>{e.CONSUME(t.Dot),e.SUBRULE(e.classOrInterfaceType)}),r!==void 0)return r;let i=this.LA(1).tokenType;return P(i,t.ColonColon)})}function dE(){return this.computeContentAssist("unaryExpressionNotPlusMinus",[]).map(r=>r.nextTokenType).filter((r,n,o)=>o.indexOf(r)===n)}var Ho=class extends Mo{constructor(){super(Vt,{lookaheadStrategy:new Go({logging:Bo()?()=>{}:void 0}),nodeLocationTracking:"full",skipValidations:Bo()});let t=this;t.RULE("typeIdentifier",()=>{t.CONSUME(Ze.Identifier)}),oE.call(this,t,Ze),iE.call(this,t,Ze),aE.call(this,t,Ze),cE.call(this,t,Ze),sE.call(this,t,Ze),uE.call(this,t,Ze),lE.call(this,t,Ze),fE.call(this,t,Ze),pE.call(this,t,Ze),this.firstForUnaryExpressionNotPlusMinus=[],this.performSelfAnalysis(),this.firstForUnaryExpressionNotPlusMinus=dE.call(this)}cstPostNonTerminal(t,r){this.isBackTracking()||super.cstPostNonTerminal(t,r)}BACKTRACK_LOOKAHEAD(t,r=!1){return this.ACTION(()=>{this.isBackTrackingStack.push(1);let n=this.saveRecogState();try{let{ruleName:o,originalGrammarAction:i}=t;try{return this.ruleInvocationStateUpdate(this.fullRuleNameToShort[o],o,this.subruleIdx),i.call(this)}catch(a){return this.invokeRuleCatch(a,!0,()=>{})}finally{this.ruleFinallyStateUpdate()}}catch(o){if(At(o))return r;throw o}finally{this.reloadRecogState(n),this.isBackTrackingStack.pop()}})}};var Jn=new Ho,sq=Jn.getBaseCstVisitorConstructor(),hE=Jn.getBaseCstVisitorConstructorWithDefaults();function x4(e,t="compilationUnit"){let r=Vg.tokenize(e);if(r.errors.length>0){let i=r.errors[0];throw Error("Sad sad panda, lexing errors detected in line: "+i.line+", column: "+i.column+`!
151
151
  `+i.message)}let n=r.tokens;Jn.input=n;let o=Jn[t]();if(Jn.errors.length>0){let i=Jn.errors[0];throw Error("Sad sad panda, parsing errors detected in line: "+i.token.startLine+", column: "+i.token.startColumn+`!
152
152
  `+i.message+`!
153
153
  ->`+i.context.ruleStack.join(`
154
- ->`))}return o.comments=r.groups.comments,{cst:o,tokens:n}}function mE(e,t="compilationUnit"){return x4(e,t).cst}var wc=class extends hE{content="";parsed=null;contextStack=[];package="";imports=[];info={...structuredClone(Us),pathChainFields:[]};constructor(){super(),this.validateVisitor()}async loadFile(t){this.info.container={fileName:t};try{let r=await gE.promises.readFile(t,"utf-8");return this.parseContent(r)}catch(r){return`Could not read file: ${t} - ${r}`}}parseContent(t){try{this.content=t,this.parsed=mE(this.content)}catch(r){return`Could not parse content - ${r}`}try{this.visit(this.parsed)}catch(r){return`Could not visit parsed CST for file: ${this.info.name} - ${r}`}return!0}packageDeclaration(t){this.package=je(t.Identifier)||"",super.packageDeclaration(t)}importDeclaration(t){let r=je(T(t.packageOrTypeName)?.Identifier);I(r)&&!r.startsWith("com.pedropathing.")&&!r.startsWith("com.bylazar.")&&!r.startsWith("com.technototes.library.")&&this.imports.push(r),super.importDeclaration(t)}fieldDeclaration(t){let r=O4(t);if(I(r))return this.info.values.push(r),super.fieldDeclaration(t);let n=U4(t);if(I(n))return this.info.poses.push(n),super.fieldDeclaration(t);let o=N4(t);if(I(o))return this.info.beziers.push(o),super.fieldDeclaration(t);let i=C4(t);return I(i)&&this.info.pathChainFields.push(i),super.fieldDeclaration(t)}constructorDeclaration(t){return this.info.pathChainHelpers.push(...M4(t)),this.info.pathChains.push(...k4(t)),super.constructorDeclaration(t)}classDeclaration(t,r){let n=je(T(T(t?.normalClassDeclaration)?.typeIdentifier)?.Identifier);if(A(n))return;if(this.contextStack.length!==0){let i=this.info;this.info={...structuredClone(Us),container:{className:i.name},pathChainFields:[]},i.children[n]=this.info}this.info.name=n,this.contextStack.push(this.info);let o=super.classDeclaration(t,r);return this.info.name=this.contextStack.map(i=>i.name).join("."),this.contextStack.pop(),this.contextStack.length>0&&(this.info=this.contextStack[this.contextStack.length-1]),o}};function va(e){if(!(!or(e)||e.length!==1))return e[0]}function T(e){return va(e)?.children}function je(e){return or(e)?e.map(t=>t.image).join("."):e?.image}function EE(e){switch(e){case"BezierLine":return tn.Line;case"BezierCurve":return tn.Curve}}function _c(e){return!(!e.fieldModifier||e.fieldModifier.length!==2||!e.fieldModifier.every(t=>t.children.Public||t.children.Static))}function yE(e){return!e.fieldModifier||e.fieldModifier.length!==1?!1:I(e.fieldModifier[0].children.Public)}function O4(e){if(!_c(e))return;let t=T(T(T(T(e.unannType)?.unannPrimitiveTypeWithOptionalDimsSuffix)?.unannPrimitiveType)?.numericType);if(!t)return;let r="double";if(t.floatingPointType){if(!T(t.floatingPointType)?.Double)return}else if(t.integralType){if(!T(t.integralType)?.Int)return;r="int"}if(e.variableDeclaratorList.length!==1)return;let n=T(T(e.variableDeclaratorList)?.variableDeclarator);if(!n)return;let o=je(T(n.variableDeclaratorId)?.Identifier);if(!o)return;let i=o,a=va(T(n.variableInitializer)?.expression);if(A(a))return;let s=br(a);if(k(s))return{name:i,value:s};if(Ns(s)||fi(s))return{name:i,value:s}}function SE(e){let t=T(T(T(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression),r=je(t?.UnaryPrefixOperator)==="-"?-1:1,n=T(T(T(t?.primary)?.primaryPrefix)?.literal);if(I(n?.integerLiteral)){let o=je(T(n.integerLiteral)?.DecimalLiteral);if(I(o))return{int:parseInt(o)*r}}else if(I(n?.floatingPointLiteral)){let o=je(T(n.floatingPointLiteral)?.FloatLiteral);if(I(o))return{double:parseFloat(o)*r}}}function Bc(e){let t=je(T(T(T(e)?.fqnOrRefTypePartFirst)?.fqnOrRefTypePartCommon)?.Identifier);if(A(t))return;let r=T(e)?.fqnOrRefTypePartRest;if(I(r))for(let n of r.map(o=>o.children.fqnOrRefTypePartCommon)){let o=je(va(n)?.children.Identifier);I(o)&&(t=t+"."+o)}return t}function TE(e){let t=T(T(T(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression),r=T(T(t?.primary)?.primaryPrefix);if(I(r?.fqnOrRefType))return Bc(r.fqnOrRefType)}function Ma(e,t){if(A(e))return;let r=TE(e);return k(r)?r:t(e)}function RE(e){let t=T(e.primaryPrefix)?.fqnOrRefType;if(!A(t))return Bc(t)}function L4(e){let t=T(T(T(T(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary);if(A(t))return;let r=RE(t);if(A(r)||r!=="Math.toRadians"||A(e.children.conditionalExpression))return;let n=T(T(T(T(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary)?.primarySuffix;if(A(n)||n.length===0)return;let o=Yt(n[0]);if(A(o)||o.length!==1)return;let i=Cr(o[0]);if(k(i))return{radians:i};if(I(i))return{radians:i}}function Cr(e){if(!A(e))return Ma(e,SE)}function A4(e){if(A(e))return;let t=L4(e);return I(t)?t:Ma(e,SE)}function Fc(e){return je(T(T(T(T(e)?.unannReferenceType)?.unannClassOrInterfaceType)?.unannClassType)?.Identifier)}function ka(e){return je(T(e?.variableDeclaratorId)?.Identifier)}function Dc(e){return T(T(e.variableDeclaratorList)?.variableDeclarator)}function xE(e){return T(T(T(T(T(T(T(e?.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary)?.primaryPrefix)?.newExpression)?.unqualifiedClassInstanceCreationExpression)}function jc(e,t){let r;if(ne(e,"name"))r=e;else{let i=va(T(e.variableInitializer)?.expression);if(A(i))return["",void 0];r=i}let n=xE(r?.children),o=je(T(n?.classOrInterfaceTypeToInstantiate)?.Identifier);return I(t)&&o!==t?["",void 0]:[t||o||"",T(n?.argumentList)?.expression]}function U4(e){if(!_c(e)&&!yE(e)||Fc(e.unannType)!=="Pose")return;let r=Dc(e);if(A(r))return;let n=ka(r);if(A(n))return;let o=OE(r);return I(o)?{name:n,pose:o}:void 0}function OE(e){let[,t]=jc(e,"Pose");if(A(t)||t.length!==3&&t.length!==2)return;let r=Cr(t[0]),n=Cr(t[1]);if(A(r)||A(n))return;let o=t.length===3?br(t[2]):void 0;return A(o)?{x:r,y:n}:{x:r,y:n,heading:o}}function LE(e){return Ma(e,OE)}function AE(e,t){let r=or(e)?e[0]:e;if(A(r))return;let[n,o]=jc(r,t);if(A(o))return;let i=EE(n);if(A(i))return;let a=o.map(LE);if(a.every(I))return{type:i,points:a}}function N4(e){if(!_c(e))return;let t=Fc(e.unannType);if(A(t))return;let r=EE(t),n=Dc(e);if(A(n)||A(r))return;let o=ka(n);if(A(o))return;let i=o,a=AE(T(n.variableInitializer)?.expression);if(I(a))return{name:i,points:a}}function C4(e){if(!yE(e)||Fc(e.unannType)!=="PathChain")return;let t=Dc(e);if(!A(t))return ka(t)}function Yt(e){return or(e)?Yt(e[0]):T(T(e?.children.methodInvocationSuffix)?.argumentList)?.expression}function br(e,t=!1){let r=A4(e);return I(r)&&t&&ul(r)&&r.endsWith(".getHeading")?r.substring(0,r.length-11):r}function b4(e){return Ma(e,AE)}function I4(e){let[t,r]=jc(e);if(A(r)||t!=="HeadingInterpolator.PiecewiseNode"||r.length!==3)return;let n=Cr(r[0]),o=Cr(r[1]),i=UE(r[2],!0);if(!(A(n)||A(o)||A(i)))return{timing:{start:n,end:o},heading:i}}function UE(e,t){let r=TE(e);if(A(r))return;let n=Yt(T(T(T(T(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary)?.primarySuffix);switch(r){case"HeadingInterpolator.piecewise":if(t||A(n))break;let o=n.map(I4);if(o.every(I))return{type:he.Piecewise,pieces:o};break;case"HeadingInterpolator.facingPoint":if(I(n)&&n.length>0&&n.length<3){if(n.length===1){let u=LE(n[0]);if(I(u))return{type:he.Point,point:u}}else if(n.length===2){let u=Cr(n[0]),l=Cr(n[1]);if(I(u)&&I(l))return{type:he.Point,point:{x:u,y:l}}}}return;case"HeadingInterpolator.tangent":return I(n)?void 0:{type:he.Tangent};case"HeadingInterpolator.constant":if(I(n)){let u=br(n[0]);if(I(u))return{type:he.Constant,heading:u}}return;case"HeadingInterpolator.linear":case"HeadingInterpolator.reversedLinear":if(A(n)||n.length<2)return;let i=br(n[0]),a=br(n[1]);if(A(i)||A(a)||n.length>3)return;let s=n.length===3?Cr(n[3]):void 0,c={type:he.Linear,start:i,end:a};return r.indexOf("v")<0?c:{type:he.Reversed,facing:c};case"HeadingInterpolator.reverse":console.error("NYI: HeadingInterpolator.reverse");return;case"HeadingInterpolator.offset":console.error("NYI: HeadingInterpolator.offset");return}}function P4(e){let t=T(T(T(T(T(T(T(e.children.statement)?.statementWithoutTrailingSubstatement)?.expressionStatement)?.statementExpression)?.expression)?.conditionalExpression)?.binaryExpression);if(A(t)||A(t.AssignmentOperator))return;let r=T(T(T(t.unaryExpression)?.primary)?.primaryPrefix);if(A(r)||A(r.fqnOrRefType))return;let n=Bc(r.fqnOrRefType),o=T(T(T(T(T(t.expression)?.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary);if(A(o))return;let i=RE(o);if(A(i)||i!=="follower.pathBuilder")return;let a=o.primarySuffix;if(A(a)||a.length<5)return;let s=[],c=null,u="pathBuilder";for(let l=0;l<a.length;l++){let f=a[l];if(l%2===1){if(A(f?.children?.Dot))return;switch(u=je(f.children.Identifier),u){case"pathBuilder":case"addPath":case"setTangentHeadingInterpolation":case"setLinearHeadingInterpolation":case"setConstantHeadingInterpolation":case"setHeadingInterpolation":case"setReversed":case"build":continue;default:return}}else switch(u){case"pathBuilder":case"build":if(I(Yt(f)))return;continue;case"setTangentHeadingInterpolation":if(I(Yt(f)))return;c={type:he.Tangent};continue;case"setLinearHeadingInterpolation":let p=Yt(f);if(p?.length!==2)return;let h=br(p[0],!0),E=br(p[1],!0);if(A(h)||A(E))return;c={type:he.Linear,start:h,end:E};continue;case"setConstantHeadingInterpolation":let y=Yt(f);if(y?.length!==1)return;let S=br(y[0],!0);if(A(S))return;c={type:he.Constant,heading:S};continue;case"setReversed":if(c===null)return;c={type:he.Reversed,facing:c};continue;case"setHeadingInterpolation":let d=Yt(f);if(A(d)||d.length!==1)return;let g=UE(d[0]);if(A(g))return;c=g;continue;case"addPath":let m=Yt(f);if(m?.length!==1)return;let x=b4(m[0]);if(A(x))return;s.push(x);continue;default:return}}if(c!==null)return{name:n,paths:s,heading:c}}function v4(e){let t=T(T(e.children.localVariableDeclarationStatement)?.localVariableDeclaration);if(A(t))return;let r=T(T(T(T(T(t.localVariableType)?.unannType)?.unannReferenceType)?.unannClassOrInterfaceType)?.unannClassType)?.Identifier;if(A(r)||r.length===0)return;let n=T(T(t.variableDeclaratorList)?.variableDeclarator);if(A(n))return;let o=je(r),i=ka(n);if(A(i)||A(o))return;let a=xE(T(T(n.variableInitializer)?.expression));if(A(a))return;let s=T(a.classOrInterfaceTypeToInstantiate)?.Identifier;if(!(A(s)||je(s)!==o)&&!(I(a.argumentList)||I(a.classBody)||I(a.typeArguments)))return{name:i,staticType:o}}function M4(e){let t=T(T(e.constructorBody)?.blockStatements)?.blockStatement;return A(t)?[]:t.map(v4).filter(I)}function k4(e){let t=T(T(e.constructorBody)?.blockStatements)?.blockStatement;return A(t)?[]:t.map(P4).filter(I)}async function NE(e){let t=new wc,r=await t.loadFile(e);if(k(r))return io(r);let n={...t.info};if(delete n.pathChainFields,Gc(n)){let o=[...t.imports];Wo(n,i=>{let a=[...o];ne(i.container,"className")?a.push(t.package+"."+i.container.className):a.push(t.package),i.imports=a,i.fullName=`${t.package}.${i.name}`})}return n}function Gc(e){let t=!1;return Wo(e,r=>{if(r.beziers.length||r.poses.length||r.pathChains.length||r.values.length)return t=!0,!0}),t}var $e={HasFieldImage:!1,TeamPaths:wt(),PathClasses:wt(),ParsedClasses:new Map};function Wo(e,t){let r=[e];for(;r.length>0;){let n=r.pop();if(t(n)===!0)return;r.push(...Object.values(n.children))}}async function w4(e,t){let r=Il(e,t),n=await NE(r);if(nr(n))return n;let o=[];return Wo(n,i=>o.push(i.name)),[o,n]}function _4(e,t,r,n){if(!Gc(n))return;let o=rn(e,t);$e.TeamPaths.set(e,o),Wo(n,i=>{let a=Is(o,i.name);$e.PathClasses.set(o,a),$e.ParsedClasses.set(a,i)})}async function wa(){F4();let e=await bl();for(let[t,r]of e)for(let n of r){let o=Tl(n),i=await w4(t,o);nr(i)||_4(t,o,i[0],i[1])}return $e.HasFieldImage=await Xl(),B4()}function B4(){return $e}function F4(){$e.TeamPaths.clear(),$e.PathClasses.clear(),$e.ParsedClasses.clear()}function CE(e){$e.TeamPaths=e.TeamPaths,$e.PathClasses=e.PathClasses,$e.ParsedClasses=e.ParsedClasses}function D4(e,t){let r=$e.PathClasses.get(rn(e,t));return A(r)?io(`List: ${e}:${t} no Pedro pathing classes found`):[...r.keys()].map(Rl)}function bE(e,t){let r=D4(e,t);if(nr(r))return r;let n=r.reduce((a,s)=>a.length<s.length?a:s),o=Is(rn(e,t),n),i=$e.ParsedClasses.get(o);return A(i)?io(`Root: ${e}:${t} no Pedro pathing classes found`):i}var IE=Mt(require("node:child_process"),1);function PE(e){let t="",r=process.platform;if(/^darwin/.test(r))t="open";else if(/^win/.test(r))t="start";else if(/^linux/.test(r))t="xdg-open";else{console.log(`open a brower to ${e} to launch the application`);return}IE.exec(t+" "+e,(n,o,i)=>{n!=null&&console.log(`exec error: ${JSON.stringify(n)}`)})}async function vE(e){console.log("Parsing code: Please wait..."),await wa(),console.log(`\u{1F680} Server running at ${e}`),await Yl(1500),PE(e.toString())}var ME="x-hono-already-sent";var Ka=require("node:http"),lt=require("node:http2"),Kc=require("node:stream");var kE=e=>((...t)=>{if(typeof t[0]=="function"){let[r,n]=t;return async function(i,a){let s=await r(i),c=await e(i,s,n);if(c)return c;await a()}}else{let[r,n,o]=t;return(async()=>{let i=await e(r,n,o);if(!i)throw new Error("Failed to upgrade WebSocket");return i})()}});var Ut=class extends Error{constructor(e,t){super(e,t),this.name="RequestError"}},j4=new Set(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","server","user-agent"]),G4=/^[!#$%&'*+\-.^_`|~\dA-Za-z]+$/,_a=e=>e===9||e===10||e===13||e===32,wE=e=>{if(!_a(e.charCodeAt(0))&&!_a(e.charCodeAt(e.length-1)))return e;let t=0,r=e.length;for(;t<r&&_a(e.charCodeAt(t));)t++;for(;r>t&&_a(e.charCodeAt(r-1));)r--;return e.slice(t,r)},_E=/[\0\r\n]/,Jc=globalThis.Headers,WE=(e,t=Jc)=>{let r=new t;for(let n=0;n<e.length;n+=2){let o=e[n];o.startsWith(":")||r.append(o,e[n+1])}return r},Qc=class{#e;#t;#r;#i;constructor(e){this.#e=e,e instanceof lt.Http2ServerRequest&&(this.#t=e.rawHeaders.slice())}get#o(){return this.#t??=this.#e.rawHeaders.slice()}get#n(){return this.#r||(this.#r=WE(this.#o),this.#t=void 0),this.#r}#c(e){if(typeof e=="string"){if(!G4.test(e))throw new TypeError(`Invalid header name: ${e}`);return e.toLowerCase()}}#a(e){let t=this.#e instanceof lt.Http2ServerRequest?void 0:this.#e.headers;if(!t||j4.has(e)||e==="set-cookie"||e==="__proto__")return;if(!Object.hasOwn(t,e))return null;let r=t[e];if(typeof r=="string"){let n=wE(r);return _E.test(n)?void 0:n}}#s(e,t){let r=t==="cookie"?"; ":", ",n=null;for(let o=0;o<e.length;o+=2){let i=e[o];if(i.length===t.length&&i.toLowerCase()===t){let a=wE(e[o+1]);if(_E.test(a)){this.#i=!0;return}n=n===null?a:n+r+a}}return n}append(e,t){this.#n.append(e,t)}delete(e){this.#n.delete(e)}get(e){let t=this.#c(e);if(t&&!this.#r&&!this.#i){let r=this.#a(t);if(r!==void 0)return r;let n=this.#s(this.#o,t);if(n!==void 0)return n}return this.#n.get(e)}has(e){let t=this.#c(e);if(t&&!this.#r&&!this.#i){let r=this.#a(t);if(r!==void 0)return r!==null;let n=this.#s(this.#o,t);if(n!==void 0)return n!==null}return this.#n.has(e)}set(e,t){this.#n.set(e,t)}getSetCookie(){return this.#n.getSetCookie()}keys(){return this.#n.keys()}values(){return this.#n.values()}entries(){return this.#n.entries()}forEach(e,t){this.#n.forEach((r,n)=>{e.call(t,r,n,this)})}[Symbol.iterator](){return this.entries()}};Object.defineProperty(Qc.prototype,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,t,r){return`Headers (lightweight) ${r(Object.fromEntries(this),{...t,depth:e==null?null:e-1})}`}});Object.setPrototypeOf(Qc.prototype,Jc.prototype);var VE=e=>globalThis.Headers===Jc?new Qc(e):WE(e.rawHeaders,globalThis.Headers),H4=/^\/[!#$&-;=?-\[\]_a-z~]*$/,K4=/\/\.\.?(?:[/?#]|$)/,W4=/^[a-z0-9._-]+(?::(?:[1-5]\d{3,4}|[6-9]\d{3}))?$/,V4=(e,t,r)=>{let n=`${e}://${t}${r}`;if(W4.test(t)){if(r.length===0)return n+"/";if(r.charCodeAt(0)!==47)throw new Ut("Invalid URL");return!H4.test(r)||K4.test(r)?new URL(n).href:n}else{let o=new URL(n);if(o.hostname.length!==t.length&&o.hostname!==(t.includes(":")?t.replace(/:\d+$/,""):t).toLowerCase())throw new Ut("Invalid host header");return o.href}},q4=e=>e instanceof Ut?e:new Ut(e.message,{cause:e}),Y4=global.Request,Zn=class extends Y4{constructor(e,t){if(typeof e=="object"&&vr in e){let r=t!==void 0&&"body"in t&&t.body!=null;if(e[Jt]&&!r)throw new TypeError("Cannot construct a Request with a Request object that has already been used.");e=e[vr]()}typeof t?.body?.getReader<"u"&&(t.duplex??="half"),super(e,t)}},qE=Symbol("wrapBodyStream"),z4=new Set(["latin1","binary","hex","base64","base64url"]),X4=e=>e===null||z4.has(e),Hc=Symbol("bodyBufferedBeforeDisconnect"),Wc=Symbol("bodyBufferedLengthBeforeDisconnect"),YE=(e,t)=>Buffer.isBuffer(e)?e:Buffer.from(e,t??"utf8"),Zc=e=>!(e instanceof lt.Http2ServerRequest)&&!!e.complete&&!!e.readableAborted&&typeof e.read=="function"&&X4(e.readableEncoding),BE=e=>{if(e.readableDidRead||!Zc(e))return;let t=e;t[Wc]??=e.readableLength},Fa=(e,t)=>{if(e.readableDidRead&&!t||!Zc(e))return;let r=e;if(r[Hc]!==void 0)return r[Hc];let n,o=e.errored;if(o&&o.code!=="ECONNRESET")n=o;else if(r[Wc]!==void 0&&e.readableLength!==r[Wc])n=Da();else{let i=t??[],a=e.read();a!==null&&i.push(YE(a,e.readableEncoding));let s=i.length===1?i[0]:Buffer.concat(i);n=s;let c=e.headers["content-length"];if(typeof c=="string"&&/^\d+$/.test(c)){let u=Number(c);Number.isSafeInteger(u)&&s.length!==u&&(n=Da())}}return r[Hc]=n,n},FE=(e,t)=>{if(t instanceof Error){e.error(t);return}t.length>0&&e.enqueue(t),e.close()},J4=(e,t,r,n,o)=>{let i={method:e,headers:r,signal:o.signal};if(e==="TRACE"){i.method="GET";let a=new Zn(t,i);return Object.defineProperty(a,"method",{get(){return"TRACE"}}),a}if(!(e==="GET"||e==="HEAD"))if("rawBody"in n&&n.rawBody instanceof Buffer)i.body=new ReadableStream({start(a){a.enqueue(n.rawBody),a.close()}});else if(n[qE]){let a;i.body=new ReadableStream({async pull(s){try{if(!a){let l=Fa(n);if(l!==void 0){FE(s,l);return}}a||=Kc.Readable.toWeb(n).getReader();let{done:c,value:u}=await a.read();c?s.close():s.enqueue(u)}catch(c){s.error(c)}}})}else{let a=Fa(n);a!==void 0?i.body=new ReadableStream({start(s){FE(s,a)}}):i.body=Kc.Readable.toWeb(n)}return new Zn(t,i)},vr=Symbol("getRequestCache"),zt=Symbol("requestCache"),$n=Symbol("incomingKey"),Yo=Symbol("urlKey"),zE=Symbol("methodKey"),XE=Symbol("headersKey"),Vo=Symbol("abortControllerKey"),Vc=Symbol("getAbortController"),qc=Symbol("abortRequest"),Pr=Symbol("bodyBuffer"),Ba=Symbol("bodyReadPromise"),Jt=Symbol("bodyConsumedDirectly"),DE=Symbol("bodyLockReader"),qo=Symbol("abortReason"),Da=()=>new TypeError("Body is unusable"),zo=()=>Promise.reject(Da()),Q4=new TextDecoder,Z4=e=>{if(e[Jt])return zo();e[Jt]=!0},$4=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),e7=e=>(e[XE]||=VE(e[$n])).get("content-type")||"",t7=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,r7=e=>{if(typeof e!="string"||e.length===0)return"GET";switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"PATCH":case"POST":case"PUT":case"QUERY":return e}let t=e.toUpperCase();switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"POST":case"PUT":return t;default:return e}},n7=e=>{if(!t7.test(e))return new TypeError(`'${e}' is not a valid HTTP method.`);let t=e.toUpperCase();if(t==="CONNECT"||t==="TRACK"||t==="TRACE"&&e!=="TRACE")return new TypeError(`'${e}' HTTP method is unsupported.`)},$c=(e,t,r)=>{if(e[Jt])return zo();let n=e.method;if(n==="GET"||n==="HEAD")return e[vr]()[t]();let o=n7(n);if(o)return Promise.reject(o);if(e[zt]&&n!=="TRACE")return e[zt][t]();let i=Z4(e);if(i)return i;let a=o7(e);if(a){let s=Promise.resolve(r(a,e));return e[Pr]=void 0,s}return i7(e).then(s=>{let c=r(s,e);return e[Pr]=void 0,c})},o7=e=>{let t=e[$n];if("rawBody"in t&&t.rawBody instanceof Buffer)return t.rawBody},jE=(e,t)=>{if(t.errored)return t.errored;let r=e[qo];return r!==void 0?r instanceof Error?r:new Error(String(r)):new Error("Client connection prematurely closed.")},i7=e=>{if(e[Pr])return Promise.resolve(e[Pr]);if(e[Ba])return e[Ba];let t=e[$n];if(t.readableDidRead)return zo();let r=Fa(t);if(r!==void 0)return r instanceof Error?Promise.reject(r):(e[Pr]=r,Promise.resolve(r));let n=new Promise((o,i)=>{let a=[],s=!1,c=y=>{s||(s=!0,E(),y())},u=y=>{let S=t.errored??y;return!Zc(t)||S&&S.code!=="ECONNRESET"?!1:(c(()=>{let d=Fa(t,a);d instanceof Error?i(d):d===void 0?i(y??jE(e,t)):(e[Pr]=d,o(d))}),!0)},l=y=>{a.push(YE(y,t.readableEncoding))},f=()=>{c(()=>{let y=a.length===1?a[0]:Buffer.concat(a);e[Pr]=y,o(y)})},p=y=>{u(y)||c(()=>{i(y)})},h=()=>{if(t.readableEnded){f();return}u()||c(()=>{i(jE(e,t))})},E=()=>{t.off("data",l),t.off("end",f),t.off("error",p),t.off("close",h),e[Ba]=void 0};t.on("data",l),t.on("end",f),t.on("error",p),t.on("close",h),queueMicrotask(()=>{s||(t.readableEnded?f():t.errored?p(t.errored):t.destroyed&&h())})});return e[Ba]=n,n},Ct={get method(){return this[zE]},get url(){return this[Yo]},get headers(){return this[XE]||=VE(this[$n])},[qc](e){this[qo]===void 0&&(this[qo]=e);let t=this[Vo];t&&!t.signal.aborted&&t.abort(e)},[Vc](){return this[Vo]||=new AbortController,this[qo]!==void 0&&!this[Vo].signal.aborted&&this[Vo].abort(this[qo]),this[Vo]},[vr](){let e=this[Vc]();if(this[zt])return this[zt];let t=this.method;if(this[Jt]&&!(t==="GET"||t==="HEAD")){this[Pr]=void 0;let r={method:t==="TRACE"?"GET":t,headers:this.headers,signal:e.signal};t!=="TRACE"&&(r.body=new ReadableStream({start(o){o.close()}}),r.duplex="half");let n=new Zn(this[Yo],r);return t==="TRACE"&&Object.defineProperty(n,"method",{get(){return"TRACE"}}),this[zt]=n}return this[zt]=J4(this.method,this[Yo],this.headers,this[$n],e)},get body(){if(!this[Jt])return this[vr]().body;let e=this[vr]();return!this[DE]&&e.body&&(this[DE]=e.body.getReader()),e.body},get bodyUsed(){return this[Jt]?!0:this[zt]?this[zt].bodyUsed:!1}};Object.defineProperty(Ct,"signal",{get(){return this[Vc]().signal}});["cache","credentials","destination","integrity","mode","redirect","referrer","referrerPolicy","keepalive"].forEach(e=>{Object.defineProperty(Ct,e,{get(){return this[vr]()[e]}})});["clone","formData"].forEach(e=>{Object.defineProperty(Ct,e,{value:function(){if(this[Jt]){if(e==="clone")throw Da();return zo()}return this[vr]()[e]()}})});Object.defineProperty(Ct,"text",{value:function(){return $c(this,"text",e=>Q4.decode(e))}});Object.defineProperty(Ct,"arrayBuffer",{value:function(){return $c(this,"arrayBuffer",e=>$4(e))}});Object.defineProperty(Ct,"blob",{value:function(){return $c(this,"blob",(e,t)=>{let r=e7(t),n=r?{headers:{"content-type":r}}:void 0;return new Response(e,n).blob()})}});Object.defineProperty(Ct,"json",{value:function(){return this[Jt]?zo():this.text().then(JSON.parse)}});Object.defineProperty(Ct,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,t,r){return`Request (lightweight) ${r({method:this.method,url:this.url,headers:this.headers,nativeRequest:this[zt]},{...t,depth:e==null?null:e-1})}`}});Object.setPrototypeOf(Ct,Zn.prototype);var a7=(e,t)=>{let r=Object.create(Ct);r[$n]=e,r[zE]=r7(e.method);let n=e.url||"";if(n[0]!=="/"&&(n.startsWith("http://")||n.startsWith("https://"))){if(e instanceof lt.Http2ServerRequest)throw new Ut("Absolute URL for :path is not allowed in HTTP/2");try{r[Yo]=new URL(n).href}catch(a){throw new Ut("Invalid absolute URL",{cause:a})}return r}let o=(e instanceof lt.Http2ServerRequest?e.authority:e.headers.host)||t;if(!o)throw new Ut("Missing host header");let i;if(e instanceof lt.Http2ServerRequest){if(i=e.scheme,!(i==="http"||i==="https"))throw new Ut("Unsupported scheme")}else i=e.socket&&e.socket.encrypted?"https":"http";try{r[Yo]=V4(i,o,n)}catch(a){throw a instanceof Ut?a:new Ut("Invalid URL",{cause:a})}return r},Ir="text/plain; charset=UTF-8",Yc=Symbol("responseCache"),Qn=Symbol("getResponseCache"),Xt=Symbol("cache"),ja=global.Response,Nt=class JE{#e;#t;[Qn](){let t=this[Xt],r=t&&t[2]instanceof Headers?t[2]:void 0;return delete this[Xt],this[Yc]||=new ja(this.#e,r?{status:this.#t?.status,statusText:this.#t?.statusText,headers:r}:this.#t)}constructor(t,r){let n;if(this.#e=t,r instanceof ja){let o=r[Yc];if(o){this.#t=o,this[Qn]();return}this.#t=r instanceof JE?r.#t:r,n=new Headers(r.headers)}else this.#t=r;(t==null||typeof t=="string"||typeof t?.getReader<"u"||t instanceof Blob||t instanceof Uint8Array)&&(this[Xt]=[r?.status||200,t??null,n||r?.headers])}get headers(){let t=this[Xt];return t?(t[2]instanceof Headers||(t[2]=new Headers(t[2]||(t[1]===null?void 0:{"content-type":Ir}))),t[2]):this[Qn]().headers}get status(){return this[Xt]?.[0]??this[Qn]().status}get ok(){let t=this.status;return t>=200&&t<300}};["body","bodyUsed","redirected","statusText","trailers","type","url"].forEach(e=>{Object.defineProperty(Nt.prototype,e,{get(){return this[Qn]()[e]}})});["arrayBuffer","blob","clone","formData","json","text"].forEach(e=>{Object.defineProperty(Nt.prototype,e,{value:function(){return this[Qn]()[e]()}})});Object.defineProperty(Nt.prototype,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,t,r){return`Response (lightweight) ${r({status:this.status,headers:this.headers,ok:this.ok,nativeResponse:this[Yc]},{...t,depth:e==null?null:e-1})}`}});Object.setPrototypeOf(Nt,ja);Object.setPrototypeOf(Nt.prototype,ja.prototype);var s7=/^https?:\/\/[!#-;=?-[\]_a-z~A-Z]+$/,c7=e=>e instanceof URL?e.href:s7.test(e)?e:new URL(e).href,u7=new Set([301,302,303,307,308]);Object.defineProperty(Nt,"redirect",{value:function(t,r=302){if(!u7.has(r))throw new RangeError("Invalid status code");return new Nt(null,{status:r,headers:{location:c7(t)}})},writable:!0,configurable:!0});Object.defineProperty(Nt,"json",{value:function(t,r){let n=JSON.stringify(t);if(n===void 0)throw new TypeError("The data is not JSON serializable");let o=r?.headers,i;return o?(i=new Headers(o),i.has("content-type")||i.set("content-type","application/json")):i={"content-type":"application/json"},new Nt(n,{status:r?.status??200,statusText:r?.statusText,headers:i})},writable:!0,configurable:!0});async function l7(e){return Promise.race([e,Promise.resolve().then(()=>Promise.resolve(void 0))])}function QE(e,t,r){let n=s=>{e.cancel(s).catch(()=>{})};return t.on("close",n),t.on("error",n),(r??e.read()).then(a,o),e.closed.finally(()=>{t.off("close",n),t.off("error",n)});function o(s){s&&t.destroy(s)}function i(){e.read().then(a,o)}function a({done:s,value:c}){try{if(s)t.end();else if(!t.write(c))t.once("drain",i);else return e.read().then(a,o)}catch(u){o(u)}}}function GE(e,t){if(e.locked)throw new TypeError("ReadableStream is locked.");return t.destroyed?void 0:QE(e.getReader(),t)}var zc=(e,t)=>{let r={};if(e instanceof Headers||(e=new Headers(e??void 0)),e.has("set-cookie")){let n=[];for(let[o,i]of e)o==="set-cookie"?n.push(i):r[o]=i;n.length>0&&(r["set-cookie"]=n)}else for(let[n,o]of e)r[n]=o;return t&&(r["content-type"]??=t),r},Ga=Symbol("outgoingEnded"),HE=Symbol("incomingDraining"),f7=500,p7=64*1024*1024,ZE=e=>{let t=e;if(e.destroyed||t[HE])return;if(t[HE]=!0,e instanceof lt.Http2ServerRequest){try{e.stream?.close?.(lt.constants.NGHTTP2_NO_ERROR)}catch{}return}let r=0,n=()=>{clearTimeout(i),e.off("data",a),e.off("end",n),e.off("error",n)},o=()=>{n();let s=e.socket;s&&!s.destroyed&&(typeof s.destroySoon=="function"?s.destroySoon():typeof s.destroy=="function"&&s.destroy())},i=setTimeout(o,f7);i.unref?.();let a=s=>{r+=s.length,r>p7&&o()};e.on("data",a),e.on("end",n),e.on("error",n),e.resume()},d7=(e,t,r,n)=>()=>{t.errored?(BE(t),e[qc](t.errored.toString())):r.writableFinished||(BE(t),e[qc]("Client connection prematurely closed.")),n&&!t.readableEnded&&setTimeout(()=>{t.readableEnded||setTimeout(()=>{ZE(t)})})},h7=e=>{if(!(Xt in e))return!1;let t=e[Xt][1];return t===null||typeof t=="string"||t instanceof Uint8Array},m7=()=>new Response(null,{status:400}),$E=e=>new Response(null,{status:e instanceof Error&&(e.name==="TimeoutError"||e.constructor.name==="TimeoutError")?504:500}),Ha=(e,t)=>{let r=e instanceof Error?e:new Error("unknown error",{cause:e});r.code==="ERR_STREAM_PREMATURE_CLOSE"?console.info("The user aborted a request."):(console.error(e),t.headersSent||t.writeHead(500,{"Content-Type":"text/plain"}),t.end(`Error: ${r.message}`),t.destroy(r))},Xc=e=>{"flushHeaders"in e&&e.writable&&e.flushHeaders()},ey=async(e,t)=>{let[r,n,o]=e[Xt];if(!o){n===null?(t.writeHead(r),t.end()):typeof n=="string"?(t.writeHead(r,{"Content-Type":Ir,"Content-Length":Buffer.byteLength(n)}),t.end(n)):n instanceof Uint8Array?(t.writeHead(r,{"Content-Type":Ir,"Content-Length":n.byteLength}),t.end(n)):n instanceof Blob?(t.writeHead(r,{"Content-Type":Ir,"Content-Length":n.size}),t.end(new Uint8Array(await n.arrayBuffer()))):(t.writeHead(r,{"Content-Type":Ir}),Xc(t),await GE(n,t)?.catch(a=>Ha(a,t))),t[Ga]?.();return}let i=!1;if(o instanceof Headers)i=o.has("content-length"),o=zc(o,n===null?void 0:Ir);else if(Array.isArray(o)){let a=new Headers(o);i=a.has("content-length"),o=zc(a,n===null?void 0:Ir)}else for(let a in o)if(a.length===14&&a.toLowerCase()==="content-length"){i=!0;break}i||(typeof n=="string"?o["Content-Length"]=Buffer.byteLength(n):n instanceof Uint8Array?o["Content-Length"]=n.byteLength:n instanceof Blob&&(o["Content-Length"]=n.size)),t.writeHead(r,o),n==null?t.end():typeof n=="string"||n instanceof Uint8Array?t.end(n):n instanceof Blob?t.end(new Uint8Array(await n.arrayBuffer())):(Xc(t),await GE(n,t)?.catch(a=>Ha(a,t))),t[Ga]?.()},ty=e=>typeof e.then=="function",g7=async(e,t,r={})=>{if(ty(e))if(r.errorHandler)try{e=await e}catch(o){let i=await r.errorHandler(o);if(!i)return;e=i}else e=await e.catch($E);if(Xt in e)return ey(e,t);let n=zc(e.headers,e.body===null?void 0:Ir);if(e.body){let o=e.body.getReader(),i=[],a=!1,s;if(n["transfer-encoding"]!=="chunked"){let c=2;for(let u=0;u<c;u++){s||=o.read();let l=await l7(s).catch(f=>{console.error(f),a=!0});if(!l){if(u===1){await new Promise(f=>setTimeout(f)),c=3;continue}break}if(s=void 0,l.value&&i.push(l.value),l.done){a=!0;break}}a&&!("content-length"in n)&&(n["content-length"]=i.reduce((u,l)=>u+l.length,0))}t.writeHead(e.status,n),i.forEach(c=>{t.write(c)}),a?t.end():(i.length===0&&Xc(t),await QE(o,t,s))}else n[ME]||(t.writeHead(e.status,n),t.end());t[Ga]?.()},E7=(e,t={})=>{let r=t.autoCleanupIncoming??!0;return t.overrideGlobalObjects!==!1&&global.Request!==Zn&&(Object.defineProperty(global,"Request",{value:Zn}),Object.defineProperty(global,"Response",{value:Nt})),async(n,o)=>{let i,a,s=!1,c=!1,u=()=>{!a||c||(c=!0,o.on("close",d7(a,n,o,s)))};try{if(a=a7(n,t.hostname),s=r&&!(n.method==="GET"||n.method==="HEAD"),s&&(n[qE]=!0,n instanceof lt.Http2ServerRequest&&(o[Ga]=()=>{n.readableEnded||setTimeout(()=>{n.readableEnded||setTimeout(()=>{n.destroy(),o.destroy()})})})),i=e(a,{incoming:n,outgoing:o}),!ty(i)&&h7(i))return s&&!n.readableEnded&&o.once("finish",()=>{n.readableEnded||ZE(n)}),ey(i,o);u()}catch(l){if(i)return Ha(l,o);if(t.errorHandler){if(u(),i=await t.errorHandler(a?l:q4(l)),!i)return}else a?i=$E(l):i=m7()}try{return await g7(i,o,t)}catch(l){return Ha(l,o)}}},y7=globalThis.CloseEvent??class extends Event{#e;constructor(e,t={}){super(e,t),this.#e=t}get wasClean(){return this.#e.wasClean??!1}get code(){return this.#e.code??0}get reason(){return this.#e.reason??""}},S7=globalThis.ErrorEvent??class extends Event{#e;constructor(e,t={}){super(e,t),this.#e=t}get message(){return this.#e.message??""}get filename(){return this.#e.filename??""}get lineno(){return this.#e.lineno??0}get colno(){return this.#e.colno??0}get error(){return this.#e.error??null}},T7=()=>Symbol("connection"),ry=Symbol("CONNECTION_SYMBOL_KEY"),ny=Symbol("WAIT_FOR_WEBSOCKET_SYMBOL"),R7=new Set(["connection","content-length","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","sec-websocket-accept","sec-websocket-extensions","sec-websocket-protocol"]),oy=(e,t)=>{t&&t.forEach((r,n)=>{R7.has(n.toLowerCase())||e.push(`${n}: ${r}`)})},KE=(e,t,r)=>{let n=["Connection: close","Content-Length: 0"];oy(n,r),e.end(`HTTP/1.1 ${t.toString()} ${Ka.STATUS_CODES[t]??""}\r
154
+ ->`))}return o.comments=r.groups.comments,{cst:o,tokens:n}}function mE(e,t="compilationUnit"){return x4(e,t).cst}var wc=class extends hE{content="";parsed=null;contextStack=[];package="";imports=[];info={...structuredClone(As),pathChainFields:[]};constructor(){super(),this.validateVisitor()}async loadFile(t){this.info.container={fileName:t};try{let r=await gE.promises.readFile(t,"utf-8");return this.parseContent(r)}catch(r){return`Could not read file: ${t} - ${r}`}}parseContent(t){try{this.content=t,this.parsed=mE(this.content)}catch(r){return`Could not parse content - ${r}`}try{this.visit(this.parsed)}catch(r){return`Could not visit parsed CST for file: ${this.info.name} - ${r}`}return!0}packageDeclaration(t){this.package=je(t.Identifier)||"",super.packageDeclaration(t)}importDeclaration(t){let r=je(T(t.packageOrTypeName)?.Identifier);I(r)&&!r.startsWith("com.pedropathing.")&&!r.startsWith("com.bylazar.")&&!r.startsWith("com.technototes.library.")&&this.imports.push(r),super.importDeclaration(t)}fieldDeclaration(t){let r=O4(t);if(I(r))return this.info.values.push(r),super.fieldDeclaration(t);let n=U4(t);if(I(n))return this.info.poses.push(n),super.fieldDeclaration(t);let o=N4(t);if(I(o))return this.info.beziers.push(o),super.fieldDeclaration(t);let i=C4(t);return I(i)&&this.info.pathChainFields.push(i),super.fieldDeclaration(t)}constructorDeclaration(t){return this.info.pathChainHelpers.push(...M4(t)),this.info.pathChains.push(...k4(t)),super.constructorDeclaration(t)}classDeclaration(t,r){let n=je(T(T(t?.normalClassDeclaration)?.typeIdentifier)?.Identifier);if(A(n))return;if(this.contextStack.length!==0){let i=this.info;this.info={...structuredClone(As),container:{className:i.name},pathChainFields:[]},i.children[n]=this.info}this.info.name=n,this.contextStack.push(this.info);let o=super.classDeclaration(t,r);return this.info.name=this.contextStack.map(i=>i.name).join("."),this.contextStack.pop(),this.contextStack.length>0&&(this.info=this.contextStack[this.contextStack.length-1]),o}};function Pa(e){if(!(!or(e)||e.length!==1))return e[0]}function T(e){return Pa(e)?.children}function je(e){return or(e)?e.map(t=>t.image).join("."):e?.image}function EE(e){switch(e){case"BezierLine":return tn.Line;case"BezierCurve":return tn.Curve}}function _c(e){return!(!e.fieldModifier||e.fieldModifier.length!==2||!e.fieldModifier.every(t=>t.children.Public||t.children.Static))}function yE(e){return!e.fieldModifier||e.fieldModifier.length!==1?!1:I(e.fieldModifier[0].children.Public)}function O4(e){if(!_c(e))return;let t=T(T(T(T(e.unannType)?.unannPrimitiveTypeWithOptionalDimsSuffix)?.unannPrimitiveType)?.numericType);if(!t)return;let r="double";if(t.floatingPointType){if(!T(t.floatingPointType)?.Double)return}else if(t.integralType){if(!T(t.integralType)?.Int)return;r="int"}if(e.variableDeclaratorList.length!==1)return;let n=T(T(e.variableDeclaratorList)?.variableDeclarator);if(!n)return;let o=je(T(n.variableDeclaratorId)?.Identifier);if(!o)return;let i=o,a=Pa(T(n.variableInitializer)?.expression);if(A(a))return;let s=br(a);if(k(s))return{name:i,value:s};if(Us(s)||li(s))return{name:i,value:s}}function SE(e){let t=T(T(T(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression),r=je(t?.UnaryPrefixOperator)==="-"?-1:1,n=T(T(T(t?.primary)?.primaryPrefix)?.literal);if(I(n?.integerLiteral)){let o=je(T(n.integerLiteral)?.DecimalLiteral);if(I(o))return{int:parseInt(o)*r}}else if(I(n?.floatingPointLiteral)){let o=je(T(n.floatingPointLiteral)?.FloatLiteral);if(I(o))return{double:parseFloat(o)*r}}}function Bc(e){let t=je(T(T(T(e)?.fqnOrRefTypePartFirst)?.fqnOrRefTypePartCommon)?.Identifier);if(A(t))return;let r=T(e)?.fqnOrRefTypePartRest;if(I(r))for(let n of r.map(o=>o.children.fqnOrRefTypePartCommon)){let o=je(Pa(n)?.children.Identifier);I(o)&&(t=t+"."+o)}return t}function TE(e){let t=T(T(T(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression),r=T(T(t?.primary)?.primaryPrefix);if(I(r?.fqnOrRefType))return Bc(r.fqnOrRefType)}function va(e,t){if(A(e))return;let r=TE(e);return k(r)?r:t(e)}function RE(e){let t=T(e.primaryPrefix)?.fqnOrRefType;if(!A(t))return Bc(t)}function L4(e){let t=T(T(T(T(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary);if(A(t))return;let r=RE(t);if(A(r)||r!=="Math.toRadians"||A(e.children.conditionalExpression))return;let n=T(T(T(T(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary)?.primarySuffix;if(A(n)||n.length===0)return;let o=Yt(n[0]);if(A(o)||o.length!==1)return;let i=Cr(o[0]);if(k(i))return{radians:i};if(I(i))return{radians:i}}function Cr(e){if(!A(e))return va(e,SE)}function A4(e){if(A(e))return;let t=L4(e);return I(t)?t:va(e,SE)}function Fc(e){return je(T(T(T(T(e)?.unannReferenceType)?.unannClassOrInterfaceType)?.unannClassType)?.Identifier)}function Ma(e){return je(T(e?.variableDeclaratorId)?.Identifier)}function Dc(e){return T(T(e.variableDeclaratorList)?.variableDeclarator)}function xE(e){return T(T(T(T(T(T(T(e?.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary)?.primaryPrefix)?.newExpression)?.unqualifiedClassInstanceCreationExpression)}function jc(e,t){let r;if(ne(e,"name"))r=e;else{let i=Pa(T(e.variableInitializer)?.expression);if(A(i))return["",void 0];r=i}let n=xE(r?.children),o=je(T(n?.classOrInterfaceTypeToInstantiate)?.Identifier);return I(t)&&o!==t?["",void 0]:[t||o||"",T(n?.argumentList)?.expression]}function U4(e){if(!_c(e)&&!yE(e)||Fc(e.unannType)!=="Pose")return;let r=Dc(e);if(A(r))return;let n=Ma(r);if(A(n))return;let o=OE(r);return I(o)?{name:n,pose:o}:void 0}function OE(e){let[,t]=jc(e,"Pose");if(A(t)||t.length!==3&&t.length!==2)return;let r=Cr(t[0]),n=Cr(t[1]);if(A(r)||A(n))return;let o=t.length===3?br(t[2]):void 0;return A(o)?{x:r,y:n}:{x:r,y:n,heading:o}}function LE(e){return va(e,OE)}function AE(e,t){let r=or(e)?e[0]:e;if(A(r))return;let[n,o]=jc(r,t);if(A(o))return;let i=EE(n);if(A(i))return;let a=o.map(LE);if(a.every(I))return{type:i,points:a}}function N4(e){if(!_c(e))return;let t=Fc(e.unannType);if(A(t))return;let r=EE(t),n=Dc(e);if(A(n)||A(r))return;let o=Ma(n);if(A(o))return;let i=o,a=AE(T(n.variableInitializer)?.expression);if(I(a))return{name:i,points:a}}function C4(e){if(!yE(e)||Fc(e.unannType)!=="PathChain")return;let t=Dc(e);if(!A(t))return Ma(t)}function Yt(e){return or(e)?Yt(e[0]):T(T(e?.children.methodInvocationSuffix)?.argumentList)?.expression}function br(e,t=!1){let r=A4(e);return I(r)&&t&&ul(r)&&r.endsWith(".getHeading")?r.substring(0,r.length-11):r}function b4(e){return va(e,AE)}function I4(e){let[t,r]=jc(e);if(A(r)||t!=="HeadingInterpolator.PiecewiseNode"||r.length!==3)return;let n=Cr(r[0]),o=Cr(r[1]),i=UE(r[2],!0);if(!(A(n)||A(o)||A(i)))return{timing:{start:n,end:o},heading:i}}function UE(e,t){let r=TE(e);if(A(r))return;let n=Yt(T(T(T(T(e.children.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary)?.primarySuffix);switch(r){case"HeadingInterpolator.piecewise":if(t||A(n))break;let o=n.map(I4);if(o.every(I))return{type:he.Piecewise,pieces:o};break;case"HeadingInterpolator.facingPoint":if(I(n)&&n.length>0&&n.length<3){if(n.length===1){let u=LE(n[0]);if(I(u))return{type:he.Point,point:u}}else if(n.length===2){let u=Cr(n[0]),l=Cr(n[1]);if(I(u)&&I(l))return{type:he.Point,point:{x:u,y:l}}}}return;case"HeadingInterpolator.tangent":return I(n)?void 0:{type:he.Tangent};case"HeadingInterpolator.constant":if(I(n)){let u=br(n[0]);if(I(u))return{type:he.Constant,heading:u}}return;case"HeadingInterpolator.linear":case"HeadingInterpolator.reversedLinear":if(A(n)||n.length<2)return;let i=br(n[0]),a=br(n[1]);if(A(i)||A(a)||n.length>3)return;let s=n.length===3?Cr(n[3]):void 0,c={type:he.Linear,start:i,end:a};return r.indexOf("v")<0?c:{type:he.Reversed,facing:c};case"HeadingInterpolator.reverse":console.error("NYI: HeadingInterpolator.reverse");return;case"HeadingInterpolator.offset":console.error("NYI: HeadingInterpolator.offset");return}}function P4(e){let t=T(T(T(T(T(T(T(e.children.statement)?.statementWithoutTrailingSubstatement)?.expressionStatement)?.statementExpression)?.expression)?.conditionalExpression)?.binaryExpression);if(A(t)||A(t.AssignmentOperator))return;let r=T(T(T(t.unaryExpression)?.primary)?.primaryPrefix);if(A(r)||A(r.fqnOrRefType))return;let n=Bc(r.fqnOrRefType),o=T(T(T(T(T(t.expression)?.conditionalExpression)?.binaryExpression)?.unaryExpression)?.primary);if(A(o))return;let i=RE(o);if(A(i)||i!=="follower.pathBuilder")return;let a=o.primarySuffix;if(A(a)||a.length<5)return;let s=[],c=null,u="pathBuilder";for(let l=0;l<a.length;l++){let f=a[l];if(l%2===1){if(A(f?.children?.Dot))return;switch(u=je(f.children.Identifier),u){case"pathBuilder":case"addPath":case"setTangentHeadingInterpolation":case"setLinearHeadingInterpolation":case"setConstantHeadingInterpolation":case"setHeadingInterpolation":case"setReversed":case"build":continue;default:return}}else switch(u){case"pathBuilder":case"build":if(I(Yt(f)))return;continue;case"setTangentHeadingInterpolation":if(I(Yt(f)))return;c={type:he.Tangent};continue;case"setLinearHeadingInterpolation":let p=Yt(f);if(p?.length!==2)return;let h=br(p[0],!0),E=br(p[1],!0);if(A(h)||A(E))return;c={type:he.Linear,start:h,end:E};continue;case"setConstantHeadingInterpolation":let y=Yt(f);if(y?.length!==1)return;let S=br(y[0],!0);if(A(S))return;c={type:he.Constant,heading:S};continue;case"setReversed":if(c===null)return;c={type:he.Reversed,facing:c};continue;case"setHeadingInterpolation":let d=Yt(f);if(A(d)||d.length!==1)return;let g=UE(d[0]);if(A(g))return;c=g;continue;case"addPath":let m=Yt(f);if(m?.length!==1)return;let x=b4(m[0]);if(A(x))return;s.push(x);continue;default:return}}if(c!==null)return{name:n,paths:s,heading:c}}function v4(e){let t=T(T(e.children.localVariableDeclarationStatement)?.localVariableDeclaration);if(A(t))return;let r=T(T(T(T(T(t.localVariableType)?.unannType)?.unannReferenceType)?.unannClassOrInterfaceType)?.unannClassType)?.Identifier;if(A(r)||r.length===0)return;let n=T(T(t.variableDeclaratorList)?.variableDeclarator);if(A(n))return;let o=je(r),i=Ma(n);if(A(i)||A(o))return;let a=xE(T(T(n.variableInitializer)?.expression));if(A(a))return;let s=T(a.classOrInterfaceTypeToInstantiate)?.Identifier;if(!(A(s)||je(s)!==o)&&!(I(a.argumentList)||I(a.classBody)||I(a.typeArguments)))return{name:i,staticType:o}}function M4(e){let t=T(T(e.constructorBody)?.blockStatements)?.blockStatement;return A(t)?[]:t.map(v4).filter(I)}function k4(e){let t=T(T(e.constructorBody)?.blockStatements)?.blockStatement;return A(t)?[]:t.map(P4).filter(I)}async function NE(e){let t=new wc,r=await t.loadFile(e);if(k(r))return io(r);let n={...t.info};if(delete n.pathChainFields,Gc(n)){let o=[...t.imports];Ko(n,i=>{let a=[...o];ne(i.container,"className")?a.push(t.package+"."+i.container.className):a.push(t.package),i.imports=a,i.fullName=`${t.package}.${i.name}`})}return n}function Gc(e){let t=!1;return Ko(e,r=>{if(r.beziers.length||r.poses.length||r.pathChains.length||r.values.length)return t=!0,!0}),t}var $e={HasFieldImage:!1,TeamPaths:wt(),PathClasses:wt(),ParsedClasses:new Map};function Ko(e,t){let r=[e];for(;r.length>0;){let n=r.pop();if(t(n)===!0)return;r.push(...Object.values(n.children))}}async function w4(e,t){let r=Il(e,t),n=await NE(r);if(nr(n))return n;let o=[];return Ko(n,i=>o.push(i.name)),[o,n]}function _4(e,t,r,n){if(!Gc(n))return;let o=rn(e,t);$e.TeamPaths.set(e,o),Ko(n,i=>{let a=bs(o,i.name);$e.PathClasses.set(o,a),$e.ParsedClasses.set(a,i)})}async function ka(){F4();let e=await bl();for(let[t,r]of e)for(let n of r){let o=Tl(n),i=await w4(t,o);nr(i)||_4(t,o,i[0],i[1])}return $e.HasFieldImage=await Xl(),B4()}function B4(){return $e}function F4(){$e.TeamPaths.clear(),$e.PathClasses.clear(),$e.ParsedClasses.clear()}function CE(e){$e.TeamPaths=e.TeamPaths,$e.PathClasses=e.PathClasses,$e.ParsedClasses=e.ParsedClasses}function D4(e,t){let r=$e.PathClasses.get(rn(e,t));return A(r)?io(`List: ${e}:${t} no Pedro pathing classes found`):[...r.keys()].map(Rl)}function bE(e,t){let r=D4(e,t);if(nr(r))return r;let n=r.reduce((a,s)=>a.length<s.length?a:s),o=bs(rn(e,t),n),i=$e.ParsedClasses.get(o);return A(i)?io(`Root: ${e}:${t} no Pedro pathing classes found`):i}var IE=Mt(require("node:child_process"),1);function PE(e){let t="",r=process.platform;if(/^darwin/.test(r))t="open";else if(/^win/.test(r))t="start";else if(/^linux/.test(r))t="xdg-open";else{console.error(`Don't know how to launch a browser for platform: ${r}`);return}IE.exec(t+" "+e,(n,o,i)=>{n!=null&&console.error(`Couldn't launch a browser: ${JSON.stringify(n)}`)})}async function vE(e){await ka(),console.log(`\u{1F680} \u{1F680} \u{1F680} \u{1F680} \u{1F680}
155
+ Pedro Visualization application is running at ${e}
156
+
157
+ (Your browser should open automatically, but if it doesn't, open a browser
158
+ and go to that URL. The 'http://' is important, as the browser will not allow
159
+ the application to run without it.)
160
+
161
+ *********************************************
162
+ >>> Press Ctrl+C to stop the application. <<<
163
+ *********************************************
164
+ `),await Yl(1500),PE(e.toString())}var ME="x-hono-already-sent";var Ha=require("node:http"),lt=require("node:http2"),Kc=require("node:stream");var kE=e=>((...t)=>{if(typeof t[0]=="function"){let[r,n]=t;return async function(i,a){let s=await r(i),c=await e(i,s,n);if(c)return c;await a()}}else{let[r,n,o]=t;return(async()=>{let i=await e(r,n,o);if(!i)throw new Error("Failed to upgrade WebSocket");return i})()}});var Ut=class extends Error{constructor(e,t){super(e,t),this.name="RequestError"}},j4=new Set(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","server","user-agent"]),G4=/^[!#$%&'*+\-.^_`|~\dA-Za-z]+$/,wa=e=>e===9||e===10||e===13||e===32,wE=e=>{if(!wa(e.charCodeAt(0))&&!wa(e.charCodeAt(e.length-1)))return e;let t=0,r=e.length;for(;t<r&&wa(e.charCodeAt(t));)t++;for(;r>t&&wa(e.charCodeAt(r-1));)r--;return e.slice(t,r)},_E=/[\0\r\n]/,Jc=globalThis.Headers,WE=(e,t=Jc)=>{let r=new t;for(let n=0;n<e.length;n+=2){let o=e[n];o.startsWith(":")||r.append(o,e[n+1])}return r},Qc=class{#e;#t;#r;#i;constructor(e){this.#e=e,e instanceof lt.Http2ServerRequest&&(this.#t=e.rawHeaders.slice())}get#o(){return this.#t??=this.#e.rawHeaders.slice()}get#n(){return this.#r||(this.#r=WE(this.#o),this.#t=void 0),this.#r}#c(e){if(typeof e=="string"){if(!G4.test(e))throw new TypeError(`Invalid header name: ${e}`);return e.toLowerCase()}}#a(e){let t=this.#e instanceof lt.Http2ServerRequest?void 0:this.#e.headers;if(!t||j4.has(e)||e==="set-cookie"||e==="__proto__")return;if(!Object.hasOwn(t,e))return null;let r=t[e];if(typeof r=="string"){let n=wE(r);return _E.test(n)?void 0:n}}#s(e,t){let r=t==="cookie"?"; ":", ",n=null;for(let o=0;o<e.length;o+=2){let i=e[o];if(i.length===t.length&&i.toLowerCase()===t){let a=wE(e[o+1]);if(_E.test(a)){this.#i=!0;return}n=n===null?a:n+r+a}}return n}append(e,t){this.#n.append(e,t)}delete(e){this.#n.delete(e)}get(e){let t=this.#c(e);if(t&&!this.#r&&!this.#i){let r=this.#a(t);if(r!==void 0)return r;let n=this.#s(this.#o,t);if(n!==void 0)return n}return this.#n.get(e)}has(e){let t=this.#c(e);if(t&&!this.#r&&!this.#i){let r=this.#a(t);if(r!==void 0)return r!==null;let n=this.#s(this.#o,t);if(n!==void 0)return n!==null}return this.#n.has(e)}set(e,t){this.#n.set(e,t)}getSetCookie(){return this.#n.getSetCookie()}keys(){return this.#n.keys()}values(){return this.#n.values()}entries(){return this.#n.entries()}forEach(e,t){this.#n.forEach((r,n)=>{e.call(t,r,n,this)})}[Symbol.iterator](){return this.entries()}};Object.defineProperty(Qc.prototype,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,t,r){return`Headers (lightweight) ${r(Object.fromEntries(this),{...t,depth:e==null?null:e-1})}`}});Object.setPrototypeOf(Qc.prototype,Jc.prototype);var VE=e=>globalThis.Headers===Jc?new Qc(e):WE(e.rawHeaders,globalThis.Headers),H4=/^\/[!#$&-;=?-\[\]_a-z~]*$/,K4=/\/\.\.?(?:[/?#]|$)/,W4=/^[a-z0-9._-]+(?::(?:[1-5]\d{3,4}|[6-9]\d{3}))?$/,V4=(e,t,r)=>{let n=`${e}://${t}${r}`;if(W4.test(t)){if(r.length===0)return n+"/";if(r.charCodeAt(0)!==47)throw new Ut("Invalid URL");return!H4.test(r)||K4.test(r)?new URL(n).href:n}else{let o=new URL(n);if(o.hostname.length!==t.length&&o.hostname!==(t.includes(":")?t.replace(/:\d+$/,""):t).toLowerCase())throw new Ut("Invalid host header");return o.href}},q4=e=>e instanceof Ut?e:new Ut(e.message,{cause:e}),Y4=global.Request,Zn=class extends Y4{constructor(e,t){if(typeof e=="object"&&vr in e){let r=t!==void 0&&"body"in t&&t.body!=null;if(e[Jt]&&!r)throw new TypeError("Cannot construct a Request with a Request object that has already been used.");e=e[vr]()}typeof t?.body?.getReader<"u"&&(t.duplex??="half"),super(e,t)}},qE=Symbol("wrapBodyStream"),z4=new Set(["latin1","binary","hex","base64","base64url"]),X4=e=>e===null||z4.has(e),Hc=Symbol("bodyBufferedBeforeDisconnect"),Wc=Symbol("bodyBufferedLengthBeforeDisconnect"),YE=(e,t)=>Buffer.isBuffer(e)?e:Buffer.from(e,t??"utf8"),Zc=e=>!(e instanceof lt.Http2ServerRequest)&&!!e.complete&&!!e.readableAborted&&typeof e.read=="function"&&X4(e.readableEncoding),BE=e=>{if(e.readableDidRead||!Zc(e))return;let t=e;t[Wc]??=e.readableLength},Ba=(e,t)=>{if(e.readableDidRead&&!t||!Zc(e))return;let r=e;if(r[Hc]!==void 0)return r[Hc];let n,o=e.errored;if(o&&o.code!=="ECONNRESET")n=o;else if(r[Wc]!==void 0&&e.readableLength!==r[Wc])n=Fa();else{let i=t??[],a=e.read();a!==null&&i.push(YE(a,e.readableEncoding));let s=i.length===1?i[0]:Buffer.concat(i);n=s;let c=e.headers["content-length"];if(typeof c=="string"&&/^\d+$/.test(c)){let u=Number(c);Number.isSafeInteger(u)&&s.length!==u&&(n=Fa())}}return r[Hc]=n,n},FE=(e,t)=>{if(t instanceof Error){e.error(t);return}t.length>0&&e.enqueue(t),e.close()},J4=(e,t,r,n,o)=>{let i={method:e,headers:r,signal:o.signal};if(e==="TRACE"){i.method="GET";let a=new Zn(t,i);return Object.defineProperty(a,"method",{get(){return"TRACE"}}),a}if(!(e==="GET"||e==="HEAD"))if("rawBody"in n&&n.rawBody instanceof Buffer)i.body=new ReadableStream({start(a){a.enqueue(n.rawBody),a.close()}});else if(n[qE]){let a;i.body=new ReadableStream({async pull(s){try{if(!a){let l=Ba(n);if(l!==void 0){FE(s,l);return}}a||=Kc.Readable.toWeb(n).getReader();let{done:c,value:u}=await a.read();c?s.close():s.enqueue(u)}catch(c){s.error(c)}}})}else{let a=Ba(n);a!==void 0?i.body=new ReadableStream({start(s){FE(s,a)}}):i.body=Kc.Readable.toWeb(n)}return new Zn(t,i)},vr=Symbol("getRequestCache"),zt=Symbol("requestCache"),$n=Symbol("incomingKey"),qo=Symbol("urlKey"),zE=Symbol("methodKey"),XE=Symbol("headersKey"),Wo=Symbol("abortControllerKey"),Vc=Symbol("getAbortController"),qc=Symbol("abortRequest"),Pr=Symbol("bodyBuffer"),_a=Symbol("bodyReadPromise"),Jt=Symbol("bodyConsumedDirectly"),DE=Symbol("bodyLockReader"),Vo=Symbol("abortReason"),Fa=()=>new TypeError("Body is unusable"),Yo=()=>Promise.reject(Fa()),Q4=new TextDecoder,Z4=e=>{if(e[Jt])return Yo();e[Jt]=!0},$4=e=>e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength),e7=e=>(e[XE]||=VE(e[$n])).get("content-type")||"",t7=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/,r7=e=>{if(typeof e!="string"||e.length===0)return"GET";switch(e){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"PATCH":case"POST":case"PUT":case"QUERY":return e}let t=e.toUpperCase();switch(t){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"POST":case"PUT":return t;default:return e}},n7=e=>{if(!t7.test(e))return new TypeError(`'${e}' is not a valid HTTP method.`);let t=e.toUpperCase();if(t==="CONNECT"||t==="TRACK"||t==="TRACE"&&e!=="TRACE")return new TypeError(`'${e}' HTTP method is unsupported.`)},$c=(e,t,r)=>{if(e[Jt])return Yo();let n=e.method;if(n==="GET"||n==="HEAD")return e[vr]()[t]();let o=n7(n);if(o)return Promise.reject(o);if(e[zt]&&n!=="TRACE")return e[zt][t]();let i=Z4(e);if(i)return i;let a=o7(e);if(a){let s=Promise.resolve(r(a,e));return e[Pr]=void 0,s}return i7(e).then(s=>{let c=r(s,e);return e[Pr]=void 0,c})},o7=e=>{let t=e[$n];if("rawBody"in t&&t.rawBody instanceof Buffer)return t.rawBody},jE=(e,t)=>{if(t.errored)return t.errored;let r=e[Vo];return r!==void 0?r instanceof Error?r:new Error(String(r)):new Error("Client connection prematurely closed.")},i7=e=>{if(e[Pr])return Promise.resolve(e[Pr]);if(e[_a])return e[_a];let t=e[$n];if(t.readableDidRead)return Yo();let r=Ba(t);if(r!==void 0)return r instanceof Error?Promise.reject(r):(e[Pr]=r,Promise.resolve(r));let n=new Promise((o,i)=>{let a=[],s=!1,c=y=>{s||(s=!0,E(),y())},u=y=>{let S=t.errored??y;return!Zc(t)||S&&S.code!=="ECONNRESET"?!1:(c(()=>{let d=Ba(t,a);d instanceof Error?i(d):d===void 0?i(y??jE(e,t)):(e[Pr]=d,o(d))}),!0)},l=y=>{a.push(YE(y,t.readableEncoding))},f=()=>{c(()=>{let y=a.length===1?a[0]:Buffer.concat(a);e[Pr]=y,o(y)})},p=y=>{u(y)||c(()=>{i(y)})},h=()=>{if(t.readableEnded){f();return}u()||c(()=>{i(jE(e,t))})},E=()=>{t.off("data",l),t.off("end",f),t.off("error",p),t.off("close",h),e[_a]=void 0};t.on("data",l),t.on("end",f),t.on("error",p),t.on("close",h),queueMicrotask(()=>{s||(t.readableEnded?f():t.errored?p(t.errored):t.destroyed&&h())})});return e[_a]=n,n},Ct={get method(){return this[zE]},get url(){return this[qo]},get headers(){return this[XE]||=VE(this[$n])},[qc](e){this[Vo]===void 0&&(this[Vo]=e);let t=this[Wo];t&&!t.signal.aborted&&t.abort(e)},[Vc](){return this[Wo]||=new AbortController,this[Vo]!==void 0&&!this[Wo].signal.aborted&&this[Wo].abort(this[Vo]),this[Wo]},[vr](){let e=this[Vc]();if(this[zt])return this[zt];let t=this.method;if(this[Jt]&&!(t==="GET"||t==="HEAD")){this[Pr]=void 0;let r={method:t==="TRACE"?"GET":t,headers:this.headers,signal:e.signal};t!=="TRACE"&&(r.body=new ReadableStream({start(o){o.close()}}),r.duplex="half");let n=new Zn(this[qo],r);return t==="TRACE"&&Object.defineProperty(n,"method",{get(){return"TRACE"}}),this[zt]=n}return this[zt]=J4(this.method,this[qo],this.headers,this[$n],e)},get body(){if(!this[Jt])return this[vr]().body;let e=this[vr]();return!this[DE]&&e.body&&(this[DE]=e.body.getReader()),e.body},get bodyUsed(){return this[Jt]?!0:this[zt]?this[zt].bodyUsed:!1}};Object.defineProperty(Ct,"signal",{get(){return this[Vc]().signal}});["cache","credentials","destination","integrity","mode","redirect","referrer","referrerPolicy","keepalive"].forEach(e=>{Object.defineProperty(Ct,e,{get(){return this[vr]()[e]}})});["clone","formData"].forEach(e=>{Object.defineProperty(Ct,e,{value:function(){if(this[Jt]){if(e==="clone")throw Fa();return Yo()}return this[vr]()[e]()}})});Object.defineProperty(Ct,"text",{value:function(){return $c(this,"text",e=>Q4.decode(e))}});Object.defineProperty(Ct,"arrayBuffer",{value:function(){return $c(this,"arrayBuffer",e=>$4(e))}});Object.defineProperty(Ct,"blob",{value:function(){return $c(this,"blob",(e,t)=>{let r=e7(t),n=r?{headers:{"content-type":r}}:void 0;return new Response(e,n).blob()})}});Object.defineProperty(Ct,"json",{value:function(){return this[Jt]?Yo():this.text().then(JSON.parse)}});Object.defineProperty(Ct,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,t,r){return`Request (lightweight) ${r({method:this.method,url:this.url,headers:this.headers,nativeRequest:this[zt]},{...t,depth:e==null?null:e-1})}`}});Object.setPrototypeOf(Ct,Zn.prototype);var a7=(e,t)=>{let r=Object.create(Ct);r[$n]=e,r[zE]=r7(e.method);let n=e.url||"";if(n[0]!=="/"&&(n.startsWith("http://")||n.startsWith("https://"))){if(e instanceof lt.Http2ServerRequest)throw new Ut("Absolute URL for :path is not allowed in HTTP/2");try{r[qo]=new URL(n).href}catch(a){throw new Ut("Invalid absolute URL",{cause:a})}return r}let o=(e instanceof lt.Http2ServerRequest?e.authority:e.headers.host)||t;if(!o)throw new Ut("Missing host header");let i;if(e instanceof lt.Http2ServerRequest){if(i=e.scheme,!(i==="http"||i==="https"))throw new Ut("Unsupported scheme")}else i=e.socket&&e.socket.encrypted?"https":"http";try{r[qo]=V4(i,o,n)}catch(a){throw a instanceof Ut?a:new Ut("Invalid URL",{cause:a})}return r},Ir="text/plain; charset=UTF-8",Yc=Symbol("responseCache"),Qn=Symbol("getResponseCache"),Xt=Symbol("cache"),Da=global.Response,Nt=class JE{#e;#t;[Qn](){let t=this[Xt],r=t&&t[2]instanceof Headers?t[2]:void 0;return delete this[Xt],this[Yc]||=new Da(this.#e,r?{status:this.#t?.status,statusText:this.#t?.statusText,headers:r}:this.#t)}constructor(t,r){let n;if(this.#e=t,r instanceof Da){let o=r[Yc];if(o){this.#t=o,this[Qn]();return}this.#t=r instanceof JE?r.#t:r,n=new Headers(r.headers)}else this.#t=r;(t==null||typeof t=="string"||typeof t?.getReader<"u"||t instanceof Blob||t instanceof Uint8Array)&&(this[Xt]=[r?.status||200,t??null,n||r?.headers])}get headers(){let t=this[Xt];return t?(t[2]instanceof Headers||(t[2]=new Headers(t[2]||(t[1]===null?void 0:{"content-type":Ir}))),t[2]):this[Qn]().headers}get status(){return this[Xt]?.[0]??this[Qn]().status}get ok(){let t=this.status;return t>=200&&t<300}};["body","bodyUsed","redirected","statusText","trailers","type","url"].forEach(e=>{Object.defineProperty(Nt.prototype,e,{get(){return this[Qn]()[e]}})});["arrayBuffer","blob","clone","formData","json","text"].forEach(e=>{Object.defineProperty(Nt.prototype,e,{value:function(){return this[Qn]()[e]()}})});Object.defineProperty(Nt.prototype,Symbol.for("nodejs.util.inspect.custom"),{value:function(e,t,r){return`Response (lightweight) ${r({status:this.status,headers:this.headers,ok:this.ok,nativeResponse:this[Yc]},{...t,depth:e==null?null:e-1})}`}});Object.setPrototypeOf(Nt,Da);Object.setPrototypeOf(Nt.prototype,Da.prototype);var s7=/^https?:\/\/[!#-;=?-[\]_a-z~A-Z]+$/,c7=e=>e instanceof URL?e.href:s7.test(e)?e:new URL(e).href,u7=new Set([301,302,303,307,308]);Object.defineProperty(Nt,"redirect",{value:function(t,r=302){if(!u7.has(r))throw new RangeError("Invalid status code");return new Nt(null,{status:r,headers:{location:c7(t)}})},writable:!0,configurable:!0});Object.defineProperty(Nt,"json",{value:function(t,r){let n=JSON.stringify(t);if(n===void 0)throw new TypeError("The data is not JSON serializable");let o=r?.headers,i;return o?(i=new Headers(o),i.has("content-type")||i.set("content-type","application/json")):i={"content-type":"application/json"},new Nt(n,{status:r?.status??200,statusText:r?.statusText,headers:i})},writable:!0,configurable:!0});async function l7(e){return Promise.race([e,Promise.resolve().then(()=>Promise.resolve(void 0))])}function QE(e,t,r){let n=s=>{e.cancel(s).catch(()=>{})};return t.on("close",n),t.on("error",n),(r??e.read()).then(a,o),e.closed.finally(()=>{t.off("close",n),t.off("error",n)});function o(s){s&&t.destroy(s)}function i(){e.read().then(a,o)}function a({done:s,value:c}){try{if(s)t.end();else if(!t.write(c))t.once("drain",i);else return e.read().then(a,o)}catch(u){o(u)}}}function GE(e,t){if(e.locked)throw new TypeError("ReadableStream is locked.");return t.destroyed?void 0:QE(e.getReader(),t)}var zc=(e,t)=>{let r={};if(e instanceof Headers||(e=new Headers(e??void 0)),e.has("set-cookie")){let n=[];for(let[o,i]of e)o==="set-cookie"?n.push(i):r[o]=i;n.length>0&&(r["set-cookie"]=n)}else for(let[n,o]of e)r[n]=o;return t&&(r["content-type"]??=t),r},ja=Symbol("outgoingEnded"),HE=Symbol("incomingDraining"),f7=500,p7=64*1024*1024,ZE=e=>{let t=e;if(e.destroyed||t[HE])return;if(t[HE]=!0,e instanceof lt.Http2ServerRequest){try{e.stream?.close?.(lt.constants.NGHTTP2_NO_ERROR)}catch{}return}let r=0,n=()=>{clearTimeout(i),e.off("data",a),e.off("end",n),e.off("error",n)},o=()=>{n();let s=e.socket;s&&!s.destroyed&&(typeof s.destroySoon=="function"?s.destroySoon():typeof s.destroy=="function"&&s.destroy())},i=setTimeout(o,f7);i.unref?.();let a=s=>{r+=s.length,r>p7&&o()};e.on("data",a),e.on("end",n),e.on("error",n),e.resume()},d7=(e,t,r,n)=>()=>{t.errored?(BE(t),e[qc](t.errored.toString())):r.writableFinished||(BE(t),e[qc]("Client connection prematurely closed.")),n&&!t.readableEnded&&setTimeout(()=>{t.readableEnded||setTimeout(()=>{ZE(t)})})},h7=e=>{if(!(Xt in e))return!1;let t=e[Xt][1];return t===null||typeof t=="string"||t instanceof Uint8Array},m7=()=>new Response(null,{status:400}),$E=e=>new Response(null,{status:e instanceof Error&&(e.name==="TimeoutError"||e.constructor.name==="TimeoutError")?504:500}),Ga=(e,t)=>{let r=e instanceof Error?e:new Error("unknown error",{cause:e});r.code==="ERR_STREAM_PREMATURE_CLOSE"?console.info("The user aborted a request."):(console.error(e),t.headersSent||t.writeHead(500,{"Content-Type":"text/plain"}),t.end(`Error: ${r.message}`),t.destroy(r))},Xc=e=>{"flushHeaders"in e&&e.writable&&e.flushHeaders()},ey=async(e,t)=>{let[r,n,o]=e[Xt];if(!o){n===null?(t.writeHead(r),t.end()):typeof n=="string"?(t.writeHead(r,{"Content-Type":Ir,"Content-Length":Buffer.byteLength(n)}),t.end(n)):n instanceof Uint8Array?(t.writeHead(r,{"Content-Type":Ir,"Content-Length":n.byteLength}),t.end(n)):n instanceof Blob?(t.writeHead(r,{"Content-Type":Ir,"Content-Length":n.size}),t.end(new Uint8Array(await n.arrayBuffer()))):(t.writeHead(r,{"Content-Type":Ir}),Xc(t),await GE(n,t)?.catch(a=>Ga(a,t))),t[ja]?.();return}let i=!1;if(o instanceof Headers)i=o.has("content-length"),o=zc(o,n===null?void 0:Ir);else if(Array.isArray(o)){let a=new Headers(o);i=a.has("content-length"),o=zc(a,n===null?void 0:Ir)}else for(let a in o)if(a.length===14&&a.toLowerCase()==="content-length"){i=!0;break}i||(typeof n=="string"?o["Content-Length"]=Buffer.byteLength(n):n instanceof Uint8Array?o["Content-Length"]=n.byteLength:n instanceof Blob&&(o["Content-Length"]=n.size)),t.writeHead(r,o),n==null?t.end():typeof n=="string"||n instanceof Uint8Array?t.end(n):n instanceof Blob?t.end(new Uint8Array(await n.arrayBuffer())):(Xc(t),await GE(n,t)?.catch(a=>Ga(a,t))),t[ja]?.()},ty=e=>typeof e.then=="function",g7=async(e,t,r={})=>{if(ty(e))if(r.errorHandler)try{e=await e}catch(o){let i=await r.errorHandler(o);if(!i)return;e=i}else e=await e.catch($E);if(Xt in e)return ey(e,t);let n=zc(e.headers,e.body===null?void 0:Ir);if(e.body){let o=e.body.getReader(),i=[],a=!1,s;if(n["transfer-encoding"]!=="chunked"){let c=2;for(let u=0;u<c;u++){s||=o.read();let l=await l7(s).catch(f=>{console.error(f),a=!0});if(!l){if(u===1){await new Promise(f=>setTimeout(f)),c=3;continue}break}if(s=void 0,l.value&&i.push(l.value),l.done){a=!0;break}}a&&!("content-length"in n)&&(n["content-length"]=i.reduce((u,l)=>u+l.length,0))}t.writeHead(e.status,n),i.forEach(c=>{t.write(c)}),a?t.end():(i.length===0&&Xc(t),await QE(o,t,s))}else n[ME]||(t.writeHead(e.status,n),t.end());t[ja]?.()},E7=(e,t={})=>{let r=t.autoCleanupIncoming??!0;return t.overrideGlobalObjects!==!1&&global.Request!==Zn&&(Object.defineProperty(global,"Request",{value:Zn}),Object.defineProperty(global,"Response",{value:Nt})),async(n,o)=>{let i,a,s=!1,c=!1,u=()=>{!a||c||(c=!0,o.on("close",d7(a,n,o,s)))};try{if(a=a7(n,t.hostname),s=r&&!(n.method==="GET"||n.method==="HEAD"),s&&(n[qE]=!0,n instanceof lt.Http2ServerRequest&&(o[ja]=()=>{n.readableEnded||setTimeout(()=>{n.readableEnded||setTimeout(()=>{n.destroy(),o.destroy()})})})),i=e(a,{incoming:n,outgoing:o}),!ty(i)&&h7(i))return s&&!n.readableEnded&&o.once("finish",()=>{n.readableEnded||ZE(n)}),ey(i,o);u()}catch(l){if(i)return Ga(l,o);if(t.errorHandler){if(u(),i=await t.errorHandler(a?l:q4(l)),!i)return}else a?i=$E(l):i=m7()}try{return await g7(i,o,t)}catch(l){return Ga(l,o)}}},y7=globalThis.CloseEvent??class extends Event{#e;constructor(e,t={}){super(e,t),this.#e=t}get wasClean(){return this.#e.wasClean??!1}get code(){return this.#e.code??0}get reason(){return this.#e.reason??""}},S7=globalThis.ErrorEvent??class extends Event{#e;constructor(e,t={}){super(e,t),this.#e=t}get message(){return this.#e.message??""}get filename(){return this.#e.filename??""}get lineno(){return this.#e.lineno??0}get colno(){return this.#e.colno??0}get error(){return this.#e.error??null}},T7=()=>Symbol("connection"),ry=Symbol("CONNECTION_SYMBOL_KEY"),ny=Symbol("WAIT_FOR_WEBSOCKET_SYMBOL"),R7=new Set(["connection","content-length","keep-alive","proxy-authenticate","proxy-authorization","te","trailer","transfer-encoding","upgrade","sec-websocket-accept","sec-websocket-extensions","sec-websocket-protocol"]),oy=(e,t)=>{t&&t.forEach((r,n)=>{R7.has(n.toLowerCase())||e.push(`${n}: ${r}`)})},KE=(e,t,r)=>{let n=["Connection: close","Content-Length: 0"];oy(n,r),e.end(`HTTP/1.1 ${t.toString()} ${Ha.STATUS_CODES[t]??""}\r
155
165
  ${n.join(`\r
156
166
  `)}\r
157
167
  \r
158
- `)},x7=e=>{let t=e.socket.encrypted?"https":"http",r=new URL(e.url??"/",`${t}://${e.headers.host??"localhost"}`),n=new Headers;for(let o in e.headers){let i=e.headers[o];i&&n.append(o,Array.isArray(i)?i[0]:i)}return new Request(r,{headers:n})},O7=e=>{let{server:t,fetchCallback:r,wss:n}=e,o=new Map;n.on("connection",(s,c)=>{let u=o.get(c);u&&(u.resolve(s),o.delete(c))});let i=s=>{let c=o.get(s);c&&(o.delete(s),c.reject(new Error("WebSocket handshake aborted")))},a=(s,c)=>new Promise((u,l)=>{o.set(s,{resolve:u,reject:l,connectionSymbol:c})});t.on("upgrade",async(s,c,u)=>{if(s.headers.upgrade?.toLowerCase()!=="websocket")return;let l={incoming:s,outgoing:void 0,wss:n,[ny]:a},f=400,p;try{let S=await r(x7(s),l);S instanceof Response&&(f=S.status,p=S.headers)}catch{t.listenerCount("upgrade")===1&&KE(c,500);return}let h=o.get(s);if(!h||h.connectionSymbol!==l[ry]){i(s),t.listenerCount("upgrade")===1&&KE(c,f,p);return}let E=S=>{oy(S,p)},y=()=>i(s);c.once("close",y),n.on("headers",E);try{n.handleUpgrade(s,c,u,S=>{c.off("close",y),n.emit("connection",S,s)})}finally{n.off("headers",E)}}),t.on("close",()=>{n.close()})},yY=kE(async(e,t,r)=>{if(e.req.header("upgrade")?.toLowerCase()!=="websocket")return;let n=e.env,o=n[ny];if(!o||!n.incoming)return new Response(null,{status:500});let i=T7();return n[ry]=i,(async()=>{let a;try{a=await o(n.incoming,i)}catch{return}let s=[],c=(f,p)=>{s.push([f,p])};a.on("message",c);let u={binaryType:"arraybuffer",close(f,p){a.close(f,p)},protocol:a.protocol,raw:a,get readyState(){return a.readyState},send(f,p){a.send(f,{compress:p?.compress})},url:new URL(e.req.url)};try{t?.onOpen?.(new Event("open"),u)}catch(f){(r?.onError??console.error)(f)}let l=(f,p)=>{let h=Array.isArray(f)?f:[f];for(let E of h)try{t?.onMessage?.(new MessageEvent("message",{data:p?E instanceof ArrayBuffer?E:E.buffer.slice(E.byteOffset,E.byteOffset+E.byteLength):typeof E=="string"?E:Buffer.from(E).toString("utf-8")}),u)}catch(y){(r?.onError??console.error)(y)}};a.off("message",c);for(let f of s)l(...f);a.on("message",(f,p)=>{l(f,p)}),a.on("close",(f,p)=>{try{t?.onClose?.(new y7("close",{code:f,reason:p.toString()}),u)}catch(h){(r?.onError??console.error)(h)}}),a.on("error",f=>{try{t?.onError?.(new S7("error",{error:f}),u)}catch(p){(r?.onError??console.error)(p)}})})(),new Response}),L7=e=>{let t=e.fetch,r=E7(t,{hostname:e.hostname,overrideGlobalObjects:e.overrideGlobalObjects,autoCleanupIncoming:e.autoCleanupIncoming}),n=(e.createServer||Ka.createServer)(e.serverOptions||{},r);if(e.websocket&&e.websocket.server){if(e.websocket.server.options.noServer!==!0)throw new Error("WebSocket server must be created with { noServer: true } option");O7({server:n,fetchCallback:t,wss:e.websocket.server})}return n},iy=(e,t)=>{let r=L7(e);return r.listen(e?.port??3e3,e.hostname,()=>{let n=r.address();t&&t(n)}),r};var ay=require("node:stream"),sy=require("node:process"),A7=()=>{let[e,t]=sy.versions.node.split(".").map(r=>parseInt(r));return e>=23||e===22&&t>=7||e===20&&t>=18},U7=A7(),eu=(e,t=U7)=>{if(t)return ay.Readable.toWeb(e);let r,n=!1,o=()=>{e.off("data",a),e.off("error",s),e.off("end",c),e.off("close",c)},i=u=>{n||(n=!0,o(),u?.())},a=u=>{n||!r||(r.enqueue(u),(r.desiredSize??0)<=0&&e.pause())},s=u=>{i(()=>{r?.error(u)})},c=()=>{i(()=>{r?.close()})};return new ReadableStream({start(u){r=u,e.on("data",a),e.on("error",s),e.on("end",c),e.on("close",c),e.pause()},pull(){n||e.resume()},cancel(){i();let u=()=>{};e.on("error",u),e.once("close",()=>e.off("error",u)),e.destroy()}})};var cy=(e,t=C7)=>{let r=/\.([a-zA-Z0-9]+?)$/,n=e.match(r);if(n)return t[n[1].toLowerCase()]};var N7={aac:"audio/aac",avi:"video/x-msvideo",avif:"image/avif",av1:"video/av1",bin:"application/octet-stream",bmp:"image/bmp",css:"text/css; charset=utf-8",csv:"text/csv; charset=utf-8",eot:"application/vnd.ms-fontobject",epub:"application/epub+zip",gif:"image/gif",gz:"application/gzip",htm:"text/html; charset=utf-8",html:"text/html; charset=utf-8",ico:"image/x-icon",ics:"text/calendar; charset=utf-8",jpeg:"image/jpeg",jpg:"image/jpeg",js:"text/javascript; charset=utf-8",json:"application/json",jsonld:"application/ld+json",map:"application/json",mid:"audio/x-midi",midi:"audio/x-midi",mjs:"text/javascript; charset=utf-8",mp3:"audio/mpeg",mp4:"video/mp4",mpeg:"video/mpeg",oga:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",opus:"audio/opus",otf:"font/otf",pdf:"application/pdf",png:"image/png",rtf:"application/rtf",svg:"image/svg+xml; charset=utf-8",tif:"image/tiff",tiff:"image/tiff",ts:"video/mp2t",ttf:"font/ttf",txt:"text/plain; charset=utf-8",wasm:"application/wasm",webm:"video/webm",weba:"audio/webm",webmanifest:"application/manifest+json",webp:"image/webp",woff:"font/woff",woff2:"font/woff2",xhtml:"application/xhtml+xml; charset=utf-8",xml:"application/xml; charset=utf-8",zip:"application/zip","3gp":"video/3gpp","3g2":"video/3gpp2",gltf:"model/gltf+json",glb:"model/gltf-binary"},C7=N7;var Qr=require("node:fs"),ru=require("node:path"),b7=/^\s*(?:text\/[^;\s]+|application\/(?:javascript|json|xml|xml-dtd|ecmascript|dart|postscript|rtf|tar|toml|vnd\.dart|vnd\.ms-fontobject|vnd\.ms-opentype|wasm|x-httpd-php|x-javascript|x-ns-proxy-autoconfig|x-sh|x-tar|x-virtualbox-hdd|x-virtualbox-ova|x-virtualbox-ovf|x-virtualbox-vbox|x-virtualbox-vdi|x-virtualbox-vhd|x-virtualbox-vmdk|x-www-form-urlencoded)|font\/(?:otf|ttf)|image\/(?:bmp|vnd\.adobe\.photoshop|vnd\.microsoft\.icon|vnd\.ms-dds|x-icon|x-ms-bmp)|message\/rfc822|model\/gltf-binary|x-shader\/x-fragment|x-shader\/x-vertex|[^;\s]+?\+(?:json|text|xml|yaml))(?:[;\s]|$)/i,nu={br:".br",zstd:".zst",gzip:".gz"},I7=Object.keys(nu),tu=e=>{let t;try{t=(0,Qr.statSync)(e)}catch{}return t},P7=/^(?:bytes=)?(?!-$)(\d*)-(\d*)$/,v7=e=>{let t=e.match(P7);if(!t)return;let[,r,n]=t;return r===""?{type:"suffix",length:Number(n)}:n===""?{type:"open-ended",start:Number(r)}:{type:"bounded",start:Number(r),end:Number(n)}},M7=(e,t)=>{if(t===0)return;if(e.type==="suffix")return e.length===0?void 0:{start:Math.max(t-e.length,0),end:t-1};let r=e.type==="bounded"?Math.min(e.end,t-1):t-1;if(!(e.start>=t||e.start>r))return{start:e.start,end:r}},k7=(e,t)=>{try{return t(e)}catch{return e.replace(/(?:%[0-9A-Fa-f]{2})+/g,r=>{try{return t(r)}catch{return r}})}},w7=e=>k7(e,decodeURI),ou=(e={root:""})=>{let t=e.root||"",r=e.path;return t!==""&&!(0,Qr.existsSync)(t)&&console.error(`serveStatic: root path '${t}' is not found, are you sure it's correct?`),async(n,o)=>{if(n.finalized)return o();let i;if(r)i=r;else try{if(i=w7(n.req.path),/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}|\\/.test(i))throw new Error}catch{return await e.onNotFound?.(n.req.path,n),o()}let a=(0,ru.join)(t,!r&&e.rewriteRequestPath?e.rewriteRequestPath(i,n):i),s=tu(a);if(s&&s.isDirectory()){let p=e.index??"index.html";a=(0,ru.join)(a,p),s=tu(a)}if(!s)return await e.onNotFound?.(a,n),o();let c=cy(a);if(n.header("Content-Type",c||"application/octet-stream"),e.precompressed&&(!c||c==="application/octet-stream"||b7.test(c))){let p=new Set(n.req.header("Accept-Encoding")?.split(",").map(h=>h.trim()));for(let h of I7){if(!p.has(h))continue;let E=tu(a+nu[h]);if(E){n.header("Content-Encoding",h),n.header("Vary","Accept-Encoding",{append:!0}),s=E,a=a+nu[h];break}}}let u,l=s.size,f=n.req.header("range")||"";if(n.header("Last-Modified",s.mtime.toUTCString()),n.req.method=="HEAD"||n.req.method=="OPTIONS")n.header("Content-Length",l.toString()),n.status(200),u=n.body(null);else if(!f)n.header("Content-Length",l.toString()),u=n.body(eu((0,Qr.createReadStream)(a)),200);else{n.header("Accept-Ranges","bytes");let p=M7(v7(f)??{type:"open-ended",start:0},l);if(!p)n.header("Content-Range",`bytes */${l}`),u=n.body(null,416);else{let{start:h,end:E}=p,y=E-h+1,S=(0,Qr.createReadStream)(a,{start:h,end:E});n.header("Content-Length",y.toString()),n.header("Content-Range",`bytes ${h}-${E}/${l}`),u=n.body(eu(S),206)}}return await e.onFound?.(a,n),u}};var iu=(e,t,r)=>(n,o)=>{let i=-1;return a(0);async function a(s){if(s<=i)throw new Error("next() called multiple times");i=s;let c,u=!1,l;if(e[s]?(l=e[s][0][0],n.req.routeIndex=s):l=s===e.length&&o||void 0,l)try{c=await l(n,()=>a(s+1))}catch(f){if(f instanceof Error&&t)n.error=f,c=await t(f,n),u=!0;else throw f}else n.finalized===!1&&r&&(c=await r(n));return c&&(n.finalized===!1||u)&&(n.res=c),n}};var uy=Symbol();var ly=(e,t)=>new Response(e,{headers:{"Content-Type":t.replace(/^[^;]+/,n=>n.toLowerCase())}}).formData();var fy=32,_7=1e4,Wa=e=>"headers"in e,hy=async(e,t=Object.create(null))=>{let{all:r=!1,dot:n=!1}=t,a=(Wa(e)?e.headers:e.raw.headers).get("Content-Type")?.split(";")[0].trim().toLowerCase();return a==="multipart/form-data"||a==="application/x-www-form-urlencoded"?B7(e,{all:r,dot:n}):{}};async function B7(e,t){if(!Wa(e)&&e.bodyCache.formData)return py(await e.bodyCache.formData,t);let r=Wa(e)?e.headers:e.raw.headers,n=await e.arrayBuffer(),o=ly(n,r.get("Content-Type")||"");Wa(e)||(e.bodyCache.formData=o);let i=await o;return i?py(i,t):{}}function py(e,t){let r=Object.create(null),n={count:0};return e.forEach((o,i)=>{t.all||i.endsWith("[]")?F7(r,i,o):r[i]=o}),t.dot&&Object.entries(r).forEach(([o,i])=>{o.includes(".")&&(D7(r,o,i,n),delete r[o])}),r}var F7=(e,t,r)=>{e[t]!==void 0?Array.isArray(e[t])?e[t].push(r):e[t]=[e[t],r]:t.endsWith("[]")?e[t]=[r]:e[t]=r},D7=(e,t,r,n)=>{if(/(?:^|\.)__proto__\./.test(t))return;let o=e,i=t.split(".",fy+2);i.length>fy+1&&dy(),i.forEach((a,s)=>{s===i.length-1?o[a]=r:((!o[a]||typeof o[a]!="object"||Array.isArray(o[a])||o[a]instanceof File)&&(n.count++>=_7&&dy(),o[a]=Object.create(null)),o=o[a])})},dy=()=>{throw new Error("Nesting limit exceeded")};var su=e=>{let t=e.split("/");return t[0]===""&&t.shift(),t},my=e=>{let{groups:t,path:r}=j7(e),n=su(r);return G7(n,t)},j7=e=>{let t=[];return e=e.replace(/\{[^}]+\}/g,(r,n)=>{let o=`@${n}`;return t.push([o,r]),o}),{groups:t,path:e}},G7=(e,t)=>{for(let r=t.length-1;r>=0;r--){let[n]=t[r];for(let o=e.length-1;o>=0;o--)if(e[o].includes(n)){e[o]=e[o].replace(n,t[r][1]);break}}return e},Va={},gy=(e,t)=>{if(e==="*")return"*";let r=e.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/);if(r){let n=`${e}#${t}`;return Va[n]||(r[2]?Va[n]=t&&t[0]!==":"&&t[0]!=="*"?[n,r[1],new RegExp(`^${r[2]}(?=/${t})`)]:[e,r[1],new RegExp(`^${r[2]}$`)]:Va[n]=[e,r[1],!0]),Va[n]}return null},Ey=(e,t)=>{try{return t(e)}catch{return e.replace(/(?:%[0-9A-Fa-f]{2})+/g,r=>{try{return t(r)}catch{return r}})}},H7=e=>Ey(e,decodeURI),cu=e=>{let t=e.url,r=t.indexOf("/",t.indexOf(":")+4),n=r;for(;n<t.length;n++){let o=t.charCodeAt(n);if(o===37){let i=t.indexOf("?",n),a=t.indexOf("#",n),s=i===-1?a===-1?void 0:a:a===-1?i:Math.min(i,a),c=t.slice(r,s);return H7(c.includes("%25")?c.replace(/%25/g,"%2525"):c)}else if(o===63||o===35)break}return t.slice(r,n)};var yy=e=>{let t=cu(e);return t.length>1&&t.at(-1)==="/"?t.slice(0,-1):t},Mr=(e,t,...r)=>(r.length&&(t=Mr(t,...r)),`${e?.[0]==="/"?"":"/"}${e}${t==="/"?"":`${e?.at(-1)==="/"?"":"/"}${t?.[0]==="/"?t.slice(1):t}`}`),qa=e=>{if(e.charCodeAt(e.length-1)!==63||!e.includes(":"))return null;let t=e.split("/"),r=[],n="";return t.forEach(o=>{if(o!==""&&!/\:/.test(o))n+="/"+o;else if(/\:/.test(o))if(o.charCodeAt(o.length-1)===63){r.length===0&&n===""?r.push("/"):r.push(n);let i=o.slice(0,-1);n+="/"+i,r.push(n)}else n+="/"+o}),r.filter((o,i,a)=>a.indexOf(o)===i)},Ya=e=>e.indexOf("%")!==-1?Ey(e,K7):e,au=e=>(e.indexOf("+")!==-1&&(e=e.replace(/\+/g," ")),Ya(e)),Sy=(e,t,r)=>{let n=e.indexOf("#",8);n!==-1&&(e=e.slice(0,n));let o;if(!r&&t&&t.indexOf("%")===-1&&t.indexOf("+")===-1){let s=e.indexOf("?",8);if(s===-1)return;for(e.startsWith(t,s+1)||(s=e.indexOf(`&${t}`,s+1));s!==-1;){let c=e.charCodeAt(s+t.length+1);if(c===61){let u=s+t.length+2,l=e.indexOf("&",u);return au(e.slice(u,l===-1?void 0:l))}else if(c==38||isNaN(c))return"";s=e.indexOf(`&${t}`,s+1)}if(o=/[%+]/.test(e),!o)return}let i=Object.create(null);o??=/[%+]/.test(e);let a=e.indexOf("?",8);for(;a!==-1;){let s=e.indexOf("&",a+1),c=e.indexOf("=",a);c>s&&s!==-1&&(c=-1);let u=e.slice(a+1,c===-1?s===-1?void 0:s:c);if(o&&(u=au(u)),a=s,u==="")continue;let l;c===-1?l="":(l=e.slice(c+1,s===-1?void 0:s),o&&(l=au(l))),r?(i[u]&&Array.isArray(i[u])||(i[u]=[]),i[u].push(l)):i[u]??=l}return t?i[t]:i},Ty=Sy,Ry=(e,t)=>Sy(e,t,!0),K7=decodeURIComponent;var xy=class{raw;#e;#t;routeIndex=0;path;bodyCache={};constructor(e,t="/",r=[[]]){this.raw=e,this.path=t,this.#t=r}param(e){return e?this.#r(e):this.#i()}#r(e){let t=this.#t[0][this.routeIndex]?.[1][e],r=this.#o(t);return r&&Ya(r)}#i(){let e={},t=Object.keys(this.#t[0][this.routeIndex]?.[1]??{});for(let r of t){let n=this.#o(this.#t[0][this.routeIndex][1][r]);n!==void 0&&(e[r]=Ya(n))}return e}#o(e){return this.#t[1]?this.#t[1][e]:e}query(e){return Ty(this.url,e)}queries(e){return Ry(this.url,e)}header(e){if(e)return this.raw.headers.get(e)??void 0;let t=Object.create(null);return this.raw.headers.forEach((r,n)=>{t[n]=r}),t}async parseBody(e){return hy(this,e)}#n=e=>{let{bodyCache:t,raw:r}=this,n=t[e];if(n)return n;for(let o in t)return t[o].then(i=>(o==="json"&&(i=JSON.stringify(i)),new Response(i)[e]()));return t[e]=r[e]()};json(){return this.#n("text").then(e=>JSON.parse(e))}text(){return this.#n("text")}arrayBuffer(){return this.#n("arrayBuffer")}bytes(){return this.#n("arrayBuffer").then(e=>new Uint8Array(e))}blob(){return this.#n("blob")}formData(){return this.#n("formData")}addValidatedData(e,t){(this.#e??={})[e]=t}valid(e){return this.#e?.[e]}get url(){return this.raw.url}get method(){return this.raw.method}get[uy](){return this.#t}get matchedRoutes(){return this.#t[0].map(([[,e]])=>e)}get routePath(){return this.#t[0].map(([[,e]])=>e)[this.routeIndex].path}};var Oy={Stringify:1,BeforeStream:2,Stream:3},W7=(e,t)=>{let r=new String(e);return r.isEscaped=!0,r.callbacks=t,r};var uu=async(e,t,r,n,o)=>{typeof e=="object"&&!(e instanceof String)&&(e instanceof Promise||(e=e.toString()),e instanceof Promise&&(e=await e));let i=e.callbacks;if(!i?.length)return Promise.resolve(e);o?o[0]+=e:o=[e];let a=Promise.all(i.map(s=>s({phase:t,buffer:o,context:n}))).then(s=>Promise.all(s.filter(Boolean).map(c=>uu(c,t,!1,n,o))).then(()=>o[0]));return r?W7(await a,i):a};var V7="text/plain; charset=UTF-8",lu=(e,t)=>({"Content-Type":e,...t}),Xo=(e,t)=>new Response(e,t),fu=class{#e;#t;env={};#r;finalized=!1;error;#i;#o;#n;#c;#a;#s;#l;#f;#p;constructor(e,t){this.#e=e,t&&(this.#o=t.executionCtx,this.env=t.env,this.#s=t.notFoundHandler,this.#p=t.path,this.#f=t.matchResult)}get req(){return this.#t??=new xy(this.#e,this.#p,this.#f),this.#t}get event(){if(this.#o&&"respondWith"in this.#o)return this.#o;throw Error("This context has no FetchEvent")}get executionCtx(){if(this.#o)return this.#o;throw Error("This context has no ExecutionContext")}get res(){return this.#n||=Xo(null,{headers:this.#l??=new Headers})}set res(e){if(this.#n&&e){e=Xo(e.body,e);for(let[t,r]of this.#n.headers.entries())if(t!=="content-type")if(t==="set-cookie"){let n=this.#n.headers.getSetCookie();e.headers.delete("set-cookie");for(let o of n)e.headers.append("set-cookie",o)}else e.headers.set(t,r)}this.#n=e,this.finalized=!0}render=(...e)=>(this.#a??=t=>this.html(t),this.#a(...e));setLayout=e=>this.#c=e;getLayout=()=>this.#c;setRenderer=e=>{this.#a=e};header=(e,t,r)=>{this.finalized&&(this.#n=Xo(this.#n.body,this.#n));let n=this.#n?this.#n.headers:this.#l??=new Headers;t===void 0?n.delete(e):r?.append?n.append(e,t):n.set(e,t)};status=e=>{this.#i=e};set=(e,t)=>{this.#r??=new Map,this.#r.set(e,t)};get=e=>this.#r?this.#r.get(e):void 0;get var(){return this.#r?Object.fromEntries(this.#r):{}}#u(e,t,r){let n=this.#n?new Headers(this.#n.headers):this.#l;if(typeof t=="object"&&t.headers){n??=new Headers;for(let[i,a]of new Headers(t.headers))i==="set-cookie"?n.append(i,a):n.set(i,a)}if(r){if(!n){let i=0;for(let a in r)if(++i>1||typeof r[a]!="string"){n=new Headers;break}}if(n)for(let i in r){let a=r[i];if(typeof a=="string")n.set(i,a);else{n.delete(i);for(let s of a)n.append(i,s)}}}let o=typeof t=="number"?t:t?.status??this.#i;return Xo(e,{status:o,headers:n??r})}newResponse=(...e)=>this.#u(...e);body=(e,t,r)=>this.#u(e,t,r);text=(e,t,r)=>!this.#l&&!this.#i&&!t&&!r&&!this.finalized?new Response(e):this.#u(e,t,lu(V7,r));json=(e,t,r)=>this.#u(JSON.stringify(e),t,lu("application/json",r));html=(e,t,r)=>{let n=o=>this.#u(o,t,lu("text/html; charset=UTF-8",r));return typeof e=="object"?uu(e,Oy.Stringify,!1,{}).then(n):n(e)};redirect=(e,t)=>{let r=String(e);return this.header("Location",/[^\x00-\xFF]/.test(r)?encodeURI(r):r),this.newResponse(null,t??302)};notFound=()=>(this.#s??=()=>Xo(),this.#s(this))};var Ne="ALL",Ly="all",Ay=["get","post","put","delete","options","patch","query"],za="Can not add a route since the matcher is already built.",Xa=class extends Error{};var Uy="__COMPOSED_HANDLER";var q7=e=>e.text("404 Not Found",404),Ny=(e,t)=>{if("getResponse"in e){let r=e.getResponse();return t.newResponse(r.body,r)}return console.error(e),t.text("Internal Server Error",500)},Cy=class by{get;post;put;delete;options;patch;query;all;on;use;router;getPath;_basePath="/";#e="/";routes=[];constructor(t={}){[...Ay,Ly].forEach(i=>{this[i]=(a,...s)=>(typeof a=="string"?this.#e=a:this.#i(i,this.#e,a),s.forEach(c=>{this.#i(i,this.#e,c)}),this)}),this.on=(i,a,...s)=>{for(let c of[a].flat()){this.#e=c;for(let u of[i].flat())s.map(l=>{this.#i(u.toUpperCase(),this.#e,l)})}return this},this.use=(i,...a)=>(typeof i=="string"?this.#e=i:(this.#e="*",a.unshift(i)),a.forEach(s=>{this.#i(Ne,this.#e,s)}),this);let{strict:n,...o}=t;Object.assign(this,o),this.getPath=n??!0?t.getPath??cu:yy}#t(){let t=new by({router:this.router,getPath:this.getPath});return t.errorHandler=this.errorHandler,t.#r=this.#r,t.routes=this.routes,t}#r=q7;errorHandler=Ny;route(t,r){let n=this.basePath(t);return r.routes.map(o=>{let i;r.errorHandler===Ny?i=o.handler:(i=async(a,s)=>(await iu([],r.errorHandler)(a,()=>o.handler(a,s))).res,i[Uy]=o.handler),n.#i(o.method,o.path,i,o.basePath)}),this}basePath(t){let r=this.#t();return r._basePath=Mr(this._basePath,t),r}onError=t=>(this.errorHandler=t,this);notFound=t=>(this.#r=t,this);mount(t,r,n){let o,i;n&&(typeof n=="function"?i=n:(i=n.optionHandler,n.replaceRequest===!1?o=c=>c:o=n.replaceRequest));let a=i?c=>{let u=i(c);return Array.isArray(u)?u:[u]}:c=>{let u;try{u=c.executionCtx}catch{}return[c.env,u]};o||=(()=>{let c=Mr(this._basePath,t),u=c==="/"?0:c.length;return l=>{let f=new URL(l.url);return f.pathname=this.getPath(l).slice(u)||"/",new Request(f,l)}})();let s=async(c,u)=>{let l=await r(o(c.req.raw),...a(c));if(l)return l;await u()};return this.#i(Ne,Mr(t,"*"),s),this}#i(t,r,n,o){t=t.toUpperCase(),r=Mr(this._basePath,r);let i={basePath:o!==void 0?Mr(this._basePath,o):this._basePath,path:r,method:t,handler:n};this.router.add(t,r,[n,i]),this.routes.push(i)}#o(t,r){if(t instanceof Error)return this.errorHandler(t,r);throw t}#n(t,r,n,o){if(o==="HEAD")return(async()=>new Response(null,await this.#n(t,r,n,"GET")))();let i=this.getPath(t,{env:n}),a=this.router.match(o,i),s=new fu(t,{path:i,matchResult:a,env:n,executionCtx:r,notFoundHandler:this.#r});if(a[0].length===1){let u;try{u=a[0][0][0][0](s,async()=>{s.res=await this.#r(s)})}catch(l){return this.#o(l,s)}return u instanceof Promise?u.then(l=>l||(s.finalized?s.res:this.#r(s))).catch(l=>this.#o(l,s)):u??this.#r(s)}let c=iu(a[0],this.errorHandler,this.#r);return(async()=>{try{let u=await c(s);if(!u.finalized)throw new Error("Context is not finalized. Did you forget to return a Response object or `await next()`?");return u.res}catch(u){return this.#o(u,s)}})()}fetch=(t,...r)=>this.#n(t,r[1],r[0],t.method);request=(t,r,n,o)=>t instanceof Request?this.fetch(r?new Request(t,r):t,n,o):(t=t.toString(),this.fetch(new Request(/^https?:\/\//.test(t)?t:`http://localhost${Mr("/",t)}`,r),n,o));fire=()=>{addEventListener("fetch",t=>{t.respondWith(this.#n(t.request,t,void 0,t.request.method))})}};var Oe=()=>Object.create(null);var Ja=[];function pu(e,t){let r=this.buildAllMatchers(),n=((o,i)=>{let a=r[o]||r[Ne],s=a[2][i];if(s)return s;let c=i.match(a[0]);if(!c)return[[],Ja];let u=c.indexOf("",1);return[a[1][u],c]});return this.match=n,n(e,t)}var eo="[^/]+",wr=".*",Qt="(?:|/.*)",kr=Symbol(),Iy=new Set(".\\+*[^]$()");function Y7(e,t){return e.length===1?t.length===1?e<t?-1:1:-1:t.length===1?1:e===wr||e===Qt?t===Qt?-1:1:t===wr||t===Qt?-1:e===eo?1:t===eo?-1:e.length===t.length?e<t?-1:1:t.length-e.length}var Py=class du{#e;#t;#r=Oe();insert(t,r,n,o,i){let a=this;for(let s=0,c=t.length;s<c;s++){let u=t[s],l=u.length===1?u==="*"?s===c-1?["","",wr]:["","",eo]:null:u==="/*"?["","",Qt]:u.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/),f;if(l){let p=l[1],h=l[2]||eo;if(p&&l[2]&&(h===".*"||(h=h.replace(/^\((?!\?:)(?=[^)]+\)$)/,"(?:"),/\((?!\?:)/.test(h))||h.length===1&&Iy.has(h)))throw kr;if(f=a.#r[h],!f){if(h!==wr&&h!==Qt){for(let E in a.#r)if((h.length>1||E.length>1)&&E!==wr&&E!==Qt)throw kr}f=a.#r[h]=new du}p!==""&&(f.#t??=o.varIndex++,n.push([p,f.#t]))}else if(f=a.#r[u],!f){for(let p in a.#r)if(p.length>1&&p!==wr&&p!==Qt)throw kr;f=a.#r[u]=new du}a=f}if(a.#e!==void 0)throw kr;a.#e=i?-1:r}buildRegExpStr(){let r=Object.keys(this.#r).sort(Y7).map(n=>{let o=this.#r[n],i=o.buildRegExpStr();return i===""?"":(typeof o.#t=="number"?`(${n})@${o.#t}`:Iy.has(n)?`\\${n}`:n)+i}).filter(Boolean);return typeof this.#e=="number"&&this.#e!==-1&&r.unshift(`#${this.#e}`),r.length===0?"":r.length===1?r[0]:"(?:"+r.join("|")+")"}};var hu=class{#e={varIndex:0};#t=new Py;#r=0;paths=Oe();insert(e,t){if(t){this.#t.insert(e.split(""),0,[],this.#e,!0);return}let r=[],n=[],o=e;for(let a=0;;){let s=!1;if(o=o.replace(/\{[^}]+\}/g,c=>{let u=`@\\${a}`;return n[a]=[u,c],a++,s=!0,u}),!s)break}let i=o.match(/(?::[^\/]+)|(?:\/\*$)|./g)||[];for(let a=n.length-1;a>=0;a--){let[s]=n[a];for(let c=i.length-1;c>=0;c--)if(i[c].indexOf(s)!==-1){i[c]=i[c].replace(s,n[a][1]);break}}this.#t.insert(i,this.#r,r,this.#e,!1),this.paths[e]=[this.#r++,r]}buildRegExp(){let e=this.#t.buildRegExpStr();if(e==="")return[/^$/,[],[]];let t=0,r=[],n=[];return e=e.replace(/#(\d+)|@(\d+)|\.\*\$/g,(o,i,a)=>i!==void 0?(r[++t]=Number(i),"$()"):(a!==void 0&&(n[Number(a)]=++t),"")),[new RegExp(`^${e}`),r,n]}};var vy=Oe();function My(e){return vy[e]??=new RegExp(`^${e.replace(/\/:[^/{}]+(?:\{\[\^\/]\+})?(?=[/{]|$)|\/?\*$|([.\\+*[^\]$()?{}|])/g,(t,r)=>r?`\\${r}`:t==="/*"?Qt:t==="*"?wr:`/:${eo}`)}$`)}function Qa(e,t){for(let r of Object.keys(e).sort((n,o)=>o.length-n.length))if(My(r).test(t))return[...e[r]]}var Za=class{name="RegExpRouter";#e;#t;#r;constructor(){this.#e={[Ne]:Oe()},this.#t={[Ne]:Oe()},this.#r={[Ne]:new hu}}#i(e,t){try{this.#r[e].insert(t,!/\*|\/:/.test(t))}catch(r){throw r===kr?new Xa(t):r}}add(e,t,r){let n=this.#e,o=this.#t;if(!n)throw new Error(za);if(!n[e]){this.#r[e]=new hu;for(let s of[n,o]){s[e]=Oe();for(let c in s[Ne])s[e][c]=[...s[Ne][c]],this.#i(e,c)}}t==="/*"&&(t="*");let i=e===Ne?Object.keys(n):[e];if(/\*$/.test(t)){let s=My(t);for(let c of i)n[c][t]||(this.#i(c,t),n[c][t]=Qa(n[c],t)||Qa(n[Ne],t)||[]);for(let c of[n,o])for(let u of i)for(let l in c[u])s.test(l)&&c[u][l].push([r,t]);return}let a=qa(t)||[t];for(let s of a)for(let c of i)o[c][s]||(this.#i(c,s),o[c][s]=Qa(n[c],s)||Qa(n[Ne],s)||[]),o[c][s].push([r,s])}match=pu;buildAllMatchers(){let e=Oe();for(let t of Object.keys(this.#t))e[t]=this.#o(t);return this.#e=this.#t=this.#r=void 0,vy=Oe(),e}#o(e){let t=this.#e[e],r=this.#t[e],n=this.#r[e],o=Oe(),i=[],[a,s,c]=n.buildRegExp();for(let u of[t,r])for(let l in u){let f=u[l],p=n.paths[l];if(!p){o[l]=[f.map(([h])=>[h,Oe()]),Ja];continue}i[p[0]]=f.map(([h,E])=>[h,n.paths[E][1].reduceRight((y,[S],d)=>(y[S]=c[p[1][d][1]],y),Oe())])}return[a,s.map(u=>i[u]),o]}};var mu=class{name="SmartRouter";#e=[];#t=[];constructor(e){this.#e=e.routers}add(e,t,r){if(!this.#t)throw new Error(za);this.#t.push([e,t,r])}match(e,t){if(!this.#t)throw new Error("Fatal error");let r=this.#e,n=this.#t,o=r.length,i=0,a;for(;i<o;i++){let s=r[i];try{for(let c=0,u=n.length;c<u;c++)s.add(...n[c]);a=s.match(e,t)}catch(c){if(c instanceof Xa)continue;throw c}this.match=s.match.bind(s),this.#e=[s],this.#t=void 0;break}if(i===o)throw new Error("Fatal error");return this.name=`SmartRouter + ${this.activeRouter.name}`,a}get activeRouter(){if(this.#t||this.#e.length!==1)throw new Error("No active router has been determined yet.");return this.#e[0]}};var gu=Oe(),z7=0,ky=class wy{#e=[];#t=Oe();#r=[];#i;#o=gu;insert(t,r,n){let o=this,i=my(r),a=new Set,s=0;for(let c of i){let u=i[++s],l=gy(c,u)||(u===void 0&&c&&c.indexOf("*")===c.length-1?c:null),f=Array.isArray(l),p=f?l[0]:l||c,h=o.#t[p]||=new wy;l&&!h.#i&&(h.#i=l,o.#r.push(h)),o=h,f&&a.add(l[1])}o.#e.push({[t]:{handler:n,possibleKeys:[...a],score:++z7}})}#n(t,r,n,o,i){for(let a=0,s=r.#e.length;a<s;a++){let c=r.#e[a],u=c[n]||c[Ne];if(u){u.params=Oe(),t.push(u);for(let l=0,f=u.possibleKeys.length;l<f;l++){let p=u.possibleKeys[l];u.params[p]=i?.[p]&&!l?i[p]:o[p]??i?.[p]}}}}search(t,r){let n=[];this.#o=gu;let i=[this],a=su(r),s=[],c=a.length,u=null;for(let l=0;l<c;l++){let f=a[l],p=l===c-1,h=[];for(let y=0,S=i.length;y<S;y++){let d=i[y],g=d.#t[f];g&&(g.#o=d.#o,p?(g.#t["*"]&&this.#n(n,g.#t["*"],t,d.#o),this.#n(n,g,t,d.#o)):h.push(g));for(let m of d.#r){let x=m.#i,C=d.#o===gu?{}:{...d.#o};if(typeof x=="string"){(x==="*"||f.startsWith(x.slice(0,-1)))&&(this.#n(n,m,t,d.#o),x==="*"&&(m.#o=C,h.push(m)));continue}let[,Ce,bt]=x;if(!(!f&&bt===!0)){if(bt!==!0){if(!u){u=[];let It=r[0]==="/"?1:0;for(let Me=0;Me<c;Me++)u[Me]=It,It+=a[Me].length+1}let Ye=r.slice(u[l]),$t=bt.exec(Ye);if($t){C[Ce]=$t[0],this.#n(n,m,t,d.#o,C),$t[0].length===Ye.length&&m.#t["*"]&&this.#n(n,m.#t["*"],t,d.#o,C);for(let It in m.#t){m.#o=C;let Me=$t[0].match(/\//g)?.length??0;(s[Me]||=[]).push(m);break}continue}}(bt===!0||bt.test(f))&&(C[Ce]=f,p?(this.#n(n,m,t,C,d.#o),m.#t["*"]&&this.#n(n,m.#t["*"],t,C,d.#o)):(m.#o=C,h.push(m)))}}}let E=s.shift();i=E?h.concat(E):h}return n[1]&&n.sort((l,f)=>l.score-f.score),[n.map(({handler:l,params:f})=>[l,f])]}};var Eu=class{name="TrieRouter";#e=new ky;add(e,t,r){for(let n of qa(t)||[t])this.#e.insert(e,n,r)}match(e,t){return this.#e.search(e,t)}};var yu=class extends Cy{constructor(e={}){super(e),this.router=e.router??new mu({routers:[new Za,new Eu]})}};function _y(e,t,r){return Response.json({message:`Data received for ${e}: ${r}`})}async function By(e){let t=e!=="dark"&&e!=="light"?"dark":e,r=Jl(t);return console.log("Image Path: ",r),I(r)?new Response(Bun.file(r)):(console.log("Replying with SVG field"),new Response(js(t),{headers:{"Content-Type":"image/svg+xml"}}))}async function Fy(e){let t=e!=="dark"&&e!=="light"?"dark":e;return console.log("SVG field requested"),new Response(js(t),{headers:{"Content-Type":"image/svg+xml"}})}async function Dy(e,t){let r=bE(e,t);return nr(r)?Response.json({error:r.errors().join(`
159
- `)}):Response.json(JSON.parse(hs(r)))}async function jy(){let e=await wa();return Response.json(JSON.parse(hs(e)))}async function Gy(e){console.log("Saving DB");try{let t=Mu(e,xl);if(I(t))CE(t);else return Response.json({error:"Failed to unpickle database"})}catch{return Response.json({error:"Crashed while unpickle database"})}return Response.json({success:1})}var Zt=new yu;Zt.get("/img/field/:theme",async e=>By(e.req.param("theme")));Zt.get("/img/svg/:theme",async e=>Fy(e.req.param("theme")));Zt.get("/api/loadpath/:team/:path",async e=>{let{team:t,path:r}=e.req.param();return Dy(t,r)});Zt.get("/api/savepath/:team/:path/:data",async e=>{let{team:t,path:r,data:n}=e.req.param();return _y(t,r,n)});Zt.get("/api/db",async()=>jy());Zt.put("/api/putdb",async e=>Gy(JSON.stringify(e.req.json())));Zt.get("/",ou({path:"./index.html",onNotFound:(e,t)=>{console.log("/ FNF: ",e)}}));Zt.get("/*",ou({root:on(),onNotFound:(e,t)=>{console.log(`File not found: ${e}`)}}));var X7=58888,Hy=Number(process.env.PORT)||X7,Ky,Su,Wy=new Promise((e,t)=>{Ky=e,Su=t}),J7=iy({fetch:Zt.fetch,port:Hy},e=>{console.log(`App running at http://localhost:${e.port}`),Ky(`http://localhost:${e.port}`)});J7.on("error",e=>{e.code==="EADDRINUSE"?Su(`Port ${Hy} already in use`):Su(e.name+": "+e.message)});I(__dirname)&&Al(__dirname);var Q7=[...$a.default.argv.slice(2),$a.default.cwd()].map(e=>Vy.default.resolve(e));Cl(Q7);$a.default.chdir(on());Wy.then(vE).catch(console.error);
168
+ `)},x7=e=>{let t=e.socket.encrypted?"https":"http",r=new URL(e.url??"/",`${t}://${e.headers.host??"localhost"}`),n=new Headers;for(let o in e.headers){let i=e.headers[o];i&&n.append(o,Array.isArray(i)?i[0]:i)}return new Request(r,{headers:n})},O7=e=>{let{server:t,fetchCallback:r,wss:n}=e,o=new Map;n.on("connection",(s,c)=>{let u=o.get(c);u&&(u.resolve(s),o.delete(c))});let i=s=>{let c=o.get(s);c&&(o.delete(s),c.reject(new Error("WebSocket handshake aborted")))},a=(s,c)=>new Promise((u,l)=>{o.set(s,{resolve:u,reject:l,connectionSymbol:c})});t.on("upgrade",async(s,c,u)=>{if(s.headers.upgrade?.toLowerCase()!=="websocket")return;let l={incoming:s,outgoing:void 0,wss:n,[ny]:a},f=400,p;try{let S=await r(x7(s),l);S instanceof Response&&(f=S.status,p=S.headers)}catch{t.listenerCount("upgrade")===1&&KE(c,500);return}let h=o.get(s);if(!h||h.connectionSymbol!==l[ry]){i(s),t.listenerCount("upgrade")===1&&KE(c,f,p);return}let E=S=>{oy(S,p)},y=()=>i(s);c.once("close",y),n.on("headers",E);try{n.handleUpgrade(s,c,u,S=>{c.off("close",y),n.emit("connection",S,s)})}finally{n.off("headers",E)}}),t.on("close",()=>{n.close()})},yY=kE(async(e,t,r)=>{if(e.req.header("upgrade")?.toLowerCase()!=="websocket")return;let n=e.env,o=n[ny];if(!o||!n.incoming)return new Response(null,{status:500});let i=T7();return n[ry]=i,(async()=>{let a;try{a=await o(n.incoming,i)}catch{return}let s=[],c=(f,p)=>{s.push([f,p])};a.on("message",c);let u={binaryType:"arraybuffer",close(f,p){a.close(f,p)},protocol:a.protocol,raw:a,get readyState(){return a.readyState},send(f,p){a.send(f,{compress:p?.compress})},url:new URL(e.req.url)};try{t?.onOpen?.(new Event("open"),u)}catch(f){(r?.onError??console.error)(f)}let l=(f,p)=>{let h=Array.isArray(f)?f:[f];for(let E of h)try{t?.onMessage?.(new MessageEvent("message",{data:p?E instanceof ArrayBuffer?E:E.buffer.slice(E.byteOffset,E.byteOffset+E.byteLength):typeof E=="string"?E:Buffer.from(E).toString("utf-8")}),u)}catch(y){(r?.onError??console.error)(y)}};a.off("message",c);for(let f of s)l(...f);a.on("message",(f,p)=>{l(f,p)}),a.on("close",(f,p)=>{try{t?.onClose?.(new y7("close",{code:f,reason:p.toString()}),u)}catch(h){(r?.onError??console.error)(h)}}),a.on("error",f=>{try{t?.onError?.(new S7("error",{error:f}),u)}catch(p){(r?.onError??console.error)(p)}})})(),new Response}),L7=e=>{let t=e.fetch,r=E7(t,{hostname:e.hostname,overrideGlobalObjects:e.overrideGlobalObjects,autoCleanupIncoming:e.autoCleanupIncoming}),n=(e.createServer||Ha.createServer)(e.serverOptions||{},r);if(e.websocket&&e.websocket.server){if(e.websocket.server.options.noServer!==!0)throw new Error("WebSocket server must be created with { noServer: true } option");O7({server:n,fetchCallback:t,wss:e.websocket.server})}return n},iy=(e,t)=>{let r=L7(e);return r.listen(e?.port??3e3,e.hostname,()=>{let n=r.address();t&&t(n)}),r};var ay=require("node:stream"),sy=require("node:process"),A7=()=>{let[e,t]=sy.versions.node.split(".").map(r=>parseInt(r));return e>=23||e===22&&t>=7||e===20&&t>=18},U7=A7(),eu=(e,t=U7)=>{if(t)return ay.Readable.toWeb(e);let r,n=!1,o=()=>{e.off("data",a),e.off("error",s),e.off("end",c),e.off("close",c)},i=u=>{n||(n=!0,o(),u?.())},a=u=>{n||!r||(r.enqueue(u),(r.desiredSize??0)<=0&&e.pause())},s=u=>{i(()=>{r?.error(u)})},c=()=>{i(()=>{r?.close()})};return new ReadableStream({start(u){r=u,e.on("data",a),e.on("error",s),e.on("end",c),e.on("close",c),e.pause()},pull(){n||e.resume()},cancel(){i();let u=()=>{};e.on("error",u),e.once("close",()=>e.off("error",u)),e.destroy()}})};var cy=(e,t=C7)=>{let r=/\.([a-zA-Z0-9]+?)$/,n=e.match(r);if(n)return t[n[1].toLowerCase()]};var N7={aac:"audio/aac",avi:"video/x-msvideo",avif:"image/avif",av1:"video/av1",bin:"application/octet-stream",bmp:"image/bmp",css:"text/css; charset=utf-8",csv:"text/csv; charset=utf-8",eot:"application/vnd.ms-fontobject",epub:"application/epub+zip",gif:"image/gif",gz:"application/gzip",htm:"text/html; charset=utf-8",html:"text/html; charset=utf-8",ico:"image/x-icon",ics:"text/calendar; charset=utf-8",jpeg:"image/jpeg",jpg:"image/jpeg",js:"text/javascript; charset=utf-8",json:"application/json",jsonld:"application/ld+json",map:"application/json",mid:"audio/x-midi",midi:"audio/x-midi",mjs:"text/javascript; charset=utf-8",mp3:"audio/mpeg",mp4:"video/mp4",mpeg:"video/mpeg",oga:"audio/ogg",ogv:"video/ogg",ogx:"application/ogg",opus:"audio/opus",otf:"font/otf",pdf:"application/pdf",png:"image/png",rtf:"application/rtf",svg:"image/svg+xml; charset=utf-8",tif:"image/tiff",tiff:"image/tiff",ts:"video/mp2t",ttf:"font/ttf",txt:"text/plain; charset=utf-8",wasm:"application/wasm",webm:"video/webm",weba:"audio/webm",webmanifest:"application/manifest+json",webp:"image/webp",woff:"font/woff",woff2:"font/woff2",xhtml:"application/xhtml+xml; charset=utf-8",xml:"application/xml; charset=utf-8",zip:"application/zip","3gp":"video/3gpp","3g2":"video/3gpp2",gltf:"model/gltf+json",glb:"model/gltf-binary"},C7=N7;var Qr=require("node:fs"),ru=require("node:path"),b7=/^\s*(?:text\/[^;\s]+|application\/(?:javascript|json|xml|xml-dtd|ecmascript|dart|postscript|rtf|tar|toml|vnd\.dart|vnd\.ms-fontobject|vnd\.ms-opentype|wasm|x-httpd-php|x-javascript|x-ns-proxy-autoconfig|x-sh|x-tar|x-virtualbox-hdd|x-virtualbox-ova|x-virtualbox-ovf|x-virtualbox-vbox|x-virtualbox-vdi|x-virtualbox-vhd|x-virtualbox-vmdk|x-www-form-urlencoded)|font\/(?:otf|ttf)|image\/(?:bmp|vnd\.adobe\.photoshop|vnd\.microsoft\.icon|vnd\.ms-dds|x-icon|x-ms-bmp)|message\/rfc822|model\/gltf-binary|x-shader\/x-fragment|x-shader\/x-vertex|[^;\s]+?\+(?:json|text|xml|yaml))(?:[;\s]|$)/i,nu={br:".br",zstd:".zst",gzip:".gz"},I7=Object.keys(nu),tu=e=>{let t;try{t=(0,Qr.statSync)(e)}catch{}return t},P7=/^(?:bytes=)?(?!-$)(\d*)-(\d*)$/,v7=e=>{let t=e.match(P7);if(!t)return;let[,r,n]=t;return r===""?{type:"suffix",length:Number(n)}:n===""?{type:"open-ended",start:Number(r)}:{type:"bounded",start:Number(r),end:Number(n)}},M7=(e,t)=>{if(t===0)return;if(e.type==="suffix")return e.length===0?void 0:{start:Math.max(t-e.length,0),end:t-1};let r=e.type==="bounded"?Math.min(e.end,t-1):t-1;if(!(e.start>=t||e.start>r))return{start:e.start,end:r}},k7=(e,t)=>{try{return t(e)}catch{return e.replace(/(?:%[0-9A-Fa-f]{2})+/g,r=>{try{return t(r)}catch{return r}})}},w7=e=>k7(e,decodeURI),ou=(e={root:""})=>{let t=e.root||"",r=e.path;return t!==""&&!(0,Qr.existsSync)(t)&&console.error(`serveStatic: root path '${t}' is not found, are you sure it's correct?`),async(n,o)=>{if(n.finalized)return o();let i;if(r)i=r;else try{if(i=w7(n.req.path),/(?:^|[\/\\])\.{1,2}(?:$|[\/\\])|[\/\\]{2,}|\\/.test(i))throw new Error}catch{return await e.onNotFound?.(n.req.path,n),o()}let a=(0,ru.join)(t,!r&&e.rewriteRequestPath?e.rewriteRequestPath(i,n):i),s=tu(a);if(s&&s.isDirectory()){let p=e.index??"index.html";a=(0,ru.join)(a,p),s=tu(a)}if(!s)return await e.onNotFound?.(a,n),o();let c=cy(a);if(n.header("Content-Type",c||"application/octet-stream"),e.precompressed&&(!c||c==="application/octet-stream"||b7.test(c))){let p=new Set(n.req.header("Accept-Encoding")?.split(",").map(h=>h.trim()));for(let h of I7){if(!p.has(h))continue;let E=tu(a+nu[h]);if(E){n.header("Content-Encoding",h),n.header("Vary","Accept-Encoding",{append:!0}),s=E,a=a+nu[h];break}}}let u,l=s.size,f=n.req.header("range")||"";if(n.header("Last-Modified",s.mtime.toUTCString()),n.req.method=="HEAD"||n.req.method=="OPTIONS")n.header("Content-Length",l.toString()),n.status(200),u=n.body(null);else if(!f)n.header("Content-Length",l.toString()),u=n.body(eu((0,Qr.createReadStream)(a)),200);else{n.header("Accept-Ranges","bytes");let p=M7(v7(f)??{type:"open-ended",start:0},l);if(!p)n.header("Content-Range",`bytes */${l}`),u=n.body(null,416);else{let{start:h,end:E}=p,y=E-h+1,S=(0,Qr.createReadStream)(a,{start:h,end:E});n.header("Content-Length",y.toString()),n.header("Content-Range",`bytes ${h}-${E}/${l}`),u=n.body(eu(S),206)}}return await e.onFound?.(a,n),u}};var iu=(e,t,r)=>(n,o)=>{let i=-1;return a(0);async function a(s){if(s<=i)throw new Error("next() called multiple times");i=s;let c,u=!1,l;if(e[s]?(l=e[s][0][0],n.req.routeIndex=s):l=s===e.length&&o||void 0,l)try{c=await l(n,()=>a(s+1))}catch(f){if(f instanceof Error&&t)n.error=f,c=await t(f,n),u=!0;else throw f}else n.finalized===!1&&r&&(c=await r(n));return c&&(n.finalized===!1||u)&&(n.res=c),n}};var uy=Symbol();var ly=(e,t)=>new Response(e,{headers:{"Content-Type":t.replace(/^[^;]+/,n=>n.toLowerCase())}}).formData();var fy=32,_7=1e4,Ka=e=>"headers"in e,hy=async(e,t=Object.create(null))=>{let{all:r=!1,dot:n=!1}=t,a=(Ka(e)?e.headers:e.raw.headers).get("Content-Type")?.split(";")[0].trim().toLowerCase();return a==="multipart/form-data"||a==="application/x-www-form-urlencoded"?B7(e,{all:r,dot:n}):{}};async function B7(e,t){if(!Ka(e)&&e.bodyCache.formData)return py(await e.bodyCache.formData,t);let r=Ka(e)?e.headers:e.raw.headers,n=await e.arrayBuffer(),o=ly(n,r.get("Content-Type")||"");Ka(e)||(e.bodyCache.formData=o);let i=await o;return i?py(i,t):{}}function py(e,t){let r=Object.create(null),n={count:0};return e.forEach((o,i)=>{t.all||i.endsWith("[]")?F7(r,i,o):r[i]=o}),t.dot&&Object.entries(r).forEach(([o,i])=>{o.includes(".")&&(D7(r,o,i,n),delete r[o])}),r}var F7=(e,t,r)=>{e[t]!==void 0?Array.isArray(e[t])?e[t].push(r):e[t]=[e[t],r]:t.endsWith("[]")?e[t]=[r]:e[t]=r},D7=(e,t,r,n)=>{if(/(?:^|\.)__proto__\./.test(t))return;let o=e,i=t.split(".",fy+2);i.length>fy+1&&dy(),i.forEach((a,s)=>{s===i.length-1?o[a]=r:((!o[a]||typeof o[a]!="object"||Array.isArray(o[a])||o[a]instanceof File)&&(n.count++>=_7&&dy(),o[a]=Object.create(null)),o=o[a])})},dy=()=>{throw new Error("Nesting limit exceeded")};var su=e=>{let t=e.split("/");return t[0]===""&&t.shift(),t},my=e=>{let{groups:t,path:r}=j7(e),n=su(r);return G7(n,t)},j7=e=>{let t=[];return e=e.replace(/\{[^}]+\}/g,(r,n)=>{let o=`@${n}`;return t.push([o,r]),o}),{groups:t,path:e}},G7=(e,t)=>{for(let r=t.length-1;r>=0;r--){let[n]=t[r];for(let o=e.length-1;o>=0;o--)if(e[o].includes(n)){e[o]=e[o].replace(n,t[r][1]);break}}return e},Wa={},gy=(e,t)=>{if(e==="*")return"*";let r=e.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/);if(r){let n=`${e}#${t}`;return Wa[n]||(r[2]?Wa[n]=t&&t[0]!==":"&&t[0]!=="*"?[n,r[1],new RegExp(`^${r[2]}(?=/${t})`)]:[e,r[1],new RegExp(`^${r[2]}$`)]:Wa[n]=[e,r[1],!0]),Wa[n]}return null},Ey=(e,t)=>{try{return t(e)}catch{return e.replace(/(?:%[0-9A-Fa-f]{2})+/g,r=>{try{return t(r)}catch{return r}})}},H7=e=>Ey(e,decodeURI),cu=e=>{let t=e.url,r=t.indexOf("/",t.indexOf(":")+4),n=r;for(;n<t.length;n++){let o=t.charCodeAt(n);if(o===37){let i=t.indexOf("?",n),a=t.indexOf("#",n),s=i===-1?a===-1?void 0:a:a===-1?i:Math.min(i,a),c=t.slice(r,s);return H7(c.includes("%25")?c.replace(/%25/g,"%2525"):c)}else if(o===63||o===35)break}return t.slice(r,n)};var yy=e=>{let t=cu(e);return t.length>1&&t.at(-1)==="/"?t.slice(0,-1):t},Mr=(e,t,...r)=>(r.length&&(t=Mr(t,...r)),`${e?.[0]==="/"?"":"/"}${e}${t==="/"?"":`${e?.at(-1)==="/"?"":"/"}${t?.[0]==="/"?t.slice(1):t}`}`),Va=e=>{if(e.charCodeAt(e.length-1)!==63||!e.includes(":"))return null;let t=e.split("/"),r=[],n="";return t.forEach(o=>{if(o!==""&&!/\:/.test(o))n+="/"+o;else if(/\:/.test(o))if(o.charCodeAt(o.length-1)===63){r.length===0&&n===""?r.push("/"):r.push(n);let i=o.slice(0,-1);n+="/"+i,r.push(n)}else n+="/"+o}),r.filter((o,i,a)=>a.indexOf(o)===i)},qa=e=>e.indexOf("%")!==-1?Ey(e,K7):e,au=e=>(e.indexOf("+")!==-1&&(e=e.replace(/\+/g," ")),qa(e)),Sy=(e,t,r)=>{let n=e.indexOf("#",8);n!==-1&&(e=e.slice(0,n));let o;if(!r&&t&&t.indexOf("%")===-1&&t.indexOf("+")===-1){let s=e.indexOf("?",8);if(s===-1)return;for(e.startsWith(t,s+1)||(s=e.indexOf(`&${t}`,s+1));s!==-1;){let c=e.charCodeAt(s+t.length+1);if(c===61){let u=s+t.length+2,l=e.indexOf("&",u);return au(e.slice(u,l===-1?void 0:l))}else if(c==38||isNaN(c))return"";s=e.indexOf(`&${t}`,s+1)}if(o=/[%+]/.test(e),!o)return}let i=Object.create(null);o??=/[%+]/.test(e);let a=e.indexOf("?",8);for(;a!==-1;){let s=e.indexOf("&",a+1),c=e.indexOf("=",a);c>s&&s!==-1&&(c=-1);let u=e.slice(a+1,c===-1?s===-1?void 0:s:c);if(o&&(u=au(u)),a=s,u==="")continue;let l;c===-1?l="":(l=e.slice(c+1,s===-1?void 0:s),o&&(l=au(l))),r?(i[u]&&Array.isArray(i[u])||(i[u]=[]),i[u].push(l)):i[u]??=l}return t?i[t]:i},Ty=Sy,Ry=(e,t)=>Sy(e,t,!0),K7=decodeURIComponent;var xy=class{raw;#e;#t;routeIndex=0;path;bodyCache={};constructor(e,t="/",r=[[]]){this.raw=e,this.path=t,this.#t=r}param(e){return e?this.#r(e):this.#i()}#r(e){let t=this.#t[0][this.routeIndex]?.[1][e],r=this.#o(t);return r&&qa(r)}#i(){let e={},t=Object.keys(this.#t[0][this.routeIndex]?.[1]??{});for(let r of t){let n=this.#o(this.#t[0][this.routeIndex][1][r]);n!==void 0&&(e[r]=qa(n))}return e}#o(e){return this.#t[1]?this.#t[1][e]:e}query(e){return Ty(this.url,e)}queries(e){return Ry(this.url,e)}header(e){if(e)return this.raw.headers.get(e)??void 0;let t=Object.create(null);return this.raw.headers.forEach((r,n)=>{t[n]=r}),t}async parseBody(e){return hy(this,e)}#n=e=>{let{bodyCache:t,raw:r}=this,n=t[e];if(n)return n;for(let o in t)return t[o].then(i=>(o==="json"&&(i=JSON.stringify(i)),new Response(i)[e]()));return t[e]=r[e]()};json(){return this.#n("text").then(e=>JSON.parse(e))}text(){return this.#n("text")}arrayBuffer(){return this.#n("arrayBuffer")}bytes(){return this.#n("arrayBuffer").then(e=>new Uint8Array(e))}blob(){return this.#n("blob")}formData(){return this.#n("formData")}addValidatedData(e,t){(this.#e??={})[e]=t}valid(e){return this.#e?.[e]}get url(){return this.raw.url}get method(){return this.raw.method}get[uy](){return this.#t}get matchedRoutes(){return this.#t[0].map(([[,e]])=>e)}get routePath(){return this.#t[0].map(([[,e]])=>e)[this.routeIndex].path}};var Oy={Stringify:1,BeforeStream:2,Stream:3},W7=(e,t)=>{let r=new String(e);return r.isEscaped=!0,r.callbacks=t,r};var uu=async(e,t,r,n,o)=>{typeof e=="object"&&!(e instanceof String)&&(e instanceof Promise||(e=e.toString()),e instanceof Promise&&(e=await e));let i=e.callbacks;if(!i?.length)return Promise.resolve(e);o?o[0]+=e:o=[e];let a=Promise.all(i.map(s=>s({phase:t,buffer:o,context:n}))).then(s=>Promise.all(s.filter(Boolean).map(c=>uu(c,t,!1,n,o))).then(()=>o[0]));return r?W7(await a,i):a};var V7="text/plain; charset=UTF-8",lu=(e,t)=>({"Content-Type":e,...t}),zo=(e,t)=>new Response(e,t),fu=class{#e;#t;env={};#r;finalized=!1;error;#i;#o;#n;#c;#a;#s;#l;#f;#p;constructor(e,t){this.#e=e,t&&(this.#o=t.executionCtx,this.env=t.env,this.#s=t.notFoundHandler,this.#p=t.path,this.#f=t.matchResult)}get req(){return this.#t??=new xy(this.#e,this.#p,this.#f),this.#t}get event(){if(this.#o&&"respondWith"in this.#o)return this.#o;throw Error("This context has no FetchEvent")}get executionCtx(){if(this.#o)return this.#o;throw Error("This context has no ExecutionContext")}get res(){return this.#n||=zo(null,{headers:this.#l??=new Headers})}set res(e){if(this.#n&&e){e=zo(e.body,e);for(let[t,r]of this.#n.headers.entries())if(t!=="content-type")if(t==="set-cookie"){let n=this.#n.headers.getSetCookie();e.headers.delete("set-cookie");for(let o of n)e.headers.append("set-cookie",o)}else e.headers.set(t,r)}this.#n=e,this.finalized=!0}render=(...e)=>(this.#a??=t=>this.html(t),this.#a(...e));setLayout=e=>this.#c=e;getLayout=()=>this.#c;setRenderer=e=>{this.#a=e};header=(e,t,r)=>{this.finalized&&(this.#n=zo(this.#n.body,this.#n));let n=this.#n?this.#n.headers:this.#l??=new Headers;t===void 0?n.delete(e):r?.append?n.append(e,t):n.set(e,t)};status=e=>{this.#i=e};set=(e,t)=>{this.#r??=new Map,this.#r.set(e,t)};get=e=>this.#r?this.#r.get(e):void 0;get var(){return this.#r?Object.fromEntries(this.#r):{}}#u(e,t,r){let n=this.#n?new Headers(this.#n.headers):this.#l;if(typeof t=="object"&&t.headers){n??=new Headers;for(let[i,a]of new Headers(t.headers))i==="set-cookie"?n.append(i,a):n.set(i,a)}if(r){if(!n){let i=0;for(let a in r)if(++i>1||typeof r[a]!="string"){n=new Headers;break}}if(n)for(let i in r){let a=r[i];if(typeof a=="string")n.set(i,a);else{n.delete(i);for(let s of a)n.append(i,s)}}}let o=typeof t=="number"?t:t?.status??this.#i;return zo(e,{status:o,headers:n??r})}newResponse=(...e)=>this.#u(...e);body=(e,t,r)=>this.#u(e,t,r);text=(e,t,r)=>!this.#l&&!this.#i&&!t&&!r&&!this.finalized?new Response(e):this.#u(e,t,lu(V7,r));json=(e,t,r)=>this.#u(JSON.stringify(e),t,lu("application/json",r));html=(e,t,r)=>{let n=o=>this.#u(o,t,lu("text/html; charset=UTF-8",r));return typeof e=="object"?uu(e,Oy.Stringify,!1,{}).then(n):n(e)};redirect=(e,t)=>{let r=String(e);return this.header("Location",/[^\x00-\xFF]/.test(r)?encodeURI(r):r),this.newResponse(null,t??302)};notFound=()=>(this.#s??=()=>zo(),this.#s(this))};var Ne="ALL",Ly="all",Ay=["get","post","put","delete","options","patch","query"],Ya="Can not add a route since the matcher is already built.",za=class extends Error{};var Uy="__COMPOSED_HANDLER";var q7=e=>e.text("404 Not Found",404),Ny=(e,t)=>{if("getResponse"in e){let r=e.getResponse();return t.newResponse(r.body,r)}return console.error(e),t.text("Internal Server Error",500)},Cy=class by{get;post;put;delete;options;patch;query;all;on;use;router;getPath;_basePath="/";#e="/";routes=[];constructor(t={}){[...Ay,Ly].forEach(i=>{this[i]=(a,...s)=>(typeof a=="string"?this.#e=a:this.#i(i,this.#e,a),s.forEach(c=>{this.#i(i,this.#e,c)}),this)}),this.on=(i,a,...s)=>{for(let c of[a].flat()){this.#e=c;for(let u of[i].flat())s.map(l=>{this.#i(u.toUpperCase(),this.#e,l)})}return this},this.use=(i,...a)=>(typeof i=="string"?this.#e=i:(this.#e="*",a.unshift(i)),a.forEach(s=>{this.#i(Ne,this.#e,s)}),this);let{strict:n,...o}=t;Object.assign(this,o),this.getPath=n??!0?t.getPath??cu:yy}#t(){let t=new by({router:this.router,getPath:this.getPath});return t.errorHandler=this.errorHandler,t.#r=this.#r,t.routes=this.routes,t}#r=q7;errorHandler=Ny;route(t,r){let n=this.basePath(t);return r.routes.map(o=>{let i;r.errorHandler===Ny?i=o.handler:(i=async(a,s)=>(await iu([],r.errorHandler)(a,()=>o.handler(a,s))).res,i[Uy]=o.handler),n.#i(o.method,o.path,i,o.basePath)}),this}basePath(t){let r=this.#t();return r._basePath=Mr(this._basePath,t),r}onError=t=>(this.errorHandler=t,this);notFound=t=>(this.#r=t,this);mount(t,r,n){let o,i;n&&(typeof n=="function"?i=n:(i=n.optionHandler,n.replaceRequest===!1?o=c=>c:o=n.replaceRequest));let a=i?c=>{let u=i(c);return Array.isArray(u)?u:[u]}:c=>{let u;try{u=c.executionCtx}catch{}return[c.env,u]};o||=(()=>{let c=Mr(this._basePath,t),u=c==="/"?0:c.length;return l=>{let f=new URL(l.url);return f.pathname=this.getPath(l).slice(u)||"/",new Request(f,l)}})();let s=async(c,u)=>{let l=await r(o(c.req.raw),...a(c));if(l)return l;await u()};return this.#i(Ne,Mr(t,"*"),s),this}#i(t,r,n,o){t=t.toUpperCase(),r=Mr(this._basePath,r);let i={basePath:o!==void 0?Mr(this._basePath,o):this._basePath,path:r,method:t,handler:n};this.router.add(t,r,[n,i]),this.routes.push(i)}#o(t,r){if(t instanceof Error)return this.errorHandler(t,r);throw t}#n(t,r,n,o){if(o==="HEAD")return(async()=>new Response(null,await this.#n(t,r,n,"GET")))();let i=this.getPath(t,{env:n}),a=this.router.match(o,i),s=new fu(t,{path:i,matchResult:a,env:n,executionCtx:r,notFoundHandler:this.#r});if(a[0].length===1){let u;try{u=a[0][0][0][0](s,async()=>{s.res=await this.#r(s)})}catch(l){return this.#o(l,s)}return u instanceof Promise?u.then(l=>l||(s.finalized?s.res:this.#r(s))).catch(l=>this.#o(l,s)):u??this.#r(s)}let c=iu(a[0],this.errorHandler,this.#r);return(async()=>{try{let u=await c(s);if(!u.finalized)throw new Error("Context is not finalized. Did you forget to return a Response object or `await next()`?");return u.res}catch(u){return this.#o(u,s)}})()}fetch=(t,...r)=>this.#n(t,r[1],r[0],t.method);request=(t,r,n,o)=>t instanceof Request?this.fetch(r?new Request(t,r):t,n,o):(t=t.toString(),this.fetch(new Request(/^https?:\/\//.test(t)?t:`http://localhost${Mr("/",t)}`,r),n,o));fire=()=>{addEventListener("fetch",t=>{t.respondWith(this.#n(t.request,t,void 0,t.request.method))})}};var Oe=()=>Object.create(null);var Xa=[];function pu(e,t){let r=this.buildAllMatchers(),n=((o,i)=>{let a=r[o]||r[Ne],s=a[2][i];if(s)return s;let c=i.match(a[0]);if(!c)return[[],Xa];let u=c.indexOf("",1);return[a[1][u],c]});return this.match=n,n(e,t)}var eo="[^/]+",wr=".*",Qt="(?:|/.*)",kr=Symbol(),Iy=new Set(".\\+*[^]$()");function Y7(e,t){return e.length===1?t.length===1?e<t?-1:1:-1:t.length===1?1:e===wr||e===Qt?t===Qt?-1:1:t===wr||t===Qt?-1:e===eo?1:t===eo?-1:e.length===t.length?e<t?-1:1:t.length-e.length}var Py=class du{#e;#t;#r=Oe();insert(t,r,n,o,i){let a=this;for(let s=0,c=t.length;s<c;s++){let u=t[s],l=u.length===1?u==="*"?s===c-1?["","",wr]:["","",eo]:null:u==="/*"?["","",Qt]:u.match(/^\:([^\{\}]+)(?:\{(.+)\})?$/),f;if(l){let p=l[1],h=l[2]||eo;if(p&&l[2]&&(h===".*"||(h=h.replace(/^\((?!\?:)(?=[^)]+\)$)/,"(?:"),/\((?!\?:)/.test(h))||h.length===1&&Iy.has(h)))throw kr;if(f=a.#r[h],!f){if(h!==wr&&h!==Qt){for(let E in a.#r)if((h.length>1||E.length>1)&&E!==wr&&E!==Qt)throw kr}f=a.#r[h]=new du}p!==""&&(f.#t??=o.varIndex++,n.push([p,f.#t]))}else if(f=a.#r[u],!f){for(let p in a.#r)if(p.length>1&&p!==wr&&p!==Qt)throw kr;f=a.#r[u]=new du}a=f}if(a.#e!==void 0)throw kr;a.#e=i?-1:r}buildRegExpStr(){let r=Object.keys(this.#r).sort(Y7).map(n=>{let o=this.#r[n],i=o.buildRegExpStr();return i===""?"":(typeof o.#t=="number"?`(${n})@${o.#t}`:Iy.has(n)?`\\${n}`:n)+i}).filter(Boolean);return typeof this.#e=="number"&&this.#e!==-1&&r.unshift(`#${this.#e}`),r.length===0?"":r.length===1?r[0]:"(?:"+r.join("|")+")"}};var hu=class{#e={varIndex:0};#t=new Py;#r=0;paths=Oe();insert(e,t){if(t){this.#t.insert(e.split(""),0,[],this.#e,!0);return}let r=[],n=[],o=e;for(let a=0;;){let s=!1;if(o=o.replace(/\{[^}]+\}/g,c=>{let u=`@\\${a}`;return n[a]=[u,c],a++,s=!0,u}),!s)break}let i=o.match(/(?::[^\/]+)|(?:\/\*$)|./g)||[];for(let a=n.length-1;a>=0;a--){let[s]=n[a];for(let c=i.length-1;c>=0;c--)if(i[c].indexOf(s)!==-1){i[c]=i[c].replace(s,n[a][1]);break}}this.#t.insert(i,this.#r,r,this.#e,!1),this.paths[e]=[this.#r++,r]}buildRegExp(){let e=this.#t.buildRegExpStr();if(e==="")return[/^$/,[],[]];let t=0,r=[],n=[];return e=e.replace(/#(\d+)|@(\d+)|\.\*\$/g,(o,i,a)=>i!==void 0?(r[++t]=Number(i),"$()"):(a!==void 0&&(n[Number(a)]=++t),"")),[new RegExp(`^${e}`),r,n]}};var vy=Oe();function My(e){return vy[e]??=new RegExp(`^${e.replace(/\/:[^/{}]+(?:\{\[\^\/]\+})?(?=[/{]|$)|\/?\*$|([.\\+*[^\]$()?{}|])/g,(t,r)=>r?`\\${r}`:t==="/*"?Qt:t==="*"?wr:`/:${eo}`)}$`)}function Ja(e,t){for(let r of Object.keys(e).sort((n,o)=>o.length-n.length))if(My(r).test(t))return[...e[r]]}var Qa=class{name="RegExpRouter";#e;#t;#r;constructor(){this.#e={[Ne]:Oe()},this.#t={[Ne]:Oe()},this.#r={[Ne]:new hu}}#i(e,t){try{this.#r[e].insert(t,!/\*|\/:/.test(t))}catch(r){throw r===kr?new za(t):r}}add(e,t,r){let n=this.#e,o=this.#t;if(!n)throw new Error(Ya);if(!n[e]){this.#r[e]=new hu;for(let s of[n,o]){s[e]=Oe();for(let c in s[Ne])s[e][c]=[...s[Ne][c]],this.#i(e,c)}}t==="/*"&&(t="*");let i=e===Ne?Object.keys(n):[e];if(/\*$/.test(t)){let s=My(t);for(let c of i)n[c][t]||(this.#i(c,t),n[c][t]=Ja(n[c],t)||Ja(n[Ne],t)||[]);for(let c of[n,o])for(let u of i)for(let l in c[u])s.test(l)&&c[u][l].push([r,t]);return}let a=Va(t)||[t];for(let s of a)for(let c of i)o[c][s]||(this.#i(c,s),o[c][s]=Ja(n[c],s)||Ja(n[Ne],s)||[]),o[c][s].push([r,s])}match=pu;buildAllMatchers(){let e=Oe();for(let t of Object.keys(this.#t))e[t]=this.#o(t);return this.#e=this.#t=this.#r=void 0,vy=Oe(),e}#o(e){let t=this.#e[e],r=this.#t[e],n=this.#r[e],o=Oe(),i=[],[a,s,c]=n.buildRegExp();for(let u of[t,r])for(let l in u){let f=u[l],p=n.paths[l];if(!p){o[l]=[f.map(([h])=>[h,Oe()]),Xa];continue}i[p[0]]=f.map(([h,E])=>[h,n.paths[E][1].reduceRight((y,[S],d)=>(y[S]=c[p[1][d][1]],y),Oe())])}return[a,s.map(u=>i[u]),o]}};var mu=class{name="SmartRouter";#e=[];#t=[];constructor(e){this.#e=e.routers}add(e,t,r){if(!this.#t)throw new Error(Ya);this.#t.push([e,t,r])}match(e,t){if(!this.#t)throw new Error("Fatal error");let r=this.#e,n=this.#t,o=r.length,i=0,a;for(;i<o;i++){let s=r[i];try{for(let c=0,u=n.length;c<u;c++)s.add(...n[c]);a=s.match(e,t)}catch(c){if(c instanceof za)continue;throw c}this.match=s.match.bind(s),this.#e=[s],this.#t=void 0;break}if(i===o)throw new Error("Fatal error");return this.name=`SmartRouter + ${this.activeRouter.name}`,a}get activeRouter(){if(this.#t||this.#e.length!==1)throw new Error("No active router has been determined yet.");return this.#e[0]}};var gu=Oe(),z7=0,ky=class wy{#e=[];#t=Oe();#r=[];#i;#o=gu;insert(t,r,n){let o=this,i=my(r),a=new Set,s=0;for(let c of i){let u=i[++s],l=gy(c,u)||(u===void 0&&c&&c.indexOf("*")===c.length-1?c:null),f=Array.isArray(l),p=f?l[0]:l||c,h=o.#t[p]||=new wy;l&&!h.#i&&(h.#i=l,o.#r.push(h)),o=h,f&&a.add(l[1])}o.#e.push({[t]:{handler:n,possibleKeys:[...a],score:++z7}})}#n(t,r,n,o,i){for(let a=0,s=r.#e.length;a<s;a++){let c=r.#e[a],u=c[n]||c[Ne];if(u){u.params=Oe(),t.push(u);for(let l=0,f=u.possibleKeys.length;l<f;l++){let p=u.possibleKeys[l];u.params[p]=i?.[p]&&!l?i[p]:o[p]??i?.[p]}}}}search(t,r){let n=[];this.#o=gu;let i=[this],a=su(r),s=[],c=a.length,u=null;for(let l=0;l<c;l++){let f=a[l],p=l===c-1,h=[];for(let y=0,S=i.length;y<S;y++){let d=i[y],g=d.#t[f];g&&(g.#o=d.#o,p?(g.#t["*"]&&this.#n(n,g.#t["*"],t,d.#o),this.#n(n,g,t,d.#o)):h.push(g));for(let m of d.#r){let x=m.#i,C=d.#o===gu?{}:{...d.#o};if(typeof x=="string"){(x==="*"||f.startsWith(x.slice(0,-1)))&&(this.#n(n,m,t,d.#o),x==="*"&&(m.#o=C,h.push(m)));continue}let[,Ce,bt]=x;if(!(!f&&bt===!0)){if(bt!==!0){if(!u){u=[];let It=r[0]==="/"?1:0;for(let Me=0;Me<c;Me++)u[Me]=It,It+=a[Me].length+1}let Ye=r.slice(u[l]),$t=bt.exec(Ye);if($t){C[Ce]=$t[0],this.#n(n,m,t,d.#o,C),$t[0].length===Ye.length&&m.#t["*"]&&this.#n(n,m.#t["*"],t,d.#o,C);for(let It in m.#t){m.#o=C;let Me=$t[0].match(/\//g)?.length??0;(s[Me]||=[]).push(m);break}continue}}(bt===!0||bt.test(f))&&(C[Ce]=f,p?(this.#n(n,m,t,C,d.#o),m.#t["*"]&&this.#n(n,m.#t["*"],t,C,d.#o)):(m.#o=C,h.push(m)))}}}let E=s.shift();i=E?h.concat(E):h}return n[1]&&n.sort((l,f)=>l.score-f.score),[n.map(({handler:l,params:f})=>[l,f])]}};var Eu=class{name="TrieRouter";#e=new ky;add(e,t,r){for(let n of Va(t)||[t])this.#e.insert(e,n,r)}match(e,t){return this.#e.search(e,t)}};var yu=class extends Cy{constructor(e={}){super(e),this.router=e.router??new mu({routers:[new Qa,new Eu]})}};function _y(e,t,r){return Response.json({message:`Data received for ${e}: ${r}`})}async function By(e){let t=e!=="dark"&&e!=="light"?"dark":e,r=Jl(t);return I(r)?new Response(Bun.file(r)):new Response(js(t),{headers:{"Content-Type":"image/svg+xml"}})}async function Fy(e){let t=e!=="dark"&&e!=="light"?"dark":e;return new Response(js(t),{headers:{"Content-Type":"image/svg+xml"}})}async function Dy(e,t){let r=bE(e,t);return nr(r)?Response.json({error:r.errors().join(`
169
+ `)}):Response.json(JSON.parse(ds(r)))}async function jy(){let e=await ka();return Response.json(JSON.parse(ds(e)))}async function Gy(e){console.error("Saving DB is not actually implemented yet, but let's pretend it is!");try{let t=Mu(e,xl);if(I(t))CE(t);else return Response.json({error:"Failed to unpickle database"})}catch{return Response.json({error:"Crashed while unpickle database"})}return Response.json({success:1})}var Zt=new yu;Zt.get("/img/field/:theme",async e=>By(e.req.param("theme")));Zt.get("/img/svg/:theme",async e=>Fy(e.req.param("theme")));Zt.get("/api/loadpath/:team/:path",async e=>{let{team:t,path:r}=e.req.param();return Dy(t,r)});Zt.get("/api/savepath/:team/:path/:data",async e=>{let{team:t,path:r,data:n}=e.req.param();return _y(t,r,n)});Zt.get("/api/db",async()=>jy());Zt.put("/api/putdb",async e=>Gy(JSON.stringify(e.req.json())));Zt.get("/",ou({path:"./index.html",onNotFound:(e,t)=>{console.error("Index.html file not found: ",e)}}));Zt.get("/*",ou({root:on(),onNotFound:(e,t)=>{console.error(`Requested file not found: ${e}`)}}));var X7=58888,Hy=Number(process.env.PORT)||X7,Ky,Su,Wy=new Promise((e,t)=>{Ky=e,Su=t}),J7=iy({fetch:Zt.fetch,port:Hy},e=>{Ky(`http://localhost:${e.port}`)});J7.on("error",e=>{e.code==="EADDRINUSE"?Su(`Port ${Hy} already in use: Is the app running elsewhere?`):Su(e.name+": "+e.message)});I(__dirname)&&Al(__dirname);var Q7=[...Za.default.argv.slice(2),Za.default.cwd()].map(e=>Vy.default.resolve(e));Cl(Q7);Za.default.chdir(on());Wy.then(vE).catch(console.error);
160
170
  /*! Bundled license information:
161
171
 
162
172
  lodash-es/lodash.js: