wasm-idle 1.1.2 → 1.2.0

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.
Files changed (121) hide show
  1. package/README.md +134 -82
  2. package/dist/container/bash-profile.d.ts +80 -0
  3. package/dist/container/bash-profile.js +328 -0
  4. package/dist/{playground/container → container}/binding.d.ts +21 -8
  5. package/dist/{playground/container → container}/binding.js +109 -25
  6. package/dist/{playground/container → container}/clang-runtime.d.ts +11 -7
  7. package/dist/container/clang-runtime.js +561 -0
  8. package/dist/container/client.d.ts +14 -0
  9. package/dist/{playground/container → container}/client.js +2 -6
  10. package/dist/{playground/container → container}/explorer.d.ts +1 -1
  11. package/dist/container/index.d.ts +11 -0
  12. package/dist/container/index.js +11 -0
  13. package/dist/container/owner-worker.d.ts +19 -0
  14. package/dist/container/owner-worker.js +464 -0
  15. package/dist/{playground/container → container}/protocol.d.ts +12 -1
  16. package/dist/{playground/container → container}/runtime-adapter.d.ts +13 -11
  17. package/dist/{playground/container → container}/runtime-adapter.js +104 -41
  18. package/dist/{playground/container → container}/shell-control.d.ts +2 -2
  19. package/dist/{playground/container → container}/shell-control.js +93 -36
  20. package/dist/{playground/container → container}/workspace.d.ts +5 -1
  21. package/dist/index.d.ts +1 -1
  22. package/dist/playground/assetBridge.js +5 -2
  23. package/dist/playground/assets.d.ts +8 -0
  24. package/dist/playground/clang.d.ts +5 -1
  25. package/dist/playground/clang.js +61 -5
  26. package/dist/playground/compiledLldb.d.ts +41 -0
  27. package/dist/playground/compiledLldb.js +167 -0
  28. package/dist/playground/d.d.ts +4 -1
  29. package/dist/playground/d.js +78 -9
  30. package/dist/playground/debugDeadline.d.ts +12 -0
  31. package/dist/playground/debugDeadline.js +34 -0
  32. package/dist/playground/debugMailbox.d.ts +12 -0
  33. package/dist/playground/debugMailbox.js +77 -0
  34. package/dist/playground/go.js +9 -4
  35. package/dist/playground/goDebugInstrumentation.js +24 -44
  36. package/dist/playground/java-debug-FMHDKUN6.js +124 -0
  37. package/dist/playground/java-debug-notices.txt +492 -0
  38. package/dist/playground/java.d.ts +17 -1
  39. package/dist/playground/java.js +159 -3
  40. package/dist/playground/javaDebug.d.ts +62 -0
  41. package/dist/playground/javaDebug.js +305 -0
  42. package/dist/playground/javaDebugBridge.d.ts +6 -0
  43. package/dist/playground/javaDebugBridge.js +250 -0
  44. package/dist/playground/javaDebugSource.d.ts +9 -0
  45. package/dist/playground/javaDebugSource.js +4 -0
  46. package/dist/playground/javaRuntimeErrors.js +34 -1
  47. package/dist/playground/lean4Assets.d.ts +1 -25
  48. package/dist/playground/lean4Assets.js +2 -123
  49. package/dist/playground/lfortranAssets.d.ts +2 -2
  50. package/dist/playground/lldbSession.d.ts +23 -2
  51. package/dist/playground/lldbSession.js +278 -58
  52. package/dist/playground/lldbSourcePath.d.ts +2 -0
  53. package/dist/playground/lldbSourcePath.js +9 -0
  54. package/dist/playground/lua.d.ts +20 -1
  55. package/dist/playground/lua.js +190 -8
  56. package/dist/playground/luaDebug.d.ts +1 -0
  57. package/dist/playground/luaDebug.js +1 -0
  58. package/dist/playground/nim.d.ts +1 -0
  59. package/dist/playground/nim.js +8 -0
  60. package/dist/playground/objectivec.d.ts +7 -6
  61. package/dist/playground/objectivec.js +75 -9
  62. package/dist/playground/options.d.ts +10 -4
  63. package/dist/playground/python.d.ts +8 -1
  64. package/dist/playground/python.js +81 -6
  65. package/dist/playground/ruby.d.ts +10 -1
  66. package/dist/playground/ruby.js +66 -1
  67. package/dist/playground/rubyDebug.d.ts +21 -0
  68. package/dist/playground/rubyDebug.js +128 -0
  69. package/dist/playground/rust.d.ts +5 -1
  70. package/dist/playground/rust.js +128 -46
  71. package/dist/playground/sandbox.d.ts +8 -1
  72. package/dist/playground/staticWorkerRuntime.js +8 -2
  73. package/dist/playground/stdinBuffer.d.ts +1 -1
  74. package/dist/playground/stdinBuffer.js +19 -2
  75. package/dist/playground/tinygo.js +7 -0
  76. package/dist/playground/typescript.js +8 -0
  77. package/dist/playground/v.d.ts +3 -2
  78. package/dist/playground/v.js +66 -12
  79. package/dist/playground/wasmC3Version.d.ts +2 -2
  80. package/dist/playground/wasmC3Version.js +2 -2
  81. package/dist/playground/wasmLean4Version.d.ts +1 -110
  82. package/dist/playground/wasmLean4Version.js +2 -111
  83. package/dist/playground/wasmLfortranVersion.d.ts +2 -2
  84. package/dist/playground/wasmLfortranVersion.js +2 -2
  85. package/dist/playground/wasmLuaVersion.d.ts +1 -1
  86. package/dist/playground/wasmLuaVersion.js +1 -1
  87. package/dist/playground/wasmRustVersion.d.ts +26 -38
  88. package/dist/playground/wasmRustVersion.js +25 -40
  89. package/dist/playground/worker/clang.js +1 -1
  90. package/dist/playground/worker/cobol.js +1 -1
  91. package/dist/playground/worker/d.js +51 -2
  92. package/dist/playground/worker/fortran.js +1 -1
  93. package/dist/playground/worker/java.js +188 -35
  94. package/dist/playground/worker/javaDebugEvaluator.d.ts +16 -0
  95. package/dist/playground/worker/javaDebugEvaluator.js +44 -0
  96. package/dist/playground/worker/javaDebugRuntime.d.ts +24 -0
  97. package/dist/playground/worker/javaDebugRuntime.js +315 -0
  98. package/dist/playground/worker/javaOutput.d.ts +11 -0
  99. package/dist/playground/worker/javaOutput.js +54 -0
  100. package/dist/playground/worker/lua.js +13 -0
  101. package/dist/playground/worker/python.js +57 -22
  102. package/dist/playground/worker/ruby.js +13 -0
  103. package/dist/playground/worker/rubyDebugPreview.d.ts +2 -0
  104. package/dist/playground/worker/rubyDebugPreview.js +80 -0
  105. package/dist/playground/worker/rubyTracepoint.d.ts +16 -0
  106. package/dist/playground/worker/rubyTracepoint.js +162 -0
  107. package/dist/playground/worker/rust.js +4 -1
  108. package/dist/playground/worker/v.js +30 -5
  109. package/dist/playground/zig.js +4 -0
  110. package/package.json +55 -11
  111. package/dist/playground/container/ContainerExplorer.svelte +0 -307
  112. package/dist/playground/container/ContainerExplorer.svelte.d.ts +0 -14
  113. package/dist/playground/container/clang-runtime.js +0 -343
  114. package/dist/playground/container/client.d.ts +0 -15
  115. package/dist/playground/container/owner.worker.d.ts +0 -1
  116. package/dist/playground/container/owner.worker.js +0 -390
  117. package/dist/playground/container/release.d.ts +0 -31
  118. package/dist/playground/container/release.js +0 -612
  119. /package/dist/{playground/container → container}/explorer.js +0 -0
  120. /package/dist/{playground/container → container}/protocol.js +0 -0
  121. /package/dist/{playground/container → container}/workspace.js +0 -0
