@stordata/grammars 1.0.20230421155415

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.cjs ADDED
@@ -0,0 +1,2 @@
1
+ /*! For license information please see main.cjs.LICENSE.txt */
2
+ (()=>{"use strict";var t={92:()=>{}},e={};function n(r){var o=e[r];if(void 0!==o)return o.exports;var i=e[r]={exports:{}};return t[r](i,i.exports,n),i.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var r={};(()=>{function t(e){return(t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(e)}function e(e,n){for(var r=0;r<n.length;r++){var o=n[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,(i=function(e,n){if("object"!==t(e)||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var o=r.call(e,"string");if("object"!==t(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(o.key),"symbol"===t(i)?i:String(i)),o)}var i}n.d(r,{dx:()=>le,q2:()=>Xr,FO:()=>Au,xf:()=>Vu,Gy:()=>Wu,s4:()=>yo,c7:()=>rc,_7:()=>Ki,gp:()=>bu,cK:()=>$r,zs:()=>lu,AV:()=>Vu,Xp:()=>A,VS:()=>I,ul:()=>ae,hW:()=>Bo,x1:()=>gi,z5:()=>ji,oN:()=>$i,TB:()=>Zi,u1:()=>eu,_b:()=>fc,$F:()=>Li,_T:()=>_c,db:()=>Fi,Zx:()=>Pi,_x:()=>jo,r8:()=>Lt,JI:()=>Ot,TP:()=>Pt,WU:()=>o,Nj:()=>p,ZP:()=>Pc});var o=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.source=null,this.type=null,this.channel=null,this.start=null,this.stop=null,this.tokenIndex=null,this.line=null,this.column=null,this._text=null}var n,r;return n=t,(r=[{key:"getTokenSource",value:function(){return this.source[0]}},{key:"getInputStream",value:function(){return this.source[1]}},{key:"text",get:function(){return this._text},set:function(t){this._text=t}}])&&e(n.prototype,r),Object.defineProperty(n,"prototype",{writable:!1}),t}();function i(t,e){if(!Array.isArray(t)||!Array.isArray(e))return!1;if(t===e)return!0;if(t.length!==e.length)return!1;for(var n=0;n<t.length;n++)if(!(t[n]===e[n]||t[n].equals&&t[n].equals(e[n])))return!1;return!0}function u(t){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},u(t)}function c(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==u(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===u(o)?o:String(o)),r)}var o}o.INVALID_TYPE=0,o.EPSILON=-2,o.MIN_USER_TOKEN_TYPE=1,o.EOF=-1,o.DEFAULT_CHANNEL=0,o.HIDDEN_CHANNEL=1;var a=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.count=0,this.hash=0}var e,n,r;return e=t,n=[{key:"update",value:function(){for(var t=0;t<arguments.length;t++){var e=arguments[t];if(null!=e)if(Array.isArray(e))this.update.apply(this,e);else{var n=0;switch(u(e)){case"undefined":case"function":continue;case"number":case"boolean":n=e;break;case"string":n=e.hashCode();break;default:e.updateHashCode?e.updateHashCode(this):console.log("No updateHashCode for "+e.toString());continue}n=(n*=3432918353)<<15|n>>>17,n*=461845907,this.count=this.count+1;var r=this.hash^n;r=5*(r=r<<13|r>>>19)+3864292196,this.hash=r}}}},{key:"finish",value:function(){var t=this.hash^4*this.count;return t^=t>>>16,t*=2246822507,t^=t>>>13,(t*=3266489909)^t>>>16}}],r=[{key:"hashStuff",value:function(){var e=new t;return e.update.apply(e,arguments),e.finish()}}],n&&c(e.prototype,n),r&&c(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function s(t){return t?t.hashCode():-1}function l(t,e){return t?t.equals(e):t===e}function f(t){return null===t?"null":t}function p(t){return Array.isArray(t)?"["+t.map(f).join(", ")+"]":"null"}function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}var h="h-",b=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data={},this.hashFunction=e||s,this.equalsFunction=n||l}var e,n;return e=t,(n=[{key:"add",value:function(t){var e=h+this.hashFunction(t);if(e in this.data){for(var n=this.data[e],r=0;r<n.length;r++)if(this.equalsFunction(t,n[r]))return n[r];return n.push(t),t}return this.data[e]=[t],t}},{key:"has",value:function(t){return null!=this.get(t)}},{key:"get",value:function(t){var e=h+this.hashFunction(t);if(e in this.data)for(var n=this.data[e],r=0;r<n.length;r++)if(this.equalsFunction(t,n[r]))return n[r];return null}},{key:"values",value:function(){var t=this;return Object.keys(this.data).filter((function(t){return t.startsWith(h)})).flatMap((function(e){return t.data[e]}),this)}},{key:"toString",value:function(){return p(this.values())}},{key:"length",get:function(){var t=this;return Object.keys(this.data).filter((function(t){return t.startsWith(h)})).map((function(e){return t.data[e].length}),this).reduce((function(t,e){return t+e}),0)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==y(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===y(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}function m(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=g(t);if(e){var o=g(this).constructor;n=Reflect.construct(r,arguments,o)}else n=r.apply(this,arguments);return function(t,e){if(e&&("object"===S(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,n)}}function g(t){return g=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},g(t)}function S(t){return S="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},S(t)}function O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function w(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==S(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==S(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===S(o)?o:String(o)),r)}var o}function _(t,e,n){return e&&w(t.prototype,e),n&&w(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}var T=function(){function t(){O(this,t)}return _(t,[{key:"hashCode",value:function(){var t=new a;return this.updateHashCode(t),t.finish()}},{key:"evaluate",value:function(t,e){}},{key:"evalPrecedence",value:function(t,e){return this}}],[{key:"andContext",value:function(e,n){if(null===e||e===t.NONE)return n;if(null===n||n===t.NONE)return e;var r=new P(e,n);return 1===r.opnds.length?r.opnds[0]:r}},{key:"orContext",value:function(e,n){if(null===e)return n;if(null===n)return e;if(e===t.NONE||n===t.NONE)return t.NONE;var r=new E(e,n);return 1===r.opnds.length?r.opnds[0]:r}}]),t}(),P=function(t){v(n,t);var e=m(n);function n(t,r){var o;O(this,n),o=e.call(this);var i=new b;t instanceof n?t.opnds.map((function(t){i.add(t)})):i.add(t),r instanceof n?r.opnds.map((function(t){i.add(t)})):i.add(r);var u=x(i);if(u.length>0){var c=null;u.map((function(t){(null===c||t.precedence<c.precedence)&&(c=t)})),i.add(c)}return o.opnds=Array.from(i.values()),o}return _(n,[{key:"equals",value:function(t){return this===t||t instanceof n&&i(this.opnds,t.opnds)}},{key:"updateHashCode",value:function(t){t.update(this.opnds,"AND")}},{key:"evaluate",value:function(t,e){for(var n=0;n<this.opnds.length;n++)if(!this.opnds[n].evaluate(t,e))return!1;return!0}},{key:"evalPrecedence",value:function(t,e){for(var n=!1,r=[],o=0;o<this.opnds.length;o++){var i=this.opnds[o],u=i.evalPrecedence(t,e);if(n|=u!==i,null===u)return null;u!==T.NONE&&r.push(u)}if(!n)return this;if(0===r.length)return T.NONE;var c=null;return r.map((function(t){c=null===c?t:T.andContext(c,t)})),c}},{key:"toString",value:function(){var t=this.opnds.map((function(t){return t.toString()}));return(t.length>3?t.slice(3):t).join("&&")}}]),n}(T),E=function(t){v(n,t);var e=m(n);function n(t,r){var o;O(this,n),o=e.call(this);var i=new b;t instanceof n?t.opnds.map((function(t){i.add(t)})):i.add(t),r instanceof n?r.opnds.map((function(t){i.add(t)})):i.add(r);var u=x(i);if(u.length>0){var c=u.sort((function(t,e){return t.compareTo(e)})),a=c[c.length-1];i.add(a)}return o.opnds=Array.from(i.values()),o}return _(n,[{key:"equals",value:function(t){return this===t||t instanceof n&&i(this.opnds,t.opnds)}},{key:"updateHashCode",value:function(t){t.update(this.opnds,"OR")}},{key:"evaluate",value:function(t,e){for(var n=0;n<this.opnds.length;n++)if(this.opnds[n].evaluate(t,e))return!0;return!1}},{key:"evalPrecedence",value:function(t,e){for(var n=!1,r=[],o=0;o<this.opnds.length;o++){var i=this.opnds[o],u=i.evalPrecedence(t,e);if(n|=u!==i,u===T.NONE)return T.NONE;null!==u&&r.push(u)}return n?(0===r.length||r.map((function(t){return t})),null):this}},{key:"toString",value:function(){var t=this.opnds.map((function(t){return t.toString()}));return(t.length>3?t.slice(3):t).join("||")}}]),n}(T);function x(t){var e=[];return t.values().map((function(t){t instanceof T.PrecedencePredicate&&e.push(t)})),e}function k(t){return k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},k(t)}function j(t,e){if(null===t){var n={state:null,alt:null,context:null,semanticContext:null};return e&&(n.reachesIntoOuterContext=0),n}var r={};return r.state=t.state||null,r.alt=void 0===t.alt?null:t.alt,r.context=t.context||null,r.semanticContext=t.semanticContext||null,e&&(r.reachesIntoOuterContext=t.reachesIntoOuterContext||0,r.precedenceFilterSuppressed=t.precedenceFilterSuppressed||!1),r}var R=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.checkContext(e,n),e=j(e),n=j(n,!0),this.state=null!==e.state?e.state:n.state,this.alt=null!==e.alt?e.alt:n.alt,this.context=null!==e.context?e.context:n.context,this.semanticContext=null!==e.semanticContext?e.semanticContext:null!==n.semanticContext?n.semanticContext:T.NONE,this.reachesIntoOuterContext=n.reachesIntoOuterContext,this.precedenceFilterSuppressed=n.precedenceFilterSuppressed}var e,n;return e=t,(n=[{key:"checkContext",value:function(t,e){null!==t.context&&void 0!==t.context||null!==e&&null!==e.context&&void 0!==e.context||(this.context=null)}},{key:"hashCode",value:function(){var t=new a;return this.updateHashCode(t),t.finish()}},{key:"updateHashCode",value:function(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext)}},{key:"equals",value:function(e){return this===e||e instanceof t&&this.state.stateNumber===e.state.stateNumber&&this.alt===e.alt&&(null===this.context?null===e.context:this.context.equals(e.context))&&this.semanticContext.equals(e.semanticContext)&&this.precedenceFilterSuppressed===e.precedenceFilterSuppressed}},{key:"hashCodeForConfigSet",value:function(){var t=new a;return t.update(this.state.stateNumber,this.alt,this.semanticContext),t.finish()}},{key:"equalsForConfigSet",value:function(e){return this===e||e instanceof t&&this.state.stateNumber===e.state.stateNumber&&this.alt===e.alt&&this.semanticContext.equals(e.semanticContext)}},{key:"toString",value:function(){return"("+this.state+","+this.alt+(null!==this.context?",["+this.context.toString()+"]":"")+(this.semanticContext!==T.NONE?","+this.semanticContext.toString():"")+(this.reachesIntoOuterContext>0?",up="+this.reachesIntoOuterContext:"")+")"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==k(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==k(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===k(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}var A=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.start=e,this.stop=n}var e,n;return e=t,(n=[{key:"clone",value:function(){return new t(this.start,this.stop)}},{key:"contains",value:function(t){return t>=this.start&&t<this.stop}},{key:"toString",value:function(){return this.start===this.stop-1?this.start.toString():this.start.toString()+".."+(this.stop-1).toString()}},{key:"length",get:function(){return this.stop-this.start}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==C(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===C(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function N(t){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}A.INVALID_INTERVAL=new A(-1,-2);var I=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.intervals=null,this.readOnly=!1}var e,n;return e=t,(n=[{key:"first",value:function(t){return null===this.intervals||0===this.intervals.length?o.INVALID_TYPE:this.intervals[0].start}},{key:"addOne",value:function(t){this.addInterval(new A(t,t+1))}},{key:"addRange",value:function(t,e){this.addInterval(new A(t,e+1))}},{key:"addInterval",value:function(t){if(null===this.intervals)this.intervals=[],this.intervals.push(t.clone());else{for(var e=0;e<this.intervals.length;e++){var n=this.intervals[e];if(t.stop<n.start)return void this.intervals.splice(e,0,t);if(t.stop===n.start)return void(this.intervals[e]=new A(t.start,n.stop));if(t.start<=n.stop)return this.intervals[e]=new A(Math.min(n.start,t.start),Math.max(n.stop,t.stop)),void this.reduce(e)}this.intervals.push(t.clone())}}},{key:"addSet",value:function(t){var e=this;return null!==t.intervals&&t.intervals.forEach((function(t){return e.addInterval(t)}),this),this}},{key:"reduce",value:function(t){if(t<this.intervals.length-1){var e=this.intervals[t],n=this.intervals[t+1];e.stop>=n.stop?(this.intervals.splice(t+1,1),this.reduce(t)):e.stop>=n.start&&(this.intervals[t]=new A(e.start,n.stop),this.intervals.splice(t+1,1))}}},{key:"complement",value:function(e,n){var r=new t;return r.addInterval(new A(e,n+1)),null!==this.intervals&&this.intervals.forEach((function(t){return r.removeRange(t)})),r}},{key:"contains",value:function(t){if(null===this.intervals)return!1;for(var e=0;e<this.intervals.length;e++)if(this.intervals[e].contains(t))return!0;return!1}},{key:"removeRange",value:function(t){if(t.start===t.stop-1)this.removeOne(t.start);else if(null!==this.intervals)for(var e=0,n=0;n<this.intervals.length;n++){var r=this.intervals[e];if(t.stop<=r.start)return;if(t.start>r.start&&t.stop<r.stop){this.intervals[e]=new A(r.start,t.start);var o=new A(t.stop,r.stop);return void this.intervals.splice(e,0,o)}t.start<=r.start&&t.stop>=r.stop?(this.intervals.splice(e,1),e-=1):t.start<r.stop?this.intervals[e]=new A(r.start,t.start):t.stop<r.stop&&(this.intervals[e]=new A(t.stop,r.stop)),e+=1}}},{key:"removeOne",value:function(t){if(null!==this.intervals)for(var e=0;e<this.intervals.length;e++){var n=this.intervals[e];if(t<n.start)return;if(t===n.start&&t===n.stop-1)return void this.intervals.splice(e,1);if(t===n.start)return void(this.intervals[e]=new A(n.start+1,n.stop));if(t===n.stop-1)return void(this.intervals[e]=new A(n.start,n.stop-1));if(t<n.stop-1){var r=new A(n.start,t);return n.start=t+1,void this.intervals.splice(e,0,r)}}}},{key:"toString",value:function(t,e,n){return t=t||null,e=e||null,n=n||!1,null===this.intervals?"{}":null!==t||null!==e?this.toTokenString(t,e):n?this.toCharString():this.toIndexString()}},{key:"toCharString",value:function(){for(var t=[],e=0;e<this.intervals.length;e++){var n=this.intervals[e];n.stop===n.start+1?n.start===o.EOF?t.push("<EOF>"):t.push("'"+String.fromCharCode(n.start)+"'"):t.push("'"+String.fromCharCode(n.start)+"'..'"+String.fromCharCode(n.stop-1)+"'")}return t.length>1?"{"+t.join(", ")+"}":t[0]}},{key:"toIndexString",value:function(){for(var t=[],e=0;e<this.intervals.length;e++){var n=this.intervals[e];n.stop===n.start+1?n.start===o.EOF?t.push("<EOF>"):t.push(n.start.toString()):t.push(n.start.toString()+".."+(n.stop-1).toString())}return t.length>1?"{"+t.join(", ")+"}":t[0]}},{key:"toTokenString",value:function(t,e){for(var n=[],r=0;r<this.intervals.length;r++)for(var o=this.intervals[r],i=o.start;i<o.stop;i++)n.push(this.elementName(t,e,i));return n.length>1?"{"+n.join(", ")+"}":n[0]}},{key:"elementName",value:function(t,e,n){return n===o.EOF?"<EOF>":n===o.EPSILON?"<EPSILON>":t[n]||e[n]}},{key:"length",get:function(){return this.intervals.map((function(t){return t.length})).reduce((function(t,e){return t+e}))}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==N(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==N(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===N(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function L(t){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},L(t)}var D=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.atn=null,this.stateNumber=t.INVALID_STATE_NUMBER,this.stateType=null,this.ruleIndex=0,this.epsilonOnlyTransitions=!1,this.transitions=[],this.nextTokenWithinRule=null}var e,n;return e=t,(n=[{key:"toString",value:function(){return this.stateNumber}},{key:"equals",value:function(e){return e instanceof t&&this.stateNumber===e.stateNumber}},{key:"isNonGreedyExitState",value:function(){return!1}},{key:"addTransition",value:function(t,e){void 0===e&&(e=-1),0===this.transitions.length?this.epsilonOnlyTransitions=t.isEpsilon:this.epsilonOnlyTransitions!==t.isEpsilon&&(this.epsilonOnlyTransitions=!1),-1===e?this.transitions.push(t):this.transitions.splice(e,1,t)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==L(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==L(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===L(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function F(t){return F="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},F(t)}function B(t,e){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},B(t,e)}function M(t,e){if(e&&("object"===F(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return U(t)}function U(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function V(t){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},V(t)}D.INVALID_TYPE=0,D.BASIC=1,D.RULE_START=2,D.BLOCK_START=3,D.PLUS_BLOCK_START=4,D.STAR_BLOCK_START=5,D.TOKEN_START=6,D.RULE_STOP=7,D.BLOCK_END=8,D.STAR_LOOP_BACK=9,D.STAR_LOOP_ENTRY=10,D.PLUS_LOOP_BACK=11,D.LOOP_END=12,D.serializationNames=["INVALID","BASIC","RULE_START","BLOCK_START","PLUS_BLOCK_START","STAR_BLOCK_START","TOKEN_START","RULE_STOP","BLOCK_END","STAR_LOOP_BACK","STAR_LOOP_ENTRY","PLUS_LOOP_BACK","LOOP_END"],D.INVALID_STATE_NUMBER=-1;var H=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&B(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=V(n);if(r){var o=V(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return M(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).stateType=D.RULE_STOP,M(t,U(t))}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(D);var q=function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e)throw"target cannot be null.";this.target=e,this.isEpsilon=!1,this.label=null}));function Y(t){return Y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Y(t)}function z(t,e){return z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},z(t,e)}function K(t){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},K(t)}q.EPSILON=1,q.RANGE=2,q.RULE=3,q.PREDICATE=4,q.ATOM=5,q.ACTION=6,q.SET=7,q.NOT_SET=8,q.WILDCARD=9,q.PRECEDENCE=10,q.serializationNames=["INVALID","EPSILON","RANGE","RULE","PREDICATE","ATOM","ACTION","SET","NOT_SET","WILDCARD","PRECEDENCE"],q.serializationTypes={EpsilonTransition:q.EPSILON,RangeTransition:q.RANGE,RuleTransition:q.RULE,PredicateTransition:q.PREDICATE,AtomTransition:q.ATOM,ActionTransition:q.ACTION,SetTransition:q.SET,NotSetTransition:q.NOT_SET,WildcardTransition:q.WILDCARD,PrecedencePredicateTransition:q.PRECEDENCE};var G=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&z(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=K(r);if(o){var n=K(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e,n,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(o=i.call(this,t)).ruleIndex=e,o.precedence=n,o.followState=r,o.serializationType=q.RULE,o.isEpsilon=!0,o}return e=u,(n=[{key:"matches",value:function(t,e,n){return!1}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Y(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Y(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(q);function W(t){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W(t)}function X(t,e){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},X(t,e)}function Q(t){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Q(t)}var $=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&X(t,e)}(c,t);var e,n,r,i,u=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Q(r);if(i){var n=Q(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===W(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(n=u.call(this,t)).serializationType=q.SET,null!=e?n.label=e:(n.label=new I,n.label.addOne(o.INVALID_TYPE)),n}return e=c,(n=[{key:"matches",value:function(t,e,n){return this.label.contains(t)}},{key:"toString",value:function(){return this.label.toString()}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==W(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==W(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===W(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(q);function J(t){return J="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},J(t)}function Z(){return Z="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=et(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Z.apply(this,arguments)}function tt(t,e){return tt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tt(t,e)}function et(t){return et=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},et(t)}var nt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tt(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=et(r);if(o){var n=et(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===J(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(n=i.call(this,t,e)).serializationType=q.NOT_SET,n}return e=u,(n=[{key:"matches",value:function(t,e,n){return t>=e&&t<=n&&!Z(et(u.prototype),"matches",this).call(this,t,e,n)}},{key:"toString",value:function(){return"~"+Z(et(u.prototype),"toString",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==J(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==J(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===J(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}($);function rt(t){return rt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rt(t)}function ot(t,e){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ot(t,e)}function it(t){return it=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},it(t)}var ut=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ot(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=it(r);if(o){var n=it(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===rt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(e=i.call(this,t)).serializationType=q.WILDCARD,e}return e=u,(n=[{key:"matches",value:function(t,e,n){return t>=e&&t<=n}},{key:"toString",value:function(){return"."}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==rt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==rt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===rt(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(q);function ct(t){return ct="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ct(t)}function at(t,e){return at=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},at(t,e)}function st(t){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},st(t)}var lt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&at(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=st(n);if(r){var o=st(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ct(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t)}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(q);function ft(t){return ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ft(t)}function pt(t,e){return pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pt(t,e)}function yt(t){return yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yt(t)}function ht(t){return ht="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ht(t)}function bt(t,e){return bt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bt(t,e)}function vt(t){return vt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vt(t)}var dt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bt(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=vt(n);if(r){var o=vt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ht(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pt(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=yt(n);if(r){var o=yt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ft(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}))));function mt(t){return mt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mt(t)}function gt(t,e){return gt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},gt(t,e)}function St(t){return St=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},St(t)}var Ot=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&gt(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=St(r);if(o){var n=St(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===mt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),i.apply(this,arguments)}return e=u,(n=[{key:"ruleContext",get:function(){throw new Error("missing interface implementation")}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==mt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==mt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===mt(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(dt);function wt(t){return wt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wt(t)}function _t(t,e){return _t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_t(t,e)}function Tt(t){return Tt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Tt(t)}var Pt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_t(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Tt(n);if(r){var o=Tt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===wt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(dt);function Et(t){return Et="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Et(t)}function xt(t,e){return xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xt(t,e)}function kt(t){return kt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},kt(t)}var jt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xt(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=kt(n);if(r){var o=kt(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Et(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.apply(this,arguments)}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(Pt),Rt={toStringTree:function(t,e,n){e=e||null,null!==(n=n||null)&&(e=n.ruleNames);var r=Rt.getNodeText(t,e);r=function(t,e){return t.replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\r/g,"\\r")}(r);var o=t.getChildCount();if(0===o)return r;var i="("+r+" ";o>0&&(r=Rt.toStringTree(t.getChild(0),e),i=i.concat(r));for(var u=1;u<o;u++)r=Rt.toStringTree(t.getChild(u),e),i=i.concat(" "+r);return i.concat(")")},getNodeText:function(t,e,n){if(e=e||null,null!==(n=n||null)&&(e=n.ruleNames),null!==e){if(t instanceof Ot){var r=t.ruleContext.getAltNumber();return 0!=r?e[t.ruleIndex]+":"+r:e[t.ruleIndex]}if(t instanceof jt)return t.toString();if(t instanceof Pt&&null!==t.symbol)return t.symbol.text}var i=t.getPayload();return i instanceof o?i.text:t.getPayload().toString()},getChildren:function(t){for(var e=[],n=0;n<t.getChildCount();n++)e.push(t.getChild(n));return e},getAncestors:function(t){var e=[];for(t=t.getParent();null!==t;)e=[t].concat(e),t=t.getParent();return e},findAllTokenNodes:function(t,e){return Rt.findAllNodes(t,e,!0)},findAllRuleNodes:function(t,e){return Rt.findAllNodes(t,e,!1)},findAllNodes:function(t,e,n){var r=[];return Rt._findAllNodes(t,e,n,r),r},_findAllNodes:function(t,e,n,r){n&&t instanceof Pt?t.symbol.type===e&&r.push(t):!n&&t instanceof Ot&&t.ruleIndex===e&&r.push(t);for(var o=0;o<t.getChildCount();o++)Rt._findAllNodes(t.getChild(o),e,n,r)},descendants:function(t){for(var e=[t],n=0;n<t.getChildCount();n++)e=e.concat(Rt.descendants(t.getChild(n)));return e}};const Ct=Rt;function At(t){return At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},At(t)}function Nt(t,e){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Nt(t,e)}function It(t){return It=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},It(t)}var Lt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nt(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=It(r);if(o){var n=It(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===At(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(n=i.call(this)).parentCtx=t||null,n.invokingState=e||-1,n}return e=u,(n=[{key:"depth",value:function(){for(var t=0,e=this;null!==e;)e=e.parentCtx,t+=1;return t}},{key:"isEmpty",value:function(){return-1===this.invokingState}},{key:"getSourceInterval",value:function(){return A.INVALID_INTERVAL}},{key:"ruleContext",get:function(){return this}},{key:"getPayload",value:function(){return this}},{key:"getText",value:function(){return 0===this.getChildCount()?"":this.children.map((function(t){return t.getText()})).join("")}},{key:"getAltNumber",value:function(){return 0}},{key:"setAltNumber",value:function(t){}},{key:"getChild",value:function(t){return null}},{key:"getChildCount",value:function(){return 0}},{key:"accept",value:function(t){return t.visitChildren(this)}},{key:"toStringTree",value:function(t,e){return Ct.toStringTree(this,t,e)}},{key:"toString",value:function(t,e){t=t||null,e=e||null;for(var n=this,r="[";null!==n&&n!==e;){if(null===t)n.isEmpty()||(r+=n.invokingState);else{var o=n.ruleIndex;r+=o>=0&&o<t.length?t[o]:""+o}null===n.parentCtx||null===t&&n.parentCtx.isEmpty()||(r+=" "),n=n.parentCtx}return r+"]"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==At(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==At(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===At(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(Ot);function Dt(t){return Dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dt(t)}var Ft=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.cachedHashCode=e}var e,n;return e=t,(n=[{key:"isEmpty",value:function(){return this===t.EMPTY}},{key:"hasEmptyPath",value:function(){return this.getReturnState(this.length-1)===t.EMPTY_RETURN_STATE}},{key:"hashCode",value:function(){return this.cachedHashCode}},{key:"updateHashCode",value:function(t){t.update(this.cachedHashCode)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Dt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Dt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Dt(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Bt(t){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(t)}function Mt(t,e){return Mt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Mt(t,e)}function Ut(t,e){if(e&&("object"===Bt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Vt(t)}function Vt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ht(t){return Ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ht(t)}Ft.EMPTY=null,Ft.EMPTY_RETURN_STATE=2147483647,Ft.globalNodeCount=1,Ft.id=Ft.globalNodeCount,Ft.trace_atn_sim=!1;var qt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mt(t,e)}(c,t);var e,n,r,o,u=(r=c,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ht(r);if(o){var n=Ht(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return Ut(this,t)});function c(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c);var r=new a;r.update(t,e);var o=r.finish();return(n=u.call(this,o)).parents=t,n.returnStates=e,Ut(n,Vt(n))}return e=c,(n=[{key:"isEmpty",value:function(){return this.returnStates[0]===Ft.EMPTY_RETURN_STATE}},{key:"getParent",value:function(t){return this.parents[t]}},{key:"getReturnState",value:function(t){return this.returnStates[t]}},{key:"equals",value:function(t){return this===t||t instanceof c&&this.hashCode()===t.hashCode()&&i(this.returnStates,t.returnStates)&&i(this.parents,t.parents)}},{key:"toString",value:function(){if(this.isEmpty())return"[]";for(var t="[",e=0;e<this.returnStates.length;e++)e>0&&(t+=", "),this.returnStates[e]!==Ft.EMPTY_RETURN_STATE?(t+=this.returnStates[e],null!==this.parents[e]?t=t+" "+this.parents[e]:t+="null"):t+="$";return t+"]"}},{key:"length",get:function(){return this.returnStates.length}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Bt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Bt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Bt(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(Ft);function Yt(t){return Yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Yt(t)}function zt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Yt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Yt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Yt(o)?o:String(o)),r)}var o}function Kt(t,e){return Kt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Kt(t,e)}function Gt(t){return Gt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Gt(t)}var Wt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kt(t,e)}(c,t);var e,n,r,o,i,u=(o=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Gt(o);if(i){var n=Gt(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Yt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c);var r,o=new a;return null!==t?o.update(t,e):o.update(1),r=o.finish(),(n=u.call(this,r)).parentCtx=t,n.returnState=e,n}return e=c,r=[{key:"create",value:function(t,e){return e===Ft.EMPTY_RETURN_STATE&&null===t?Ft.EMPTY:new c(t,e)}}],(n=[{key:"getParent",value:function(t){return this.parentCtx}},{key:"getReturnState",value:function(t){return this.returnState}},{key:"equals",value:function(t){return this===t||t instanceof c&&this.hashCode()===t.hashCode()&&this.returnState===t.returnState&&(null==this.parentCtx?null==t.parentCtx:this.parentCtx.equals(t.parentCtx))}},{key:"toString",value:function(){var t=null===this.parentCtx?"":this.parentCtx.toString();return 0===t.length?this.returnState===Ft.EMPTY_RETURN_STATE?"$":""+this.returnState:this.returnState+" "+t}},{key:"length",get:function(){return 1}}])&&zt(e.prototype,n),r&&zt(e,r),Object.defineProperty(e,"prototype",{writable:!1}),c}(Ft);function Xt(t){return Xt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xt(t)}function Qt(t,e){return Qt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qt(t,e)}function $t(t){return $t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$t(t)}var Jt=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qt(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=$t(r);if(o){var n=$t(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Xt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),i.call(this,null,Ft.EMPTY_RETURN_STATE)}return e=u,(n=[{key:"isEmpty",value:function(){return!0}},{key:"getParent",value:function(t){return null}},{key:"getReturnState",value:function(t){return this.returnState}},{key:"equals",value:function(t){return this===t}},{key:"toString",value:function(){return"$"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Xt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Xt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Xt(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(Wt);function Zt(t){return Zt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Zt(t)}Ft.EMPTY=new Jt;var te="h-",ee=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data={},this.hashFunction=e||s,this.equalsFunction=n||l}var e,n;return e=t,(n=[{key:"set",value:function(t,e){var n=te+this.hashFunction(t);if(n in this.data){for(var r=this.data[n],o=0;o<r.length;o++){var i=r[o];if(this.equalsFunction(t,i.key)){var u=i.value;return i.value=e,u}}return r.push({key:t,value:e}),e}return this.data[n]=[{key:t,value:e}],e}},{key:"containsKey",value:function(t){var e=te+this.hashFunction(t);if(e in this.data)for(var n=this.data[e],r=0;r<n.length;r++){var o=n[r];if(this.equalsFunction(t,o.key))return!0}return!1}},{key:"get",value:function(t){var e=te+this.hashFunction(t);if(e in this.data)for(var n=this.data[e],r=0;r<n.length;r++){var o=n[r];if(this.equalsFunction(t,o.key))return o.value}return null}},{key:"entries",value:function(){var t=this;return Object.keys(this.data).filter((function(t){return t.startsWith(te)})).flatMap((function(e){return t.data[e]}),this)}},{key:"getKeys",value:function(){return this.entries().map((function(t){return t.key}))}},{key:"getValues",value:function(){return this.entries().map((function(t){return t.value}))}},{key:"toString",value:function(){return"["+this.entries().map((function(t){return"{"+t.key+":"+t.value+"}"})).join(", ")+"]"}},{key:"length",get:function(){var t=this;return Object.keys(this.data).filter((function(t){return t.startsWith(te)})).map((function(e){return t.data[e].length}),this).reduce((function(t,e){return t+e}),0)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Zt(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Zt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Zt(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ne(t,e){if(null==e&&(e=Lt.EMPTY),null===e.parentCtx||e===Lt.EMPTY)return Ft.EMPTY;var n=ne(t,e.parentCtx),r=t.states[e.invokingState].transitions[0];return Wt.create(n,r.followState.stateNumber)}function re(t,e,n){if(t.isEmpty())return t;var r,o=n.get(t)||null;if(null!==o)return o;if(null!==(o=e.get(t)))return n.set(t,o),o;for(var i=!1,u=[],c=0;c<u.length;c++){var a=re(t.getParent(c),e,n);if(i||a!==t.getParent(c)){if(!i){u=[];for(var s=0;s<t.length;s++)u[s]=t.getParent(s);i=!0}u[c]=a}}return i?(r=0===u.length?Ft.EMPTY:1===u.length?Wt.create(u[0],t.getReturnState(0)):new qt(u,t.returnStates),e.add(r),n.set(r,r),n.set(t,r),r):(e.add(t),n.set(t,t),t)}function oe(t,e,n,r){if(t===e)return t;if(t instanceof Wt&&e instanceof Wt)return function(t,e,n,r){if(null!==r){var o=r.get(t,e);if(null!==o)return o;if(null!==(o=r.get(e,t)))return o}var i=function(t,e,n){if(n){if(t===Ft.EMPTY)return Ft.EMPTY;if(e===Ft.EMPTY)return Ft.EMPTY}else{if(t===Ft.EMPTY&&e===Ft.EMPTY)return Ft.EMPTY;if(t===Ft.EMPTY){var r=[e.returnState,Ft.EMPTY_RETURN_STATE],o=[e.parentCtx,null];return new qt(o,r)}if(e===Ft.EMPTY){var i=[t.returnState,Ft.EMPTY_RETURN_STATE],u=[t.parentCtx,null];return new qt(u,i)}}return null}(t,e,n);if(null!==i)return null!==r&&r.set(t,e,i),i;if(t.returnState===e.returnState){var u=oe(t.parentCtx,e.parentCtx,n,r);if(u===t.parentCtx)return t;if(u===e.parentCtx)return e;var c=Wt.create(u,t.returnState);return null!==r&&r.set(t,e,c),c}var a=null;if((t===e||null!==t.parentCtx&&t.parentCtx===e.parentCtx)&&(a=t.parentCtx),null!==a){var s=[t.returnState,e.returnState];t.returnState>e.returnState&&(s[0]=e.returnState,s[1]=t.returnState);var l=new qt([a,a],s);return null!==r&&r.set(t,e,l),l}var f=[t.returnState,e.returnState],p=[t.parentCtx,e.parentCtx];t.returnState>e.returnState&&(f[0]=e.returnState,f[1]=t.returnState,p=[e.parentCtx,t.parentCtx]);var y=new qt(p,f);return null!==r&&r.set(t,e,y),y}(t,e,n,r);if(n){if(t instanceof Jt)return t;if(e instanceof Jt)return e}return t instanceof Wt&&(t=new qt([t.getParent()],[t.returnState])),e instanceof Wt&&(e=new qt([e.getParent()],[e.returnState])),function(t,e,n,r){if(null!==r){var o=r.get(t,e);if(null!==o)return Ft.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),o;if(null!==(o=r.get(e,t)))return Ft.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> previous"),o}for(var i=0,u=0,c=0,a=new Array(t.returnStates.length+e.returnStates.length).fill(0),s=new Array(t.returnStates.length+e.returnStates.length).fill(null);i<t.returnStates.length&&u<e.returnStates.length;){var l=t.parents[i],f=e.parents[u];if(t.returnStates[i]===e.returnStates[u]){var p=t.returnStates[i];p===Ft.EMPTY_RETURN_STATE&&null===l&&null===f||null!==l&&null!==f&&l===f?(s[c]=l,a[c]=p):(s[c]=oe(l,f,n,r),a[c]=p),i+=1,u+=1}else t.returnStates[i]<e.returnStates[u]?(s[c]=l,a[c]=t.returnStates[i],i+=1):(s[c]=f,a[c]=e.returnStates[u],u+=1);c+=1}if(i<t.returnStates.length)for(var y=i;y<t.returnStates.length;y++)s[c]=t.parents[y],a[c]=t.returnStates[y],c+=1;else for(var h=u;h<e.returnStates.length;h++)s[c]=e.parents[h],a[c]=e.returnStates[h],c+=1;if(c<s.length){if(1===c){var b=Wt.create(s[0],a[0]);return null!==r&&r.set(t,e,b),b}s=s.slice(0,c),a=a.slice(0,c)}var v=new qt(s,a);return v.equals(t)?(null!==r&&r.set(t,e,t),Ft.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> a"),t):v.equals(e)?(null!==r&&r.set(t,e,e),Ft.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> b"),e):(function(t){for(var e=new ee,n=0;n<t.length;n++){var r=t[n];e.containsKey(r)||e.set(r,r)}for(var o=0;o<t.length;o++)t[o]=e.get(t[o])}(s),null!==r&&r.set(t,e,v),Ft.trace_atn_sim&&console.log("mergeArrays a="+t+",b="+e+" -> "+v),v)}(t,e,n,r)}function ie(t){return ie="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ie(t)}var ue=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data=[]}var e,n;return e=t,(n=[{key:"add",value:function(t){this.data[t]=!0}},{key:"or",value:function(t){var e=this;Object.keys(t.data).map((function(t){return e.add(t)}),this)}},{key:"remove",value:function(t){delete this.data[t]}},{key:"has",value:function(t){return!0===this.data[t]}},{key:"values",value:function(){return Object.keys(this.data)}},{key:"minValue",value:function(){return Math.min.apply(null,this.values())}},{key:"hashCode",value:function(){return a.hashStuff(this.values())}},{key:"equals",value:function(e){return e instanceof t&&i(this.data,e.data)}},{key:"toString",value:function(){return"{"+this.values().join(", ")+"}"}},{key:"length",get:function(){return this.values().length}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==ie(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ie(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===ie(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function ce(t){return ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ce(t)}var ae=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.atn=e}var e,n;return e=t,(n=[{key:"getDecisionLookahead",value:function(e){if(null===e)return null;for(var n=e.transitions.length,r=[],o=0;o<n;o++){r[o]=new I;var i=new b;this._LOOK(e.transition(o).target,null,Ft.EMPTY,r[o],i,new ue,!1,!1),(0===r[o].length||r[o].contains(t.HIT_PRED))&&(r[o]=null)}return r}},{key:"LOOK",value:function(t,e,n){var r=new I,o=null!==(n=n||null)?ne(t.atn,n):null;return this._LOOK(t,e,o,r,new b,new ue,!0,!0),r}},{key:"_LOOK",value:function(e,n,r,i,u,c,a,s){var l=new R({state:e,alt:0,context:r},null);if(!u.has(l)){if(u.add(l),e===n){if(null===r)return void i.addOne(o.EPSILON);if(r.isEmpty()&&s)return void i.addOne(o.EOF)}if(e instanceof H){if(null===r)return void i.addOne(o.EPSILON);if(r.isEmpty()&&s)return void i.addOne(o.EOF);if(r!==Ft.EMPTY){var f=c.has(e.ruleIndex);try{c.remove(e.ruleIndex);for(var p=0;p<r.length;p++){var y=this.atn.states[r.getReturnState(p)];this._LOOK(y,n,r.getParent(p),i,u,c,a,s)}}finally{f&&c.add(e.ruleIndex)}return}}for(var h=0;h<e.transitions.length;h++){var b=e.transitions[h];if(b.constructor===G){if(c.has(b.target.ruleIndex))continue;var v=Wt.create(r,b.followState.stateNumber);try{c.add(b.target.ruleIndex),this._LOOK(b.target,n,v,i,u,c,a,s)}finally{c.remove(b.target.ruleIndex)}}else if(b instanceof lt)a?this._LOOK(b.target,n,r,i,u,c,a,s):i.addOne(t.HIT_PRED);else if(b.isEpsilon)this._LOOK(b.target,n,r,i,u,c,a,s);else if(b.constructor===ut)i.addRange(o.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType);else{var d=b.label;null!==d&&(b instanceof nt&&(d=d.complement(o.MIN_USER_TOKEN_TYPE,this.atn.maxTokenType)),i.addSet(d))}}}}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==ce(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ce(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===ce(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function se(t){return se="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},se(t)}ae.HIT_PRED=o.INVALID_TYPE;var le=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.grammarType=e,this.maxTokenType=n,this.states=[],this.decisionToState=[],this.ruleToStartState=[],this.ruleToStopState=null,this.modeNameToStartState={},this.ruleToTokenType=null,this.lexerActions=null,this.modeToStartState=[]}var e,n;return e=t,(n=[{key:"nextTokensInContext",value:function(t,e){return new ae(this).LOOK(t,null,e)}},{key:"nextTokensNoContext",value:function(t){return null!==t.nextTokenWithinRule||(t.nextTokenWithinRule=this.nextTokensInContext(t,null),t.nextTokenWithinRule.readOnly=!0),t.nextTokenWithinRule}},{key:"nextTokens",value:function(t,e){return void 0===e?this.nextTokensNoContext(t):this.nextTokensInContext(t,e)}},{key:"addState",value:function(t){null!==t&&(t.atn=this,t.stateNumber=this.states.length),this.states.push(t)}},{key:"removeState",value:function(t){this.states[t.stateNumber]=null}},{key:"defineDecisionState",value:function(t){return this.decisionToState.push(t),t.decision=this.decisionToState.length-1,t.decision}},{key:"getDecisionState",value:function(t){return 0===this.decisionToState.length?null:this.decisionToState[t]}},{key:"getExpectedTokens",value:function(t,e){if(t<0||t>=this.states.length)throw"Invalid state number.";var n=this.states[t],r=this.nextTokens(n);if(!r.contains(o.EPSILON))return r;var i=new I;for(i.addSet(r),i.removeOne(o.EPSILON);null!==e&&e.invokingState>=0&&r.contains(o.EPSILON);){var u=this.states[e.invokingState].transitions[0];r=this.nextTokens(u.followState),i.addSet(r),i.removeOne(o.EPSILON),e=e.parentCtx}return r.contains(o.EPSILON)&&i.addOne(o.EOF),i}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==se(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==se(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===se(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function fe(t){return fe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fe(t)}function pe(t,e){return pe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},pe(t,e)}function ye(t){return ye=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ye(t)}le.INVALID_ALT_NUMBER=0;var he=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&pe(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ye(n);if(r){var o=ye(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===fe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).stateType=D.BASIC,t}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(D);function be(t){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},be(t)}function ve(t,e){return ve=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ve(t,e)}function de(t,e){if(e&&("object"===be(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return me(t)}function me(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ge(t){return ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ge(t)}var Se=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ve(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ge(n);if(r){var o=ge(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return de(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).decision=-1,t.nonGreedy=!1,de(t,me(t))}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(D);function Oe(t){return Oe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Oe(t)}function we(t,e){return we=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},we(t,e)}function _e(t,e){if(e&&("object"===Oe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Te(t)}function Te(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Pe(t){return Pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pe(t)}var Ee=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&we(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Pe(n);if(r){var o=Pe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return _e(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).endState=null,_e(t,Te(t))}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(Se);function xe(t){return xe="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xe(t)}function ke(t,e){return ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ke(t,e)}function je(t,e){if(e&&("object"===xe(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Re(t)}function Re(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Ce(t){return Ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ce(t)}var Ae=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ke(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ce(n);if(r){var o=Ce(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return je(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).stateType=D.BLOCK_END,t.startState=null,je(t,Re(t))}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(D);function Ne(t){return Ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ne(t)}function Ie(t,e){return Ie=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ie(t,e)}function Le(t,e){if(e&&("object"===Ne(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return De(t)}function De(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Fe(t){return Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fe(t)}var Be=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ie(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Fe(n);if(r){var o=Fe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return Le(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).stateType=D.LOOP_END,t.loopBackState=null,Le(t,De(t))}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(D);function Me(t){return Me="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Me(t)}function Ue(t,e){return Ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ue(t,e)}function Ve(t,e){if(e&&("object"===Me(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return He(t)}function He(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function qe(t){return qe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qe(t)}var Ye=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ue(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=qe(n);if(r){var o=qe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return Ve(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).stateType=D.RULE_START,t.stopState=null,t.isPrecedenceRule=!1,Ve(t,He(t))}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(D);function ze(t){return ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ze(t)}function Ke(t,e){return Ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ke(t,e)}function Ge(t,e){if(e&&("object"===ze(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return We(t)}function We(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Xe(t){return Xe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xe(t)}var Qe=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ke(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Xe(n);if(r){var o=Xe(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return Ge(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).stateType=D.TOKEN_START,Ge(t,We(t))}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(Se);function $e(t){return $e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$e(t)}function Je(t,e){return Je=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Je(t,e)}function Ze(t,e){if(e&&("object"===$e(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return tn(t)}function tn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function en(t){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},en(t)}var nn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Je(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=en(n);if(r){var o=en(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return Ze(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).stateType=D.PLUS_LOOP_BACK,Ze(t,tn(t))}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(Se);function rn(t){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rn(t)}function on(t,e){return on=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},on(t,e)}function un(t,e){if(e&&("object"===rn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return cn(t)}function cn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function an(t){return an=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},an(t)}var sn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&on(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=an(n);if(r){var o=an(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return un(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).stateType=D.STAR_LOOP_BACK,un(t,cn(t))}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(D);function ln(t){return ln="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ln(t)}function fn(t,e){return fn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fn(t,e)}function pn(t,e){if(e&&("object"===ln(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return yn(t)}function yn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function hn(t){return hn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hn(t)}var bn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fn(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=hn(n);if(r){var o=hn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return pn(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).stateType=D.STAR_LOOP_ENTRY,t.loopBackState=null,t.isPrecedenceDecision=null,pn(t,yn(t))}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(Se);function vn(t){return vn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vn(t)}function dn(t,e){return dn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dn(t,e)}function mn(t,e){if(e&&("object"===vn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return gn(t)}function gn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Sn(t){return Sn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Sn(t)}var On=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dn(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Sn(n);if(r){var o=Sn(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return mn(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).stateType=D.PLUS_BLOCK_START,t.loopBackState=null,mn(t,gn(t))}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(Ee);function wn(t){return wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wn(t)}function _n(t,e){return _n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_n(t,e)}function Tn(t,e){if(e&&("object"===wn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Pn(t)}function Pn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function En(t){return En=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},En(t)}var xn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_n(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=En(n);if(r){var o=En(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return Tn(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).stateType=D.STAR_BLOCK_START,Tn(t,Pn(t))}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(Ee);function kn(t){return kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kn(t)}function jn(t,e){return jn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jn(t,e)}function Rn(t,e){if(e&&("object"===kn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Cn(t)}function Cn(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function An(t){return An=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},An(t)}var Nn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jn(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=An(n);if(r){var o=An(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return Rn(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).stateType=D.BLOCK_START,Rn(t,Cn(t))}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(Ee);function In(t){return In="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},In(t)}function Ln(t,e){return Ln=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ln(t,e)}function Dn(t){return Dn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Dn(t)}var Fn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ln(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Dn(r);if(o){var n=Dn(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===In(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(n=i.call(this,t)).label_=e,n.label=n.makeLabel(),n.serializationType=q.ATOM,n}return e=u,(n=[{key:"makeLabel",value:function(){var t=new I;return t.addOne(this.label_),t}},{key:"matches",value:function(t,e,n){return this.label_===t}},{key:"toString",value:function(){return this.label_}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==In(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==In(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===In(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(q);function Bn(t){return Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bn(t)}function Mn(t,e){return Mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Mn(t,e)}function Un(t){return Un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Un(t)}var Vn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mn(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Un(r);if(o){var n=Un(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Bn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(r=i.call(this,t)).serializationType=q.RANGE,r.start=e,r.stop=n,r.label=r.makeLabel(),r}return e=u,(n=[{key:"makeLabel",value:function(){var t=new I;return t.addRange(this.start,this.stop),t}},{key:"matches",value:function(t,e,n){return t>=this.start&&t<=this.stop}},{key:"toString",value:function(){return"'"+String.fromCharCode(this.start)+"'..'"+String.fromCharCode(this.stop)+"'"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Bn(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Bn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Bn(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(q);function Hn(t){return Hn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hn(t)}function qn(t,e){return qn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qn(t,e)}function Yn(t){return Yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yn(t)}var zn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qn(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Yn(r);if(o){var n=Yn(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Hn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e,n,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(o=i.call(this,t)).serializationType=q.ACTION,o.ruleIndex=e,o.actionIndex=void 0===n?-1:n,o.isCtxDependent=void 0!==r&&r,o.isEpsilon=!0,o}return e=u,(n=[{key:"matches",value:function(t,e,n){return!1}},{key:"toString",value:function(){return"action_"+this.ruleIndex+":"+this.actionIndex}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Hn(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Hn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Hn(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(q);function Kn(t){return Kn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kn(t)}function Gn(t,e){return Gn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gn(t,e)}function Wn(t){return Wn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wn(t)}var Xn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gn(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Wn(r);if(o){var n=Wn(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Kn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(n=i.call(this,t)).serializationType=q.EPSILON,n.isEpsilon=!0,n.outermostPrecedenceReturn=e,n}return e=u,(n=[{key:"matches",value:function(t,e,n){return!1}},{key:"toString",value:function(){return"epsilon"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Kn(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Kn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Kn(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(q);function Qn(t){return Qn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qn(t)}function $n(t,e){return $n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$n(t,e)}function Jn(t){return Jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jn(t)}var Zn=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$n(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Jn(r);if(o){var n=Jn(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Qn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e,n){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(r=i.call(this)).ruleIndex=void 0===t?-1:t,r.predIndex=void 0===e?-1:e,r.isCtxDependent=void 0!==n&&n,r}return e=u,(n=[{key:"evaluate",value:function(t,e){var n=this.isCtxDependent?e:null;return t.sempred(n,this.ruleIndex,this.predIndex)}},{key:"updateHashCode",value:function(t){t.update(this.ruleIndex,this.predIndex,this.isCtxDependent)}},{key:"equals",value:function(t){return this===t||t instanceof u&&this.ruleIndex===t.ruleIndex&&this.predIndex===t.predIndex&&this.isCtxDependent===t.isCtxDependent}},{key:"toString",value:function(){return"{"+this.ruleIndex+":"+this.predIndex+"}?"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Qn(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Qn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Qn(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(T);function tr(t){return tr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tr(t)}function er(t,e){return er=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},er(t,e)}function nr(t){return nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nr(t)}T.NONE=new Zn;var rr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&er(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=nr(r);if(o){var n=nr(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===tr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e,n,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(o=i.call(this,t)).serializationType=q.PREDICATE,o.ruleIndex=e,o.predIndex=n,o.isCtxDependent=r,o.isEpsilon=!0,o}return e=u,(n=[{key:"matches",value:function(t,e,n){return!1}},{key:"getPredicate",value:function(){return new Zn(this.ruleIndex,this.predIndex,this.isCtxDependent)}},{key:"toString",value:function(){return"pred_"+this.ruleIndex+":"+this.predIndex}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==tr(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==tr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===tr(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(lt);function or(t){return or="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},or(t)}function ir(t,e){return ir=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ir(t,e)}function ur(t){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ur(t)}var cr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ir(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ur(r);if(o){var n=ur(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===or(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(e=i.call(this)).precedence=void 0===t?0:t,e}return e=u,(n=[{key:"evaluate",value:function(t,e){return t.precpred(e,this.precedence)}},{key:"evalPrecedence",value:function(t,e){return t.precpred(e,this.precedence)?T.NONE:null}},{key:"compareTo",value:function(t){return this.precedence-t.precedence}},{key:"updateHashCode",value:function(t){t.update(this.precedence)}},{key:"equals",value:function(t){return this===t||t instanceof u&&this.precedence===t.precedence}},{key:"toString",value:function(){return"{"+this.precedence+">=prec}?"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==or(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==or(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===or(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(T);function ar(t){return ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ar(t)}function sr(t,e){return sr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},sr(t,e)}function lr(t){return lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lr(t)}T.PrecedencePredicate=cr;var fr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sr(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=lr(r);if(o){var n=lr(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ar(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(n=i.call(this,t)).serializationType=q.PRECEDENCE,n.precedence=e,n.isEpsilon=!0,n}return e=u,(n=[{key:"matches",value:function(t,e,n){return!1}},{key:"getPredicate",value:function(){return new cr(this.precedence)}},{key:"toString",value:function(){return this.precedence+" >= _p"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==ar(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ar(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===ar(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(lt);var pr=function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),void 0===e&&(e=null),this.readOnly=!1,this.verifyATN=null===e||e.verifyATN,this.generateRuleBypassTransitions=null!==e&&e.generateRuleBypassTransitions}));pr.defaultOptions=new pr,pr.defaultOptions.readOnly=!0;function yr(t){return yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yr(t)}var hr=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.actionType=e,this.isPositionDependent=!1}var e,n;return e=t,(n=[{key:"hashCode",value:function(){var t=new a;return this.updateHashCode(t),t.finish()}},{key:"updateHashCode",value:function(t){t.update(this.actionType)}},{key:"equals",value:function(t){return this===t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==yr(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==yr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===yr(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function br(t){return br="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},br(t)}function vr(t,e){return vr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vr(t,e)}function dr(t){return dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},dr(t)}var mr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vr(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=dr(r);if(o){var n=dr(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===br(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),i.call(this,6)}return e=u,(n=[{key:"execute",value:function(t){t.skip()}},{key:"toString",value:function(){return"skip"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==br(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==br(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===br(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(hr);function gr(t){return gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},gr(t)}function Sr(t,e){return Sr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Sr(t,e)}function Or(t){return Or=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Or(t)}mr.INSTANCE=new mr;var wr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sr(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Or(r);if(o){var n=Or(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===gr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(e=i.call(this,0)).channel=t,e}return e=u,(n=[{key:"execute",value:function(t){t._channel=this.channel}},{key:"updateHashCode",value:function(t){t.update(this.actionType,this.channel)}},{key:"equals",value:function(t){return this===t||t instanceof u&&this.channel===t.channel}},{key:"toString",value:function(){return"channel("+this.channel+")"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==gr(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==gr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===gr(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(hr);function _r(t){return _r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_r(t)}function Tr(t,e){return Tr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Tr(t,e)}function Pr(t){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pr(t)}var Er=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tr(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Pr(r);if(o){var n=Pr(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===_r(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(n=i.call(this,1)).ruleIndex=t,n.actionIndex=e,n.isPositionDependent=!0,n}return e=u,(n=[{key:"execute",value:function(t){t.action(null,this.ruleIndex,this.actionIndex)}},{key:"updateHashCode",value:function(t){t.update(this.actionType,this.ruleIndex,this.actionIndex)}},{key:"equals",value:function(t){return this===t||t instanceof u&&this.ruleIndex===t.ruleIndex&&this.actionIndex===t.actionIndex}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==_r(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==_r(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===_r(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(hr);function xr(t){return xr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xr(t)}function kr(t,e){return kr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},kr(t,e)}function jr(t){return jr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jr(t)}var Rr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&kr(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=jr(r);if(o){var n=jr(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===xr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),i.call(this,3)}return e=u,(n=[{key:"execute",value:function(t){t.more()}},{key:"toString",value:function(){return"more"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==xr(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==xr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===xr(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(hr);function Cr(t){return Cr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cr(t)}function Ar(t,e){return Ar=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ar(t,e)}function Nr(t){return Nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nr(t)}Rr.INSTANCE=new Rr;var Ir=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ar(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Nr(r);if(o){var n=Nr(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Cr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(e=i.call(this,7)).type=t,e}return e=u,(n=[{key:"execute",value:function(t){t.type=this.type}},{key:"updateHashCode",value:function(t){t.update(this.actionType,this.type)}},{key:"equals",value:function(t){return this===t||t instanceof u&&this.type===t.type}},{key:"toString",value:function(){return"type("+this.type+")"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Cr(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Cr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Cr(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(hr);function Lr(t){return Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lr(t)}function Dr(t,e){return Dr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Dr(t,e)}function Fr(t){return Fr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fr(t)}var Br=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Dr(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Fr(r);if(o){var n=Fr(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Lr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(e=i.call(this,5)).mode=t,e}return e=u,(n=[{key:"execute",value:function(t){t.pushMode(this.mode)}},{key:"updateHashCode",value:function(t){t.update(this.actionType,this.mode)}},{key:"equals",value:function(t){return this===t||t instanceof u&&this.mode===t.mode}},{key:"toString",value:function(){return"pushMode("+this.mode+")"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Lr(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Lr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Lr(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(hr);function Mr(t){return Mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mr(t)}function Ur(t,e){return Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ur(t,e)}function Vr(t){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vr(t)}var Hr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ur(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Vr(r);if(o){var n=Vr(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Mr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),i.call(this,4)}return e=u,(n=[{key:"execute",value:function(t){t.popMode()}},{key:"toString",value:function(){return"popMode"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Mr(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Mr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Mr(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(hr);function qr(t){return qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qr(t)}function Yr(t,e){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yr(t,e)}function zr(t){return zr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zr(t)}Hr.INSTANCE=new Hr;var Kr=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yr(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=zr(r);if(o){var n=zr(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===qr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(e=i.call(this,2)).mode=t,e}return e=u,(n=[{key:"execute",value:function(t){t.mode(this.mode)}},{key:"updateHashCode",value:function(t){t.update(this.actionType,this.mode)}},{key:"equals",value:function(t){return this===t||t instanceof u&&this.mode===t.mode}},{key:"toString",value:function(){return"mode("+this.mode+")"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==qr(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==qr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===qr(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(hr);function Gr(t){return Gr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gr(t)}function Wr(t,e){var n=[];return n[t-1]=e,n.map((function(t){return e}))}var Xr=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null==e&&(e=pr.defaultOptions),this.deserializationOptions=e,this.stateFactories=null,this.actionFactories=null}var e,n;return e=t,n=[{key:"deserialize",value:function(t){var e=this.reset(t);this.checkVersion(e),e&&this.skipUUID();var n=this.readATN();this.readStates(n,e),this.readRules(n,e),this.readModes(n);var r=[];return this.readSets(n,r,this.readInt.bind(this)),e&&this.readSets(n,r,this.readInt32.bind(this)),this.readEdges(n,r),this.readDecisions(n),this.readLexerActions(n,e),this.markPrecedenceDecisions(n),this.verifyATN(n),this.deserializationOptions.generateRuleBypassTransitions&&1===n.grammarType&&(this.generateRuleBypassTransitions(n),this.verifyATN(n)),n}},{key:"reset",value:function(t){if(3===(t.charCodeAt?t.charCodeAt(0):t[0])){var e=t.split("").map((function(t){var e=t.charCodeAt(0);return e>1?e-2:e+65534}));return e[0]=t.charCodeAt(0),this.data=e,this.pos=0,!0}return this.data=t,this.pos=0,!1}},{key:"skipUUID",value:function(){for(var t=0;t++<8;)this.readInt()}},{key:"checkVersion",value:function(t){var e=this.readInt();if(!t&&4!==e)throw"Could not deserialize ATN with version "+e+" (expected 4)."}},{key:"readATN",value:function(){var t=this.readInt(),e=this.readInt();return new le(t,e)}},{key:"readStates",value:function(t,e){for(var n,r,o,i=[],u=[],c=this.readInt(),a=0;a<c;a++){var s=this.readInt();if(s!==D.INVALID_TYPE){var l=this.readInt();e&&65535===l&&(l=-1);var f=this.stateFactory(s,l);if(s===D.LOOP_END){var p=this.readInt();i.push([f,p])}else if(f instanceof Ee){var y=this.readInt();u.push([f,y])}t.addState(f)}else t.addState(null)}for(n=0;n<i.length;n++)(r=i[n])[0].loopBackState=t.states[r[1]];for(n=0;n<u.length;n++)(r=u[n])[0].endState=t.states[r[1]];var h=this.readInt();for(n=0;n<h;n++)o=this.readInt(),t.states[o].nonGreedy=!0;var b=this.readInt();for(n=0;n<b;n++)o=this.readInt(),t.states[o].isPrecedenceRule=!0}},{key:"readRules",value:function(t,e){var n,r=this.readInt();for(0===t.grammarType&&(t.ruleToTokenType=Wr(r,0)),t.ruleToStartState=Wr(r,0),n=0;n<r;n++){var i=this.readInt();if(t.ruleToStartState[n]=t.states[i],0===t.grammarType){var u=this.readInt();e&&65535===u&&(u=o.EOF),t.ruleToTokenType[n]=u}}for(t.ruleToStopState=Wr(r,0),n=0;n<t.states.length;n++){var c=t.states[n];c instanceof H&&(t.ruleToStopState[c.ruleIndex]=c,t.ruleToStartState[c.ruleIndex].stopState=c)}}},{key:"readModes",value:function(t){for(var e=this.readInt(),n=0;n<e;n++){var r=this.readInt();t.modeToStartState.push(t.states[r])}}},{key:"readSets",value:function(t,e,n){for(var r=this.readInt(),o=0;o<r;o++){var i=new I;e.push(i);var u=this.readInt();0!==this.readInt()&&i.addOne(-1);for(var c=0;c<u;c++){var a=n(),s=n();i.addRange(a,s)}}}},{key:"readEdges",value:function(t,e){var n,r,o,i,u,c=this.readInt();for(n=0;n<c;n++){var a=this.readInt(),s=this.readInt(),l=this.readInt(),f=this.readInt(),p=this.readInt(),y=this.readInt();i=this.edgeFactory(t,l,a,s,f,p,y,e),t.states[a].addTransition(i)}for(n=0;n<t.states.length;n++)for(o=t.states[n],r=0;r<o.transitions.length;r++){var h=o.transitions[r];if(h instanceof G){var b=-1;t.ruleToStartState[h.target.ruleIndex].isPrecedenceRule&&0===h.precedence&&(b=h.target.ruleIndex),i=new Xn(h.followState,b),t.ruleToStopState[h.target.ruleIndex].addTransition(i)}}for(n=0;n<t.states.length;n++){if((o=t.states[n])instanceof Ee){if(null===o.endState)throw"IllegalState";if(null!==o.endState.startState)throw"IllegalState";o.endState.startState=o}if(o instanceof nn)for(r=0;r<o.transitions.length;r++)(u=o.transitions[r].target)instanceof On&&(u.loopBackState=o);else if(o instanceof sn)for(r=0;r<o.transitions.length;r++)(u=o.transitions[r].target)instanceof bn&&(u.loopBackState=o)}}},{key:"readDecisions",value:function(t){for(var e=this.readInt(),n=0;n<e;n++){var r=this.readInt(),o=t.states[r];t.decisionToState.push(o),o.decision=n}}},{key:"readLexerActions",value:function(t,e){if(0===t.grammarType){var n=this.readInt();t.lexerActions=Wr(n,null);for(var r=0;r<n;r++){var o=this.readInt(),i=this.readInt();e&&65535===i&&(i=-1);var u=this.readInt();e&&65535===u&&(u=-1),t.lexerActions[r]=this.lexerActionFactory(o,i,u)}}}},{key:"generateRuleBypassTransitions",value:function(t){var e,n=t.ruleToStartState.length;for(e=0;e<n;e++)t.ruleToTokenType[e]=t.maxTokenType+e+1;for(e=0;e<n;e++)this.generateRuleBypassTransition(t,e)}},{key:"generateRuleBypassTransition",value:function(t,e){var n,r,o=new Nn;o.ruleIndex=e,t.addState(o);var i=new Ae;i.ruleIndex=e,t.addState(i),o.endState=i,t.defineDecisionState(o),i.startState=o;var u=null,c=null;if(t.ruleToStartState[e].isPrecedenceRule){for(c=null,n=0;n<t.states.length;n++)if(r=t.states[n],this.stateIsEndStateFor(r,e)){c=r,u=r.loopBackState.transitions[0];break}if(null===u)throw"Couldn't identify final state of the precedence rule prefix section."}else c=t.ruleToStopState[e];for(n=0;n<t.states.length;n++){r=t.states[n];for(var a=0;a<r.transitions.length;a++){var s=r.transitions[a];s!==u&&s.target===c&&(s.target=i)}}for(var l=t.ruleToStartState[e],f=l.transitions.length;f>0;)o.addTransition(l.transitions[f-1]),l.transitions=l.transitions.slice(-1);t.ruleToStartState[e].addTransition(new Xn(o)),i.addTransition(new Xn(c));var p=new he;t.addState(p),p.addTransition(new Fn(i,t.ruleToTokenType[e])),o.addTransition(new Xn(p))}},{key:"stateIsEndStateFor",value:function(t,e){if(t.ruleIndex!==e)return null;if(!(t instanceof bn))return null;var n=t.transitions[t.transitions.length-1].target;return n instanceof Be&&n.epsilonOnlyTransitions&&n.transitions[0].target instanceof H?t:null}},{key:"markPrecedenceDecisions",value:function(t){for(var e=0;e<t.states.length;e++){var n=t.states[e];if(n instanceof bn&&t.ruleToStartState[n.ruleIndex].isPrecedenceRule){var r=n.transitions[n.transitions.length-1].target;r instanceof Be&&r.epsilonOnlyTransitions&&r.transitions[0].target instanceof H&&(n.isPrecedenceDecision=!0)}}}},{key:"verifyATN",value:function(t){if(this.deserializationOptions.verifyATN)for(var e=0;e<t.states.length;e++){var n=t.states[e];if(null!==n)if(this.checkCondition(n.epsilonOnlyTransitions||n.transitions.length<=1),n instanceof On)this.checkCondition(null!==n.loopBackState);else if(n instanceof bn)if(this.checkCondition(null!==n.loopBackState),this.checkCondition(2===n.transitions.length),n.transitions[0].target instanceof xn)this.checkCondition(n.transitions[1].target instanceof Be),this.checkCondition(!n.nonGreedy);else{if(!(n.transitions[0].target instanceof Be))throw"IllegalState";this.checkCondition(n.transitions[1].target instanceof xn),this.checkCondition(n.nonGreedy)}else n instanceof sn?(this.checkCondition(1===n.transitions.length),this.checkCondition(n.transitions[0].target instanceof bn)):n instanceof Be?this.checkCondition(null!==n.loopBackState):n instanceof Ye?this.checkCondition(null!==n.stopState):n instanceof Ee?this.checkCondition(null!==n.endState):n instanceof Ae?this.checkCondition(null!==n.startState):n instanceof Se?this.checkCondition(n.transitions.length<=1||n.decision>=0):this.checkCondition(n.transitions.length<=1||n instanceof H)}}},{key:"checkCondition",value:function(t,e){if(!t)throw null==e&&(e="IllegalState"),e}},{key:"readInt",value:function(){return this.data[this.pos++]}},{key:"readInt32",value:function(){return this.readInt()|this.readInt()<<16}},{key:"edgeFactory",value:function(t,e,n,r,i,u,c,a){var s=t.states[r];switch(e){case q.EPSILON:return new Xn(s);case q.RANGE:return new Vn(s,0!==c?o.EOF:i,u);case q.RULE:return new G(t.states[i],u,c,s);case q.PREDICATE:return new rr(s,i,u,0!==c);case q.PRECEDENCE:return new fr(s,i);case q.ATOM:return new Fn(s,0!==c?o.EOF:i);case q.ACTION:return new zn(s,i,u,0!==c);case q.SET:return new $(s,a[i]);case q.NOT_SET:return new nt(s,a[i]);case q.WILDCARD:return new ut(s);default:throw"The specified transition type: "+e+" is not valid."}}},{key:"stateFactory",value:function(t,e){if(null===this.stateFactories){var n=[];n[D.INVALID_TYPE]=null,n[D.BASIC]=function(){return new he},n[D.RULE_START]=function(){return new Ye},n[D.BLOCK_START]=function(){return new Nn},n[D.PLUS_BLOCK_START]=function(){return new On},n[D.STAR_BLOCK_START]=function(){return new xn},n[D.TOKEN_START]=function(){return new Qe},n[D.RULE_STOP]=function(){return new H},n[D.BLOCK_END]=function(){return new Ae},n[D.STAR_LOOP_BACK]=function(){return new sn},n[D.STAR_LOOP_ENTRY]=function(){return new bn},n[D.PLUS_LOOP_BACK]=function(){return new nn},n[D.LOOP_END]=function(){return new Be},this.stateFactories=n}if(t>this.stateFactories.length||null===this.stateFactories[t])throw"The specified state type "+t+" is not valid.";var r=this.stateFactories[t]();if(null!==r)return r.ruleIndex=e,r}},{key:"lexerActionFactory",value:function(t,e,n){if(null===this.actionFactories){var r=[];r[0]=function(t,e){return new wr(t)},r[1]=function(t,e){return new Er(t,e)},r[2]=function(t,e){return new Kr(t)},r[3]=function(t,e){return Rr.INSTANCE},r[4]=function(t,e){return Hr.INSTANCE},r[5]=function(t,e){return new Br(t)},r[6]=function(t,e){return mr.INSTANCE},r[7]=function(t,e){return new Ir(t)},this.actionFactories=r}if(t>this.actionFactories.length||null===this.actionFactories[t])throw"The specified lexer action type "+t+" is not valid.";return this.actionFactories[t](e,n)}}],n&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Gr(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Gr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Gr(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Qr(t){return Qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(t)}var $r=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,(n=[{key:"syntaxError",value:function(t,e,n,r,o,i){}},{key:"reportAmbiguity",value:function(t,e,n,r,o,i,u){}},{key:"reportAttemptingFullContext",value:function(t,e,n,r,o,i){}},{key:"reportContextSensitivity",value:function(t,e,n,r,o,i){}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Qr(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Qr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Qr(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Jr(t){return Jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jr(t)}function Zr(t,e){return Zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zr(t,e)}function to(t){return to=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},to(t)}var eo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zr(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=to(r);if(o){var n=to(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Jr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),i.call(this)}return e=u,(n=[{key:"syntaxError",value:function(t,e,n,r,o,i){console.error("line "+n+":"+r+" "+o)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Jr(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Jr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Jr(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}($r);function no(t){return no="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},no(t)}function ro(t,e){return ro=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ro(t,e)}function oo(t,e){if(e&&("object"===no(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return io(t)}function io(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function uo(t){return uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},uo(t)}eo.INSTANCE=new eo;var co=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ro(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=uo(r);if(o){var n=uo(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return oo(this,t)});function u(t){var e;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),e=i.call(this),null===t)throw"delegates";return e.delegates=t,oo(e,io(e))}return e=u,n=[{key:"syntaxError",value:function(t,e,n,r,o,i){this.delegates.map((function(u){return u.syntaxError(t,e,n,r,o,i)}))}},{key:"reportAmbiguity",value:function(t,e,n,r,o,i,u){this.delegates.map((function(c){return c.reportAmbiguity(t,e,n,r,o,i,u)}))}},{key:"reportAttemptingFullContext",value:function(t,e,n,r,o,i){this.delegates.map((function(u){return u.reportAttemptingFullContext(t,e,n,r,o,i)}))}},{key:"reportContextSensitivity",value:function(t,e,n,r,o,i){this.delegates.map((function(u){return u.reportContextSensitivity(t,e,n,r,o,i)}))}}],n&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==no(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==no(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===no(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}($r);function ao(t){return ao="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ao(t)}var so=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this._listeners=[eo.INSTANCE],this._interp=null,this._stateNumber=-1}var e,n;return e=t,(n=[{key:"checkVersion",value:function(t){var e="4.12.0";e!==t&&console.log("ANTLR runtime and generated code versions disagree: "+e+"!="+t)}},{key:"addErrorListener",value:function(t){this._listeners.push(t)}},{key:"removeErrorListeners",value:function(){this._listeners=[]}},{key:"getLiteralNames",value:function(){return Object.getPrototypeOf(this).constructor.literalNames||[]}},{key:"getSymbolicNames",value:function(){return Object.getPrototypeOf(this).constructor.symbolicNames||[]}},{key:"getTokenNames",value:function(){if(!this.tokenNames){var t=this.getLiteralNames(),e=this.getSymbolicNames(),n=t.length>e.length?t.length:e.length;this.tokenNames=[];for(var r=0;r<n;r++)this.tokenNames[r]=t[r]||e[r]||"<INVALID"}return this.tokenNames}},{key:"getTokenTypeMap",value:function(){var t=this.getTokenNames();if(null===t)throw"The current recognizer does not provide a list of token names.";var e=this.tokenTypeMapCache[t];return void 0===e&&((e=t.reduce((function(t,e,n){t[e]=n}))).EOF=o.EOF,this.tokenTypeMapCache[t]=e),e}},{key:"getRuleIndexMap",value:function(){var t=this.ruleNames;if(null===t)throw"The current recognizer does not provide a list of rule names.";var e=this.ruleIndexMapCache[t];return void 0===e&&(e=t.reduce((function(t,e,n){t[e]=n})),this.ruleIndexMapCache[t]=e),e}},{key:"getTokenType",value:function(t){var e=this.getTokenTypeMap()[t];return void 0!==e?e:o.INVALID_TYPE}},{key:"getErrorHeader",value:function(t){return"line "+t.getOffendingToken().line+":"+t.getOffendingToken().column}},{key:"getTokenErrorDisplay",value:function(t){if(null===t)return"<no token>";var e=t.text;return null===e&&(e=t.type===o.EOF?"<EOF>":"<"+t.type+">"),"'"+(e=e.replace("\n","\\n").replace("\r","\\r").replace("\t","\\t"))+"'"}},{key:"getErrorListenerDispatch",value:function(){return new co(this._listeners)}},{key:"sempred",value:function(t,e,n){return!0}},{key:"precpred",value:function(t,e){return!0}},{key:"atn",get:function(){return this._interp.atn}},{key:"state",get:function(){return this._stateNumber},set:function(t){this._stateNumber=t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==ao(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ao(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===ao(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function lo(t){return lo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lo(t)}function fo(t,e){return fo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fo(t,e)}function po(t){return po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},po(t)}so.tokenTypeMapCache={},so.ruleIndexMapCache={};var yo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fo(t,e)}(c,t);var e,n,r,i,u=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=po(r);if(i){var n=po(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===lo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(t,e,n,r,i){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(a=u.call(this)).source=void 0!==t?t:c.EMPTY_SOURCE,a.type=void 0!==e?e:null,a.channel=void 0!==n?n:o.DEFAULT_CHANNEL,a.start=void 0!==r?r:-1,a.stop=void 0!==i?i:-1,a.tokenIndex=-1,null!==a.source[0]?(a.line=t[0].line,a.column=t[0].column):a.column=-1,a}return e=c,(n=[{key:"clone",value:function(){var t=new c(this.source,this.type,this.channel,this.start,this.stop);return t.tokenIndex=this.tokenIndex,t.line=this.line,t.column=this.column,t.text=this.text,t}},{key:"cloneWithType",value:function(t){var e=new c(this.source,t,this.channel,this.start,this.stop);return e.tokenIndex=this.tokenIndex,e.line=this.line,e.column=this.column,t===o.EOF&&(e.text=""),e}},{key:"toString",value:function(){var t=this.text;return t=null!==t?t.replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t"):"<no text>","[@"+this.tokenIndex+","+this.start+":"+this.stop+"='"+t+"',<"+this.type+">"+(this.channel>0?",channel="+this.channel:"")+","+this.line+":"+this.column+"]"}},{key:"text",get:function(){if(null!==this._text)return this._text;var t=this.getInputStream();if(null===t)return null;var e=t.size;return this.start<e&&this.stop<e?t.getText(this.start,this.stop):"<EOF>"},set:function(t){this._text=t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==lo(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==lo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===lo(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(o);function ho(t){return ho="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ho(t)}function bo(t,e){return bo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bo(t,e)}function vo(t){return vo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vo(t)}function mo(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==ho(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ho(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===ho(o)?o:String(o)),r)}var o}function go(t,e,n){return e&&mo(t.prototype,e),n&&mo(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function So(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}yo.EMPTY_SOURCE=[null,null];var Oo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bo(t,e)}(o,t);var e,n,r=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=vo(e);if(n){var o=vo(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return function(t,e){if(e&&("object"===ho(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function o(t){var e;return So(this,o),(e=r.call(this)).copyText=void 0!==t&&t,e}return go(o,[{key:"create",value:function(t,e,n,r,o,i,u,c){var a=new yo(t,e,r,o,i);return a.line=u,a.column=c,null!==n?a.text=n:this.copyText&&null!==t[1]&&(a.text=t[1].getText(o,i)),a}},{key:"createThin",value:function(t,e){var n=new yo(null,t);return n.text=e,n}}]),o}(go((function t(){So(this,t)})));function wo(t){return wo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wo(t)}function _o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function To(t){var e="function"==typeof Map?new Map:void 0;return To=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return Po(t,arguments,ko(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),xo(r,t)},To(t)}function Po(t,e,n){return Po=Eo()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&xo(o,n.prototype),o},Po.apply(null,arguments)}function Eo(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function xo(t,e){return xo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xo(t,e)}function ko(t){return ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ko(t)}Oo.DEFAULT=new Oo;var jo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xo(t,e)}(u,t);var e,n,r,o,i=(r=u,o=Eo(),function(){var t,e=ko(r);if(o){var n=ko(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===wo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return _o(t)}(this,t)});function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),e=i.call(this,t.message),Error.captureStackTrace&&Error.captureStackTrace(_o(e),u),e.message=t.message,e.recognizer=t.recognizer,e.input=t.input,e.ctx=t.ctx,e.offendingToken=null,e.offendingState=-1,null!==e.recognizer&&(e.offendingState=e.recognizer.state),e}return e=u,(n=[{key:"getExpectedTokens",value:function(){return null!==this.recognizer?this.recognizer.atn.getExpectedTokens(this.offendingState,this.ctx):null}},{key:"toString",value:function(){return this.message}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==wo(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==wo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===wo(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(To(Error));function Ro(t){return Ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ro(t)}function Co(t,e){return Co=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Co(t,e)}function Ao(t){return Ao=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ao(t)}var No=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Co(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ao(r);if(o){var n=Ao(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Ro(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e,n,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(o=i.call(this,{message:"",recognizer:t,input:e,ctx:null})).startIndex=n,o.deadEndConfigs=r,o}return e=u,(n=[{key:"toString",value:function(){var t="";return this.startIndex>=0&&this.startIndex<this.input.size&&(t=this.input.getText(new A(this.startIndex,this.startIndex))),"LexerNoViableAltException"+t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Ro(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Ro(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Ro(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(jo);function Io(t){return Io="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Io(t)}function Lo(t,e){return Lo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lo(t,e)}function Do(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Fo(t){return Fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fo(t)}var Bo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lo(t,e)}(c,t);var e,n,r,i,u=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Fo(r);if(i){var n=Fo(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Io(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return Do(t)}(this,t)});function c(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(e=u.call(this))._input=t,e._factory=Oo.DEFAULT,e._tokenFactorySourcePair=[Do(e),t],e._interp=null,e._token=null,e._tokenStartCharIndex=-1,e._tokenStartLine=-1,e._tokenStartColumn=-1,e._hitEOF=!1,e._channel=o.DEFAULT_CHANNEL,e._type=o.INVALID_TYPE,e._modeStack=[],e._mode=c.DEFAULT_MODE,e._text=null,e}return e=c,(n=[{key:"reset",value:function(){null!==this._input&&this._input.seek(0),this._token=null,this._type=o.INVALID_TYPE,this._channel=o.DEFAULT_CHANNEL,this._tokenStartCharIndex=-1,this._tokenStartColumn=-1,this._tokenStartLine=-1,this._text=null,this._hitEOF=!1,this._mode=c.DEFAULT_MODE,this._modeStack=[],this._interp.reset()}},{key:"nextToken",value:function(){if(null===this._input)throw"nextToken requires a non-null input stream.";var t=this._input.mark();try{for(;;){if(this._hitEOF)return this.emitEOF(),this._token;this._token=null,this._channel=o.DEFAULT_CHANNEL,this._tokenStartCharIndex=this._input.index,this._tokenStartColumn=this._interp.column,this._tokenStartLine=this._interp.line,this._text=null;for(var e=!1;;){this._type=o.INVALID_TYPE;var n=c.SKIP;try{n=this._interp.match(this._input,this._mode)}catch(t){if(!(t instanceof jo))throw console.log(t.stack),t;this.notifyListeners(t),this.recover(t)}if(this._input.LA(1)===o.EOF&&(this._hitEOF=!0),this._type===o.INVALID_TYPE&&(this._type=n),this._type===c.SKIP){e=!0;break}if(this._type!==c.MORE)break}if(!e)return null===this._token&&this.emit(),this._token}}finally{this._input.release(t)}}},{key:"skip",value:function(){this._type=c.SKIP}},{key:"more",value:function(){this._type=c.MORE}},{key:"mode",value:function(t){this._mode=t}},{key:"pushMode",value:function(t){this._interp.debug&&console.log("pushMode "+t),this._modeStack.push(this._mode),this.mode(t)}},{key:"popMode",value:function(){if(0===this._modeStack.length)throw"Empty Stack";return this._interp.debug&&console.log("popMode back to "+this._modeStack.slice(0,-1)),this.mode(this._modeStack.pop()),this._mode}},{key:"emitToken",value:function(t){this._token=t}},{key:"emit",value:function(){var t=this._factory.create(this._tokenFactorySourcePair,this._type,this._text,this._channel,this._tokenStartCharIndex,this.getCharIndex()-1,this._tokenStartLine,this._tokenStartColumn);return this.emitToken(t),t}},{key:"emitEOF",value:function(){var t=this.column,e=this.line,n=this._factory.create(this._tokenFactorySourcePair,o.EOF,null,o.DEFAULT_CHANNEL,this._input.index,this._input.index-1,e,t);return this.emitToken(n),n}},{key:"getCharIndex",value:function(){return this._input.index}},{key:"getAllTokens",value:function(){for(var t=[],e=this.nextToken();e.type!==o.EOF;)t.push(e),e=this.nextToken();return t}},{key:"notifyListeners",value:function(t){var e=this._tokenStartCharIndex,n=this._input.index,r=this._input.getText(e,n),o="token recognition error at: '"+this.getErrorDisplay(r)+"'";this.getErrorListenerDispatch().syntaxError(this,null,this._tokenStartLine,this._tokenStartColumn,o,t)}},{key:"getErrorDisplay",value:function(t){for(var e=[],n=0;n<t.length;n++)e.push(t[n]);return e.join("")}},{key:"getErrorDisplayForChar",value:function(t){return t.charCodeAt(0)===o.EOF?"<EOF>":"\n"===t?"\\n":"\t"===t?"\\t":"\r"===t?"\\r":t}},{key:"getCharErrorDisplay",value:function(t){return"'"+this.getErrorDisplayForChar(t)+"'"}},{key:"recover",value:function(t){this._input.LA(1)!==o.EOF&&(t instanceof No?this._interp.consume(this._input):this._input.consume())}},{key:"inputStream",get:function(){return this._input},set:function(t){this._input=null,this._tokenFactorySourcePair=[this,this._input],this.reset(),this._input=t,this._tokenFactorySourcePair=[this,this._input]}},{key:"sourceName",get:function(){return this._input.sourceName}},{key:"type",get:function(){return this._type},set:function(t){this._type=t}},{key:"line",get:function(){return this._interp.line},set:function(t){this._interp.line=t}},{key:"column",get:function(){return this._interp.column},set:function(t){this._interp.column=t}},{key:"text",get:function(){return null!==this._text?this._text:this._interp.getText(this._input)},set:function(t){this._text=t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Io(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Io(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Io(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(so);function Mo(t){return Mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mo(t)}function Uo(t){return t.hashCodeForConfigSet()}function Vo(t,e){return t===e||null!==t&&null!==e&&t.equalsForConfigSet(e)}Bo.DEFAULT_MODE=0,Bo.MORE=-2,Bo.SKIP=-3,Bo.DEFAULT_TOKEN_CHANNEL=o.DEFAULT_CHANNEL,Bo.HIDDEN=o.HIDDEN_CHANNEL,Bo.MIN_CHAR_VALUE=0,Bo.MAX_CHAR_VALUE=1114111;var Ho=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.configLookup=new b(Uo,Vo),this.fullCtx=void 0===e||e,this.readOnly=!1,this.configs=[],this.uniqueAlt=0,this.conflictingAlts=null,this.hasSemanticContext=!1,this.dipsIntoOuterContext=!1,this.cachedHashCode=-1}var e,n;return e=t,(n=[{key:"add",value:function(t,e){if(void 0===e&&(e=null),this.readOnly)throw"This set is readonly";t.semanticContext!==T.NONE&&(this.hasSemanticContext=!0),t.reachesIntoOuterContext>0&&(this.dipsIntoOuterContext=!0);var n=this.configLookup.add(t);if(n===t)return this.cachedHashCode=-1,this.configs.push(t),!0;var r=!this.fullCtx,o=oe(n.context,t.context,r,e);return n.reachesIntoOuterContext=Math.max(n.reachesIntoOuterContext,t.reachesIntoOuterContext),t.precedenceFilterSuppressed&&(n.precedenceFilterSuppressed=!0),n.context=o,!0}},{key:"getStates",value:function(){for(var t=new b,e=0;e<this.configs.length;e++)t.add(this.configs[e].state);return t}},{key:"getPredicates",value:function(){for(var t=[],e=0;e<this.configs.length;e++){var n=this.configs[e].semanticContext;n!==T.NONE&&t.push(n.semanticContext)}return t}},{key:"optimizeConfigs",value:function(t){if(this.readOnly)throw"This set is readonly";if(0!==this.configLookup.length)for(var e=0;e<this.configs.length;e++){var n=this.configs[e];n.context=t.getCachedContext(n.context)}}},{key:"addAll",value:function(t){for(var e=0;e<t.length;e++)this.add(t[e]);return!1}},{key:"equals",value:function(e){return this===e||e instanceof t&&i(this.configs,e.configs)&&this.fullCtx===e.fullCtx&&this.uniqueAlt===e.uniqueAlt&&this.conflictingAlts===e.conflictingAlts&&this.hasSemanticContext===e.hasSemanticContext&&this.dipsIntoOuterContext===e.dipsIntoOuterContext}},{key:"hashCode",value:function(){var t=new a;return t.update(this.configs),t.finish()}},{key:"updateHashCode",value:function(t){this.readOnly?(-1===this.cachedHashCode&&(this.cachedHashCode=this.hashCode()),t.update(this.cachedHashCode)):t.update(this.hashCode())}},{key:"isEmpty",value:function(){return 0===this.configs.length}},{key:"contains",value:function(t){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.contains(t)}},{key:"containsFast",value:function(t){if(null===this.configLookup)throw"This method is not implemented for readonly sets.";return this.configLookup.containsFast(t)}},{key:"clear",value:function(){if(this.readOnly)throw"This set is readonly";this.configs=[],this.cachedHashCode=-1,this.configLookup=new b}},{key:"setReadonly",value:function(t){this.readOnly=t,t&&(this.configLookup=null)}},{key:"toString",value:function(){return p(this.configs)+(this.hasSemanticContext?",hasSemanticContext="+this.hasSemanticContext:"")+(this.uniqueAlt!==le.INVALID_ALT_NUMBER?",uniqueAlt="+this.uniqueAlt:"")+(null!==this.conflictingAlts?",conflictingAlts="+this.conflictingAlts:"")+(this.dipsIntoOuterContext?",dipsIntoOuterContext":"")}},{key:"items",get:function(){return this.configs}},{key:"length",get:function(){return this.configs.length}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Mo(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Mo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Mo(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function qo(t){return qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qo(t)}var Yo=function(){function t(e,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),null===e&&(e=-1),null===n&&(n=new Ho),this.stateNumber=e,this.configs=n,this.edges=null,this.isAcceptState=!1,this.prediction=0,this.lexerActionExecutor=null,this.requiresFullContext=!1,this.predicates=null,this}var e,n;return e=t,(n=[{key:"getAltSet",value:function(){var t=new b;if(null!==this.configs)for(var e=0;e<this.configs.length;e++){var n=this.configs[e];t.add(n.alt)}return 0===t.length?null:t}},{key:"equals",value:function(e){return this===e||e instanceof t&&this.configs.equals(e.configs)}},{key:"toString",value:function(){var t=this.stateNumber+":"+this.configs;return this.isAcceptState&&(t+="=>",null!==this.predicates?t+=this.predicates:t+=this.prediction),t}},{key:"hashCode",value:function(){var t=new a;return t.update(this.configs),t.finish()}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==qo(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==qo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===qo(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function zo(t){return zo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zo(t)}var Ko=function(){function t(e,n){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.atn=e,this.sharedContextCache=n,this}var e,n;return e=t,n=[{key:"getCachedContext",value:function(t){if(null===this.sharedContextCache)return t;var e=new ee;return re(t,this.sharedContextCache,e)}}],n&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==zo(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==zo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===zo(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Go(t){return Go="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Go(t)}function Wo(t,e){return Wo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wo(t,e)}function Xo(t){return Xo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xo(t)}Ko.ERROR=new Yo(2147483647,new Ho);var Qo=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wo(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Xo(n);if(r){var o=Xo(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Go(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(t=o.call(this)).configLookup=new b,t}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(Ho);function $o(t){return $o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$o(t)}function Jo(){return Jo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var r=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ni(t)););return t}(t,e);if(r){var o=Object.getOwnPropertyDescriptor(r,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Jo.apply(this,arguments)}function Zo(t,e){return Zo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zo(t,e)}function ti(t,e){if(e&&("object"===$o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return ei(t)}function ei(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function ni(t){return ni=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ni(t)}var ri=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zo(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ni(r);if(o){var n=ni(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return ti(this,t)});function u(t,e){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),n=i.call(this,t,e);var r=t.lexerActionExecutor||null;return n.lexerActionExecutor=r||(null!==e?e.lexerActionExecutor:null),n.passedThroughNonGreedyDecision=null!==e&&n.checkNonGreedyDecision(e,n.state),n.hashCodeForConfigSet=u.prototype.hashCode,n.equalsForConfigSet=u.prototype.equals,ti(n,ei(n))}return e=u,(n=[{key:"updateHashCode",value:function(t){t.update(this.state.stateNumber,this.alt,this.context,this.semanticContext,this.passedThroughNonGreedyDecision,this.lexerActionExecutor)}},{key:"equals",value:function(t){return this===t||t instanceof u&&this.passedThroughNonGreedyDecision===t.passedThroughNonGreedyDecision&&(this.lexerActionExecutor?this.lexerActionExecutor.equals(t.lexerActionExecutor):!t.lexerActionExecutor)&&Jo(ni(u.prototype),"equals",this).call(this,t)}},{key:"checkNonGreedyDecision",value:function(t,e){return t.passedThroughNonGreedyDecision||e instanceof Se&&e.nonGreedy}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==$o(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==$o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===$o(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(R);function oi(t){return oi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oi(t)}function ii(t,e){return ii=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ii(t,e)}function ui(t){return ui=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ui(t)}var ci=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ii(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ui(r);if(o){var n=ui(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===oi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(n=i.call(this,e.actionType)).offset=t,n.action=e,n.isPositionDependent=!0,n}return e=u,(n=[{key:"execute",value:function(t){this.action.execute(t)}},{key:"updateHashCode",value:function(t){t.update(this.actionType,this.offset,this.action)}},{key:"equals",value:function(t){return this===t||t instanceof u&&this.offset===t.offset&&this.action===t.action}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==oi(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==oi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===oi(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(hr);function ai(t){return ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ai(t)}function si(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==ai(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ai(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===ai(o)?o:String(o)),r)}var o}var li=function(){function t(e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.lexerActions=null===e?[]:e,this.cachedHashCode=a.hashStuff(e),this}var e,n,r;return e=t,r=[{key:"append",value:function(e,n){return new t(null===e?[n]:e.lexerActions.concat([n]))}}],(n=[{key:"fixOffsetBeforeMatch",value:function(e){for(var n=null,r=0;r<this.lexerActions.length;r++)!this.lexerActions[r].isPositionDependent||this.lexerActions[r]instanceof ci||(null===n&&(n=this.lexerActions.concat([])),n[r]=new ci(e,this.lexerActions[r]));return null===n?this:new t(n)}},{key:"execute",value:function(t,e,n){var r=!1,o=e.index;try{for(var i=0;i<this.lexerActions.length;i++){var u=this.lexerActions[i];if(u instanceof ci){var c=u.offset;e.seek(n+c),u=u.action,r=n+c!==o}else u.isPositionDependent&&(e.seek(o),r=!1);u.execute(t)}}finally{r&&e.seek(o)}}},{key:"hashCode",value:function(){return this.cachedHashCode}},{key:"updateHashCode",value:function(t){t.update(this.cachedHashCode)}},{key:"equals",value:function(e){if(this===e)return!0;if(e instanceof t){if(this.cachedHashCode!=e.cachedHashCode)return!1;if(this.lexerActions.length!=e.lexerActions.length)return!1;for(var n=this.lexerActions.length,r=0;r<n;++r)if(!this.lexerActions[r].equals(e.lexerActions[r]))return!1;return!0}return!1}}])&&si(e.prototype,n),r&&si(e,r),Object.defineProperty(e,"prototype",{writable:!1}),t}();function fi(t,e){return fi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fi(t,e)}function pi(t){return pi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pi(t)}function yi(t){return yi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yi(t)}function hi(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function bi(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==yi(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==yi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===yi(o)?o:String(o)),r)}var o}function vi(t,e,n){return e&&bi(t.prototype,e),n&&bi(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function di(t){t.index=-1,t.line=0,t.column=-1,t.dfaState=null}var mi=function(){function t(){hi(this,t),di(this)}return vi(t,[{key:"reset",value:function(){di(this)}}]),t}(),gi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fi(t,e)}(i,t);var e,n,r=(e=i,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,r=pi(e);if(n){var o=pi(this).constructor;t=Reflect.construct(r,arguments,o)}else t=r.apply(this,arguments);return function(t,e){if(e&&("object"===yi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(t,e,n,o){var u;return hi(this,i),(u=r.call(this,e,o)).decisionToDFA=n,u.recog=t,u.startIndex=-1,u.line=1,u.column=0,u.mode=Bo.DEFAULT_MODE,u.prevAccept=new mi,u}return vi(i,[{key:"copyState",value:function(t){this.column=t.column,this.line=t.line,this.mode=t.mode,this.startIndex=t.startIndex}},{key:"match",value:function(t,e){this.mode=e;var n=t.mark();try{this.startIndex=t.index,this.prevAccept.reset();var r=this.decisionToDFA[e];return null===r.s0?this.matchATN(t):this.execATN(t,r.s0)}finally{t.release(n)}}},{key:"reset",value:function(){this.prevAccept.reset(),this.startIndex=-1,this.line=1,this.column=0,this.mode=Bo.DEFAULT_MODE}},{key:"matchATN",value:function(t){var e=this.atn.modeToStartState[this.mode];i.debug&&console.log("matchATN mode "+this.mode+" start: "+e);var n=this.mode,r=this.computeStartState(t,e),o=r.hasSemanticContext;r.hasSemanticContext=!1;var u=this.addDFAState(r);o||(this.decisionToDFA[this.mode].s0=u);var c=this.execATN(t,u);return i.debug&&console.log("DFA after matchATN: "+this.decisionToDFA[n].toLexerString()),c}},{key:"execATN",value:function(t,e){i.debug&&console.log("start state closure="+e.configs),e.isAcceptState&&this.captureSimState(this.prevAccept,t,e);for(var n=t.LA(1),r=e;;){i.debug&&console.log("execATN loop starting closure: "+r.configs);var u=this.getExistingTargetState(r,n);if(null===u&&(u=this.computeTargetState(t,r,n)),u===Ko.ERROR)break;if(n!==o.EOF&&this.consume(t),u.isAcceptState&&(this.captureSimState(this.prevAccept,t,u),n===o.EOF))break;n=t.LA(1),r=u}return this.failOrAccept(this.prevAccept,t,r.configs,n)}},{key:"getExistingTargetState",value:function(t,e){if(null===t.edges||e<i.MIN_DFA_EDGE||e>i.MAX_DFA_EDGE)return null;var n=t.edges[e-i.MIN_DFA_EDGE];return void 0===n&&(n=null),i.debug&&null!==n&&console.log("reuse state "+t.stateNumber+" edge to "+n.stateNumber),n}},{key:"computeTargetState",value:function(t,e,n){var r=new Qo;return this.getReachableConfigSet(t,e.configs,r,n),0===r.items.length?(r.hasSemanticContext||this.addDFAEdge(e,n,Ko.ERROR),Ko.ERROR):this.addDFAEdge(e,n,null,r)}},{key:"failOrAccept",value:function(t,e,n,r){if(null!==this.prevAccept.dfaState){var i=t.dfaState.lexerActionExecutor;return this.accept(e,i,this.startIndex,t.index,t.line,t.column),t.dfaState.prediction}if(r===o.EOF&&e.index===this.startIndex)return o.EOF;throw new No(this.recog,e,this.startIndex,n)}},{key:"getReachableConfigSet",value:function(t,e,n,r){for(var u=le.INVALID_ALT_NUMBER,c=0;c<e.items.length;c++){var a=e.items[c],s=a.alt===u;if(!s||!a.passedThroughNonGreedyDecision){i.debug&&console.log("testing %s at %s\n",this.getTokenName(r),a.toString(this.recog,!0));for(var l=0;l<a.state.transitions.length;l++){var f=a.state.transitions[l],p=this.getReachableTarget(f,r);if(null!==p){var y=a.lexerActionExecutor;null!==y&&(y=y.fixOffsetBeforeMatch(t.index-this.startIndex));var h=r===o.EOF,b=new ri({state:p,lexerActionExecutor:y},a);this.closure(t,b,n,s,!0,h)&&(u=a.alt)}}}}}},{key:"accept",value:function(t,e,n,r,o,u){i.debug&&console.log("ACTION %s\n",e),t.seek(r),this.line=o,this.column=u,null!==e&&null!==this.recog&&e.execute(this.recog,t,n)}},{key:"getReachableTarget",value:function(t,e){return t.matches(e,0,Bo.MAX_CHAR_VALUE)?t.target:null}},{key:"computeStartState",value:function(t,e){for(var n=Ft.EMPTY,r=new Qo,o=0;o<e.transitions.length;o++){var i=e.transitions[o].target,u=new ri({state:i,alt:o+1,context:n},null);this.closure(t,u,r,!1,!1,!1)}return r}},{key:"closure",value:function(t,e,n,r,o,u){var c=null;if(i.debug&&console.log("closure("+e.toString(this.recog,!0)+")"),e.state instanceof H){if(i.debug&&(null!==this.recog?console.log("closure at %s rule stop %s\n",this.recog.ruleNames[e.state.ruleIndex],e):console.log("closure at rule stop %s\n",e)),null===e.context||e.context.hasEmptyPath()){if(null===e.context||e.context.isEmpty())return n.add(e),!0;n.add(new ri({state:e.state,context:Ft.EMPTY},e)),r=!0}if(null!==e.context&&!e.context.isEmpty())for(var a=0;a<e.context.length;a++)if(e.context.getReturnState(a)!==Ft.EMPTY_RETURN_STATE){var s=e.context.getParent(a),l=this.atn.states[e.context.getReturnState(a)];c=new ri({state:l,context:s},e),r=this.closure(t,c,n,r,o,u)}return r}e.state.epsilonOnlyTransitions||r&&e.passedThroughNonGreedyDecision||n.add(e);for(var f=0;f<e.state.transitions.length;f++){var p=e.state.transitions[f];null!==(c=this.getEpsilonTarget(t,e,p,n,o,u))&&(r=this.closure(t,c,n,r,o,u))}return r}},{key:"getEpsilonTarget",value:function(t,e,n,r,u,c){var a=null;if(n.serializationType===q.RULE){var s=Wt.create(e.context,n.followState.stateNumber);a=new ri({state:n.target,context:s},e)}else{if(n.serializationType===q.PRECEDENCE)throw"Precedence predicates are not supported in lexers.";if(n.serializationType===q.PREDICATE)i.debug&&console.log("EVAL rule "+n.ruleIndex+":"+n.predIndex),r.hasSemanticContext=!0,this.evaluatePredicate(t,n.ruleIndex,n.predIndex,u)&&(a=new ri({state:n.target},e));else if(n.serializationType===q.ACTION)if(null===e.context||e.context.hasEmptyPath()){var l=li.append(e.lexerActionExecutor,this.atn.lexerActions[n.actionIndex]);a=new ri({state:n.target,lexerActionExecutor:l},e)}else a=new ri({state:n.target},e);else n.serializationType===q.EPSILON?a=new ri({state:n.target},e):n.serializationType!==q.ATOM&&n.serializationType!==q.RANGE&&n.serializationType!==q.SET||c&&n.matches(o.EOF,0,Bo.MAX_CHAR_VALUE)&&(a=new ri({state:n.target},e))}return a}},{key:"evaluatePredicate",value:function(t,e,n,r){if(null===this.recog)return!0;if(!r)return this.recog.sempred(null,e,n);var o=this.column,i=this.line,u=t.index,c=t.mark();try{return this.consume(t),this.recog.sempred(null,e,n)}finally{this.column=o,this.line=i,t.seek(u),t.release(c)}}},{key:"captureSimState",value:function(t,e,n){t.index=e.index,t.line=this.line,t.column=this.column,t.dfaState=n}},{key:"addDFAEdge",value:function(t,e,n,r){if(void 0===n&&(n=null),void 0===r&&(r=null),null===n&&null!==r){var o=r.hasSemanticContext;if(r.hasSemanticContext=!1,n=this.addDFAState(r),o)return n}return e<i.MIN_DFA_EDGE||e>i.MAX_DFA_EDGE||(i.debug&&console.log("EDGE "+t+" -> "+n+" upon "+e),null===t.edges&&(t.edges=[]),t.edges[e-i.MIN_DFA_EDGE]=n),n}},{key:"addDFAState",value:function(t){for(var e=new Yo(null,t),n=null,r=0;r<t.items.length;r++){var o=t.items[r];if(o.state instanceof H){n=o;break}}null!==n&&(e.isAcceptState=!0,e.lexerActionExecutor=n.lexerActionExecutor,e.prediction=this.atn.ruleToTokenType[n.state.ruleIndex]);var i=this.decisionToDFA[this.mode],u=i.states.get(e);if(null!==u)return u;var c=e;return c.stateNumber=i.states.length,t.setReadonly(!0),c.configs=t,i.states.add(c),c}},{key:"getDFA",value:function(t){return this.decisionToDFA[t]}},{key:"getText",value:function(t){return t.getText(this.startIndex,t.index-1)}},{key:"consume",value:function(t){t.LA(1)==="\n".charCodeAt(0)?(this.line+=1,this.column=0):this.column+=1,t.consume()}},{key:"getTokenName",value:function(t){return-1===t?"EOF":"'"+String.fromCharCode(t)+"'"}}]),i}(Ko);function Si(t){return Si="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Si(t)}gi.debug=!1,gi.dfa_debug=!1,gi.MIN_DFA_EDGE=0,gi.MAX_DFA_EDGE=127;var Oi=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.alt=n,this.pred=e}var e,n;return e=t,(n=[{key:"toString",value:function(){return"("+this.pred+", "+this.alt+")"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Si(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Si(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Si(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function wi(t){return wi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},wi(t)}var _i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.data={}}var e,n;return e=t,(n=[{key:"get",value:function(t){return this.data["k-"+t]||null}},{key:"set",value:function(t,e){this.data["k-"+t]=e}},{key:"values",value:function(){var t=this;return Object.keys(this.data).filter((function(t){return t.startsWith("k-")})).map((function(e){return t.data[e]}),this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==wi(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==wi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===wi(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),Ti={SLL:0,LL:1,LL_EXACT_AMBIG_DETECTION:2,hasSLLConflictTerminatingPrediction:function(t,e){if(Ti.allConfigsInRuleStopStates(e))return!0;if(t===Ti.SLL&&e.hasSemanticContext){for(var n=new Ho,r=0;r<e.items.length;r++){var o=e.items[r];o=new R({semanticContext:T.NONE},o),n.add(o)}e=n}var i=Ti.getConflictingAltSubsets(e);return Ti.hasConflictingAltSet(i)&&!Ti.hasStateAssociatedWithOneAlt(e)},hasConfigInRuleStopState:function(t){for(var e=0;e<t.items.length;e++)if(t.items[e].state instanceof H)return!0;return!1},allConfigsInRuleStopStates:function(t){for(var e=0;e<t.items.length;e++)if(!(t.items[e].state instanceof H))return!1;return!0},resolvesToJustOneViableAlt:function(t){return Ti.getSingleViableAlt(t)},allSubsetsConflict:function(t){return!Ti.hasNonConflictingAltSet(t)},hasNonConflictingAltSet:function(t){for(var e=0;e<t.length;e++)if(1===t[e].length)return!0;return!1},hasConflictingAltSet:function(t){for(var e=0;e<t.length;e++)if(t[e].length>1)return!0;return!1},allSubsetsEqual:function(t){for(var e=null,n=0;n<t.length;n++){var r=t[n];if(null===e)e=r;else if(r!==e)return!1}return!0},getUniqueAlt:function(t){var e=Ti.getAlts(t);return 1===e.length?e.minValue():le.INVALID_ALT_NUMBER},getAlts:function(t){var e=new ue;return t.map((function(t){e.or(t)})),e},getConflictingAltSubsets:function(t){var e=new ee;return e.hashFunction=function(t){a.hashStuff(t.state.stateNumber,t.context)},e.equalsFunction=function(t,e){return t.state.stateNumber===e.state.stateNumber&&t.context.equals(e.context)},t.items.map((function(t){var n=e.get(t);null===n&&(n=new ue,e.set(t,n)),n.add(t.alt)})),e.getValues()},getStateToAltMap:function(t){var e=new _i;return t.items.map((function(t){var n=e.get(t.state);null===n&&(n=new ue,e.set(t.state,n)),n.add(t.alt)})),e},hasStateAssociatedWithOneAlt:function(t){for(var e=Ti.getStateToAltMap(t).values(),n=0;n<e.length;n++)if(1===e[n].length)return!0;return!1},getSingleViableAlt:function(t){for(var e=null,n=0;n<t.length;n++){var r=t[n].minValue();if(null===e)e=r;else if(e!==r)return le.INVALID_ALT_NUMBER}return e}};const Pi=Ti;function Ei(t){return Ei="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ei(t)}function xi(t,e){return xi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xi(t,e)}function ki(t){return ki=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ki(t)}var ji=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xi(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=ki(n);if(r){var o=ki(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Ei(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(t,e,n,r,u,c){var a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),c=c||t._ctx,r=r||t.getCurrentToken(),n=n||t.getCurrentToken(),e=e||t.getInputStream(),(a=o.call(this,{message:"",recognizer:t,input:e,ctx:c})).deadEndConfigs=u,a.startToken=n,a.offendingToken=r,a}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(jo);function Ri(t){return Ri="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ri(t)}var Ci=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.defaultMapCtor=e||ee,this.cacheMap=new this.defaultMapCtor}var e,n;return e=t,(n=[{key:"get",value:function(t,e){var n=this.cacheMap.get(t)||null;return null===n?null:n.get(e)||null}},{key:"set",value:function(t,e,n){var r=this.cacheMap.get(t)||null;null===r&&(r=new this.defaultMapCtor,this.cacheMap.set(t,r)),r.set(e,n)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Ri(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Ri(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Ri(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ai(t){return Ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ai(t)}function Ni(t,e){return Ni=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ni(t,e)}function Ii(t){return Ii=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ii(t)}var Li=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ni(t,e)}(c,t);var e,n,r,i,u=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ii(r);if(i){var n=Ii(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Ai(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(t,e,n,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(o=u.call(this,e,r)).parser=t,o.decisionToDFA=n,o.predictionMode=Pi.LL,o._input=null,o._startIndex=0,o._outerContext=null,o._dfa=null,o.mergeCache=null,o.debug=!1,o.debug_closure=!1,o.debug_add=!1,o.trace_atn_sim=!1,o.dfa_debug=!1,o.retry_debug=!1,o}return e=c,n=[{key:"reset",value:function(){}},{key:"adaptivePredict",value:function(t,e,n){(this.debug||this.trace_atn_sim)&&console.log("adaptivePredict decision "+e+" exec LA(1)=="+this.getLookaheadName(t)+" line "+t.LT(1).line+":"+t.LT(1).column),this._input=t,this._startIndex=t.index,this._outerContext=n;var r=this.decisionToDFA[e];this._dfa=r;var o=t.mark(),i=t.index;try{var u;if(null===(u=r.precedenceDfa?r.getPrecedenceStartState(this.parser.getPrecedence()):r.s0)){null===n&&(n=Lt.EMPTY),this.debug&&console.log("predictATN decision "+r.decision+" exec LA(1)=="+this.getLookaheadName(t)+", outerContext="+n.toString(this.parser.ruleNames));var c=this.computeStartState(r.atnStartState,Lt.EMPTY,!1);r.precedenceDfa?(r.s0.configs=c,c=this.applyPrecedenceFilter(c),u=this.addDFAState(r,new Yo(null,c)),r.setPrecedenceStartState(this.parser.getPrecedence(),u)):(u=this.addDFAState(r,new Yo(null,c)),r.s0=u)}var a=this.execATN(r,u,t,i,n);return this.debug&&console.log("DFA after predictATN: "+r.toString(this.parser.literalNames,this.parser.symbolicNames)),a}finally{this._dfa=null,this.mergeCache=null,t.seek(i),t.release(o)}}},{key:"execATN",value:function(t,e,n,r,i){var u;(this.debug||this.trace_atn_sim)&&console.log("execATN decision "+t.decision+", DFA state "+e+", LA(1)=="+this.getLookaheadName(n)+" line "+n.LT(1).line+":"+n.LT(1).column);var c=e;this.debug&&console.log("s0 = "+e);for(var a=n.LA(1);;){var s=this.getExistingTargetState(c,a);if(null===s&&(s=this.computeTargetState(t,c,a)),s===Ko.ERROR){var l=this.noViableAlt(n,i,c.configs,r);if(n.seek(r),(u=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(c.configs,i))!==le.INVALID_ALT_NUMBER)return u;throw l}if(s.requiresFullContext&&this.predictionMode!==Pi.SLL){var f=null;if(null!==s.predicates){this.debug&&console.log("DFA state has preds in DFA sim LL failover");var p=n.index;if(p!==r&&n.seek(r),1===(f=this.evalSemanticContext(s.predicates,i,!0)).length)return this.debug&&console.log("Full LL avoided"),f.minValue();p!==r&&n.seek(p)}this.dfa_debug&&console.log("ctx sensitive state "+i+" in "+s);var y=this.computeStartState(t.atnStartState,i,!0);return this.reportAttemptingFullContext(t,f,s.configs,r,n.index),this.execATNWithFullContext(t,s,y,n,r,i)}if(s.isAcceptState){if(null===s.predicates)return s.prediction;var h=n.index;n.seek(r);var b=this.evalSemanticContext(s.predicates,i,!0);if(0===b.length)throw this.noViableAlt(n,i,s.configs,r);return 1===b.length||this.reportAmbiguity(t,s,r,h,!1,b,s.configs),b.minValue()}c=s,a!==o.EOF&&(n.consume(),a=n.LA(1))}}},{key:"getExistingTargetState",value:function(t,e){var n=t.edges;return null===n?null:n[e+1]||null}},{key:"computeTargetState",value:function(t,e,n){var r=this.computeReachSet(e.configs,n,!1);if(null===r)return this.addDFAEdge(t,e,n,Ko.ERROR),Ko.ERROR;var o=new Yo(null,r),i=this.getUniqueAlt(r);if(this.debug){var u=Pi.getConflictingAltSubsets(r);console.log("SLL altSubSets="+p(u)+", configs="+r+", predict="+i+", allSubsetsConflict="+Pi.allSubsetsConflict(u)+", conflictingAlts="+this.getConflictingAlts(r))}return i!==le.INVALID_ALT_NUMBER?(o.isAcceptState=!0,o.configs.uniqueAlt=i,o.prediction=i):Pi.hasSLLConflictTerminatingPrediction(this.predictionMode,r)&&(o.configs.conflictingAlts=this.getConflictingAlts(r),o.requiresFullContext=!0,o.isAcceptState=!0,o.prediction=o.configs.conflictingAlts.minValue()),o.isAcceptState&&o.configs.hasSemanticContext&&(this.predicateDFAState(o,this.atn.getDecisionState(t.decision)),null!==o.predicates&&(o.prediction=le.INVALID_ALT_NUMBER)),this.addDFAEdge(t,e,n,o)}},{key:"predicateDFAState",value:function(t,e){var n=e.transitions.length,r=this.getConflictingAltsOrUniqueAlt(t.configs),o=this.getPredsForAmbigAlts(r,t.configs,n);null!==o?(t.predicates=this.getPredicatePredictions(r,o),t.prediction=le.INVALID_ALT_NUMBER):t.prediction=r.minValue()}},{key:"execATNWithFullContext",value:function(t,e,n,r,i,u){(this.debug||this.trace_atn_sim)&&console.log("execATNWithFullContext "+n);var c,a=!1,s=n;r.seek(i);for(var l=r.LA(1),f=-1;;){if(null===(c=this.computeReachSet(s,l,!0))){var p=this.noViableAlt(r,u,s,i);r.seek(i);var y=this.getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule(s,u);if(y!==le.INVALID_ALT_NUMBER)return y;throw p}var h=Pi.getConflictingAltSubsets(c);if(this.debug&&console.log("LL altSubSets="+h+", predict="+Pi.getUniqueAlt(h)+", resolvesToJustOneViableAlt="+Pi.resolvesToJustOneViableAlt(h)),c.uniqueAlt=this.getUniqueAlt(c),c.uniqueAlt!==le.INVALID_ALT_NUMBER){f=c.uniqueAlt;break}if(this.predictionMode!==Pi.LL_EXACT_AMBIG_DETECTION){if((f=Pi.resolvesToJustOneViableAlt(h))!==le.INVALID_ALT_NUMBER)break}else if(Pi.allSubsetsConflict(h)&&Pi.allSubsetsEqual(h)){a=!0,f=Pi.getSingleViableAlt(h);break}s=c,l!==o.EOF&&(r.consume(),l=r.LA(1))}return c.uniqueAlt!==le.INVALID_ALT_NUMBER?(this.reportContextSensitivity(t,f,c,i,r.index),f):(this.reportAmbiguity(t,e,i,r.index,a,null,c),f)}},{key:"computeReachSet",value:function(t,e,n){this.debug&&console.log("in computeReachSet, starting closure: "+t),null===this.mergeCache&&(this.mergeCache=new Ci);for(var r=new Ho(n),i=null,u=0;u<t.items.length;u++){var c=t.items[u];if(this.debug&&console.log("testing "+this.getTokenName(e)+" at "+c),c.state instanceof H)(n||e===o.EOF)&&(null===i&&(i=[]),i.push(c),this.debug_add&&console.log("added "+c+" to skippedStopStates"));else for(var a=0;a<c.state.transitions.length;a++){var s=c.state.transitions[a],l=this.getReachableTarget(s,e);if(null!==l){var f=new R({state:l},c);r.add(f,this.mergeCache),this.debug_add&&console.log("added "+f+" to intermediate")}}}var p=null;if(null===i&&e!==o.EOF&&(1===r.items.length||this.getUniqueAlt(r)!==le.INVALID_ALT_NUMBER)&&(p=r),null===p){p=new Ho(n);for(var y=new b,h=e===o.EOF,v=0;v<r.items.length;v++)this.closure(r.items[v],p,y,!1,n,h)}if(e===o.EOF&&(p=this.removeAllConfigsNotInRuleStopState(p,p===r)),!(null===i||n&&Pi.hasConfigInRuleStopState(p)))for(var d=0;d<i.length;d++)p.add(i[d],this.mergeCache);return this.trace_atn_sim&&console.log("computeReachSet "+t+" -> "+p),0===p.items.length?null:p}},{key:"removeAllConfigsNotInRuleStopState",value:function(t,e){if(Pi.allConfigsInRuleStopStates(t))return t;for(var n=new Ho(t.fullCtx),r=0;r<t.items.length;r++){var i=t.items[r];if(i.state instanceof H)n.add(i,this.mergeCache);else if(e&&i.state.epsilonOnlyTransitions&&this.atn.nextTokens(i.state).contains(o.EPSILON)){var u=this.atn.ruleToStopState[i.state.ruleIndex];n.add(new R({state:u},i),this.mergeCache)}}return n}},{key:"computeStartState",value:function(t,e,n){var r=ne(this.atn,e),o=new Ho(n);this.trace_atn_sim&&console.log("computeStartState from ATN state "+t+" initialContext="+r.toString(this.parser));for(var i=0;i<t.transitions.length;i++){var u=t.transitions[i].target,c=new R({state:u,alt:i+1,context:r},null),a=new b;this.closure(c,o,a,!0,n,!1)}return o}},{key:"applyPrecedenceFilter",value:function(t){for(var e,n=[],r=new Ho(t.fullCtx),o=0;o<t.items.length;o++)if(1===(e=t.items[o]).alt){var i=e.semanticContext.evalPrecedence(this.parser,this._outerContext);null!==i&&(n[e.state.stateNumber]=e.context,i!==e.semanticContext?r.add(new R({semanticContext:i},e),this.mergeCache):r.add(e,this.mergeCache))}for(var u=0;u<t.items.length;u++)if(1!==(e=t.items[u]).alt){if(!e.precedenceFilterSuppressed){var c=n[e.state.stateNumber]||null;if(null!==c&&c.equals(e.context))continue}r.add(e,this.mergeCache)}return r}},{key:"getReachableTarget",value:function(t,e){return t.matches(e,0,this.atn.maxTokenType)?t.target:null}},{key:"getPredsForAmbigAlts",value:function(t,e,n){for(var r=[],o=0;o<e.items.length;o++){var i=e.items[o];t.has(i.alt)&&(r[i.alt]=T.orContext(r[i.alt]||null,i.semanticContext))}for(var u=0,c=1;c<n+1;c++){var a=r[c]||null;null===a?r[c]=T.NONE:a!==T.NONE&&(u+=1)}return 0===u&&(r=null),this.debug&&console.log("getPredsForAmbigAlts result "+p(r)),r}},{key:"getPredicatePredictions",value:function(t,e){for(var n=[],r=!1,o=1;o<e.length;o++){var i=e[o];null!==t&&t.has(o)&&n.push(new Oi(i,o)),i!==T.NONE&&(r=!0)}return r?n:null}},{key:"getSynValidOrSemInvalidAltThatFinishedDecisionEntryRule",value:function(t,e){var n=this.splitAccordingToSemanticValidity(t,e),r=n[0],o=n[1],i=this.getAltThatFinishedDecisionEntryRule(r);return i!==le.INVALID_ALT_NUMBER||o.items.length>0&&(i=this.getAltThatFinishedDecisionEntryRule(o))!==le.INVALID_ALT_NUMBER?i:le.INVALID_ALT_NUMBER}},{key:"getAltThatFinishedDecisionEntryRule",value:function(t){for(var e=[],n=0;n<t.items.length;n++){var r=t.items[n];(r.reachesIntoOuterContext>0||r.state instanceof H&&r.context.hasEmptyPath())&&e.indexOf(r.alt)<0&&e.push(r.alt)}return 0===e.length?le.INVALID_ALT_NUMBER:Math.min.apply(null,e)}},{key:"splitAccordingToSemanticValidity",value:function(t,e){for(var n=new Ho(t.fullCtx),r=new Ho(t.fullCtx),o=0;o<t.items.length;o++){var i=t.items[o];i.semanticContext!==T.NONE?i.semanticContext.evaluate(this.parser,e)?n.add(i):r.add(i):n.add(i)}return[n,r]}},{key:"evalSemanticContext",value:function(t,e,n){for(var r=new ue,o=0;o<t.length;o++){var i=t[o];if(i.pred!==T.NONE){var u=i.pred.evaluate(this.parser,e);if((this.debug||this.dfa_debug)&&console.log("eval pred "+i+"="+u),u&&((this.debug||this.dfa_debug)&&console.log("PREDICT "+i.alt),r.add(i.alt),!n))break}else if(r.add(i.alt),!n)break}return r}},{key:"closure",value:function(t,e,n,r,o,i){this.closureCheckingStopState(t,e,n,r,o,0,i)}},{key:"closureCheckingStopState",value:function(t,e,n,r,o,i,u){if((this.trace_atn_sim||this.debug_closure)&&console.log("closure("+t.toString(this.parser,!0)+")"),t.state instanceof H){if(!t.context.isEmpty()){for(var c=0;c<t.context.length;c++)if(t.context.getReturnState(c)!==Ft.EMPTY_RETURN_STATE){var a=this.atn.states[t.context.getReturnState(c)],s=t.context.getParent(c),l={state:a,alt:t.alt,context:s,semanticContext:t.semanticContext},f=new R(l,null);f.reachesIntoOuterContext=t.reachesIntoOuterContext,this.closureCheckingStopState(f,e,n,r,o,i-1,u)}else{if(o){e.add(new R({state:t.state,context:Ft.EMPTY},t),this.mergeCache);continue}this.debug&&console.log("FALLING off rule "+this.getRuleName(t.state.ruleIndex)),this.closure_(t,e,n,r,o,i,u)}return}if(o)return void e.add(t,this.mergeCache);this.debug&&console.log("FALLING off rule "+this.getRuleName(t.state.ruleIndex))}this.closure_(t,e,n,r,o,i,u)}},{key:"closure_",value:function(t,e,n,r,o,i,u){var c=t.state;c.epsilonOnlyTransitions||e.add(t,this.mergeCache);for(var a=0;a<c.transitions.length;a++)if(0!==a||!this.canDropLoopEntryEdgeInLeftRecursiveRule(t)){var s=c.transitions[a],l=r&&!(s instanceof zn),f=this.getEpsilonTarget(t,s,l,0===i,o,u);if(null!==f){var p=i;if(t.state instanceof H){if(null!==this._dfa&&this._dfa.precedenceDfa&&s.outermostPrecedenceReturn===this._dfa.atnStartState.ruleIndex&&(f.precedenceFilterSuppressed=!0),f.reachesIntoOuterContext+=1,n.add(f)!==f)continue;e.dipsIntoOuterContext=!0,p-=1,this.debug&&console.log("dips into outer ctx: "+f)}else{if(!s.isEpsilon&&n.add(f)!==f)continue;s instanceof G&&p>=0&&(p+=1)}this.closureCheckingStopState(f,e,n,l,o,p,u)}}}},{key:"canDropLoopEntryEdgeInLeftRecursiveRule",value:function(t){var e=t.state;if(e.stateType!==D.STAR_LOOP_ENTRY)return!1;if(e.stateType!==D.STAR_LOOP_ENTRY||!e.isPrecedenceDecision||t.context.isEmpty()||t.context.hasEmptyPath())return!1;for(var n=t.context.length,r=0;r<n;r++)if(this.atn.states[t.context.getReturnState(r)].ruleIndex!==e.ruleIndex)return!1;for(var o=e.transitions[0].target.endState.stateNumber,i=this.atn.states[o],u=0;u<n;u++){var c=t.context.getReturnState(u),a=this.atn.states[c];if(1!==a.transitions.length||!a.transitions[0].isEpsilon)return!1;var s=a.transitions[0].target;if(!(a.stateType===D.BLOCK_END&&s===e||a===i||s===i||s.stateType===D.BLOCK_END&&1===s.transitions.length&&s.transitions[0].isEpsilon&&s.transitions[0].target===e))return!1}return!0}},{key:"getRuleName",value:function(t){return null!==this.parser&&t>=0?this.parser.ruleNames[t]:"<rule "+t+">"}},{key:"getEpsilonTarget",value:function(t,e,n,r,i,u){switch(e.serializationType){case q.RULE:return this.ruleTransition(t,e);case q.PRECEDENCE:return this.precedenceTransition(t,e,n,r,i);case q.PREDICATE:return this.predTransition(t,e,n,r,i);case q.ACTION:return this.actionTransition(t,e);case q.EPSILON:return new R({state:e.target},t);case q.ATOM:case q.RANGE:case q.SET:return u&&e.matches(o.EOF,0,1)?new R({state:e.target},t):null;default:return null}}},{key:"actionTransition",value:function(t,e){if(this.debug){var n=-1===e.actionIndex?65535:e.actionIndex;console.log("ACTION edge "+e.ruleIndex+":"+n)}return new R({state:e.target},t)}},{key:"precedenceTransition",value:function(t,e,n,r,o){this.debug&&(console.log("PRED (collectPredicates="+n+") "+e.precedence+">=_p, ctx dependent=true"),null!==this.parser&&console.log("context surrounding pred is "+p(this.parser.getRuleInvocationStack())));var i=null;if(n&&r)if(o){var u=this._input.index;this._input.seek(this._startIndex);var c=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(u),c&&(i=new R({state:e.target},t))}else{var a=T.andContext(t.semanticContext,e.getPredicate());i=new R({state:e.target,semanticContext:a},t)}else i=new R({state:e.target},t);return this.debug&&console.log("config from pred transition="+i),i}},{key:"predTransition",value:function(t,e,n,r,o){this.debug&&(console.log("PRED (collectPredicates="+n+") "+e.ruleIndex+":"+e.predIndex+", ctx dependent="+e.isCtxDependent),null!==this.parser&&console.log("context surrounding pred is "+p(this.parser.getRuleInvocationStack())));var i=null;if(n&&(e.isCtxDependent&&r||!e.isCtxDependent))if(o){var u=this._input.index;this._input.seek(this._startIndex);var c=e.getPredicate().evaluate(this.parser,this._outerContext);this._input.seek(u),c&&(i=new R({state:e.target},t))}else{var a=T.andContext(t.semanticContext,e.getPredicate());i=new R({state:e.target,semanticContext:a},t)}else i=new R({state:e.target},t);return this.debug&&console.log("config from pred transition="+i),i}},{key:"ruleTransition",value:function(t,e){this.debug&&console.log("CALL rule "+this.getRuleName(e.target.ruleIndex)+", ctx="+t.context);var n=e.followState,r=Wt.create(t.context,n.stateNumber);return new R({state:e.target,context:r},t)}},{key:"getConflictingAlts",value:function(t){var e=Pi.getConflictingAltSubsets(t);return Pi.getAlts(e)}},{key:"getConflictingAltsOrUniqueAlt",value:function(t){var e=null;return t.uniqueAlt!==le.INVALID_ALT_NUMBER?(e=new ue).add(t.uniqueAlt):e=t.conflictingAlts,e}},{key:"getTokenName",value:function(t){if(t===o.EOF)return"EOF";if(null!==this.parser&&null!==this.parser.literalNames){if(!(t>=this.parser.literalNames.length&&t>=this.parser.symbolicNames.length))return(this.parser.literalNames[t]||this.parser.symbolicNames[t])+"<"+t+">";console.log(t+" ttype out of range: "+this.parser.literalNames),console.log(""+this.parser.getInputStream().getTokens())}return""+t}},{key:"getLookaheadName",value:function(t){return this.getTokenName(t.LA(1))}},{key:"dumpDeadEndConfigs",value:function(t){console.log("dead end configs: ");for(var e=t.getDeadEndConfigs(),n=0;n<e.length;n++){var r=e[n],o="no edges";if(r.state.transitions.length>0){var i=r.state.transitions[0];i instanceof Fn?o="Atom "+this.getTokenName(i.label):i instanceof $&&(o=(i instanceof nt?"~":"")+"Set "+i.set)}console.error(r.toString(this.parser,!0)+":"+o)}}},{key:"noViableAlt",value:function(t,e,n,r){return new ji(this.parser,t,t.get(r),t.LT(1),n,e)}},{key:"getUniqueAlt",value:function(t){for(var e=le.INVALID_ALT_NUMBER,n=0;n<t.items.length;n++){var r=t.items[n];if(e===le.INVALID_ALT_NUMBER)e=r.alt;else if(r.alt!==e)return le.INVALID_ALT_NUMBER}return e}},{key:"addDFAEdge",value:function(t,e,n,r){if(this.debug&&console.log("EDGE "+e+" -> "+r+" upon "+this.getTokenName(n)),null===r)return null;if(r=this.addDFAState(t,r),null===e||n<-1||n>this.atn.maxTokenType)return r;if(null===e.edges&&(e.edges=[]),e.edges[n+1]=r,this.debug){var o=null===this.parser?null:this.parser.literalNames,i=null===this.parser?null:this.parser.symbolicNames;console.log("DFA=\n"+t.toString(o,i))}return r}},{key:"addDFAState",value:function(t,e){if(e===Ko.ERROR)return e;var n=t.states.get(e);return null!==n?(this.trace_atn_sim&&console.log("addDFAState "+e+" exists"),n):(e.stateNumber=t.states.length,e.configs.readOnly||(e.configs.optimizeConfigs(this),e.configs.setReadonly(!0)),this.trace_atn_sim&&console.log("addDFAState new "+e),t.states.add(e),this.debug&&console.log("adding new DFA state: "+e),e)}},{key:"reportAttemptingFullContext",value:function(t,e,n,r,o){if(this.debug||this.retry_debug){var i=new A(r,o+1);console.log("reportAttemptingFullContext decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(i))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser,t,r,o,e,n)}},{key:"reportContextSensitivity",value:function(t,e,n,r,o){if(this.debug||this.retry_debug){var i=new A(r,o+1);console.log("reportContextSensitivity decision="+t.decision+":"+n+", input="+this.parser.getTokenStream().getText(i))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser,t,r,o,e,n)}},{key:"reportAmbiguity",value:function(t,e,n,r,o,i,u){if(this.debug||this.retry_debug){var c=new A(n,r+1);console.log("reportAmbiguity "+i+":"+u+", input="+this.parser.getTokenStream().getText(c))}null!==this.parser&&this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser,t,n,r,o,i,u)}}],n&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Ai(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Ai(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Ai(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(Ko);function Di(t){return Di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Di(t)}var Fi=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.cache=new ee}var e,n;return e=t,(n=[{key:"add",value:function(t){if(t===Ft.EMPTY)return Ft.EMPTY;var e=this.cache.get(t)||null;return null!==e?e:(this.cache.set(t,t),t)}},{key:"get",value:function(t){return this.cache.get(t)||null}},{key:"length",get:function(){return this.cache.length}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Di(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Di(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Di(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Bi={ATN:le,ATNDeserializer:Xr,LexerATNSimulator:gi,ParserATNSimulator:Li,PredictionMode:Pi,PredictionContextCache:Fi};function Mi(t){return Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mi(t)}var Ui=function(){function t(e,n,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.dfa=e,this.literalNames=n||[],this.symbolicNames=r||[]}var e,n;return e=t,(n=[{key:"toString",value:function(){if(null===this.dfa.s0)return null;for(var t="",e=this.dfa.sortedStates(),n=0;n<e.length;n++){var r=e[n];if(null!==r.edges)for(var o=r.edges.length,i=0;i<o;i++){var u=r.edges[i]||null;null!==u&&2147483647!==u.stateNumber&&(t=(t=(t=(t=(t=(t=t.concat(this.getStateString(r))).concat("-")).concat(this.getEdgeLabel(i))).concat("->")).concat(this.getStateString(u))).concat("\n"))}}return 0===t.length?null:t}},{key:"getEdgeLabel",value:function(t){return 0===t?"EOF":null!==this.literalNames||null!==this.symbolicNames?this.literalNames[t-1]||this.symbolicNames[t-1]:String.fromCharCode(t-1)}},{key:"getStateString",value:function(t){var e=(t.isAcceptState?":":"")+"s"+t.stateNumber+(t.requiresFullContext?"^":"");return t.isAcceptState?null!==t.predicates?e+"=>"+p(t.predicates):e+"=>"+t.prediction.toString():e}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Mi(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Mi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Mi(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Vi(t){return Vi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vi(t)}function Hi(t,e){return Hi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Hi(t,e)}function qi(t){return qi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qi(t)}var Yi=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hi(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=qi(r);if(o){var n=qi(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Vi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),i.call(this,t,null)}return e=u,(n=[{key:"getEdgeLabel",value:function(t){return"'"+String.fromCharCode(t)+"'"}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Vi(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Vi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Vi(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(Ui);function zi(t){return zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(t)}var Ki=function(){function t(e,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),void 0===n&&(n=0),this.atnStartState=e,this.decision=n,this._states=new b,this.s0=null,this.precedenceDfa=!1,e instanceof bn&&e.isPrecedenceDecision){this.precedenceDfa=!0;var r=new Yo(null,new Ho);r.edges=[],r.isAcceptState=!1,r.requiresFullContext=!1,this.s0=r}}var e,n;return e=t,(n=[{key:"getPrecedenceStartState",value:function(t){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";return t<0||t>=this.s0.edges.length?null:this.s0.edges[t]||null}},{key:"setPrecedenceStartState",value:function(t,e){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";t<0||(this.s0.edges[t]=e)}},{key:"setPrecedenceDfa",value:function(t){if(this.precedenceDfa!==t){if(this._states=new b,t){var e=new Yo(null,new Ho);e.edges=[],e.isAcceptState=!1,e.requiresFullContext=!1,this.s0=e}else this.s0=null;this.precedenceDfa=t}}},{key:"sortedStates",value:function(){return this._states.values().sort((function(t,e){return t.stateNumber-e.stateNumber}))}},{key:"toString",value:function(t,e){return t=t||null,e=e||null,null===this.s0?"":new Ui(this,t,e).toString()}},{key:"toLexerString",value:function(){return null===this.s0?"":new Yi(this).toString()}},{key:"states",get:function(){return this._states}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==zi(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==zi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===zi(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();const Gi={DFA:Ki,DFASerializer:Ui,LexerDFASerializer:Yi,PredPrediction:Oi},Wi={PredictionContext:Ft},Xi={Interval:A,IntervalSet:I};function Qi(t){return Qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qi(t)}var $i=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,(n=[{key:"visitTerminal",value:function(t){}},{key:"visitErrorNode",value:function(t){}},{key:"enterEveryRule",value:function(t){}},{key:"exitEveryRule",value:function(t){}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Qi(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Qi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Qi(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Ji(t){return Ji="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ji(t)}var Zi=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,(n=[{key:"visit",value:function(t){return Array.isArray(t)?t.map((function(t){return t.accept(this)}),this):t.accept(this)}},{key:"visitChildren",value:function(t){return t.children?this.visit(t.children):null}},{key:"visitTerminal",value:function(t){}},{key:"visitErrorNode",value:function(t){}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Ji(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Ji(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Ji(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function tu(t){return tu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tu(t)}var eu=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,(n=[{key:"walk",value:function(t,e){if(e instanceof jt||void 0!==e.isErrorNode&&e.isErrorNode())t.visitErrorNode(e);else if(e instanceof Pt)t.visitTerminal(e);else{this.enterRule(t,e);for(var n=0;n<e.getChildCount();n++){var r=e.getChild(n);this.walk(t,r)}this.exitRule(t,e)}}},{key:"enterRule",value:function(t,e){var n=e.ruleContext;t.enterEveryRule(n),n.enterRule(t)}},{key:"exitRule",value:function(t,e){var n=e.ruleContext;n.exitRule(t),t.exitEveryRule(n)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==tu(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==tu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===tu(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();eu.DEFAULT=new eu;const nu={Trees:Ct,RuleNode:Ot,ErrorNode:jt,TerminalNode:Pt,ParseTreeListener:$i,ParseTreeVisitor:Zi,ParseTreeWalker:eu};function ru(t){return ru="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ru(t)}function ou(t,e){return ou=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ou(t,e)}function iu(t){return iu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},iu(t)}var uu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ou(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=iu(n);if(r){var o=iu(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ru(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),(e=o.call(this,{message:"",recognizer:t,input:t.getInputStream(),ctx:t._ctx})).offendingToken=t.getCurrentToken(),e}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(jo);function cu(t){return cu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},cu(t)}function au(t,e){return au=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},au(t,e)}function su(t){return su=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},su(t)}var lu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&au(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=su(n);if(r){var o=su(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===cu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(t,e,n){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),r=o.call(this,{message:fu(e,n||null),recognizer:t,input:t.getInputStream(),ctx:t._ctx});var u=t._interp.atn.states[t.state].transitions[0];return u instanceof rr?(r.ruleIndex=u.ruleIndex,r.predicateIndex=u.predIndex):(r.ruleIndex=0,r.predicateIndex=0),r.predicate=e,r.offendingToken=t.getCurrentToken(),r}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(jo);function fu(t,e){return null!==e?e:"failed predicate: {"+t+"}?"}function pu(t){return pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pu(t)}function yu(t,e){return yu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yu(t,e)}function hu(t){return hu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hu(t)}var bu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yu(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=hu(r);if(o){var n=hu(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===pu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),t=t||!0,(e=i.call(this)).exactOnly=t,e}return e=u,n=[{key:"reportAmbiguity",value:function(t,e,n,r,o,i,u){if(!this.exactOnly||o){var c="reportAmbiguity d="+this.getDecisionDescription(t,e)+": ambigAlts="+this.getConflictingAlts(i,u)+", input='"+t.getTokenStream().getText(new A(n,r))+"'";t.notifyErrorListeners(c)}}},{key:"reportAttemptingFullContext",value:function(t,e,n,r,o,i){var u="reportAttemptingFullContext d="+this.getDecisionDescription(t,e)+", input='"+t.getTokenStream().getText(new A(n,r))+"'";t.notifyErrorListeners(u)}},{key:"reportContextSensitivity",value:function(t,e,n,r,o,i){var u="reportContextSensitivity d="+this.getDecisionDescription(t,e)+", input='"+t.getTokenStream().getText(new A(n,r))+"'";t.notifyErrorListeners(u)}},{key:"getDecisionDescription",value:function(t,e){var n=e.decision,r=e.atnStartState.ruleIndex,o=t.ruleNames;if(r<0||r>=o.length)return""+n;var i=o[r]||null;return null===i||0===i.length?""+n:"".concat(n," (").concat(i,")")}},{key:"getConflictingAlts",value:function(t,e){if(null!==t)return t;for(var n=new ue,r=0;r<e.items.length;r++)n.add(e.items[r].alt);return"{".concat(n.values().join(", "),"}")}}],n&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==pu(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==pu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===pu(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}($r);function vu(t){return vu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vu(t)}function du(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function mu(t){var e="function"==typeof Map?new Map:void 0;return mu=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return gu(t,arguments,wu(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),Ou(r,t)},mu(t)}function gu(t,e,n){return gu=Su()?Reflect.construct.bind():function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&Ou(o,n.prototype),o},gu.apply(null,arguments)}function Su(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}function Ou(t,e){return Ou=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ou(t,e)}function wu(t){return wu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wu(t)}var _u=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ou(t,e)}(i,t);var e,n,r,o=(n=i,r=Su(),function(){var t,e=wu(n);if(r){var o=wu(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===vu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return du(t)}(this,t)});function i(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),t=o.call(this),Error.captureStackTrace(du(t),i),t}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(mu(Error));function Tu(t){return Tu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tu(t)}function Pu(t){return Pu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pu(t)}function Eu(t,e){return Eu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Eu(t,e)}function xu(t){return xu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xu(t)}var ku=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Eu(t,e)}(c,t);var e,n,r,i,u=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=xu(r);if(i){var n=xu(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Pu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(t=u.call(this)).errorRecoveryMode=!1,t.lastErrorIndex=-1,t.lastErrorStates=null,t.nextTokensContext=null,t.nextTokenState=0,t}return e=c,n=[{key:"reset",value:function(t){this.endErrorCondition(t)}},{key:"beginErrorCondition",value:function(t){this.errorRecoveryMode=!0}},{key:"inErrorRecoveryMode",value:function(t){return this.errorRecoveryMode}},{key:"endErrorCondition",value:function(t){this.errorRecoveryMode=!1,this.lastErrorStates=null,this.lastErrorIndex=-1}},{key:"reportMatch",value:function(t){this.endErrorCondition(t)}},{key:"reportError",value:function(t,e){this.inErrorRecoveryMode(t)||(this.beginErrorCondition(t),e instanceof ji?this.reportNoViableAlternative(t,e):e instanceof uu?this.reportInputMismatch(t,e):e instanceof lu?this.reportFailedPredicate(t,e):(console.log("unknown recognition error type: "+e.constructor.name),console.log(e.stack),t.notifyErrorListeners(e.getOffendingToken(),e.getMessage(),e)))}},{key:"recover",value:function(t,e){this.lastErrorIndex===t.getInputStream().index&&null!==this.lastErrorStates&&this.lastErrorStates.indexOf(t.state)>=0&&t.consume(),this.lastErrorIndex=t._input.index,null===this.lastErrorStates&&(this.lastErrorStates=[]),this.lastErrorStates.push(t.state);var n=this.getErrorRecoverySet(t);this.consumeUntil(t,n)}},{key:"sync",value:function(t){if(!this.inErrorRecoveryMode(t)){var e=t._interp.atn.states[t.state],n=t.getTokenStream().LA(1),r=t.atn.nextTokens(e);if(r.contains(n))return this.nextTokensContext=null,void(this.nextTokenState=D.INVALID_STATE_NUMBER);if(r.contains(o.EPSILON))null===this.nextTokensContext&&(this.nextTokensContext=t._ctx,this.nextTokensState=t._stateNumber);else switch(e.stateType){case D.BLOCK_START:case D.STAR_BLOCK_START:case D.PLUS_BLOCK_START:case D.STAR_LOOP_ENTRY:if(null!==this.singleTokenDeletion(t))return;throw new uu(t);case D.PLUS_LOOP_BACK:case D.STAR_LOOP_BACK:this.reportUnwantedToken(t);var i=new I;i.addSet(t.getExpectedTokens());var u=i.addSet(this.getErrorRecoverySet(t));this.consumeUntil(t,u)}}}},{key:"reportNoViableAlternative",value:function(t,e){var n,r=t.getTokenStream();n=null!==r?e.startToken.type===o.EOF?"<EOF>":r.getText(new A(e.startToken.tokenIndex,e.offendingToken.tokenIndex)):"<unknown input>";var i="no viable alternative at input "+this.escapeWSAndQuote(n);t.notifyErrorListeners(i,e.offendingToken,e)}},{key:"reportInputMismatch",value:function(t,e){var n="mismatched input "+this.getTokenErrorDisplay(e.offendingToken)+" expecting "+e.getExpectedTokens().toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(n,e.offendingToken,e)}},{key:"reportFailedPredicate",value:function(t,e){var n="rule "+t.ruleNames[t._ctx.ruleIndex]+" "+e.message;t.notifyErrorListeners(n,e.offendingToken,e)}},{key:"reportUnwantedToken",value:function(t){if(!this.inErrorRecoveryMode(t)){this.beginErrorCondition(t);var e=t.getCurrentToken(),n="extraneous input "+this.getTokenErrorDisplay(e)+" expecting "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames);t.notifyErrorListeners(n,e,null)}}},{key:"reportMissingToken",value:function(t){if(!this.inErrorRecoveryMode(t)){this.beginErrorCondition(t);var e=t.getCurrentToken(),n="missing "+this.getExpectedTokens(t).toString(t.literalNames,t.symbolicNames)+" at "+this.getTokenErrorDisplay(e);t.notifyErrorListeners(n,e,null)}}},{key:"recoverInline",value:function(t){var e=this.singleTokenDeletion(t);if(null!==e)return t.consume(),e;if(this.singleTokenInsertion(t))return this.getMissingSymbol(t);throw new uu(t)}},{key:"singleTokenInsertion",value:function(t){var e=t.getTokenStream().LA(1),n=t._interp.atn,r=n.states[t.state].transitions[0].target;return!!n.nextTokens(r,t._ctx).contains(e)&&(this.reportMissingToken(t),!0)}},{key:"singleTokenDeletion",value:function(t){var e=t.getTokenStream().LA(2);if(this.getExpectedTokens(t).contains(e)){this.reportUnwantedToken(t),t.consume();var n=t.getCurrentToken();return this.reportMatch(t),n}return null}},{key:"getMissingSymbol",value:function(t){var e,n=t.getCurrentToken(),r=this.getExpectedTokens(t).first();e=r===o.EOF?"<missing EOF>":"<missing "+t.literalNames[r]+">";var i=n,u=t.getTokenStream().LT(-1);return i.type===o.EOF&&null!==u&&(i=u),t.getTokenFactory().create(i.source,r,e,o.DEFAULT_CHANNEL,-1,-1,i.line,i.column)}},{key:"getExpectedTokens",value:function(t){return t.getExpectedTokens()}},{key:"getTokenErrorDisplay",value:function(t){if(null===t)return"<no token>";var e=t.text;return null===e&&(e=t.type===o.EOF?"<EOF>":"<"+t.type+">"),this.escapeWSAndQuote(e)}},{key:"escapeWSAndQuote",value:function(t){return"'"+(t=(t=(t=t.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"}},{key:"getErrorRecoverySet",value:function(t){for(var e=t._interp.atn,n=t._ctx,r=new I;null!==n&&n.invokingState>=0;){var i=e.states[n.invokingState].transitions[0],u=e.nextTokens(i.followState);r.addSet(u),n=n.parentCtx}return r.removeOne(o.EPSILON),r}},{key:"consumeUntil",value:function(t,e){for(var n=t.getTokenStream().LA(1);n!==o.EOF&&!e.contains(n);)t.consume(),n=t.getTokenStream().LA(1)}}],n&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Pu(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Pu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Pu(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,(n=[{key:"reset",value:function(t){}},{key:"recoverInline",value:function(t){}},{key:"recover",value:function(t,e){}},{key:"sync",value:function(t){}},{key:"inErrorRecoveryMode",value:function(t){}},{key:"reportError",value:function(t){}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Tu(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Tu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Tu(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}());function ju(t){return ju="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ju(t)}function Ru(t,e){return Ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ru(t,e)}function Cu(t){return Cu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cu(t)}var Au=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ru(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Cu(r);if(o){var n=Cu(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ju(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),i.call(this)}return e=u,n=[{key:"recover",value:function(t,e){for(var n=t._ctx;null!==n;)n.exception=e,n=n.parentCtx;throw new _u(e)}},{key:"recoverInline",value:function(t){this.recover(t,new uu(t))}},{key:"sync",value:function(t){}}],n&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==ju(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ju(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===ju(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(ku);const Nu={RecognitionException:jo,NoViableAltException:ji,LexerNoViableAltException:No,InputMismatchException:uu,FailedPredicateException:lu,DiagnosticErrorListener:bu,BailErrorStrategy:Au,DefaultErrorStrategy:ku,ErrorListener:$r};var Iu,Lu;function Du(t){return Du="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Du(t)}String.prototype.codePointAt||(Lu=function(t){if(null==this)throw TypeError();var e=String(this),n=e.length,r=t?Number(t):0;if(r!=r&&(r=0),!(r<0||r>=n)){var o,i=e.charCodeAt(r);return i>=55296&&i<=56319&&n>r+1&&(o=e.charCodeAt(r+1))>=56320&&o<=57343?1024*(i-55296)+o-56320+65536:i}},(Iu=function(){var t;try{var e={},n=Object.defineProperty;t=n(e,e,e)&&n}catch(t){}return t}())?Iu(String.prototype,"codePointAt",{value:Lu,configurable:!0,writable:!0}):String.prototype.codePointAt=Lu),String.prototype.codePointAt,String.fromCodePoint||function(){var t=function(){var t;try{var e={},n=Object.defineProperty;t=n(e,e,e)&&n}catch(t){}return t}(),e=String.fromCharCode,n=Math.floor,r=function(t){var r,o,i=[],u=-1,c=arguments.length;if(!c)return"";for(var a="";++u<c;){var s=Number(arguments[u]);if(!isFinite(s)||s<0||s>1114111||n(s)!==s)throw RangeError("Invalid code point: "+s);s<=65535?i.push(s):(r=55296+((s-=65536)>>10),o=s%1024+56320,i.push(r,o)),(u+1===c||i.length>16384)&&(a+=e.apply(null,i),i.length=0)}return a};t?t(String,"fromCodePoint",{value:r,configurable:!0,writable:!0}):String.fromCodePoint=r}(),String.prototype.fromCodePoint;var Fu=function(){function t(e,n){if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name="<empty>",this.strdata=e,this.decodeToUnicodeCodePoints=n||!1,this._index=0,this.data=[],this.decodeToUnicodeCodePoints)for(var r=0;r<this.strdata.length;){var o=this.strdata.codePointAt(r);this.data.push(o),r+=o<=65535?1:2}else{this.data=new Array(this.strdata.length);for(var i=0;i<this.strdata.length;i++)this.data[i]=this.strdata.charCodeAt(i)}this._size=this.data.length}var e,n;return e=t,(n=[{key:"reset",value:function(){this._index=0}},{key:"consume",value:function(){if(this._index>=this._size)throw"cannot consume EOF";this._index+=1}},{key:"LA",value:function(t){if(0===t)return 0;t<0&&(t+=1);var e=this._index+t-1;return e<0||e>=this._size?o.EOF:this.data[e]}},{key:"LT",value:function(t){return this.LA(t)}},{key:"mark",value:function(){return-1}},{key:"release",value:function(t){}},{key:"seek",value:function(t){t<=this._index?this._index=t:this._index=Math.min(t,this._size)}},{key:"getText",value:function(t,e){if(e>=this._size&&(e=this._size-1),t>=this._size)return"";if(this.decodeToUnicodeCodePoints){for(var n="",r=t;r<=e;r++)n+=String.fromCodePoint(this.data[r]);return n}return this.strdata.slice(t,e+1)}},{key:"toString",value:function(){return this.strdata}},{key:"index",get:function(){return this._index}},{key:"size",get:function(){return this._size}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Du(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Du(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Du(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function Bu(t){return Bu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bu(t)}function Mu(t,e){return Mu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Mu(t,e)}function Uu(t){return Uu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Uu(t)}var Vu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Mu(t,e)}(i,t);var e,n,r,o=(n=i,r=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Uu(n);if(r){var o=Uu(this).constructor;t=Reflect.construct(e,arguments,o)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Bu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function i(t,e){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,i),o.call(this,t,e)}return e=i,Object.defineProperty(e,"prototype",{writable:!1}),e}(Fu),Hu=n(92);function qu(t){return qu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qu(t)}function Yu(t,e){return Yu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yu(t,e)}function zu(t){return zu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zu(t)}var Ku="undefined"!=typeof process&&null!=process.versions&&null!=process.versions.node,Gu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yu(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=zu(r);if(o){var n=zu(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===qu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e,n){var r;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),!Ku)throw new Error("FileStream is only available when running in Node!");var o=Hu.readFileSync(t,e||"utf-8");return(r=i.call(this,o,n)).fileName=t,r}return e=u,n=[{key:"fromPath",value:function(t,e,n){if(!Ku)throw new Error("FileStream is only available when running in Node!");Hu.readFile(t,e,(function(t,e){var r=null;null!==e&&(r=new Fu(e,!0)),n(t,r)}))}}],n&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==qu(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==qu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===qu(o)?o:String(o)),r)}var o}(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(Vu);const Wu={fromString:function(t){return new Fu(t,!0)},fromBlob:function(t,e,n,r){var o=new window.FileReader;o.onload=function(t){var e=new Fu(t.target.result,!0);n(e)},o.onerror=r,o.readAsText(t,e)},fromBuffer:function(t,e){return new Fu(t.toString(e),!0)},fromPath:function(t,e,n){Gu.fromPath(t,e,n)},fromPathSync:function(t,e){return new Gu(t,e)}},Xu={arrayToString:p,stringToCharArray:function(t){for(var e=new Uint16Array(t.length),n=0;n<t.length;n++)e[n]=t.charCodeAt(n);return e}};function Qu(t){return Qu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qu(t)}function $u(t,e){return $u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$u(t,e)}function Ju(t){return Ju=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ju(t)}var Zu=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$u(t,e)}(c,t);var e,n,r,i,u=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=Ju(r);if(i){var n=Ju(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Qu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(e=u.call(this)).tokenSource=t,e.tokens=[],e.index=-1,e.fetchedEOF=!1,e}return e=c,(n=[{key:"mark",value:function(){return 0}},{key:"release",value:function(t){}},{key:"reset",value:function(){this.seek(0)}},{key:"seek",value:function(t){this.lazyInit(),this.index=this.adjustSeekIndex(t)}},{key:"get",value:function(t){return this.lazyInit(),this.tokens[t]}},{key:"consume",value:function(){if(!(this.index>=0&&(this.fetchedEOF?this.index<this.tokens.length-1:this.index<this.tokens.length))&&this.LA(1)===o.EOF)throw"cannot consume EOF";this.sync(this.index+1)&&(this.index=this.adjustSeekIndex(this.index+1))}},{key:"sync",value:function(t){var e=t-this.tokens.length+1;return!(e>0)||this.fetch(e)>=e}},{key:"fetch",value:function(t){if(this.fetchedEOF)return 0;for(var e=0;e<t;e++){var n=this.tokenSource.nextToken();if(n.tokenIndex=this.tokens.length,this.tokens.push(n),n.type===o.EOF)return this.fetchedEOF=!0,e+1}return t}},{key:"getTokens",value:function(t,e,n){if(void 0===n&&(n=null),t<0||e<0)return null;this.lazyInit();var r=[];e>=this.tokens.length&&(e=this.tokens.length-1);for(var i=t;i<e;i++){var u=this.tokens[i];if(u.type===o.EOF)break;(null===n||n.contains(u.type))&&r.push(u)}return r}},{key:"LA",value:function(t){return this.LT(t).type}},{key:"LB",value:function(t){return this.index-t<0?null:this.tokens[this.index-t]}},{key:"LT",value:function(t){if(this.lazyInit(),0===t)return null;if(t<0)return this.LB(-t);var e=this.index+t-1;return this.sync(e),e>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[e]}},{key:"adjustSeekIndex",value:function(t){return t}},{key:"lazyInit",value:function(){-1===this.index&&this.setup()}},{key:"setup",value:function(){this.sync(0),this.index=this.adjustSeekIndex(0)}},{key:"setTokenSource",value:function(t){this.tokenSource=t,this.tokens=[],this.index=-1,this.fetchedEOF=!1}},{key:"nextTokenOnChannel",value:function(t,e){if(this.sync(t),t>=this.tokens.length)return-1;for(var n=this.tokens[t];n.channel!==this.channel;){if(n.type===o.EOF)return-1;t+=1,this.sync(t),n=this.tokens[t]}return t}},{key:"previousTokenOnChannel",value:function(t,e){for(;t>=0&&this.tokens[t].channel!==e;)t-=1;return t}},{key:"getHiddenTokensToRight",value:function(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;var n=this.nextTokenOnChannel(t+1,Bo.DEFAULT_TOKEN_CHANNEL),r=t+1,o=-1===n?this.tokens.length-1:n;return this.filterForChannel(r,o,e)}},{key:"getHiddenTokensToLeft",value:function(t,e){if(void 0===e&&(e=-1),this.lazyInit(),t<0||t>=this.tokens.length)throw t+" not in 0.."+this.tokens.length-1;var n=this.previousTokenOnChannel(t-1,Bo.DEFAULT_TOKEN_CHANNEL);if(n===t-1)return null;var r=n+1,o=t-1;return this.filterForChannel(r,o,e)}},{key:"filterForChannel",value:function(t,e,n){for(var r=[],o=t;o<e+1;o++){var i=this.tokens[o];-1===n?i.channel!==Bo.DEFAULT_TOKEN_CHANNEL&&r.push(i):i.channel===n&&r.push(i)}return 0===r.length?null:r}},{key:"getSourceName",value:function(){return this.tokenSource.getSourceName()}},{key:"getText",value:function(t){this.lazyInit(),this.fill(),t||(t=new A(0,this.tokens.length-1));var e=t.start;e instanceof o&&(e=e.tokenIndex);var n=t.stop;if(n instanceof o&&(n=n.tokenIndex),null===e||null===n||e<0||n<0)return"";n>=this.tokens.length&&(n=this.tokens.length-1);for(var r="",i=e;i<n+1;i++){var u=this.tokens[i];if(u.type===o.EOF)break;r+=u.text}return r}},{key:"fill",value:function(){for(this.lazyInit();1e3===this.fetch(1e3););}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Qu(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Qu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Qu(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(function(t,e,n){return Object.defineProperty(t,"prototype",{writable:!1}),t}((function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)})));function tc(t){return tc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tc(t)}function ec(t,e){return ec=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ec(t,e)}function nc(t){return nc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nc(t)}Object.defineProperty(Zu,"size",{get:function(){return this.tokens.length}});var rc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ec(t,e)}(c,t);var e,n,r,i,u=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=nc(r);if(i){var n=nc(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===tc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(n=u.call(this,t)).channel=void 0===e?o.DEFAULT_CHANNEL:e,n}return e=c,(n=[{key:"adjustSeekIndex",value:function(t){return this.nextTokenOnChannel(t,this.channel)}},{key:"LB",value:function(t){if(0===t||this.index-t<0)return null;for(var e=this.index,n=1;n<=t;)e=this.previousTokenOnChannel(e-1,this.channel),n+=1;return e<0?null:this.tokens[e]}},{key:"LT",value:function(t){if(this.lazyInit(),0===t)return null;if(t<0)return this.LB(-t);for(var e=this.index,n=1;n<t;)this.sync(e+1)&&(e=this.nextTokenOnChannel(e+1,this.channel)),n+=1;return this.tokens[e]}},{key:"getNumberOfOnChannelTokens",value:function(){var t=0;this.fill();for(var e=0;e<this.tokens.length;e++){var n=this.tokens[e];if(n.channel===this.channel&&(t+=1),n.type===o.EOF)break}return t}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==tc(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==tc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===tc(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(Zu);function oc(t){return oc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oc(t)}function ic(t,e){return ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ic(t,e)}function uc(t){return uc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},uc(t)}var cc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ic(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=uc(r);if(o){var n=uc(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===oc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(e=i.call(this)).parser=t,e}return e=u,(n=[{key:"enterEveryRule",value:function(t){console.log("enter "+this.parser.ruleNames[t.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}},{key:"visitTerminal",value:function(t){console.log("consume "+t.symbol+" rule "+this.parser.ruleNames[this.parser._ctx.ruleIndex])}},{key:"exitEveryRule",value:function(t){console.log("exit "+this.parser.ruleNames[t.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==oc(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==oc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===oc(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}($i);function ac(t){return ac="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ac(t)}function sc(t,e){return sc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},sc(t,e)}function lc(t){return lc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},lc(t)}var fc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sc(t,e)}(c,t);var e,n,r,i,u=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=lc(r);if(i){var n=lc(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===ac(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(e=u.call(this))._input=null,e._errHandler=new ku,e._precedenceStack=[],e._precedenceStack.push(0),e._ctx=null,e.buildParseTrees=!0,e._tracer=null,e._parseListeners=null,e._syntaxErrors=0,e.setInputStream(t),e}return e=c,n=[{key:"reset",value:function(){null!==this._input&&this._input.seek(0),this._errHandler.reset(this),this._ctx=null,this._syntaxErrors=0,this.setTrace(!1),this._precedenceStack=[],this._precedenceStack.push(0),null!==this._interp&&this._interp.reset()}},{key:"match",value:function(t){var e=this.getCurrentToken();return e.type===t?(this._errHandler.reportMatch(this),this.consume()):(e=this._errHandler.recoverInline(this),this.buildParseTrees&&-1===e.tokenIndex&&this._ctx.addErrorNode(e)),e}},{key:"matchWildcard",value:function(){var t=this.getCurrentToken();return t.type>0?(this._errHandler.reportMatch(this),this.consume()):(t=this._errHandler.recoverInline(this),this.buildParseTrees&&-1===t.tokenIndex&&this._ctx.addErrorNode(t)),t}},{key:"getParseListeners",value:function(){return this._parseListeners||[]}},{key:"addParseListener",value:function(t){if(null===t)throw"listener";null===this._parseListeners&&(this._parseListeners=[]),this._parseListeners.push(t)}},{key:"removeParseListener",value:function(t){if(null!==this._parseListeners){var e=this._parseListeners.indexOf(t);e>=0&&this._parseListeners.splice(e,1),0===this._parseListeners.length&&(this._parseListeners=null)}}},{key:"removeParseListeners",value:function(){this._parseListeners=null}},{key:"triggerEnterRuleEvent",value:function(){if(null!==this._parseListeners){var t=this._ctx;this._parseListeners.forEach((function(e){e.enterEveryRule(t),t.enterRule(e)}))}}},{key:"triggerExitRuleEvent",value:function(){if(null!==this._parseListeners){var t=this._ctx;this._parseListeners.slice(0).reverse().forEach((function(e){t.exitRule(e),e.exitEveryRule(t)}))}}},{key:"getTokenFactory",value:function(){return this._input.tokenSource._factory}},{key:"setTokenFactory",value:function(t){this._input.tokenSource._factory=t}},{key:"getATNWithBypassAlts",value:function(){var t=this.getSerializedATN();if(null===t)throw"The current parser does not support an ATN with bypass alternatives.";var e=this.bypassAltsAtnCache[t];if(null===e){var n=new pr;n.generateRuleBypassTransitions=!0,e=new Xr(n).deserialize(t),this.bypassAltsAtnCache[t]=e}return e}},{key:"getInputStream",value:function(){return this.getTokenStream()}},{key:"setInputStream",value:function(t){this.setTokenStream(t)}},{key:"getTokenStream",value:function(){return this._input}},{key:"setTokenStream",value:function(t){this._input=null,this.reset(),this._input=t}},{key:"getCurrentToken",value:function(){return this._input.LT(1)}},{key:"notifyErrorListeners",value:function(t,e,n){n=n||null,null===(e=e||null)&&(e=this.getCurrentToken()),this._syntaxErrors+=1;var r=e.line,o=e.column;this.getErrorListenerDispatch().syntaxError(this,e,r,o,t,n)}},{key:"consume",value:function(){var t=this.getCurrentToken();t.type!==o.EOF&&this.getInputStream().consume();var e,n=null!==this._parseListeners&&this._parseListeners.length>0;return(this.buildParseTrees||n)&&((e=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(t):this._ctx.addTokenNode(t)).invokingState=this.state,n&&this._parseListeners.forEach((function(t){e instanceof jt||void 0!==e.isErrorNode&&e.isErrorNode()?t.visitErrorNode(e):e instanceof Pt&&t.visitTerminal(e)}))),t}},{key:"addContextToParseTree",value:function(){null!==this._ctx.parentCtx&&this._ctx.parentCtx.addChild(this._ctx)}},{key:"enterRule",value:function(t,e,n){this.state=e,this._ctx=t,this._ctx.start=this._input.LT(1),this.buildParseTrees&&this.addContextToParseTree(),this.triggerEnterRuleEvent()}},{key:"exitRule",value:function(){this._ctx.stop=this._input.LT(-1),this.triggerExitRuleEvent(),this.state=this._ctx.invokingState,this._ctx=this._ctx.parentCtx}},{key:"enterOuterAlt",value:function(t,e){t.setAltNumber(e),this.buildParseTrees&&this._ctx!==t&&null!==this._ctx.parentCtx&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(t)),this._ctx=t}},{key:"getPrecedence",value:function(){return 0===this._precedenceStack.length?-1:this._precedenceStack[this._precedenceStack.length-1]}},{key:"enterRecursionRule",value:function(t,e,n,r){this.state=e,this._precedenceStack.push(r),this._ctx=t,this._ctx.start=this._input.LT(1),this.triggerEnterRuleEvent()}},{key:"pushNewRecursionContext",value:function(t,e,n){var r=this._ctx;r.parentCtx=t,r.invokingState=e,r.stop=this._input.LT(-1),this._ctx=t,this._ctx.start=r.start,this.buildParseTrees&&this._ctx.addChild(r),this.triggerEnterRuleEvent()}},{key:"unrollRecursionContexts",value:function(t){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);var e=this._ctx,n=this.getParseListeners();if(null!==n&&n.length>0)for(;this._ctx!==t;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=t;e.parentCtx=t,this.buildParseTrees&&null!==t&&t.addChild(e)}},{key:"getInvokingContext",value:function(t){for(var e=this._ctx;null!==e;){if(e.ruleIndex===t)return e;e=e.parentCtx}return null}},{key:"precpred",value:function(t,e){return e>=this._precedenceStack[this._precedenceStack.length-1]}},{key:"inContext",value:function(t){return!1}},{key:"isExpectedToken",value:function(t){var e=this._interp.atn,n=this._ctx,r=e.states[this.state],i=e.nextTokens(r);if(i.contains(t))return!0;if(!i.contains(o.EPSILON))return!1;for(;null!==n&&n.invokingState>=0&&i.contains(o.EPSILON);){var u=e.states[n.invokingState].transitions[0];if((i=e.nextTokens(u.followState)).contains(t))return!0;n=n.parentCtx}return!(!i.contains(o.EPSILON)||t!==o.EOF)}},{key:"getExpectedTokens",value:function(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}},{key:"getExpectedTokensWithinCurrentRule",value:function(){var t=this._interp.atn,e=t.states[this.state];return t.nextTokens(e)}},{key:"getRuleIndex",value:function(t){var e=this.getRuleIndexMap()[t];return null!==e?e:-1}},{key:"getRuleInvocationStack",value:function(t){null===(t=t||null)&&(t=this._ctx);for(var e=[];null!==t;){var n=t.ruleIndex;n<0?e.push("n/a"):e.push(this.ruleNames[n]),t=t.parentCtx}return e}},{key:"getDFAStrings",value:function(){return this._interp.decisionToDFA.toString()}},{key:"dumpDFA",value:function(){for(var t=!1,e=0;e<this._interp.decisionToDFA.length;e++){var n=this._interp.decisionToDFA[e];n.states.length>0&&(t&&console.log(),this.printer.println("Decision "+n.decision+":"),this.printer.print(n.toString(this.literalNames,this.symbolicNames)),t=!0)}}},{key:"getSourceName",value:function(){return this._input.sourceName}},{key:"setTrace",value:function(t){t?(null!==this._tracer&&this.removeParseListener(this._tracer),this._tracer=new cc(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)}}],n&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==ac(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==ac(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===ac(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(so);function pc(t){return pc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pc(t)}function yc(t,e){return yc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yc(t,e)}function hc(t){return hc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},hc(t)}fc.bypassAltsAtnCache={};var bc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yc(t,e)}(c,t);var e,n,r,i,u=(r=c,i=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=hc(r);if(i){var n=hc(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===pc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function c(t){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,c),(e=u.call(this)).parentCtx=null,e.symbol=t,e}return e=c,(n=[{key:"getChild",value:function(t){return null}},{key:"getSymbol",value:function(){return this.symbol}},{key:"getParent",value:function(){return this.parentCtx}},{key:"getPayload",value:function(){return this.symbol}},{key:"getSourceInterval",value:function(){if(null===this.symbol)return A.INVALID_INTERVAL;var t=this.symbol.tokenIndex;return new A(t,t)}},{key:"getChildCount",value:function(){return 0}},{key:"accept",value:function(t){return t.visitTerminal(this)}},{key:"getText",value:function(){return this.symbol.text}},{key:"toString",value:function(){return this.symbol.type===o.EOF?"<EOF>":this.symbol.text}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==pc(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==pc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===pc(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),c}(Pt);function vc(t){return vc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vc(t)}function dc(t,e){return dc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},dc(t,e)}function mc(t){return mc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},mc(t)}var gc=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&dc(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=mc(r);if(o){var n=mc(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===vc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),i.call(this,t)}return e=u,(n=[{key:"isErrorNode",value:function(){return!0}},{key:"accept",value:function(t){return t.visitErrorNode(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==vc(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==vc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===vc(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(bc);function Sc(t){return Sc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sc(t)}function Oc(t,e){return Oc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Oc(t,e)}function wc(t){return wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wc(t)}var _c=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oc(t,e)}(u,t);var e,n,r,o,i=(r=u,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,e=wc(r);if(o){var n=wc(this).constructor;t=Reflect.construct(e,arguments,n)}else t=e.apply(this,arguments);return function(t,e){if(e&&("object"===Sc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function u(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(n=i.call(this,t,e)).children=null,n.start=null,n.stop=null,n.exception=null,n}return e=u,(n=[{key:"copyFrom",value:function(t){this.parentCtx=t.parentCtx,this.invokingState=t.invokingState,this.children=null,this.start=t.start,this.stop=t.stop,t.children&&(this.children=[],t.children.map((function(t){t instanceof gc&&(this.children.push(t),t.parentCtx=this)}),this))}},{key:"enterRule",value:function(t){}},{key:"exitRule",value:function(t){}},{key:"addChild",value:function(t){return null===this.children&&(this.children=[]),this.children.push(t),t}},{key:"removeLastChild",value:function(){null!==this.children&&this.children.pop()}},{key:"addTokenNode",value:function(t){var e=new bc(t);return this.addChild(e),e.parentCtx=this,e}},{key:"addErrorNode",value:function(t){var e=new gc(t);return this.addChild(e),e.parentCtx=this,e}},{key:"getChild",value:function(t,e){if(e=e||null,null===this.children||t<0||t>=this.children.length)return null;if(null===e)return this.children[t];for(var n=0;n<this.children.length;n++){var r=this.children[n];if(r instanceof e){if(0===t)return r;t-=1}}return null}},{key:"getToken",value:function(t,e){if(null===this.children||e<0||e>=this.children.length)return null;for(var n=0;n<this.children.length;n++){var r=this.children[n];if(r instanceof Pt&&r.symbol.type===t){if(0===e)return r;e-=1}}return null}},{key:"getTokens",value:function(t){if(null===this.children)return[];for(var e=[],n=0;n<this.children.length;n++){var r=this.children[n];r instanceof Pt&&r.symbol.type===t&&e.push(r)}return e}},{key:"getTypedRuleContext",value:function(t,e){return this.getChild(e,t)}},{key:"getTypedRuleContexts",value:function(t){if(null===this.children)return[];for(var e=[],n=0;n<this.children.length;n++){var r=this.children[n];r instanceof t&&e.push(r)}return e}},{key:"getChildCount",value:function(){return null===this.children?0:this.children.length}},{key:"getSourceInterval",value:function(){return null===this.start||null===this.stop?A.INVALID_INTERVAL:new A(this.start.tokenIndex,this.stop.tokenIndex)}}])&&function(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,(o=function(t,e){if("object"!==Sc(t)||null===t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var r=n.call(t,"string");if("object"!==Sc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(r.key),"symbol"===Sc(o)?o:String(o)),r)}var o}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(Lt);Lt.EMPTY=new _c;var Tc=Math.round(Math.random()*Math.pow(2,32));String.prototype.seed=Tc,String.prototype.hashCode=function(){for(var t,e,n=this.toString(),r=3&n.length,o=n.length-r,i=String.prototype.seed,u=3432918353,c=461845907,a=0;a<o;)e=255&n.charCodeAt(a)|(255&n.charCodeAt(++a))<<8|(255&n.charCodeAt(++a))<<16|(255&n.charCodeAt(++a))<<24,++a,i=27492+(65535&(t=5*(65535&(i=(i^=e=(65535&(e=(e=(65535&e)*u+(((e>>>16)*u&65535)<<16)&4294967295)<<15|e>>>17))*c+(((e>>>16)*c&65535)<<16)&4294967295)<<13|i>>>19))+((5*(i>>>16)&65535)<<16)&4294967295))+((58964+(t>>>16)&65535)<<16);switch(e=0,r){case 3:e^=(255&n.charCodeAt(a+2))<<16;case 2:e^=(255&n.charCodeAt(a+1))<<8;case 1:i^=e=(65535&(e=(e=(65535&(e^=255&n.charCodeAt(a)))*u+(((e>>>16)*u&65535)<<16)&4294967295)<<15|e>>>17))*c+(((e>>>16)*c&65535)<<16)&4294967295}return i^=n.length,i=2246822507*(65535&(i^=i>>>16))+((2246822507*(i>>>16)&65535)<<16)&4294967295,i=3266489909*(65535&(i^=i>>>13))+((3266489909*(i>>>16)&65535)<<16)&4294967295,(i^=i>>>16)>>>0};const Pc={atn:Bi,dfa:Gi,context:Wi,misc:Xi,tree:nu,error:Nu,Token:o,CommonToken:yo,CharStreams:Wu,CharStream:Vu,InputStream:Vu,CommonTokenStream:rc,Lexer:Bo,Parser:fc,ParserRuleContext:_c,Interval:A,IntervalSet:I,LL1Analyzer:ae,Utils:Xu}})();var o=r.ZP;class i extends o.tree.ParseTreeListener{enterAll(t){}exitAll(t){}enterAddition(t){}exitAddition(t){}enterMultiplication(t){}exitMultiplication(t){}enterSubtraction(t){}exitSubtraction(t){}enterNumber(t){}exitNumber(t){}enterWrappedExpression(t){}exitWrappedExpression(t){}enterDivision(t){}exitDivision(t){}enterString(t){}exitString(t){}}const u=(new o.atn.ATNDeserializer).deserialize([4,1,21,34,2,0,7,0,2,1,7,1,1,0,1,0,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,15,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,5,1,29,8,1,10,1,12,1,32,9,1,1,1,0,1,2,2,0,2,0,0,37,0,4,1,0,0,0,2,14,1,0,0,0,4,5,3,2,1,0,5,6,5,0,0,1,6,1,1,0,0,0,7,8,6,1,-1,0,8,9,5,10,0,0,9,10,3,2,1,0,10,11,5,11,0,0,11,15,1,0,0,0,12,15,5,1,0,0,13,15,5,2,0,0,14,7,1,0,0,0,14,12,1,0,0,0,14,13,1,0,0,0,15,30,1,0,0,0,16,17,10,7,0,0,17,18,5,4,0,0,18,29,3,2,1,8,19,20,10,6,0,0,20,21,5,5,0,0,21,29,3,2,1,7,22,23,10,5,0,0,23,24,5,6,0,0,24,29,3,2,1,6,25,26,10,4,0,0,26,27,5,7,0,0,27,29,3,2,1,5,28,16,1,0,0,0,28,19,1,0,0,0,28,22,1,0,0,0,28,25,1,0,0,0,29,32,1,0,0,0,30,28,1,0,0,0,30,31,1,0,0,0,31,3,1,0,0,0,32,30,1,0,0,0,3,14,28,30]),c=u.decisionToState.map(((t,e)=>new o.dfa.DFA(t,e))),a=new o.atn.PredictionContextCache;class s extends o.Parser{static grammarFileName="CustomMetric.g4";static literalNames=[null,null,null,null,null,null,null,null,null,"'.'","'('","')'","'+'","'-'","'*'","'/'","'\"'","' '"];static symbolicNames=[null,"NUMBER","STRING","WHITESPACE","ADD","SUBTRACT","MULTIPLY","DIVIDE","DIGIT","DOT","L_PARANT","R_PARANT","PLUS","MINUS","STAR","SLASH","DQUOTE","SPACE","TAB","CR","LF","ANY"];static ruleNames=["all","expression"];constructor(t){super(t),this._interp=new o.atn.ParserATNSimulator(this,u,c,a),this.ruleNames=s.ruleNames,this.literalNames=s.literalNames,this.symbolicNames=s.symbolicNames}sempred(t,e,n){if(1===e)return this.expression_sempred(t,n);throw"No predicate with index:"+e}expression_sempred(t,e){switch(e){case 0:return this.precpred(this._ctx,7);case 1:return this.precpred(this._ctx,6);case 2:return this.precpred(this._ctx,5);case 3:return this.precpred(this._ctx,4);default:throw"No predicate with index:"+e}}all(){let t=new l(this,this._ctx,this.state);this.enterRule(t,0,s.RULE_all);try{this.enterOuterAlt(t,1),this.state=4,this.expression(0),this.state=5,this.match(s.EOF)}catch(e){if(!(e instanceof o.error.RecognitionException))throw e;t.exception=e,this._errHandler.reportError(this,e),this._errHandler.recover(this,e)}finally{this.exitRule()}return t}expression(t){void 0===t&&(t=0);const e=this._ctx,n=this.state;let r=new f(this,this._ctx,n),i=r;this.enterRecursionRule(r,2,s.RULE_expression,t);try{switch(this.enterOuterAlt(r,1),this.state=14,this._errHandler.sync(this),this._input.LA(1)){case 10:r=new v(this,r),this._ctx=r,i=r,this.state=8,this.match(s.L_PARANT),this.state=9,this.expression(0),this.state=10,this.match(s.R_PARANT);break;case 1:r=new b(this,r),this._ctx=r,i=r,this.state=12,this.match(s.NUMBER);break;case 2:r=new m(this,r),this._ctx=r,i=r,this.state=13,this.match(s.STRING);break;default:throw new o.error.NoViableAltException(this)}this._ctx.stop=this._input.LT(-1),this.state=30,this._errHandler.sync(this);for(var u=this._interp.adaptivePredict(this._input,2,this._ctx);2!=u&&u!=o.atn.ATN.INVALID_ALT_NUMBER;){if(1===u)switch(null!==this._parseListeners&&this.triggerExitRuleEvent(),i=r,this.state=28,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,1,this._ctx)){case 1:if(r=new p(this,new f(this,e,n)),r.left=i,this.pushNewRecursionContext(r,2,s.RULE_expression),this.state=16,!this.precpred(this._ctx,7))throw new o.error.FailedPredicateException(this,"this.precpred(this._ctx, 7)");this.state=17,this.match(s.ADD),this.state=18,r.right=this.expression(8);break;case 2:if(r=new h(this,new f(this,e,n)),r.left=i,this.pushNewRecursionContext(r,2,s.RULE_expression),this.state=19,!this.precpred(this._ctx,6))throw new o.error.FailedPredicateException(this,"this.precpred(this._ctx, 6)");this.state=20,this.match(s.SUBTRACT),this.state=21,r.right=this.expression(7);break;case 3:if(r=new y(this,new f(this,e,n)),r.left=i,this.pushNewRecursionContext(r,2,s.RULE_expression),this.state=22,!this.precpred(this._ctx,5))throw new o.error.FailedPredicateException(this,"this.precpred(this._ctx, 5)");this.state=23,this.match(s.MULTIPLY),this.state=24,r.right=this.expression(6);break;case 4:if(r=new d(this,new f(this,e,n)),r.left=i,this.pushNewRecursionContext(r,2,s.RULE_expression),this.state=25,!this.precpred(this._ctx,4))throw new o.error.FailedPredicateException(this,"this.precpred(this._ctx, 4)");this.state=26,this.match(s.DIVIDE),this.state=27,r.right=this.expression(5)}this.state=32,this._errHandler.sync(this),u=this._interp.adaptivePredict(this._input,2,this._ctx)}}catch(t){if(!(t instanceof o.error.RecognitionException))throw t;r.exception=t,this._errHandler.reportError(this,t),this._errHandler.recover(this,t)}finally{this.unrollRecursionContexts(e)}return r}}s.EOF=o.Token.EOF,s.NUMBER=1,s.STRING=2,s.WHITESPACE=3,s.ADD=4,s.SUBTRACT=5,s.MULTIPLY=6,s.DIVIDE=7,s.DIGIT=8,s.DOT=9,s.L_PARANT=10,s.R_PARANT=11,s.PLUS=12,s.MINUS=13,s.STAR=14,s.SLASH=15,s.DQUOTE=16,s.SPACE=17,s.TAB=18,s.CR=19,s.LF=20,s.ANY=21,s.RULE_all=0,s.RULE_expression=1;class l extends o.ParserRuleContext{constructor(t,e,n){void 0===e&&(e=null),null==n&&(n=-1),super(e,n),this.parser=t,this.ruleIndex=s.RULE_all}expression(){return this.getTypedRuleContext(f,0)}EOF(){return this.getToken(s.EOF,0)}enterRule(t){t instanceof i&&t.enterAll(this)}exitRule(t){t instanceof i&&t.exitAll(this)}}class f extends o.ParserRuleContext{constructor(t,e,n){void 0===e&&(e=null),null==n&&(n=-1),super(e,n),this.parser=t,this.ruleIndex=s.RULE_expression}copyFrom(t){super.copyFrom(t)}}class p extends f{constructor(t,e){super(t),this.left=null,this.right=null,super.copyFrom(e)}ADD(){return this.getToken(s.ADD,0)}expression=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(f):this.getTypedRuleContext(f,t)};enterRule(t){t instanceof i&&t.enterAddition(this)}exitRule(t){t instanceof i&&t.exitAddition(this)}}s.AdditionContext=p;class y extends f{constructor(t,e){super(t),this.left=null,this.right=null,super.copyFrom(e)}MULTIPLY(){return this.getToken(s.MULTIPLY,0)}expression=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(f):this.getTypedRuleContext(f,t)};enterRule(t){t instanceof i&&t.enterMultiplication(this)}exitRule(t){t instanceof i&&t.exitMultiplication(this)}}s.MultiplicationContext=y;class h extends f{constructor(t,e){super(t),this.left=null,this.right=null,super.copyFrom(e)}SUBTRACT(){return this.getToken(s.SUBTRACT,0)}expression=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(f):this.getTypedRuleContext(f,t)};enterRule(t){t instanceof i&&t.enterSubtraction(this)}exitRule(t){t instanceof i&&t.exitSubtraction(this)}}s.SubtractionContext=h;class b extends f{constructor(t,e){super(t),super.copyFrom(e)}NUMBER(){return this.getToken(s.NUMBER,0)}enterRule(t){t instanceof i&&t.enterNumber(this)}exitRule(t){t instanceof i&&t.exitNumber(this)}}s.NumberContext=b;class v extends f{constructor(t,e){super(t),super.copyFrom(e)}L_PARANT(){return this.getToken(s.L_PARANT,0)}expression(){return this.getTypedRuleContext(f,0)}R_PARANT(){return this.getToken(s.R_PARANT,0)}enterRule(t){t instanceof i&&t.enterWrappedExpression(this)}exitRule(t){t instanceof i&&t.exitWrappedExpression(this)}}s.WrappedExpressionContext=v;class d extends f{constructor(t,e){super(t),this.left=null,this.right=null,super.copyFrom(e)}DIVIDE(){return this.getToken(s.DIVIDE,0)}expression=function(t){return void 0===t&&(t=null),null===t?this.getTypedRuleContexts(f):this.getTypedRuleContext(f,t)};enterRule(t){t instanceof i&&t.enterDivision(this)}exitRule(t){t instanceof i&&t.exitDivision(this)}}s.DivisionContext=d;class m extends f{constructor(t,e){super(t),super.copyFrom(e)}STRING(){return this.getToken(s.STRING,0)}enterRule(t){t instanceof i&&t.enterString(this)}exitRule(t){t instanceof i&&t.exitString(this)}}s.StringContext=m,s.AllContext=l,s.ExpressionContext=f;const g=(new o.atn.ATNDeserializer).deserialize([4,0,21,110,6,-1,2,0,7,0,2,1,7,1,2,2,7,2,2,3,7,3,2,4,7,4,2,5,7,5,2,6,7,6,2,7,7,7,2,8,7,8,2,9,7,9,2,10,7,10,2,11,7,11,2,12,7,12,2,13,7,13,2,14,7,14,2,15,7,15,2,16,7,16,2,17,7,17,2,18,7,18,2,19,7,19,2,20,7,20,1,0,4,0,45,8,0,11,0,12,0,46,1,0,1,0,4,0,51,8,0,11,0,12,0,52,3,0,55,8,0,1,1,1,1,4,1,59,8,1,11,1,12,1,60,1,1,1,1,1,2,1,2,1,2,1,2,4,2,69,8,2,11,2,12,2,70,1,2,1,2,1,3,1,3,1,4,1,4,1,5,1,5,1,6,1,6,1,7,1,7,1,8,1,8,1,9,1,9,1,10,1,10,1,11,1,11,1,12,1,12,1,13,1,13,1,14,1,14,1,15,1,15,1,16,1,16,1,17,1,17,1,18,1,18,1,19,1,19,1,20,1,20,1,60,0,21,1,1,3,2,5,3,7,4,9,5,11,6,13,7,15,8,17,9,19,10,21,11,23,12,25,13,27,14,29,15,31,16,33,17,35,18,37,19,39,20,41,21,1,0,4,1,0,48,57,1,0,9,9,1,0,13,13,1,0,10,10,117,0,1,1,0,0,0,0,3,1,0,0,0,0,5,1,0,0,0,0,7,1,0,0,0,0,9,1,0,0,0,0,11,1,0,0,0,0,13,1,0,0,0,0,15,1,0,0,0,0,17,1,0,0,0,0,19,1,0,0,0,0,21,1,0,0,0,0,23,1,0,0,0,0,25,1,0,0,0,0,27,1,0,0,0,0,29,1,0,0,0,0,31,1,0,0,0,0,33,1,0,0,0,0,35,1,0,0,0,0,37,1,0,0,0,0,39,1,0,0,0,0,41,1,0,0,0,1,44,1,0,0,0,3,56,1,0,0,0,5,68,1,0,0,0,7,74,1,0,0,0,9,76,1,0,0,0,11,78,1,0,0,0,13,80,1,0,0,0,15,82,1,0,0,0,17,84,1,0,0,0,19,86,1,0,0,0,21,88,1,0,0,0,23,90,1,0,0,0,25,92,1,0,0,0,27,94,1,0,0,0,29,96,1,0,0,0,31,98,1,0,0,0,33,100,1,0,0,0,35,102,1,0,0,0,37,104,1,0,0,0,39,106,1,0,0,0,41,108,1,0,0,0,43,45,3,15,7,0,44,43,1,0,0,0,45,46,1,0,0,0,46,44,1,0,0,0,46,47,1,0,0,0,47,54,1,0,0,0,48,50,3,17,8,0,49,51,3,15,7,0,50,49,1,0,0,0,51,52,1,0,0,0,52,50,1,0,0,0,52,53,1,0,0,0,53,55,1,0,0,0,54,48,1,0,0,0,54,55,1,0,0,0,55,2,1,0,0,0,56,58,3,31,15,0,57,59,3,41,20,0,58,57,1,0,0,0,59,60,1,0,0,0,60,61,1,0,0,0,60,58,1,0,0,0,61,62,1,0,0,0,62,63,3,31,15,0,63,4,1,0,0,0,64,69,3,33,16,0,65,69,3,35,17,0,66,69,3,37,18,0,67,69,3,39,19,0,68,64,1,0,0,0,68,65,1,0,0,0,68,66,1,0,0,0,68,67,1,0,0,0,69,70,1,0,0,0,70,68,1,0,0,0,70,71,1,0,0,0,71,72,1,0,0,0,72,73,6,2,0,0,73,6,1,0,0,0,74,75,3,23,11,0,75,8,1,0,0,0,76,77,3,25,12,0,77,10,1,0,0,0,78,79,3,27,13,0,79,12,1,0,0,0,80,81,3,29,14,0,81,14,1,0,0,0,82,83,7,0,0,0,83,16,1,0,0,0,84,85,5,46,0,0,85,18,1,0,0,0,86,87,5,40,0,0,87,20,1,0,0,0,88,89,5,41,0,0,89,22,1,0,0,0,90,91,5,43,0,0,91,24,1,0,0,0,92,93,5,45,0,0,93,26,1,0,0,0,94,95,5,42,0,0,95,28,1,0,0,0,96,97,5,47,0,0,97,30,1,0,0,0,98,99,5,34,0,0,99,32,1,0,0,0,100,101,5,32,0,0,101,34,1,0,0,0,102,103,7,1,0,0,103,36,1,0,0,0,104,105,7,2,0,0,105,38,1,0,0,0,106,107,7,3,0,0,107,40,1,0,0,0,108,109,9,0,0,0,109,42,1,0,0,0,7,0,46,52,54,60,68,70,1,6,0,0]),S=g.decisionToState.map(((t,e)=>new o.dfa.DFA(t,e)));class O extends o.Lexer{static grammarFileName="CustomMetric.g4";static channelNames=["DEFAULT_TOKEN_CHANNEL","HIDDEN"];static modeNames=["DEFAULT_MODE"];static literalNames=[null,null,null,null,null,null,null,null,null,"'.'","'('","')'","'+'","'-'","'*'","'/'","'\"'","' '"];static symbolicNames=[null,"NUMBER","STRING","WHITESPACE","ADD","SUBTRACT","MULTIPLY","DIVIDE","DIGIT","DOT","L_PARANT","R_PARANT","PLUS","MINUS","STAR","SLASH","DQUOTE","SPACE","TAB","CR","LF","ANY"];static ruleNames=["NUMBER","STRING","WHITESPACE","ADD","SUBTRACT","MULTIPLY","DIVIDE","DIGIT","DOT","L_PARANT","R_PARANT","PLUS","MINUS","STAR","SLASH","DQUOTE","SPACE","TAB","CR","LF","ANY"];constructor(t){super(t),this._interp=new o.atn.LexerATNSimulator(this,g,S,new o.atn.PredictionContextCache)}}O.EOF=o.Token.EOF,O.NUMBER=1,O.STRING=2,O.WHITESPACE=3,O.ADD=4,O.SUBTRACT=5,O.MULTIPLY=6,O.DIVIDE=7,O.DIGIT=8,O.DOT=9,O.L_PARANT=10,O.R_PARANT=11,O.PLUS=12,O.MINUS=13,O.STAR=14,O.SLASH=15,O.DQUOTE=16,O.SPACE=17,O.TAB=18,O.CR=19,O.LF=20,O.ANY=21;class w extends Error{constructor(t,e,n){super(`${t} at ${e}:${n}`),this.line=e,this.column=n}}})();