@@ -0,0 +1,124 @@
1
+ // Third-party license texts: java-debug-notices.txt beside the shared parser.
2
+ var _h=Object.create;var ra=Object.defineProperty;var vh=Object.getOwnPropertyDescriptor;var Ph=Object.getOwnPropertyNames;var kh=Object.getPrototypeOf,Bh=Object.prototype.hasOwnProperty;var n=(e,t)=>ra(e,"name",{value:t,configurable:!0});var v=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}};var wh=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of Ph(t))!Bh.call(e,i)&&i!==r&&ra(e,i,{get:()=>t[i],enumerable:!(o=vh(t,i))||o.enumerable});return e};var Dh=(e,t,r)=>(r=e!=null?_h(kh(e)):{},wh(t||!e||!e.__esModule?ra(r,"default",{value:e,enumerable:!0}):r,e));var hu=v((HW,du)=>{var xU=typeof global=="object"&&global&&global.Object===Object&&global;du.exports=xU});var Su=v((zW,Eu)=>{var RU=hu(),LU=typeof self=="object"&&self&&self.Object===Object&&self,UU=RU||LU||Function("return this")();Eu.exports=UU});var Ui=v((qW,Tu)=>{var AU=Su(),OU=AU.Symbol;Tu.exports=OU});var xu=v((VW,gu)=>{function yU(e,t){for(var r=-1,o=e==null?0:e.length,i=Array(o);++r<o;)i[r]=t(e[r],r,e);return i}n(yU,"arrayMap");gu.exports=yU});var Lu=v((ZW,Ru)=>{var NU=Array.isArray;Ru.exports=NU});var yu=v((JW,Ou)=>{var Uu=Ui(),Au=Object.prototype,CU=Au.hasOwnProperty,IU=Au.toString,Jn=Uu?Uu.toStringTag:void 0;function MU(e){var t=CU.call(e,Jn),r=e[Jn];try{e[Jn]=void 0;var o=!0}catch{}var i=IU.call(e);return o&&(t?e[Jn]=r:delete e[Jn]),i}n(MU,"getRawTag");Ou.exports=MU});var Cu=v(($W,Nu)=>{var bU=Object.prototype,_U=bU.toString;function vU(e){return _U.call(e)}n(vU,"objectToString");Nu.exports=vU});var _u=v((tY,bu)=>{var Iu=Ui(),PU=yu(),kU=Cu(),BU="[object Null]",wU="[object Undefined]",Mu=Iu?Iu.toStringTag:void 0;function DU(e){return e==null?e===void 0?wU:BU:Mu&&Mu in Object(e)?PU(e):kU(e)}n(DU,"baseGetTag");bu.exports=DU});var Pu=v((nY,vu)=>{function FU(e){return e!=null&&typeof e=="object"}n(FU,"isObjectLike");vu.exports=FU});var Bu=v((iY,ku)=>{var GU=_u(),jU=Pu(),KU="[object Symbol]";function WU(e){return typeof e=="symbol"||jU(e)&&GU(e)==KU}n(WU,"isSymbol");ku.exports=WU});var Ku=v((sY,ju)=>{var wu=Ui(),YU=xu(),HU=Lu(),zU=Bu(),qU=1/0,Du=wu?wu.prototype:void 0,Fu=Du?Du.toString:void 0;function Gu(e){if(typeof e=="string")return e;if(HU(e))return YU(e,Gu)+"";if(zU(e))return Fu?Fu.call(e):"";var t=e+"";return t=="0"&&1/e==-qU?"-0":t}n(Gu,"baseToString");ju.exports=Gu});var Qn=v((fY,Wu)=>{var VU=Ku();function XU(e){return e==null?"":VU(e)}n(XU,"toString");Wu.exports=XU});var Hu=v((uY,Yu)=>{function ZU(e,t,r){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++o<i;)a[o]=e[o+t];return a}n(ZU,"baseSlice");Yu.exports=ZU});var qu=v((mY,zu)=>{var JU=Hu();function QU(e,t,r){var o=e.length;return r=r===void 0?o:r,!t&&r>=o?e:JU(e,t,r)}n(QU,"castSlice");zu.exports=QU});var ja=v((hY,Vu)=>{var $U="\\ud800-\\udfff",e2="\\u0300-\\u036f",t2="\\ufe20-\\ufe2f",r2="\\u20d0-\\u20ff",n2=e2+t2+r2,o2="\\ufe0e\\ufe0f",i2="\\u200d",a2=RegExp("["+i2+$U+n2+o2+"]");function s2(e){return a2.test(e)}n(s2,"hasUnicode");Vu.exports=s2});var Zu=v((SY,Xu)=>{function l2(e){return e.split("")}n(l2,"asciiToArray");Xu.exports=l2});var op=v((gY,np)=>{var Ju="\\ud800-\\udfff",f2="\\u0300-\\u036f",c2="\\ufe20-\\ufe2f",u2="\\u20d0-\\u20ff",p2=f2+c2+u2,m2="\\ufe0e\\ufe0f",d2="["+Ju+"]",Ka="["+p2+"]",Wa="\\ud83c[\\udffb-\\udfff]",h2="(?:"+Ka+"|"+Wa+")",Qu="[^"+Ju+"]",$u="(?:\\ud83c[\\udde6-\\uddff]){2}",ep="[\\ud800-\\udbff][\\udc00-\\udfff]",E2="\\u200d",tp=h2+"?",rp="["+m2+"]?",S2="(?:"+E2+"(?:"+[Qu,$u,ep].join("|")+")"+rp+tp+")*",T2=rp+tp+S2,g2="(?:"+[Qu+Ka+"?",Ka,$u,ep,d2].join("|")+")",x2=RegExp(Wa+"(?="+Wa+")|"+g2+T2,"g");function R2(e){return e.match(x2)||[]}n(R2,"unicodeToArray");np.exports=R2});var ap=v((RY,ip)=>{var L2=Zu(),U2=ja(),A2=op();function O2(e){return U2(e)?A2(e):L2(e)}n(O2,"stringToArray");ip.exports=O2});var lp=v((UY,sp)=>{var y2=qu(),N2=ja(),C2=ap(),I2=Qn();function M2(e){return function(t){t=I2(t);var r=N2(t)?C2(t):void 0,o=r?r[0]:t.charAt(0),i=r?y2(r,1).join(""):t.slice(1);return o[e]()+i}}n(M2,"createCaseFirst");sp.exports=M2});var cp=v((OY,fp)=>{var b2=lp(),_2=b2("toUpperCase");fp.exports=_2});var pp=v((yY,up)=>{var v2=Qn(),P2=cp();function k2(e){return P2(v2(e).toLowerCase())}n(k2,"capitalize");up.exports=k2});var dp=v((CY,mp)=>{function B2(e,t,r,o){var i=-1,a=e==null?0:e.length;for(o&&a&&(r=e[++i]);++i<a;)r=t(r,e[i],i,e);return r}n(B2,"arrayReduce");mp.exports=B2});var Ep=v((MY,hp)=>{function w2(e){return function(t){return e?.[t]}}n(w2,"basePropertyOf");hp.exports=w2});var Tp=v((_Y,Sp)=>{var D2=Ep(),F2={\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"},G2=D2(F2);Sp.exports=G2});var xp=v((vY,gp)=>{var j2=Tp(),K2=Qn(),W2=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Y2="\\u0300-\\u036f",H2="\\ufe20-\\ufe2f",z2="\\u20d0-\\u20ff",q2=Y2+H2+z2,V2="["+q2+"]",X2=RegExp(V2,"g");function Z2(e){return e=K2(e),e&&e.replace(W2,j2).replace(X2,"")}n(Z2,"deburr");gp.exports=Z2});var Lp=v((kY,Rp)=>{var J2=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g;function Q2(e){return e.match(J2)||[]}n(Q2,"asciiWords");Rp.exports=Q2});var Ap=v((wY,Up)=>{var $2=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/;function eA(e){return $2.test(e)}n(eA,"hasUnicodeWord");Up.exports=eA});var Wp=v((FY,Kp)=>{var Ip="\\ud800-\\udfff",tA="\\u0300-\\u036f",rA="\\ufe20-\\ufe2f",nA="\\u20d0-\\u20ff",oA=tA+rA+nA,Mp="\\u2700-\\u27bf",bp="a-z\\xdf-\\xf6\\xf8-\\xff",iA="\\xac\\xb1\\xd7\\xf7",aA="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",sA="\\u2000-\\u206f",lA=" \\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",_p="A-Z\\xc0-\\xd6\\xd8-\\xde",fA="\\ufe0e\\ufe0f",vp=iA+aA+sA+lA,Pp="['\u2019]",Op="["+vp+"]",cA="["+oA+"]",kp="\\d+",uA="["+Mp+"]",Bp="["+bp+"]",wp="[^"+Ip+vp+kp+Mp+bp+_p+"]",pA="\\ud83c[\\udffb-\\udfff]",mA="(?:"+cA+"|"+pA+")",dA="[^"+Ip+"]",Dp="(?:\\ud83c[\\udde6-\\uddff]){2}",Fp="[\\ud800-\\udbff][\\udc00-\\udfff]",rn="["+_p+"]",hA="\\u200d",yp="(?:"+Bp+"|"+wp+")",EA="(?:"+rn+"|"+wp+")",Np="(?:"+Pp+"(?:d|ll|m|re|s|t|ve))?",Cp="(?:"+Pp+"(?:D|LL|M|RE|S|T|VE))?",Gp=mA+"?",jp="["+fA+"]?",SA="(?:"+hA+"(?:"+[dA,Dp,Fp].join("|")+")"+jp+Gp+")*",TA="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",gA="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",xA=jp+Gp+SA,RA="(?:"+[uA,Dp,Fp].join("|")+")"+xA,LA=RegExp([rn+"?"+Bp+"+"+Np+"(?="+[Op,rn,"$"].join("|")+")",EA+"+"+Cp+"(?="+[Op,rn+yp,"$"].join("|")+")",rn+"?"+yp+"+"+Np,rn+"+"+Cp,gA,TA,kp,RA].join("|"),"g");function UA(e){return e.match(LA)||[]}n(UA,"unicodeWords");Kp.exports=UA});var Hp=v((jY,Yp)=>{var AA=Lp(),OA=Ap(),yA=Qn(),NA=Wp();function CA(e,t,r){return e=yA(e),t=r?void 0:t,t===void 0?OA(e)?NA(e):AA(e):e.match(t)||[]}n(CA,"words");Yp.exports=CA});var qp=v((WY,zp)=>{var IA=dp(),MA=xp(),bA=Hp(),_A="['\u2019]",vA=RegExp(_A,"g");function PA(e){return function(t){return IA(bA(MA(t).replace(vA,"")),e,"")}}n(PA,"createCompounder");zp.exports=PA});var Xp=v((HY,Vp)=>{var kA=pp(),BA=qp(),wA=BA(function(e,t,r){return t=t.toLowerCase(),e+(r?kA(t):t)});Vp.exports=wA});var Fh=typeof global=="object"&&global&&global.Object===Object&&global,uo=Fh;var Gh=typeof self=="object"&&self&&self.Object===Object&&self,jh=uo||Gh||Function("return this")(),re=jh;var Kh=re.Symbol,ce=Kh;var ps=Object.prototype,Wh=ps.hasOwnProperty,Yh=ps.toString,Nn=ce?ce.toStringTag:void 0;function Hh(e){var t=Wh.call(e,Nn),r=e[Nn];try{e[Nn]=void 0;var o=!0}catch{}var i=Yh.call(e);return o&&(t?e[Nn]=r:delete e[Nn]),i}n(Hh,"getRawTag");var ms=Hh;var zh=Object.prototype,qh=zh.toString;function Vh(e){return qh.call(e)}n(Vh,"objectToString");var ds=Vh;var Xh="[object Null]",Zh="[object Undefined]",hs=ce?ce.toStringTag:void 0;function Jh(e){return e==null?e===void 0?Zh:Xh:hs&&hs in Object(e)?ms(e):ds(e)}n(Jh,"baseGetTag");var Re=Jh;function Qh(e){return e!=null&&typeof e=="object"}n(Qh,"isObjectLike");var ee=Qh;var $h="[object Symbol]";function eE(e){return typeof e=="symbol"||ee(e)&&Re(e)==$h}n(eE,"isSymbol");var Nt=eE;function tE(e,t){for(var r=-1,o=e==null?0:e.length,i=Array(o);++r<o;)i[r]=t(e[r],r,e);return i}n(tE,"arrayMap");var Qe=tE;var rE=Array.isArray,O=rE;var nE=1/0,Es=ce?ce.prototype:void 0,Ss=Es?Es.toString:void 0;function Ts(e){if(typeof e=="string")return e;if(O(e))return Qe(e,Ts)+"";if(Nt(e))return Ss?Ss.call(e):"";var t=e+"";return t=="0"&&1/e==-nE?"-0":t}n(Ts,"baseToString");var gs=Ts;var oE=/\s/;function iE(e){for(var t=e.length;t--&&oE.test(e.charAt(t)););return t}n(iE,"trimmedEndIndex");var xs=iE;var aE=/^\s+/;function sE(e){return e&&e.slice(0,xs(e)+1).replace(aE,"")}n(sE,"baseTrim");var Rs=sE;function lE(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}n(lE,"isObject");var Q=lE;var Ls=NaN,fE=/^[-+]0x[0-9a-f]+$/i,cE=/^0b[01]+$/i,uE=/^0o[0-7]+$/i,pE=parseInt;function mE(e){if(typeof e=="number")return e;if(Nt(e))return Ls;if(Q(e)){var t=typeof e.valueOf=="function"?e.valueOf():e;e=Q(t)?t+"":t}if(typeof e!="string")return e===0?e:+e;e=Rs(e);var r=cE.test(e);return r||uE.test(e)?pE(e.slice(2),r?2:8):fE.test(e)?Ls:+e}n(mE,"toNumber");var Us=mE;var As=1/0,dE=17976931348623157e292;function hE(e){if(!e)return e===0?e:0;if(e=Us(e),e===As||e===-As){var t=e<0?-1:1;return t*dE}return e===e?e:0}n(hE,"toFinite");var Os=hE;function EE(e){var t=Os(e),r=t%1;return t===t?r?t-r:t:0}n(EE,"toInteger");var $e=EE;function SE(e){return e}n(SE,"identity");var Ge=SE;var TE="[object AsyncFunction]",gE="[object Function]",xE="[object GeneratorFunction]",RE="[object Proxy]";function LE(e){if(!Q(e))return!1;var t=Re(e);return t==gE||t==xE||t==TE||t==RE}n(LE,"isFunction");var Le=LE;var UE=re["__core-js_shared__"],po=UE;var ys=(function(){var e=/[^.]+$/.exec(po&&po.keys&&po.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function AE(e){return!!ys&&ys in e}n(AE,"isMasked");var Ns=AE;var OE=Function.prototype,yE=OE.toString;function NE(e){if(e!=null){try{return yE.call(e)}catch{}try{return e+""}catch{}}return""}n(NE,"toSource");var pt=NE;var CE=/[\\^$.*+?()[\]{}|]/g,IE=/^\[object .+?Constructor\]$/,ME=Function.prototype,bE=Object.prototype,_E=ME.toString,vE=bE.hasOwnProperty,PE=RegExp("^"+_E.call(vE).replace(CE,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function kE(e){if(!Q(e)||Ns(e))return!1;var t=Le(e)?PE:IE;return t.test(pt(e))}n(kE,"baseIsNative");var Cs=kE;function BE(e,t){return e?.[t]}n(BE,"getValue");var Is=BE;function wE(e,t){var r=Is(e,t);return Cs(r)?r:void 0}n(wE,"getNative");var Ce=wE;var DE=Ce(re,"WeakMap"),mo=DE;var Ms=Object.create,FE=(function(){function e(){}return n(e,"object"),function(t){if(!Q(t))return{};if(Ms)return Ms(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}})(),bs=FE;function GE(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)}n(GE,"apply");var _s=GE;function jE(){}n(jE,"noop");var $=jE;function KE(e,t){var r=-1,o=e.length;for(t||(t=Array(o));++r<o;)t[r]=e[r];return t}n(KE,"copyArray");var vs=KE;var WE=800,YE=16,HE=Date.now;function zE(e){var t=0,r=0;return function(){var o=HE(),i=YE-(o-r);if(r=o,i>0){if(++t>=WE)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}n(zE,"shortOut");var Ps=zE;function qE(e){return function(){return e}}n(qE,"constant");var ks=qE;var VE=(function(){try{var e=Ce(Object,"defineProperty");return e({},"",{}),e}catch{}})(),xr=VE;var XE=xr?function(e,t){return xr(e,"toString",{configurable:!0,enumerable:!1,value:ks(t),writable:!0})}:Ge,Bs=XE;var ZE=Ps(Bs),ws=ZE;function JE(e,t){for(var r=-1,o=e==null?0:e.length;++r<o&&t(e[r],r,e)!==!1;);return e}n(JE,"arrayEach");var ho=JE;function QE(e,t,r,o){for(var i=e.length,a=r+(o?1:-1);o?a--:++a<i;)if(t(e[a],a,e))return a;return-1}n(QE,"baseFindIndex");var Eo=QE;function $E(e){return e!==e}n($E,"baseIsNaN");var Ds=$E;function e1(e,t,r){for(var o=r-1,i=e.length;++o<i;)if(e[o]===t)return o;return-1}n(e1,"strictIndexOf");var Fs=e1;function t1(e,t,r){return t===t?Fs(e,t,r):Eo(e,Ds,r)}n(t1,"baseIndexOf");var Rr=t1;function r1(e,t){var r=e==null?0:e.length;return!!r&&Rr(e,t,0)>-1}n(r1,"arrayIncludes");var So=r1;var n1=9007199254740991,o1=/^(?:0|[1-9]\d*)$/;function i1(e,t){var r=typeof e;return t=t??n1,!!t&&(r=="number"||r!="symbol"&&o1.test(e))&&e>-1&&e%1==0&&e<t}n(i1,"isIndex");var Ct=i1;function a1(e,t,r){t=="__proto__"&&xr?xr(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}n(a1,"baseAssignValue");var Lr=a1;function s1(e,t){return e===t||e!==e&&t!==t}n(s1,"eq");var et=s1;var l1=Object.prototype,f1=l1.hasOwnProperty;function c1(e,t,r){var o=e[t];(!(f1.call(e,t)&&et(o,r))||r===void 0&&!(t in e))&&Lr(e,t,r)}n(c1,"assignValue");var It=c1;function u1(e,t,r,o){var i=!r;r||(r={});for(var a=-1,s=t.length;++a<s;){var l=t[a],f=o?o(r[l],e[l],l,r,e):void 0;f===void 0&&(f=e[l]),i?Lr(r,l,f):It(r,l,f)}return r}n(u1,"copyObject");var tt=u1;var Gs=Math.max;function p1(e,t,r){return t=Gs(t===void 0?e.length-1:t,0),function(){for(var o=arguments,i=-1,a=Gs(o.length-t,0),s=Array(a);++i<a;)s[i]=o[t+i];i=-1;for(var l=Array(t+1);++i<t;)l[i]=o[i];return l[t]=r(s),_s(e,this,l)}}n(p1,"overRest");var js=p1;function m1(e,t){return ws(js(e,t,Ge),e+"")}n(m1,"baseRest");var Ur=m1;var d1=9007199254740991;function h1(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=d1}n(h1,"isLength");var Ar=h1;function E1(e){return e!=null&&Ar(e.length)&&!Le(e)}n(E1,"isArrayLike");var ne=E1;function S1(e,t,r){if(!Q(r))return!1;var o=typeof t;return(o=="number"?ne(r)&&Ct(t,r.length):o=="string"&&t in r)?et(r[t],e):!1}n(S1,"isIterateeCall");var Mt=S1;function T1(e){return Ur(function(t,r){var o=-1,i=r.length,a=i>1?r[i-1]:void 0,s=i>2?r[2]:void 0;for(a=e.length>3&&typeof a=="function"?(i--,a):void 0,s&&Mt(r[0],r[1],s)&&(a=i<3?void 0:a,i=1),t=Object(t);++o<i;){var l=r[o];l&&e(t,l,o,a)}return t})}n(T1,"createAssigner");var Ks=T1;var g1=Object.prototype;function x1(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||g1;return e===r}n(x1,"isPrototype");var rt=x1;function R1(e,t){for(var r=-1,o=Array(e);++r<e;)o[r]=t(r);return o}n(R1,"baseTimes");var Ws=R1;var L1="[object Arguments]";function U1(e){return ee(e)&&Re(e)==L1}n(U1,"baseIsArguments");var na=U1;var Ys=Object.prototype,A1=Ys.hasOwnProperty,O1=Ys.propertyIsEnumerable,y1=na((function(){return arguments})())?na:function(e){return ee(e)&&A1.call(e,"callee")&&!O1.call(e,"callee")},bt=y1;function N1(){return!1}n(N1,"stubFalse");var Hs=N1;var Vs=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zs=Vs&&typeof module=="object"&&module&&!module.nodeType&&module,C1=zs&&zs.exports===Vs,qs=C1?re.Buffer:void 0,I1=qs?qs.isBuffer:void 0,M1=I1||Hs,mt=M1;var b1="[object Arguments]",_1="[object Array]",v1="[object Boolean]",P1="[object Date]",k1="[object Error]",B1="[object Function]",w1="[object Map]",D1="[object Number]",F1="[object Object]",G1="[object RegExp]",j1="[object Set]",K1="[object String]",W1="[object WeakMap]",Y1="[object ArrayBuffer]",H1="[object DataView]",z1="[object Float32Array]",q1="[object Float64Array]",V1="[object Int8Array]",X1="[object Int16Array]",Z1="[object Int32Array]",J1="[object Uint8Array]",Q1="[object Uint8ClampedArray]",$1="[object Uint16Array]",eS="[object Uint32Array]",q={};q[z1]=q[q1]=q[V1]=q[X1]=q[Z1]=q[J1]=q[Q1]=q[$1]=q[eS]=!0;q[b1]=q[_1]=q[Y1]=q[v1]=q[H1]=q[P1]=q[k1]=q[B1]=q[w1]=q[D1]=q[F1]=q[G1]=q[j1]=q[K1]=q[W1]=!1;function tS(e){return ee(e)&&Ar(e.length)&&!!q[Re(e)]}n(tS,"baseIsTypedArray");var Xs=tS;function rS(e){return function(t){return e(t)}}n(rS,"baseUnary");var nt=rS;var Zs=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Cn=Zs&&typeof module=="object"&&module&&!module.nodeType&&module,nS=Cn&&Cn.exports===Zs,oa=nS&&uo.process,oS=(function(){try{var e=Cn&&Cn.require&&Cn.require("util").types;return e||oa&&oa.binding&&oa.binding("util")}catch{}})(),je=oS;var Js=je&&je.isTypedArray,iS=Js?nt(Js):Xs,Or=iS;var aS=Object.prototype,sS=aS.hasOwnProperty;function lS(e,t){var r=O(e),o=!r&&bt(e),i=!r&&!o&&mt(e),a=!r&&!o&&!i&&Or(e),s=r||o||i||a,l=s?Ws(e.length,String):[],f=l.length;for(var c in e)(t||sS.call(e,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Ct(c,f)))&&l.push(c);return l}n(lS,"arrayLikeKeys");var To=lS;function fS(e,t){return function(r){return e(t(r))}}n(fS,"overArg");var go=fS;var cS=go(Object.keys,Object),Qs=cS;var uS=Object.prototype,pS=uS.hasOwnProperty;function mS(e){if(!rt(e))return Qs(e);var t=[];for(var r in Object(e))pS.call(e,r)&&r!="constructor"&&t.push(r);return t}n(mS,"baseKeys");var xo=mS;function dS(e){return ne(e)?To(e):xo(e)}n(dS,"keys");var j=dS;var hS=Object.prototype,ES=hS.hasOwnProperty,SS=Ks(function(e,t){if(rt(t)||ne(t)){tt(t,j(t),e);return}for(var r in t)ES.call(t,r)&&It(e,r,t[r])}),he=SS;function TS(e){var t=[];if(e!=null)for(var r in Object(e))t.push(r);return t}n(TS,"nativeKeysIn");var $s=TS;var gS=Object.prototype,xS=gS.hasOwnProperty;function RS(e){if(!Q(e))return $s(e);var t=rt(e),r=[];for(var o in e)o=="constructor"&&(t||!xS.call(e,o))||r.push(o);return r}n(RS,"baseKeysIn");var el=RS;function LS(e){return ne(e)?To(e,!0):el(e)}n(LS,"keysIn");var _t=LS;var US=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,AS=/^\w*$/;function OS(e,t){if(O(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Nt(e)?!0:AS.test(e)||!US.test(e)||t!=null&&e in Object(t)}n(OS,"isKey");var yr=OS;var yS=Ce(Object,"create"),dt=yS;function NS(){this.__data__=dt?dt(null):{},this.size=0}n(NS,"hashClear");var tl=NS;function CS(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}n(CS,"hashDelete");var rl=CS;var IS="__lodash_hash_undefined__",MS=Object.prototype,bS=MS.hasOwnProperty;function _S(e){var t=this.__data__;if(dt){var r=t[e];return r===IS?void 0:r}return bS.call(t,e)?t[e]:void 0}n(_S,"hashGet");var nl=_S;var vS=Object.prototype,PS=vS.hasOwnProperty;function kS(e){var t=this.__data__;return dt?t[e]!==void 0:PS.call(t,e)}n(kS,"hashHas");var ol=kS;var BS="__lodash_hash_undefined__";function wS(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=dt&&t===void 0?BS:t,this}n(wS,"hashSet");var il=wS;function Nr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}n(Nr,"Hash");Nr.prototype.clear=tl;Nr.prototype.delete=rl;Nr.prototype.get=nl;Nr.prototype.has=ol;Nr.prototype.set=il;var ia=Nr;function DS(){this.__data__=[],this.size=0}n(DS,"listCacheClear");var al=DS;function FS(e,t){for(var r=e.length;r--;)if(et(e[r][0],t))return r;return-1}n(FS,"assocIndexOf");var vt=FS;var GS=Array.prototype,jS=GS.splice;function KS(e){var t=this.__data__,r=vt(t,e);if(r<0)return!1;var o=t.length-1;return r==o?t.pop():jS.call(t,r,1),--this.size,!0}n(KS,"listCacheDelete");var sl=KS;function WS(e){var t=this.__data__,r=vt(t,e);return r<0?void 0:t[r][1]}n(WS,"listCacheGet");var ll=WS;function YS(e){return vt(this.__data__,e)>-1}n(YS,"listCacheHas");var fl=YS;function HS(e,t){var r=this.__data__,o=vt(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}n(HS,"listCacheSet");var cl=HS;function Cr(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}n(Cr,"ListCache");Cr.prototype.clear=al;Cr.prototype.delete=sl;Cr.prototype.get=ll;Cr.prototype.has=fl;Cr.prototype.set=cl;var Pt=Cr;var zS=Ce(re,"Map"),kt=zS;function qS(){this.size=0,this.__data__={hash:new ia,map:new(kt||Pt),string:new ia}}n(qS,"mapCacheClear");var ul=qS;function VS(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}n(VS,"isKeyable");var pl=VS;function XS(e,t){var r=e.__data__;return pl(t)?r[typeof t=="string"?"string":"hash"]:r.map}n(XS,"getMapData");var Bt=XS;function ZS(e){var t=Bt(this,e).delete(e);return this.size-=t?1:0,t}n(ZS,"mapCacheDelete");var ml=ZS;function JS(e){return Bt(this,e).get(e)}n(JS,"mapCacheGet");var dl=JS;function QS(e){return Bt(this,e).has(e)}n(QS,"mapCacheHas");var hl=QS;function $S(e,t){var r=Bt(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}n($S,"mapCacheSet");var El=$S;function Ir(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}n(Ir,"MapCache");Ir.prototype.clear=ul;Ir.prototype.delete=ml;Ir.prototype.get=dl;Ir.prototype.has=hl;Ir.prototype.set=El;var nr=Ir;var eT="Expected a function";function aa(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(eT);var r=n(function(){var o=arguments,i=t?t.apply(this,o):o[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,o);return r.cache=a.set(i,s)||a,s},"memoized");return r.cache=new(aa.Cache||nr),r}n(aa,"memoize");aa.Cache=nr;var Sl=aa;var tT=500;function rT(e){var t=Sl(e,function(o){return r.size===tT&&r.clear(),o}),r=t.cache;return t}n(rT,"memoizeCapped");var Tl=rT;var nT=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,oT=/\\(\\)?/g,iT=Tl(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(nT,function(r,o,i,a){t.push(i?a.replace(oT,"$1"):o||r)}),t}),gl=iT;function aT(e){return e==null?"":gs(e)}n(aT,"toString");var xl=aT;function sT(e,t){return O(e)?e:yr(e,t)?[e]:gl(xl(e))}n(sT,"castPath");var wt=sT;var lT=1/0;function fT(e){if(typeof e=="string"||Nt(e))return e;var t=e+"";return t=="0"&&1/e==-lT?"-0":t}n(fT,"toKey");var ot=fT;function cT(e,t){t=wt(t,e);for(var r=0,o=t.length;e!=null&&r<o;)e=e[ot(t[r++])];return r&&r==o?e:void 0}n(cT,"baseGet");var Mr=cT;function uT(e,t,r){var o=e==null?void 0:Mr(e,t);return o===void 0?r:o}n(uT,"get");var Rl=uT;function pT(e,t){for(var r=-1,o=t.length,i=e.length;++r<o;)e[i+r]=t[r];return e}n(pT,"arrayPush");var br=pT;var Ll=ce?ce.isConcatSpreadable:void 0;function mT(e){return O(e)||bt(e)||!!(Ll&&e&&e[Ll])}n(mT,"isFlattenable");var Ul=mT;function Al(e,t,r,o,i){var a=-1,s=e.length;for(r||(r=Ul),i||(i=[]);++a<s;){var l=e[a];t>0&&r(l)?t>1?Al(l,t-1,r,o,i):br(i,l):o||(i[i.length]=l)}return i}n(Al,"baseFlatten");var _r=Al;function dT(e){var t=e==null?0:e.length;return t?_r(e,1):[]}n(dT,"flatten");var se=dT;var hT=go(Object.getPrototypeOf,Object),Ro=hT;function ET(e,t,r){var o=-1,i=e.length;t<0&&(t=-t>i?0:i+t),r=r>i?i:r,r<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var a=Array(i);++o<i;)a[o]=e[o+t];return a}n(ET,"baseSlice");var Lo=ET;function ST(e,t,r,o){var i=-1,a=e==null?0:e.length;for(o&&a&&(r=e[++i]);++i<a;)r=t(r,e[i],i,e);return r}n(ST,"arrayReduce");var Ol=ST;function TT(){this.__data__=new Pt,this.size=0}n(TT,"stackClear");var yl=TT;function gT(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}n(gT,"stackDelete");var Nl=gT;function xT(e){return this.__data__.get(e)}n(xT,"stackGet");var Cl=xT;function RT(e){return this.__data__.has(e)}n(RT,"stackHas");var Il=RT;var LT=200;function UT(e,t){var r=this.__data__;if(r instanceof Pt){var o=r.__data__;if(!kt||o.length<LT-1)return o.push([e,t]),this.size=++r.size,this;r=this.__data__=new nr(o)}return r.set(e,t),this.size=r.size,this}n(UT,"stackSet");var Ml=UT;function vr(e){var t=this.__data__=new Pt(e);this.size=t.size}n(vr,"Stack");vr.prototype.clear=yl;vr.prototype.delete=Nl;vr.prototype.get=Cl;vr.prototype.has=Il;vr.prototype.set=Ml;var Dt=vr;function AT(e,t){return e&&tt(t,j(t),e)}n(AT,"baseAssign");var bl=AT;function OT(e,t){return e&&tt(t,_t(t),e)}n(OT,"baseAssignIn");var _l=OT;var Bl=typeof exports=="object"&&exports&&!exports.nodeType&&exports,vl=Bl&&typeof module=="object"&&module&&!module.nodeType&&module,yT=vl&&vl.exports===Bl,Pl=yT?re.Buffer:void 0,kl=Pl?Pl.allocUnsafe:void 0;function NT(e,t){if(t)return e.slice();var r=e.length,o=kl?kl(r):new e.constructor(r);return e.copy(o),o}n(NT,"cloneBuffer");var wl=NT;function CT(e,t){for(var r=-1,o=e==null?0:e.length,i=0,a=[];++r<o;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}n(CT,"arrayFilter");var Pr=CT;function IT(){return[]}n(IT,"stubArray");var Uo=IT;var MT=Object.prototype,bT=MT.propertyIsEnumerable,Dl=Object.getOwnPropertySymbols,_T=Dl?function(e){return e==null?[]:(e=Object(e),Pr(Dl(e),function(t){return bT.call(e,t)}))}:Uo,kr=_T;function vT(e,t){return tt(e,kr(e),t)}n(vT,"copySymbols");var Fl=vT;var PT=Object.getOwnPropertySymbols,kT=PT?function(e){for(var t=[];e;)br(t,kr(e)),e=Ro(e);return t}:Uo,Ao=kT;function BT(e,t){return tt(e,Ao(e),t)}n(BT,"copySymbolsIn");var Gl=BT;function wT(e,t,r){var o=t(e);return O(e)?o:br(o,r(e))}n(wT,"baseGetAllKeys");var Oo=wT;function DT(e){return Oo(e,j,kr)}n(DT,"getAllKeys");var In=DT;function FT(e){return Oo(e,_t,Ao)}n(FT,"getAllKeysIn");var yo=FT;var GT=Ce(re,"DataView"),No=GT;var jT=Ce(re,"Promise"),Co=jT;var KT=Ce(re,"Set"),Ft=KT;var jl="[object Map]",WT="[object Object]",Kl="[object Promise]",Wl="[object Set]",Yl="[object WeakMap]",Hl="[object DataView]",YT=pt(No),HT=pt(kt),zT=pt(Co),qT=pt(Ft),VT=pt(mo),or=Re;(No&&or(new No(new ArrayBuffer(1)))!=Hl||kt&&or(new kt)!=jl||Co&&or(Co.resolve())!=Kl||Ft&&or(new Ft)!=Wl||mo&&or(new mo)!=Yl)&&(or=n(function(e){var t=Re(e),r=t==WT?e.constructor:void 0,o=r?pt(r):"";if(o)switch(o){case YT:return Hl;case HT:return jl;case zT:return Kl;case qT:return Wl;case VT:return Yl}return t},"getTag"));var qe=or;var XT=Object.prototype,ZT=XT.hasOwnProperty;function JT(e){var t=e.length,r=new e.constructor(t);return t&&typeof e[0]=="string"&&ZT.call(e,"index")&&(r.index=e.index,r.input=e.input),r}n(JT,"initCloneArray");var zl=JT;var QT=re.Uint8Array,Br=QT;function $T(e){var t=new e.constructor(e.byteLength);return new Br(t).set(new Br(e)),t}n($T,"cloneArrayBuffer");var wr=$T;function eg(e,t){var r=t?wr(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.byteLength)}n(eg,"cloneDataView");var ql=eg;var tg=/\w*$/;function rg(e){var t=new e.constructor(e.source,tg.exec(e));return t.lastIndex=e.lastIndex,t}n(rg,"cloneRegExp");var Vl=rg;var Xl=ce?ce.prototype:void 0,Zl=Xl?Xl.valueOf:void 0;function ng(e){return Zl?Object(Zl.call(e)):{}}n(ng,"cloneSymbol");var Jl=ng;function og(e,t){var r=t?wr(e.buffer):e.buffer;return new e.constructor(r,e.byteOffset,e.length)}n(og,"cloneTypedArray");var Ql=og;var ig="[object Boolean]",ag="[object Date]",sg="[object Map]",lg="[object Number]",fg="[object RegExp]",cg="[object Set]",ug="[object String]",pg="[object Symbol]",mg="[object ArrayBuffer]",dg="[object DataView]",hg="[object Float32Array]",Eg="[object Float64Array]",Sg="[object Int8Array]",Tg="[object Int16Array]",gg="[object Int32Array]",xg="[object Uint8Array]",Rg="[object Uint8ClampedArray]",Lg="[object Uint16Array]",Ug="[object Uint32Array]";function Ag(e,t,r){var o=e.constructor;switch(t){case mg:return wr(e);case ig:case ag:return new o(+e);case dg:return ql(e,r);case hg:case Eg:case Sg:case Tg:case gg:case xg:case Rg:case Lg:case Ug:return Ql(e,r);case sg:return new o;case lg:case ug:return new o(e);case fg:return Vl(e);case cg:return new o;case pg:return Jl(e)}}n(Ag,"initCloneByTag");var $l=Ag;function Og(e){return typeof e.constructor=="function"&&!rt(e)?bs(Ro(e)):{}}n(Og,"initCloneObject");var ef=Og;var yg="[object Map]";function Ng(e){return ee(e)&&qe(e)==yg}n(Ng,"baseIsMap");var tf=Ng;var rf=je&&je.isMap,Cg=rf?nt(rf):tf,nf=Cg;var Ig="[object Set]";function Mg(e){return ee(e)&&qe(e)==Ig}n(Mg,"baseIsSet");var of=Mg;var af=je&&je.isSet,bg=af?nt(af):of,sf=bg;var _g=1,vg=2,Pg=4,lf="[object Arguments]",kg="[object Array]",Bg="[object Boolean]",wg="[object Date]",Dg="[object Error]",ff="[object Function]",Fg="[object GeneratorFunction]",Gg="[object Map]",jg="[object Number]",cf="[object Object]",Kg="[object RegExp]",Wg="[object Set]",Yg="[object String]",Hg="[object Symbol]",zg="[object WeakMap]",qg="[object ArrayBuffer]",Vg="[object DataView]",Xg="[object Float32Array]",Zg="[object Float64Array]",Jg="[object Int8Array]",Qg="[object Int16Array]",$g="[object Int32Array]",ex="[object Uint8Array]",tx="[object Uint8ClampedArray]",rx="[object Uint16Array]",nx="[object Uint32Array]",K={};K[lf]=K[kg]=K[qg]=K[Vg]=K[Bg]=K[wg]=K[Xg]=K[Zg]=K[Jg]=K[Qg]=K[$g]=K[Gg]=K[jg]=K[cf]=K[Kg]=K[Wg]=K[Yg]=K[Hg]=K[ex]=K[tx]=K[rx]=K[nx]=!0;K[Dg]=K[ff]=K[zg]=!1;function Io(e,t,r,o,i,a){var s,l=t&_g,f=t&vg,c=t&Pg;if(r&&(s=i?r(e,o,i,a):r(e)),s!==void 0)return s;if(!Q(e))return e;var u=O(e);if(u){if(s=zl(e),!l)return vs(e,s)}else{var p=qe(e),m=p==ff||p==Fg;if(mt(e))return wl(e,l);if(p==cf||p==lf||m&&!i){if(s=f||m?{}:ef(e),!l)return f?Gl(e,_l(s,e)):Fl(e,bl(s,e))}else{if(!K[p])return i?e:{};s=$l(e,p,l)}}a||(a=new Dt);var d=a.get(e);if(d)return d;a.set(e,s),sf(e)?e.forEach(function(R){s.add(Io(R,t,r,R,e,a))}):nf(e)&&e.forEach(function(R,S){s.set(S,Io(R,t,r,S,e,a))});var T=c?f?yo:In:f?_t:j,E=u?void 0:T(e);return ho(E||e,function(R,S){E&&(S=R,R=e[S]),It(s,S,Io(R,t,r,S,e,a))}),s}n(Io,"baseClone");var uf=Io;var ox=4;function ix(e){return uf(e,ox)}n(ix,"clone");var W=ix;function ax(e){for(var t=-1,r=e==null?0:e.length,o=0,i=[];++t<r;){var a=e[t];a&&(i[o++]=a)}return i}n(ax,"compact");var it=ax;var sx="__lodash_hash_undefined__";function lx(e){return this.__data__.set(e,sx),this}n(lx,"setCacheAdd");var pf=lx;function fx(e){return this.__data__.has(e)}n(fx,"setCacheHas");var mf=fx;function Mo(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new nr;++t<r;)this.add(e[t])}n(Mo,"SetCache");Mo.prototype.add=Mo.prototype.push=pf;Mo.prototype.has=mf;var Dr=Mo;function cx(e,t){for(var r=-1,o=e==null?0:e.length;++r<o;)if(t(e[r],r,e))return!0;return!1}n(cx,"arraySome");var bo=cx;function ux(e,t){return e.has(t)}n(ux,"cacheHas");var Fr=ux;var px=1,mx=2;function dx(e,t,r,o,i,a){var s=r&px,l=e.length,f=t.length;if(l!=f&&!(s&&f>l))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var p=-1,m=!0,d=r&mx?new Dr:void 0;for(a.set(e,t),a.set(t,e);++p<l;){var T=e[p],E=t[p];if(o)var R=s?o(E,T,p,t,e,a):o(T,E,p,e,t,a);if(R!==void 0){if(R)continue;m=!1;break}if(d){if(!bo(t,function(S,g){if(!Fr(d,g)&&(T===S||i(T,S,r,o,a)))return d.push(g)})){m=!1;break}}else if(!(T===E||i(T,E,r,o,a))){m=!1;break}}return a.delete(e),a.delete(t),m}n(dx,"equalArrays");var _o=dx;function hx(e){var t=-1,r=Array(e.size);return e.forEach(function(o,i){r[++t]=[i,o]}),r}n(hx,"mapToArray");var df=hx;function Ex(e){var t=-1,r=Array(e.size);return e.forEach(function(o){r[++t]=o}),r}n(Ex,"setToArray");var Gr=Ex;var Sx=1,Tx=2,gx="[object Boolean]",xx="[object Date]",Rx="[object Error]",Lx="[object Map]",Ux="[object Number]",Ax="[object RegExp]",Ox="[object Set]",yx="[object String]",Nx="[object Symbol]",Cx="[object ArrayBuffer]",Ix="[object DataView]",hf=ce?ce.prototype:void 0,sa=hf?hf.valueOf:void 0;function Mx(e,t,r,o,i,a,s){switch(r){case Ix:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case Cx:return!(e.byteLength!=t.byteLength||!a(new Br(e),new Br(t)));case gx:case xx:case Ux:return et(+e,+t);case Rx:return e.name==t.name&&e.message==t.message;case Ax:case yx:return e==t+"";case Lx:var l=df;case Ox:var f=o&Sx;if(l||(l=Gr),e.size!=t.size&&!f)return!1;var c=s.get(e);if(c)return c==t;o|=Tx,s.set(e,t);var u=_o(l(e),l(t),o,i,a,s);return s.delete(e),u;case Nx:if(sa)return sa.call(e)==sa.call(t)}return!1}n(Mx,"equalByTag");var Ef=Mx;var bx=1,_x=Object.prototype,vx=_x.hasOwnProperty;function Px(e,t,r,o,i,a){var s=r&bx,l=In(e),f=l.length,c=In(t),u=c.length;if(f!=u&&!s)return!1;for(var p=f;p--;){var m=l[p];if(!(s?m in t:vx.call(t,m)))return!1}var d=a.get(e),T=a.get(t);if(d&&T)return d==t&&T==e;var E=!0;a.set(e,t),a.set(t,e);for(var R=s;++p<f;){m=l[p];var S=e[m],g=t[m];if(o)var h=s?o(g,S,m,t,e,a):o(S,g,m,e,t,a);if(!(h===void 0?S===g||i(S,g,r,o,a):h)){E=!1;break}R||(R=m=="constructor")}if(E&&!R){var N=e.constructor,C=t.constructor;N!=C&&"constructor"in e&&"constructor"in t&&!(typeof N=="function"&&N instanceof N&&typeof C=="function"&&C instanceof C)&&(E=!1)}return a.delete(e),a.delete(t),E}n(Px,"equalObjects");var Sf=Px;var kx=1,Tf="[object Arguments]",gf="[object Array]",vo="[object Object]",Bx=Object.prototype,xf=Bx.hasOwnProperty;function wx(e,t,r,o,i,a){var s=O(e),l=O(t),f=s?gf:qe(e),c=l?gf:qe(t);f=f==Tf?vo:f,c=c==Tf?vo:c;var u=f==vo,p=c==vo,m=f==c;if(m&&mt(e)){if(!mt(t))return!1;s=!0,u=!1}if(m&&!u)return a||(a=new Dt),s||Or(e)?_o(e,t,r,o,i,a):Ef(e,t,f,r,o,i,a);if(!(r&kx)){var d=u&&xf.call(e,"__wrapped__"),T=p&&xf.call(t,"__wrapped__");if(d||T){var E=d?e.value():e,R=T?t.value():t;return a||(a=new Dt),i(E,R,r,o,a)}}return m?(a||(a=new Dt),Sf(e,t,r,o,i,a)):!1}n(wx,"baseIsEqualDeep");var Rf=wx;function Lf(e,t,r,o,i){return e===t?!0:e==null||t==null||!ee(e)&&!ee(t)?e!==e&&t!==t:Rf(e,t,r,o,Lf,i)}n(Lf,"baseIsEqual");var Po=Lf;var Dx=1,Fx=2;function Gx(e,t,r,o){var i=r.length,a=i,s=!o;if(e==null)return!a;for(e=Object(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=r[i];var f=l[0],c=e[f],u=l[1];if(s&&l[2]){if(c===void 0&&!(f in e))return!1}else{var p=new Dt;if(o)var m=o(c,u,f,e,t,p);if(!(m===void 0?Po(u,c,Dx|Fx,o,p):m))return!1}}return!0}n(Gx,"baseIsMatch");var Uf=Gx;function jx(e){return e===e&&!Q(e)}n(jx,"isStrictComparable");var ko=jx;function Kx(e){for(var t=j(e),r=t.length;r--;){var o=t[r],i=e[o];t[r]=[o,i,ko(i)]}return t}n(Kx,"getMatchData");var Af=Kx;function Wx(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}n(Wx,"matchesStrictComparable");var Bo=Wx;function Yx(e){var t=Af(e);return t.length==1&&t[0][2]?Bo(t[0][0],t[0][1]):function(r){return r===e||Uf(r,e,t)}}n(Yx,"baseMatches");var Of=Yx;function Hx(e,t){return e!=null&&t in Object(e)}n(Hx,"baseHasIn");var yf=Hx;function zx(e,t,r){t=wt(t,e);for(var o=-1,i=t.length,a=!1;++o<i;){var s=ot(t[o]);if(!(a=e!=null&&r(e,s)))break;e=e[s]}return a||++o!=i?a:(i=e==null?0:e.length,!!i&&Ar(i)&&Ct(s,i)&&(O(e)||bt(e)))}n(zx,"hasPath");var wo=zx;function qx(e,t){return e!=null&&wo(e,t,yf)}n(qx,"hasIn");var Nf=qx;var Vx=1,Xx=2;function Zx(e,t){return yr(e)&&ko(t)?Bo(ot(e),t):function(r){var o=Rl(r,e);return o===void 0&&o===t?Nf(r,e):Po(t,o,Vx|Xx)}}n(Zx,"baseMatchesProperty");var Cf=Zx;function Jx(e){return function(t){return t?.[e]}}n(Jx,"baseProperty");var If=Jx;function Qx(e){return function(t){return Mr(t,e)}}n(Qx,"basePropertyDeep");var Mf=Qx;function $x(e){return yr(e)?If(ot(e)):Mf(e)}n($x,"property");var bf=$x;function eR(e){return typeof e=="function"?e:e==null?Ge:typeof e=="object"?O(e)?Cf(e[0],e[1]):Of(e):bf(e)}n(eR,"baseIteratee");var oe=eR;function tR(e,t,r,o){for(var i=-1,a=e==null?0:e.length;++i<a;){var s=e[i];t(o,s,r(s),e)}return o}n(tR,"arrayAggregator");var _f=tR;function rR(e){return function(t,r,o){for(var i=-1,a=Object(t),s=o(t),l=s.length;l--;){var f=s[e?l:++i];if(r(a[f],f,a)===!1)break}return t}}n(rR,"createBaseFor");var vf=rR;var nR=vf(),Pf=nR;function oR(e,t){return e&&Pf(e,t,j)}n(oR,"baseForOwn");var kf=oR;function iR(e,t){return function(r,o){if(r==null)return r;if(!ne(r))return e(r,o);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++a<i)&&o(s[a],a,s)!==!1;);return r}}n(iR,"createBaseEach");var Bf=iR;var aR=Bf(kf),Ie=aR;function sR(e,t,r,o){return Ie(e,function(i,a,s){t(o,i,r(i),s)}),o}n(sR,"baseAggregator");var wf=sR;function lR(e,t){return function(r,o){var i=O(r)?_f:wf,a=t?t():{};return i(r,e,oe(o,2),a)}}n(lR,"createAggregator");var Df=lR;var Ff=Object.prototype,fR=Ff.hasOwnProperty,cR=Ur(function(e,t){e=Object(e);var r=-1,o=t.length,i=o>2?t[2]:void 0;for(i&&Mt(t[0],t[1],i)&&(o=1);++r<o;)for(var a=t[r],s=_t(a),l=-1,f=s.length;++l<f;){var c=s[l],u=e[c];(u===void 0||et(u,Ff[c])&&!fR.call(e,c))&&(e[c]=a[c])}return e}),jr=cR;function uR(e){return ee(e)&&ne(e)}n(uR,"isArrayLikeObject");var la=uR;function pR(e,t,r){for(var o=-1,i=e==null?0:e.length;++o<i;)if(r(t,e[o]))return!0;return!1}n(pR,"arrayIncludesWith");var Do=pR;var mR=200;function dR(e,t,r,o){var i=-1,a=So,s=!0,l=e.length,f=[],c=t.length;if(!l)return f;r&&(t=Qe(t,nt(r))),o?(a=Do,s=!1):t.length>=mR&&(a=Fr,s=!1,t=new Dr(t));e:for(;++i<l;){var u=e[i],p=r==null?u:r(u);if(u=o||u!==0?u:0,s&&p===p){for(var m=c;m--;)if(t[m]===p)continue e;f.push(u)}else a(t,p,o)||f.push(u)}return f}n(dR,"baseDifference");var Gf=dR;var hR=Ur(function(e,t){return la(e)?Gf(e,_r(t,1,la,!0)):[]}),Gt=hR;function ER(e){var t=e==null?0:e.length;return t?e[t-1]:void 0}n(ER,"last");var at=ER;function SR(e,t,r){var o=e==null?0:e.length;return o?(t=r||t===void 0?1:$e(t),Lo(e,t<0?0:t,o)):[]}n(SR,"drop");var te=SR;function TR(e,t,r){var o=e==null?0:e.length;return o?(t=r||t===void 0?1:$e(t),t=o-t,Lo(e,0,t<0?0:t)):[]}n(TR,"dropRight");var ht=TR;function gR(e){return typeof e=="function"?e:Ge}n(gR,"castFunction");var jf=gR;function xR(e,t){var r=O(e)?ho:Ie;return r(e,jf(t))}n(xR,"forEach");var U=xR;function RR(e,t){for(var r=-1,o=e==null?0:e.length;++r<o;)if(!t(e[r],r,e))return!1;return!0}n(RR,"arrayEvery");var Kf=RR;function LR(e,t){var r=!0;return Ie(e,function(o,i,a){return r=!!t(o,i,a),r}),r}n(LR,"baseEvery");var Wf=LR;function UR(e,t,r){var o=O(e)?Kf:Wf;return r&&Mt(e,t,r)&&(t=void 0),o(e,oe(t,3))}n(UR,"every");var Se=UR;function AR(e,t){var r=[];return Ie(e,function(o,i,a){t(o,i,a)&&r.push(o)}),r}n(AR,"baseFilter");var Fo=AR;function OR(e,t){var r=O(e)?Pr:Fo;return r(e,oe(t,3))}n(OR,"filter");var Te=OR;function yR(e){return function(t,r,o){var i=Object(t);if(!ne(t)){var a=oe(r,3);t=j(t),r=n(function(l){return a(i[l],l,i)},"predicate")}var s=e(t,r,o);return s>-1?i[a?t[s]:s]:void 0}}n(yR,"createFind");var Yf=yR;var NR=Math.max;function CR(e,t,r){var o=e==null?0:e.length;if(!o)return-1;var i=r==null?0:$e(r);return i<0&&(i=NR(o+i,0)),Eo(e,oe(t,3),i)}n(CR,"findIndex");var Hf=CR;var IR=Yf(Hf),st=IR;function MR(e){return e&&e.length?e[0]:void 0}n(MR,"head");var ue=MR;function bR(e,t){var r=-1,o=ne(e)?Array(e.length):[];return Ie(e,function(i,a,s){o[++r]=t(i,a,s)}),o}n(bR,"baseMap");var zf=bR;function _R(e,t){var r=O(e)?Qe:zf;return r(e,oe(t,3))}n(_R,"map");var L=_R;function vR(e,t){return _r(L(e,t),1)}n(vR,"flatMap");var Ue=vR;var PR=Object.prototype,kR=PR.hasOwnProperty,BR=Df(function(e,t,r){kR.call(e,r)?e[r].push(t):Lr(e,r,[t])}),fa=BR;var wR=Object.prototype,DR=wR.hasOwnProperty;function FR(e,t){return e!=null&&DR.call(e,t)}n(FR,"baseHas");var qf=FR;function GR(e,t){return e!=null&&wo(e,t,qf)}n(GR,"has");var A=GR;var jR="[object String]";function KR(e){return typeof e=="string"||!O(e)&&ee(e)&&Re(e)==jR}n(KR,"isString");var le=KR;function WR(e,t){return Qe(t,function(r){return e[r]})}n(WR,"baseValues");var Vf=WR;function YR(e){return e==null?[]:Vf(e,j(e))}n(YR,"values");var D=YR;var HR=Math.max;function zR(e,t,r,o){e=ne(e)?e:D(e),r=r&&!o?$e(r):0;var i=e.length;return r<0&&(r=HR(i+r,0)),le(e)?r<=i&&e.indexOf(t,r)>-1:!!i&&Rr(e,t,r)>-1}n(zR,"includes");var X=zR;var qR=Math.max;function VR(e,t,r){var o=e==null?0:e.length;if(!o)return-1;var i=r==null?0:$e(r);return i<0&&(i=qR(o+i,0)),Rr(e,t,i)}n(VR,"indexOf");var Go=VR;var XR="[object Map]",ZR="[object Set]",JR=Object.prototype,QR=JR.hasOwnProperty;function $R(e){if(e==null)return!0;if(ne(e)&&(O(e)||typeof e=="string"||typeof e.splice=="function"||mt(e)||Or(e)||bt(e)))return!e.length;var t=qe(e);if(t==XR||t==ZR)return!e.size;if(rt(e))return!xo(e).length;for(var r in e)if(QR.call(e,r))return!1;return!0}n($R,"isEmpty");var b=$R;var eL="[object RegExp]";function tL(e){return ee(e)&&Re(e)==eL}n(tL,"baseIsRegExp");var Xf=tL;var Zf=je&&je.isRegExp,rL=Zf?nt(Zf):Xf,Ke=rL;function nL(e){return e===void 0}n(nL,"isUndefined");var ge=nL;var oL="Expected a function";function iL(e){if(typeof e!="function")throw new TypeError(oL);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)}}n(iL,"negate");var Jf=iL;function aL(e,t,r,o){if(!Q(e))return e;t=wt(t,e);for(var i=-1,a=t.length,s=a-1,l=e;l!=null&&++i<a;){var f=ot(t[i]),c=r;if(f==="__proto__"||f==="constructor"||f==="prototype")return e;if(i!=s){var u=l[f];c=o?o(u,f,l):void 0,c===void 0&&(c=Q(u)?u:Ct(t[i+1])?[]:{})}It(l,f,c),l=l[f]}return e}n(aL,"baseSet");var Qf=aL;function sL(e,t,r){for(var o=-1,i=t.length,a={};++o<i;){var s=t[o],l=Mr(e,s);r(l,s)&&Qf(a,wt(s,e),l)}return a}n(sL,"basePickBy");var $f=sL;function lL(e,t){if(e==null)return{};var r=Qe(yo(e),function(o){return[o]});return t=oe(t),$f(e,r,function(o,i){return t(o,i[0])})}n(lL,"pickBy");var Me=lL;function fL(e,t,r,o,i){return i(e,function(a,s,l){r=o?(o=!1,a):t(r,a,s,l)}),r}n(fL,"baseReduce");var ec=fL;function cL(e,t,r){var o=O(e)?Ol:ec,i=arguments.length<3;return o(e,oe(t,4),r,i,Ie)}n(cL,"reduce");var ie=cL;function uL(e,t){var r=O(e)?Pr:Fo;return r(e,Jf(oe(t,3)))}n(uL,"reject");var jt=uL;function pL(e,t){var r;return Ie(e,function(o,i,a){return r=t(o,i,a),!r}),!!r}n(pL,"baseSome");var tc=pL;function mL(e,t,r){var o=O(e)?bo:tc;return r&&Mt(e,t,r)&&(t=void 0),o(e,oe(t,3))}n(mL,"some");var Mn=mL;var dL=1/0,hL=Ft&&1/Gr(new Ft([,-0]))[1]==dL?function(e){return new Ft(e)}:$,rc=hL;var EL=200;function SL(e,t,r){var o=-1,i=So,a=e.length,s=!0,l=[],f=l;if(r)s=!1,i=Do;else if(a>=EL){var c=t?null:rc(e);if(c)return Gr(c);s=!1,i=Fr,f=new Dr}else f=t?[]:l;e:for(;++o<a;){var u=e[o],p=t?t(u):u;if(u=r||u!==0?u:0,s&&p===p){for(var m=f.length;m--;)if(f[m]===p)continue e;t&&f.push(p),l.push(u)}else i(f,p,r)||(f!==l&&f.push(p),l.push(u))}return l}n(SL,"baseUniq");var nc=SL;function TL(e){return e&&e.length?nc(e):[]}n(TL,"uniq");var Kr=TL;/**
3
+ * @license
4
+ * Lodash (Custom Build) <https://lodash.com/>
5
+ * Build: `lodash modularize exports="es" -o ./`
6
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
7
+ * Released under MIT license <https://lodash.com/license>
8
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
9
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
10
+ */function Wr(e){console&&console.error&&console.error(`Error: ${e}`)}n(Wr,"PRINT_ERROR");function bn(e){console&&console.warn&&console.warn(`Warning: ${e}`)}n(bn,"PRINT_WARNING");function _n(e){let t=new Date().getTime(),r=e();return{time:new Date().getTime()-t,value:r}}n(_n,"timer");function vn(e){function t(){}n(t,"FakeConstructor"),t.prototype=e;let r=new t;function o(){return typeof r.bar}return n(o,"fakeAccess"),o(),o(),e;(0,eval)(e)}n(vn,"toFastProperties");function gL(e){return xL(e)?e.LABEL:e.name}n(gL,"tokenLabel");function xL(e){return le(e.LABEL)&&e.LABEL!==""}n(xL,"hasTokenLabel");var Pe=class{static{n(this,"AbstractProduction")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(t){t.visit(this),U(this.definition,r=>{r.accept(t)})}},P=class extends Pe{static{n(this,"NonTerminal")}constructor(t){super([]),this.idx=1,he(this,Me(t,r=>r!==void 0))}set definition(t){}get definition(){return this.referencedRule!==void 0?this.referencedRule.definition:[]}accept(t){t.visit(this)}},Ae=class extends Pe{static{n(this,"Rule")}constructor(t){super(t.definition),this.orgText="",he(this,Me(t,r=>r!==void 0))}},Y=class extends Pe{static{n(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,he(this,Me(t,r=>r!==void 0))}},k=class extends Pe{static{n(this,"Option")}constructor(t){super(t.definition),this.idx=1,he(this,Me(t,r=>r!==void 0))}},H=class extends Pe{static{n(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,he(this,Me(t,r=>r!==void 0))}},z=class extends Pe{static{n(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,he(this,Me(t,r=>r!==void 0))}},_=class extends Pe{static{n(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,he(this,Me(t,r=>r!==void 0))}},F=class extends Pe{static{n(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,he(this,Me(t,r=>r!==void 0))}},G=class extends Pe{static{n(this,"Alternation")}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,he(this,Me(t,r=>r!==void 0))}},M=class{static{n(this,"Terminal")}constructor(t){this.idx=1,he(this,Me(t,r=>r!==void 0))}accept(t){t.visit(this)}};function jo(e){return L(e,Yr)}n(jo,"serializeGrammar");function Yr(e){function t(r){return L(r,Yr)}if(n(t,"convertDefinition"),e instanceof P){let r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx};return le(e.label)&&(r.label=e.label),r}else{if(e instanceof Y)return{type:"Alternative",definition:t(e.definition)};if(e instanceof k)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof H)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof z)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Yr(new M({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof F)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Yr(new M({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof _)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof G)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof M){let r={type:"Terminal",name:e.terminalType.name,label:gL(e.terminalType),idx:e.idx};le(e.label)&&(r.terminalLabel=e.label);let o=e.terminalType.PATTERN;return e.terminalType.PATTERN&&(r.pattern=Ke(o)?o.source:o),r}else{if(e instanceof Ae)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}}}n(Yr,"serializeProduction");var Oe=class{static{n(this,"GAstVisitor")}visit(t){let r=t;switch(r.constructor){case P:return this.visitNonTerminal(r);case Y:return this.visitAlternative(r);case k:return this.visitOption(r);case H:return this.visitRepetitionMandatory(r);case z:return this.visitRepetitionMandatoryWithSeparator(r);case F:return this.visitRepetitionWithSeparator(r);case _:return this.visitRepetition(r);case G:return this.visitAlternation(r);case M:return this.visitTerminal(r);case Ae: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 ca(e){return e instanceof Y||e instanceof k||e instanceof _||e instanceof H||e instanceof z||e instanceof F||e instanceof M||e instanceof Ae}n(ca,"isSequenceProd");function ir(e,t=[]){return e instanceof k||e instanceof _||e instanceof F?!0:e instanceof G?Mn(e.definition,o=>ir(o,t)):e instanceof P&&X(t,e)?!1:e instanceof Pe?(e instanceof P&&t.push(e),Se(e.definition,o=>ir(o,t))):!1}n(ir,"isOptionalProd");function ua(e){return e instanceof G}n(ua,"isBranchingProd");function be(e){if(e instanceof P)return"SUBRULE";if(e instanceof k)return"OPTION";if(e instanceof G)return"OR";if(e instanceof H)return"AT_LEAST_ONE";if(e instanceof z)return"AT_LEAST_ONE_SEP";if(e instanceof F)return"MANY_SEP";if(e instanceof _)return"MANY";if(e instanceof M)return"CONSUME";throw Error("non exhaustive match")}n(be,"getProductionDslName");var Et=class{static{n(this,"RestWalker")}walk(t,r=[]){U(t.definition,(o,i)=>{let a=te(t.definition,i+1);if(o instanceof P)this.walkProdRef(o,a,r);else if(o instanceof M)this.walkTerminal(o,a,r);else if(o instanceof Y)this.walkFlat(o,a,r);else if(o instanceof k)this.walkOption(o,a,r);else if(o instanceof H)this.walkAtLeastOne(o,a,r);else if(o instanceof z)this.walkAtLeastOneSep(o,a,r);else if(o instanceof F)this.walkManySep(o,a,r);else if(o instanceof _)this.walkMany(o,a,r);else if(o instanceof G)this.walkOr(o,a,r);else throw Error("non exhaustive match")})}walkTerminal(t,r,o){}walkProdRef(t,r,o){}walkFlat(t,r,o){let i=r.concat(o);this.walk(t,i)}walkOption(t,r,o){let i=r.concat(o);this.walk(t,i)}walkAtLeastOne(t,r,o){let i=[new k({definition:t.definition})].concat(r,o);this.walk(t,i)}walkAtLeastOneSep(t,r,o){let i=oc(t,r,o);this.walk(t,i)}walkMany(t,r,o){let i=[new k({definition:t.definition})].concat(r,o);this.walk(t,i)}walkManySep(t,r,o){let i=oc(t,r,o);this.walk(t,i)}walkOr(t,r,o){let i=r.concat(o);U(t.definition,a=>{let s=new Y({definition:[a]});this.walk(s,i)})}};function oc(e,t,r){return[new k({definition:[new M({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}n(oc,"restForRepetitionWithSeparator");function ar(e){if(e instanceof P)return ar(e.referencedRule);if(e instanceof M)return UL(e);if(ca(e))return RL(e);if(ua(e))return LL(e);throw Error("non exhaustive match")}n(ar,"first");function RL(e){let t=[],r=e.definition,o=0,i=r.length>o,a,s=!0;for(;i&&s;)a=r[o],s=ir(a),t=t.concat(ar(a)),o=o+1,i=r.length>o;return Kr(t)}n(RL,"firstForSequence");function LL(e){let t=L(e.definition,r=>ar(r));return Kr(se(t))}n(LL,"firstForBranching");function UL(e){return[e.terminalType]}n(UL,"firstForTerminal");var Ko="_~IN~_";var pa=class extends Et{static{n(this,"ResyncFollowsWalker")}constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,r,o){}walkProdRef(t,r,o){let i=AL(t.referencedRule,t.idx)+this.topProd.name,a=r.concat(o),s=new Y({definition:a}),l=ar(s);this.follows[i]=l}};function ic(e){let t={};return U(e,r=>{let o=new pa(r).startWalking();he(t,o)}),t}n(ic,"computeAllProdsFollows");function AL(e,t){return e.name+t+Ko}n(AL,"buildBetweenProdsFollowPrefix");function y(e){return e.charCodeAt(0)}n(y,"cc");function Wo(e,t){Array.isArray(e)?e.forEach(function(r){t.push(r)}):t.push(e)}n(Wo,"insertToSet");function Hr(e,t){if(e[t]===!0)throw"duplicate flag "+t;let r=e[t];e[t]=!0}n(Hr,"addFlag");function sr(e){if(e===void 0)throw Error("Internal Error - Should never get here!");return!0}n(sr,"ASSERT_EXISTS");function Pn(){throw Error("Internal Error - Should never get here!")}n(Pn,"ASSERT_NEVER_REACH_HERE");function ma(e){return e.type==="Character"}n(ma,"isCharacter");var kn=[];for(let e=y("0");e<=y("9");e++)kn.push(e);var Bn=[y("_")].concat(kn);for(let e=y("a");e<=y("z");e++)Bn.push(e);for(let e=y("A");e<=y("Z");e++)Bn.push(e);var da=[y(" "),y("\f"),y(`
11
+ `),y("\r"),y(" "),y("\v"),y(" "),y("\xA0"),y("\u1680"),y("\u2000"),y("\u2001"),y("\u2002"),y("\u2003"),y("\u2004"),y("\u2005"),y("\u2006"),y("\u2007"),y("\u2008"),y("\u2009"),y("\u200A"),y("\u2028"),y("\u2029"),y("\u202F"),y("\u205F"),y("\u3000"),y("\uFEFF")];var OL=/[0-9a-fA-F]/,Yo=/[0-9]/,yL=/[1-9]/,wn=class{static{n(this,"RegExpParser")}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 o={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":Hr(o,"global");break;case"i":Hr(o,"ignoreCase");break;case"m":Hr(o,"multiLine");break;case"u":Hr(o,"unicode");break;case"y":Hr(o,"sticky");break}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:o,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}sr(r);let o=this.disjunction();return this.consumeChar(")"),{type:r,value:o,loc:this.loc(t)}}return Pn()}quantifier(t=!1){let r,o=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 i=this.integerIncludingZero();switch(this.popChar()){case"}":r={atLeast:i,atMost:i};break;case",":let a;this.isDigit()?(a=this.integerIncludingZero(),r={atLeast:i,atMost:a}):r={atLeast:i,atMost:1/0},this.consumeChar("}");break}if(t===!0&&r===void 0)return;sr(r);break}if(!(t===!0&&r===void 0)&&sr(r))return this.peekChar(0)==="?"?(this.consumeChar("?"),r.greedy=!1):r.greedy=!0,r.type="Quantifier",r.loc=this.loc(o),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()),sr(t)?(t.loc=this.loc(r),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):Pn()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[y(`
12
+ `),y("\r"),y("\u2028"),y("\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=kn;break;case"D":t=kn,r=!0;break;case"s":t=da;break;case"S":t=da,r=!0;break;case"w":t=Bn;break;case"W":t=Bn,r=!0;break}return sr(t)?{type:"Set",value:t,complement:r}:Pn()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=y("\f");break;case"n":t=y(`
13
+ `);break;case"r":t=y("\r");break;case"t":t=y(" ");break;case"v":t=y("\v");break}return sr(t)?{type:"Character",value:t}:Pn()}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:y("\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:y(t)}}classPatternCharacterAtom(){switch(this.peekChar()){case`
14
+ `:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:let t=this.popChar();return{type:"Character",value:y(t)}}}characterClass(){let t=[],r=!1;for(this.consumeChar("["),this.peekChar(0)==="^"&&(this.consumeChar("^"),r=!0);this.isClassAtom();){let o=this.classAtom(),i=o.type==="Character";if(ma(o)&&this.isRangeDash()){this.consumeChar("-");let a=this.classAtom(),s=a.type==="Character";if(ma(a)){if(a.value<o.value)throw Error("Range out of order in character class");t.push({from:o.value,to:a.value})}else Wo(o.value,t),t.push(y("-")),Wo(a.value,t)}else Wo(o.value,t)}return this.consumeChar("]"),{type:"Set",complement:r,value:t}}classAtom(){switch(this.peekChar()){case"]":case`
15
+ `: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:y("\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 o={type:"Group",capturing:t,value:r};return t&&(o.idx=this.groupIdx),o}positiveInteger(){let t=this.popChar();if(yL.test(t)===!1)throw Error("Expecting a positive integer");for(;Yo.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}integerIncludingZero(){let t=this.popChar();if(Yo.test(t)===!1)throw Error("Expecting an integer");for(;Yo.test(this.peekChar(0));)t+=this.popChar();return parseInt(t,10)}patternCharacter(){let t=this.popChar();switch(t){case`
16
+ `: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:y(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 Yo.test(this.peekChar(0))}isClassAtom(t=0){switch(this.peekChar(t)){case"]":case`
17
+ `: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`
18
+ `:case"\r":case"\u2028":case"\u2029":return!1;default:return!0}}parseHexDigits(t){let r="";for(let i=0;i<t;i++){let a=this.popChar();if(OL.test(a)===!1)throw Error("Expecting a HexDecimal digits");r+=a}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 Kt=class{static{n(this,"BaseRegExpVisitor")}visitChildren(t){for(let r in t){let o=t[r];t.hasOwnProperty(r)&&(o.type!==void 0?this.visit(o):Array.isArray(o)&&o.forEach(i=>{this.visit(i)},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 Ho={},NL=new wn;function zr(e){let t=e.toString();if(Ho.hasOwnProperty(t))return Ho[t];{let r=NL.pattern(t);return Ho[t]=r,r}}n(zr,"getRegExpAst");function ac(){Ho={}}n(ac,"clearRegExpParserCache");var lc="Complement Sets are not supported for first char optimization",Dn=`Unable to use "first char" lexer optimizations:
19
+ `;function fc(e,t=!1){try{let r=zr(e);return ha(r.value,{},r.flags.ignoreCase)}catch(r){if(r.message===lc)t&&bn(`${Dn} Unable to optimize: < ${e.toString()} >
20
+ Complement Sets cannot be automatically optimized.
21
+ This will disable the lexer's first char optimizations.
22
+ See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#COMPLEMENT for details.`);else{let o="";t&&(o=`
23
+ This will disable the lexer's first char optimizations.
24
+ See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`),Wr(`${Dn}
25
+ Failed parsing: < ${e.toString()} >
26
+ Using the @chevrotain/regexp-to-ast library
27
+ Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+o)}}return[]}n(fc,"getOptimizedStartCodesIndices");function ha(e,t,r){switch(e.type){case"Disjunction":for(let i=0;i<e.value.length;i++)ha(e.value[i],t,r);break;case"Alternative":let o=e.value;for(let i=0;i<o.length;i++){let a=o[i];switch(a.type){case"EndAnchor":case"GroupBackReference":case"Lookahead":case"NegativeLookahead":case"StartAnchor":case"WordBoundary":case"NonWordBoundary":continue}let s=a;switch(s.type){case"Character":zo(s.value,t,r);break;case"Set":if(s.complement===!0)throw Error(lc);U(s.value,f=>{if(typeof f=="number")zo(f,t,r);else{let c=f;if(r===!0)for(let u=c.from;u<=c.to;u++)zo(u,t,r);else{for(let u=c.from;u<=c.to&&u<qr;u++)zo(u,t,r);if(c.to>=qr){let u=c.from>=qr?c.from:qr,p=c.to,m=lt(u),d=lt(p);for(let T=m;T<=d;T++)t[T]=T}}}});break;case"Group":ha(s.value,t,r);break;default:throw Error("Non Exhaustive Match")}let l=s.quantifier!==void 0&&s.quantifier.atLeast===0;if(s.type==="Group"&&Ea(s)===!1||s.type!=="Group"&&l===!1)break}break;default:throw Error("non exhaustive match!")}return D(t)}n(ha,"firstCharOptimizedIndices");function zo(e,t,r){let o=lt(e);t[o]=o,r===!0&&CL(e,t)}n(zo,"addOptimizedIdxToResult");function CL(e,t){let r=String.fromCharCode(e),o=r.toUpperCase();if(o!==r){let i=lt(o.charCodeAt(0));t[i]=i}else{let i=r.toLowerCase();if(i!==r){let a=lt(i.charCodeAt(0));t[a]=a}}}n(CL,"handleIgnoreCase");function sc(e,t){return st(e.value,r=>{if(typeof r=="number")return X(t,r);{let o=r;return st(t,i=>o.from<=i&&i<=o.to)!==void 0}})}n(sc,"findCode");function Ea(e){let t=e.quantifier;return t&&t.atLeast===0?!0:e.value?O(e.value)?Se(e.value,Ea):Ea(e.value):!1}n(Ea,"isWholeOptional");var Sa=class extends Kt{static{n(this,"CharCodeFinder")}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){X(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?sc(t,this.targetCharCodes)===void 0&&(this.found=!0):sc(t,this.targetCharCodes)!==void 0&&(this.found=!0)}};function qo(e,t){if(t instanceof RegExp){let r=zr(t),o=new Sa(e);return o.visit(r),o.found}else return st(t,r=>X(e,r.charCodeAt(0)))!==void 0}n(qo,"canMatchCharCode");var lr="PATTERN",Vr="defaultMode",Vo="modes",ga=typeof new RegExp("(?:)").sticky=="boolean";function pc(e,t){t=jr(t,{useSticky:ga,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",`
28
+ `],tracer:n((g,h)=>h(),"tracer")});let r=t.tracer;r("initCharCodeToOptimizedIndexMap",()=>{zL()});let o;r("Reject Lexer.NA",()=>{o=jt(e,g=>g[lr]===B.NA)});let i=!1,a;r("Transform Patterns",()=>{i=!1,a=L(o,g=>{let h=g[lr];if(Ke(h)){let N=h.source;return N.length===1&&N!=="^"&&N!=="$"&&N!=="."&&!h.ignoreCase?N:N.length===2&&N[0]==="\\"&&!X(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],N[1])?N[1]:t.useSticky?uc(h):cc(h)}else{if(Le(h))return i=!0,{exec:h};if(typeof h=="object")return i=!0,h;if(typeof h=="string"){if(h.length===1)return h;{let N=h.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),C=new RegExp(N);return t.useSticky?uc(C):cc(C)}}else throw Error("non exhaustive match")}})});let s,l,f,c,u;r("misc mapping",()=>{s=L(o,g=>g.tokenTypeIdx),l=L(o,g=>{let h=g.GROUP;if(h!==B.SKIPPED){if(le(h))return h;if(ge(h))return!1;throw Error("non exhaustive match")}}),f=L(o,g=>{let h=g.LONGER_ALT;if(h)return O(h)?L(h,C=>Go(o,C)):[Go(o,h)]}),c=L(o,g=>g.PUSH_MODE),u=L(o,g=>A(g,"POP_MODE"))});let p;r("Line Terminator Handling",()=>{let g=xc(t.lineTerminatorCharacters);p=L(o,h=>!1),t.positionTracking!=="onlyOffset"&&(p=L(o,h=>A(h,"LINE_BREAKS")?!!h.LINE_BREAKS:gc(h,g)===!1&&qo(g,h.PATTERN)))});let m,d,T,E;r("Misc Mapping #2",()=>{m=L(o,Sc),d=L(a,YL),T=ie(o,(g,h)=>{let N=h.GROUP;return le(N)&&N!==B.SKIPPED&&(g[N]=[]),g},{}),E=L(a,(g,h)=>({pattern:a[h],longerAlt:f[h],canLineTerminator:p[h],isCustom:m[h],short:d[h],group:l[h],push:c[h],pop:u[h],tokenTypeIdx:s[h],tokenType:o[h]}))});let R=!0,S=[];return t.safeMode||r("First Char Optimization",()=>{S=ie(o,(g,h,N)=>{if(typeof h.PATTERN=="string"){let C=h.PATTERN.charCodeAt(0),_e=lt(C);Ta(g,_e,E[N])}else if(O(h.START_CHARS_HINT)){let C;U(h.START_CHARS_HINT,_e=>{let Qi=typeof _e=="string"?_e.charCodeAt(0):_e,Je=lt(Qi);C!==Je&&(C=Je,Ta(g,Je,E[N]))})}else if(Ke(h.PATTERN))if(h.PATTERN.unicode)R=!1,t.ensureOptimizations&&Wr(`${Dn} Unable to analyze < ${h.PATTERN.toString()} > pattern.
29
+ The regexp unicode flag is not currently supported by the regexp-to-ast library.
30
+ This will disable the lexer's first char optimizations.
31
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`);else{let C=fc(h.PATTERN,t.ensureOptimizations);b(C)&&(R=!1),U(C,_e=>{Ta(g,_e,E[N])})}else t.ensureOptimizations&&Wr(`${Dn} TokenType: <${h.name}> is using a custom token pattern without providing <start_chars_hint> parameter.
32
+ This will disable the lexer's first char optimizations.
33
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_OPTIMIZE`),R=!1;return g},[])}),{emptyGroups:T,patternIdxToConfig:E,charCodeToPatternIdxToConfig:S,hasCustom:i,canBeOptimized:R}}n(pc,"analyzeTokenTypes");function mc(e,t){let r=[],o=ML(e);r=r.concat(o.errors);let i=bL(o.valid),a=i.valid;return r=r.concat(i.errors),r=r.concat(IL(a)),r=r.concat(FL(a)),r=r.concat(GL(a,t)),r=r.concat(jL(a)),r}n(mc,"validatePatterns");function IL(e){let t=[],r=Te(e,o=>Ke(o[lr]));return t=t.concat(vL(r)),t=t.concat(BL(r)),t=t.concat(wL(r)),t=t.concat(DL(r)),t=t.concat(PL(r)),t}n(IL,"validateRegExpPattern");function ML(e){let t=Te(e,i=>!A(i,lr)),r=L(t,i=>({message:"Token Type: ->"+i.name+"<- missing static 'PATTERN' property",type:Z.MISSING_PATTERN,tokenTypes:[i]})),o=Gt(e,t);return{errors:r,valid:o}}n(ML,"findMissingPatterns");function bL(e){let t=Te(e,i=>{let a=i[lr];return!Ke(a)&&!Le(a)&&!A(a,"exec")&&!le(a)}),r=L(t,i=>({message:"Token Type: ->"+i.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Z.INVALID_PATTERN,tokenTypes:[i]})),o=Gt(e,t);return{errors:r,valid:o}}n(bL,"findInvalidPatterns");var _L=/[^\\][$]/;function vL(e){class t extends Kt{static{n(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(a){this.found=!0}}let r=Te(e,i=>{let a=i.PATTERN;try{let s=zr(a),l=new t;return l.visit(s),l.found}catch{return _L.test(a.source)}});return L(r,i=>({message:`Unexpected RegExp Anchor Error:
34
+ Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain end of input anchor '$'
35
+ See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Z.EOI_ANCHOR_FOUND,tokenTypes:[i]}))}n(vL,"findEndOfInputAnchor");function PL(e){let t=Te(e,o=>o.PATTERN.test(""));return L(t,o=>({message:"Token Type: ->"+o.name+"<- static 'PATTERN' must not match an empty string",type:Z.EMPTY_MATCH_PATTERN,tokenTypes:[o]}))}n(PL,"findEmptyMatchRegExps");var kL=/[^\\[][\^]|^\^/;function BL(e){class t extends Kt{static{n(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(a){this.found=!0}}let r=Te(e,i=>{let a=i.PATTERN;try{let s=zr(a),l=new t;return l.visit(s),l.found}catch{return kL.test(a.source)}});return L(r,i=>({message:`Unexpected RegExp Anchor Error:
36
+ Token Type: ->`+i.name+`<- static 'PATTERN' cannot contain start of input anchor '^'
37
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Z.SOI_ANCHOR_FOUND,tokenTypes:[i]}))}n(BL,"findStartOfInputAnchor");function wL(e){let t=Te(e,o=>{let i=o[lr];return i instanceof RegExp&&(i.multiline||i.global)});return L(t,o=>({message:"Token Type: ->"+o.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Z.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[o]}))}n(wL,"findUnsupportedFlags");function DL(e){let t=[],r=L(e,a=>ie(e,(s,l)=>(a.PATTERN.source===l.PATTERN.source&&!X(t,l)&&l.PATTERN!==B.NA&&(t.push(l),s.push(l)),s),[]));r=it(r);let o=Te(r,a=>a.length>1);return L(o,a=>{let s=L(a,f=>f.name);return{message:`The same RegExp pattern ->${ue(a).PATTERN}<-has been used in all of the following Token Types: ${s.join(", ")} <-`,type:Z.DUPLICATE_PATTERNS_FOUND,tokenTypes:a}})}n(DL,"findDuplicatePatterns");function FL(e){let t=Te(e,o=>{if(!A(o,"GROUP"))return!1;let i=o.GROUP;return i!==B.SKIPPED&&i!==B.NA&&!le(i)});return L(t,o=>({message:"Token Type: ->"+o.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Z.INVALID_GROUP_TYPE_FOUND,tokenTypes:[o]}))}n(FL,"findInvalidGroupType");function GL(e,t){let r=Te(e,i=>i.PUSH_MODE!==void 0&&!X(t,i.PUSH_MODE));return L(r,i=>({message:`Token Type: ->${i.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${i.PUSH_MODE}<-which does not exist`,type:Z.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[i]}))}n(GL,"findModesThatDoNotExist");function jL(e){let t=[],r=ie(e,(o,i,a)=>{let s=i.PATTERN;return s===B.NA||(le(s)?o.push({str:s,idx:a,tokenType:i}):Ke(s)&&WL(s)&&o.push({str:s.source,idx:a,tokenType:i})),o},[]);return U(e,(o,i)=>{U(r,({str:a,idx:s,tokenType:l})=>{if(i<s&&KL(a,o.PATTERN)){let f=`Token: ->${l.name}<- can never be matched.
38
+ Because it appears AFTER the Token Type ->${o.name}<-in the lexer's definition.
39
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`;t.push({message:f,type:Z.UNREACHABLE_PATTERN,tokenTypes:[o,l]})}})}),t}n(jL,"findUnreachablePatterns");function KL(e,t){if(Ke(t)){let r=t.exec(e);return r!==null&&r.index===0}else{if(Le(t))return t(e,0,[],{});if(A(t,"exec"))return t.exec(e,0,[],{});if(typeof t=="string")return t===e;throw Error("non exhaustive match")}}n(KL,"testTokenType");function WL(e){return st([".","\\","[","]","|","^","$","(",")","?","*","+","{"],r=>e.source.indexOf(r)!==-1)===void 0}n(WL,"noMetaChar");function cc(e){let t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}n(cc,"addStartOfInput");function uc(e){let t=e.ignoreCase?"iy":"y";return new RegExp(`${e.source}`,t)}n(uc,"addStickyFlag");function dc(e,t,r){let o=[];return A(e,Vr)||o.push({message:"A MultiMode Lexer cannot be initialized without a <"+Vr+`> property in its definition
40
+ `,type:Z.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),A(e,Vo)||o.push({message:"A MultiMode Lexer cannot be initialized without a <"+Vo+`> property in its definition
41
+ `,type:Z.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),A(e,Vo)&&A(e,Vr)&&!A(e.modes,e.defaultMode)&&o.push({message:`A MultiMode Lexer cannot be initialized with a ${Vr}: <${e.defaultMode}>which does not exist
42
+ `,type:Z.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),A(e,Vo)&&U(e.modes,(i,a)=>{U(i,(s,l)=>{if(ge(s))o.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${a}> at index: <${l}>
43
+ `,type:Z.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED});else if(A(s,"LONGER_ALT")){let f=O(s.LONGER_ALT)?s.LONGER_ALT:[s.LONGER_ALT];U(f,c=>{!ge(c)&&!X(i,c)&&o.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${c.name}> on token <${s.name}> outside of mode <${a}>
44
+ `,type:Z.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})})}})}),o}n(dc,"performRuntimeChecks");function hc(e,t,r){let o=[],i=!1,a=it(se(D(e.modes))),s=jt(a,f=>f[lr]===B.NA),l=xc(r);return t&&U(s,f=>{let c=gc(f,l);if(c!==!1){let p={message:HL(f,c),type:c.issue,tokenType:f};o.push(p)}else A(f,"LINE_BREAKS")?f.LINE_BREAKS===!0&&(i=!0):qo(l,f.PATTERN)&&(i=!0)}),t&&!i&&o.push({message:`Warning: No LINE_BREAKS Found.
45
+ This Lexer has been defined to track line and column information,
46
+ But none of the Token Types can be identified as matching a line terminator.
47
+ See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#LINE_BREAKS
48
+ for details.`,type:Z.NO_LINE_BREAKS_FLAGS}),o}n(hc,"performWarningRuntimeChecks");function Ec(e){let t={},r=j(e);return U(r,o=>{let i=e[o];if(O(i))t[o]=[];else throw Error("non exhaustive match")}),t}n(Ec,"cloneEmptyGroups");function Sc(e){let t=e.PATTERN;if(Ke(t))return!1;if(Le(t))return!0;if(A(t,"exec"))return!0;if(le(t))return!1;throw Error("non exhaustive match")}n(Sc,"isCustomPattern");function YL(e){return le(e)&&e.length===1?e.charCodeAt(0):!1}n(YL,"isShortPattern");var Tc={test:n(function(e){let t=e.length;for(let r=this.lastIndex;r<t;r++){let o=e.charCodeAt(r);if(o===10)return this.lastIndex=r+1,!0;if(o===13)return e.charCodeAt(r+1)===10?this.lastIndex=r+2:this.lastIndex=r+1,!0}return!1},"test"),lastIndex:0};function gc(e,t){if(A(e,"LINE_BREAKS"))return!1;if(Ke(e.PATTERN)){try{qo(t,e.PATTERN)}catch(r){return{issue:Z.IDENTIFY_TERMINATOR,errMsg:r.message}}return!1}else{if(le(e.PATTERN))return!1;if(Sc(e))return{issue:Z.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}}n(gc,"checkLineBreaksIssues");function HL(e,t){if(t.issue===Z.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern.
49
+ The problem is in the <${e.name}> Token Type
50
+ Root cause: ${t.errMsg}.
51
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(t.issue===Z.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the <line_breaks> option.
52
+ The problem is in the <${e.name}> Token Type
53
+ For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}n(HL,"buildLineBreakIssueMessage");function xc(e){return L(e,r=>le(r)?r.charCodeAt(0):r)}n(xc,"getCharCodes");function Ta(e,t,r){e[t]===void 0?e[t]=[r]:e[t].push(r)}n(Ta,"addToMapOfArrays");var qr=256,Xo=[];function lt(e){return e<qr?e:Xo[e]}n(lt,"charCodeToOptimizedIndex");function zL(){if(b(Xo)){Xo=new Array(65536);for(let e=0;e<65536;e++)Xo[e]=e>255?255+~~(e/255):e}}n(zL,"initCharCodeToOptimizedIndexMap");function St(e,t){let r=e.tokenTypeIdx;return r===t.tokenTypeIdx?!0:t.isParent===!0&&t.categoryMatchesMap[r]===!0}n(St,"tokenStructuredMatcher");function Xr(e,t){return e.tokenTypeIdx===t.tokenTypeIdx}n(Xr,"tokenStructuredMatcherNoCategories");var Rc=1,Uc={};function Tt(e){let t=qL(e);VL(t),ZL(t),XL(t),U(t,r=>{r.isParent=r.categoryMatches.length>0})}n(Tt,"augmentTokenTypes");function qL(e){let t=W(e),r=e,o=!0;for(;o;){r=it(se(L(r,a=>a.CATEGORIES)));let i=Gt(r,t);t=t.concat(i),b(i)?o=!1:r=i}return t}n(qL,"expandCategories");function VL(e){U(e,t=>{xa(t)||(Uc[Rc]=t,t.tokenTypeIdx=Rc++),Lc(t)&&!O(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),Lc(t)||(t.CATEGORIES=[]),JL(t)||(t.categoryMatches=[]),QL(t)||(t.categoryMatchesMap={})})}n(VL,"assignTokenDefaultProps");function XL(e){U(e,t=>{t.categoryMatches=[],U(t.categoryMatchesMap,(r,o)=>{t.categoryMatches.push(Uc[o].tokenTypeIdx)})})}n(XL,"assignCategoriesTokensProp");function ZL(e){U(e,t=>{Ac([],t)})}n(ZL,"assignCategoriesMapProp");function Ac(e,t){U(e,r=>{t.categoryMatchesMap[r.tokenTypeIdx]=!0}),U(t.CATEGORIES,r=>{let o=e.concat(t);X(o,r)||Ac(o,r)})}n(Ac,"singleAssignCategoriesToksMap");function xa(e){return A(e,"tokenTypeIdx")}n(xa,"hasShortKeyProperty");function Lc(e){return A(e,"CATEGORIES")}n(Lc,"hasCategoriesProperty");function JL(e){return A(e,"categoryMatches")}n(JL,"hasExtendingTokensTypesProperty");function QL(e){return A(e,"categoryMatchesMap")}n(QL,"hasExtendingTokensTypesMapProperty");function Oc(e){return A(e,"tokenTypeIdx")}n(Oc,"isTokenType");var Ra={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,o,i){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}};var Z;(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"})(Z||(Z={}));var Fn={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[`
54
+ `,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Ra,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0};Object.freeze(Fn);var B=class{static{n(this,"Lexer")}constructor(t,r=Fn){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=(i,a)=>{if(this.traceInitPerf===!0){this.traceInitIndent++;let s=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${s}--> <${i}>`);let{time:l,value:f}=_n(a),c=l>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&c(`${s}<-- <${i}> time: ${l}ms`),this.traceInitIndent--,f}else return a()},typeof r=="boolean")throw Error(`The second argument to the Lexer constructor is now an ILexerConfig Object.
55
+ a boolean 2nd argument is no longer supported`);this.config=he({},Fn,r);let o=this.config.traceInitPerf;o===!0?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):typeof o=="number"&&(this.traceInitMaxIdent=o,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let i,a=!0;this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Fn.lineTerminatorsPattern)this.config.lineTerminatorsPattern=Tc;else if(this.config.lineTerminatorCharacters===Fn.lineTerminatorCharacters)throw Error(`Error: Missing <lineTerminatorCharacters> property on the Lexer config.
56
+ 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),O(t)?i={modes:{defaultMode:W(t)},defaultMode:Vr}:(a=!1,i=W(t))}),this.config.skipValidations===!1&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(dc(i,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(hc(i,this.trackStartLines,this.config.lineTerminatorCharacters))})),i.modes=i.modes?i.modes:{},U(i.modes,(l,f)=>{i.modes[f]=jt(l,c=>ge(c))});let s=j(i.modes);if(U(i.modes,(l,f)=>{this.TRACE_INIT(`Mode: <${f}> processing`,()=>{if(this.modes.push(f),this.config.skipValidations===!1&&this.TRACE_INIT("validatePatterns",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(mc(l,s))}),b(this.lexerDefinitionErrors)){Tt(l);let c;this.TRACE_INIT("analyzeTokenTypes",()=>{c=pc(l,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:r.positionTracking,ensureOptimizations:r.ensureOptimizations,safeMode:r.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[f]=c.patternIdxToConfig,this.charCodeToPatternIdxToConfig[f]=c.charCodeToPatternIdxToConfig,this.emptyGroups=he({},this.emptyGroups,c.emptyGroups),this.hasCustom=c.hasCustom||this.hasCustom,this.canModeBeOptimized[f]=c.canBeOptimized}})}),this.defaultMode=i.defaultMode,!b(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling){let f=L(this.lexerDefinitionErrors,c=>c.message).join(`-----------------------
57
+ `);throw new Error(`Errors detected in definition of Lexer:
58
+ `+f)}U(this.lexerDefinitionWarning,l=>{bn(l.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(ga?(this.chopInput=Ge,this.match=this.matchWithTest):(this.updateLastIndex=$,this.match=this.matchWithExec),a&&(this.handleModes=$),this.trackStartLines===!1&&(this.computeNewColumn=Ge),this.trackEndLines===!1&&(this.updateTokenEndLineColumnLocation=$),/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 l=ie(this.canModeBeOptimized,(f,c,u)=>(c===!1&&f.push(u),f),[]);if(r.ensureOptimizations&&!b(l))throw Error(`Lexer Modes: < ${l.join(", ")} > cannot be optimized.
59
+ Disable the "ensureOptimizations" lexer config flag to silently ignore this and run the lexer in an un-optimized mode.
60
+ Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{ac()}),this.TRACE_INIT("toFastProperties",()=>{vn(this)})})}tokenize(t,r=this.defaultMode){if(!b(this.lexerDefinitionErrors)){let i=L(this.lexerDefinitionErrors,a=>a.message).join(`-----------------------
61
+ `);throw new Error(`Unable to Tokenize because Errors detected in definition of Lexer:
62
+ `+i)}return this.tokenizeInternal(t,r)}tokenizeInternal(t,r){let o,i,a,s,l,f,c,u,p,m,d,T,E,R,S,g,h=t,N=h.length,C=0,_e=0,Qi=this.hasCustom?0:Math.floor(t.length/10),Je=new Array(Qi),$i=[],Un=this.trackStartLines?1:void 0,At=this.trackStartLines?1:void 0,An=Ec(this.emptyGroups),Mh=this.trackStartLines,ea=this.config.lineTerminatorsPattern,fo=0,Ot=[],On=[],co=[],as=[];Object.freeze(as);let yn;function ss(){return Ot}n(ss,"getPossiblePatternsSlow");function ls(Ee){let Fe=lt(Ee),gr=On[Fe];return gr===void 0?as:gr}n(ls,"getPossiblePatternsOptimized");let bh=n(Ee=>{if(co.length===1&&Ee.tokenType.PUSH_MODE===void 0){let Fe=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(Ee);$i.push({offset:Ee.startOffset,line:Ee.startLine,column:Ee.startColumn,length:Ee.image.length,message:Fe})}else{co.pop();let Fe=at(co);Ot=this.patternIdxToConfig[Fe],On=this.charCodeToPatternIdxToConfig[Fe],fo=Ot.length;let gr=this.canModeBeOptimized[Fe]&&this.config.safeMode===!1;On&&gr?yn=ls:yn=ss}},"pop_mode");function fs(Ee){co.push(Ee),On=this.charCodeToPatternIdxToConfig[Ee],Ot=this.patternIdxToConfig[Ee],fo=Ot.length,fo=Ot.length;let Fe=this.canModeBeOptimized[Ee]&&this.config.safeMode===!1;On&&Fe?yn=ls:yn=ss}n(fs,"push_mode"),fs.call(this,r);let ze,cs=this.config.recoveryEnabled;for(;C<N;){f=null;let Ee=h.charCodeAt(C),Fe=yn(Ee),gr=Fe.length;for(o=0;o<gr;o++){ze=Fe[o];let ve=ze.pattern;c=null;let ct=ze.short;if(ct!==!1?Ee===ct&&(f=ve):ze.isCustom===!0?(g=ve.exec(h,C,Je,An),g!==null?(f=g[0],g.payload!==void 0&&(c=g.payload)):f=null):(this.updateLastIndex(ve,C),f=this.match(ve,t,C)),f!==null){if(l=ze.longerAlt,l!==void 0){let yt=l.length;for(a=0;a<yt;a++){let ut=Ot[l[a]],rr=ut.pattern;if(u=null,ut.isCustom===!0?(g=rr.exec(h,C,Je,An),g!==null?(s=g[0],g.payload!==void 0&&(u=g.payload)):s=null):(this.updateLastIndex(rr,C),s=this.match(rr,t,C)),s&&s.length>f.length){f=s,c=u,ze=ut;break}}}break}}if(f!==null){if(p=f.length,m=ze.group,m!==void 0&&(d=ze.tokenTypeIdx,T=this.createTokenInstance(f,C,d,ze.tokenType,Un,At,p),this.handlePayload(T,c),m===!1?_e=this.addToken(Je,_e,T):An[m].push(T)),t=this.chopInput(t,p),C=C+p,At=this.computeNewColumn(At,p),Mh===!0&&ze.canLineTerminator===!0){let ve=0,ct,yt;ea.lastIndex=0;do ct=ea.test(f),ct===!0&&(yt=ea.lastIndex-1,ve++);while(ct===!0);ve!==0&&(Un=Un+ve,At=p-yt,this.updateTokenEndLineColumnLocation(T,m,yt,ve,Un,At,p))}this.handleModes(ze,bh,fs,T)}else{let ve=C,ct=Un,yt=At,ut=cs===!1;for(;ut===!1&&C<N;)for(t=this.chopInput(t,1),C++,i=0;i<fo;i++){let rr=Ot[i],ta=rr.pattern,us=rr.short;if(us!==!1?h.charCodeAt(C)===us&&(ut=!0):rr.isCustom===!0?ut=ta.exec(h,C,Je,An)!==null:(this.updateLastIndex(ta,C),ut=ta.exec(t)!==null),ut===!0)break}if(E=C-ve,At=this.computeNewColumn(At,E),S=this.config.errorMessageProvider.buildUnexpectedCharactersMessage(h,ve,E,ct,yt),$i.push({offset:ve,line:ct,column:yt,length:E,message:S}),cs===!1)break}}return this.hasCustom||(Je.length=_e),{tokens:Je,groups:An,errors:$i}}handleModes(t,r,o,i){if(t.pop===!0){let a=t.push;r(i),a!==void 0&&o.call(this,a)}else t.push!==void 0&&o.call(this,t.push)}chopInput(t,r){return t.substring(r)}updateLastIndex(t,r){t.lastIndex=r}updateTokenEndLineColumnLocation(t,r,o,i,a,s,l){let f,c;r!==void 0&&(f=o===l-1,c=f?-1:0,i===1&&f===!0||(t.endLine=a+c,t.endColumn=s-1+-c))}computeNewColumn(t,r){return t+r}createOffsetOnlyToken(t,r,o,i){return{image:t,startOffset:r,tokenTypeIdx:o,tokenType:i}}createStartOnlyToken(t,r,o,i,a,s){return{image:t,startOffset:r,startLine:a,startColumn:s,tokenTypeIdx:o,tokenType:i}}createFullToken(t,r,o,i,a,s,l){return{image:t,startOffset:r,endOffset:r+l-1,startLine:a,endLine:a,startColumn:s,endColumn:s+l-1,tokenTypeIdx:o,tokenType:i}}addTokenUsingPush(t,r,o){return t.push(o),r}addTokenUsingMemberAccess(t,r,o){return t[r]=o,r++,r}handlePayloadNoCustom(t,r){}handlePayloadWithCustom(t,r){r!==null&&(t.payload=r)}matchWithTest(t,r,o){return t.test(r)===!0?r.substring(o,t.lastIndex):null}matchWithExec(t,r){let o=t.exec(r);return o!==null?o[0]:null}};B.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.";B.NA=/NOT_APPLICABLE/;function gt(e){return La(e)?e.LABEL:e.name}n(gt,"tokenLabel");function La(e){return le(e.LABEL)&&e.LABEL!==""}n(La,"hasTokenLabel");var $L="parent",yc="categories",Nc="label",Cc="group",Ic="push_mode",Mc="pop_mode",bc="longer_alt",_c="line_breaks",vc="start_chars_hint";function fr(e){return eU(e)}n(fr,"createToken");function eU(e){let t=e.pattern,r={};if(r.name=e.name,ge(t)||(r.PATTERN=t),A(e,$L))throw`The parent property is no longer supported.
63
+ See: https://github.com/chevrotain/chevrotain/issues/564#issuecomment-349062346 for details.`;return A(e,yc)&&(r.CATEGORIES=e[yc]),Tt([r]),A(e,Nc)&&(r.LABEL=e[Nc]),A(e,Cc)&&(r.GROUP=e[Cc]),A(e,Mc)&&(r.POP_MODE=e[Mc]),A(e,Ic)&&(r.PUSH_MODE=e[Ic]),A(e,bc)&&(r.LONGER_ALT=e[bc]),A(e,_c)&&(r.LINE_BREAKS=e[_c]),A(e,vc)&&(r.START_CHARS_HINT=e[vc]),r}n(eU,"createTokenInternal");var ke=fr({name:"EOF",pattern:B.NA});Tt([ke]);function cr(e,t,r,o,i,a,s,l){return{image:t,startOffset:r,endOffset:o,startLine:i,endLine:a,startColumn:s,endColumn:l,tokenTypeIdx:e.tokenTypeIdx,tokenType:e}}n(cr,"createTokenInstance");function I(e,t){return St(e,t)}n(I,"tokenMatcher");var Zo={buildMismatchTokenMessage({expected:e,actual:t,previous:r,ruleName:o}){return`Expecting ${La(e)?`--> ${gt(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:o,ruleName:i}){let a="Expecting: ",l=`
64
+ but found: '`+ue(t).image+"'";if(o)return a+o+l;{let f=ie(e,(m,d)=>m.concat(d),[]),c=L(f,m=>`[${L(m,d=>gt(d)).join(", ")}]`),p=`one of these possible Token sequences:
65
+ ${L(c,(m,d)=>` ${d+1}. ${m}`).join(`
66
+ `)}`;return a+p+l}},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r,ruleName:o}){let i="Expecting: ",s=`
67
+ but found: '`+ue(t).image+"'";if(r)return i+r+s;{let f=`expecting at least one iteration which starts with one of these possible Token sequences::
68
+ <${L(e,c=>`[${L(c,u=>gt(u)).join(",")}]`).join(" ,")}>`;return i+f+s}}};Object.freeze(Zo);var Pc={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<-
69
+ inside top level rule: ->`+e.name+"<-"}},Ve={buildDuplicateFoundError(e,t){function r(u){return u instanceof M?u.terminalType.name:u instanceof P?u.nonTerminalName:""}n(r,"getExtraProductionArgument");let o=e.name,i=ue(t),a=i.idx,s=be(i),l=r(i),f=a>0,c=`->${s}${f?a:""}<- ${l?`with argument: ->${l}<-`:""}
70
+ appears more than once (${t.length} times) in the top level rule: ->${o}<-.
71
+ For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES
72
+ `;return c=c.replace(/[ \t]+/g," "),c=c.replace(/\s\s+/g,`
73
+ `),c},buildNamespaceConflictError(e){return`Namespace conflict found in grammar.
74
+ The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${e.name}>.
75
+ To resolve this make sure each Terminal and Non-Terminal names are unique
76
+ This is easy to accomplish by using the convention that Terminal names start with an uppercase letter
77
+ and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){let t=L(e.prefixPath,i=>gt(i)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx;return`Ambiguous alternatives: <${e.ambiguityIndices.join(" ,")}> due to common lookahead prefix
78
+ in <OR${r}> inside <${e.topLevelRule.name}> Rule,
79
+ <${t}> may appears as a prefix path in all these alternatives.
80
+ See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#COMMON_PREFIX
81
+ For Further details.`},buildAlternationAmbiguityError(e){let t=L(e.prefixPath,i=>gt(i)).join(", "),r=e.alternation.idx===0?"":e.alternation.idx,o=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(" ,")}> in <OR${r}> inside <${e.topLevelRule.name}> Rule,
82
+ <${t}> may appears as a prefix path in all these alternatives.
83
+ `;return o=o+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
84
+ For Further details.`,o},buildEmptyRepetitionError(e){let t=be(e.repetition);return e.repetition.idx!==0&&(t+=e.repetition.idx),`The repetition <${t}> within Rule <${e.topLevelRule.name}> can never consume any tokens.
85
+ This could lead to an infinite loop.`},buildTokenNameError(e){return"deprecated"},buildEmptyAlternationError(e){return`Ambiguous empty alternative: <${e.emptyChoiceIdx+1}> in <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
86
+ Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(e){return`An Alternation cannot have more than 256 alternatives:
87
+ <OR${e.alternation.idx}> inside <${e.topLevelRule.name}> Rule.
88
+ has ${e.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(e){let t=e.topLevelRule.name,r=L(e.leftRecursionPath,a=>a.name),o=`${t} --> ${r.concat([t]).join(" --> ")}`;return`Left Recursion found in grammar.
89
+ rule: <${t}> can be invoked from itself (directly or indirectly)
90
+ without consuming any Tokens. The grammar path that causes this is:
91
+ ${o}
92
+ To fix this refactor your grammar to remove the left recursion.
93
+ see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){let t;return e.topLevelRule instanceof Ae?t=e.topLevelRule.name:t=e.topLevelRule,`Duplicate definition, rule: ->${t}<- is already defined in the grammar: ->${e.grammarName}<-`}};function kc(e,t){let r=new Ua(e,t);return r.resolveRefs(),r.errors}n(kc,"resolveGrammar");var Ua=class extends Oe{static{n(this,"GastRefResolverVisitor")}constructor(t,r){super(),this.nameToTopRule=t,this.errMsgProvider=r,this.errors=[]}resolveRefs(){U(D(this.nameToTopRule),t=>{this.currTopLevel=t,t.accept(this)})}visitNonTerminal(t){let r=this.nameToTopRule[t.nonTerminalName];if(r)t.referencedRule=r;else{let o=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t);this.errors.push({message:o,type:fe.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName})}}};var Aa=class extends Et{static{n(this,"AbstractNextPossibleTokensWalker")}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=W(this.path.ruleStack).reverse(),this.occurrenceStack=W(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,o){if(t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence){let i=r.concat(o);this.updateExpectedNext(),this.walk(t.referencedRule,i)}}updateExpectedNext(){b(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},Jo=class extends Aa{static{n(this,"NextAfterTokenWalker")}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,o){if(this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found){let i=r.concat(o),a=new Y({definition:i});this.possibleTokTypes=ar(a),this.found=!0}}},Zr=class extends Et{static{n(this,"AbstractNextTerminalAfterProductionWalker")}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}},Qo=class extends Zr{static{n(this,"NextTerminalAfterManyWalker")}walkMany(t,r,o){if(t.idx===this.occurrence){let i=ue(r.concat(o));this.result.isEndOfRule=i===void 0,i instanceof M&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkMany(t,r,o)}},Gn=class extends Zr{static{n(this,"NextTerminalAfterManySepWalker")}walkManySep(t,r,o){if(t.idx===this.occurrence){let i=ue(r.concat(o));this.result.isEndOfRule=i===void 0,i instanceof M&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkManySep(t,r,o)}},$o=class extends Zr{static{n(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,r,o){if(t.idx===this.occurrence){let i=ue(r.concat(o));this.result.isEndOfRule=i===void 0,i instanceof M&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOne(t,r,o)}},jn=class extends Zr{static{n(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,r,o){if(t.idx===this.occurrence){let i=ue(r.concat(o));this.result.isEndOfRule=i===void 0,i instanceof M&&(this.result.token=i.terminalType,this.result.occurrence=i.idx)}else super.walkAtLeastOneSep(t,r,o)}};function ei(e,t,r=[]){r=W(r);let o=[],i=0;function a(l){return l.concat(te(e,i+1))}n(a,"remainingPathWith");function s(l){let f=ei(a(l),t,r);return o.concat(f)}for(n(s,"getAlternativesForProd");r.length<t&&i<e.length;){let l=e[i];if(l instanceof Y)return s(l.definition);if(l instanceof P)return s(l.definition);if(l instanceof k)o=s(l.definition);else if(l instanceof H){let f=l.definition.concat([new _({definition:l.definition})]);return s(f)}else if(l instanceof z){let f=[new Y({definition:l.definition}),new _({definition:[new M({terminalType:l.separator})].concat(l.definition)})];return s(f)}else if(l instanceof F){let f=l.definition.concat([new _({definition:[new M({terminalType:l.separator})].concat(l.definition)})]);o=s(f)}else if(l instanceof _){let f=l.definition.concat([new _({definition:l.definition})]);o=s(f)}else{if(l instanceof G)return U(l.definition,f=>{b(f.definition)===!1&&(o=s(f.definition))}),o;if(l instanceof M)r.push(l.terminalType);else throw Error("non exhaustive match")}i++}return o.push({partialPath:r,suffixDef:te(e,i)}),o}n(ei,"possiblePathsFrom");function ti(e,t,r,o){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",l=!1,f=t.length,c=f-o-1,u=[],p=[];for(p.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!b(p);){let m=p.pop();if(m===s){l&&at(p).idx<=c&&p.pop();continue}let d=m.def,T=m.idx,E=m.ruleStack,R=m.occurrenceStack;if(b(d))continue;let S=d[0];if(S===i){let g={idx:T,def:te(d),ruleStack:ht(E),occurrenceStack:ht(R)};p.push(g)}else if(S instanceof M)if(T<f-1){let g=T+1,h=t[g];if(r(h,S.terminalType)){let N={idx:g,def:te(d),ruleStack:E,occurrenceStack:R};p.push(N)}}else if(T===f-1)u.push({nextTokenType:S.terminalType,nextTokenOccurrence:S.idx,ruleStack:E,occurrenceStack:R}),l=!0;else throw Error("non exhaustive match");else if(S instanceof P){let g=W(E);g.push(S.nonTerminalName);let h=W(R);h.push(S.idx);let N={idx:T,def:S.definition.concat(a,te(d)),ruleStack:g,occurrenceStack:h};p.push(N)}else if(S instanceof k){let g={idx:T,def:te(d),ruleStack:E,occurrenceStack:R};p.push(g),p.push(s);let h={idx:T,def:S.definition.concat(te(d)),ruleStack:E,occurrenceStack:R};p.push(h)}else if(S instanceof H){let g=new _({definition:S.definition,idx:S.idx}),h=S.definition.concat([g],te(d)),N={idx:T,def:h,ruleStack:E,occurrenceStack:R};p.push(N)}else if(S instanceof z){let g=new M({terminalType:S.separator}),h=new _({definition:[g].concat(S.definition),idx:S.idx}),N=S.definition.concat([h],te(d)),C={idx:T,def:N,ruleStack:E,occurrenceStack:R};p.push(C)}else if(S instanceof F){let g={idx:T,def:te(d),ruleStack:E,occurrenceStack:R};p.push(g),p.push(s);let h=new M({terminalType:S.separator}),N=new _({definition:[h].concat(S.definition),idx:S.idx}),C=S.definition.concat([N],te(d)),_e={idx:T,def:C,ruleStack:E,occurrenceStack:R};p.push(_e)}else if(S instanceof _){let g={idx:T,def:te(d),ruleStack:E,occurrenceStack:R};p.push(g),p.push(s);let h=new _({definition:S.definition,idx:S.idx}),N=S.definition.concat([h],te(d)),C={idx:T,def:N,ruleStack:E,occurrenceStack:R};p.push(C)}else if(S instanceof G)for(let g=S.definition.length-1;g>=0;g--){let h=S.definition[g],N={idx:T,def:h.definition.concat(te(d)),ruleStack:E,occurrenceStack:R};p.push(N),p.push(s)}else if(S instanceof Y)p.push({idx:T,def:S.definition.concat(te(d)),ruleStack:E,occurrenceStack:R});else if(S instanceof Ae)p.push(tU(S,T,E,R));else throw Error("non exhaustive match")}return u}n(ti,"nextPossibleTokensAfter");function tU(e,t,r,o){let i=W(r);i.push(e.name);let a=W(o);return a.push(1),{idx:t,def:e.definition,ruleStack:i,occurrenceStack:a}}n(tU,"expandTopLevelRule");var J;(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"})(J||(J={}));function Kn(e){if(e instanceof k||e==="Option")return J.OPTION;if(e instanceof _||e==="Repetition")return J.REPETITION;if(e instanceof H||e==="RepetitionMandatory")return J.REPETITION_MANDATORY;if(e instanceof z||e==="RepetitionMandatoryWithSeparator")return J.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof F||e==="RepetitionWithSeparator")return J.REPETITION_WITH_SEPARATOR;if(e instanceof G||e==="Alternation")return J.ALTERNATION;throw Error("non exhaustive match")}n(Kn,"getProdType");function ni(e){let{occurrence:t,rule:r,prodType:o,maxLookahead:i}=e,a=Kn(o);return a===J.ALTERNATION?Jr(t,r,i):Qr(t,r,a,i)}n(ni,"getLookaheadPaths");function wc(e,t,r,o,i,a){let s=Jr(e,t,r),l=Wc(s)?Xr:St;return a(s,o,l,i)}n(wc,"buildLookaheadFuncForOr");function Dc(e,t,r,o,i,a){let s=Qr(e,t,i,r),l=Wc(s)?Xr:St;return a(s[0],l,o)}n(Dc,"buildLookaheadFuncForOptionalProd");function Fc(e,t,r,o){let i=e.length,a=Se(e,s=>Se(s,l=>l.length===1));if(t)return function(s){let l=L(s,f=>f.GATE);for(let f=0;f<i;f++){let c=e[f],u=c.length,p=l[f];if(!(p!==void 0&&p.call(this)===!1))e:for(let m=0;m<u;m++){let d=c[m],T=d.length;for(let E=0;E<T;E++){let R=this.LA(E+1);if(r(R,d[E])===!1)continue e}return f}}};if(a&&!o){let s=L(e,f=>se(f)),l=ie(s,(f,c,u)=>(U(c,p=>{A(f,p.tokenTypeIdx)||(f[p.tokenTypeIdx]=u),U(p.categoryMatches,m=>{A(f,m)||(f[m]=u)})}),f),{});return function(){let f=this.LA(1);return l[f.tokenTypeIdx]}}else return function(){for(let s=0;s<i;s++){let l=e[s],f=l.length;e:for(let c=0;c<f;c++){let u=l[c],p=u.length;for(let m=0;m<p;m++){let d=this.LA(m+1);if(r(d,u[m])===!1)continue e}return s}}}}n(Fc,"buildAlternativesLookAheadFunc");function Gc(e,t,r){let o=Se(e,a=>a.length===1),i=e.length;if(o&&!r){let a=se(e);if(a.length===1&&b(a[0].categoryMatches)){let l=a[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===l}}else{let s=ie(a,(l,f,c)=>(l[f.tokenTypeIdx]=!0,U(f.categoryMatches,u=>{l[u]=!0}),l),[]);return function(){let l=this.LA(1);return s[l.tokenTypeIdx]===!0}}}else return function(){e:for(let a=0;a<i;a++){let s=e[a],l=s.length;for(let f=0;f<l;f++){let c=this.LA(f+1);if(t(c,s[f])===!1)continue e}return!0}return!1}}n(Gc,"buildSingleAlternativeLookaheadFunction");var ya=class extends Et{static{n(this,"RestDefinitionFinderWalker")}constructor(t,r,o){super(),this.topProd=t,this.targetOccurrence=r,this.targetProdType=o}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,r,o,i){return t.idx===this.targetOccurrence&&this.targetProdType===r?(this.restDef=o.concat(i),!0):!1}walkOption(t,r,o){this.checkIsTarget(t,J.OPTION,r,o)||super.walkOption(t,r,o)}walkAtLeastOne(t,r,o){this.checkIsTarget(t,J.REPETITION_MANDATORY,r,o)||super.walkOption(t,r,o)}walkAtLeastOneSep(t,r,o){this.checkIsTarget(t,J.REPETITION_MANDATORY_WITH_SEPARATOR,r,o)||super.walkOption(t,r,o)}walkMany(t,r,o){this.checkIsTarget(t,J.REPETITION,r,o)||super.walkOption(t,r,o)}walkManySep(t,r,o){this.checkIsTarget(t,J.REPETITION_WITH_SEPARATOR,r,o)||super.walkOption(t,r,o)}},ri=class extends Oe{static{n(this,"InsideDefinitionFinderVisitor")}constructor(t,r,o){super(),this.targetOccurrence=t,this.targetProdType=r,this.targetRef=o,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,J.OPTION)}visitRepetition(t){this.checkIsTarget(t,J.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,J.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,J.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,J.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,J.ALTERNATION)}};function Bc(e){let t=new Array(e);for(let r=0;r<e;r++)t[r]=[];return t}n(Bc,"initializeArrayOfArrays");function Oa(e){let t=[""];for(let r=0;r<e.length;r++){let o=e[r],i=[];for(let a=0;a<t.length;a++){let s=t[a];i.push(s+"_"+o.tokenTypeIdx);for(let l=0;l<o.categoryMatches.length;l++){let f="_"+o.categoryMatches[l];i.push(s+f)}}t=i}return t}n(Oa,"pathToHashKeys");function rU(e,t,r){for(let o=0;o<e.length;o++){if(o===r)continue;let i=e[o];for(let a=0;a<t.length;a++){let s=t[a];if(i[s]===!0)return!1}}return!0}n(rU,"isUniquePrefixHash");function jc(e,t){let r=L(e,s=>ei([s],1)),o=Bc(r.length),i=L(r,s=>{let l={};return U(s,f=>{let c=Oa(f.partialPath);U(c,u=>{l[u]=!0})}),l}),a=r;for(let s=1;s<=t;s++){let l=a;a=Bc(l.length);for(let f=0;f<l.length;f++){let c=l[f];for(let u=0;u<c.length;u++){let p=c[u].partialPath,m=c[u].suffixDef,d=Oa(p);if(rU(i,d,f)||b(m)||p.length===t){let E=o[f];if(oi(E,p)===!1){E.push(p);for(let R=0;R<d.length;R++){let S=d[R];i[f][S]=!0}}}else{let E=ei(m,s+1,p);a[f]=a[f].concat(E),U(E,R=>{let S=Oa(R.partialPath);U(S,g=>{i[f][g]=!0})})}}}}return o}n(jc,"lookAheadSequenceFromAlternatives");function Jr(e,t,r,o){let i=new ri(e,J.ALTERNATION,o);return t.accept(i),jc(i.result,r)}n(Jr,"getLookaheadPathsForOr");function Qr(e,t,r,o){let i=new ri(e,r);t.accept(i);let a=i.result,l=new ya(t,e,r).startWalking(),f=new Y({definition:a}),c=new Y({definition:l});return jc([f,c],o)}n(Qr,"getLookaheadPathsForOptionalProd");function oi(e,t){e:for(let r=0;r<e.length;r++){let o=e[r];if(o.length===t.length){for(let i=0;i<o.length;i++){let a=t[i],s=o[i];if((a===s||s.categoryMatchesMap[a.tokenTypeIdx]!==void 0)===!1)continue e}return!0}}return!1}n(oi,"containsPath");function Kc(e,t){return e.length<t.length&&Se(e,(r,o)=>{let i=t[o];return r===i||i.categoryMatchesMap[r.tokenTypeIdx]})}n(Kc,"isStrictPrefixOfPath");function Wc(e){return Se(e,t=>Se(t,r=>Se(r,o=>b(o.categoryMatches))))}n(Wc,"areTokenCategoriesNotUsed");function Yc(e){let t=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName});return L(t,r=>Object.assign({type:fe.CUSTOM_LOOKAHEAD_VALIDATION},r))}n(Yc,"validateLookahead");function Hc(e,t,r,o){let i=Ue(e,f=>nU(f,r)),a=fU(e,t,r),s=Ue(e,f=>aU(f,r)),l=Ue(e,f=>iU(f,e,o,r));return i.concat(a,s,l)}n(Hc,"validateGrammar");function nU(e,t){let r=new Na;e.accept(r);let o=r.allProductions,i=fa(o,oU),a=Me(i,l=>l.length>1);return L(D(a),l=>{let f=ue(l),c=t.buildDuplicateFoundError(e,l),u=be(f),p={message:c,type:fe.DUPLICATE_PRODUCTIONS,ruleName:e.name,dslName:u,occurrence:f.idx},m=zc(f);return m&&(p.parameter=m),p})}n(nU,"validateDuplicateProductions");function oU(e){return`${be(e)}_#_${e.idx}_#_${zc(e)}`}n(oU,"identifyProductionForDuplicates");function zc(e){return e instanceof M?e.terminalType.name:e instanceof P?e.nonTerminalName:""}n(zc,"getExtraProductionArgument");var Na=class extends Oe{static{n(this,"OccurrenceValidationCollector")}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 iU(e,t,r,o){let i=[];if(ie(t,(s,l)=>l.name===e.name?s+1:s,0)>1){let s=o.buildDuplicateRuleNameError({topLevelRule:e,grammarName:r});i.push({message:s,type:fe.DUPLICATE_RULE_NAME,ruleName:e.name})}return i}n(iU,"validateRuleDoesNotAlreadyExist");function qc(e,t,r){let o=[],i;return X(t,e)||(i=`Invalid rule override, rule: ->${e}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,o.push({message:i,type:fe.INVALID_RULE_OVERRIDE,ruleName:e})),o}n(qc,"validateRuleIsOverridden");function Ia(e,t,r,o=[]){let i=[],a=ii(t.definition);if(b(a))return[];{let s=e.name;X(a,e)&&i.push({message:r.buildLeftRecursionError({topLevelRule:e,leftRecursionPath:o}),type:fe.LEFT_RECURSION,ruleName:s});let f=Gt(a,o.concat([e])),c=Ue(f,u=>{let p=W(o);return p.push(u),Ia(e,u,r,p)});return i.concat(c)}}n(Ia,"validateNoLeftRecursion");function ii(e){let t=[];if(b(e))return t;let r=ue(e);if(r instanceof P)t.push(r.referencedRule);else if(r instanceof Y||r instanceof k||r instanceof H||r instanceof z||r instanceof F||r instanceof _)t=t.concat(ii(r.definition));else if(r instanceof G)t=se(L(r.definition,a=>ii(a.definition)));else if(!(r instanceof M))throw Error("non exhaustive match");let o=ir(r),i=e.length>1;if(o&&i){let a=te(e);return t.concat(ii(a))}else return t}n(ii,"getFirstNoneTerminal");var Wn=class extends Oe{static{n(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}};function Vc(e,t){let r=new Wn;e.accept(r);let o=r.alternations;return Ue(o,a=>{let s=ht(a.definition);return Ue(s,(l,f)=>{let c=ti([l],[],St,1);return b(c)?[{message:t.buildEmptyAlternationError({topLevelRule:e,alternation:a,emptyChoiceIdx:f}),type:fe.NONE_LAST_EMPTY_ALT,ruleName:e.name,occurrence:a.idx,alternative:f+1}]:[]})})}n(Vc,"validateEmptyOrAlternative");function Xc(e,t,r){let o=new Wn;e.accept(o);let i=o.alternations;return i=jt(i,s=>s.ignoreAmbiguities===!0),Ue(i,s=>{let l=s.idx,f=s.maxLookahead||t,c=Jr(l,e,f,s),u=sU(c,s,e,r),p=lU(c,s,e,r);return u.concat(p)})}n(Xc,"validateAmbiguousAlternationAlternatives");var Ca=class extends Oe{static{n(this,"RepetitionCollector")}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 aU(e,t){let r=new Wn;e.accept(r);let o=r.alternations;return Ue(o,a=>a.definition.length>255?[{message:t.buildTooManyAlternativesError({topLevelRule:e,alternation:a}),type:fe.TOO_MANY_ALTS,ruleName:e.name,occurrence:a.idx}]:[])}n(aU,"validateTooManyAlts");function Zc(e,t,r){let o=[];return U(e,i=>{let a=new Ca;i.accept(a);let s=a.allProductions;U(s,l=>{let f=Kn(l),c=l.maxLookahead||t,u=l.idx,m=Qr(u,i,f,c)[0];if(b(se(m))){let d=r.buildEmptyRepetitionError({topLevelRule:i,repetition:l});o.push({message:d,type:fe.NO_NON_EMPTY_LOOKAHEAD,ruleName:i.name})}})}),o}n(Zc,"validateSomeNonEmptyLookaheadPath");function sU(e,t,r,o){let i=[],a=ie(e,(l,f,c)=>(t.definition[c].ignoreAmbiguities===!0||U(f,u=>{let p=[c];U(e,(m,d)=>{c!==d&&oi(m,u)&&t.definition[d].ignoreAmbiguities!==!0&&p.push(d)}),p.length>1&&!oi(i,u)&&(i.push(u),l.push({alts:p,path:u}))}),l),[]);return L(a,l=>{let f=L(l.alts,u=>u+1);return{message:o.buildAlternationAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:f,prefixPath:l.path}),type:fe.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:t.idx,alternatives:l.alts}})}n(sU,"checkAlternativesAmbiguities");function lU(e,t,r,o){let i=ie(e,(s,l,f)=>{let c=L(l,u=>({idx:f,path:u}));return s.concat(c)},[]);return it(Ue(i,s=>{if(t.definition[s.idx].ignoreAmbiguities===!0)return[];let f=s.idx,c=s.path,u=Te(i,m=>t.definition[m.idx].ignoreAmbiguities!==!0&&m.idx<f&&Kc(m.path,c));return L(u,m=>{let d=[m.idx+1,f+1],T=t.idx===0?"":t.idx;return{message:o.buildAlternationPrefixAmbiguityError({topLevelRule:r,alternation:t,ambiguityIndices:d,prefixPath:m.path}),type:fe.AMBIGUOUS_PREFIX_ALTS,ruleName:r.name,occurrence:T,alternatives:d}})}))}n(lU,"checkPrefixAlternativesAmbiguities");function fU(e,t,r){let o=[],i=L(t,a=>a.name);return U(e,a=>{let s=a.name;if(X(i,s)){let l=r.buildNamespaceConflictError(a);o.push({message:l,type:fe.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:s})}}),o}n(fU,"checkTerminalAndNoneTerminalsNameSpace");function Jc(e){let t=jr(e,{errMsgProvider:Pc}),r={};return U(e.rules,o=>{r[o.name]=o}),kc(r,t.errMsgProvider)}n(Jc,"resolveGrammar");function Qc(e){return e=jr(e,{errMsgProvider:Ve}),Hc(e.rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}n(Qc,"validateGrammar");var $c="MismatchedTokenException",eu="NoViableAltException",tu="EarlyExitException",ru="NotAllInputParsedException",nu=[$c,eu,tu,ru];Object.freeze(nu);function ft(e){return X(nu,e.name)}n(ft,"isRecognitionException");var $r=class extends Error{static{n(this,"RecognitionException")}constructor(t,r){super(t),this.token=r,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},ur=class extends $r{static{n(this,"MismatchedTokenException")}constructor(t,r,o){super(t,r),this.previousToken=o,this.name=$c}},Yn=class extends $r{static{n(this,"NoViableAltException")}constructor(t,r,o){super(t,r),this.previousToken=o,this.name=eu}},Hn=class extends $r{static{n(this,"NotAllInputParsedException")}constructor(t,r){super(t,r),this.name=ru}},zn=class extends $r{static{n(this,"EarlyExitException")}constructor(t,r,o){super(t,r),this.previousToken=o,this.name=tu}};var Ma={},_a="InRuleRecoveryException",ba=class extends Error{static{n(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=_a}},ai=class{static{n(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=A(t,"recoveryEnabled")?t.recoveryEnabled:ye.recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=cU)}getTokenToInsert(t){let r=cr(t,"",NaN,NaN,NaN,NaN,NaN,NaN);return r.isInsertedInRecovery=!0,r}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,r,o,i){let a=this.findReSyncTokenType(),s=this.exportLexerState(),l=[],f=!1,c=this.LA(1),u=this.LA(1),p=n(()=>{let m=this.LA(0),d=this.errorMessageProvider.buildMismatchTokenMessage({expected:i,actual:c,previous:m,ruleName:this.getCurrRuleFullName()}),T=new ur(d,c,this.LA(0));T.resyncedTokens=ht(l),this.SAVE_ERROR(T)},"generateErrorMessage");for(;!f;)if(this.tokenMatcher(u,i)){p();return}else if(o.call(this)){p(),t.apply(this,r);return}else this.tokenMatcher(u,a)?f=!0:(u=this.SKIP_TOKEN(),this.addToResyncTokens(u,l));this.importLexerState(s)}shouldInRepetitionRecoveryBeTried(t,r,o){return!(o===!1||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,r)))}getFollowsForInRuleRecovery(t,r){let o=this.getCurrentGrammarPath(t,r);return this.getNextPossibleTokenTypes(o)}tryInRuleRecovery(t,r){if(this.canRecoverWithSingleTokenInsertion(t,r))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t)){let o=this.SKIP_TOKEN();return this.consumeToken(),o}throw new ba("sad sad panda")}canPerformInRuleRecovery(t,r){return this.canRecoverWithSingleTokenInsertion(t,r)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,r){if(!this.canTokenTypeBeInsertedInRecovery(t)||b(r))return!1;let o=this.LA(1);return st(r,a=>this.tokenMatcher(o,a))!==void 0}canRecoverWithSingleTokenDeletion(t){return this.canTokenTypeBeDeletedInRecovery(t)?this.tokenMatcher(this.LA(2),t):!1}isInCurrentRuleReSyncSet(t){let r=this.getCurrFollowKey(),o=this.getFollowSetFromFollowKey(r);return X(o,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),r=this.LA(1),o=2;for(;;){let i=st(t,a=>I(r,a));if(i!==void 0)return i;r=this.LA(o),o++}}getCurrFollowKey(){if(this.RULE_STACK.length===1)return Ma;let t=this.getLastExplicitRuleShortName(),r=this.getLastExplicitRuleOccurrenceIndex(),o=this.getPreviousExplicitRuleShortName();return{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:r,inRule:this.shortRuleNameToFullName(o)}}buildFullFollowKeyStack(){let t=this.RULE_STACK,r=this.RULE_OCCURRENCE_STACK;return L(t,(o,i)=>i===0?Ma:{ruleName:this.shortRuleNameToFullName(o),idxInCallingRule:r[i],inRule:this.shortRuleNameToFullName(t[i-1])})}flattenFollowSet(){let t=L(this.buildFullFollowKeyStack(),r=>this.getFollowSetFromFollowKey(r));return se(t)}getFollowSetFromFollowKey(t){if(t===Ma)return[ke];let r=t.ruleName+t.idxInCallingRule+Ko+t.inRule;return this.resyncFollows[r]}addToResyncTokens(t,r){return this.tokenMatcher(t,ke)||r.push(t),r}reSyncTo(t){let r=[],o=this.LA(1);for(;this.tokenMatcher(o,t)===!1;)o=this.SKIP_TOKEN(),this.addToResyncTokens(o,r);return ht(r)}attemptInRepetitionRecovery(t,r,o,i,a,s,l){}getCurrentGrammarPath(t,r){let o=this.getHumanReadableRuleStack(),i=W(this.RULE_OCCURRENCE_STACK);return{ruleStack:o,occurrenceStack:i,lastTok:t,lastTokOccurrence:r}}getHumanReadableRuleStack(){return L(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}};function cU(e,t,r,o,i,a,s){let l=this.getKeyForAutomaticLookahead(o,i),f=this.firstAfterRepMap[l];if(f===void 0){let m=this.getCurrRuleFullName(),d=this.getGAstProductions()[m];f=new a(d,i).startWalking(),this.firstAfterRepMap[l]=f}let c=f.token,u=f.occurrence,p=f.isEndOfRule;this.RULE_STACK.length===1&&p&&c===void 0&&(c=ke,u=1),!(c===void 0||u===void 0)&&this.shouldInRepetitionRecoveryBeTried(c,u,s)&&this.tryInRepetitionRecovery(e,t,r,c)}n(cU,"attemptInRepetitionRecovery");function si(e,t,r){return r|t|e}n(si,"getKeyForAutomaticLookahead");var pr=class{static{n(this,"LLkLookaheadStrategy")}constructor(t){var r;this.maxLookahead=(r=t?.maxLookahead)!==null&&r!==void 0?r:ye.maxLookahead}validate(t){let r=this.validateNoLeftRecursion(t.rules);if(b(r)){let o=this.validateEmptyOrAlternatives(t.rules),i=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),a=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead);return[...r,...o,...i,...a]}return r}validateNoLeftRecursion(t){return Ue(t,r=>Ia(r,r,Ve))}validateEmptyOrAlternatives(t){return Ue(t,r=>Vc(r,Ve))}validateAmbiguousAlternationAlternatives(t,r){return Ue(t,o=>Xc(o,r,Ve))}validateSomeNonEmptyLookaheadPath(t,r){return Zc(t,r,Ve)}buildLookaheadForAlternation(t){return wc(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,Fc)}buildLookaheadForOptional(t){return Dc(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,Kn(t.prodType),Gc)}};var fi=class{static{n(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=A(t,"dynamicTokensEnabled")?t.dynamicTokensEnabled:ye.dynamicTokensEnabled,this.maxLookahead=A(t,"maxLookahead")?t.maxLookahead:ye.maxLookahead,this.lookaheadStrategy=A(t,"lookaheadStrategy")?t.lookaheadStrategy:new pr({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){U(t,r=>{this.TRACE_INIT(`${r.name} Rule Lookahead`,()=>{let{alternation:o,repetition:i,option:a,repetitionMandatory:s,repetitionMandatoryWithSeparator:l,repetitionWithSeparator:f}=uU(r);U(o,c=>{let u=c.idx===0?"":c.idx;this.TRACE_INIT(`${be(c)}${u}`,()=>{let p=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:c.idx,rule:r,maxLookahead:c.maxLookahead||this.maxLookahead,hasPredicates:c.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),m=si(this.fullRuleNameToShort[r.name],256,c.idx);this.setLaFuncCache(m,p)})}),U(i,c=>{this.computeLookaheadFunc(r,c.idx,768,"Repetition",c.maxLookahead,be(c))}),U(a,c=>{this.computeLookaheadFunc(r,c.idx,512,"Option",c.maxLookahead,be(c))}),U(s,c=>{this.computeLookaheadFunc(r,c.idx,1024,"RepetitionMandatory",c.maxLookahead,be(c))}),U(l,c=>{this.computeLookaheadFunc(r,c.idx,1536,"RepetitionMandatoryWithSeparator",c.maxLookahead,be(c))}),U(f,c=>{this.computeLookaheadFunc(r,c.idx,1280,"RepetitionWithSeparator",c.maxLookahead,be(c))})})})}computeLookaheadFunc(t,r,o,i,a,s){this.TRACE_INIT(`${s}${r===0?"":r}`,()=>{let l=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:r,rule:t,maxLookahead:a||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:i}),f=si(this.fullRuleNameToShort[t.name],o,r);this.setLaFuncCache(f,l)})}getKeyForAutomaticLookahead(t,r){let o=this.getLastExplicitRuleShortName();return si(o,t,r)}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,r){this.lookAheadFuncsCache.set(t,r)}},va=class extends Oe{static{n(this,"DslMethodsCollectorVisitor")}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)}},li=new va;function uU(e){li.reset(),e.accept(li);let t=li.dslMethods;return li.reset(),t}n(uU,"collectMethods");function Ba(e,t){isNaN(e.startOffset)===!0?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset<t.endOffset&&(e.endOffset=t.endOffset)}n(Ba,"setNodeLocationOnlyOffset");function wa(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)}n(wa,"setNodeLocationFull");function ou(e,t,r){e.children[r]===void 0?e.children[r]=[t]:e.children[r].push(t)}n(ou,"addTerminalToCst");function iu(e,t,r){e.children[t]===void 0?e.children[t]=[r]:e.children[t].push(r)}n(iu,"addNoneTerminalToCst");var pU="name";function Da(e,t){Object.defineProperty(e,pU,{enumerable:!1,configurable:!0,writable:!1,value:t})}n(Da,"defineNameProp");function mU(e,t){let r=j(e),o=r.length;for(let i=0;i<o;i++){let a=r[i],s=e[a],l=s.length;for(let f=0;f<l;f++){let c=s[f];c.tokenTypeIdx===void 0&&this[c.name](c.children,t)}}}n(mU,"defaultVisit");function au(e,t){let r=n(function(){},"derivedConstructor");Da(r,e+"BaseSemantics");let o={visit:n(function(i,a){if(O(i)&&(i=i[0]),!ge(i))return this[i.name](i.children,a)},"visit"),validateVisitor:n(function(){let i=dU(this,t);if(!b(i)){let a=L(i,s=>s.msg);throw Error(`Errors Detected in CST Visitor <${this.constructor.name}>:
94
+ ${a.join(`
95
+
96
+ `).replace(/\n/g,`
97
+ `)}`)}},"validateVisitor")};return r.prototype=o,r.prototype.constructor=r,r._RULE_NAMES=t,r}n(au,"createBaseSemanticVisitorConstructor");function su(e,t,r){let o=n(function(){},"derivedConstructor");Da(o,e+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return U(t,a=>{i[a]=mU}),o.prototype=i,o.prototype.constructor=o,o}n(su,"createBaseVisitorConstructorWithDefaults");var Fa;(function(e){e[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD"})(Fa||(Fa={}));function dU(e,t){return hU(e,t)}n(dU,"validateVisitor");function hU(e,t){let r=Te(t,i=>Le(e[i])===!1),o=L(r,i=>({msg:`Missing visitor method: <${i}> on ${e.constructor.name} CST Visitor.`,type:Fa.MISSING_METHOD,methodName:i}));return it(o)}n(hU,"validateMissingCstMethods");var mi=class{static{n(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=A(t,"nodeLocationTracking")?t.nodeLocationTracking:ye.nodeLocationTracking,!this.outputCst)this.cstInvocationStateUpdate=$,this.cstFinallyStateUpdate=$,this.cstPostTerminal=$,this.cstPostNonTerminal=$,this.cstPostRule=$;else if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=wa,this.setNodeLocationFromNode=wa,this.cstPostRule=$,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=$,this.setNodeLocationFromNode=$,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Ba,this.setNodeLocationFromNode=Ba,this.cstPostRule=$,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=$,this.setNodeLocationFromNode=$,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else if(/none/i.test(this.nodeLocationTracking))this.setNodeLocationFromToken=$,this.setNodeLocationFromNode=$,this.cstPostRule=$,this.setInitialNodeLocation=$;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),o=t.location;o.startOffset<=r.startOffset?(o.endOffset=r.endOffset,o.endLine=r.endLine,o.endColumn=r.endColumn):(o.startOffset=NaN,o.startLine=NaN,o.startColumn=NaN)}cstPostRuleOnlyOffset(t){let r=this.LA(0),o=t.location;o.startOffset<=r.startOffset?o.endOffset=r.endOffset:o.startOffset=NaN}cstPostTerminal(t,r){let o=this.CST_STACK[this.CST_STACK.length-1];ou(o,r,t),this.setNodeLocationFromToken(o.location,r)}cstPostNonTerminal(t,r){let o=this.CST_STACK[this.CST_STACK.length-1];iu(o,r,t),this.setNodeLocationFromNode(o.location,t.location)}getBaseCstVisitorConstructor(){if(ge(this.baseCstVisitorConstructor)){let t=au(this.className,j(this.gastProductionsCache));return this.baseCstVisitorConstructor=t,t}return this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){if(ge(this.baseCstVisitorWithDefaultsConstructor)){let t=su(this.className,j(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 di=class{static{n(this,"LexerAdapter")}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)):en}LA(t){let r=this.currIdx+t;return r<0||this.tokVectorLength<=r?en: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 hi=class{static{n(this,"RecognizerApi")}ACTION(t){return t.call(this)}consume(t,r,o){return this.consumeInternal(r,t,o)}subrule(t,r,o){return this.subruleInternal(r,t,o)}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,o=tn){if(X(this.definedRulesNames,t)){let s={message:Ve.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:fe.DUPLICATE_RULE_NAME,ruleName:t};this.definitionErrors.push(s)}this.definedRulesNames.push(t);let i=this.defineRule(t,r,o);return this[t]=i,i}OVERRIDE_RULE(t,r,o=tn){let i=qc(t,this.definedRulesNames,this.className);this.definitionErrors=this.definitionErrors.concat(i);let a=this.defineRule(t,r,o);return this[t]=a,a}BACKTRACK(t,r){return function(){this.isBackTrackingStack.push(1);let o=this.saveRecogState();try{return t.apply(this,r),!0}catch(i){if(ft(i))return!1;throw i}finally{this.reloadRecogState(o),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return jo(D(this.gastProductionsCache))}};var Ei=class{static{n(this,"RecognizerEngine")}initRecognizerEngine(t,r){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Xr,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},A(r,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a <serializedGrammar> property.
98
+ See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_6-0-0
99
+ For Further details.`);if(O(t)){if(b(t))throw Error(`A Token Vocabulary cannot be empty.
100
+ Note that the first argument for the parser constructor
101
+ 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.
102
+ See: https://chevrotain.io/docs/changes/BREAKING_CHANGES.html#_4-0-0
103
+ For Further details.`)}if(O(t))this.tokensMap=ie(t,(a,s)=>(a[s.name]=s,a),{});else if(A(t,"modes")&&Se(se(D(t.modes)),Oc)){let a=se(D(t.modes)),s=Kr(a);this.tokensMap=ie(s,(l,f)=>(l[f.name]=f,l),{})}else if(Q(t))this.tokensMap=W(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=ke;let o=A(t,"modes")?se(D(t.modes)):D(t),i=Se(o,a=>b(a.categoryMatches));this.tokenMatcher=i?Xr:St,Tt(D(this.tokensMap))}defineRule(t,r,o){if(this.selfAnalysisDone)throw Error(`Grammar rule <${t}> may not be defined after the 'performSelfAnalysis' method has been called'
104
+ Make sure that all grammar rule definitions are done before 'performSelfAnalysis' is called.`);let i=A(o,"resyncEnabled")?o.resyncEnabled:tn.resyncEnabled,a=A(o,"recoveryValueFunc")?o.recoveryValueFunc:tn.recoveryValueFunc,s=this.ruleShortNameIdx<<12;this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=t,this.fullRuleNameToShort[t]=s;let l;return this.outputCst===!0?l=n(function(...u){try{this.ruleInvocationStateUpdate(s,t,this.subruleIdx),r.apply(this,u);let p=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(p),p}catch(p){return this.invokeRuleCatch(p,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):l=n(function(...u){try{return this.ruleInvocationStateUpdate(s,t,this.subruleIdx),r.apply(this,u)}catch(p){return this.invokeRuleCatch(p,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(l,{ruleName:t,originalGrammarAction:r})}invokeRuleCatch(t,r,o){let i=this.RULE_STACK.length===1,a=r&&!this.isBackTracking()&&this.recoveryEnabled;if(ft(t)){let s=t;if(a){let l=this.findReSyncTokenType();if(this.isInCurrentRuleReSyncSet(l))if(s.resyncedTokens=this.reSyncTo(l),this.outputCst){let f=this.CST_STACK[this.CST_STACK.length-1];return f.recoveredNode=!0,f}else return o(t);else{if(this.outputCst){let f=this.CST_STACK[this.CST_STACK.length-1];f.recoveredNode=!0,s.partialCstResult=f}throw s}}else{if(i)return this.moveToTerminatedState(),o(t);throw s}}else throw t}optionInternal(t,r){let o=this.getKeyForAutomaticLookahead(512,r);return this.optionInternalLogic(t,r,o)}optionInternalLogic(t,r,o){let i=this.getLaFuncFromCache(o),a;if(typeof t!="function"){a=t.DEF;let s=t.GATE;if(s!==void 0){let l=i;i=n(()=>s.call(this)&&l.call(this),"lookAheadFunc")}}else a=t;if(i.call(this)===!0)return a.call(this)}atLeastOneInternal(t,r){let o=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,r,o)}atLeastOneInternalLogic(t,r,o){let i=this.getLaFuncFromCache(o),a;if(typeof r!="function"){a=r.DEF;let s=r.GATE;if(s!==void 0){let l=i;i=n(()=>s.call(this)&&l.call(this),"lookAheadFunc")}}else a=r;if(i.call(this)===!0){let s=this.doSingleRepetition(a);for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a)}else throw this.raiseEarlyExitException(t,J.REPETITION_MANDATORY,r.ERR_MSG);this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],i,1024,t,$o)}atLeastOneSepFirstInternal(t,r){let o=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,r,o)}atLeastOneSepFirstInternalLogic(t,r,o){let i=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(o).call(this)===!0){i.call(this);let l=n(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,a,l,i,jn],l,1536,t,jn)}else throw this.raiseEarlyExitException(t,J.REPETITION_MANDATORY_WITH_SEPARATOR,r.ERR_MSG)}manyInternal(t,r){let o=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,r,o)}manyInternalLogic(t,r,o){let i=this.getLaFuncFromCache(o),a;if(typeof r!="function"){a=r.DEF;let l=r.GATE;if(l!==void 0){let f=i;i=n(()=>l.call(this)&&f.call(this),"lookaheadFunction")}}else a=r;let s=!0;for(;i.call(this)===!0&&s===!0;)s=this.doSingleRepetition(a);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],i,768,t,Qo,s)}manySepFirstInternal(t,r){let o=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,r,o)}manySepFirstInternalLogic(t,r,o){let i=r.DEF,a=r.SEP;if(this.getLaFuncFromCache(o).call(this)===!0){i.call(this);let l=n(()=>this.tokenMatcher(this.LA(1),a),"separatorLookAheadFunc");for(;this.tokenMatcher(this.LA(1),a)===!0;)this.CONSUME(a),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,a,l,i,Gn],l,1280,t,Gn)}}repetitionSepSecondInternal(t,r,o,i,a){for(;o();)this.CONSUME(r),i.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,r,o,i,a],o,1536,t,a)}doSingleRepetition(t){let r=this.getLexerPosition();return t.call(this),this.getLexerPosition()>r}orInternal(t,r){let o=this.getKeyForAutomaticLookahead(256,r),i=O(t)?t:t.DEF,s=this.getLaFuncFromCache(o).call(this,i);if(s!==void 0)return i[s].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 Hn(r,t))}}subruleInternal(t,r,o){let i;try{let a=o!==void 0?o.ARGS:void 0;return this.subruleIdx=r,i=t.apply(this,a),this.cstPostNonTerminal(i,o!==void 0&&o.LABEL!==void 0?o.LABEL:t.ruleName),i}catch(a){throw this.subruleInternalError(a,o,t.ruleName)}}subruleInternalError(t,r,o){throw ft(t)&&t.partialCstResult!==void 0&&(this.cstPostNonTerminal(t.partialCstResult,r!==void 0&&r.LABEL!==void 0?r.LABEL:o),delete t.partialCstResult),t}consumeInternal(t,r,o){let i;try{let a=this.LA(1);this.tokenMatcher(a,t)===!0?(this.consumeToken(),i=a):this.consumeInternalError(t,a,o)}catch(a){i=this.consumeInternalRecovery(t,r,a)}return this.cstPostTerminal(o!==void 0&&o.LABEL!==void 0?o.LABEL:t.name,i),i}consumeInternalError(t,r,o){let i,a=this.LA(0);throw o!==void 0&&o.ERR_MSG?i=o.ERR_MSG:i=this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:r,previous:a,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new ur(i,r,a))}consumeInternalRecovery(t,r,o){if(this.recoveryEnabled&&o.name==="MismatchedTokenException"&&!this.isBackTracking()){let i=this.getFollowsForInRuleRecovery(t,r);try{return this.tryInRuleRecovery(t,i)}catch(a){throw a.name===_a?o:a}}else throw o}saveRecogState(){let t=this.errors,r=W(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,o){this.RULE_OCCURRENCE_STACK.push(o),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),ke)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}};var Si=class{static{n(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=A(t,"errorMessageProvider")?t.errorMessageProvider:ye.errorMessageProvider}SAVE_ERROR(t){if(ft(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:W(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return W(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,r,o){let i=this.getCurrRuleFullName(),a=this.getGAstProductions()[i],l=Qr(t,a,r,this.maxLookahead)[0],f=[];for(let u=1;u<=this.maxLookahead;u++)f.push(this.LA(u));let c=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:l,actual:f,previous:this.LA(0),customUserDescription:o,ruleName:i});throw this.SAVE_ERROR(new zn(c,this.LA(1),this.LA(0)))}raiseNoAltException(t,r){let o=this.getCurrRuleFullName(),i=this.getGAstProductions()[o],a=Jr(t,i,this.maxLookahead),s=[];for(let c=1;c<=this.maxLookahead;c++)s.push(this.LA(c));let l=this.LA(0),f=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:a,actual:s,previous:l,customUserDescription:r,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new Yn(f,this.LA(1),l))}};var Ti=class{static{n(this,"ContentAssist")}initContentAssist(){}computeContentAssist(t,r){let o=this.gastProductionsCache[t];if(ge(o))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return ti([o],r,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){let r=ue(t.ruleStack),i=this.getGAstProductions()[r];return new Jo(i,t).startWalking()}};var Ri={description:"This Object indicates the Parser is during Recording Phase"};Object.freeze(Ri);var lu=!0,fu=Math.pow(2,8)-1,uu=fr({name:"RECORDING_PHASE_TOKEN",pattern:B.NA});Tt([uu]);var pu=cr(uu,`This IToken indicates the Parser is in Recording Phase
105
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,-1,-1,-1,-1,-1,-1);Object.freeze(pu);var SU={name:`This CSTNode indicates the Parser is in Recording Phase
106
+ See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},gi=class{static{n(this,"GastRecorder")}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(o,i){return this.consumeInternalRecord(o,t,i)},this[`SUBRULE${r}`]=function(o,i){return this.subruleInternalRecord(o,t,i)},this[`OPTION${r}`]=function(o){return this.optionInternalRecord(o,t)},this[`OR${r}`]=function(o){return this.orInternalRecord(o,t)},this[`MANY${r}`]=function(o){this.manyInternalRecord(t,o)},this[`MANY_SEP${r}`]=function(o){this.manySepFirstInternalRecord(t,o)},this[`AT_LEAST_ONE${r}`]=function(o){this.atLeastOneInternalRecord(t,o)},this[`AT_LEAST_ONE_SEP${r}`]=function(o){this.atLeastOneSepFirstInternalRecord(t,o)}}this.consume=function(t,r,o){return this.consumeInternalRecord(r,t,o)},this.subrule=function(t,r,o){return this.subruleInternalRecord(r,t,o)},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 o=r>0?r:"";delete t[`CONSUME${o}`],delete t[`SUBRULE${o}`],delete t[`OPTION${o}`],delete t[`OR${o}`],delete t[`MANY${o}`],delete t[`MANY_SEP${o}`],delete t[`AT_LEAST_ONE${o}`],delete t[`AT_LEAST_ONE_SEP${o}`]}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 en}topLevelRuleRecord(t,r){try{let o=new Ae({definition:[],name:t});return o.name=t,this.recordingProdStack.push(o),r.call(this),this.recordingProdStack.pop(),o}catch(o){if(o.KNOWN_RECORDER_ERROR!==!0)try{o.message=o.message+`
107
+ This error was thrown during the "grammar recording phase" For more info see:
108
+ https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{throw o}throw o}}optionInternalRecord(t,r){return Vn.call(this,k,t,r)}atLeastOneInternalRecord(t,r){Vn.call(this,H,r,t)}atLeastOneSepFirstInternalRecord(t,r){Vn.call(this,z,r,t,lu)}manyInternalRecord(t,r){Vn.call(this,_,r,t)}manySepFirstInternalRecord(t,r){Vn.call(this,F,r,t,lu)}orInternalRecord(t,r){return TU.call(this,t,r)}subruleInternalRecord(t,r,o){if(xi(r),!t||A(t,"ruleName")===!1){let l=new Error(`<SUBRULE${cu(r)}> argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}>
109
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw l.KNOWN_RECORDER_ERROR=!0,l}let i=at(this.recordingProdStack),a=t.ruleName,s=new P({idx:r,nonTerminalName:a,label:o?.LABEL,referencedRule:void 0});return i.definition.push(s),this.outputCst?SU:Ri}consumeInternalRecord(t,r,o){if(xi(r),!xa(t)){let s=new Error(`<CONSUME${cu(r)}> argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}>
110
+ inside top level rule: <${this.recordingProdStack[0].name}>`);throw s.KNOWN_RECORDER_ERROR=!0,s}let i=at(this.recordingProdStack),a=new M({idx:r,terminalType:t,label:o?.LABEL});return i.definition.push(a),pu}};function Vn(e,t,r,o=!1){xi(r);let i=at(this.recordingProdStack),a=Le(t)?t:t.DEF,s=new e({definition:[],idx:r});return o&&(s.separator=t.SEP),A(t,"MAX_LOOKAHEAD")&&(s.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(s),a.call(this),i.definition.push(s),this.recordingProdStack.pop(),Ri}n(Vn,"recordProd");function TU(e,t){xi(t);let r=at(this.recordingProdStack),o=O(e)===!1,i=o===!1?e:e.DEF,a=new G({definition:[],idx:t,ignoreAmbiguities:o&&e.IGNORE_AMBIGUITIES===!0});A(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD);let s=Mn(i,l=>Le(l.GATE));return a.hasPredicates=s,r.definition.push(a),U(i,l=>{let f=new Y({definition:[]});a.definition.push(f),A(l,"IGNORE_AMBIGUITIES")?f.ignoreAmbiguities=l.IGNORE_AMBIGUITIES:A(l,"GATE")&&(f.ignoreAmbiguities=!0),this.recordingProdStack.push(f),l.ALT.call(this),this.recordingProdStack.pop()}),Ri}n(TU,"recordOrProd");function cu(e){return e===0?"":`${e}`}n(cu,"getIdxSuffix");function xi(e){if(e<0||e>fu){let t=new Error(`Invalid DSL Method idx value: <${e}>
111
+ Idx value must be a none negative value smaller than ${fu+1}`);throw t.KNOWN_RECORDER_ERROR=!0,t}}n(xi,"assertMethodIdxIsValid");var Li=class{static{n(this,"PerformanceTracer")}initPerformanceTracer(t){if(A(t,"traceInitPerf")){let r=t.traceInitPerf,o=typeof r=="number";this.traceInitMaxIdent=o?r:1/0,this.traceInitPerf=o?r>0:r}else this.traceInitMaxIdent=0,this.traceInitPerf=ye.traceInitPerf;this.traceInitIndent=-1}TRACE_INIT(t,r){if(this.traceInitPerf===!0){this.traceInitIndent++;let o=new Array(this.traceInitIndent+1).join(" ");this.traceInitIndent<this.traceInitMaxIdent&&console.log(`${o}--> <${t}>`);let{time:i,value:a}=_n(r),s=i>10?console.warn:console.log;return this.traceInitIndent<this.traceInitMaxIdent&&s(`${o}<-- <${t}> time: ${i}ms`),this.traceInitIndent--,a}else return r()}};function mu(e,t){t.forEach(r=>{let o=r.prototype;Object.getOwnPropertyNames(o).forEach(i=>{if(i==="constructor")return;let a=Object.getOwnPropertyDescriptor(o,i);a&&(a.get||a.set)?Object.defineProperty(e.prototype,i,a):e.prototype[i]=r.prototype[i]})})}n(mu,"applyMixins");var en=cr(ke,"",NaN,NaN,NaN,NaN,NaN,NaN);Object.freeze(en);var ye=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:Zo,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),tn=Object.freeze({recoveryValueFunc:n(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),fe;(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"})(fe||(fe={}));var Xn=class e{static{n(this,"Parser")}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",()=>{vn(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),U(this.definedRulesNames,i=>{let s=this[i].originalGrammarAction,l;this.TRACE_INIT(`${i} Rule`,()=>{l=this.topLevelRuleRecord(i,s)}),this.gastProductionsCache[i]=l})}finally{this.disableRecording()}});let o=[];if(this.TRACE_INIT("Grammar Resolving",()=>{o=Jc({rules:D(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(o)}),this.TRACE_INIT("Grammar Validations",()=>{if(b(o)&&this.skipValidations===!1){let i=Qc({rules:D(this.gastProductionsCache),tokenTypes:D(this.tokensMap),errMsgProvider:Ve,grammarName:r}),a=Yc({lookaheadStrategy:this.lookaheadStrategy,rules:D(this.gastProductionsCache),tokenTypes:D(this.tokensMap),grammarName:r});this.definitionErrors=this.definitionErrors.concat(i,a)}}),b(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{let i=ic(D(this.gastProductionsCache));this.resyncFollows=i}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var i,a;(a=(i=this.lookaheadStrategy).initialize)===null||a===void 0||a.call(i,{rules:D(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(D(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!b(this.definitionErrors))throw t=L(this.definitionErrors,i=>i.message),new Error(`Parser Definition Errors detected:
112
+ ${t.join(`
113
+ -------------------------------
114
+ `)}`)})}constructor(t,r){this.definitionErrors=[],this.selfAnalysisDone=!1;let o=this;if(o.initErrorHandler(r),o.initLexerAdapter(),o.initLooksAhead(r),o.initRecognizerEngine(t,r),o.initRecoverable(r),o.initTreeBuilder(r),o.initContentAssist(),o.initGastRecorder(r),o.initPerformanceTracer(r),A(r,"ignoredIssues"))throw new Error(`The <ignoredIssues> IParserConfig property has been deprecated.
115
+ Please use the <IGNORE_AMBIGUITIES> flag on the relevant DSL method instead.
116
+ See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#IGNORING_AMBIGUITIES
117
+ For further details.`);this.skipValidations=A(r,"skipValidations")?r.skipValidations:ye.skipValidations}};Xn.DEFER_DEFINITION_ERRORS_HANDLING=!1;mu(Xn,[ai,fi,mi,di,Ei,hi,Si,Ti,gi,Li]);var Zn=class extends Xn{static{n(this,"CstParser")}constructor(t,r=ye){let o=W(r);o.outputCst=!0,super(t,o)}};var Jp=Dh(Xp(),1);var Ya=n((e,t)=>{for(let r=0;r<t.length;r++){let o=t[r],i=o[0],a=o[1];for(let s=i;s<=a;s++)e.add(s)}},"addRanges"),$n=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]),DA=[[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]];Ya($n,DA);var Ha=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]),FA=[[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]];Ya(Ha,FA);var GA=[[0,8],[14,27],[127,159],[768,879],[6832,6911],[7616,7679],[8400,8447],[65056,65071],[48,57]];Ya(Ha,GA);var Zp=new Set((function*(){yield*$n,yield*Ha})());var za={};function Qp(e){let t=e;return Object.keys(za).forEach(r=>{let o=za[r],i=new RegExp(`{{${r}}}`,"g");t=t.replace(i,o)}),t}n(Qp,"inlineFragments");function xe(e,t){za[e]=Qp(t)}n(xe,"FRAGMENT");function Be(e,t){let r=Qp(e);return new RegExp(r,t)}n(Be,"MAKE_PATTERN");xe("Digits","[0-9]([0-9_]*[0-9])?");xe("ExponentPart","[eE][+-]?{{Digits}}");xe("HexDigit","[0-9a-fA-F]");xe("HexDigits","{{HexDigit}}(({{HexDigit}}|'_')*{{HexDigit}})?");xe("FloatTypeSuffix","[fFdD]");xe("LineTerminator","(\\x0A|(\\x0D(\\x0A)?))");xe("UnicodeMarker","uu*");xe("UnicodeEscape","\\\\{{UnicodeMarker}}{{HexDigit}}{4}");xe("RawInputCharacter","\\\\{{UnicodeMarker}}[0-9a-fA-F]{4}");xe("UnicodeInputCharacter","({{UnicodeEscape}}|{{RawInputCharacter}})");xe("OctalDigit","[0-7]");xe("ZeroToThree","[0-3]");xe("OctalEscape","\\\\({{OctalDigit}}|{{ZeroToThree}}?{{OctalDigit}}{2})");xe("EscapeSequence",`\\\\[bstnfr"'\\\\]|{{OctalEscape}}`);xe("StringCharacter",'(?:(?:{{EscapeSequence}})|{{UnicodeEscape}}|(?!["\\\\]).)');xe("TextBlockCharacter","(?:(?:{{EscapeSequence}})|{{UnicodeEscape}}|(?!\\\\).|\\\\?{{LineTerminator}})");function KA(e,t){let r=t,o=e.codePointAt(r);for($n.has(o)&&(r++,o>65535&&r++,o=e.codePointAt(r));Zp.has(o);)r++,o>65535&&r++,o=e.codePointAt(r);return r===t?null:[e.substring(t,r)]}n(KA,"matchJavaIdentifier");var mr=fr({name:"Identifier",pattern:{exec:KA},line_breaks:!1,start_chars_hint:Array.from($n,e=>String.fromCharCode(e))}),xt={modes:{global:[],stringTemplate:[],textBlockTemplate:[]},defaultMode:"global"},$p=Object.keys(xt.modes),we={};function x(e,t=$p){e.label||(typeof e.pattern=="string"?e.label=`'${e.pattern}'`:e.pattern instanceof RegExp&&(e.label=`'${e.name}'`));let r=fr(e);return t.forEach(o=>xt.modes[o].push(r)),we[e.name]=r,r}n(x,"createToken");function Rt(e){return e.longer_alt=mr,x(e)}n(Rt,"createKeywordLikeToken");var WA=x({name:"RestrictedKeyword",pattern:B.NA}),em=x({name:"Keyword",pattern:B.NA}),We=x({name:"AssignmentOperator",pattern:B.NA}),pe=x({name:"BinaryOperator",pattern:B.NA}),nn=x({name:"UnaryPrefixOperator",pattern:B.NA}),Ai=x({name:"UnaryPrefixOperatorNotPlusMinus",pattern:B.NA}),tm=x({name:"UnarySuffixOperator",pattern:B.NA}),Ye=x({name:"Separators",pattern:B.NA});x({name:"WhiteSpace",pattern:Be("[\\x09\\x20\\x0C]|{{LineTerminator}}"),group:B.SKIPPED});x({name:"LineComment",pattern:/\/\/[^\n\r]*/,group:"comments"});x({name:"TraditionalComment",pattern:/\/\*([^*]|\*(?!\/))*\*\//,group:"comments"});x({name:"BinaryLiteral",pattern:/0[bB][01]([01_]*[01])?[lL]?/});x({name:"FloatLiteral",pattern:Be("{{Digits}}\\.({{Digits}})?({{ExponentPart}})?({{FloatTypeSuffix}})?|\\.{{Digits}}({{ExponentPart}})?({{FloatTypeSuffix}})?|{{Digits}}{{ExponentPart}}({{FloatTypeSuffix}})?|{{Digits}}({{ExponentPart}})?{{FloatTypeSuffix}}")});x({name:"OctalLiteral",pattern:/0_*[0-7]([0-7_]*[0-7])?[lL]?/});x({name:"HexFloatLiteral",pattern:Be("0[xX]({{HexDigits}}\\.?|({{HexDigits}})?\\.{{HexDigits}})[pP][+-]?{{Digits}}[fFdD]?")});x({name:"HexLiteral",pattern:/0[xX][0-9a-fA-F]([0-9a-fA-F_]*[0-9a-fA-F])?[lL]?/});x({name:"DecimalLiteral",pattern:Be("(0|[1-9](_+{{Digits}}|({{Digits}})?))[lL]?")});x({name:"CharLiteral",pattern:Be("'(?:[^\\\\']|(?:(?:{{EscapeSequence}})|{{UnicodeInputCharacter}}))'")});x({name:"TextBlock",pattern:Be('"""[\\x09\\x20\\x0C]*{{LineTerminator}}{{TextBlockCharacter}}*?"""')});x({name:"TextBlockTemplateBegin",pattern:Be('"""{{LineTerminator}}{{TextBlockCharacter}}*?\\\\\\{'),push_mode:"textBlockTemplate"});x({name:"TextBlockTemplateEnd",pattern:Be('\\}{{TextBlockCharacter}}*?"""'),pop_mode:!0},["textBlockTemplate"]);x({name:"StringLiteral",pattern:Be('"{{StringCharacter}}*?"')});x({name:"StringTemplateBegin",pattern:Be('"{{StringCharacter}}*?\\\\\\{'),push_mode:"stringTemplate"});x({name:"StringTemplateEnd",pattern:Be('\\}{{StringCharacter}}*?"'),pop_mode:!0},["stringTemplate"]);x({name:"StringTemplateMid",pattern:Be("\\}{{StringCharacter}}*?\\\\\\{")},["stringTemplate"]);x({name:"TextBlockTemplateMid",pattern:Be("\\}{{TextBlockCharacter}}*?\\\\\\{")},["textBlockTemplate"]);var YA=["open","module","requires","transitive","exports","opens","to","uses","provides","when","with","sealed","non-sealed","permits"];rm(YA).forEach(e=>{Rt({name:e[0].toUpperCase()+(0,Jp.default)(e.substr(1)),pattern:e,categories:[mr,WA]})});var HA=["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"]];rm(HA).forEach(e=>{let t=Array.isArray(e),r=t?e[1]:e,o=t?e[0]:e,i={name:r[0].toUpperCase()+r.substr(1),pattern:o,categories:em};t&&(i.label=`'${r}'`),Rt(i)});Rt({name:"Instanceof",pattern:"instanceof",categories:[em,pe]});Rt({name:"Var",pattern:"var",categories:mr});Rt({name:"Yield",pattern:"yield",categories:mr});Rt({name:"Record",pattern:"record",categories:mr});Rt({name:"True",pattern:"true"});Rt({name:"False",pattern:"false"});Rt({name:"Null",pattern:"null"});x({name:"At",pattern:"@",categories:[Ye]});x({name:"Arrow",pattern:"->"});x({name:"DotDotDot",pattern:"...",categories:[Ye]});x({name:"Dot",pattern:".",categories:[Ye]});x({name:"Comma",pattern:",",categories:[Ye]});x({name:"Semicolon",pattern:";",categories:[Ye]});x({name:"ColonColon",pattern:"::",categories:[Ye]});x({name:"Colon",pattern:":"});x({name:"QuestionMark",pattern:"?"});x({name:"LBrace",pattern:"(",categories:[Ye]});x({name:"RBrace",pattern:")",categories:[Ye]});x({name:"LCurly",pattern:"{",categories:[Ye],push_mode:xt.defaultMode});x({name:"RCurly",pattern:"}",categories:[Ye],pop_mode:!0},[xt.defaultMode]);x({name:"LSquare",pattern:"[",categories:[Ye]});x({name:"RSquare",pattern:"]",categories:[Ye]});x({name:"MinusMinus",pattern:"--",categories:[nn,tm,Ai]});x({name:"PlusPlus",pattern:"++",categories:[nn,tm,Ai]});x({name:"Complement",pattern:"~",categories:[nn,Ai]});x({name:"LessEquals",pattern:"<=",categories:[pe]});x({name:"LessLessEquals",pattern:"<<=",categories:[We]});x({name:"Less",pattern:"<",categories:[pe]});x({name:"GreaterEquals",pattern:">=",categories:[pe]});x({name:"GreaterGreaterEquals",pattern:">>=",categories:[We]});x({name:"GreaterGreaterGreaterEquals",pattern:">>>=",categories:[We]});x({name:"Greater",pattern:">",categories:[pe]});x({name:"EqualsEquals",pattern:"==",categories:[pe]});x({name:"Equals",pattern:"=",categories:[pe,We]});x({name:"MinusEquals",pattern:"-=",categories:[We]});x({name:"Minus",pattern:"-",categories:[pe,nn]});x({name:"PlusEquals",pattern:"+=",categories:[We]});x({name:"Plus",pattern:"+",categories:[pe,nn]});x({name:"AndAnd",pattern:"&&",categories:[pe]});x({name:"AndEquals",pattern:"&=",categories:[We]});x({name:"And",pattern:"&",categories:[pe]});x({name:"XorEquals",pattern:"^=",categories:[We]});x({name:"Xor",pattern:"^",categories:[pe]});x({name:"NotEquals",pattern:"!=",categories:[pe]});x({name:"OrOr",pattern:"||",categories:[pe]});x({name:"OrEquals",pattern:"|=",categories:[We]});x({name:"Or",pattern:"|",categories:[pe]});x({name:"MultiplyEquals",pattern:"*=",categories:[We]});x({name:"Star",pattern:"*",categories:[pe]});x({name:"DivideEquals",pattern:"/=",categories:[We]});x({name:"Divide",pattern:"/",categories:[pe]});x({name:"ModuloEquals",pattern:"%=",categories:[We]});x({name:"Modulo",pattern:"%",categories:[pe]});x({name:"Not",pattern:"!",categories:[nn,Ai]});$p.forEach(e=>xt.modes[e].push(mr));we.Identifier=mr;function rm(e){return e.sort((t,r)=>r.length-t.length)}n(rm,"sortDescLength");function eo(){return(typeof process<"u"&&process.env&&process.env["prettier-java-development-mode"]==="enabled")===!1}n(eo,"getSkipValidations");var nm=new B(xt,{ensureOptimizations:!0,skipValidations:eo()});function zA(e,t){for(var r=-1,o=e==null?0:e.length,i=Array(o);++r<o;)i[r]=t(e[r],r,e);return i}n(zA,"arrayMap");var Oi=zA;function qA(){this.__data__=[],this.size=0}n(qA,"listCacheClear");var om=qA;function VA(e,t){return e===t||e!==e&&t!==t}n(VA,"eq");var yi=VA;function XA(e,t){for(var r=e.length;r--;)if(yi(e[r][0],t))return r;return-1}n(XA,"assocIndexOf");var Wt=XA;var ZA=Array.prototype,JA=ZA.splice;function QA(e){var t=this.__data__,r=Wt(t,e);if(r<0)return!1;var o=t.length-1;return r==o?t.pop():JA.call(t,r,1),--this.size,!0}n(QA,"listCacheDelete");var im=QA;function $A(e){var t=this.__data__,r=Wt(t,e);return r<0?void 0:t[r][1]}n($A,"listCacheGet");var am=$A;function eO(e){return Wt(this.__data__,e)>-1}n(eO,"listCacheHas");var sm=eO;function tO(e,t){var r=this.__data__,o=Wt(r,e);return o<0?(++this.size,r.push([e,t])):r[o][1]=t,this}n(tO,"listCacheSet");var lm=tO;function on(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}n(on,"ListCache");on.prototype.clear=om;on.prototype.delete=im;on.prototype.get=am;on.prototype.has=sm;on.prototype.set=lm;var Yt=on;function rO(){this.__data__=new Yt,this.size=0}n(rO,"stackClear");var fm=rO;function nO(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r}n(nO,"stackDelete");var cm=nO;function oO(e){return this.__data__.get(e)}n(oO,"stackGet");var um=oO;function iO(e){return this.__data__.has(e)}n(iO,"stackHas");var pm=iO;var aO=typeof global=="object"&&global&&global.Object===Object&&global,Ni=aO;var sO=typeof self=="object"&&self&&self.Object===Object&&self,lO=Ni||sO||Function("return this")(),me=lO;var fO=me.Symbol,Ne=fO;var mm=Object.prototype,cO=mm.hasOwnProperty,uO=mm.toString,to=Ne?Ne.toStringTag:void 0;function pO(e){var t=cO.call(e,to),r=e[to];try{e[to]=void 0;var o=!0}catch{}var i=uO.call(e);return o&&(t?e[to]=r:delete e[to]),i}n(pO,"getRawTag");var dm=pO;var mO=Object.prototype,dO=mO.toString;function hO(e){return dO.call(e)}n(hO,"objectToString");var hm=hO;var EO="[object Null]",SO="[object Undefined]",Em=Ne?Ne.toStringTag:void 0;function TO(e){return e==null?e===void 0?SO:EO:Em&&Em in Object(e)?dm(e):hm(e)}n(TO,"baseGetTag");var Xe=TO;function gO(e){var t=typeof e;return e!=null&&(t=="object"||t=="function")}n(gO,"isObject");var an=gO;var xO="[object AsyncFunction]",RO="[object Function]",LO="[object GeneratorFunction]",UO="[object Proxy]";function AO(e){if(!an(e))return!1;var t=Xe(e);return t==RO||t==LO||t==xO||t==UO}n(AO,"isFunction");var Ci=AO;var OO=me["__core-js_shared__"],Ii=OO;var Sm=(function(){var e=/[^.]+$/.exec(Ii&&Ii.keys&&Ii.keys.IE_PROTO||"");return e?"Symbol(src)_1."+e:""})();function yO(e){return!!Sm&&Sm in e}n(yO,"isMasked");var Tm=yO;var NO=Function.prototype,CO=NO.toString;function IO(e){if(e!=null){try{return CO.call(e)}catch{}try{return e+""}catch{}}return""}n(IO,"toSource");var Lt=IO;var MO=/[\\^$.*+?()[\]{}|]/g,bO=/^\[object .+?Constructor\]$/,_O=Function.prototype,vO=Object.prototype,PO=_O.toString,kO=vO.hasOwnProperty,BO=RegExp("^"+PO.call(kO).replace(MO,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function wO(e){if(!an(e)||Tm(e))return!1;var t=Ci(e)?BO:bO;return t.test(Lt(e))}n(wO,"baseIsNative");var gm=wO;function DO(e,t){return e?.[t]}n(DO,"getValue");var xm=DO;function FO(e,t){var r=xm(e,t);return gm(r)?r:void 0}n(FO,"getNative");var He=FO;var GO=He(me,"Map"),Ht=GO;var jO=He(Object,"create"),Ut=jO;function KO(){this.__data__=Ut?Ut(null):{},this.size=0}n(KO,"hashClear");var Rm=KO;function WO(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}n(WO,"hashDelete");var Lm=WO;var YO="__lodash_hash_undefined__",HO=Object.prototype,zO=HO.hasOwnProperty;function qO(e){var t=this.__data__;if(Ut){var r=t[e];return r===YO?void 0:r}return zO.call(t,e)?t[e]:void 0}n(qO,"hashGet");var Um=qO;var VO=Object.prototype,XO=VO.hasOwnProperty;function ZO(e){var t=this.__data__;return Ut?t[e]!==void 0:XO.call(t,e)}n(ZO,"hashHas");var Am=ZO;var JO="__lodash_hash_undefined__";function QO(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=Ut&&t===void 0?JO:t,this}n(QO,"hashSet");var Om=QO;function sn(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}n(sn,"Hash");sn.prototype.clear=Rm;sn.prototype.delete=Lm;sn.prototype.get=Um;sn.prototype.has=Am;sn.prototype.set=Om;var qa=sn;function $O(){this.size=0,this.__data__={hash:new qa,map:new(Ht||Yt),string:new qa}}n($O,"mapCacheClear");var ym=$O;function e0(e){var t=typeof e;return t=="string"||t=="number"||t=="symbol"||t=="boolean"?e!=="__proto__":e===null}n(e0,"isKeyable");var Nm=e0;function t0(e,t){var r=e.__data__;return Nm(t)?r[typeof t=="string"?"string":"hash"]:r.map}n(t0,"getMapData");var zt=t0;function r0(e){var t=zt(this,e).delete(e);return this.size-=t?1:0,t}n(r0,"mapCacheDelete");var Cm=r0;function n0(e){return zt(this,e).get(e)}n(n0,"mapCacheGet");var Im=n0;function o0(e){return zt(this,e).has(e)}n(o0,"mapCacheHas");var Mm=o0;function i0(e,t){var r=zt(this,e),o=r.size;return r.set(e,t),this.size+=r.size==o?0:1,this}n(i0,"mapCacheSet");var bm=i0;function ln(e){var t=-1,r=e==null?0:e.length;for(this.clear();++t<r;){var o=e[t];this.set(o[0],o[1])}}n(ln,"MapCache");ln.prototype.clear=ym;ln.prototype.delete=Cm;ln.prototype.get=Im;ln.prototype.has=Mm;ln.prototype.set=bm;var dr=ln;var a0=200;function s0(e,t){var r=this.__data__;if(r instanceof Yt){var o=r.__data__;if(!Ht||o.length<a0-1)return o.push([e,t]),this.size=++r.size,this;r=this.__data__=new dr(o)}return r.set(e,t),this.size=r.size,this}n(s0,"stackSet");var _m=s0;function fn(e){var t=this.__data__=new Yt(e);this.size=t.size}n(fn,"Stack");fn.prototype.clear=fm;fn.prototype.delete=cm;fn.prototype.get=um;fn.prototype.has=pm;fn.prototype.set=_m;var cn=fn;var l0="__lodash_hash_undefined__";function f0(e){return this.__data__.set(e,l0),this}n(f0,"setCacheAdd");var vm=f0;function c0(e){return this.__data__.has(e)}n(c0,"setCacheHas");var Pm=c0;function Mi(e){var t=-1,r=e==null?0:e.length;for(this.__data__=new dr;++t<r;)this.add(e[t])}n(Mi,"SetCache");Mi.prototype.add=Mi.prototype.push=vm;Mi.prototype.has=Pm;var bi=Mi;function u0(e,t){for(var r=-1,o=e==null?0:e.length;++r<o;)if(t(e[r],r,e))return!0;return!1}n(u0,"arraySome");var km=u0;function p0(e,t){return e.has(t)}n(p0,"cacheHas");var _i=p0;var m0=1,d0=2;function h0(e,t,r,o,i,a){var s=r&m0,l=e.length,f=t.length;if(l!=f&&!(s&&f>l))return!1;var c=a.get(e),u=a.get(t);if(c&&u)return c==t&&u==e;var p=-1,m=!0,d=r&d0?new bi:void 0;for(a.set(e,t),a.set(t,e);++p<l;){var T=e[p],E=t[p];if(o)var R=s?o(E,T,p,t,e,a):o(T,E,p,e,t,a);if(R!==void 0){if(R)continue;m=!1;break}if(d){if(!km(t,function(S,g){if(!_i(d,g)&&(T===S||i(T,S,r,o,a)))return d.push(g)})){m=!1;break}}else if(!(T===E||i(T,E,r,o,a))){m=!1;break}}return a.delete(e),a.delete(t),m}n(h0,"equalArrays");var vi=h0;var E0=me.Uint8Array,Va=E0;function S0(e){var t=-1,r=Array(e.size);return e.forEach(function(o,i){r[++t]=[i,o]}),r}n(S0,"mapToArray");var Bm=S0;function T0(e){var t=-1,r=Array(e.size);return e.forEach(function(o){r[++t]=o}),r}n(T0,"setToArray");var un=T0;var g0=1,x0=2,R0="[object Boolean]",L0="[object Date]",U0="[object Error]",A0="[object Map]",O0="[object Number]",y0="[object RegExp]",N0="[object Set]",C0="[object String]",I0="[object Symbol]",M0="[object ArrayBuffer]",b0="[object DataView]",wm=Ne?Ne.prototype:void 0,Xa=wm?wm.valueOf:void 0;function _0(e,t,r,o,i,a,s){switch(r){case b0:if(e.byteLength!=t.byteLength||e.byteOffset!=t.byteOffset)return!1;e=e.buffer,t=t.buffer;case M0:return!(e.byteLength!=t.byteLength||!a(new Va(e),new Va(t)));case R0:case L0:case O0:return yi(+e,+t);case U0:return e.name==t.name&&e.message==t.message;case y0:case C0:return e==t+"";case A0:var l=Bm;case N0:var f=o&g0;if(l||(l=un),e.size!=t.size&&!f)return!1;var c=s.get(e);if(c)return c==t;o|=x0,s.set(e,t);var u=vi(l(e),l(t),o,i,a,s);return s.delete(e),u;case I0:if(Xa)return Xa.call(e)==Xa.call(t)}return!1}n(_0,"equalByTag");var Dm=_0;function v0(e,t){for(var r=-1,o=t.length,i=e.length;++r<o;)e[i+r]=t[r];return e}n(v0,"arrayPush");var Pi=v0;var P0=Array.isArray,w=P0;function k0(e,t,r){var o=t(e);return w(e)?o:Pi(o,r(e))}n(k0,"baseGetAllKeys");var Fm=k0;function B0(e,t){for(var r=-1,o=e==null?0:e.length,i=0,a=[];++r<o;){var s=e[r];t(s,r,e)&&(a[i++]=s)}return a}n(B0,"arrayFilter");var ki=B0;function w0(){return[]}n(w0,"stubArray");var Gm=w0;var D0=Object.prototype,F0=D0.propertyIsEnumerable,jm=Object.getOwnPropertySymbols,G0=jm?function(e){return e==null?[]:(e=Object(e),ki(jm(e),function(t){return F0.call(e,t)}))}:Gm,Km=G0;function j0(e,t){for(var r=-1,o=Array(e);++r<e;)o[r]=t(r);return o}n(j0,"baseTimes");var Wm=j0;function K0(e){return e!=null&&typeof e=="object"}n(K0,"isObjectLike");var Ze=K0;var W0="[object Arguments]";function Y0(e){return Ze(e)&&Xe(e)==W0}n(Y0,"baseIsArguments");var Za=Y0;var Ym=Object.prototype,H0=Ym.hasOwnProperty,z0=Ym.propertyIsEnumerable,q0=Za((function(){return arguments})())?Za:function(e){return Ze(e)&&H0.call(e,"callee")&&!z0.call(e,"callee")},qt=q0;function V0(){return!1}n(V0,"stubFalse");var Hm=V0;var Vm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,zm=Vm&&typeof module=="object"&&module&&!module.nodeType&&module,X0=zm&&zm.exports===Vm,qm=X0?me.Buffer:void 0,Z0=qm?qm.isBuffer:void 0,J0=Z0||Hm,hr=J0;var Q0=9007199254740991,$0=/^(?:0|[1-9]\d*)$/;function ey(e,t){var r=typeof e;return t=t??Q0,!!t&&(r=="number"||r!="symbol"&&$0.test(e))&&e>-1&&e%1==0&&e<t}n(ey,"isIndex");var Bi=ey;var ty=9007199254740991;function ry(e){return typeof e=="number"&&e>-1&&e%1==0&&e<=ty}n(ry,"isLength");var pn=ry;var ny="[object Arguments]",oy="[object Array]",iy="[object Boolean]",ay="[object Date]",sy="[object Error]",ly="[object Function]",fy="[object Map]",cy="[object Number]",uy="[object Object]",py="[object RegExp]",my="[object Set]",dy="[object String]",hy="[object WeakMap]",Ey="[object ArrayBuffer]",Sy="[object DataView]",Ty="[object Float32Array]",gy="[object Float64Array]",xy="[object Int8Array]",Ry="[object Int16Array]",Ly="[object Int32Array]",Uy="[object Uint8Array]",Ay="[object Uint8ClampedArray]",Oy="[object Uint16Array]",yy="[object Uint32Array]",V={};V[Ty]=V[gy]=V[xy]=V[Ry]=V[Ly]=V[Uy]=V[Ay]=V[Oy]=V[yy]=!0;V[ny]=V[oy]=V[Ey]=V[iy]=V[Sy]=V[ay]=V[sy]=V[ly]=V[fy]=V[cy]=V[uy]=V[py]=V[my]=V[dy]=V[hy]=!1;function Ny(e){return Ze(e)&&pn(e.length)&&!!V[Xe(e)]}n(Ny,"baseIsTypedArray");var Xm=Ny;function Cy(e){return function(t){return e(t)}}n(Cy,"baseUnary");var Zm=Cy;var Jm=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ro=Jm&&typeof module=="object"&&module&&!module.nodeType&&module,Iy=ro&&ro.exports===Jm,Ja=Iy&&Ni.process,My=(function(){try{var e=ro&&ro.require&&ro.require("util").types;return e||Ja&&Ja.binding&&Ja.binding("util")}catch{}})(),Qa=My;var Qm=Qa&&Qa.isTypedArray,by=Qm?Zm(Qm):Xm,mn=by;var _y=Object.prototype,vy=_y.hasOwnProperty;function Py(e,t){var r=w(e),o=!r&&qt(e),i=!r&&!o&&hr(e),a=!r&&!o&&!i&&mn(e),s=r||o||i||a,l=s?Wm(e.length,String):[],f=l.length;for(var c in e)(t||vy.call(e,c))&&!(s&&(c=="length"||i&&(c=="offset"||c=="parent")||a&&(c=="buffer"||c=="byteLength"||c=="byteOffset")||Bi(c,f)))&&l.push(c);return l}n(Py,"arrayLikeKeys");var $m=Py;var ky=Object.prototype;function By(e){var t=e&&e.constructor,r=typeof t=="function"&&t.prototype||ky;return e===r}n(By,"isPrototype");var wi=By;function wy(e,t){return function(r){return e(t(r))}}n(wy,"overArg");var ed=wy;var Dy=ed(Object.keys,Object),td=Dy;var Fy=Object.prototype,Gy=Fy.hasOwnProperty;function jy(e){if(!wi(e))return td(e);var t=[];for(var r in Object(e))Gy.call(e,r)&&r!="constructor"&&t.push(r);return t}n(jy,"baseKeys");var Di=jy;function Ky(e){return e!=null&&pn(e.length)&&!Ci(e)}n(Ky,"isArrayLike");var Vt=Ky;function Wy(e){return Vt(e)?$m(e):Di(e)}n(Wy,"keys");var dn=Wy;function Yy(e){return Fm(e,dn,Km)}n(Yy,"getAllKeys");var $a=Yy;var Hy=1,zy=Object.prototype,qy=zy.hasOwnProperty;function Vy(e,t,r,o,i,a){var s=r&Hy,l=$a(e),f=l.length,c=$a(t),u=c.length;if(f!=u&&!s)return!1;for(var p=f;p--;){var m=l[p];if(!(s?m in t:qy.call(t,m)))return!1}var d=a.get(e),T=a.get(t);if(d&&T)return d==t&&T==e;var E=!0;a.set(e,t),a.set(t,e);for(var R=s;++p<f;){m=l[p];var S=e[m],g=t[m];if(o)var h=s?o(g,S,m,t,e,a):o(S,g,m,e,t,a);if(!(h===void 0?S===g||i(S,g,r,o,a):h)){E=!1;break}R||(R=m=="constructor")}if(E&&!R){var N=e.constructor,C=t.constructor;N!=C&&"constructor"in e&&"constructor"in t&&!(typeof N=="function"&&N instanceof N&&typeof C=="function"&&C instanceof C)&&(E=!1)}return a.delete(e),a.delete(t),E}n(Vy,"equalObjects");var rd=Vy;var Xy=He(me,"DataView"),Fi=Xy;var Zy=He(me,"Promise"),Gi=Zy;var Jy=He(me,"Set"),Xt=Jy;var Qy=He(me,"WeakMap"),ji=Qy;var nd="[object Map]",$y="[object Object]",od="[object Promise]",id="[object Set]",ad="[object WeakMap]",sd="[object DataView]",eN=Lt(Fi),tN=Lt(Ht),rN=Lt(Gi),nN=Lt(Xt),oN=Lt(ji),Er=Xe;(Fi&&Er(new Fi(new ArrayBuffer(1)))!=sd||Ht&&Er(new Ht)!=nd||Gi&&Er(Gi.resolve())!=od||Xt&&Er(new Xt)!=id||ji&&Er(new ji)!=ad)&&(Er=n(function(e){var t=Xe(e),r=t==$y?e.constructor:void 0,o=r?Lt(r):"";if(o)switch(o){case eN:return sd;case tN:return nd;case rN:return od;case nN:return id;case oN:return ad}return t},"getTag"));var no=Er;var iN=1,ld="[object Arguments]",fd="[object Array]",Ki="[object Object]",aN=Object.prototype,cd=aN.hasOwnProperty;function sN(e,t,r,o,i,a){var s=w(e),l=w(t),f=s?fd:no(e),c=l?fd:no(t);f=f==ld?Ki:f,c=c==ld?Ki:c;var u=f==Ki,p=c==Ki,m=f==c;if(m&&hr(e)){if(!hr(t))return!1;s=!0,u=!1}if(m&&!u)return a||(a=new cn),s||mn(e)?vi(e,t,r,o,i,a):Dm(e,t,f,r,o,i,a);if(!(r&iN)){var d=u&&cd.call(e,"__wrapped__"),T=p&&cd.call(t,"__wrapped__");if(d||T){var E=d?e.value():e,R=T?t.value():t;return a||(a=new cn),i(E,R,r,o,a)}}return m?(a||(a=new cn),rd(e,t,r,o,i,a)):!1}n(sN,"baseIsEqualDeep");var ud=sN;function pd(e,t,r,o,i){return e===t?!0:e==null||t==null||!Ze(e)&&!Ze(t)?e!==e&&t!==t:ud(e,t,r,o,pd,i)}n(pd,"baseIsEqual");var Wi=pd;var lN=1,fN=2;function cN(e,t,r,o){var i=r.length,a=i,s=!o;if(e==null)return!a;for(e=Object(e);i--;){var l=r[i];if(s&&l[2]?l[1]!==e[l[0]]:!(l[0]in e))return!1}for(;++i<a;){l=r[i];var f=l[0],c=e[f],u=l[1];if(s&&l[2]){if(c===void 0&&!(f in e))return!1}else{var p=new cn;if(o)var m=o(c,u,f,e,t,p);if(!(m===void 0?Wi(u,c,lN|fN,o,p):m))return!1}}return!0}n(cN,"baseIsMatch");var md=cN;function uN(e){return e===e&&!an(e)}n(uN,"isStrictComparable");var Yi=uN;function pN(e){for(var t=dn(e),r=t.length;r--;){var o=t[r],i=e[o];t[r]=[o,i,Yi(i)]}return t}n(pN,"getMatchData");var dd=pN;function mN(e,t){return function(r){return r==null?!1:r[e]===t&&(t!==void 0||e in Object(r))}}n(mN,"matchesStrictComparable");var Hi=mN;function dN(e){var t=dd(e);return t.length==1&&t[0][2]?Hi(t[0][0],t[0][1]):function(r){return r===e||md(r,e,t)}}n(dN,"baseMatches");var hd=dN;var hN="[object Symbol]";function EN(e){return typeof e=="symbol"||Ze(e)&&Xe(e)==hN}n(EN,"isSymbol");var Zt=EN;var SN=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,TN=/^\w*$/;function gN(e,t){if(w(e))return!1;var r=typeof e;return r=="number"||r=="symbol"||r=="boolean"||e==null||Zt(e)?!0:TN.test(e)||!SN.test(e)||t!=null&&e in Object(t)}n(gN,"isKey");var hn=gN;var xN="Expected a function";function es(e,t){if(typeof e!="function"||t!=null&&typeof t!="function")throw new TypeError(xN);var r=n(function(){var o=arguments,i=t?t.apply(this,o):o[0],a=r.cache;if(a.has(i))return a.get(i);var s=e.apply(this,o);return r.cache=a.set(i,s)||a,s},"memoized");return r.cache=new(es.Cache||dr),r}n(es,"memoize");es.Cache=dr;var Ed=es;var RN=500;function LN(e){var t=Ed(e,function(o){return r.size===RN&&r.clear(),o}),r=t.cache;return t}n(LN,"memoizeCapped");var Sd=LN;var UN=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,AN=/\\(\\)?/g,ON=Sd(function(e){var t=[];return e.charCodeAt(0)===46&&t.push(""),e.replace(UN,function(r,o,i,a){t.push(i?a.replace(AN,"$1"):o||r)}),t}),Td=ON;var yN=1/0,gd=Ne?Ne.prototype:void 0,xd=gd?gd.toString:void 0;function Rd(e){if(typeof e=="string")return e;if(w(e))return Oi(e,Rd)+"";if(Zt(e))return xd?xd.call(e):"";var t=e+"";return t=="0"&&1/e==-yN?"-0":t}n(Rd,"baseToString");var Ld=Rd;function NN(e){return e==null?"":Ld(e)}n(NN,"toString");var Ud=NN;function CN(e,t){return w(e)?e:hn(e,t)?[e]:Td(Ud(e))}n(CN,"castPath");var zi=CN;var IN=1/0;function MN(e){if(typeof e=="string"||Zt(e))return e;var t=e+"";return t=="0"&&1/e==-IN?"-0":t}n(MN,"toKey");var Jt=MN;function bN(e,t){t=zi(t,e);for(var r=0,o=t.length;e!=null&&r<o;)e=e[Jt(t[r++])];return r&&r==o?e:void 0}n(bN,"baseGet");var qi=bN;function _N(e,t,r){var o=e==null?void 0:qi(e,t);return o===void 0?r:o}n(_N,"get");var Ad=_N;function vN(e,t){return e!=null&&t in Object(e)}n(vN,"baseHasIn");var Od=vN;function PN(e,t,r){t=zi(t,e);for(var o=-1,i=t.length,a=!1;++o<i;){var s=Jt(t[o]);if(!(a=e!=null&&r(e,s)))break;e=e[s]}return a||++o!=i?a:(i=e==null?0:e.length,!!i&&pn(i)&&Bi(s,i)&&(w(e)||qt(e)))}n(PN,"hasPath");var yd=PN;function kN(e,t){return e!=null&&yd(e,t,Od)}n(kN,"hasIn");var Nd=kN;var BN=1,wN=2;function DN(e,t){return hn(e)&&Yi(t)?Hi(Jt(e),t):function(r){var o=Ad(r,e);return o===void 0&&o===t?Nd(r,e):Wi(t,o,BN|wN)}}n(DN,"baseMatchesProperty");var Cd=DN;function FN(e){return e}n(FN,"identity");var En=FN;function GN(e){return function(t){return t?.[e]}}n(GN,"baseProperty");var Id=GN;function jN(e){return function(t){return qi(t,e)}}n(jN,"basePropertyDeep");var Md=jN;function KN(e){return hn(e)?Id(Jt(e)):Md(e)}n(KN,"property");var bd=KN;function WN(e){return typeof e=="function"?e:e==null?En:typeof e=="object"?w(e)?Cd(e[0],e[1]):hd(e):bd(e)}n(WN,"baseIteratee");var Qt=WN;function YN(e){return function(t,r,o){for(var i=-1,a=Object(t),s=o(t),l=s.length;l--;){var f=s[e?l:++i];if(r(a[f],f,a)===!1)break}return t}}n(YN,"createBaseFor");var _d=YN;var HN=_d(),vd=HN;function zN(e,t){return e&&vd(e,t,dn)}n(zN,"baseForOwn");var Pd=zN;function qN(e,t){return function(r,o){if(r==null)return r;if(!Vt(r))return e(r,o);for(var i=r.length,a=t?i:-1,s=Object(r);(t?a--:++a<i)&&o(s[a],a,s)!==!1;);return r}}n(qN,"createBaseEach");var kd=qN;var VN=kd(Pd),$t=VN;function XN(e,t){var r=-1,o=Vt(e)?Array(e.length):[];return $t(e,function(i,a,s){o[++r]=t(i,a,s)}),o}n(XN,"baseMap");var Bd=XN;function ZN(e,t){var r=w(e)?Oi:Bd;return r(e,Qt(t,3))}n(ZN,"map");var De=ZN;function JN(e,t){var r=[];return $t(e,function(o,i,a){t(o,i,a)&&r.push(o)}),r}n(JN,"baseFilter");var wd=JN;function QN(e,t){var r=w(e)?ki:wd;return r(e,Qt(t,3))}n(QN,"filter");var Dd=QN;function Sr(e,t,r){return`${e.name}_${t}_${r}`}n(Sr,"buildATNKey");var er=1,$N=2,Fd=4,Gd=5;var gn=7,e4=8,t4=9,r4=10,n4=11,jd=12,oo=class{static{n(this,"AbstractTransition")}constructor(t){this.target=t}isEpsilon(){return!1}},Sn=class extends oo{static{n(this,"AtomTransition")}constructor(t,r){super(t),this.tokenType=r}},io=class extends oo{static{n(this,"EpsilonTransition")}constructor(t){super(t)}isEpsilon(){return!0}},Tn=class extends oo{static{n(this,"RuleTransition")}constructor(t,r,o){super(t),this.rule=r,this.followState=o}isEpsilon(){return!0}};function Kd(e){let t={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]};o4(t,e);let r=e.length;for(let o=0;o<r;o++){let i=e[o],a=Tr(t,i,i);a!==void 0&&h4(t,i,a)}return t}n(Kd,"createATN");function o4(e,t){let r=t.length;for(let o=0;o<r;o++){let i=t[o],a=de(e,i,void 0,{type:$N}),s=de(e,i,void 0,{type:gn});a.stop=s,e.ruleToStartState.set(i,a),e.ruleToStopState.set(i,s)}}n(o4,"createRuleStartAndStopATNStates");function Wd(e,t,r){return r instanceof M?ts(e,t,r.terminalType,r):r instanceof P?d4(e,t,r):r instanceof G?f4(e,t,r):r instanceof k?c4(e,t,r):r instanceof _?i4(e,t,r):r instanceof F?a4(e,t,r):r instanceof H?s4(e,t,r):r instanceof z?l4(e,t,r):Tr(e,t,r)}n(Wd,"atom");function i4(e,t,r){let o=de(e,t,r,{type:Gd});tr(e,o);let i=xn(e,t,o,r,Tr(e,t,r));return Hd(e,t,r,i)}n(i4,"repetition");function a4(e,t,r){let o=de(e,t,r,{type:Gd});tr(e,o);let i=xn(e,t,o,r,Tr(e,t,r)),a=ts(e,t,r.separator,r);return Hd(e,t,r,i,a)}n(a4,"repetitionSep");function s4(e,t,r){let o=de(e,t,r,{type:Fd});tr(e,o);let i=xn(e,t,o,r,Tr(e,t,r));return Yd(e,t,r,i)}n(s4,"repetitionMandatory");function l4(e,t,r){let o=de(e,t,r,{type:Fd});tr(e,o);let i=xn(e,t,o,r,Tr(e,t,r)),a=ts(e,t,r.separator,r);return Yd(e,t,r,i,a)}n(l4,"repetitionMandatorySep");function f4(e,t,r){let o=de(e,t,r,{type:er});tr(e,o);let i=De(r.definition,s=>Wd(e,t,s));return xn(e,t,o,r,...i)}n(f4,"alternation");function c4(e,t,r){let o=de(e,t,r,{type:er});tr(e,o);let i=xn(e,t,o,r,Tr(e,t,r));return u4(e,t,r,i)}n(c4,"option");function Tr(e,t,r){let o=Dd(De(r.definition,i=>Wd(e,t,i)),i=>i!==void 0);return o.length===1?o[0]:o.length===0?void 0:m4(e,o)}n(Tr,"block");function Yd(e,t,r,o,i){let a=o.left,s=o.right,l=de(e,t,r,{type:n4});tr(e,l);let f=de(e,t,r,{type:jd});return a.loopback=l,f.loopback=l,e.decisionMap[Sr(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=l,ae(s,l),i===void 0?(ae(l,a),ae(l,f)):(ae(l,f),ae(l,i.left),ae(i.right,a)),{left:a,right:f}}n(Yd,"plus");function Hd(e,t,r,o,i){let a=o.left,s=o.right,l=de(e,t,r,{type:r4});tr(e,l);let f=de(e,t,r,{type:jd}),c=de(e,t,r,{type:t4});return l.loopback=c,f.loopback=c,ae(l,a),ae(l,f),ae(s,c),i!==void 0?(ae(c,f),ae(c,i.left),ae(i.right,a)):ae(c,l),e.decisionMap[Sr(t,i?"RepetitionWithSeparator":"Repetition",r.idx)]=l,{left:l,right:f}}n(Hd,"star");function u4(e,t,r,o){let i=o.left,a=o.right;return ae(i,a),e.decisionMap[Sr(t,"Option",r.idx)]=i,o}n(u4,"optional");function tr(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}n(tr,"defineDecisionState");function xn(e,t,r,o,...i){let a=de(e,t,o,{type:e4,start:r});r.end=a;for(let l of i)l!==void 0?(ae(r,l.left),ae(l.right,a)):ae(r,a);let s={left:r,right:a};return e.decisionMap[Sr(t,p4(o),o.idx)]=r,s}n(xn,"makeAlts");function p4(e){if(e instanceof G)return"Alternation";if(e instanceof k)return"Option";if(e instanceof _)return"Repetition";if(e instanceof F)return"RepetitionWithSeparator";if(e instanceof H)return"RepetitionMandatory";if(e instanceof z)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}n(p4,"getProdType");function m4(e,t){let r=t.length;for(let a=0;a<r-1;a++){let s=t[a],l;s.left.transitions.length===1&&(l=s.left.transitions[0]);let f=l instanceof Tn,c=l,u=t[a+1].left;s.left.type===er&&s.right.type===er&&l!==void 0&&(f&&c.followState===s.right||l.target===s.right)?(f?c.followState=u:l.target=u,E4(e,s.right)):ae(s.right,u)}let o=t[0],i=t[r-1];return{left:o.left,right:i.right}}n(m4,"makeBlock");function ts(e,t,r,o){let i=de(e,t,o,{type:er}),a=de(e,t,o,{type:er});return rs(i,new Sn(a,r)),{left:i,right:a}}n(ts,"tokenRef");function d4(e,t,r){let o=r.referencedRule,i=e.ruleToStartState.get(o),a=de(e,t,r,{type:er}),s=de(e,t,r,{type:er}),l=new Tn(i,o,s);return rs(a,l),{left:a,right:s}}n(d4,"ruleRef");function h4(e,t,r){let o=e.ruleToStartState.get(t);ae(o,r.left);let i=e.ruleToStopState.get(t);return ae(r.right,i),{left:o,right:i}}n(h4,"buildRuleHandle");function ae(e,t){let r=new io(t);rs(e,r)}n(ae,"epsilon");function de(e,t,r,o){let i=Object.assign({atn:e,production:r,epsilonOnlyTransitions:!1,rule:t,transitions:[],nextTokenWithinRule:[],stateNumber:e.states.length},o);return e.states.push(i),i}n(de,"newState");function rs(e,t){e.transitions.length===0&&(e.epsilonOnlyTransitions=t.isEpsilon()),e.transitions.push(t)}n(rs,"addTransition");function E4(e,t){e.states.splice(e.states.indexOf(t),1)}n(E4,"removeState");var ao={},Rn=class{static{n(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){let r=ns(t);r in this.map||(this.map[r]=this.configs.length,this.configs.push(t))}get elements(){return this.configs}get alts(){return De(this.configs,t=>t.alt)}get key(){let t="";for(let r in this.map)t+=r+":";return t}};function ns(e,t=!0){return`${t?`a${e.alt}`:""}s${e.state.stateNumber}:${e.stack.map(r=>r.stateNumber.toString()).join("_")}`}n(ns,"getATNConfigKey");function S4(e,t,r){for(var o=-1,i=e.length;++o<i;){var a=e[o],s=t(a);if(s!=null&&(l===void 0?s===s&&!Zt(s):r(s,l)))var l=s,f=a}return f}n(S4,"baseExtremum");var zd=S4;function T4(e,t){return e<t}n(T4,"baseLt");var qd=T4;function g4(e){return e&&e.length?zd(e,En,qd):void 0}n(g4,"min");var Vd=g4;var Xd=Ne?Ne.isConcatSpreadable:void 0;function x4(e){return w(e)||qt(e)||!!(Xd&&e&&e[Xd])}n(x4,"isFlattenable");var Zd=x4;function Jd(e,t,r,o,i){var a=-1,s=e.length;for(r||(r=Zd),i||(i=[]);++a<s;){var l=e[a];t>0&&r(l)?t>1?Jd(l,t-1,r,o,i):Pi(i,l):o||(i[i.length]=l)}return i}n(Jd,"baseFlatten");var Vi=Jd;function R4(e,t){return Vi(De(e,t),1)}n(R4,"flatMap");var Qd=R4;function L4(e,t,r,o){for(var i=e.length,a=r+(o?1:-1);o?a--:++a<i;)if(t(e[a],a,e))return a;return-1}n(L4,"baseFindIndex");var $d=L4;function U4(e){return e!==e}n(U4,"baseIsNaN");var eh=U4;function A4(e,t,r){for(var o=r-1,i=e.length;++o<i;)if(e[o]===t)return o;return-1}n(A4,"strictIndexOf");var th=A4;function O4(e,t,r){return t===t?th(e,t,r):$d(e,eh,r)}n(O4,"baseIndexOf");var rh=O4;function y4(e,t){var r=e==null?0:e.length;return!!r&&rh(e,t,0)>-1}n(y4,"arrayIncludes");var nh=y4;function N4(e,t,r){for(var o=-1,i=e==null?0:e.length;++o<i;)if(r(t,e[o]))return!0;return!1}n(N4,"arrayIncludesWith");var oh=N4;function C4(){}n(C4,"noop");var ih=C4;var I4=1/0,M4=Xt&&1/un(new Xt([,-0]))[1]==I4?function(e){return new Xt(e)}:ih,ah=M4;var b4=200;function _4(e,t,r){var o=-1,i=nh,a=e.length,s=!0,l=[],f=l;if(r)s=!1,i=oh;else if(a>=b4){var c=t?null:ah(e);if(c)return un(c);s=!1,i=_i,f=new bi}else f=t?[]:l;e:for(;++o<a;){var u=e[o],p=t?t(u):u;if(u=r||u!==0?u:0,s&&p===p){for(var m=f.length;m--;)if(f[m]===p)continue e;t&&f.push(p),l.push(u)}else i(f,p,r)||(f!==l&&f.push(p),l.push(u))}return l}n(_4,"baseUniq");var sh=_4;function v4(e,t){return e&&e.length?sh(e,Qt(t,2)):[]}n(v4,"uniqBy");var lh=v4;function P4(e){var t=e==null?0:e.length;return t?Vi(e,1):[]}n(P4,"flatten");var fh=P4;function k4(e,t){for(var r=-1,o=e==null?0:e.length;++r<o&&t(e[r],r,e)!==!1;);return e}n(k4,"arrayEach");var ch=k4;function B4(e){return typeof e=="function"?e:En}n(B4,"castFunction");var uh=B4;function w4(e,t){var r=w(e)?ch:$t;return r(e,uh(t))}n(w4,"forEach");var Xi=w4;var D4="[object Map]",F4="[object Set]",G4=Object.prototype,j4=G4.hasOwnProperty;function K4(e){if(e==null)return!0;if(Vt(e)&&(w(e)||typeof e=="string"||typeof e.splice=="function"||hr(e)||mn(e)||qt(e)))return!e.length;var t=no(e);if(t==D4||t==F4)return!e.size;if(wi(e))return!Di(e).length;for(var r in e)if(j4.call(e,r))return!1;return!0}n(K4,"isEmpty");var ph=K4;function W4(e,t,r,o){var i=-1,a=e==null?0:e.length;for(o&&a&&(r=e[++i]);++i<a;)r=t(r,e[i],i,e);return r}n(W4,"arrayReduce");var mh=W4;function Y4(e,t,r,o,i){return i(e,function(a,s,l){r=o?(o=!1,a):t(r,a,s,l)}),r}n(Y4,"baseReduce");var dh=Y4;function H4(e,t,r){var o=w(e)?mh:dh,i=arguments.length<3;return o(e,Qt(t,4),r,i,$t)}n(H4,"reduce");var os=H4;function z4(e,t){let r={};return o=>{let i=o.toString(),a=r[i];return a!==void 0||(a={atnStartState:e,decision:t,states:{}},r[i]=a),a}}n(z4,"createDFACache");var Zi=class{static{n(this,"PredicateSet")}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 o=0;o<r;o++)t+=this.predicates[o]===!0?"1":"0";return t}},hh=new Zi,so=class extends pr{static{n(this,"LLStarLookaheadStrategy")}constructor(t){var r;super(),this.logging=(r=t?.logging)!==null&&r!==void 0?r:(o=>console.log(o))}initialize(t){this.atn=Kd(t.rules),this.dfas=q4(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:r,rule:o,hasPredicates:i,dynamicTokensEnabled:a}=t,s=this.dfas,l=this.logging,f=Sr(o,"Alternation",r),u=this.atn.decisionMap[f].decision,p=De(ni({maxLookahead:1,occurrence:r,prodType:"Alternation",rule:o}),m=>De(m,d=>d[0]));if(Eh(p,!1)&&!a){let m=os(p,(d,T,E)=>(Xi(T,R=>{R&&(d[R.tokenTypeIdx]=E,Xi(R.categoryMatches,S=>{d[S]=E}))}),d),{});return i?function(d){var T;let E=this.LA(1),R=m[E.tokenTypeIdx];if(d!==void 0&&R!==void 0){let S=(T=d[R])===null||T===void 0?void 0:T.GATE;if(S!==void 0&&S.call(this)===!1)return}return R}:function(){let d=this.LA(1);return m[d.tokenTypeIdx]}}else return i?function(m){let d=new Zi,T=m===void 0?0:m.length;for(let R=0;R<T;R++){let S=m?.[R].GATE;d.set(R,S===void 0||S.call(this))}let E=is.call(this,s,u,d,l);return typeof E=="number"?E:void 0}:function(){let m=is.call(this,s,u,hh,l);return typeof m=="number"?m:void 0}}buildLookaheadForOptional(t){let{prodOccurrence:r,rule:o,prodType:i,dynamicTokensEnabled:a}=t,s=this.dfas,l=this.logging,f=Sr(o,i,r),u=this.atn.decisionMap[f].decision,p=De(ni({maxLookahead:1,occurrence:r,prodType:i,rule:o}),m=>De(m,d=>d[0]));if(Eh(p)&&p[0][0]&&!a){let m=p[0],d=fh(m);if(d.length===1&&ph(d[0].categoryMatches)){let E=d[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===E}}else{let T=os(d,(E,R)=>(R!==void 0&&(E[R.tokenTypeIdx]=!0,Xi(R.categoryMatches,S=>{E[S]=!0})),E),{});return function(){let E=this.LA(1);return T[E.tokenTypeIdx]===!0}}}return function(){let m=is.call(this,s,u,hh,l);return typeof m=="object"?!1:m===0}}};function Eh(e,t=!0){let r=new Set;for(let o of e){let i=new Set;for(let a of o){if(a===void 0){if(t)break;return!1}let s=[a.tokenTypeIdx].concat(a.categoryMatches);for(let l of s)if(r.has(l)){if(!i.has(l))return!1}else r.add(l),i.add(l)}}return!0}n(Eh,"isLL1Sequence");function q4(e){let t=e.decisionStates.length,r=Array(t);for(let o=0;o<t;o++)r[o]=z4(e.decisionStates[o],o);return r}n(q4,"initATNSimulator");function is(e,t,r,o){let i=e[t](r),a=i.start;if(a===void 0){let l=o7(i.atnStartState);a=gh(i,Th(l)),i.start=a}return V4.apply(this,[i,a,r,o])}n(is,"adaptivePredict");function V4(e,t,r,o){let i=t,a=1,s=[],l=this.LA(a++);for(;;){let f=e7(i,l);if(f===void 0&&(f=X4.apply(this,[e,i,l,a,r,o])),f===ao)return $4(s,i,l);if(f.isAcceptState===!0)return f.prediction;i=f,s.push(l),l=this.LA(a++)}}n(V4,"performLookahead");function X4(e,t,r,o,i,a){let s=t7(t.configs,r,i);if(s.size===0)return Sh(e,t,r,ao),ao;let l=Th(s),f=n7(s,i);if(f!==void 0)l.isAcceptState=!0,l.prediction=f,l.configs.uniqueAlt=f;else if(l7(s)){let c=Vd(s.alts);l.isAcceptState=!0,l.prediction=c,l.configs.uniqueAlt=c,Z4.apply(this,[e,o,s.alts,a])}return l=Sh(e,t,r,l),l}n(X4,"computeLookaheadTarget");function Z4(e,t,r,o){let i=[];for(let c=1;c<=t;c++)i.push(this.LA(c).tokenType);let a=e.atnStartState,s=a.rule,l=a.production,f=J4({topLevelRule:s,ambiguityIndices:r,production:l,prefixPath:i});o(f)}n(Z4,"reportLookaheadAmbiguity");function J4(e){let t=De(e.prefixPath,i=>gt(i)).join(", "),r=e.production.idx===0?"":e.production.idx,o=`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${Q4(e.production)}${r}> inside <${e.topLevelRule.name}> Rule,
118
+ <${t}> may appears as a prefix path in all these alternatives.
119
+ `;return o=o+`See: https://chevrotain.io/docs/guide/resolving_grammar_errors.html#AMBIGUOUS_ALTERNATIVES
120
+ For Further details.`,o}n(J4,"buildAmbiguityError");function Q4(e){if(e instanceof P)return"SUBRULE";if(e instanceof k)return"OPTION";if(e instanceof G)return"OR";if(e instanceof H)return"AT_LEAST_ONE";if(e instanceof z)return"AT_LEAST_ONE_SEP";if(e instanceof F)return"MANY_SEP";if(e instanceof _)return"MANY";if(e instanceof M)return"CONSUME";throw Error("non exhaustive match")}n(Q4,"getProductionDslName");function $4(e,t,r){let o=Qd(t.configs.elements,a=>a.state.transitions),i=lh(o.filter(a=>a instanceof Sn).map(a=>a.tokenType),a=>a.tokenTypeIdx);return{actualToken:r,possibleTokenTypes:i,tokenPath:e}}n($4,"buildAdaptivePredictError");function e7(e,t){return e.edges[t.tokenTypeIdx]}n(e7,"getExistingTargetState");function t7(e,t,r){let o=new Rn,i=[];for(let s of e.elements){if(r.is(s.alt)===!1)continue;if(s.state.type===gn){i.push(s);continue}let l=s.state.transitions.length;for(let f=0;f<l;f++){let c=s.state.transitions[f],u=r7(c,t);u!==void 0&&o.add({state:u,alt:s.alt,stack:s.stack})}}let a;if(i.length===0&&o.size===1&&(a=o),a===void 0){a=new Rn;for(let s of o.elements)Ji(s,a)}if(i.length>0&&!a7(a))for(let s of i)a.add(s);return a}n(t7,"computeReachSet");function r7(e,t){if(e instanceof Sn&&I(t,e.tokenType))return e.target}n(r7,"getReachableTarget");function n7(e,t){let r;for(let o of e.elements)if(t.is(o.alt)===!0){if(r===void 0)r=o.alt;else if(r!==o.alt)return}return r}n(n7,"getUniqueAlt");function Th(e){return{configs:e,edges:{},isAcceptState:!1,prediction:-1}}n(Th,"newDFAState");function Sh(e,t,r,o){return o=gh(e,o),t.edges[r.tokenTypeIdx]=o,o}n(Sh,"addDFAEdge");function gh(e,t){if(t===ao)return t;let r=t.configs.key,o=e.states[r];return o!==void 0?o:(t.configs.finalize(),e.states[r]=t,t)}n(gh,"addDFAState");function o7(e){let t=new Rn,r=e.transitions.length;for(let o=0;o<r;o++){let a={state:e.transitions[o].target,alt:o,stack:[]};Ji(a,t)}return t}n(o7,"computeStartState");function Ji(e,t){let r=e.state;if(r.type===gn){if(e.stack.length>0){let i=[...e.stack],s={state:i.pop(),alt:e.alt,stack:i};Ji(s,t)}else t.add(e);return}r.epsilonOnlyTransitions||t.add(e);let o=r.transitions.length;for(let i=0;i<o;i++){let a=r.transitions[i],s=i7(e,a);s!==void 0&&Ji(s,t)}}n(Ji,"closure");function i7(e,t){if(t instanceof io)return{state:t.target,alt:e.alt,stack:e.stack};if(t instanceof Tn){let r=[...e.stack,t.followState];return{state:t.target,alt:e.alt,stack:r}}}n(i7,"getEpsilonTarget");function a7(e){for(let t of e.elements)if(t.state.type===gn)return!0;return!1}n(a7,"hasConfigInRuleStopState");function s7(e){for(let t of e.elements)if(t.state.type!==gn)return!1;return!0}n(s7,"allConfigsInRuleStopStates");function l7(e){if(s7(e))return!0;let t=f7(e.elements);return c7(t)&&!u7(t)}n(l7,"hasConflictTerminatingPrediction");function f7(e){let t=new Map;for(let r of e){let o=ns(r,!1),i=t.get(o);i===void 0&&(i={},t.set(o,i)),i[r.alt]=!0}return t}n(f7,"getConflictingAltSets");function c7(e){for(let t of Array.from(e.values()))if(Object.keys(t).length>1)return!0;return!1}n(c7,"hasConflictingAltSet");function u7(e){for(let t of Array.from(e.values()))if(Object.keys(t).length===1)return!0;return!1}n(u7,"hasStateAssociatedWithOneAlt");function xh(e,t){e.RULE("literal",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.integerLiteral),"ALT")},{ALT:n(()=>e.SUBRULE(e.floatingPointLiteral),"ALT")},{ALT:n(()=>e.SUBRULE(e.booleanLiteral),"ALT")},{ALT:n(()=>e.CONSUME(t.CharLiteral),"ALT")},{ALT:n(()=>e.CONSUME(t.TextBlock),"ALT")},{ALT:n(()=>e.CONSUME(t.StringLiteral),"ALT")},{ALT:n(()=>e.CONSUME(t.Null),"ALT")}])}),e.RULE("integerLiteral",()=>{e.OR([{ALT:n(()=>e.CONSUME(t.DecimalLiteral),"ALT")},{ALT:n(()=>e.CONSUME(t.HexLiteral),"ALT")},{ALT:n(()=>e.CONSUME(t.OctalLiteral),"ALT")},{ALT:n(()=>e.CONSUME(t.BinaryLiteral),"ALT")}])}),e.RULE("floatingPointLiteral",()=>{e.OR([{ALT:n(()=>e.CONSUME(t.FloatLiteral),"ALT")},{ALT:n(()=>e.CONSUME(t.HexFloatLiteral),"ALT")}])}),e.RULE("booleanLiteral",()=>{e.OR([{ALT:n(()=>e.CONSUME(t.True),"ALT")},{ALT:n(()=>e.CONSUME(t.False),"ALT")}])}),e.RULE("shiftOperator",()=>{e.OR([{GATE:n(()=>e.LA(1).startOffset+1===e.LA(2).startOffset,"GATE"),ALT:n(()=>{e.CONSUME(t.Less),e.CONSUME2(t.Less)},"ALT")},{GATE:n(()=>e.LA(1).startOffset+1===e.LA(2).startOffset,"GATE"),ALT:n(()=>{e.CONSUME(t.Greater),e.CONSUME2(t.Greater),e.OPTION({GATE:n(()=>e.LA(0).startOffset+1===e.LA(1).startOffset,"GATE"),DEF:n(()=>e.CONSUME3(t.Greater),"DEF")})},"ALT")}])})}n(xh,"defineRules");function Rh(e,t){e.RULE("primitiveType",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.OR([{ALT:n(()=>e.SUBRULE(e.numericType),"ALT")},{ALT:n(()=>e.CONSUME(t.Boolean),"ALT")}])}),e.RULE("numericType",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.integralType),"ALT")},{ALT:n(()=>e.SUBRULE(e.floatingPointType),"ALT")}])}),e.RULE("integralType",()=>{e.OR([{ALT:n(()=>e.CONSUME(t.Byte),"ALT")},{ALT:n(()=>e.CONSUME(t.Short),"ALT")},{ALT:n(()=>e.CONSUME(t.Int),"ALT")},{ALT:n(()=>e.CONSUME(t.Long),"ALT")},{ALT:n(()=>e.CONSUME(t.Char),"ALT")}])}),e.RULE("floatingPointType",()=>{e.OR([{ALT:n(()=>e.CONSUME(t.Float),"ALT")},{ALT:n(()=>e.CONSUME(t.Double),"ALT")}])}),e.RULE("referenceType",()=>{e.MANY(()=>{e.SUBRULE(e.annotation)}),e.OR({DEF:[{ALT:n(()=>{e.SUBRULE(e.primitiveType),e.SUBRULE(e.dims)},"ALT")},{ALT:n(()=>{e.SUBRULE(e.classOrInterfaceType),e.OPTION(()=>{e.SUBRULE2(e.dims)})},"ALT")}],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:n(()=>e.BACKTRACK_LOOKAHEAD(e.isDims),"GATE"),DEF:n(()=>{e.MANY3(()=>{e.SUBRULE2(e.annotation)}),e.CONSUME2(t.LSquare),e.CONSUME2(t.RSquare)},"DEF")})}),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:n(()=>e.SUBRULE(e.referenceType),"ALT")},{ALT:n(()=>e.SUBRULE(e.wildcard),"ALT")}])}),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:n(()=>e.CONSUME(t.Extends),"ALT")},{ALT:n(()=>e.CONSUME(t.Super),"ALT")}]),e.SUBRULE(e.referenceType)})}n(Rh,"defineRules");function Lh(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:n(()=>I(this.LA(2).tokenType,t.Identifier),"GATE"),DEF:n(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)},"DEF")})}),e.RULE("methodName",()=>{e.CONSUME(t.Identifier)}),e.RULE("packageOrTypeName",()=>{e.CONSUME(t.Identifier),e.MANY({GATE:n(()=>I(this.LA(2).tokenType,t.Star)===!1,"GATE"),DEF:n(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)},"DEF")})}),e.RULE("ambiguousName",()=>{e.CONSUME(t.Identifier),e.MANY(()=>{e.CONSUME(t.Dot),e.CONSUME2(t.Identifier)})})}n(Lh,"defineRules");function Uh(e,t){e.RULE("compilationUnit",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.ordinaryCompilationUnit),"ALT")},{ALT:n(()=>e.SUBRULE(e.modularCompilationUnit),"ALT")},{ALT:n(()=>e.CONSUME(ke),"ALT")}])}),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:n(()=>{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")},{ALT:n(()=>e.SUBRULE(e.emptyStatement),"ALT")}])}),e.RULE("typeDeclaration",()=>{e.OR([{ALT:n(()=>e.CONSUME(t.Semicolon),"ALT")},{ALT:n(()=>e.SUBRULE(e.classDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.interfaceDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.fieldDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.methodDeclaration),"ALT")}])}),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:n(()=>e.SUBRULE(e.requiresModuleDirective),"ALT")},{ALT:n(()=>e.SUBRULE(e.exportsModuleDirective),"ALT")},{ALT:n(()=>e.SUBRULE(e.opensModuleDirective),"ALT")},{ALT:n(()=>e.SUBRULE(e.usesModuleDirective),"ALT")},{ALT:n(()=>e.SUBRULE(e.providesModuleDirective),"ALT")}])}),e.RULE("requiresModuleDirective",()=>{e.CONSUME(t.Requires),e.MANY({GATE:n(()=>(I(e.LA(1).tokenType,t.Transitive)&&I(e.LA(2).tokenType,t.Separators))===!1,"GATE"),DEF:n(()=>{e.SUBRULE(e.requiresModifier)},"DEF")}),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:n(()=>e.CONSUME(t.Transitive),"ALT")},{ALT:n(()=>e.CONSUME(t.Static),"ALT")}])})}n(Uh,"defineRules");function Ah(e,t){e.RULE("classDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.classModifier)}),e.OR([{ALT:n(()=>e.SUBRULE(e.normalClassDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.enumDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.recordDeclaration),"ALT")}])}),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:n(()=>e.SUBRULE(e.annotation),"ALT")},{ALT:n(()=>e.CONSUME(t.Public),"ALT")},{ALT:n(()=>e.CONSUME(t.Protected),"ALT")},{ALT:n(()=>e.CONSUME(t.Private),"ALT")},{ALT:n(()=>e.CONSUME(t.Abstract),"ALT")},{ALT:n(()=>e.CONSUME(t.Static),"ALT")},{ALT:n(()=>e.CONSUME(t.Final),"ALT")},{ALT:n(()=>e.CONSUME(t.Sealed),"ALT")},{ALT:n(()=>e.CONSUME(t.NonSealed),"ALT")},{ALT:n(()=>e.CONSUME(t.Strictfp),"ALT")}])}),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:n(()=>e.SUBRULE(e.classMemberDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.instanceInitializer),"ALT")},{ALT:n(()=>e.SUBRULE(e.staticInitializer),"ALT")},{ALT:n(()=>e.SUBRULE(e.constructorDeclaration),"ALT")}])}),e.RULE("classMemberDeclaration",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.fieldDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.methodDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.classDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.interfaceDeclaration),"ALT")},{ALT:n(()=>e.CONSUME(t.Semicolon),"ALT")}])}),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:n(()=>e.SUBRULE(e.annotation),"ALT")},{ALT:n(()=>e.CONSUME(t.Public),"ALT")},{ALT:n(()=>e.CONSUME(t.Protected),"ALT")},{ALT:n(()=>e.CONSUME(t.Private),"ALT")},{ALT:n(()=>e.CONSUME(t.Static),"ALT")},{ALT:n(()=>e.CONSUME(t.Final),"ALT")},{ALT:n(()=>e.CONSUME(t.Transient),"ALT")},{ALT:n(()=>e.CONSUME(t.Volatile),"ALT")}])}),e.RULE("variableDeclaratorList",r=>{e.SUBRULE(e.variableDeclarator),e.MANY({GATE:n(()=>!r,"GATE"),DEF:n(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.variableDeclarator)},"DEF")})}),e.RULE("variableDeclarator",()=>{e.SUBRULE(e.variableDeclaratorId),e.OPTION(()=>{e.CONSUME(t.Equals),e.SUBRULE(e.variableInitializer)})}),e.RULE("variableDeclaratorId",()=>{e.OR([{ALT:n(()=>{e.CONSUME(t.Identifier),e.OPTION(()=>{e.SUBRULE(e.dims)})},"ALT")},{ALT:n(()=>e.CONSUME(t.Underscore),"ALT")}])}),e.RULE("variableInitializer",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.expression),"ALT")},{ALT:n(()=>e.SUBRULE(e.arrayInitializer),"ALT")}])}),e.RULE("unannType",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.unannPrimitiveTypeWithOptionalDimsSuffix),"ALT")},{ALT:n(()=>e.SUBRULE(e.unannReferenceType),"ALT")}])}),e.RULE("unannPrimitiveTypeWithOptionalDimsSuffix",()=>{e.SUBRULE(e.unannPrimitiveType),e.OPTION({GATE:n(()=>this.BACKTRACK_LOOKAHEAD(e.isDims),"GATE"),DEF:n(()=>e.SUBRULE2(e.dims),"DEF")})}),e.RULE("unannPrimitiveType",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.numericType),"ALT")},{ALT:n(()=>e.CONSUME(t.Boolean),"ALT")}])}),e.RULE("unannReferenceType",()=>{e.SUBRULE(e.unannClassOrInterfaceType),e.OPTION({GATE:n(()=>this.BACKTRACK_LOOKAHEAD(e.isDims),"GATE"),DEF:n(()=>e.SUBRULE2(e.dims),"DEF")})}),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:n(()=>e.SUBRULE(e.annotation),"ALT")},{ALT:n(()=>e.CONSUME(t.Public),"ALT")},{ALT:n(()=>e.CONSUME(t.Protected),"ALT")},{ALT:n(()=>e.CONSUME(t.Private),"ALT")},{ALT:n(()=>e.CONSUME(t.Abstract),"ALT")},{ALT:n(()=>e.CONSUME(t.Static),"ALT")},{ALT:n(()=>e.CONSUME(t.Final),"ALT")},{ALT:n(()=>e.CONSUME(t.Synchronized),"ALT")},{ALT:n(()=>e.CONSUME(t.Native),"ALT")},{ALT:n(()=>e.CONSUME(t.Strictfp),"ALT")}])}),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:n(()=>e.SUBRULE(e.unannType),"ALT")},{ALT:n(()=>e.CONSUME(t.Void),"ALT")}])}),e.RULE("methodDeclarator",()=>{e.CONSUME(t.Identifier),e.CONSUME(t.LBrace),e.OR([{ALT:n(()=>{e.SUBRULE(e.receiverParameter),e.OPTION(()=>{e.CONSUME(t.Comma),e.SUBRULE(e.formalParameterList)})},"ALT")},{ALT:n(()=>e.OPTION1(()=>e.SUBRULE1(e.formalParameterList)),"ALT")}]),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:n(()=>e.SUBRULE(e.variableParaRegularParameter),"ALT")},{ALT:n(()=>e.SUBRULE(e.variableArityParameter),"ALT")}])}),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:n(()=>e.SUBRULE(e.annotation),"ALT")},{ALT:n(()=>e.CONSUME(t.Final),"ALT")}])}),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:n(()=>e.SUBRULE(e.block),"ALT")},{ALT:n(()=>e.CONSUME(t.Semicolon),"ALT")}])}),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:n(()=>e.SUBRULE(e.annotation),"ALT")},{ALT:n(()=>e.CONSUME(t.Public),"ALT")},{ALT:n(()=>e.CONSUME(t.Protected),"ALT")},{ALT:n(()=>e.CONSUME(t.Private),"ALT")}])}),e.RULE("constructorDeclarator",()=>{e.OPTION(()=>{e.SUBRULE(e.typeParameters)}),e.SUBRULE(e.simpleTypeName),e.CONSUME(t.LBrace),e.OR([{ALT:n(()=>{e.SUBRULE(e.receiverParameter),e.OPTION1(()=>{e.CONSUME(t.Comma),e.SUBRULE(e.formalParameterList)})},"ALT")},{ALT:n(()=>e.OPTION2(()=>e.SUBRULE1(e.formalParameterList)),"ALT")}]),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:n(()=>e.SUBRULE(e.unqualifiedExplicitConstructorInvocation),"ALT")},{ALT:n(()=>e.SUBRULE(e.qualifiedExplicitConstructorInvocation),"ALT")}])}),e.RULE("unqualifiedExplicitConstructorInvocation",()=>{e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.OR([{ALT:n(()=>e.CONSUME(t.This),"ALT")},{ALT:n(()=>e.CONSUME(t.Super),"ALT")}]),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:n(()=>{let r=e.LA(2);return I(r,t.Identifier)||I(r,t.At)},"GATE"),DEF:n(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.enumConstant)},"DEF")})}),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:n(()=>e.CONSUME(t.Identifier),"ALT")},{ALT:n(()=>e.SUBRULE(e.variableArityRecordComponent),"ALT")}])}),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:n(()=>e.SUBRULE(e.compactConstructorDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.classBodyDeclaration),"ALT")}])}),e.RULE("compactConstructorDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.constructorModifier)}),e.SUBRULE(e.simpleTypeName),e.SUBRULE(e.constructorBody)}),e.RULE("isDims",()=>(e.MANY(e.annotation),I(this.LA(1),t.LSquare)&&I(this.LA(2),t.RSquare)))}n(Ah,"defineRules");function Oh(e,t){e.RULE("interfaceDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.interfaceModifier)}),e.OR([{ALT:n(()=>e.SUBRULE(e.normalInterfaceDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.annotationInterfaceDeclaration),"ALT")}])}),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:n(()=>e.SUBRULE(e.annotation),"ALT")},{ALT:n(()=>e.CONSUME(t.Public),"ALT")},{ALT:n(()=>e.CONSUME(t.Protected),"ALT")},{ALT:n(()=>e.CONSUME(t.Private),"ALT")},{ALT:n(()=>e.CONSUME(t.Abstract),"ALT")},{ALT:n(()=>e.CONSUME(t.Static),"ALT")},{ALT:n(()=>e.CONSUME(t.Sealed),"ALT")},{ALT:n(()=>e.CONSUME(t.NonSealed),"ALT")},{ALT:n(()=>e.CONSUME(t.Strictfp),"ALT")}])}),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:n(()=>e.SUBRULE(e.constantDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.interfaceMethodDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.classDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.interfaceDeclaration),"ALT")},{ALT:n(()=>e.CONSUME(t.Semicolon),"ALT")}])}),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:n(()=>e.SUBRULE(e.annotation),"ALT")},{ALT:n(()=>e.CONSUME(t.Public),"ALT")},{ALT:n(()=>e.CONSUME(t.Static),"ALT")},{ALT:n(()=>e.CONSUME(t.Final),"ALT")}])}),e.RULE("interfaceMethodDeclaration",()=>{e.MANY(()=>{e.SUBRULE(e.interfaceMethodModifier)}),e.SUBRULE(e.methodHeader),e.SUBRULE(e.methodBody)}),e.RULE("interfaceMethodModifier",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.annotation),"ALT")},{ALT:n(()=>e.CONSUME(t.Public),"ALT")},{ALT:n(()=>e.CONSUME(t.Private),"ALT")},{ALT:n(()=>e.CONSUME(t.Abstract),"ALT")},{ALT:n(()=>e.CONSUME(t.Default),"ALT")},{ALT:n(()=>e.CONSUME(t.Static),"ALT")},{ALT:n(()=>e.CONSUME(t.Strictfp),"ALT")}])}),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:n(()=>e.SUBRULE(e.annotationInterfaceElementDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.constantDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.classDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.interfaceDeclaration),"ALT")},{ALT:n(()=>e.CONSUME(t.Semicolon),"ALT")}])}),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:n(()=>e.SUBRULE(e.annotation),"ALT")},{ALT:n(()=>e.CONSUME(t.Public),"ALT")},{ALT:n(()=>e.CONSUME(t.Abstract),"ALT")}])}),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:n(()=>e.SUBRULE(e.elementValuePairList),"ALT")},{ALT:n(()=>e.SUBRULE(e.elementValue),"ALT")},{ALT:n(()=>{},"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:n(()=>e.SUBRULE(e.conditionalExpression),"ALT")},{ALT:n(()=>e.SUBRULE(e.elementValueArrayInitializer),"ALT")},{ALT:n(()=>e.SUBRULE(e.annotation),"ALT")}])}),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:n(()=>I(e.LA(2).tokenType,t.RCurly)===!1,"GATE"),DEF:n(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.elementValue)},"DEF")})})}n(Oh,"defineRules");function yh(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:n(()=>I(this.LA(2).tokenType,t.RCurly)===!1,"GATE"),DEF:n(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.variableInitializer)},"DEF")})})}n(yh,"defineRules");function Nh(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:n(()=>e.SUBRULE(e.localVariableDeclarationStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.classDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.interfaceDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.statement),"ALT")}],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:n(()=>e.SUBRULE(e.unannType),"ALT")},{ALT:n(()=>e.CONSUME(t.Var),"ALT")}],IGNORE_AMBIGUITIES:!0})}),e.RULE("statement",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.statementWithoutTrailingSubstatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.labeledStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.ifStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.whileStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.forStatement),"ALT")}])}),e.RULE("statementWithoutTrailingSubstatement",()=>{e.OR({DEF:[{ALT:n(()=>e.SUBRULE(e.block),"ALT")},{ALT:n(()=>e.SUBRULE(e.yieldStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.emptyStatement),"ALT")},{GATE:n(()=>!I(this.LA(1).tokenType,t.Switch),"GATE"),ALT:n(()=>e.SUBRULE(e.expressionStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.assertStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.switchStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.doStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.breakStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.continueStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.returnStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.synchronizedStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.throwStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.tryStatement),"ALT")}],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:n(()=>{e.SUBRULE(e.switchRule),e.MANY(()=>e.SUBRULE2(e.switchRule))},"ALT")},{ALT:n(()=>e.MANY2(()=>e.SUBRULE(e.switchBlockStatementGroup)),"ALT")}]),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:n(()=>{e.CONSUME(t.Case),e.OR2([{ALT:n(()=>{e.CONSUME(t.Null),e.OPTION2(()=>{e.CONSUME3(t.Comma),e.CONSUME(t.Default)})},"ALT")},{ALT:n(()=>{e.SUBRULE(e.casePattern),e.MANY(()=>{e.CONSUME(t.Comma),e.SUBRULE2(e.casePattern)}),e.OPTION(()=>{e.SUBRULE(e.guard)})},"ALT")},{GATE:n(()=>!I(e.LA(1).tokenType,t.Null),"GATE"),ALT:n(()=>{e.SUBRULE(e.caseConstant),e.MANY2(()=>{e.CONSUME2(t.Comma),e.SUBRULE2(e.caseConstant)})},"ALT")}])},"ALT")},{ALT:n(()=>e.CONSUME2(t.Default),"ALT")}])}),e.RULE("switchRule",()=>{e.SUBRULE(e.switchLabel),e.CONSUME(t.Arrow),e.OR([{ALT:n(()=>e.SUBRULE(e.throwStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.block),"ALT")},{ALT:n(()=>{e.SUBRULE(e.expression),e.CONSUME(t.Semicolon)},"ALT")}])}),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:n(()=>e.SUBRULE(e.basicForStatement),"ALT")},{ALT:n(()=>e.SUBRULE(e.enhancedForStatement),"ALT")}])}),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:n(()=>e.SUBRULE(e.localVariableDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.statementExpressionList),"ALT")}])}),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:n(()=>{e.CONSUME(t.Try),e.SUBRULE(e.block),e.OR2([{ALT:n(()=>{e.SUBRULE(e.catches),e.OPTION(()=>{e.SUBRULE(e.finally)})},"ALT")},{ALT:n(()=>e.SUBRULE2(e.finally),"ALT")}])},"ALT")},{ALT:n(()=>e.SUBRULE(e.tryWithResourcesStatement),"ALT")}])}),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:n(()=>I(e.LA(2).tokenType,t.RBrace)===!1,"GATE"),DEF:n(()=>{e.CONSUME(t.Semicolon),e.SUBRULE2(e.resource)},"DEF")})}),e.RULE("resource",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.localVariableDeclaration),"ALT")},{ALT:n(()=>e.SUBRULE(e.variableAccess),"ALT")}])}),e.RULE("yieldStatement",()=>{e.CONSUME(t.Yield),e.SUBRULE(e.expression),e.CONSUME(t.Semicolon)}),e.RULE("variableAccess",()=>{e.SUBRULE(e.primary)})}n(Nh,"defineRules");function Ch(e,t){e.RULE("expression",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.lambdaExpression),"ALT")},{ALT:n(()=>e.SUBRULE(e.conditionalExpression),"ALT")}])}),e.RULE("lambdaExpression",()=>{e.SUBRULE(e.lambdaParameters),e.CONSUME(t.Arrow),e.SUBRULE(e.lambdaBody)}),e.RULE("lambdaParameters",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.lambdaParametersWithBraces),"ALT")},{ALT:n(()=>e.CONSUME(t.Identifier),"ALT")},{ALT:n(()=>e.CONSUME(t.Underscore),"ALT")}])}),e.RULE("lambdaParametersWithBraces",()=>{e.CONSUME(t.LBrace),e.OPTION(()=>{e.SUBRULE(e.lambdaParameterList)}),e.CONSUME(t.RBrace)}),e.RULE("lambdaParameterList",()=>{e.OR([{GATE:n(()=>{let r=this.LA(1).tokenType,o=this.LA(2).tokenType;return(I(r,t.Identifier)||I(r,t.Underscore))&&(I(o,t.RBrace)||I(o,t.Comma))},"GATE"),ALT:n(()=>e.SUBRULE(e.conciseLambdaParameterList),"ALT")},{ALT:n(()=>e.SUBRULE(e.normalLambdaParameterList),"ALT")}])}),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:n(()=>e.SUBRULE(e.regularLambdaParameter),"ALT")},{ALT:n(()=>e.SUBRULE(e.variableArityParameter),"ALT")}])}),e.RULE("regularLambdaParameter",()=>{e.MANY(()=>{e.SUBRULE(e.variableModifier)}),e.SUBRULE(e.lambdaParameterType),e.SUBRULE(e.variableDeclaratorId)}),e.RULE("lambdaParameterType",()=>{e.OR({DEF:[{ALT:n(()=>e.SUBRULE(e.unannType),"ALT")},{ALT:n(()=>e.CONSUME(t.Var),"ALT")}],IGNORE_AMBIGUITIES:!0})}),e.RULE("conciseLambdaParameter",()=>{e.OR([{ALT:n(()=>e.CONSUME(t.Identifier),"ALT")},{ALT:n(()=>e.CONSUME(t.Underscore),"ALT")}])}),e.RULE("lambdaBody",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.expression),"ALT")},{ALT:n(()=>e.SUBRULE(e.block),"ALT")}])}),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:n(()=>{e.CONSUME(t.Instanceof),e.OR1([{ALT:n(()=>e.SUBRULE(e.pattern),"ALT")},{ALT:n(()=>e.SUBRULE(e.referenceType),"ALT")}])},"ALT")},{ALT:n(()=>{e.CONSUME(t.AssignmentOperator),e.SUBRULE2(e.expression)},"ALT")},{GATE:n(()=>I(e.LA(2).tokenType,t.Less)||I(e.LA(2).tokenType,t.Greater),"GATE"),ALT:n(()=>{e.SUBRULE(e.shiftOperator),e.SUBRULE2(e.unaryExpression)},"ALT")},{ALT:n(()=>{e.CONSUME(t.BinaryOperator),e.SUBRULE3(e.unaryExpression)},"ALT")}],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:n(()=>e.SUBRULE(e.literal),"ALT")},{ALT:n(()=>e.CONSUME(t.This),"ALT")},{ALT:n(()=>e.CONSUME(t.Void),"ALT")},{ALT:n(()=>e.SUBRULE(e.unannPrimitiveTypeWithOptionalDimsSuffix),"ALT")},{ALT:n(()=>e.SUBRULE(e.fqnOrRefType),"ALT")},{ALT:n(()=>e.SUBRULE(e.castExpression),"ALT")},{ALT:n(()=>e.SUBRULE(e.parenthesisExpression),"ALT")},{ALT:n(()=>e.SUBRULE(e.newExpression),"ALT")},{ALT:n(()=>e.SUBRULE(e.switchStatement),"ALT")}])}),e.RULE("primarySuffix",()=>{e.OR([{ALT:n(()=>{e.CONSUME(t.Dot),e.OR2([{ALT:n(()=>e.CONSUME(t.This),"ALT")},{ALT:n(()=>e.SUBRULE(e.unqualifiedClassInstanceCreationExpression),"ALT")},{ALT:n(()=>{e.OPTION(()=>{e.SUBRULE(e.typeArguments)}),e.CONSUME(t.Identifier)},"ALT")},{ALT:n(()=>e.SUBRULE(e.templateArgument),"ALT")}])},"ALT")},{ALT:n(()=>e.SUBRULE(e.methodInvocationSuffix),"ALT")},{ALT:n(()=>e.SUBRULE(e.classLiteralSuffix),"ALT")},{ALT:n(()=>e.SUBRULE(e.arrayAccessSuffix),"ALT")},{ALT:n(()=>e.SUBRULE(e.methodReferenceSuffix),"ALT")}])}),e.RULE("fqnOrRefType",()=>{e.SUBRULE(e.fqnOrRefTypePartFirst),e.MANY({GATE:n(()=>{let r=e.LA(2);return!(I(r,t.Class)||I(r,t.This)||I(r,t.New)||I(r,t.StringLiteral)||I(r,t.TextBlock)||I(r,t.StringTemplateBegin)||I(r,t.TextBlockTemplateBegin))},"GATE"),DEF:n(()=>{e.CONSUME(t.Dot),e.SUBRULE2(e.fqnOrRefTypePartRest)},"DEF")}),e.OPTION({GATE:n(()=>I(e.LA(1).tokenType,t.At)||I(e.LA(2).tokenType,t.RSquare),"GATE"),DEF:n(()=>{e.SUBRULE(e.dims)},"DEF")})}),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:n(()=>e.CONSUME(t.Identifier),"ALT")},{ALT:n(()=>e.CONSUME(t.Super),"ALT")}]);let r=!1;I(e.LA(1).tokenType,t.Less)&&(r=this.BACKTRACK_LOOKAHEAD(e.isRefTypeInMethodRef)),e.OPTION2({GATE:n(()=>r,"GATE"),DEF:n(()=>{e.SUBRULE3(e.typeArguments)},"DEF")})}),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:n(()=>e.SUBRULE(e.primitiveCastExpression),"ALT")},{ALT:n(()=>e.SUBRULE(e.referenceTypeCastExpression),"ALT")}])}),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:n(()=>e.SUBRULE(e.lambdaExpression),"ALT")},{ALT:n(()=>e.SUBRULE(e.unaryExpressionNotPlusMinus),"ALT")}])}),e.RULE("newExpression",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.arrayCreationExpression),"ALT")},{ALT:n(()=>e.SUBRULE(e.unqualifiedClassInstanceCreationExpression),"ALT")}])}),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:n(()=>e.SUBRULE(e.diamond),"ALT")},{ALT:n(()=>e.SUBRULE(e.typeArguments),"ALT")}])}),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:n(()=>e.SUBRULE(e.primitiveType),"ALT")},{ALT:n(()=>e.SUBRULE(e.classOrInterfaceType),"ALT")}]),e.OR2([{ALT:n(()=>e.SUBRULE(e.arrayCreationExpressionWithoutInitializerSuffix),"ALT")},{ALT:n(()=>e.SUBRULE(e.arrayCreationWithInitializerSuffix),"ALT")}])}),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:n(()=>I(e.LA(2).tokenType,t.RSquare)===!1,"GATE"),DEF:n(()=>e.SUBRULE2(e.dimExpr),"DEF")})}),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:n(()=>e.CONSUME(t.Identifier),"ALT")},{ALT:n(()=>e.CONSUME(t.New),"ALT")}])}),e.RULE("templateArgument",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.template),"ALT")},{ALT:n(()=>e.CONSUME(t.StringLiteral),"ALT")},{ALT:n(()=>e.CONSUME(t.TextBlock),"ALT")}])}),e.RULE("template",()=>{e.OR([{ALT:n(()=>e.SUBRULE(e.stringTemplate),"ALT")},{ALT:n(()=>e.SUBRULE(e.textBlockTemplate),"ALT")}])}),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:n(()=>e.SUBRULE(e.typePattern),"ALT")},{ALT:n(()=>e.SUBRULE(e.recordPattern),"ALT")}])}),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:n(()=>e.SUBRULE(e.pattern),"ALT")},{ALT:n(()=>e.SUBRULE(e.matchAllPattern),"ALT")}])}),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 o=e.OPTION(()=>{e.SUBRULE(e.dims)}),i=this.LA(1).tokenType;if(I(i,t.ColonColon)?r=!0:o&&(r=!1),e.OPTION2(()=>{e.CONSUME(t.Dot),e.SUBRULE(e.classOrInterfaceType)}),r!==void 0)return r;let a=this.LA(1).tokenType;return I(a,t.ColonColon)})}n(Ch,"defineRules");function Ih(){return this.computeContentAssist("unaryExpressionNotPlusMinus",[]).map(r=>r.nextTokenType).filter((r,o,i)=>i.indexOf(r)===o)}n(Ih,"computeFirstForUnaryExpressionNotPlusMinus");var lo=class extends Zn{static{n(this,"JavaParser")}constructor(){super(xt,{lookaheadStrategy:new so({logging:eo()?()=>{}:void 0}),nodeLocationTracking:"full",skipValidations:eo()});let t=this;t.RULE("typeIdentifier",()=>{t.CONSUME(we.Identifier)}),xh.call(this,t,we),Rh.call(this,t,we),Lh.call(this,t,we),Ah.call(this,t,we),Uh.call(this,t,we),Oh.call(this,t,we),yh.call(this,t,we),Nh.call(this,t,we),Ch.call(this,t,we),this.firstForUnaryExpressionNotPlusMinus=[],this.performSelfAnalysis(),this.firstForUnaryExpressionNotPlusMinus=Ih.call(this)}cstPostNonTerminal(t,r){this.isBackTracking()||super.cstPostNonTerminal(t,r)}BACKTRACK_LOOKAHEAD(t,r=!1){return this.ACTION(()=>{this.isBackTrackingStack.push(1);let o=this.saveRecogState();try{let{ruleName:i,originalGrammarAction:a}=t;try{return this.ruleInvocationStateUpdate(this.fullRuleNameToShort[i],i,this.subruleIdx),a.call(this)}catch(s){return this.invokeRuleCatch(s,!0,()=>{})}finally{this.ruleFinallyStateUpdate()}}catch(i){if(ft(i))return r;throw i}finally{this.reloadRecogState(o),this.isBackTrackingStack.pop()}})}};var Ln=new lo,Mte=Ln.getBaseCstVisitorConstructor(),bte=Ln.getBaseCstVisitorConstructorWithDefaults();function R7(e,t="compilationUnit"){let r=nm.tokenize(e);if(r.errors.length>0){let a=r.errors[0];throw Error("Sad sad panda, lexing errors detected in line: "+a.line+", column: "+a.column+`!
121
+ `+a.message)}let o=r.tokens;Ln.input=o;let i=Ln[t]();if(Ln.errors.length>0){let a=Ln.errors[0];throw Error("Sad sad panda, parsing errors detected in line: "+a.token.startLine+", column: "+a.token.startColumn+`!
122
+ `+a.message+`!
123
+ ->`+a.context.ruleStack.join(`
124
+ ->`))}return i.comments=r.groups.comments,{cst:i,tokens:o}}n(R7,"lexAndParse");function _te(e,t="compilationUnit"){return R7(e,t).cst}n(_te,"parse");export{n as a,R7 as b,_te as c};