@guihz/trading-vue-editor-tes 0.0.158 → 0.0.160

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,7 +8,7 @@ var Zg=Object.defineProperty;var Qg=(po,pi,Cr)=>pi in po?Zg(po,pi,{enumerable:!0
8
8
  `+o.toString(T,I))}return x}},{key:"addDFAState",value:function(o,u){if(u===Oi.ERROR)return u;var E=o.states.get(u);return E!==null?(this.trace_atn_sim&&console.log("addDFAState "+u+" exists"),E):(u.stateNumber=o.states.length,u.configs.readOnly||(u.configs.optimizeConfigs(this),u.configs.setReadonly(!0)),this.trace_atn_sim&&console.log("addDFAState new "+u),o.states.add(u),this.debug&&console.log("adding new DFA state: "+u),u)}},{key:"reportAttemptingFullContext",value:function(o,u,E,x,T){if(this.debug||this.retry_debug){var I=new ve(x,T+1);console.log("reportAttemptingFullContext decision="+o.decision+":"+E+", input="+this.parser.getTokenStream().getText(I))}this.parser!==null&&this.parser.getErrorListenerDispatch().reportAttemptingFullContext(this.parser,o,x,T,u,E)}},{key:"reportContextSensitivity",value:function(o,u,E,x,T){if(this.debug||this.retry_debug){var I=new ve(x,T+1);console.log("reportContextSensitivity decision="+o.decision+":"+E+", input="+this.parser.getTokenStream().getText(I))}this.parser!==null&&this.parser.getErrorListenerDispatch().reportContextSensitivity(this.parser,o,x,T,u,E)}},{key:"reportAmbiguity",value:function(o,u,E,x,T,I,te){if(this.debug||this.retry_debug){var Re=new ve(E,x+1);console.log("reportAmbiguity "+I+":"+te+", input="+this.parser.getTokenStream().getText(Re))}this.parser!==null&&this.parser.getErrorListenerDispatch().reportAmbiguity(this.parser,o,E,x,T,I,te)}}],d&&bg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),_}(Oi);function Hs(f){return Hs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Hs(f)}function vg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Hs(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Hs(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Hs(p)==="symbol"?p:String(p)),a)}var p}var Im=function(){function f(){(function(a,p){if(!(a instanceof p))throw new TypeError("Cannot call a class as a function")})(this,f),this.cache=new Ji}var i,d;return i=f,(d=[{key:"add",value:function(a){if(a===it.EMPTY)return it.EMPTY;var p=this.cache.get(a)||null;return p!==null?p:(this.cache.set(a,a),a)}},{key:"get",value:function(a){return this.cache.get(a)||null}},{key:"length",get:function(){return this.cache.length}}])&&vg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),f}();const Eg={ATN:mn,ATNDeserializer:fh,LexerATNSimulator:ja,ParserATNSimulator:Nm,PredictionMode:Kn,PredictionContextCache:Im};function Gs(f){return Gs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Gs(f)}function Sg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Gs(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Gs(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Gs(p)==="symbol"?p:String(p)),a)}var p}var Ih=function(){function f(a,p,c){(function(_,o){if(!(_ instanceof o))throw new TypeError("Cannot call a class as a function")})(this,f),this.dfa=a,this.literalNames=p||[],this.symbolicNames=c||[]}var i,d;return i=f,(d=[{key:"toString",value:function(){if(this.dfa.s0===null)return null;for(var a="",p=this.dfa.sortedStates(),c=0;c<p.length;c++){var _=p[c];if(_.edges!==null)for(var o=_.edges.length,u=0;u<o;u++){var E=_.edges[u]||null;E!==null&&E.stateNumber!==2147483647&&(a=(a=(a=(a=(a=(a=a.concat(this.getStateString(_))).concat("-")).concat(this.getEdgeLabel(u))).concat("->")).concat(this.getStateString(E))).concat(`
9
9
  `))}}return a.length===0?null:a}},{key:"getEdgeLabel",value:function(a){return a===0?"EOF":this.literalNames!==null||this.symbolicNames!==null?this.literalNames[a-1]||this.symbolicNames[a-1]:String.fromCharCode(a-1)}},{key:"getStateString",value:function(a){var p=(a.isAcceptState?":":"")+"s"+a.stateNumber+(a.requiresFullContext?"^":"");return a.isAcceptState?a.predicates!==null?p+"=>"+B(a.predicates):p+"=>"+a.prediction.toString():p}}])&&Sg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),f}();function Ha(f){return Ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ha(f)}function Tg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Ha(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Ha(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Ha(p)==="symbol"?p:String(p)),a)}var p}function Ph(f,i){return Ph=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},Ph(f,i)}function Bc(f){return Bc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Bc(f)}var Pm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&Ph(o,u)})(_,f);var i,d,a,p,c=(a=_,p=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=Bc(a);if(p){var E=Bc(this).constructor;o=Reflect.construct(u,arguments,E)}else o=u.apply(this,arguments);return function(x,T){if(T&&(Ha(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}(x)}(this,o)});function _(o){return function(u,E){if(!(u instanceof E))throw new TypeError("Cannot call a class as a function")}(this,_),c.call(this,o,null)}return i=_,(d=[{key:"getEdgeLabel",value:function(o){return"'"+String.fromCharCode(o)+"'"}}])&&Tg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),_}(Ih);function Ks(f){return Ks=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ks(f)}function Ag(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Ks(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Ks(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Ks(p)==="symbol"?p:String(p)),a)}var p}var Fm=function(){function f(a,p){if(function(_,o){if(!(_ instanceof o))throw new TypeError("Cannot call a class as a function")}(this,f),p===void 0&&(p=0),this.atnStartState=a,this.decision=p,this._states=new g,this.s0=null,this.precedenceDfa=!1,a instanceof Uo&&a.isPrecedenceDecision){this.precedenceDfa=!0;var c=new jo(null,new Ur);c.edges=[],c.isAcceptState=!1,c.requiresFullContext=!1,this.s0=c}}var i,d;return i=f,(d=[{key:"getPrecedenceStartState",value:function(a){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";return a<0||a>=this.s0.edges.length?null:this.s0.edges[a]||null}},{key:"setPrecedenceStartState",value:function(a,p){if(!this.precedenceDfa)throw"Only precedence DFAs may contain a precedence start state.";a<0||(this.s0.edges[a]=p)}},{key:"setPrecedenceDfa",value:function(a){if(this.precedenceDfa!==a){if(this._states=new g,a){var p=new jo(null,new Ur);p.edges=[],p.isAcceptState=!1,p.requiresFullContext=!1,this.s0=p}else this.s0=null;this.precedenceDfa=a}}},{key:"sortedStates",value:function(){return this._states.values().sort(function(a,p){return a.stateNumber-p.stateNumber})}},{key:"toString",value:function(a,p){return a=a||null,p=p||null,this.s0===null?"":new Ih(this,a,p).toString()}},{key:"toLexerString",value:function(){return this.s0===null?"":new Pm(this).toString()}},{key:"states",get:function(){return this._states}}])&&Ag(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),f}();const xg={DFA:Fm,DFASerializer:Ih,LexerDFASerializer:Pm,PredPrediction:wm},Cg={PredictionContext:it},Og={Interval:ve,IntervalSet:ie};function zs(f){return zs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},zs(f)}function Dg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(zs(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(zs(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),zs(p)==="symbol"?p:String(p)),a)}var p}var Fh=function(){function f(){(function(a,p){if(!(a instanceof p))throw new TypeError("Cannot call a class as a function")})(this,f)}var i,d;return i=f,(d=[{key:"visitTerminal",value:function(a){}},{key:"visitErrorNode",value:function(a){}},{key:"enterEveryRule",value:function(a){}},{key:"exitEveryRule",value:function(a){}}])&&Dg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),f}();function Ws(f){return Ws=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ws(f)}function kg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Ws(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Ws(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Ws(p)==="symbol"?p:String(p)),a)}var p}var Lm=function(){function f(){(function(a,p){if(!(a instanceof p))throw new TypeError("Cannot call a class as a function")})(this,f)}var i,d;return i=f,(d=[{key:"visit",value:function(a){return Array.isArray(a)?a.map(function(p){return p.accept(this)},this):a.accept(this)}},{key:"visitChildren",value:function(a){return a.children?this.visit(a.children):null}},{key:"visitTerminal",value:function(a){}},{key:"visitErrorNode",value:function(a){}}])&&kg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),f}();function Xs(f){return Xs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Xs(f)}function Rg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Xs(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Xs(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Xs(p)==="symbol"?p:String(p)),a)}var p}var Uc=function(){function f(){(function(a,p){if(!(a instanceof p))throw new TypeError("Cannot call a class as a function")})(this,f)}var i,d;return i=f,(d=[{key:"walk",value:function(a,p){if(p instanceof Xr||p.isErrorNode!==void 0&&p.isErrorNode())a.visitErrorNode(p);else if(p instanceof an)a.visitTerminal(p);else{this.enterRule(a,p);for(var c=0;c<p.getChildCount();c++){var _=p.getChild(c);this.walk(a,_)}this.exitRule(a,p)}}},{key:"enterRule",value:function(a,p){var c=p.ruleContext;a.enterEveryRule(c),c.enterRule(a)}},{key:"exitRule",value:function(a,p){var c=p.ruleContext;c.exitRule(a),a.exitEveryRule(c)}}])&&Rg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),f}();Uc.DEFAULT=new Uc;const wg={Trees:zu,RuleNode:Fe,ErrorNode:Xr,TerminalNode:an,ParseTreeListener:Fh,ParseTreeVisitor:Lm,ParseTreeWalker:Uc};function Lh(f){return Lh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Lh(f)}function Mh(f,i){return Mh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},Mh(f,i)}function Vc(f){return Vc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Vc(f)}var qs=function(f){(function(_,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(o&&o.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),Object.defineProperty(_,"prototype",{writable:!1}),o&&Mh(_,o)})(c,f);var i,d,a,p=(d=c,a=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var _,o=Vc(d);if(a){var u=Vc(this).constructor;_=Reflect.construct(o,arguments,u)}else _=o.apply(this,arguments);return function(E,x){if(x&&(Lh(x)==="object"||typeof x=="function"))return x;if(x!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}(E)}(this,_)});function c(_){var o;return function(u,E){if(!(u instanceof E))throw new TypeError("Cannot call a class as a function")}(this,c),(o=p.call(this,{message:"",recognizer:_,input:_.getInputStream(),ctx:_._ctx})).offendingToken=_.getCurrentToken(),o}return i=c,Object.defineProperty(i,"prototype",{writable:!1}),i}(Vo);function Bh(f){return Bh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Bh(f)}function Uh(f,i){return Uh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},Uh(f,i)}function jc(f){return jc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},jc(f)}var Vh=function(f){(function(_,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(o&&o.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),Object.defineProperty(_,"prototype",{writable:!1}),o&&Uh(_,o)})(c,f);var i,d,a,p=(d=c,a=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var _,o=jc(d);if(a){var u=jc(this).constructor;_=Reflect.construct(o,arguments,u)}else _=o.apply(this,arguments);return function(E,x){if(x&&(Bh(x)==="object"||typeof x=="function"))return x;if(x!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}(E)}(this,_)});function c(_,o,u){var E;(function(T,I){if(!(T instanceof I))throw new TypeError("Cannot call a class as a function")})(this,c),E=p.call(this,{message:Ng(o,u||null),recognizer:_,input:_.getInputStream(),ctx:_._ctx});var x=_._interp.atn.states[_.state].transitions[0];return x instanceof hm?(E.ruleIndex=x.ruleIndex,E.predicateIndex=x.predIndex):(E.ruleIndex=0,E.predicateIndex=0),E.predicate=o,E.offendingToken=_.getCurrentToken(),E}return i=c,Object.defineProperty(i,"prototype",{writable:!1}),i}(Vo);function Ng(f,i){return i!==null?i:"failed predicate: {"+f+"}?"}function Ga(f){return Ga=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ga(f)}function Ig(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Ga(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Ga(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Ga(p)==="symbol"?p:String(p)),a)}var p}function jh(f,i){return jh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},jh(f,i)}function $c(f){return $c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},$c(f)}var Mm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&jh(o,u)})(_,f);var i,d,a,p,c=(a=_,p=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=$c(a);if(p){var E=$c(this).constructor;o=Reflect.construct(u,arguments,E)}else o=u.apply(this,arguments);return function(x,T){if(T&&(Ga(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}(x)}(this,o)});function _(o){var u;return function(E,x){if(!(E instanceof x))throw new TypeError("Cannot call a class as a function")}(this,_),o=o||!0,(u=c.call(this)).exactOnly=o,u}return i=_,d=[{key:"reportAmbiguity",value:function(o,u,E,x,T,I,te){if(!this.exactOnly||T){var Re="reportAmbiguity d="+this.getDecisionDescription(o,u)+": ambigAlts="+this.getConflictingAlts(I,te)+", input='"+o.getTokenStream().getText(new ve(E,x))+"'";o.notifyErrorListeners(Re)}}},{key:"reportAttemptingFullContext",value:function(o,u,E,x,T,I){var te="reportAttemptingFullContext d="+this.getDecisionDescription(o,u)+", input='"+o.getTokenStream().getText(new ve(E,x))+"'";o.notifyErrorListeners(te)}},{key:"reportContextSensitivity",value:function(o,u,E,x,T,I){var te="reportContextSensitivity d="+this.getDecisionDescription(o,u)+", input='"+o.getTokenStream().getText(new ve(E,x))+"'";o.notifyErrorListeners(te)}},{key:"getDecisionDescription",value:function(o,u){var E=u.decision,x=u.atnStartState.ruleIndex,T=o.ruleNames;if(x<0||x>=T.length)return""+E;var I=T[x]||null;return I===null||I.length===0?""+E:"".concat(E," (").concat(I,")")}},{key:"getConflictingAlts",value:function(o,u){if(o!==null)return o;for(var E=new Br,x=0;x<u.items.length;x++)E.add(u.items[x].alt);return"{".concat(E.values().join(", "),"}")}}],d&&Ig(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),_}(ws);function $h(f){return $h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},$h(f)}function Bm(f){if(f===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return f}function Hh(f){var i=typeof Map=="function"?new Map:void 0;return Hh=function(d){if(d===null||(a=d,Function.toString.call(a).indexOf("[native code]")===-1))return d;var a;if(typeof d!="function")throw new TypeError("Super expression must either be null or a function");if(i!==void 0){if(i.has(d))return i.get(d);i.set(d,p)}function p(){return Gh(d,arguments,Js(this).constructor)}return p.prototype=Object.create(d.prototype,{constructor:{value:p,enumerable:!1,writable:!0,configurable:!0}}),Ys(p,d)},Hh(f)}function Gh(f,i,d){return Gh=Um()?Reflect.construct.bind():function(a,p,c){var _=[null];_.push.apply(_,p);var o=new(Function.bind.apply(a,_));return c&&Ys(o,c.prototype),o},Gh.apply(null,arguments)}function Um(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ys(f,i){return Ys=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},Ys(f,i)}function Js(f){return Js=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Js(f)}var Pg=function(f){(function(_,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(o&&o.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),Object.defineProperty(_,"prototype",{writable:!1}),o&&Ys(_,o)})(c,f);var i,d,a,p=(d=c,a=Um(),function(){var _,o=Js(d);if(a){var u=Js(this).constructor;_=Reflect.construct(o,arguments,u)}else _=o.apply(this,arguments);return function(E,x){if(x&&($h(x)==="object"||typeof x=="function"))return x;if(x!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return Bm(E)}(this,_)});function c(){var _;return function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}(this,c),_=p.call(this),Error.captureStackTrace(Bm(_),c),_}return i=c,Object.defineProperty(i,"prototype",{writable:!1}),i}(Hh(Error));function Zs(f){return Zs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Zs(f)}function Fg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Zs(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Zs(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Zs(p)==="symbol"?p:String(p)),a)}var p}function Ka(f){return Ka=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ka(f)}function Lg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Ka(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Ka(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Ka(p)==="symbol"?p:String(p)),a)}var p}function Kh(f,i){return Kh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},Kh(f,i)}function Hc(f){return Hc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Hc(f)}var zh=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&Kh(o,u)})(_,f);var i,d,a,p,c=(a=_,p=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=Hc(a);if(p){var E=Hc(this).constructor;o=Reflect.construct(u,arguments,E)}else o=u.apply(this,arguments);return function(x,T){if(T&&(Ka(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}(x)}(this,o)});function _(){var o;return function(u,E){if(!(u instanceof E))throw new TypeError("Cannot call a class as a function")}(this,_),(o=c.call(this)).errorRecoveryMode=!1,o.lastErrorIndex=-1,o.lastErrorStates=null,o.nextTokensContext=null,o.nextTokenState=0,o}return i=_,d=[{key:"reset",value:function(o){this.endErrorCondition(o)}},{key:"beginErrorCondition",value:function(o){this.errorRecoveryMode=!0}},{key:"inErrorRecoveryMode",value:function(o){return this.errorRecoveryMode}},{key:"endErrorCondition",value:function(o){this.errorRecoveryMode=!1,this.lastErrorStates=null,this.lastErrorIndex=-1}},{key:"reportMatch",value:function(o){this.endErrorCondition(o)}},{key:"reportError",value:function(o,u){this.inErrorRecoveryMode(o)||(this.beginErrorCondition(o),u instanceof Lc?this.reportNoViableAlternative(o,u):u instanceof qs?this.reportInputMismatch(o,u):u instanceof Vh?this.reportFailedPredicate(o,u):(console.log("unknown recognition error type: "+u.constructor.name),console.log(u.stack),o.notifyErrorListeners(u.getOffendingToken(),u.getMessage(),u)))}},{key:"recover",value:function(o,u){this.lastErrorIndex===o.getInputStream().index&&this.lastErrorStates!==null&&this.lastErrorStates.indexOf(o.state)>=0&&o.consume(),this.lastErrorIndex=o._input.index,this.lastErrorStates===null&&(this.lastErrorStates=[]),this.lastErrorStates.push(o.state);var E=this.getErrorRecoverySet(o);this.consumeUntil(o,E)}},{key:"sync",value:function(o){if(!this.inErrorRecoveryMode(o)){var u=o._interp.atn.states[o.state],E=o.getTokenStream().LA(1),x=o.atn.nextTokens(u);if(x.contains(E))return this.nextTokensContext=null,void(this.nextTokenState=be.INVALID_STATE_NUMBER);if(x.contains(n.EPSILON))this.nextTokensContext===null&&(this.nextTokensContext=o._ctx,this.nextTokensState=o._stateNumber);else switch(u.stateType){case be.BLOCK_START:case be.STAR_BLOCK_START:case be.PLUS_BLOCK_START:case be.STAR_LOOP_ENTRY:if(this.singleTokenDeletion(o)!==null)return;throw new qs(o);case be.PLUS_LOOP_BACK:case be.STAR_LOOP_BACK:this.reportUnwantedToken(o);var T=new ie;T.addSet(o.getExpectedTokens());var I=T.addSet(this.getErrorRecoverySet(o));this.consumeUntil(o,I)}}}},{key:"reportNoViableAlternative",value:function(o,u){var E,x=o.getTokenStream();E=x!==null?u.startToken.type===n.EOF?"<EOF>":x.getText(new ve(u.startToken.tokenIndex,u.offendingToken.tokenIndex)):"<unknown input>";var T="no viable alternative at input "+this.escapeWSAndQuote(E);o.notifyErrorListeners(T,u.offendingToken,u)}},{key:"reportInputMismatch",value:function(o,u){var E="mismatched input "+this.getTokenErrorDisplay(u.offendingToken)+" expecting "+u.getExpectedTokens().toString(o.literalNames,o.symbolicNames);o.notifyErrorListeners(E,u.offendingToken,u)}},{key:"reportFailedPredicate",value:function(o,u){var E="rule "+o.ruleNames[o._ctx.ruleIndex]+" "+u.message;o.notifyErrorListeners(E,u.offendingToken,u)}},{key:"reportUnwantedToken",value:function(o){if(!this.inErrorRecoveryMode(o)){this.beginErrorCondition(o);var u=o.getCurrentToken(),E="extraneous input "+this.getTokenErrorDisplay(u)+" expecting "+this.getExpectedTokens(o).toString(o.literalNames,o.symbolicNames);o.notifyErrorListeners(E,u,null)}}},{key:"reportMissingToken",value:function(o){if(!this.inErrorRecoveryMode(o)){this.beginErrorCondition(o);var u=o.getCurrentToken(),E="missing "+this.getExpectedTokens(o).toString(o.literalNames,o.symbolicNames)+" at "+this.getTokenErrorDisplay(u);o.notifyErrorListeners(E,u,null)}}},{key:"recoverInline",value:function(o){var u=this.singleTokenDeletion(o);if(u!==null)return o.consume(),u;if(this.singleTokenInsertion(o))return this.getMissingSymbol(o);throw new qs(o)}},{key:"singleTokenInsertion",value:function(o){var u=o.getTokenStream().LA(1),E=o._interp.atn,x=E.states[o.state].transitions[0].target;return!!E.nextTokens(x,o._ctx).contains(u)&&(this.reportMissingToken(o),!0)}},{key:"singleTokenDeletion",value:function(o){var u=o.getTokenStream().LA(2);if(this.getExpectedTokens(o).contains(u)){this.reportUnwantedToken(o),o.consume();var E=o.getCurrentToken();return this.reportMatch(o),E}return null}},{key:"getMissingSymbol",value:function(o){var u,E=o.getCurrentToken(),x=this.getExpectedTokens(o).first();u=x===n.EOF?"<missing EOF>":"<missing "+o.literalNames[x]+">";var T=E,I=o.getTokenStream().LT(-1);return T.type===n.EOF&&I!==null&&(T=I),o.getTokenFactory().create(T.source,x,u,n.DEFAULT_CHANNEL,-1,-1,T.line,T.column)}},{key:"getExpectedTokens",value:function(o){return o.getExpectedTokens()}},{key:"getTokenErrorDisplay",value:function(o){if(o===null)return"<no token>";var u=o.text;return u===null&&(u=o.type===n.EOF?"<EOF>":"<"+o.type+">"),this.escapeWSAndQuote(u)}},{key:"escapeWSAndQuote",value:function(o){return"'"+(o=(o=(o=o.replace(/\n/g,"\\n")).replace(/\r/g,"\\r")).replace(/\t/g,"\\t"))+"'"}},{key:"getErrorRecoverySet",value:function(o){for(var u=o._interp.atn,E=o._ctx,x=new ie;E!==null&&E.invokingState>=0;){var T=u.states[E.invokingState].transitions[0],I=u.nextTokens(T.followState);x.addSet(I),E=E.parentCtx}return x.removeOne(n.EPSILON),x}},{key:"consumeUntil",value:function(o,u){for(var E=o.getTokenStream().LA(1);E!==n.EOF&&!u.contains(E);)o.consume(),E=o.getTokenStream().LA(1)}}],d&&Lg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),_}(function(){function f(){(function(a,p){if(!(a instanceof p))throw new TypeError("Cannot call a class as a function")})(this,f)}var i,d;return i=f,(d=[{key:"reset",value:function(a){}},{key:"recoverInline",value:function(a){}},{key:"recover",value:function(a,p){}},{key:"sync",value:function(a){}},{key:"inErrorRecoveryMode",value:function(a){}},{key:"reportError",value:function(a){}}])&&Fg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),f}());function za(f){return za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},za(f)}function Mg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(za(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(za(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),za(p)==="symbol"?p:String(p)),a)}var p}function Wh(f,i){return Wh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},Wh(f,i)}function Gc(f){return Gc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Gc(f)}var Vm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&Wh(o,u)})(_,f);var i,d,a,p,c=(a=_,p=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=Gc(a);if(p){var E=Gc(this).constructor;o=Reflect.construct(u,arguments,E)}else o=u.apply(this,arguments);return function(x,T){if(T&&(za(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}(x)}(this,o)});function _(){return function(o,u){if(!(o instanceof u))throw new TypeError("Cannot call a class as a function")}(this,_),c.call(this)}return i=_,d=[{key:"recover",value:function(o,u){for(var E=o._ctx;E!==null;)E.exception=u,E=E.parentCtx;throw new Pg(u)}},{key:"recoverInline",value:function(o){this.recover(o,new qs(o))}},{key:"sync",value:function(o){}}],d&&Mg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),_}(zh);const Bg={RecognitionException:Vo,NoViableAltException:Lc,LexerNoViableAltException:Eh,InputMismatchException:qs,FailedPredicateException:Vh,DiagnosticErrorListener:Mm,BailErrorStrategy:Vm,DefaultErrorStrategy:zh,ErrorListener:ws};function Qs(f){return Qs=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Qs(f)}function Ug(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Qs(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Qs(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Qs(p)==="symbol"?p:String(p)),a)}var p}var eu=function(){function f(a,p){if(function(u,E){if(!(u instanceof E))throw new TypeError("Cannot call a class as a function")}(this,f),this.name="<empty>",this.strdata=a,this.decodeToUnicodeCodePoints=p||!1,this._index=0,this.data=[],this.decodeToUnicodeCodePoints)for(var c=0;c<this.strdata.length;){var _=this.strdata.codePointAt(c);this.data.push(_),c+=_<=65535?1:2}else{this.data=new Array(this.strdata.length);for(var o=0;o<this.strdata.length;o++)this.data[o]=this.strdata.charCodeAt(o)}this._size=this.data.length}var i,d;return i=f,(d=[{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(a){if(a===0)return 0;a<0&&(a+=1);var p=this._index+a-1;return p<0||p>=this._size?n.EOF:this.data[p]}},{key:"LT",value:function(a){return this.LA(a)}},{key:"mark",value:function(){return-1}},{key:"release",value:function(a){}},{key:"seek",value:function(a){a<=this._index?this._index=a:this._index=Math.min(a,this._size)}},{key:"getText",value:function(a,p){if(p>=this._size&&(p=this._size-1),a>=this._size)return"";if(this.decodeToUnicodeCodePoints){for(var c="",_=a;_<=p;_++)c+=String.fromCodePoint(this.data[_]);return c}return this.strdata.slice(a,p+1)}},{key:"toString",value:function(){return this.strdata}},{key:"index",get:function(){return this._index}},{key:"size",get:function(){return this._size}}])&&Ug(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),f}();function Xh(f){return Xh=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Xh(f)}function qh(f,i){return qh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},qh(f,i)}function Kc(f){return Kc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Kc(f)}var tu=function(f){(function(_,o){if(typeof o!="function"&&o!==null)throw new TypeError("Super expression must either be null or a function");_.prototype=Object.create(o&&o.prototype,{constructor:{value:_,writable:!0,configurable:!0}}),Object.defineProperty(_,"prototype",{writable:!1}),o&&qh(_,o)})(c,f);var i,d,a,p=(d=c,a=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var _,o=Kc(d);if(a){var u=Kc(this).constructor;_=Reflect.construct(o,arguments,u)}else _=o.apply(this,arguments);return function(E,x){if(x&&(Xh(x)==="object"||typeof x=="function"))return x;if(x!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(T){if(T===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return T}(E)}(this,_)});function c(_,o){return function(u,E){if(!(u instanceof E))throw new TypeError("Cannot call a class as a function")}(this,c),p.call(this,_,o)}return i=c,Object.defineProperty(i,"prototype",{writable:!1}),i}(eu),jm=Cr(92);function Wa(f){return Wa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Wa(f)}function Vg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Wa(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Wa(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Wa(p)==="symbol"?p:String(p)),a)}var p}function Yh(f,i){return Yh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},Yh(f,i)}function zc(f){return zc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},zc(f)}var $m=typeof process<"u"&&process.versions!=null&&process.versions.node!=null,Hm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&Yh(o,u)})(_,f);var i,d,a,p,c=(a=_,p=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=zc(a);if(p){var E=zc(this).constructor;o=Reflect.construct(u,arguments,E)}else o=u.apply(this,arguments);return function(x,T){if(T&&(Wa(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}(x)}(this,o)});function _(o,u,E){var x;if(function(I,te){if(!(I instanceof te))throw new TypeError("Cannot call a class as a function")}(this,_),!$m)throw new Error("FileStream is only available when running in Node!");var T=jm.readFileSync(o,u||"utf-8");return(x=c.call(this,T,E)).fileName=o,x}return i=_,d=[{key:"fromPath",value:function(o,u,E){if(!$m)throw new Error("FileStream is only available when running in Node!");jm.readFile(o,u,function(x,T){var I=null;T!==null&&(I=new eu(T,!0)),E(x,I)})}}],d&&Vg(i,d),Object.defineProperty(i,"prototype",{writable:!1}),_}(tu);const Gm={fromString:function(f){return new eu(f,!0)},fromBlob:function(f,i,d,a){var p=new window.FileReader;p.onload=function(c){var _=new eu(c.target.result,!0);d(_)},p.onerror=a,p.readAsText(f,i)},fromBuffer:function(f,i){return new eu(f.toString(i),!0)},fromPath:function(f,i,d){Hm.fromPath(f,i,d)},fromPathSync:function(f,i){return new Hm(f,i)}},jg={arrayToString:B,stringToCharArray:function(f){for(var i=new Uint16Array(f.length),d=0;d<f.length;d++)i[d]=f.charCodeAt(d);return i}};function nu(f){return nu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},nu(f)}function Km(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(nu(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(nu(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),nu(p)==="symbol"?p:String(p)),a)}var p}function $g(f,i,d){return i&&Km(f.prototype,i),d&&Km(f,d),Object.defineProperty(f,"prototype",{writable:!1}),f}function Xa(f){return Xa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Xa(f)}function Hg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Xa(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Xa(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Xa(p)==="symbol"?p:String(p)),a)}var p}function Jh(f,i){return Jh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},Jh(f,i)}function Wc(f){return Wc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Wc(f)}var zm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&Jh(o,u)})(_,f);var i,d,a,p,c=(a=_,p=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=Wc(a);if(p){var E=Wc(this).constructor;o=Reflect.construct(u,arguments,E)}else o=u.apply(this,arguments);return function(x,T){if(T&&(Xa(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}(x)}(this,o)});function _(o){var u;return function(E,x){if(!(E instanceof x))throw new TypeError("Cannot call a class as a function")}(this,_),(u=c.call(this)).tokenSource=o,u.tokens=[],u.index=-1,u.fetchedEOF=!1,u}return i=_,(d=[{key:"mark",value:function(){return 0}},{key:"release",value:function(o){}},{key:"reset",value:function(){this.seek(0)}},{key:"seek",value:function(o){this.lazyInit(),this.index=this.adjustSeekIndex(o)}},{key:"size",get:function(){return this.tokens.length}},{key:"get",value:function(o){return this.lazyInit(),this.tokens[o]}},{key:"consume",value:function(){if(!(this.index>=0&&(this.fetchedEOF?this.index<this.tokens.length-1:this.index<this.tokens.length))&&this.LA(1)===n.EOF)throw"cannot consume EOF";this.sync(this.index+1)&&(this.index=this.adjustSeekIndex(this.index+1))}},{key:"sync",value:function(o){var u=o-this.tokens.length+1;return!(u>0)||this.fetch(u)>=u}},{key:"fetch",value:function(o){if(this.fetchedEOF)return 0;for(var u=0;u<o;u++){var E=this.tokenSource.nextToken();if(E.tokenIndex=this.tokens.length,this.tokens.push(E),E.type===n.EOF)return this.fetchedEOF=!0,u+1}return o}},{key:"getTokens",value:function(o,u,E){if(E===void 0&&(E=null),o<0||u<0)return null;this.lazyInit();var x=[];u>=this.tokens.length&&(u=this.tokens.length-1);for(var T=o;T<u;T++){var I=this.tokens[T];if(I.type===n.EOF)break;(E===null||E.contains(I.type))&&x.push(I)}return x}},{key:"LA",value:function(o){return this.LT(o).type}},{key:"LB",value:function(o){return this.index-o<0?null:this.tokens[this.index-o]}},{key:"LT",value:function(o){if(this.lazyInit(),o===0)return null;if(o<0)return this.LB(-o);var u=this.index+o-1;return this.sync(u),u>=this.tokens.length?this.tokens[this.tokens.length-1]:this.tokens[u]}},{key:"adjustSeekIndex",value:function(o){return o}},{key:"lazyInit",value:function(){this.index===-1&&this.setup()}},{key:"setup",value:function(){this.sync(0),this.index=this.adjustSeekIndex(0)}},{key:"setTokenSource",value:function(o){this.tokenSource=o,this.tokens=[],this.index=-1,this.fetchedEOF=!1}},{key:"nextTokenOnChannel",value:function(o,u){if(this.sync(o),o>=this.tokens.length)return-1;for(var E=this.tokens[o];E.channel!==this.channel;){if(E.type===n.EOF)return-1;o+=1,this.sync(o),E=this.tokens[o]}return o}},{key:"previousTokenOnChannel",value:function(o,u){for(;o>=0&&this.tokens[o].channel!==u;)o-=1;return o}},{key:"getHiddenTokensToRight",value:function(o,u){if(u===void 0&&(u=-1),this.lazyInit(),o<0||o>=this.tokens.length)throw o+" not in 0.."+this.tokens.length-1;var E=this.nextTokenOnChannel(o+1,ar.DEFAULT_TOKEN_CHANNEL),x=o+1,T=E===-1?this.tokens.length-1:E;return this.filterForChannel(x,T,u)}},{key:"getHiddenTokensToLeft",value:function(o,u){if(u===void 0&&(u=-1),this.lazyInit(),o<0||o>=this.tokens.length)throw o+" not in 0.."+this.tokens.length-1;var E=this.previousTokenOnChannel(o-1,ar.DEFAULT_TOKEN_CHANNEL);if(E===o-1)return null;var x=E+1,T=o-1;return this.filterForChannel(x,T,u)}},{key:"filterForChannel",value:function(o,u,E){for(var x=[],T=o;T<u+1;T++){var I=this.tokens[T];E===-1?I.channel!==ar.DEFAULT_TOKEN_CHANNEL&&x.push(I):I.channel===E&&x.push(I)}return x.length===0?null:x}},{key:"getSourceName",value:function(){return this.tokenSource.getSourceName()}},{key:"getText",value:function(o){this.lazyInit(),this.fill(),o||(o=new ve(0,this.tokens.length-1));var u=o.start;u instanceof n&&(u=u.tokenIndex);var E=o.stop;if(E instanceof n&&(E=E.tokenIndex),u===null||E===null||u<0||E<0)return"";E>=this.tokens.length&&(E=this.tokens.length-1);for(var x="",T=u;T<E+1;T++){var I=this.tokens[T];if(I.type===n.EOF)break;x+=I.text}return x}},{key:"fill",value:function(){for(this.lazyInit();this.fetch(1e3)===1e3;);}}])&&Hg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),_}($g(function f(){(function(i,d){if(!(i instanceof d))throw new TypeError("Cannot call a class as a function")})(this,f)}));function qa(f){return qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},qa(f)}function Gg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(qa(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(qa(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),qa(p)==="symbol"?p:String(p)),a)}var p}function Zh(f,i){return Zh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},Zh(f,i)}function Xc(f){return Xc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Xc(f)}Object.defineProperty(zm,"size",{get:function(){return this.tokens.length}});var Wm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&Zh(o,u)})(_,f);var i,d,a,p,c=(a=_,p=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=Xc(a);if(p){var E=Xc(this).constructor;o=Reflect.construct(u,arguments,E)}else o=u.apply(this,arguments);return function(x,T){if(T&&(qa(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}(x)}(this,o)});function _(o,u){var E;return function(x,T){if(!(x instanceof T))throw new TypeError("Cannot call a class as a function")}(this,_),(E=c.call(this,o)).channel=u===void 0?n.DEFAULT_CHANNEL:u,E}return i=_,(d=[{key:"adjustSeekIndex",value:function(o){return this.nextTokenOnChannel(o,this.channel)}},{key:"LB",value:function(o){if(o===0||this.index-o<0)return null;for(var u=this.index,E=1;E<=o;)u=this.previousTokenOnChannel(u-1,this.channel),E+=1;return u<0?null:this.tokens[u]}},{key:"LT",value:function(o){if(this.lazyInit(),o===0)return null;if(o<0)return this.LB(-o);for(var u=this.index,E=1;E<o;)this.sync(u+1)&&(u=this.nextTokenOnChannel(u+1,this.channel)),E+=1;return this.tokens[u]}},{key:"getNumberOfOnChannelTokens",value:function(){var o=0;this.fill();for(var u=0;u<this.tokens.length;u++){var E=this.tokens[u];if(E.channel===this.channel&&(o+=1),E.type===n.EOF)break}return o}}])&&Gg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),_}(zm);function Ya(f){return Ya=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ya(f)}function Kg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Ya(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Ya(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Ya(p)==="symbol"?p:String(p)),a)}var p}function Qh(f,i){return Qh=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},Qh(f,i)}function qc(f){return qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},qc(f)}var zg=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&Qh(o,u)})(_,f);var i,d,a,p,c=(a=_,p=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=qc(a);if(p){var E=qc(this).constructor;o=Reflect.construct(u,arguments,E)}else o=u.apply(this,arguments);return function(x,T){if(T&&(Ya(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}(x)}(this,o)});function _(o){var u;return function(E,x){if(!(E instanceof x))throw new TypeError("Cannot call a class as a function")}(this,_),(u=c.call(this)).parser=o,u}return i=_,(d=[{key:"enterEveryRule",value:function(o){console.log("enter "+this.parser.ruleNames[o.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}},{key:"visitTerminal",value:function(o){console.log("consume "+o.symbol+" rule "+this.parser.ruleNames[this.parser._ctx.ruleIndex])}},{key:"exitEveryRule",value:function(o){console.log("exit "+this.parser.ruleNames[o.ruleIndex]+", LT(1)="+this.parser._input.LT(1).text)}}])&&Kg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),_}(Fh);function Ja(f){return Ja=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Ja(f)}function Wg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Ja(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Ja(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Ja(p)==="symbol"?p:String(p)),a)}var p}function ep(f,i){return ep=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},ep(f,i)}function Yc(f){return Yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Yc(f)}var tp=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&ep(o,u)})(_,f);var i,d,a,p,c=(a=_,p=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=Yc(a);if(p){var E=Yc(this).constructor;o=Reflect.construct(u,arguments,E)}else o=u.apply(this,arguments);return function(x,T){if(T&&(Ja(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}(x)}(this,o)});function _(o){var u;return function(E,x){if(!(E instanceof x))throw new TypeError("Cannot call a class as a function")}(this,_),(u=c.call(this))._input=null,u._errHandler=new zh,u._precedenceStack=[],u._precedenceStack.push(0),u._ctx=null,u.buildParseTrees=!0,u._tracer=null,u._parseListeners=null,u._syntaxErrors=0,u.setInputStream(o),u}return i=_,d=[{key:"reset",value:function(){this._input!==null&&this._input.seek(0),this._errHandler.reset(this),this._ctx=null,this._syntaxErrors=0,this.setTrace(!1),this._precedenceStack=[],this._precedenceStack.push(0),this._interp!==null&&this._interp.reset()}},{key:"match",value:function(o){var u=this.getCurrentToken();return u.type===o?(this._errHandler.reportMatch(this),this.consume()):(u=this._errHandler.recoverInline(this),this.buildParseTrees&&u.tokenIndex===-1&&this._ctx.addErrorNode(u)),u}},{key:"matchWildcard",value:function(){var o=this.getCurrentToken();return o.type>0?(this._errHandler.reportMatch(this),this.consume()):(o=this._errHandler.recoverInline(this),this.buildParseTrees&&o.tokenIndex===-1&&this._ctx.addErrorNode(o)),o}},{key:"getParseListeners",value:function(){return this._parseListeners||[]}},{key:"addParseListener",value:function(o){if(o===null)throw"listener";this._parseListeners===null&&(this._parseListeners=[]),this._parseListeners.push(o)}},{key:"removeParseListener",value:function(o){if(this._parseListeners!==null){var u=this._parseListeners.indexOf(o);u>=0&&this._parseListeners.splice(u,1),this._parseListeners.length===0&&(this._parseListeners=null)}}},{key:"removeParseListeners",value:function(){this._parseListeners=null}},{key:"triggerEnterRuleEvent",value:function(){if(this._parseListeners!==null){var o=this._ctx;this._parseListeners.forEach(function(u){u.enterEveryRule(o),o.enterRule(u)})}}},{key:"triggerExitRuleEvent",value:function(){if(this._parseListeners!==null){var o=this._ctx;this._parseListeners.slice(0).reverse().forEach(function(u){o.exitRule(u),u.exitEveryRule(o)})}}},{key:"getTokenFactory",value:function(){return this._input.tokenSource._factory}},{key:"setTokenFactory",value:function(o){this._input.tokenSource._factory=o}},{key:"getATNWithBypassAlts",value:function(){var o=this.getSerializedATN();if(o===null)throw"The current parser does not support an ATN with bypass alternatives.";var u=this.bypassAltsAtnCache[o];if(u===null){var E=new Os;E.generateRuleBypassTransitions=!0,u=new fh(E).deserialize(o),this.bypassAltsAtnCache[o]=u}return u}},{key:"getInputStream",value:function(){return this.getTokenStream()}},{key:"setInputStream",value:function(o){this.setTokenStream(o)}},{key:"getTokenStream",value:function(){return this._input}},{key:"setTokenStream",value:function(o){this._input=null,this.reset(),this._input=o}},{key:"syntaxErrorsCount",get:function(){return this._syntaxErrors}},{key:"getCurrentToken",value:function(){return this._input.LT(1)}},{key:"notifyErrorListeners",value:function(o,u,E){E=E||null,(u=u||null)===null&&(u=this.getCurrentToken()),this._syntaxErrors+=1;var x=u.line,T=u.column;this.getErrorListenerDispatch().syntaxError(this,u,x,T,o,E)}},{key:"consume",value:function(){var o=this.getCurrentToken();o.type!==n.EOF&&this.getInputStream().consume();var u,E=this._parseListeners!==null&&this._parseListeners.length>0;return(this.buildParseTrees||E)&&((u=this._errHandler.inErrorRecoveryMode(this)?this._ctx.addErrorNode(o):this._ctx.addTokenNode(o)).invokingState=this.state,E&&this._parseListeners.forEach(function(x){u instanceof Xr||u.isErrorNode!==void 0&&u.isErrorNode()?x.visitErrorNode(u):u instanceof an&&x.visitTerminal(u)})),o}},{key:"addContextToParseTree",value:function(){this._ctx.parentCtx!==null&&this._ctx.parentCtx.addChild(this._ctx)}},{key:"enterRule",value:function(o,u,E){this.state=u,this._ctx=o,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(o,u){o.setAltNumber(u),this.buildParseTrees&&this._ctx!==o&&this._ctx.parentCtx!==null&&(this._ctx.parentCtx.removeLastChild(),this._ctx.parentCtx.addChild(o)),this._ctx=o}},{key:"getPrecedence",value:function(){return this._precedenceStack.length===0?-1:this._precedenceStack[this._precedenceStack.length-1]}},{key:"enterRecursionRule",value:function(o,u,E,x){this.state=u,this._precedenceStack.push(x),this._ctx=o,this._ctx.start=this._input.LT(1),this.triggerEnterRuleEvent()}},{key:"pushNewRecursionContext",value:function(o,u,E){var x=this._ctx;x.parentCtx=o,x.invokingState=u,x.stop=this._input.LT(-1),this._ctx=o,this._ctx.start=x.start,this.buildParseTrees&&this._ctx.addChild(x),this.triggerEnterRuleEvent()}},{key:"unrollRecursionContexts",value:function(o){this._precedenceStack.pop(),this._ctx.stop=this._input.LT(-1);var u=this._ctx,E=this.getParseListeners();if(E!==null&&E.length>0)for(;this._ctx!==o;)this.triggerExitRuleEvent(),this._ctx=this._ctx.parentCtx;else this._ctx=o;u.parentCtx=o,this.buildParseTrees&&o!==null&&o.addChild(u)}},{key:"getInvokingContext",value:function(o){for(var u=this._ctx;u!==null;){if(u.ruleIndex===o)return u;u=u.parentCtx}return null}},{key:"precpred",value:function(o,u){return u>=this._precedenceStack[this._precedenceStack.length-1]}},{key:"inContext",value:function(o){return!1}},{key:"isExpectedToken",value:function(o){var u=this._interp.atn,E=this._ctx,x=u.states[this.state],T=u.nextTokens(x);if(T.contains(o))return!0;if(!T.contains(n.EPSILON))return!1;for(;E!==null&&E.invokingState>=0&&T.contains(n.EPSILON);){var I=u.states[E.invokingState].transitions[0];if((T=u.nextTokens(I.followState)).contains(o))return!0;E=E.parentCtx}return!(!T.contains(n.EPSILON)||o!==n.EOF)}},{key:"getExpectedTokens",value:function(){return this._interp.atn.getExpectedTokens(this.state,this._ctx)}},{key:"getExpectedTokensWithinCurrentRule",value:function(){var o=this._interp.atn,u=o.states[this.state];return o.nextTokens(u)}},{key:"getRuleIndex",value:function(o){var u=this.getRuleIndexMap()[o];return u!==null?u:-1}},{key:"getRuleInvocationStack",value:function(o){(o=o||null)===null&&(o=this._ctx);for(var u=[];o!==null;){var E=o.ruleIndex;E<0?u.push("n/a"):u.push(this.ruleNames[E]),o=o.parentCtx}return u}},{key:"getDFAStrings",value:function(){return this._interp.decisionToDFA.toString()}},{key:"dumpDFA",value:function(){for(var o=!1,u=0;u<this._interp.decisionToDFA.length;u++){var E=this._interp.decisionToDFA[u];E.states.length>0&&(o&&console.log(),this.printer.println("Decision "+E.decision+":"),this.printer.print(E.toString(this.literalNames,this.symbolicNames)),o=!0)}}},{key:"getSourceName",value:function(){return this._input.sourceName}},{key:"setTrace",value:function(o){o?(this._tracer!==null&&this.removeParseListener(this._tracer),this._tracer=new zg(this),this.addParseListener(this._tracer)):(this.removeParseListener(this._tracer),this._tracer=null)}}],d&&Wg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),_}(Oc);function Za(f){return Za=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Za(f)}function Xg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Za(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Za(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Za(p)==="symbol"?p:String(p)),a)}var p}function np(f,i){return np=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},np(f,i)}function Jc(f){return Jc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Jc(f)}tp.bypassAltsAtnCache={};var Xm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&np(o,u)})(_,f);var i,d,a,p,c=(a=_,p=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=Jc(a);if(p){var E=Jc(this).constructor;o=Reflect.construct(u,arguments,E)}else o=u.apply(this,arguments);return function(x,T){if(T&&(Za(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}(x)}(this,o)});function _(o){var u;return function(E,x){if(!(E instanceof x))throw new TypeError("Cannot call a class as a function")}(this,_),(u=c.call(this)).parentCtx=null,u.symbol=o,u}return i=_,(d=[{key:"getChild",value:function(o){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(this.symbol===null)return ve.INVALID_INTERVAL;var o=this.symbol.tokenIndex;return new ve(o,o)}},{key:"getChildCount",value:function(){return 0}},{key:"accept",value:function(o){return o.visitTerminal(this)}},{key:"getText",value:function(){return this.symbol.text}},{key:"toString",value:function(){return this.symbol.type===n.EOF?"<EOF>":this.symbol.text}}])&&Xg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),_}(an);function Qa(f){return Qa=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},Qa(f)}function qg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(Qa(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(Qa(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),Qa(p)==="symbol"?p:String(p)),a)}var p}function rp(f,i){return rp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},rp(f,i)}function Zc(f){return Zc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Zc(f)}var qm=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&rp(o,u)})(_,f);var i,d,a,p,c=(a=_,p=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=Zc(a);if(p){var E=Zc(this).constructor;o=Reflect.construct(u,arguments,E)}else o=u.apply(this,arguments);return function(x,T){if(T&&(Qa(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}(x)}(this,o)});function _(o){return function(u,E){if(!(u instanceof E))throw new TypeError("Cannot call a class as a function")}(this,_),c.call(this,o)}return i=_,(d=[{key:"isErrorNode",value:function(){return!0}},{key:"accept",value:function(o){return o.visitErrorNode(this)}}])&&qg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),_}(Xm);function es(f){return es=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},es(f)}function Yg(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,(p=function(c,_){if(es(c)!=="object"||c===null)return c;var o=c[Symbol.toPrimitive];if(o!==void 0){var u=o.call(c,"string");if(es(u)!=="object")return u;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(c)}(a.key),es(p)==="symbol"?p:String(p)),a)}var p}function ip(f,i){return ip=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},ip(f,i)}function Qc(f){return Qc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},Qc(f)}var op=function(f){(function(o,u){if(typeof u!="function"&&u!==null)throw new TypeError("Super expression must either be null or a function");o.prototype=Object.create(u&&u.prototype,{constructor:{value:o,writable:!0,configurable:!0}}),Object.defineProperty(o,"prototype",{writable:!1}),u&&ip(o,u)})(_,f);var i,d,a,p,c=(a=_,p=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var o,u=Qc(a);if(p){var E=Qc(this).constructor;o=Reflect.construct(u,arguments,E)}else o=u.apply(this,arguments);return function(x,T){if(T&&(es(T)==="object"||typeof T=="function"))return T;if(T!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(I){if(I===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return I}(x)}(this,o)});function _(o,u){var E;return function(x,T){if(!(x instanceof T))throw new TypeError("Cannot call a class as a function")}(this,_),(E=c.call(this,o,u)).children=null,E.start=null,E.stop=null,E.exception=null,E}return i=_,(d=[{key:"copyFrom",value:function(o){this.parentCtx=o.parentCtx,this.invokingState=o.invokingState,this.children=null,this.start=o.start,this.stop=o.stop,o.children&&(this.children=[],o.children.map(function(u){u instanceof qm&&(this.children.push(u),u.parentCtx=this)},this))}},{key:"enterRule",value:function(o){}},{key:"exitRule",value:function(o){}},{key:"addChild",value:function(o){return this.children===null&&(this.children=[]),this.children.push(o),o}},{key:"removeLastChild",value:function(){this.children!==null&&this.children.pop()}},{key:"addTokenNode",value:function(o){var u=new Xm(o);return this.addChild(u),u.parentCtx=this,u}},{key:"addErrorNode",value:function(o){var u=new qm(o);return this.addChild(u),u.parentCtx=this,u}},{key:"getChild",value:function(o,u){if(u=u||null,this.children===null||o<0||o>=this.children.length)return null;if(u===null)return this.children[o];for(var E=0;E<this.children.length;E++){var x=this.children[E];if(x instanceof u){if(o===0)return x;o-=1}}return null}},{key:"getToken",value:function(o,u){if(this.children===null||u<0||u>=this.children.length)return null;for(var E=0;E<this.children.length;E++){var x=this.children[E];if(x instanceof an&&x.symbol.type===o){if(u===0)return x;u-=1}}return null}},{key:"getTokens",value:function(o){if(this.children===null)return[];for(var u=[],E=0;E<this.children.length;E++){var x=this.children[E];x instanceof an&&x.symbol.type===o&&u.push(x)}return u}},{key:"getTypedRuleContext",value:function(o,u){return this.getChild(u,o)}},{key:"getTypedRuleContexts",value:function(o){if(this.children===null)return[];for(var u=[],E=0;E<this.children.length;E++){var x=this.children[E];x instanceof o&&u.push(x)}return u}},{key:"getChildCount",value:function(){return this.children===null?0:this.children.length}},{key:"getSourceInterval",value:function(){return this.start===null||this.stop===null?ve.INVALID_INTERVAL:new ve(this.start.tokenIndex,this.stop.tokenIndex)}}])&&Yg(i.prototype,d),Object.defineProperty(i,"prototype",{writable:!1}),_}(Yi);function ap(f,i){if(typeof i!="function"&&i!==null)throw new TypeError("Super expression must either be null or a function");f.prototype=Object.create(i&&i.prototype,{constructor:{value:f,writable:!0,configurable:!0}}),Object.defineProperty(f,"prototype",{writable:!1}),i&&sp(f,i)}function sp(f,i){return sp=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(d,a){return d.__proto__=a,d},sp(f,i)}function up(f){var i=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var d,a=el(f);if(i){var p=el(this).constructor;d=Reflect.construct(a,arguments,p)}else d=a.apply(this,arguments);return function(c,_){if(_&&(ts(_)==="object"||typeof _=="function"))return _;if(_!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(o){if(o===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return o}(c)}(this,d)}}function el(f){return el=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(i){return i.__proto__||Object.getPrototypeOf(i)},el(f)}function ts(f){return ts=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(i){return typeof i}:function(i){return i&&typeof Symbol=="function"&&i.constructor===Symbol&&i!==Symbol.prototype?"symbol":typeof i},ts(f)}function ns(f,i){var d=typeof Symbol<"u"&&f[Symbol.iterator]||f["@@iterator"];if(!d){if(Array.isArray(f)||(d=function(u,E){if(u){if(typeof u=="string")return Ym(u,E);var x=Object.prototype.toString.call(u).slice(8,-1);return x==="Object"&&u.constructor&&(x=u.constructor.name),x==="Map"||x==="Set"?Array.from(u):x==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(x)?Ym(u,E):void 0}}(f))||i&&f&&typeof f.length=="number"){d&&(f=d);var a=0,p=function(){};return{s:p,n:function(){return a>=f.length?{done:!0}:{done:!1,value:f[a++]}},e:function(u){throw u},f:p}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
10
10
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var c,_=!0,o=!1;return{s:function(){d=d.call(f)},n:function(){var u=d.next();return _=u.done,u},e:function(u){o=!0,c=u},f:function(){try{_||d.return==null||d.return()}finally{if(o)throw c}}}}function Ym(f,i){(i==null||i>f.length)&&(i=f.length);for(var d=0,a=new Array(i);d<i;d++)a[d]=f[d];return a}function ru(f,i){if(!(f instanceof i))throw new TypeError("Cannot call a class as a function")}function Jm(f,i){for(var d=0;d<i.length;d++){var a=i[d];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(f,Zm(a.key),a)}}function iu(f,i,d){return i&&Jm(f.prototype,i),d&&Jm(f,d),Object.defineProperty(f,"prototype",{writable:!1}),f}function Zm(f){var i=function(d,a){if(ts(d)!=="object"||d===null)return d;var p=d[Symbol.toPrimitive];if(p!==void 0){var c=p.call(d,"string");if(ts(c)!=="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(d)}(f);return ts(i)==="symbol"?i:String(i)}Yi.EMPTY=new op;var tl,nl,cp,Qm=function(){function f(i){ru(this,f),this.tokens=i,this.programs=new Map}return iu(f,[{key:"getTokenStream",value:function(){return this.tokens}},{key:"insertAfter",value:function(i,d){var a,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.DEFAULT_PROGRAM_NAME;a=typeof i=="number"?i:i.tokenIndex;var c=this.getProgram(p),_=new t_(this.tokens,a,c.length,d);c.push(_)}},{key:"insertBefore",value:function(i,d){var a,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.DEFAULT_PROGRAM_NAME;a=typeof i=="number"?i:i.tokenIndex;var c=this.getProgram(p),_=new rs(this.tokens,a,c.length,d);c.push(_)}},{key:"replaceSingle",value:function(i,d){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.DEFAULT_PROGRAM_NAME;this.replace(i,i,d,a)}},{key:"replace",value:function(i,d,a){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:f.DEFAULT_PROGRAM_NAME;if(typeof i!="number"&&(i=i.tokenIndex),typeof d!="number"&&(d=d.tokenIndex),i>d||i<0||d<0||d>=this.tokens.size)throw new RangeError("replace: range invalid: ".concat(i,"..").concat(d,"(size=").concat(this.tokens.size,")"));var c=this.getProgram(p),_=new rl(this.tokens,i,d,c.length,a);c.push(_)}},{key:"delete",value:function(i,d){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.DEFAULT_PROGRAM_NAME;d===void 0&&(d=i),this.replace(i,d,null,a)}},{key:"getProgram",value:function(i){var d=this.programs.get(i);return d==null&&(d=this.initializeProgram(i)),d}},{key:"initializeProgram",value:function(i){var d=[];return this.programs.set(i,d),d}},{key:"getText",value:function(i){var d,a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f.DEFAULT_PROGRAM_NAME;d=i instanceof ve?i:new ve(0,this.tokens.size-1),typeof i=="string"&&(a=i);var p=this.programs.get(a),c=d.start,_=d.stop;if(_>this.tokens.size-1&&(_=this.tokens.size-1),c<0&&(c=0),p==null||p.length===0)return this.tokens.getText(new ve(c,_));for(var o=[],u=this.reduceToSingleOperationPerIndex(p),E=c;E<=_&&E<this.tokens.size;){var x=u.get(E);u.delete(E);var T=this.tokens.get(E);x==null?(T.type!==n.EOF&&o.push(String(T.text)),E++):E=x.execute(o)}if(_===this.tokens.size-1){var I,te=ns(u.values());try{for(te.s();!(I=te.n()).done;){var Re=I.value;Re.index>=this.tokens.size-1&&o.push(Re.text.toString())}}catch(De){te.e(De)}finally{te.f()}}return o.join("")}},{key:"reduceToSingleOperationPerIndex",value:function(i){for(var d=0;d<i.length;d++){var a=i[d];if(a!=null&&a instanceof rl){var p,c=a,_=ns(this.getKindOfOps(i,rs,d));try{for(_.s();!(p=_.n()).done;){var o=p.value;o.index===c.index?(i[o.instructionIndex]=void 0,c.text=o.text.toString()+(c.text!=null?c.text.toString():"")):o.index>c.index&&o.index<=c.lastIndex&&(i[o.instructionIndex]=void 0)}}catch(xr){_.e(xr)}finally{_.f()}var u,E=ns(this.getKindOfOps(i,rl,d));try{for(E.s();!(u=E.n()).done;){var x=u.value;if(x.index>=c.index&&x.lastIndex<=c.lastIndex)i[x.instructionIndex]=void 0;else{var T=x.lastIndex<c.index||x.index>c.lastIndex;if(x.text!=null||c.text!=null||T){if(!T)throw new Error("replace op boundaries of ".concat(c," overlap with previous ").concat(x))}else i[x.instructionIndex]=void 0,c.index=Math.min(x.index,c.index),c.lastIndex=Math.max(x.lastIndex,c.lastIndex)}}}catch(xr){E.e(xr)}finally{E.f()}}}for(var I=0;I<i.length;I++){var te=i[I];if(te!=null&&te instanceof rs){var Re,De=te,He=ns(this.getKindOfOps(i,rs,I));try{for(He.s();!(Re=He.n()).done;){var at=Re.value;at.index===De.index&&(at instanceof t_?(De.text=this.catOpText(at.text,De.text),i[at.instructionIndex]=void 0):at instanceof rs&&(De.text=this.catOpText(De.text,at.text),i[at.instructionIndex]=void 0))}}catch(xr){He.e(xr)}finally{He.f()}var ze,_n=ns(this.getKindOfOps(i,rl,I));try{for(_n.s();!(ze=_n.n()).done;){var pn=ze.value;if(De.index!==pn.index){if(De.index>=pn.index&&De.index<=pn.lastIndex)throw new Error("insert op ".concat(De," within boundaries of previous ").concat(pn))}else pn.text=this.catOpText(De.text,pn.text),i[I]=void 0}}catch(xr){_n.e(xr)}finally{_n.f()}}}var zn,Vr=new Map,Ri=ns(i);try{for(Ri.s();!(zn=Ri.n()).done;){var wi=zn.value;if(wi!=null){if(Vr.get(wi.index)!=null)throw new Error("should only be one op per index");Vr.set(wi.index,wi)}}}catch(xr){Ri.e(xr)}finally{Ri.f()}return Vr}},{key:"catOpText",value:function(i,d){var a="",p="";return i!=null&&(a=i.toString()),d!=null&&(p=d.toString()),a+p}},{key:"getKindOfOps",value:function(i,d,a){return i.slice(0,a).filter(function(p){return p&&p instanceof d})}}]),f}();tl=Qm,cp="default",(nl=Zm(nl="DEFAULT_PROGRAM_NAME"))in tl?Object.defineProperty(tl,nl,{value:cp,enumerable:!0,configurable:!0,writable:!0}):tl[nl]=cp;var e_=function(){function f(i,d,a,p){ru(this,f),this.tokens=i,this.instructionIndex=a,this.index=d,this.text=p===void 0?"":p}return iu(f,[{key:"toString",value:function(){var i=this.constructor.name,d=i.indexOf("$");return"<"+(i=i.substring(d+1,i.length))+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}}]),f}(),rs=function(f){ap(d,f);var i=up(d);function d(a,p,c,_){return ru(this,d),i.call(this,a,p,c,_)}return iu(d,[{key:"execute",value:function(a){return this.text&&a.push(this.text.toString()),this.tokens.get(this.index).type!==n.EOF&&a.push(String(this.tokens.get(this.index).text)),this.index+1}}]),d}(e_),t_=function(f){ap(d,f);var i=up(d);function d(a,p,c,_){return ru(this,d),i.call(this,a,p+1,c,_)}return iu(d)}(rs),rl=function(f){ap(d,f);var i=up(d);function d(a,p,c,_,o){var u;return ru(this,d),(u=i.call(this,a,p,_,o)).lastIndex=c,u}return iu(d,[{key:"execute",value:function(a){return this.text&&a.push(this.text.toString()),this.lastIndex+1}},{key:"toString",value:function(){return this.text==null?"<DeleteOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+">":"<ReplaceOp@"+this.tokens.get(this.index)+".."+this.tokens.get(this.lastIndex)+':"'+this.text+'">'}}]),d}(e_);const Jg={atn:Eg,dfa:xg,context:Cg,misc:Og,tree:wg,error:Bg,Token:n,CommonToken:Is,CharStreams:Gm,CharStream:tu,InputStream:tu,CommonTokenStream:Wm,Lexer:ar,Parser:tp,ParserRuleContext:op,Interval:ve,IntervalSet:ie,LL1Analyzer:Bo,Utils:jg,TokenStreamRewriter:Qm}})();var Or=kt.dx,lp=kt.q2;kt.FO,kt.xf,kt.Gy;var n_=kt.s4,r_=kt.c7,fp=kt._7;kt.gp;var i_=kt.cK,o_=kt.zs,a_=kt.AV;kt.Xp,kt.VS,kt.ul;var s_=kt.hW,u_=kt.x1,di=kt.z5;kt.oN;var c_=kt.TB;kt.u1;var l_=kt._b,f_=kt.$F,Ye=kt._T,hp=kt.db,h_=kt.Zx,Je=kt._x;kt.r8,kt.JI,kt.TP;var pp=kt.WU;kt.Nj,kt.ZP;const L=class L extends l_{get grammarFileName(){return"tccScriptParser.g4"}get literalNames(){return L.literalNames}get symbolicNames(){return L.symbolicNames}get ruleNames(){return L.ruleNames}get serializedATN(){return L._serializedATN}createFailedPredicateException(e,n){return new o_(this,e,n)}constructor(e){super(e),this._interp=new f_(this,L._ATN,L.DecisionsToDFA,new hp)}program(){let e=new p_(this,this._ctx,this.state);this.enterRule(e,0,L.RULE_program);let n;try{this.enterOuterAlt(e,1);{for(this.state=106,this._errHandler.sync(this),n=this._input.LA(1);n===4||n===6||!(n-36&-32)&&1<<n-36&38635767;){switch(this.state=104,this._errHandler.sync(this),this._input.LA(1)){case 61:this.state=102,this.match(L.NEWLINE);break;case 4:case 6:case 36:case 37:case 38:case 40:case 41:case 42:case 43:case 47:case 51:case 52:case 54:case 55:case 58:this.state=103,this.globalStmt();break;default:throw new di(this)}this.state=108,this._errHandler.sync(this),n=this._input.LA(1)}this.state=109,this.match(L.EOF)}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}globalStmt(){let e=new il(this,this._ctx,this.state);this.enterRule(e,2,L.RULE_globalStmt);let n;try{switch(this.state=123,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,3,this._ctx)){case 1:this.enterOuterAlt(e,1),this.state=111,this.variableDeclarationStmt(),this.state=113,this._errHandler.sync(this),n=this._input.LA(1),n===8&&(this.state=112,this.match(L.Comma)),this.state=115,this.match(L.NEWLINE);break;case 2:this.enterOuterAlt(e,2),this.state=117,this.blockStmt();break;case 3:this.enterOuterAlt(e,3),this.state=118,this.importStmt();break;case 4:this.enterOuterAlt(e,4),this.state=119,this.arrowFunction();break;case 5:this.enterOuterAlt(e,5),this.state=120,this.arrowMethod();break;case 6:this.enterOuterAlt(e,6),this.state=121,this.typeStatement();break;case 7:this.enterOuterAlt(e,7),this.state=122,this.enumStatement();break}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}blockStmt(){let e=new dp(this,this._ctx,this.state);this.enterRule(e,4,L.RULE_blockStmt);try{let n;this.enterOuterAlt(e,1);{for(this.state=130,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,4,this._ctx);n!==2&&n!==Or.INVALID_ALT_NUMBER;)n===1&&(this.state=125,this.variableDeclarationStmt(),this.state=126,this.match(L.Comma)),this.state=132,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,4,this._ctx);switch(this.state=135,this._errHandler.sync(this),this._input.LA(1)){case 4:case 6:case 38:case 40:case 51:case 54:case 55:case 58:this.state=133,this.varBlockStmt();break;case 37:case 41:case 42:case 43:this.state=134,this.blockExpression();break;default:throw new di(this)}}}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}stmt(){let e=new ol(this,this._ctx,this.state);this.enterRule(e,6,L.RULE_stmt);let n;try{switch(this.state=144,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,7,this._ctx)){case 1:this.enterOuterAlt(e,1),this.state=137,this.simpleStmt(),this.state=139,this._errHandler.sync(this),n=this._input.LA(1),n===8&&(this.state=138,this.match(L.Comma)),this.state=141,this.match(L.NEWLINE);break;case 2:this.enterOuterAlt(e,2),this.state=143,this.expressionBlockSequence();break}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}simpleStmt(){let e=new al(this,this._ctx,this.state);this.enterRule(e,8,L.RULE_simpleStmt);try{switch(this.state=150,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,8,this._ctx)){case 1:this.enterOuterAlt(e,1),this.state=146,this.expressionSequence();break;case 2:this.enterOuterAlt(e,2),this.state=147,this.blockSequence();break;case 3:this.enterOuterAlt(e,3),this.state=148,this.brackethesized();break;case 4:this.enterOuterAlt(e,4),this.state=149,this.flowStmt();break}}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}flowStmt(){let e=new mp(this,this._ctx,this.state);this.enterRule(e,10,L.RULE_flowStmt);let n;try{this.enterOuterAlt(e,1),this.state=152,n=this._input.LA(1),n===34||n===39?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}block(){let e=new is(this,this._ctx,this.state);this.enterRule(e,12,L.RULE_block);let n;try{switch(this.state=161,this._errHandler.sync(this),this._input.LA(1)){case 4:case 6:case 12:case 13:case 31:case 32:case 33:case 34:case 38:case 39:case 40:case 46:case 51:case 54:case 55:case 56:case 57:case 58:this.enterOuterAlt(e,1),this.state=154,this.simpleStmt(),this.state=156,this._errHandler.sync(this),n=this._input.LA(1),n===8&&(this.state=155,this.match(L.Comma)),this.state=158,this.match(L.NEWLINE);break;case 61:this.enterOuterAlt(e,2),this.state=160,this.blockLine();break;default:throw new di(this)}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}blockLine(){let e=new mo(this,this._ctx,this.state);this.enterRule(e,14,L.RULE_blockLine);let n;try{this.enterOuterAlt(e,1);{this.state=163,this.match(L.NEWLINE),this.state=164,this.match(L.INDENT),this.state=166,this._errHandler.sync(this),n=this._input.LA(1);do this.state=165,this.stmt(),this.state=168,this._errHandler.sync(this),n=this._input.LA(1);while(!(n&-32)&&1<<n&2147496016||!(n-32&-32)&&1<<n-32&130568167);this.state=170,this.match(L.DEDENT)}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}variableDeclarationStmt(){let e=new ou(this,this._ctx,this.state);this.enterRule(e,16,L.RULE_variableDeclarationStmt);try{let n;this.enterOuterAlt(e,1);{switch(this.state=174,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,12,this._ctx)){case 1:this.state=172,this.methodStmt();break;case 2:this.state=173,this.variableDeclarationList();break}for(this.state=183,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,14,this._ctx);n!==2&&n!==Or.INVALID_ALT_NUMBER;){if(n===1)switch(this.state=176,this.match(L.Comma),this.state=179,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,13,this._ctx)){case 1:this.state=177,this.methodStmt();break;case 2:this.state=178,this.variableDeclarationList();break}this.state=185,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,14,this._ctx)}}}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}variableDeclarationList(){let e=new Ni(this,this._ctx,this.state);this.enterRule(e,18,L.RULE_variableDeclarationList);try{switch(this.state=194,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,15,this._ctx)){case 1:e=new m_(this,e),this.enterOuterAlt(e,1),this.state=186,this.varArrayDeclaration(),this.state=187,this.match(L.Assign),this.state=188,this.singleExpression(0);break;case 2:e=new d_(this,e),this.enterOuterAlt(e,2),this.state=190,this.name(),this.state=191,this.assignmentOperator(),this.state=192,this.singleExpression(0);break}}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}varModifier(){let e=new sl(this,this._ctx,this.state);this.enterRule(e,20,L.RULE_varModifier);let n;try{this.enterOuterAlt(e,1),this.state=196,n=this._input.LA(1),n===38||n===40?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}blockSequence(){let e=new _p(this,this._ctx,this.state);this.enterRule(e,22,L.RULE_blockSequence);try{let n;this.enterOuterAlt(e,1);{switch(this.state=200,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,16,this._ctx)){case 1:this.state=198,this.singleExpression(0);break;case 2:this.state=199,this.variableDeclarationList();break}for(this.state=209,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,18,this._ctx);n!==2&&n!==Or.INVALID_ALT_NUMBER;){if(n===1)switch(this.state=202,this.match(L.Comma),this.state=205,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,17,this._ctx)){case 1:this.state=203,this.singleExpression(0);break;case 2:this.state=204,this.variableDeclarationList();break}this.state=211,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,18,this._ctx)}}}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}expressionSequence(){let e=new ul(this,this._ctx,this.state);this.enterRule(e,24,L.RULE_expressionSequence);try{let n;for(this.enterOuterAlt(e,1),this.state=212,this.singleExpression(0),this.state=217,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,19,this._ctx);n!==2&&n!==Or.INVALID_ALT_NUMBER;)n===1&&(this.state=213,this.match(L.Comma),this.state=214,this.singleExpression(0)),this.state=219,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,19,this._ctx)}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}expressionBlockSequence(){let e=new yp(this,this._ctx,this.state);this.enterRule(e,26,L.RULE_expressionBlockSequence);try{let n;this.enterOuterAlt(e,1);{for(this.state=228,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,21,this._ctx);n!==2&&n!==Or.INVALID_ALT_NUMBER;){if(n===1){switch(this.state=222,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,20,this._ctx)){case 1:this.state=220,this.singleExpression(0);break;case 2:this.state=221,this.variableDeclarationList();break}this.state=224,this.match(L.Comma)}this.state=230,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,21,this._ctx)}switch(this.state=233,this._errHandler.sync(this),this._input.LA(1)){case 4:case 6:case 38:case 40:case 51:case 54:case 55:case 58:this.state=231,this.varBlockStmt();break;case 37:case 41:case 42:case 43:this.state=232,this.blockExpression();break;default:throw new di(this)}}}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}varBlockStmt(){let e=new cl(this,this._ctx,this.state);this.enterRule(e,28,L.RULE_varBlockStmt);try{this.enterOuterAlt(e,1);{switch(this.state=241,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,23,this._ctx)){case 1:this.state=235,this.varArrayDeclaration(),this.state=236,this.match(L.Assign);break;case 2:this.state=238,this.name(),this.state=239,this.assignmentOperator();break}this.state=243,this.blockExpression()}}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}varArrayDeclaration(){let e=new os(this,this._ctx,this.state);this.enterRule(e,30,L.RULE_varArrayDeclaration);let n;try{switch(this.state=263,this._errHandler.sync(this),this._input.LA(1)){case 38:case 40:case 51:case 54:case 55:case 58:e=new y_(this,e),this.enterOuterAlt(e,1);{switch(this.state=246,this._errHandler.sync(this),n=this._input.LA(1),(n===38||n===40)&&(this.state=245,this.varModifier()),this.state=249,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,25,this._ctx)){case 1:this.state=248,this.typeGather();break}this.state=251,this.identifier()}break;case 4:e=new __(this,e),this.enterOuterAlt(e,2);{for(this.state=252,this.match(L.OpenBracket),this.state=253,this.identifier(),this.state=258,this._errHandler.sync(this),n=this._input.LA(1);n===8;)this.state=254,this.match(L.Comma),this.state=255,this.identifier(),this.state=260,this._errHandler.sync(this),n=this._input.LA(1);this.state=261,this.match(L.CloseBracket)}break;default:throw new di(this)}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}blockExpression(){let e=new au(this,this._ctx,this.state);this.enterRule(e,32,L.RULE_blockExpression);try{switch(this.state=269,this._errHandler.sync(this),this._input.LA(1)){case 43:this.enterOuterAlt(e,1),this.state=265,this.ifStatement();break;case 37:this.enterOuterAlt(e,2),this.state=266,this.forStatement();break;case 42:this.enterOuterAlt(e,3),this.state=267,this.whileStatement();break;case 41:this.enterOuterAlt(e,4),this.state=268,this.switchStatement();break;default:throw new di(this)}}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}singleExpression(e){e===void 0&&(e=0);let n=this._ctx,r=this.state,s=new Ve(this,this._ctx,r),l=s,h=34;this.enterRecursionRule(s,34,L.RULE_singleExpression,e);let m;try{let v;this.enterOuterAlt(s,1);{switch(this.state=283,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,29,this._ctx)){case 1:s=new k_(this,s),this._ctx=s,l=s,this.state=272,this.methodStmt();break;case 2:s=new C_(this,s),this._ctx=s,l=s,this.state=273,m=this._input.LA(1),m===12||m===13?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=274,this.singleExpression(12);break;case 3:s=new O_(this,s),this._ctx=s,l=s,this.state=275,this.match(L.Not),this.state=276,this.singleExpression(11);break;case 4:s=new T_(this,s),this._ctx=s,l=s,this.state=277,this.name();break;case 5:s=new A_(this,s),this._ctx=s,l=s,this.state=278,this.literal();break;case 6:s=new g_(this,s),this._ctx=s,l=s,this.state=279,this.match(L.OpenParen),this.state=280,this.singleExpression(0),this.state=281,this.match(L.CloseParen);break}for(this._ctx.stop=this._input.LT(-1),this.state=316,this._errHandler.sync(this),v=this._interp.adaptivePredict(this._input,31,this._ctx);v!==2&&v!==Or.INVALID_ALT_NUMBER;){if(v===1)switch(this._parseListeners!=null&&this.triggerExitRuleEvent(),l=s,this.state=314,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,30,this._ctx)){case 1:{if(s=new w_(this,new Ve(this,n,r)),this.pushNewRecursionContext(s,h,L.RULE_singleExpression),this.state=285,!this.precpred(this._ctx,10))throw this.createFailedPredicateException("this.precpred(this._ctx, 10)");this.state=286,m=this._input.LA(1),!(m&-32)&&1<<m&114688?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=287,this.singleExpression(11)}break;case 2:{if(s=new b_(this,new Ve(this,n,r)),this.pushNewRecursionContext(s,h,L.RULE_singleExpression),this.state=288,!this.precpred(this._ctx,9))throw this.createFailedPredicateException("this.precpred(this._ctx, 9)");this.state=289,m=this._input.LA(1),m===12||m===13?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=290,this.singleExpression(10)}break;case 3:{if(s=new v_(this,new Ve(this,n,r)),this.pushNewRecursionContext(s,h,L.RULE_singleExpression),this.state=291,!this.precpred(this._ctx,8))throw this.createFailedPredicateException("this.precpred(this._ctx, 8)");this.state=292,m=this._input.LA(1),!(m&-32)&&1<<m&3932160?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=293,this.singleExpression(9)}break;case 4:{if(s=new R_(this,new Ve(this,n,r)),this.pushNewRecursionContext(s,h,L.RULE_singleExpression),this.state=294,!this.precpred(this._ctx,7))throw this.createFailedPredicateException("this.precpred(this._ctx, 7)");this.state=295,m=this._input.LA(1),m===22||m===23?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=296,this.singleExpression(8)}break;case 5:{if(s=new S_(this,new Ve(this,n,r)),this.pushNewRecursionContext(s,h,L.RULE_singleExpression),this.state=297,!this.precpred(this._ctx,6))throw this.createFailedPredicateException("this.precpred(this._ctx, 6)");this.state=298,this.match(L.And),this.state=299,this.singleExpression(7)}break;case 6:{if(s=new x_(this,new Ve(this,n,r)),this.pushNewRecursionContext(s,h,L.RULE_singleExpression),this.state=300,!this.precpred(this._ctx,5))throw this.createFailedPredicateException("this.precpred(this._ctx, 5)");this.state=301,this.match(L.Or),this.state=302,this.singleExpression(6)}break;case 7:{if(s=new E_(this,new Ve(this,n,r)),this.pushNewRecursionContext(s,h,L.RULE_singleExpression),this.state=303,!this.precpred(this._ctx,4))throw this.createFailedPredicateException("this.precpred(this._ctx, 4)");this.state=304,this.match(L.QuestionMark),this.state=305,this.singleExpression(0),this.state=306,this.match(L.Colon),this.state=307,this.singleExpression(4)}break;case 8:{if(s=new D_(this,new Ve(this,n,r)),this.pushNewRecursionContext(s,h,L.RULE_singleExpression),this.state=309,!this.precpred(this._ctx,13))throw this.createFailedPredicateException("this.precpred(this._ctx, 13)");this.state=310,this.match(L.OpenBracket),this.state=311,this.singleExpression(0),this.state=312,this.match(L.CloseBracket)}break}this.state=318,this._errHandler.sync(this),v=this._interp.adaptivePredict(this._input,31,this._ctx)}}}catch(v){if(v instanceof Je)s.exception=v,this._errHandler.reportError(this,v),this._errHandler.recover(this,v);else throw v}finally{this.unrollRecursionContexts(n)}return s}brackethesized(){let e=new ll(this,this._ctx,this.state);this.enterRule(e,36,L.RULE_brackethesized);try{this.enterOuterAlt(e,1),this.state=319,this.match(L.OpenBracket),this.state=320,this.expressionSequence(),this.state=321,this.match(L.CloseBracket)}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}arguments(){let e=new gp(this,this._ctx,this.state);this.enterRule(e,38,L.RULE_arguments);let n;try{let r;this.enterOuterAlt(e,1);{if(this.state=323,this.match(L.OpenParen),this.state=335,this._errHandler.sync(this),n=this._input.LA(1),!(n&-32)&&1<<n&2147496016||!(n-32&-32)&&1<<n-32&130564099){for(this.state=324,this.argument(),this.state=329,this._errHandler.sync(this),r=this._interp.adaptivePredict(this._input,32,this._ctx);r!==2&&r!==Or.INVALID_ALT_NUMBER;)r===1&&(this.state=325,this.match(L.Comma),this.state=326,this.argument()),this.state=331,this._errHandler.sync(this),r=this._interp.adaptivePredict(this._input,32,this._ctx);this.state=333,this._errHandler.sync(this),n=this._input.LA(1),n===8&&(this.state=332,this.match(L.Comma))}this.state=337,this.match(L.CloseParen)}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}argument(){let e=new fl(this,this._ctx,this.state);this.enterRule(e,40,L.RULE_argument);try{this.enterOuterAlt(e,1);{switch(this.state=342,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,35,this._ctx)){case 1:this.state=339,this.identifier(),this.state=340,this.match(L.Assign);break}switch(this.state=346,this._errHandler.sync(this),this._input.LA(1)){case 6:case 12:case 13:case 31:case 32:case 33:case 46:case 51:case 54:case 55:case 56:case 57:case 58:this.state=344,this.singleExpression(0);break;case 4:this.state=345,this.brackethesized();break;default:throw new di(this)}}}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}ifStatement(){let e=new bp(this,this._ctx,this.state);this.enterRule(e,42,L.RULE_ifStatement);let n;try{let r;this.enterOuterAlt(e,1);{for(this.state=348,this.match(L.If),this.state=349,this.singleExpression(0),this.state=350,this.blockLine(),this.state=358,this._errHandler.sync(this),r=this._interp.adaptivePredict(this._input,37,this._ctx);r!==2&&r!==Or.INVALID_ALT_NUMBER;)r===1&&(this.state=351,this.match(L.Else),this.state=352,this.match(L.If),this.state=353,this.singleExpression(0),this.state=354,this.blockLine()),this.state=360,this._errHandler.sync(this),r=this._interp.adaptivePredict(this._input,37,this._ctx);this.state=363,this._errHandler.sync(this),n=this._input.LA(1),n===48&&(this.state=361,this.match(L.Else),this.state=362,this.blockLine())}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}forStatement(){let e=new su(this,this._ctx,this.state);this.enterRule(e,44,L.RULE_forStatement);let n;try{switch(this.state=397,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,43,this._ctx)){case 1:e=new N_(this,e),this.enterOuterAlt(e,1);{switch(this.state=365,this.match(L.For),this.state=367,this._errHandler.sync(this),n=this._input.LA(1),(n===38||n===40)&&(this.state=366,this.varModifier()),this.state=370,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,40,this._ctx)){case 1:this.state=369,this.typeGather();break}this.state=372,this.identifier(),this.state=373,this.match(L.Assign),this.state=374,this.singleExpression(0),this.state=375,this.match(L.To),this.state=376,this.singleExpression(0),this.state=379,this._errHandler.sync(this),n=this._input.LA(1),n===50&&(this.state=377,this.match(L.By),this.state=378,this.singleExpression(0)),this.state=381,this.blockLine()}break;case 2:e=new I_(this,e),this.enterOuterAlt(e,2);{switch(this.state=383,this.match(L.For),this.state=391,this._errHandler.sync(this),this._input.LA(1)){case 51:case 54:case 55:case 58:this.state=384,this.identifier();break;case 4:this.state=385,this.match(L.OpenBracket),this.state=386,this.identifier(),this.state=387,this.match(L.Comma),this.state=388,this.identifier(),this.state=389,this.match(L.CloseBracket);break;default:throw new di(this)}this.state=393,this.match(L.In),this.state=394,this.singleExpression(0),this.state=395,this.blockLine()}break}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}switchStatement(){let e=new vp(this,this._ctx,this.state);this.enterRule(e,46,L.RULE_switchStatement);let n;try{this.enterOuterAlt(e,1);{switch(this.state=399,this.match(L.Switch),this.state=401,this._errHandler.sync(this),n=this._input.LA(1),(!(n&-32)&&1<<n&2147496e3||!(n-32&-32)&&1<<n-32&130564099)&&(this.state=400,this.singleExpression(0)),this.state=403,this.match(L.NEWLINE),this.state=404,this.match(L.INDENT),this.state=417,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,47,this._ctx)){case 1:{this.state=406,this._errHandler.sync(this),n=this._input.LA(1);do this.state=405,this.caseClause(),this.state=408,this._errHandler.sync(this),n=this._input.LA(1);while(!(n&-32)&&1<<n&2147496e3||!(n-32&-32)&&1<<n-32&130564099)}break;case 2:{for(this.state=413,this._errHandler.sync(this),n=this._input.LA(1);!(n&-32)&&1<<n&2147496e3||!(n-32&-32)&&1<<n-32&130564099;)this.state=410,this.caseClause(),this.state=415,this._errHandler.sync(this),n=this._input.LA(1);this.state=416,this.defaultCaluse()}break}this.state=419,this.match(L.DEDENT)}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}caseClause(){let e=new hl(this,this._ctx,this.state);this.enterRule(e,48,L.RULE_caseClause);try{this.enterOuterAlt(e,1),this.state=421,this.singleExpression(0),this.state=422,this.match(L.ARROW),this.state=423,this.block()}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}defaultCaluse(){let e=new Ep(this,this._ctx,this.state);this.enterRule(e,50,L.RULE_defaultCaluse);try{this.enterOuterAlt(e,1),this.state=425,this.match(L.ARROW),this.state=426,this.block()}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}whileStatement(){let e=new Sp(this,this._ctx,this.state);this.enterRule(e,52,L.RULE_whileStatement);try{this.enterOuterAlt(e,1),this.state=428,this.match(L.While),this.state=429,this.singleExpression(0),this.state=430,this.blockLine()}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}importStmt(){let e=new Tp(this,this._ctx,this.state);this.enterRule(e,54,L.RULE_importStmt);let n;try{let r;this.enterOuterAlt(e,1);{for(this.state=432,this.importElement(),this.state=437,this._errHandler.sync(this),r=this._interp.adaptivePredict(this._input,48,this._ctx);r!==2&&r!==Or.INVALID_ALT_NUMBER;)r===1&&(this.state=433,this.match(L.Comma),this.state=434,this.importElement()),this.state=439,this._errHandler.sync(this),r=this._interp.adaptivePredict(this._input,48,this._ctx);this.state=441,this._errHandler.sync(this),n=this._input.LA(1),n===8&&(this.state=440,this.match(L.Comma)),this.state=443,this.match(L.NEWLINE)}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}importElement(){let e=new pl(this,this._ctx,this.state);this.enterRule(e,56,L.RULE_importElement);let n;try{this.enterOuterAlt(e,1),this.state=445,this.match(L.Import),this.state=446,this.identifier(),this.state=447,this.match(L.Divide),this.state=448,this.identifier(),this.state=449,this.match(L.Divide),this.state=450,this.match(L.IntegerLiteral),this.state=453,this._errHandler.sync(this),n=this._input.LA(1),n===53&&(this.state=451,this.match(L.As),this.state=452,this.identifier())}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}literal(){let e=new Ap(this,this._ctx,this.state);this.enterRule(e,58,L.RULE_literal);let n;try{this.enterOuterAlt(e,1),this.state=455,n=this._input.LA(1),!(n-31&-32)&&1<<n-31&100663303?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}methodStmt(){let e=new uu(this,this._ctx,this.state);this.enterRule(e,60,L.RULE_methodStmt);try{let n;for(this.enterOuterAlt(e,1),this.state=457,this.methodElement(),this.state=462,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,51,this._ctx);n!==2&&n!==Or.INVALID_ALT_NUMBER;)n===1&&(this.state=458,this.match(L.Point),this.state=459,this.methodElement()),this.state=464,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,51,this._ctx)}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}methodElement(){let e=new as(this,this._ctx,this.state);this.enterRule(e,62,L.RULE_methodElement);try{this.enterOuterAlt(e,1),this.state=465,this.methodName(),this.state=466,this.arguments()}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}methodName(){let e=new xp(this,this._ctx,this.state);this.enterRule(e,64,L.RULE_methodName);let n;try{let r;this.enterOuterAlt(e,1);{switch(this.state=481,this._errHandler.sync(this),this._input.LA(1)){case 51:case 54:case 55:case 58:for(this.state=473,this._errHandler.sync(this),r=this._interp.adaptivePredict(this._input,52,this._ctx);r!==2&&r!==Or.INVALID_ALT_NUMBER;)r===1&&(this.state=468,this.identifier(),this.state=469,this.match(L.Point)),this.state=475,this._errHandler.sync(this),r=this._interp.adaptivePredict(this._input,52,this._ctx);break;case 6:this.state=476,this.match(L.OpenParen),this.state=477,this.singleExpression(0),this.state=478,this.match(L.CloseParen),this.state=479,this.match(L.Point);break;default:throw new di(this)}this.state=483,this.identifier(),this.state=492,this._errHandler.sync(this),n=this._input.LA(1),n===18&&(this.state=484,this.match(L.LessThan),this.state=485,this.typeName(),this.state=488,this._errHandler.sync(this),n=this._input.LA(1),n===8&&(this.state=486,this.match(L.Comma),this.state=487,this.typeName()),this.state=490,this.match(L.MoreThan))}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}arrowFunction(){let e=new Cp(this,this._ctx,this.state);this.enterRule(e,66,L.RULE_arrowFunction);let n;try{this.enterOuterAlt(e,1),this.state=495,this._errHandler.sync(this),n=this._input.LA(1),n===36&&(this.state=494,this.match(L.Export)),this.state=497,this.identifier(),this.state=498,this.arrowFunctionParameters(),this.state=499,this.match(L.ARROW),this.state=500,this.block()}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}arrowFunctionParameters(){let e=new Op(this,this._ctx,this.state);this.enterRule(e,68,L.RULE_arrowFunctionParameters);let n;try{this.enterOuterAlt(e,1),this.state=502,this.match(L.OpenParen),this.state=504,this._errHandler.sync(this),n=this._input.LA(1),!(n-51&-32)&&1<<n-51&153&&(this.state=503,this.formalParameterList()),this.state=506,this.match(L.CloseParen)}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}formalParameterList(){let e=new dl(this,this._ctx,this.state);this.enterRule(e,70,L.RULE_formalParameterList);let n;try{for(this.enterOuterAlt(e,1),this.state=508,this.formalParameterArg(),this.state=513,this._errHandler.sync(this),n=this._input.LA(1);n===8;)this.state=509,this.match(L.Comma),this.state=510,this.formalParameterArg(),this.state=515,this._errHandler.sync(this),n=this._input.LA(1)}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}formalParameterArg(){let e=new ml(this,this._ctx,this.state);this.enterRule(e,72,L.RULE_formalParameterArg);let n;try{this.enterOuterAlt(e,1);{switch(this.state=517,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,59,this._ctx)){case 1:this.state=516,this.typeGather();break}this.state=519,this.identifier(),this.state=522,this._errHandler.sync(this),n=this._input.LA(1),n===9&&(this.state=520,this.match(L.Assign),this.state=521,this.singleExpression(0))}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}arrowMethod(){let e=new Dp(this,this._ctx,this.state);this.enterRule(e,74,L.RULE_arrowMethod);let n;try{this.enterOuterAlt(e,1),this.state=525,this._errHandler.sync(this),n=this._input.LA(1),n===36&&(this.state=524,this.match(L.Export)),this.state=527,this.match(L.Method),this.state=528,this.identifier(),this.state=529,this.arrowMethodParameters(),this.state=530,this.match(L.ARROW),this.state=531,this.block()}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}arrowMethodParameters(){let e=new kp(this,this._ctx,this.state);this.enterRule(e,76,L.RULE_arrowMethodParameters);let n;try{this.enterOuterAlt(e,1),this.state=533,this.match(L.OpenParen),this.state=534,this.typeGather(),this.state=535,this.identifier(),this.state=538,this._errHandler.sync(this),n=this._input.LA(1),n===9&&(this.state=536,this.match(L.Assign),this.state=537,this.singleExpression(0)),this.state=542,this._errHandler.sync(this),n=this._input.LA(1),n===8&&(this.state=540,this.match(L.Comma),this.state=541,this.formalParameterList()),this.state=544,this.match(L.CloseParen)}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}typeStatement(){let e=new Rp(this,this._ctx,this.state);this.enterRule(e,78,L.RULE_typeStatement);let n;try{this.enterOuterAlt(e,1);{this.state=547,this._errHandler.sync(this),n=this._input.LA(1),n===36&&(this.state=546,this.match(L.Export)),this.state=549,this.match(L.Type),this.state=550,this.identifier(),this.state=551,this.match(L.NEWLINE),this.state=552,this.match(L.INDENT),this.state=554,this._errHandler.sync(this),n=this._input.LA(1);do this.state=553,this.typeElement(),this.state=556,this._errHandler.sync(this),n=this._input.LA(1);while(!(n-40&-32)&&1<<n-40&313345);this.state=558,this.match(L.DEDENT)}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}typeElement(){let e=new _l(this,this._ctx,this.state);this.enterRule(e,80,L.RULE_typeElement);let n;try{this.enterOuterAlt(e,1);{switch(this.state=561,this._errHandler.sync(this),n=this._input.LA(1),n===40&&(this.state=560,this.match(L.Varip)),this.state=564,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,67,this._ctx)){case 1:this.state=563,this.typeGather();break}this.state=566,this.identifier(),this.state=569,this._errHandler.sync(this),n=this._input.LA(1),n===9&&(this.state=567,this.match(L.Assign),this.state=568,this.singleExpression(0)),this.state=571,this.match(L.NEWLINE)}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}assignmentOperator(){let e=new yl(this,this._ctx,this.state);this.enterRule(e,82,L.RULE_assignmentOperator);let n;try{this.enterOuterAlt(e,1),this.state=573,n=this._input.LA(1),!(n&-32)&&1<<n&1593835520?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}typeMap(){let e=new gl(this,this._ctx,this.state);this.enterRule(e,84,L.RULE_typeMap);try{this.enterOuterAlt(e,1),this.state=575,this.match(L.Map),this.state=576,this.match(L.LessThan),this.state=577,this.typeName(),this.state=578,this.match(L.Comma),this.state=579,this.typeName(),this.state=580,this.match(L.MoreThan)}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}typeSeries(){let e=new wp(this,this._ctx,this.state);this.enterRule(e,86,L.RULE_typeSeries);try{switch(this.enterOuterAlt(e,1),this.state=582,this.typeName(),this.state=586,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,69,this._ctx)){case 1:this.state=583,this.typeName();break;case 2:this.state=584,this.typeArray();break;case 3:this.state=585,this.typeMap();break}}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}typeArray(){let e=new bl(this,this._ctx,this.state);this.enterRule(e,88,L.RULE_typeArray);try{switch(this.state=597,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,70,this._ctx)){case 1:this.enterOuterAlt(e,1),this.state=588,this.typeName(),this.state=589,this.match(L.LessThan),this.state=590,this.typeName(),this.state=591,this.match(L.MoreThan);break;case 2:this.enterOuterAlt(e,2),this.state=593,this.typeName(),this.state=594,this.match(L.OpenBracket),this.state=595,this.match(L.CloseBracket);break}}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}typeGather(){let e=new $o(this,this._ctx,this.state);this.enterRule(e,90,L.RULE_typeGather);try{switch(this.state=603,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,71,this._ctx)){case 1:this.enterOuterAlt(e,1),this.state=599,this.typeName();break;case 2:this.enterOuterAlt(e,2),this.state=600,this.typeArray();break;case 3:this.enterOuterAlt(e,3),this.state=601,this.typeMap();break;case 4:this.enterOuterAlt(e,4),this.state=602,this.typeSeries();break}}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}identifier(){let e=new yn(this,this._ctx,this.state);this.enterRule(e,92,L.RULE_identifier);let n;try{this.enterOuterAlt(e,1),this.state=605,n=this._input.LA(1),!(n-51&-32)&&1<<n-51&153?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this)}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}typeName(){let e=new mi(this,this._ctx,this.state);this.enterRule(e,94,L.RULE_typeName);let n;try{this.enterOuterAlt(e,1),this.state=607,this.identifier(),this.state=610,this._errHandler.sync(this),n=this._input.LA(1),n===3&&(this.state=608,this.match(L.Point),this.state=609,this.identifier())}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}name(){let e=new cu(this,this._ctx,this.state);this.enterRule(e,96,L.RULE_name);try{let n;switch(this.state=633,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,76,this._ctx)){case 1:this.enterOuterAlt(e,1);{for(this.state=620,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,74,this._ctx);n!==2&&n!==Or.INVALID_ALT_NUMBER;){if(n===1){switch(this.state=614,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,73,this._ctx)){case 1:this.state=612,this.identifier();break;case 2:this.state=613,this.methodElement();break}this.state=616,this.match(L.Point)}this.state=622,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,74,this._ctx)}this.state=623,this.identifier()}break;case 2:this.enterOuterAlt(e,2);{this.state=624,this.match(L.OpenParen),this.state=625,this.singleExpression(0),this.state=626,this.match(L.CloseParen),this.state=629,this._errHandler.sync(this),n=1;do{switch(n){case 1:this.state=627,this.match(L.Point),this.state=628,this.identifier();break;default:throw new di(this)}this.state=631,this._errHandler.sync(this),n=this._interp.adaptivePredict(this._input,75,this._ctx)}while(n!==2&&n!==Or.INVALID_ALT_NUMBER)}break}}catch(n){if(n instanceof Je)e.exception=n,this._errHandler.reportError(this,n),this._errHandler.recover(this,n);else throw n}finally{this.exitRule()}return e}enumStatement(){let e=new Np(this,this._ctx,this.state);this.enterRule(e,98,L.RULE_enumStatement);let n;try{this.enterOuterAlt(e,1);{this.state=636,this._errHandler.sync(this),n=this._input.LA(1),n===36&&(this.state=635,this.match(L.Export)),this.state=638,this.match(L.Enum),this.state=639,this.identifier(),this.state=640,this.match(L.NEWLINE),this.state=641,this.match(L.INDENT),this.state=643,this._errHandler.sync(this),n=this._input.LA(1);do this.state=642,this.enumElement(),this.state=645,this._errHandler.sync(this),n=this._input.LA(1);while(!(n-51&-32)&&1<<n-51&153);this.state=647,this.match(L.DEDENT)}}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}enumElement(){let e=new vl(this,this._ctx,this.state);this.enterRule(e,100,L.RULE_enumElement);let n;try{this.enterOuterAlt(e,1),this.state=649,this.identifier(),this.state=652,this._errHandler.sync(this),n=this._input.LA(1),n===9&&(this.state=650,this.match(L.Assign),this.state=651,this.match(L.StringLiteral)),this.state=654,this.match(L.NEWLINE)}catch(r){if(r instanceof Je)e.exception=r,this._errHandler.reportError(this,r),this._errHandler.recover(this,r);else throw r}finally{this.exitRule()}return e}sempred(e,n,r){switch(n){case 17:return this.singleExpression_sempred(e,r)}return!0}singleExpression_sempred(e,n){switch(n){case 0:return this.precpred(this._ctx,10);case 1:return this.precpred(this._ctx,9);case 2:return this.precpred(this._ctx,8);case 3:return this.precpred(this._ctx,7);case 4:return this.precpred(this._ctx,6);case 5:return this.precpred(this._ctx,5);case 6:return this.precpred(this._ctx,4);case 7:return this.precpred(this._ctx,13)}return!0}static get _ATN(){return L.__ATN||(L.__ATN=new lp().deserialize(L._serializedATN)),L.__ATN}};k(L,"INDENT",1),k(L,"DEDENT",2),k(L,"Point",3),k(L,"OpenBracket",4),k(L,"CloseBracket",5),k(L,"OpenParen",6),k(L,"CloseParen",7),k(L,"Comma",8),k(L,"Assign",9),k(L,"QuestionMark",10),k(L,"Colon",11),k(L,"Plus",12),k(L,"Minus",13),k(L,"Multiply",14),k(L,"Divide",15),k(L,"Modulus",16),k(L,"Hashtag",17),k(L,"LessThan",18),k(L,"MoreThan",19),k(L,"LessThanEquals",20),k(L,"GreaterThanEquals",21),k(L,"Equals_",22),k(L,"NotEquals",23),k(L,"MultiplyAssign",24),k(L,"DivideAssign",25),k(L,"ModulusAssign",26),k(L,"PlusAssign",27),k(L,"MinusAssign",28),k(L,"ARROW",29),k(L,"ColonEquals",30),k(L,"BooleanLiteral",31),k(L,"IntegerLiteral",32),k(L,"DecimalLiteral",33),k(L,"Break",34),k(L,"And",35),k(L,"Export",36),k(L,"For",37),k(L,"Var",38),k(L,"Continue",39),k(L,"Varip",40),k(L,"Switch",41),k(L,"While",42),k(L,"If",43),k(L,"In",44),k(L,"Or",45),k(L,"Not",46),k(L,"Method",47),k(L,"Else",48),k(L,"To",49),k(L,"By",50),k(L,"Type",51),k(L,"Import",52),k(L,"As",53),k(L,"Enum",54),k(L,"Map",55),k(L,"ColorLiteral",56),k(L,"StringLiteral",57),k(L,"Identifier",58),k(L,"HIDDEN_",59),k(L,"COMMENT_",60),k(L,"NEWLINE",61),k(L,"EOF",pp.EOF),k(L,"RULE_program",0),k(L,"RULE_globalStmt",1),k(L,"RULE_blockStmt",2),k(L,"RULE_stmt",3),k(L,"RULE_simpleStmt",4),k(L,"RULE_flowStmt",5),k(L,"RULE_block",6),k(L,"RULE_blockLine",7),k(L,"RULE_variableDeclarationStmt",8),k(L,"RULE_variableDeclarationList",9),k(L,"RULE_varModifier",10),k(L,"RULE_blockSequence",11),k(L,"RULE_expressionSequence",12),k(L,"RULE_expressionBlockSequence",13),k(L,"RULE_varBlockStmt",14),k(L,"RULE_varArrayDeclaration",15),k(L,"RULE_blockExpression",16),k(L,"RULE_singleExpression",17),k(L,"RULE_brackethesized",18),k(L,"RULE_arguments",19),k(L,"RULE_argument",20),k(L,"RULE_ifStatement",21),k(L,"RULE_forStatement",22),k(L,"RULE_switchStatement",23),k(L,"RULE_caseClause",24),k(L,"RULE_defaultCaluse",25),k(L,"RULE_whileStatement",26),k(L,"RULE_importStmt",27),k(L,"RULE_importElement",28),k(L,"RULE_literal",29),k(L,"RULE_methodStmt",30),k(L,"RULE_methodElement",31),k(L,"RULE_methodName",32),k(L,"RULE_arrowFunction",33),k(L,"RULE_arrowFunctionParameters",34),k(L,"RULE_formalParameterList",35),k(L,"RULE_formalParameterArg",36),k(L,"RULE_arrowMethod",37),k(L,"RULE_arrowMethodParameters",38),k(L,"RULE_typeStatement",39),k(L,"RULE_typeElement",40),k(L,"RULE_assignmentOperator",41),k(L,"RULE_typeMap",42),k(L,"RULE_typeSeries",43),k(L,"RULE_typeArray",44),k(L,"RULE_typeGather",45),k(L,"RULE_identifier",46),k(L,"RULE_typeName",47),k(L,"RULE_name",48),k(L,"RULE_enumStatement",49),k(L,"RULE_enumElement",50),k(L,"literalNames",[null,null,null,"'.'","'['","']'","'('","')'","','","'='","'?'","':'","'+'","'-'","'*'","'/'","'%'","'#'","'<'","'>'","'<='","'>='","'=='","'!='","'*='","'/='","'%='","'+='","'-='","'=>'","':='",null,null,null,"'break'","'and'","'export'","'for'","'var'","'continue'","'varip'","'switch'","'while'","'if'","'in'","'or'","'not'","'method'","'else'","'to'","'by'","'type'","'import'","'as'","'enum'","'map'"]),k(L,"symbolicNames",[null,"INDENT","DEDENT","Point","OpenBracket","CloseBracket","OpenParen","CloseParen","Comma","Assign","QuestionMark","Colon","Plus","Minus","Multiply","Divide","Modulus","Hashtag","LessThan","MoreThan","LessThanEquals","GreaterThanEquals","Equals_","NotEquals","MultiplyAssign","DivideAssign","ModulusAssign","PlusAssign","MinusAssign","ARROW","ColonEquals","BooleanLiteral","IntegerLiteral","DecimalLiteral","Break","And","Export","For","Var","Continue","Varip","Switch","While","If","In","Or","Not","Method","Else","To","By","Type","Import","As","Enum","Map","ColorLiteral","StringLiteral","Identifier","HIDDEN_","COMMENT_","NEWLINE"]),k(L,"ruleNames",["program","globalStmt","blockStmt","stmt","simpleStmt","flowStmt","block","blockLine","variableDeclarationStmt","variableDeclarationList","varModifier","blockSequence","expressionSequence","expressionBlockSequence","varBlockStmt","varArrayDeclaration","blockExpression","singleExpression","brackethesized","arguments","argument","ifStatement","forStatement","switchStatement","caseClause","defaultCaluse","whileStatement","importStmt","importElement","literal","methodStmt","methodElement","methodName","arrowFunction","arrowFunctionParameters","formalParameterList","formalParameterArg","arrowMethod","arrowMethodParameters","typeStatement","typeElement","assignmentOperator","typeMap","typeSeries","typeArray","typeGather","identifier","typeName","name","enumStatement","enumElement"]),k(L,"_serializedATN",[4,1,61,657,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,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,1,0,1,0,5,0,105,8,0,10,0,12,0,108,9,0,1,0,1,0,1,1,1,1,3,1,114,8,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,124,8,1,1,2,1,2,1,2,5,2,129,8,2,10,2,12,2,132,9,2,1,2,1,2,3,2,136,8,2,1,3,1,3,3,3,140,8,3,1,3,1,3,1,3,3,3,145,8,3,1,4,1,4,1,4,1,4,3,4,151,8,4,1,5,1,5,1,6,1,6,3,6,157,8,6,1,6,1,6,1,6,3,6,162,8,6,1,7,1,7,1,7,4,7,167,8,7,11,7,12,7,168,1,7,1,7,1,8,1,8,3,8,175,8,8,1,8,1,8,1,8,3,8,180,8,8,5,8,182,8,8,10,8,12,8,185,9,8,1,9,1,9,1,9,1,9,1,9,1,9,1,9,1,9,3,9,195,8,9,1,10,1,10,1,11,1,11,3,11,201,8,11,1,11,1,11,1,11,3,11,206,8,11,5,11,208,8,11,10,11,12,11,211,9,11,1,12,1,12,1,12,5,12,216,8,12,10,12,12,12,219,9,12,1,13,1,13,3,13,223,8,13,1,13,1,13,5,13,227,8,13,10,13,12,13,230,9,13,1,13,1,13,3,13,234,8,13,1,14,1,14,1,14,1,14,1,14,1,14,3,14,242,8,14,1,14,1,14,1,15,3,15,247,8,15,1,15,3,15,250,8,15,1,15,1,15,1,15,1,15,1,15,5,15,257,8,15,10,15,12,15,260,9,15,1,15,1,15,3,15,264,8,15,1,16,1,16,1,16,1,16,3,16,270,8,16,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,3,17,284,8,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,1,17,5,17,315,8,17,10,17,12,17,318,9,17,1,18,1,18,1,18,1,18,1,19,1,19,1,19,1,19,5,19,328,8,19,10,19,12,19,331,9,19,1,19,3,19,334,8,19,3,19,336,8,19,1,19,1,19,1,20,1,20,1,20,3,20,343,8,20,1,20,1,20,3,20,347,8,20,1,21,1,21,1,21,1,21,1,21,1,21,1,21,1,21,5,21,357,8,21,10,21,12,21,360,9,21,1,21,1,21,3,21,364,8,21,1,22,1,22,3,22,368,8,22,1,22,3,22,371,8,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,3,22,380,8,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,1,22,3,22,392,8,22,1,22,1,22,1,22,1,22,3,22,398,8,22,1,23,1,23,3,23,402,8,23,1,23,1,23,1,23,4,23,407,8,23,11,23,12,23,408,1,23,5,23,412,8,23,10,23,12,23,415,9,23,1,23,3,23,418,8,23,1,23,1,23,1,24,1,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26,1,26,1,27,1,27,1,27,5,27,436,8,27,10,27,12,27,439,9,27,1,27,3,27,442,8,27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,3,28,454,8,28,1,29,1,29,1,30,1,30,1,30,5,30,461,8,30,10,30,12,30,464,9,30,1,31,1,31,1,31,1,32,1,32,1,32,5,32,472,8,32,10,32,12,32,475,9,32,1,32,1,32,1,32,1,32,1,32,3,32,482,8,32,1,32,1,32,1,32,1,32,1,32,3,32,489,8,32,1,32,1,32,3,32,493,8,32,1,33,3,33,496,8,33,1,33,1,33,1,33,1,33,1,33,1,34,1,34,3,34,505,8,34,1,34,1,34,1,35,1,35,1,35,5,35,512,8,35,10,35,12,35,515,9,35,1,36,3,36,518,8,36,1,36,1,36,1,36,3,36,523,8,36,1,37,3,37,526,8,37,1,37,1,37,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,38,1,38,3,38,539,8,38,1,38,1,38,3,38,543,8,38,1,38,1,38,1,39,3,39,548,8,39,1,39,1,39,1,39,1,39,1,39,4,39,555,8,39,11,39,12,39,556,1,39,1,39,1,40,3,40,562,8,40,1,40,3,40,565,8,40,1,40,1,40,1,40,3,40,570,8,40,1,40,1,40,1,41,1,41,1,42,1,42,1,42,1,42,1,42,1,42,1,42,1,43,1,43,1,43,1,43,3,43,587,8,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,44,3,44,598,8,44,1,45,1,45,1,45,1,45,3,45,604,8,45,1,46,1,46,1,47,1,47,1,47,3,47,611,8,47,1,48,1,48,3,48,615,8,48,1,48,1,48,5,48,619,8,48,10,48,12,48,622,9,48,1,48,1,48,1,48,1,48,1,48,1,48,4,48,630,8,48,11,48,12,48,631,3,48,634,8,48,1,49,3,49,637,8,49,1,49,1,49,1,49,1,49,1,49,4,49,644,8,49,11,49,12,49,645,1,49,1,49,1,50,1,50,1,50,3,50,653,8,50,1,50,1,50,1,50,0,1,34,51,0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58,60,62,64,66,68,70,72,74,76,78,80,82,84,86,88,90,92,94,96,98,100,0,9,2,0,34,34,39,39,2,0,38,38,40,40,1,0,12,13,1,0,14,16,1,0,18,21,1,0,22,23,2,0,31,33,56,57,2,0,24,28,30,30,3,0,51,51,54,55,58,58,707,0,106,1,0,0,0,2,123,1,0,0,0,4,130,1,0,0,0,6,144,1,0,0,0,8,150,1,0,0,0,10,152,1,0,0,0,12,161,1,0,0,0,14,163,1,0,0,0,16,174,1,0,0,0,18,194,1,0,0,0,20,196,1,0,0,0,22,200,1,0,0,0,24,212,1,0,0,0,26,228,1,0,0,0,28,241,1,0,0,0,30,263,1,0,0,0,32,269,1,0,0,0,34,283,1,0,0,0,36,319,1,0,0,0,38,323,1,0,0,0,40,342,1,0,0,0,42,348,1,0,0,0,44,397,1,0,0,0,46,399,1,0,0,0,48,421,1,0,0,0,50,425,1,0,0,0,52,428,1,0,0,0,54,432,1,0,0,0,56,445,1,0,0,0,58,455,1,0,0,0,60,457,1,0,0,0,62,465,1,0,0,0,64,481,1,0,0,0,66,495,1,0,0,0,68,502,1,0,0,0,70,508,1,0,0,0,72,517,1,0,0,0,74,525,1,0,0,0,76,533,1,0,0,0,78,547,1,0,0,0,80,561,1,0,0,0,82,573,1,0,0,0,84,575,1,0,0,0,86,582,1,0,0,0,88,597,1,0,0,0,90,603,1,0,0,0,92,605,1,0,0,0,94,607,1,0,0,0,96,633,1,0,0,0,98,636,1,0,0,0,100,649,1,0,0,0,102,105,5,61,0,0,103,105,3,2,1,0,104,102,1,0,0,0,104,103,1,0,0,0,105,108,1,0,0,0,106,104,1,0,0,0,106,107,1,0,0,0,107,109,1,0,0,0,108,106,1,0,0,0,109,110,5,0,0,1,110,1,1,0,0,0,111,113,3,16,8,0,112,114,5,8,0,0,113,112,1,0,0,0,113,114,1,0,0,0,114,115,1,0,0,0,115,116,5,61,0,0,116,124,1,0,0,0,117,124,3,4,2,0,118,124,3,54,27,0,119,124,3,66,33,0,120,124,3,74,37,0,121,124,3,78,39,0,122,124,3,98,49,0,123,111,1,0,0,0,123,117,1,0,0,0,123,118,1,0,0,0,123,119,1,0,0,0,123,120,1,0,0,0,123,121,1,0,0,0,123,122,1,0,0,0,124,3,1,0,0,0,125,126,3,16,8,0,126,127,5,8,0,0,127,129,1,0,0,0,128,125,1,0,0,0,129,132,1,0,0,0,130,128,1,0,0,0,130,131,1,0,0,0,131,135,1,0,0,0,132,130,1,0,0,0,133,136,3,28,14,0,134,136,3,32,16,0,135,133,1,0,0,0,135,134,1,0,0,0,136,5,1,0,0,0,137,139,3,8,4,0,138,140,5,8,0,0,139,138,1,0,0,0,139,140,1,0,0,0,140,141,1,0,0,0,141,142,5,61,0,0,142,145,1,0,0,0,143,145,3,26,13,0,144,137,1,0,0,0,144,143,1,0,0,0,145,7,1,0,0,0,146,151,3,24,12,0,147,151,3,22,11,0,148,151,3,36,18,0,149,151,3,10,5,0,150,146,1,0,0,0,150,147,1,0,0,0,150,148,1,0,0,0,150,149,1,0,0,0,151,9,1,0,0,0,152,153,7,0,0,0,153,11,1,0,0,0,154,156,3,8,4,0,155,157,5,8,0,0,156,155,1,0,0,0,156,157,1,0,0,0,157,158,1,0,0,0,158,159,5,61,0,0,159,162,1,0,0,0,160,162,3,14,7,0,161,154,1,0,0,0,161,160,1,0,0,0,162,13,1,0,0,0,163,164,5,61,0,0,164,166,5,1,0,0,165,167,3,6,3,0,166,165,1,0,0,0,167,168,1,0,0,0,168,166,1,0,0,0,168,169,1,0,0,0,169,170,1,0,0,0,170,171,5,2,0,0,171,15,1,0,0,0,172,175,3,60,30,0,173,175,3,18,9,0,174,172,1,0,0,0,174,173,1,0,0,0,175,183,1,0,0,0,176,179,5,8,0,0,177,180,3,60,30,0,178,180,3,18,9,0,179,177,1,0,0,0,179,178,1,0,0,0,180,182,1,0,0,0,181,176,1,0,0,0,182,185,1,0,0,0,183,181,1,0,0,0,183,184,1,0,0,0,184,17,1,0,0,0,185,183,1,0,0,0,186,187,3,30,15,0,187,188,5,9,0,0,188,189,3,34,17,0,189,195,1,0,0,0,190,191,3,96,48,0,191,192,3,82,41,0,192,193,3,34,17,0,193,195,1,0,0,0,194,186,1,0,0,0,194,190,1,0,0,0,195,19,1,0,0,0,196,197,7,1,0,0,197,21,1,0,0,0,198,201,3,34,17,0,199,201,3,18,9,0,200,198,1,0,0,0,200,199,1,0,0,0,201,209,1,0,0,0,202,205,5,8,0,0,203,206,3,34,17,0,204,206,3,18,9,0,205,203,1,0,0,0,205,204,1,0,0,0,206,208,1,0,0,0,207,202,1,0,0,0,208,211,1,0,0,0,209,207,1,0,0,0,209,210,1,0,0,0,210,23,1,0,0,0,211,209,1,0,0,0,212,217,3,34,17,0,213,214,5,8,0,0,214,216,3,34,17,0,215,213,1,0,0,0,216,219,1,0,0,0,217,215,1,0,0,0,217,218,1,0,0,0,218,25,1,0,0,0,219,217,1,0,0,0,220,223,3,34,17,0,221,223,3,18,9,0,222,220,1,0,0,0,222,221,1,0,0,0,223,224,1,0,0,0,224,225,5,8,0,0,225,227,1,0,0,0,226,222,1,0,0,0,227,230,1,0,0,0,228,226,1,0,0,0,228,229,1,0,0,0,229,233,1,0,0,0,230,228,1,0,0,0,231,234,3,28,14,0,232,234,3,32,16,0,233,231,1,0,0,0,233,232,1,0,0,0,234,27,1,0,0,0,235,236,3,30,15,0,236,237,5,9,0,0,237,242,1,0,0,0,238,239,3,96,48,0,239,240,3,82,41,0,240,242,1,0,0,0,241,235,1,0,0,0,241,238,1,0,0,0,242,243,1,0,0,0,243,244,3,32,16,0,244,29,1,0,0,0,245,247,3,20,10,0,246,245,1,0,0,0,246,247,1,0,0,0,247,249,1,0,0,0,248,250,3,90,45,0,249,248,1,0,0,0,249,250,1,0,0,0,250,251,1,0,0,0,251,264,3,92,46,0,252,253,5,4,0,0,253,258,3,92,46,0,254,255,5,8,0,0,255,257,3,92,46,0,256,254,1,0,0,0,257,260,1,0,0,0,258,256,1,0,0,0,258,259,1,0,0,0,259,261,1,0,0,0,260,258,1,0,0,0,261,262,5,5,0,0,262,264,1,0,0,0,263,246,1,0,0,0,263,252,1,0,0,0,264,31,1,0,0,0,265,270,3,42,21,0,266,270,3,44,22,0,267,270,3,52,26,0,268,270,3,46,23,0,269,265,1,0,0,0,269,266,1,0,0,0,269,267,1,0,0,0,269,268,1,0,0,0,270,33,1,0,0,0,271,272,6,17,-1,0,272,284,3,60,30,0,273,274,7,2,0,0,274,284,3,34,17,12,275,276,5,46,0,0,276,284,3,34,17,11,277,284,3,96,48,0,278,284,3,58,29,0,279,280,5,6,0,0,280,281,3,34,17,0,281,282,5,7,0,0,282,284,1,0,0,0,283,271,1,0,0,0,283,273,1,0,0,0,283,275,1,0,0,0,283,277,1,0,0,0,283,278,1,0,0,0,283,279,1,0,0,0,284,316,1,0,0,0,285,286,10,10,0,0,286,287,7,3,0,0,287,315,3,34,17,11,288,289,10,9,0,0,289,290,7,2,0,0,290,315,3,34,17,10,291,292,10,8,0,0,292,293,7,4,0,0,293,315,3,34,17,9,294,295,10,7,0,0,295,296,7,5,0,0,296,315,3,34,17,8,297,298,10,6,0,0,298,299,5,35,0,0,299,315,3,34,17,7,300,301,10,5,0,0,301,302,5,45,0,0,302,315,3,34,17,6,303,304,10,4,0,0,304,305,5,10,0,0,305,306,3,34,17,0,306,307,5,11,0,0,307,308,3,34,17,4,308,315,1,0,0,0,309,310,10,13,0,0,310,311,5,4,0,0,311,312,3,34,17,0,312,313,5,5,0,0,313,315,1,0,0,0,314,285,1,0,0,0,314,288,1,0,0,0,314,291,1,0,0,0,314,294,1,0,0,0,314,297,1,0,0,0,314,300,1,0,0,0,314,303,1,0,0,0,314,309,1,0,0,0,315,318,1,0,0,0,316,314,1,0,0,0,316,317,1,0,0,0,317,35,1,0,0,0,318,316,1,0,0,0,319,320,5,4,0,0,320,321,3,24,12,0,321,322,5,5,0,0,322,37,1,0,0,0,323,335,5,6,0,0,324,329,3,40,20,0,325,326,5,8,0,0,326,328,3,40,20,0,327,325,1,0,0,0,328,331,1,0,0,0,329,327,1,0,0,0,329,330,1,0,0,0,330,333,1,0,0,0,331,329,1,0,0,0,332,334,5,8,0,0,333,332,1,0,0,0,333,334,1,0,0,0,334,336,1,0,0,0,335,324,1,0,0,0,335,336,1,0,0,0,336,337,1,0,0,0,337,338,5,7,0,0,338,39,1,0,0,0,339,340,3,92,46,0,340,341,5,9,0,0,341,343,1,0,0,0,342,339,1,0,0,0,342,343,1,0,0,0,343,346,1,0,0,0,344,347,3,34,17,0,345,347,3,36,18,0,346,344,1,0,0,0,346,345,1,0,0,0,347,41,1,0,0,0,348,349,5,43,0,0,349,350,3,34,17,0,350,358,3,14,7,0,351,352,5,48,0,0,352,353,5,43,0,0,353,354,3,34,17,0,354,355,3,14,7,0,355,357,1,0,0,0,356,351,1,0,0,0,357,360,1,0,0,0,358,356,1,0,0,0,358,359,1,0,0,0,359,363,1,0,0,0,360,358,1,0,0,0,361,362,5,48,0,0,362,364,3,14,7,0,363,361,1,0,0,0,363,364,1,0,0,0,364,43,1,0,0,0,365,367,5,37,0,0,366,368,3,20,10,0,367,366,1,0,0,0,367,368,1,0,0,0,368,370,1,0,0,0,369,371,3,90,45,0,370,369,1,0,0,0,370,371,1,0,0,0,371,372,1,0,0,0,372,373,3,92,46,0,373,374,5,9,0,0,374,375,3,34,17,0,375,376,5,49,0,0,376,379,3,34,17,0,377,378,5,50,0,0,378,380,3,34,17,0,379,377,1,0,0,0,379,380,1,0,0,0,380,381,1,0,0,0,381,382,3,14,7,0,382,398,1,0,0,0,383,391,5,37,0,0,384,392,3,92,46,0,385,386,5,4,0,0,386,387,3,92,46,0,387,388,5,8,0,0,388,389,3,92,46,0,389,390,5,5,0,0,390,392,1,0,0,0,391,384,1,0,0,0,391,385,1,0,0,0,392,393,1,0,0,0,393,394,5,44,0,0,394,395,3,34,17,0,395,396,3,14,7,0,396,398,1,0,0,0,397,365,1,0,0,0,397,383,1,0,0,0,398,45,1,0,0,0,399,401,5,41,0,0,400,402,3,34,17,0,401,400,1,0,0,0,401,402,1,0,0,0,402,403,1,0,0,0,403,404,5,61,0,0,404,417,5,1,0,0,405,407,3,48,24,0,406,405,1,0,0,0,407,408,1,0,0,0,408,406,1,0,0,0,408,409,1,0,0,0,409,418,1,0,0,0,410,412,3,48,24,0,411,410,1,0,0,0,412,415,1,0,0,0,413,411,1,0,0,0,413,414,1,0,0,0,414,416,1,0,0,0,415,413,1,0,0,0,416,418,3,50,25,0,417,406,1,0,0,0,417,413,1,0,0,0,418,419,1,0,0,0,419,420,5,2,0,0,420,47,1,0,0,0,421,422,3,34,17,0,422,423,5,29,0,0,423,424,3,12,6,0,424,49,1,0,0,0,425,426,5,29,0,0,426,427,3,12,6,0,427,51,1,0,0,0,428,429,5,42,0,0,429,430,3,34,17,0,430,431,3,14,7,0,431,53,1,0,0,0,432,437,3,56,28,0,433,434,5,8,0,0,434,436,3,56,28,0,435,433,1,0,0,0,436,439,1,0,0,0,437,435,1,0,0,0,437,438,1,0,0,0,438,441,1,0,0,0,439,437,1,0,0,0,440,442,5,8,0,0,441,440,1,0,0,0,441,442,1,0,0,0,442,443,1,0,0,0,443,444,5,61,0,0,444,55,1,0,0,0,445,446,5,52,0,0,446,447,3,92,46,0,447,448,5,15,0,0,448,449,3,92,46,0,449,450,5,15,0,0,450,453,5,32,0,0,451,452,5,53,0,0,452,454,3,92,46,0,453,451,1,0,0,0,453,454,1,0,0,0,454,57,1,0,0,0,455,456,7,6,0,0,456,59,1,0,0,0,457,462,3,62,31,0,458,459,5,3,0,0,459,461,3,62,31,0,460,458,1,0,0,0,461,464,1,0,0,0,462,460,1,0,0,0,462,463,1,0,0,0,463,61,1,0,0,0,464,462,1,0,0,0,465,466,3,64,32,0,466,467,3,38,19,0,467,63,1,0,0,0,468,469,3,92,46,0,469,470,5,3,0,0,470,472,1,0,0,0,471,468,1,0,0,0,472,475,1,0,0,0,473,471,1,0,0,0,473,474,1,0,0,0,474,482,1,0,0,0,475,473,1,0,0,0,476,477,5,6,0,0,477,478,3,34,17,0,478,479,5,7,0,0,479,480,5,3,0,0,480,482,1,0,0,0,481,473,1,0,0,0,481,476,1,0,0,0,482,483,1,0,0,0,483,492,3,92,46,0,484,485,5,18,0,0,485,488,3,94,47,0,486,487,5,8,0,0,487,489,3,94,47,0,488,486,1,0,0,0,488,489,1,0,0,0,489,490,1,0,0,0,490,491,5,19,0,0,491,493,1,0,0,0,492,484,1,0,0,0,492,493,1,0,0,0,493,65,1,0,0,0,494,496,5,36,0,0,495,494,1,0,0,0,495,496,1,0,0,0,496,497,1,0,0,0,497,498,3,92,46,0,498,499,3,68,34,0,499,500,5,29,0,0,500,501,3,12,6,0,501,67,1,0,0,0,502,504,5,6,0,0,503,505,3,70,35,0,504,503,1,0,0,0,504,505,1,0,0,0,505,506,1,0,0,0,506,507,5,7,0,0,507,69,1,0,0,0,508,513,3,72,36,0,509,510,5,8,0,0,510,512,3,72,36,0,511,509,1,0,0,0,512,515,1,0,0,0,513,511,1,0,0,0,513,514,1,0,0,0,514,71,1,0,0,0,515,513,1,0,0,0,516,518,3,90,45,0,517,516,1,0,0,0,517,518,1,0,0,0,518,519,1,0,0,0,519,522,3,92,46,0,520,521,5,9,0,0,521,523,3,34,17,0,522,520,1,0,0,0,522,523,1,0,0,0,523,73,1,0,0,0,524,526,5,36,0,0,525,524,1,0,0,0,525,526,1,0,0,0,526,527,1,0,0,0,527,528,5,47,0,0,528,529,3,92,46,0,529,530,3,76,38,0,530,531,5,29,0,0,531,532,3,12,6,0,532,75,1,0,0,0,533,534,5,6,0,0,534,535,3,90,45,0,535,538,3,92,46,0,536,537,5,9,0,0,537,539,3,34,17,0,538,536,1,0,0,0,538,539,1,0,0,0,539,542,1,0,0,0,540,541,5,8,0,0,541,543,3,70,35,0,542,540,1,0,0,0,542,543,1,0,0,0,543,544,1,0,0,0,544,545,5,7,0,0,545,77,1,0,0,0,546,548,5,36,0,0,547,546,1,0,0,0,547,548,1,0,0,0,548,549,1,0,0,0,549,550,5,51,0,0,550,551,3,92,46,0,551,552,5,61,0,0,552,554,5,1,0,0,553,555,3,80,40,0,554,553,1,0,0,0,555,556,1,0,0,0,556,554,1,0,0,0,556,557,1,0,0,0,557,558,1,0,0,0,558,559,5,2,0,0,559,79,1,0,0,0,560,562,5,40,0,0,561,560,1,0,0,0,561,562,1,0,0,0,562,564,1,0,0,0,563,565,3,90,45,0,564,563,1,0,0,0,564,565,1,0,0,0,565,566,1,0,0,0,566,569,3,92,46,0,567,568,5,9,0,0,568,570,3,34,17,0,569,567,1,0,0,0,569,570,1,0,0,0,570,571,1,0,0,0,571,572,5,61,0,0,572,81,1,0,0,0,573,574,7,7,0,0,574,83,1,0,0,0,575,576,5,55,0,0,576,577,5,18,0,0,577,578,3,94,47,0,578,579,5,8,0,0,579,580,3,94,47,0,580,581,5,19,0,0,581,85,1,0,0,0,582,586,3,94,47,0,583,587,3,94,47,0,584,587,3,88,44,0,585,587,3,84,42,0,586,583,1,0,0,0,586,584,1,0,0,0,586,585,1,0,0,0,587,87,1,0,0,0,588,589,3,94,47,0,589,590,5,18,0,0,590,591,3,94,47,0,591,592,5,19,0,0,592,598,1,0,0,0,593,594,3,94,47,0,594,595,5,4,0,0,595,596,5,5,0,0,596,598,1,0,0,0,597,588,1,0,0,0,597,593,1,0,0,0,598,89,1,0,0,0,599,604,3,94,47,0,600,604,3,88,44,0,601,604,3,84,42,0,602,604,3,86,43,0,603,599,1,0,0,0,603,600,1,0,0,0,603,601,1,0,0,0,603,602,1,0,0,0,604,91,1,0,0,0,605,606,7,8,0,0,606,93,1,0,0,0,607,610,3,92,46,0,608,609,5,3,0,0,609,611,3,92,46,0,610,608,1,0,0,0,610,611,1,0,0,0,611,95,1,0,0,0,612,615,3,92,46,0,613,615,3,62,31,0,614,612,1,0,0,0,614,613,1,0,0,0,615,616,1,0,0,0,616,617,5,3,0,0,617,619,1,0,0,0,618,614,1,0,0,0,619,622,1,0,0,0,620,618,1,0,0,0,620,621,1,0,0,0,621,623,1,0,0,0,622,620,1,0,0,0,623,634,3,92,46,0,624,625,5,6,0,0,625,626,3,34,17,0,626,629,5,7,0,0,627,628,5,3,0,0,628,630,3,92,46,0,629,627,1,0,0,0,630,631,1,0,0,0,631,629,1,0,0,0,631,632,1,0,0,0,632,634,1,0,0,0,633,620,1,0,0,0,633,624,1,0,0,0,634,97,1,0,0,0,635,637,5,36,0,0,636,635,1,0,0,0,636,637,1,0,0,0,637,638,1,0,0,0,638,639,5,54,0,0,639,640,3,92,46,0,640,641,5,61,0,0,641,643,5,1,0,0,642,644,3,100,50,0,643,642,1,0,0,0,644,645,1,0,0,0,645,643,1,0,0,0,645,646,1,0,0,0,646,647,1,0,0,0,647,648,5,2,0,0,648,99,1,0,0,0,649,652,3,92,46,0,650,651,5,9,0,0,651,653,5,57,0,0,652,650,1,0,0,0,652,653,1,0,0,0,653,654,1,0,0,0,654,655,5,61,0,0,655,101,1,0,0,0,80,104,106,113,123,130,135,139,144,150,156,161,168,174,179,183,194,200,205,209,217,222,228,233,241,246,249,258,263,269,283,314,316,329,333,335,342,346,358,363,367,370,379,391,397,401,408,413,417,437,441,453,462,473,481,488,492,495,504,513,517,522,525,538,542,547,556,561,564,569,586,597,603,610,614,620,631,633,636,645,652]),k(L,"__ATN"),k(L,"DecisionsToDFA",L._ATN.decisionToState.map((e,n)=>new fp(e,n)));let F=L;class p_ extends Ye{constructor(e,n,r){super(n,r),this.parser=e}EOF(){return this.getToken(F.EOF,0)}NEWLINE_list(){return this.getTokens(F.NEWLINE)}NEWLINE(e){return this.getToken(F.NEWLINE,e)}globalStmt_list(){return this.getTypedRuleContexts(il)}globalStmt(e){return this.getTypedRuleContext(il,e)}get ruleIndex(){return F.RULE_program}accept(e){return e.visitProgram?e.visitProgram(this):e.visitChildren(this)}}class il extends Ye{constructor(e,n,r){super(n,r),this.parser=e}variableDeclarationStmt(){return this.getTypedRuleContext(ou,0)}NEWLINE(){return this.getToken(F.NEWLINE,0)}Comma(){return this.getToken(F.Comma,0)}blockStmt(){return this.getTypedRuleContext(dp,0)}importStmt(){return this.getTypedRuleContext(Tp,0)}arrowFunction(){return this.getTypedRuleContext(Cp,0)}arrowMethod(){return this.getTypedRuleContext(Dp,0)}typeStatement(){return this.getTypedRuleContext(Rp,0)}enumStatement(){return this.getTypedRuleContext(Np,0)}get ruleIndex(){return F.RULE_globalStmt}accept(e){return e.visitGlobalStmt?e.visitGlobalStmt(this):e.visitChildren(this)}}class dp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}varBlockStmt(){return this.getTypedRuleContext(cl,0)}blockExpression(){return this.getTypedRuleContext(au,0)}variableDeclarationStmt_list(){return this.getTypedRuleContexts(ou)}variableDeclarationStmt(e){return this.getTypedRuleContext(ou,e)}Comma_list(){return this.getTokens(F.Comma)}Comma(e){return this.getToken(F.Comma,e)}get ruleIndex(){return F.RULE_blockStmt}accept(e){return e.visitBlockStmt?e.visitBlockStmt(this):e.visitChildren(this)}}class ol extends Ye{constructor(e,n,r){super(n,r),this.parser=e}simpleStmt(){return this.getTypedRuleContext(al,0)}NEWLINE(){return this.getToken(F.NEWLINE,0)}Comma(){return this.getToken(F.Comma,0)}expressionBlockSequence(){return this.getTypedRuleContext(yp,0)}get ruleIndex(){return F.RULE_stmt}accept(e){return e.visitStmt?e.visitStmt(this):e.visitChildren(this)}}class al extends Ye{constructor(e,n,r){super(n,r),this.parser=e}expressionSequence(){return this.getTypedRuleContext(ul,0)}blockSequence(){return this.getTypedRuleContext(_p,0)}brackethesized(){return this.getTypedRuleContext(ll,0)}flowStmt(){return this.getTypedRuleContext(mp,0)}get ruleIndex(){return F.RULE_simpleStmt}accept(e){return e.visitSimpleStmt?e.visitSimpleStmt(this):e.visitChildren(this)}}class mp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}Break(){return this.getToken(F.Break,0)}Continue(){return this.getToken(F.Continue,0)}get ruleIndex(){return F.RULE_flowStmt}accept(e){return e.visitFlowStmt?e.visitFlowStmt(this):e.visitChildren(this)}}class is extends Ye{constructor(e,n,r){super(n,r),this.parser=e}simpleStmt(){return this.getTypedRuleContext(al,0)}NEWLINE(){return this.getToken(F.NEWLINE,0)}Comma(){return this.getToken(F.Comma,0)}blockLine(){return this.getTypedRuleContext(mo,0)}get ruleIndex(){return F.RULE_block}accept(e){return e.visitBlock?e.visitBlock(this):e.visitChildren(this)}}class mo extends Ye{constructor(e,n,r){super(n,r),this.parser=e}NEWLINE(){return this.getToken(F.NEWLINE,0)}INDENT(){return this.getToken(F.INDENT,0)}DEDENT(){return this.getToken(F.DEDENT,0)}stmt_list(){return this.getTypedRuleContexts(ol)}stmt(e){return this.getTypedRuleContext(ol,e)}get ruleIndex(){return F.RULE_blockLine}accept(e){return e.visitBlockLine?e.visitBlockLine(this):e.visitChildren(this)}}class ou extends Ye{constructor(e,n,r){super(n,r),this.parser=e}methodStmt_list(){return this.getTypedRuleContexts(uu)}methodStmt(e){return this.getTypedRuleContext(uu,e)}variableDeclarationList_list(){return this.getTypedRuleContexts(Ni)}variableDeclarationList(e){return this.getTypedRuleContext(Ni,e)}Comma_list(){return this.getTokens(F.Comma)}Comma(e){return this.getToken(F.Comma,e)}get ruleIndex(){return F.RULE_variableDeclarationStmt}accept(e){return e.visitVariableDeclarationStmt?e.visitVariableDeclarationStmt(this):e.visitChildren(this)}}class Ni extends Ye{constructor(e,n,r){super(n,r),this.parser=e}get ruleIndex(){return F.RULE_variableDeclarationList}copyFrom(e){super.copyFrom(e)}}class d_ extends Ni{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}name(){return this.getTypedRuleContext(cu,0)}assignmentOperator(){return this.getTypedRuleContext(yl,0)}singleExpression(){return this.getTypedRuleContext(Ve,0)}accept(e){return e.visitAgainAssign?e.visitAgainAssign(this):e.visitChildren(this)}}class m_ extends Ni{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}varArrayDeclaration(){return this.getTypedRuleContext(os,0)}Assign(){return this.getToken(F.Assign,0)}singleExpression(){return this.getTypedRuleContext(Ve,0)}accept(e){return e.visitDeclareAssign?e.visitDeclareAssign(this):e.visitChildren(this)}}class sl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}Var(){return this.getToken(F.Var,0)}Varip(){return this.getToken(F.Varip,0)}get ruleIndex(){return F.RULE_varModifier}accept(e){return e.visitVarModifier?e.visitVarModifier(this):e.visitChildren(this)}}class _p extends Ye{constructor(e,n,r){super(n,r),this.parser=e}singleExpression_list(){return this.getTypedRuleContexts(Ve)}singleExpression(e){return this.getTypedRuleContext(Ve,e)}variableDeclarationList_list(){return this.getTypedRuleContexts(Ni)}variableDeclarationList(e){return this.getTypedRuleContext(Ni,e)}Comma_list(){return this.getTokens(F.Comma)}Comma(e){return this.getToken(F.Comma,e)}get ruleIndex(){return F.RULE_blockSequence}accept(e){return e.visitBlockSequence?e.visitBlockSequence(this):e.visitChildren(this)}}class ul extends Ye{constructor(e,n,r){super(n,r),this.parser=e}singleExpression_list(){return this.getTypedRuleContexts(Ve)}singleExpression(e){return this.getTypedRuleContext(Ve,e)}Comma_list(){return this.getTokens(F.Comma)}Comma(e){return this.getToken(F.Comma,e)}get ruleIndex(){return F.RULE_expressionSequence}accept(e){return e.visitExpressionSequence?e.visitExpressionSequence(this):e.visitChildren(this)}}class yp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}varBlockStmt(){return this.getTypedRuleContext(cl,0)}blockExpression(){return this.getTypedRuleContext(au,0)}Comma_list(){return this.getTokens(F.Comma)}Comma(e){return this.getToken(F.Comma,e)}singleExpression_list(){return this.getTypedRuleContexts(Ve)}singleExpression(e){return this.getTypedRuleContext(Ve,e)}variableDeclarationList_list(){return this.getTypedRuleContexts(Ni)}variableDeclarationList(e){return this.getTypedRuleContext(Ni,e)}get ruleIndex(){return F.RULE_expressionBlockSequence}accept(e){return e.visitExpressionBlockSequence?e.visitExpressionBlockSequence(this):e.visitChildren(this)}}class cl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}blockExpression(){return this.getTypedRuleContext(au,0)}varArrayDeclaration(){return this.getTypedRuleContext(os,0)}Assign(){return this.getToken(F.Assign,0)}name(){return this.getTypedRuleContext(cu,0)}assignmentOperator(){return this.getTypedRuleContext(yl,0)}get ruleIndex(){return F.RULE_varBlockStmt}accept(e){return e.visitVarBlockStmt?e.visitVarBlockStmt(this):e.visitChildren(this)}}class os extends Ye{constructor(e,n,r){super(n,r),this.parser=e}get ruleIndex(){return F.RULE_varArrayDeclaration}copyFrom(e){super.copyFrom(e)}}class __ extends os{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}OpenBracket(){return this.getToken(F.OpenBracket,0)}identifier_list(){return this.getTypedRuleContexts(yn)}identifier(e){return this.getTypedRuleContext(yn,e)}CloseBracket(){return this.getToken(F.CloseBracket,0)}Comma_list(){return this.getTokens(F.Comma)}Comma(e){return this.getToken(F.Comma,e)}accept(e){return e.visitVarMultiple?e.visitVarMultiple(this):e.visitChildren(this)}}class y_ extends os{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}identifier(){return this.getTypedRuleContext(yn,0)}varModifier(){return this.getTypedRuleContext(sl,0)}typeGather(){return this.getTypedRuleContext($o,0)}accept(e){return e.visitVarSingle?e.visitVarSingle(this):e.visitChildren(this)}}class au extends Ye{constructor(e,n,r){super(n,r),this.parser=e}ifStatement(){return this.getTypedRuleContext(bp,0)}forStatement(){return this.getTypedRuleContext(su,0)}whileStatement(){return this.getTypedRuleContext(Sp,0)}switchStatement(){return this.getTypedRuleContext(vp,0)}get ruleIndex(){return F.RULE_blockExpression}accept(e){return e.visitBlockExpression?e.visitBlockExpression(this):e.visitChildren(this)}}class Ve extends Ye{constructor(e,n,r){super(n,r),this.parser=e}get ruleIndex(){return F.RULE_singleExpression}copyFrom(e){super.copyFrom(e)}}class g_ extends Ve{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}OpenParen(){return this.getToken(F.OpenParen,0)}singleExpression(){return this.getTypedRuleContext(Ve,0)}CloseParen(){return this.getToken(F.CloseParen,0)}accept(e){return e.visitParenthesizedExpression?e.visitParenthesizedExpression(this):e.visitChildren(this)}}class b_ extends Ve{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(Ve)}singleExpression(e){return this.getTypedRuleContext(Ve,e)}Plus(){return this.getToken(F.Plus,0)}Minus(){return this.getToken(F.Minus,0)}accept(e){return e.visitAdditiveExpression?e.visitAdditiveExpression(this):e.visitChildren(this)}}class v_ extends Ve{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(Ve)}singleExpression(e){return this.getTypedRuleContext(Ve,e)}LessThan(){return this.getToken(F.LessThan,0)}MoreThan(){return this.getToken(F.MoreThan,0)}LessThanEquals(){return this.getToken(F.LessThanEquals,0)}GreaterThanEquals(){return this.getToken(F.GreaterThanEquals,0)}accept(e){return e.visitRelationalExpression?e.visitRelationalExpression(this):e.visitChildren(this)}}class E_ extends Ve{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(Ve)}singleExpression(e){return this.getTypedRuleContext(Ve,e)}QuestionMark(){return this.getToken(F.QuestionMark,0)}Colon(){return this.getToken(F.Colon,0)}accept(e){return e.visitTernaryExpression?e.visitTernaryExpression(this):e.visitChildren(this)}}class S_ extends Ve{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(Ve)}singleExpression(e){return this.getTypedRuleContext(Ve,e)}And(){return this.getToken(F.And,0)}accept(e){return e.visitLogicalAndExpression?e.visitLogicalAndExpression(this):e.visitChildren(this)}}class T_ extends Ve{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}name(){return this.getTypedRuleContext(cu,0)}accept(e){return e.visitNameExpression?e.visitNameExpression(this):e.visitChildren(this)}}class A_ extends Ve{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}literal(){return this.getTypedRuleContext(Ap,0)}accept(e){return e.visitLiteralExpression?e.visitLiteralExpression(this):e.visitChildren(this)}}class x_ extends Ve{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(Ve)}singleExpression(e){return this.getTypedRuleContext(Ve,e)}Or(){return this.getToken(F.Or,0)}accept(e){return e.visitLogicalOrExpression?e.visitLogicalOrExpression(this):e.visitChildren(this)}}class C_ extends Ve{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression(){return this.getTypedRuleContext(Ve,0)}Minus(){return this.getToken(F.Minus,0)}Plus(){return this.getToken(F.Plus,0)}accept(e){return e.visitUnaryExpression?e.visitUnaryExpression(this):e.visitChildren(this)}}class O_ extends Ve{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}Not(){return this.getToken(F.Not,0)}singleExpression(){return this.getTypedRuleContext(Ve,0)}accept(e){return e.visitNotExpression?e.visitNotExpression(this):e.visitChildren(this)}}class D_ extends Ve{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(Ve)}singleExpression(e){return this.getTypedRuleContext(Ve,e)}OpenBracket(){return this.getToken(F.OpenBracket,0)}CloseBracket(){return this.getToken(F.CloseBracket,0)}accept(e){return e.visitMemberIndexExpression?e.visitMemberIndexExpression(this):e.visitChildren(this)}}class k_ extends Ve{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}methodStmt(){return this.getTypedRuleContext(uu,0)}accept(e){return e.visitMethodExpression?e.visitMethodExpression(this):e.visitChildren(this)}}class R_ extends Ve{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(Ve)}singleExpression(e){return this.getTypedRuleContext(Ve,e)}Equals_(){return this.getToken(F.Equals_,0)}NotEquals(){return this.getToken(F.NotEquals,0)}accept(e){return e.visitEqualityExpression?e.visitEqualityExpression(this):e.visitChildren(this)}}class w_ extends Ve{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts(Ve)}singleExpression(e){return this.getTypedRuleContext(Ve,e)}Multiply(){return this.getToken(F.Multiply,0)}Divide(){return this.getToken(F.Divide,0)}Modulus(){return this.getToken(F.Modulus,0)}accept(e){return e.visitMultiplicativeExpression?e.visitMultiplicativeExpression(this):e.visitChildren(this)}}class ll extends Ye{constructor(e,n,r){super(n,r),this.parser=e}OpenBracket(){return this.getToken(F.OpenBracket,0)}expressionSequence(){return this.getTypedRuleContext(ul,0)}CloseBracket(){return this.getToken(F.CloseBracket,0)}get ruleIndex(){return F.RULE_brackethesized}accept(e){return e.visitBrackethesized?e.visitBrackethesized(this):e.visitChildren(this)}}class gp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}OpenParen(){return this.getToken(F.OpenParen,0)}CloseParen(){return this.getToken(F.CloseParen,0)}argument_list(){return this.getTypedRuleContexts(fl)}argument(e){return this.getTypedRuleContext(fl,e)}Comma_list(){return this.getTokens(F.Comma)}Comma(e){return this.getToken(F.Comma,e)}get ruleIndex(){return F.RULE_arguments}accept(e){return e.visitArguments?e.visitArguments(this):e.visitChildren(this)}}class fl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}singleExpression(){return this.getTypedRuleContext(Ve,0)}brackethesized(){return this.getTypedRuleContext(ll,0)}identifier(){return this.getTypedRuleContext(yn,0)}Assign(){return this.getToken(F.Assign,0)}get ruleIndex(){return F.RULE_argument}accept(e){return e.visitArgument?e.visitArgument(this):e.visitChildren(this)}}class bp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}If_list(){return this.getTokens(F.If)}If(e){return this.getToken(F.If,e)}singleExpression_list(){return this.getTypedRuleContexts(Ve)}singleExpression(e){return this.getTypedRuleContext(Ve,e)}blockLine_list(){return this.getTypedRuleContexts(mo)}blockLine(e){return this.getTypedRuleContext(mo,e)}Else_list(){return this.getTokens(F.Else)}Else(e){return this.getToken(F.Else,e)}get ruleIndex(){return F.RULE_ifStatement}accept(e){return e.visitIfStatement?e.visitIfStatement(this):e.visitChildren(this)}}class su extends Ye{constructor(e,n,r){super(n,r),this.parser=e}get ruleIndex(){return F.RULE_forStatement}copyFrom(e){super.copyFrom(e)}}class N_ extends su{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}For(){return this.getToken(F.For,0)}identifier(){return this.getTypedRuleContext(yn,0)}Assign(){return this.getToken(F.Assign,0)}singleExpression_list(){return this.getTypedRuleContexts(Ve)}singleExpression(e){return this.getTypedRuleContext(Ve,e)}To(){return this.getToken(F.To,0)}blockLine(){return this.getTypedRuleContext(mo,0)}varModifier(){return this.getTypedRuleContext(sl,0)}typeGather(){return this.getTypedRuleContext($o,0)}By(){return this.getToken(F.By,0)}accept(e){return e.visitForToStatement?e.visitForToStatement(this):e.visitChildren(this)}}class I_ extends su{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}For(){return this.getToken(F.For,0)}In(){return this.getToken(F.In,0)}singleExpression(){return this.getTypedRuleContext(Ve,0)}blockLine(){return this.getTypedRuleContext(mo,0)}identifier_list(){return this.getTypedRuleContexts(yn)}identifier(e){return this.getTypedRuleContext(yn,e)}OpenBracket(){return this.getToken(F.OpenBracket,0)}Comma(){return this.getToken(F.Comma,0)}CloseBracket(){return this.getToken(F.CloseBracket,0)}accept(e){return e.visitForInStatement?e.visitForInStatement(this):e.visitChildren(this)}}class vp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}Switch(){return this.getToken(F.Switch,0)}NEWLINE(){return this.getToken(F.NEWLINE,0)}INDENT(){return this.getToken(F.INDENT,0)}DEDENT(){return this.getToken(F.DEDENT,0)}singleExpression(){return this.getTypedRuleContext(Ve,0)}defaultCaluse(){return this.getTypedRuleContext(Ep,0)}caseClause_list(){return this.getTypedRuleContexts(hl)}caseClause(e){return this.getTypedRuleContext(hl,e)}get ruleIndex(){return F.RULE_switchStatement}accept(e){return e.visitSwitchStatement?e.visitSwitchStatement(this):e.visitChildren(this)}}class hl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}singleExpression(){return this.getTypedRuleContext(Ve,0)}ARROW(){return this.getToken(F.ARROW,0)}block(){return this.getTypedRuleContext(is,0)}get ruleIndex(){return F.RULE_caseClause}accept(e){return e.visitCaseClause?e.visitCaseClause(this):e.visitChildren(this)}}class Ep extends Ye{constructor(e,n,r){super(n,r),this.parser=e}ARROW(){return this.getToken(F.ARROW,0)}block(){return this.getTypedRuleContext(is,0)}get ruleIndex(){return F.RULE_defaultCaluse}accept(e){return e.visitDefaultCaluse?e.visitDefaultCaluse(this):e.visitChildren(this)}}class Sp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}While(){return this.getToken(F.While,0)}singleExpression(){return this.getTypedRuleContext(Ve,0)}blockLine(){return this.getTypedRuleContext(mo,0)}get ruleIndex(){return F.RULE_whileStatement}accept(e){return e.visitWhileStatement?e.visitWhileStatement(this):e.visitChildren(this)}}class Tp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}importElement_list(){return this.getTypedRuleContexts(pl)}importElement(e){return this.getTypedRuleContext(pl,e)}NEWLINE(){return this.getToken(F.NEWLINE,0)}Comma_list(){return this.getTokens(F.Comma)}Comma(e){return this.getToken(F.Comma,e)}get ruleIndex(){return F.RULE_importStmt}accept(e){return e.visitImportStmt?e.visitImportStmt(this):e.visitChildren(this)}}class pl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}Import(){return this.getToken(F.Import,0)}identifier_list(){return this.getTypedRuleContexts(yn)}identifier(e){return this.getTypedRuleContext(yn,e)}Divide_list(){return this.getTokens(F.Divide)}Divide(e){return this.getToken(F.Divide,e)}IntegerLiteral(){return this.getToken(F.IntegerLiteral,0)}As(){return this.getToken(F.As,0)}get ruleIndex(){return F.RULE_importElement}accept(e){return e.visitImportElement?e.visitImportElement(this):e.visitChildren(this)}}class Ap extends Ye{constructor(e,n,r){super(n,r),this.parser=e}BooleanLiteral(){return this.getToken(F.BooleanLiteral,0)}ColorLiteral(){return this.getToken(F.ColorLiteral,0)}StringLiteral(){return this.getToken(F.StringLiteral,0)}IntegerLiteral(){return this.getToken(F.IntegerLiteral,0)}DecimalLiteral(){return this.getToken(F.DecimalLiteral,0)}get ruleIndex(){return F.RULE_literal}accept(e){return e.visitLiteral?e.visitLiteral(this):e.visitChildren(this)}}class uu extends Ye{constructor(e,n,r){super(n,r),this.parser=e}methodElement_list(){return this.getTypedRuleContexts(as)}methodElement(e){return this.getTypedRuleContext(as,e)}Point_list(){return this.getTokens(F.Point)}Point(e){return this.getToken(F.Point,e)}get ruleIndex(){return F.RULE_methodStmt}accept(e){return e.visitMethodStmt?e.visitMethodStmt(this):e.visitChildren(this)}}class as extends Ye{constructor(e,n,r){super(n,r),this.parser=e}methodName(){return this.getTypedRuleContext(xp,0)}arguments(){return this.getTypedRuleContext(gp,0)}get ruleIndex(){return F.RULE_methodElement}accept(e){return e.visitMethodElement?e.visitMethodElement(this):e.visitChildren(this)}}class xp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}identifier_list(){return this.getTypedRuleContexts(yn)}identifier(e){return this.getTypedRuleContext(yn,e)}OpenParen(){return this.getToken(F.OpenParen,0)}singleExpression(){return this.getTypedRuleContext(Ve,0)}CloseParen(){return this.getToken(F.CloseParen,0)}Point_list(){return this.getTokens(F.Point)}Point(e){return this.getToken(F.Point,e)}LessThan(){return this.getToken(F.LessThan,0)}typeName_list(){return this.getTypedRuleContexts(mi)}typeName(e){return this.getTypedRuleContext(mi,e)}MoreThan(){return this.getToken(F.MoreThan,0)}Comma(){return this.getToken(F.Comma,0)}get ruleIndex(){return F.RULE_methodName}accept(e){return e.visitMethodName?e.visitMethodName(this):e.visitChildren(this)}}class Cp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}identifier(){return this.getTypedRuleContext(yn,0)}arrowFunctionParameters(){return this.getTypedRuleContext(Op,0)}ARROW(){return this.getToken(F.ARROW,0)}block(){return this.getTypedRuleContext(is,0)}Export(){return this.getToken(F.Export,0)}get ruleIndex(){return F.RULE_arrowFunction}accept(e){return e.visitArrowFunction?e.visitArrowFunction(this):e.visitChildren(this)}}class Op extends Ye{constructor(e,n,r){super(n,r),this.parser=e}OpenParen(){return this.getToken(F.OpenParen,0)}CloseParen(){return this.getToken(F.CloseParen,0)}formalParameterList(){return this.getTypedRuleContext(dl,0)}get ruleIndex(){return F.RULE_arrowFunctionParameters}accept(e){return e.visitArrowFunctionParameters?e.visitArrowFunctionParameters(this):e.visitChildren(this)}}class dl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}formalParameterArg_list(){return this.getTypedRuleContexts(ml)}formalParameterArg(e){return this.getTypedRuleContext(ml,e)}Comma_list(){return this.getTokens(F.Comma)}Comma(e){return this.getToken(F.Comma,e)}get ruleIndex(){return F.RULE_formalParameterList}accept(e){return e.visitFormalParameterList?e.visitFormalParameterList(this):e.visitChildren(this)}}class ml extends Ye{constructor(e,n,r){super(n,r),this.parser=e}identifier(){return this.getTypedRuleContext(yn,0)}typeGather(){return this.getTypedRuleContext($o,0)}Assign(){return this.getToken(F.Assign,0)}singleExpression(){return this.getTypedRuleContext(Ve,0)}get ruleIndex(){return F.RULE_formalParameterArg}accept(e){return e.visitFormalParameterArg?e.visitFormalParameterArg(this):e.visitChildren(this)}}class Dp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}Method(){return this.getToken(F.Method,0)}identifier(){return this.getTypedRuleContext(yn,0)}arrowMethodParameters(){return this.getTypedRuleContext(kp,0)}ARROW(){return this.getToken(F.ARROW,0)}block(){return this.getTypedRuleContext(is,0)}Export(){return this.getToken(F.Export,0)}get ruleIndex(){return F.RULE_arrowMethod}accept(e){return e.visitArrowMethod?e.visitArrowMethod(this):e.visitChildren(this)}}class kp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}OpenParen(){return this.getToken(F.OpenParen,0)}typeGather(){return this.getTypedRuleContext($o,0)}identifier(){return this.getTypedRuleContext(yn,0)}CloseParen(){return this.getToken(F.CloseParen,0)}Assign(){return this.getToken(F.Assign,0)}singleExpression(){return this.getTypedRuleContext(Ve,0)}Comma(){return this.getToken(F.Comma,0)}formalParameterList(){return this.getTypedRuleContext(dl,0)}get ruleIndex(){return F.RULE_arrowMethodParameters}accept(e){return e.visitArrowMethodParameters?e.visitArrowMethodParameters(this):e.visitChildren(this)}}class Rp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}Type(){return this.getToken(F.Type,0)}identifier(){return this.getTypedRuleContext(yn,0)}NEWLINE(){return this.getToken(F.NEWLINE,0)}INDENT(){return this.getToken(F.INDENT,0)}DEDENT(){return this.getToken(F.DEDENT,0)}Export(){return this.getToken(F.Export,0)}typeElement_list(){return this.getTypedRuleContexts(_l)}typeElement(e){return this.getTypedRuleContext(_l,e)}get ruleIndex(){return F.RULE_typeStatement}accept(e){return e.visitTypeStatement?e.visitTypeStatement(this):e.visitChildren(this)}}class _l extends Ye{constructor(e,n,r){super(n,r),this.parser=e}identifier(){return this.getTypedRuleContext(yn,0)}NEWLINE(){return this.getToken(F.NEWLINE,0)}Varip(){return this.getToken(F.Varip,0)}typeGather(){return this.getTypedRuleContext($o,0)}Assign(){return this.getToken(F.Assign,0)}singleExpression(){return this.getTypedRuleContext(Ve,0)}get ruleIndex(){return F.RULE_typeElement}accept(e){return e.visitTypeElement?e.visitTypeElement(this):e.visitChildren(this)}}class yl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}ColonEquals(){return this.getToken(F.ColonEquals,0)}MultiplyAssign(){return this.getToken(F.MultiplyAssign,0)}DivideAssign(){return this.getToken(F.DivideAssign,0)}ModulusAssign(){return this.getToken(F.ModulusAssign,0)}PlusAssign(){return this.getToken(F.PlusAssign,0)}MinusAssign(){return this.getToken(F.MinusAssign,0)}get ruleIndex(){return F.RULE_assignmentOperator}accept(e){return e.visitAssignmentOperator?e.visitAssignmentOperator(this):e.visitChildren(this)}}class gl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}Map(){return this.getToken(F.Map,0)}LessThan(){return this.getToken(F.LessThan,0)}Comma(){return this.getToken(F.Comma,0)}typeName_list(){return this.getTypedRuleContexts(mi)}typeName(e){return this.getTypedRuleContext(mi,e)}MoreThan(){return this.getToken(F.MoreThan,0)}get ruleIndex(){return F.RULE_typeMap}accept(e){return e.visitTypeMap?e.visitTypeMap(this):e.visitChildren(this)}}class wp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}typeName_list(){return this.getTypedRuleContexts(mi)}typeName(e){return this.getTypedRuleContext(mi,e)}typeArray(){return this.getTypedRuleContext(bl,0)}typeMap(){return this.getTypedRuleContext(gl,0)}get ruleIndex(){return F.RULE_typeSeries}accept(e){return e.visitTypeSeries?e.visitTypeSeries(this):e.visitChildren(this)}}class bl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}typeName_list(){return this.getTypedRuleContexts(mi)}typeName(e){return this.getTypedRuleContext(mi,e)}LessThan(){return this.getToken(F.LessThan,0)}MoreThan(){return this.getToken(F.MoreThan,0)}OpenBracket(){return this.getToken(F.OpenBracket,0)}CloseBracket(){return this.getToken(F.CloseBracket,0)}get ruleIndex(){return F.RULE_typeArray}accept(e){return e.visitTypeArray?e.visitTypeArray(this):e.visitChildren(this)}}class $o extends Ye{constructor(e,n,r){super(n,r),this.parser=e}typeName(){return this.getTypedRuleContext(mi,0)}typeArray(){return this.getTypedRuleContext(bl,0)}typeMap(){return this.getTypedRuleContext(gl,0)}typeSeries(){return this.getTypedRuleContext(wp,0)}get ruleIndex(){return F.RULE_typeGather}accept(e){return e.visitTypeGather?e.visitTypeGather(this):e.visitChildren(this)}}class yn extends Ye{constructor(e,n,r){super(n,r),this.parser=e}Identifier(){return this.getToken(F.Identifier,0)}Map(){return this.getToken(F.Map,0)}Type(){return this.getToken(F.Type,0)}Enum(){return this.getToken(F.Enum,0)}get ruleIndex(){return F.RULE_identifier}accept(e){return e.visitIdentifier?e.visitIdentifier(this):e.visitChildren(this)}}class mi extends Ye{constructor(e,n,r){super(n,r),this.parser=e}identifier_list(){return this.getTypedRuleContexts(yn)}identifier(e){return this.getTypedRuleContext(yn,e)}Point(){return this.getToken(F.Point,0)}get ruleIndex(){return F.RULE_typeName}accept(e){return e.visitTypeName?e.visitTypeName(this):e.visitChildren(this)}}class cu extends Ye{constructor(e,n,r){super(n,r),this.parser=e}identifier_list(){return this.getTypedRuleContexts(yn)}identifier(e){return this.getTypedRuleContext(yn,e)}Point_list(){return this.getTokens(F.Point)}Point(e){return this.getToken(F.Point,e)}methodElement_list(){return this.getTypedRuleContexts(as)}methodElement(e){return this.getTypedRuleContext(as,e)}OpenParen(){return this.getToken(F.OpenParen,0)}singleExpression(){return this.getTypedRuleContext(Ve,0)}CloseParen(){return this.getToken(F.CloseParen,0)}get ruleIndex(){return F.RULE_name}accept(e){return e.visitName?e.visitName(this):e.visitChildren(this)}}class Np extends Ye{constructor(e,n,r){super(n,r),this.parser=e}Enum(){return this.getToken(F.Enum,0)}identifier(){return this.getTypedRuleContext(yn,0)}NEWLINE(){return this.getToken(F.NEWLINE,0)}INDENT(){return this.getToken(F.INDENT,0)}DEDENT(){return this.getToken(F.DEDENT,0)}Export(){return this.getToken(F.Export,0)}enumElement_list(){return this.getTypedRuleContexts(vl)}enumElement(e){return this.getTypedRuleContext(vl,e)}get ruleIndex(){return F.RULE_enumStatement}accept(e){return e.visitEnumStatement?e.visitEnumStatement(this):e.visitChildren(this)}}class vl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}identifier(){return this.getTypedRuleContext(yn,0)}NEWLINE(){return this.getToken(F.NEWLINE,0)}Assign(){return this.getToken(F.Assign,0)}StringLiteral(){return this.getToken(F.StringLiteral,0)}get ruleIndex(){return F.RULE_enumElement}accept(e){return e.visitEnumElement?e.visitEnumElement(this):e.visitChildren(this)}}class P_ extends s_{constructor(n){super(n);k(this,"tokens");k(this,"indents");k(this,"opened");this.tokens=[],this.indents=[],this.opened=0}reset(){this.tokens=[],this.indents=[],this.opened=0,super.reset()}emitToken(n){super.emitToken(n),this.tokens.push(n)}nextToken(){if(this._input.LA(1)===F.EOF&&this.indents.length){for(this.tokens=this.tokens.filter(function(r){return r.type!==F.EOF}),this.emitToken(this.commonToken(F.NEWLINE,`
11
- `));this.indents.length;)this.emitToken(this.createDedent()),this.indents.pop();this.emitToken(this.commonToken(F.EOF,"<EOF>"))}const n=super.nextToken();return this.tokens.length?this.tokens.shift():n}createDedent(){return this.commonToken(F.DEDENT,"")}getCharIndex(){return this._input.index}commonToken(n,r){const s=this.getCharIndex()-1,l=r.length?s-r.length+1:s;return new n_([this,this._input],n,0,l,s)}getIndentationCount(n){let r=0;for(let s=0;s<n.length;s++)n[s]===" "?r+=4-r%4:r++;return r}atStartOfInput(){return this.getCharIndex()===0}openBrace(){this.opened++}closeBrace(){this.opened--}onNewLine(){const n=this.text.replace(/[^\r\n]+/g,""),r=this.text.replace(/[\r\n]+/g,""),s=this._input.LA(1),l=this._input.LA(2),h=this.getIndentationCount(r);if(this.opened>0||l!=-1&&(s===13||s===10||s===47&&l===47||h%4))this.skip();else{this.emitToken(this.commonToken(F.NEWLINE,n));const m=this.indents.length?this.indents[this.indents.length-1]:0;if(h===m)this.skip();else if(h>m)this.indents.push(h),this.emitToken(this.commonToken(F.INDENT,r));else for(;this.indents.length&&this.indents[this.indents.length-1]>h;)this.emitToken(this.createDedent()),this.indents.pop()}}}const we=class we extends P_{constructor(e){super(e),this._interp=new u_(this,we._ATN,we.DecisionsToDFA,new hp)}get grammarFileName(){return"tccScriptLexer.g4"}get literalNames(){return we.literalNames}get symbolicNames(){return we.symbolicNames}get ruleNames(){return we.ruleNames}get serializedATN(){return we._serializedATN}get channelNames(){return we.channelNames}get modeNames(){return we.modeNames}action(e,n,r){switch(n){case 1:this.OpenBracket_action(e,r);break;case 2:this.CloseBracket_action(e,r);break;case 3:this.OpenParen_action(e,r);break;case 4:this.CloseParen_action(e,r);break;case 58:this.NEWLINE_action(e,r);break}}OpenBracket_action(e,n){switch(n){case 0:this.openBrace();break}}CloseBracket_action(e,n){switch(n){case 1:this.closeBrace();break}}OpenParen_action(e,n){switch(n){case 2:this.openBrace();break}}CloseParen_action(e,n){switch(n){case 3:this.closeBrace();break}}NEWLINE_action(e,n){switch(n){case 4:this.onNewLine();break}}sempred(e,n,r){switch(n){case 58:return this.NEWLINE_sempred(e,r)}return!0}NEWLINE_sempred(e,n){switch(n){case 0:return this.atStartOfInput()}return!0}static get _ATN(){return we.__ATN||(we.__ATN=new lp().deserialize(we._serializedATN)),we.__ATN}};k(we,"INDENT",1),k(we,"DEDENT",2),k(we,"Point",3),k(we,"OpenBracket",4),k(we,"CloseBracket",5),k(we,"OpenParen",6),k(we,"CloseParen",7),k(we,"Comma",8),k(we,"Assign",9),k(we,"QuestionMark",10),k(we,"Colon",11),k(we,"Plus",12),k(we,"Minus",13),k(we,"Multiply",14),k(we,"Divide",15),k(we,"Modulus",16),k(we,"Hashtag",17),k(we,"LessThan",18),k(we,"MoreThan",19),k(we,"LessThanEquals",20),k(we,"GreaterThanEquals",21),k(we,"Equals_",22),k(we,"NotEquals",23),k(we,"MultiplyAssign",24),k(we,"DivideAssign",25),k(we,"ModulusAssign",26),k(we,"PlusAssign",27),k(we,"MinusAssign",28),k(we,"ARROW",29),k(we,"ColonEquals",30),k(we,"BooleanLiteral",31),k(we,"IntegerLiteral",32),k(we,"DecimalLiteral",33),k(we,"Break",34),k(we,"And",35),k(we,"Export",36),k(we,"For",37),k(we,"Var",38),k(we,"Continue",39),k(we,"Varip",40),k(we,"Switch",41),k(we,"While",42),k(we,"If",43),k(we,"In",44),k(we,"Or",45),k(we,"Not",46),k(we,"Method",47),k(we,"Else",48),k(we,"To",49),k(we,"By",50),k(we,"Type",51),k(we,"Import",52),k(we,"As",53),k(we,"Enum",54),k(we,"Map",55),k(we,"ColorLiteral",56),k(we,"StringLiteral",57),k(we,"Identifier",58),k(we,"HIDDEN_",59),k(we,"COMMENT_",60),k(we,"NEWLINE",61),k(we,"EOF",pp.EOF),k(we,"channelNames",["DEFAULT_TOKEN_CHANNEL","HIDDEN"]),k(we,"literalNames",[null,null,null,"'.'","'['","']'","'('","')'","','","'='","'?'","':'","'+'","'-'","'*'","'/'","'%'","'#'","'<'","'>'","'<='","'>='","'=='","'!='","'*='","'/='","'%='","'+='","'-='","'=>'","':='",null,null,null,"'break'","'and'","'export'","'for'","'var'","'continue'","'varip'","'switch'","'while'","'if'","'in'","'or'","'not'","'method'","'else'","'to'","'by'","'type'","'import'","'as'","'enum'","'map'"]),k(we,"symbolicNames",[null,"INDENT","DEDENT","Point","OpenBracket","CloseBracket","OpenParen","CloseParen","Comma","Assign","QuestionMark","Colon","Plus","Minus","Multiply","Divide","Modulus","Hashtag","LessThan","MoreThan","LessThanEquals","GreaterThanEquals","Equals_","NotEquals","MultiplyAssign","DivideAssign","ModulusAssign","PlusAssign","MinusAssign","ARROW","ColonEquals","BooleanLiteral","IntegerLiteral","DecimalLiteral","Break","And","Export","For","Var","Continue","Varip","Switch","While","If","In","Or","Not","Method","Else","To","By","Type","Import","As","Enum","Map","ColorLiteral","StringLiteral","Identifier","HIDDEN_","COMMENT_","NEWLINE"]),k(we,"modeNames",["DEFAULT_MODE"]),k(we,"ruleNames",["Point","OpenBracket","CloseBracket","OpenParen","CloseParen","Comma","Assign","QuestionMark","Colon","Plus","Minus","Multiply","Divide","Modulus","Hashtag","LessThan","MoreThan","LessThanEquals","GreaterThanEquals","Equals_","NotEquals","MultiplyAssign","DivideAssign","ModulusAssign","PlusAssign","MinusAssign","ARROW","ColonEquals","BooleanLiteral","IntegerLiteral","DecimalLiteral","Break","And","Export","For","Var","Continue","Varip","Switch","While","If","In","Or","Not","Method","Else","To","By","Type","Import","As","Enum","Map","ColorLiteral","StringLiteral","Identifier","HIDDEN_","COMMENT_","NEWLINE","SHORT_STRING","DIGIT","DIGITS","HEX_DIGIT","SPACES","COMMENT","EXP"]),k(we,"_serializedATN",[4,0,61,447,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,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2,65,7,65,1,0,1,0,1,1,1,1,1,1,1,2,1,2,1,2,1,3,1,3,1,3,1,4,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,17,1,18,1,18,1,18,1,19,1,19,1,19,1,20,1,20,1,20,1,21,1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,3,28,214,8,28,1,29,1,29,1,30,1,30,1,30,3,30,221,8,30,1,30,1,30,1,30,1,30,3,30,227,8,30,3,30,229,8,30,1,30,3,30,232,8,30,3,30,234,8,30,1,31,1,31,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,41,1,41,1,41,1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,45,1,45,1,45,1,45,1,45,1,46,1,46,1,46,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,52,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,3,53,362,8,53,1,54,1,54,1,55,1,55,5,55,368,8,55,10,55,12,55,371,9,55,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1,57,1,58,1,58,1,58,3,58,384,8,58,1,58,1,58,3,58,388,8,58,1,58,3,58,391,8,58,3,58,393,8,58,1,58,1,58,1,59,1,59,1,59,1,59,5,59,401,8,59,10,59,12,59,404,9,59,1,59,1,59,1,59,1,59,1,59,5,59,411,8,59,10,59,12,59,414,9,59,1,59,3,59,417,8,59,1,60,1,60,1,61,4,61,422,8,61,11,61,12,61,423,1,62,1,62,1,63,4,63,429,8,63,11,63,12,63,430,1,64,1,64,1,64,1,64,5,64,437,8,64,10,64,12,64,440,9,64,1,65,1,65,3,65,444,8,65,1,65,1,65,0,0,66,1,3,3,4,5,5,7,6,9,7,11,8,13,9,15,10,17,11,19,12,21,13,23,14,25,15,27,16,29,17,31,18,33,19,35,20,37,21,39,22,41,23,43,24,45,25,47,26,49,27,51,28,53,29,55,30,57,31,59,32,61,33,63,34,65,35,67,36,69,37,71,38,73,39,75,40,77,41,79,42,81,43,83,44,85,45,87,46,89,47,91,48,93,49,95,50,97,51,99,52,101,53,103,54,105,55,107,56,109,57,111,58,113,59,115,60,117,61,119,0,121,0,123,0,125,0,127,0,129,0,131,0,1,0,10,3,0,65,90,95,95,97,122,4,0,48,57,65,90,95,95,97,122,1,0,39,39,1,0,34,34,1,0,48,57,3,0,48,57,65,70,97,102,3,0,9,9,32,32,160,160,2,0,10,10,12,13,2,0,69,69,101,101,2,0,43,43,45,45,460,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,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,1,133,1,0,0,0,3,135,1,0,0,0,5,138,1,0,0,0,7,141,1,0,0,0,9,144,1,0,0,0,11,147,1,0,0,0,13,149,1,0,0,0,15,151,1,0,0,0,17,153,1,0,0,0,19,155,1,0,0,0,21,157,1,0,0,0,23,159,1,0,0,0,25,161,1,0,0,0,27,163,1,0,0,0,29,165,1,0,0,0,31,167,1,0,0,0,33,169,1,0,0,0,35,171,1,0,0,0,37,174,1,0,0,0,39,177,1,0,0,0,41,180,1,0,0,0,43,183,1,0,0,0,45,186,1,0,0,0,47,189,1,0,0,0,49,192,1,0,0,0,51,195,1,0,0,0,53,198,1,0,0,0,55,201,1,0,0,0,57,213,1,0,0,0,59,215,1,0,0,0,61,233,1,0,0,0,63,235,1,0,0,0,65,241,1,0,0,0,67,245,1,0,0,0,69,252,1,0,0,0,71,256,1,0,0,0,73,260,1,0,0,0,75,269,1,0,0,0,77,275,1,0,0,0,79,282,1,0,0,0,81,288,1,0,0,0,83,291,1,0,0,0,85,294,1,0,0,0,87,297,1,0,0,0,89,301,1,0,0,0,91,308,1,0,0,0,93,313,1,0,0,0,95,316,1,0,0,0,97,319,1,0,0,0,99,324,1,0,0,0,101,331,1,0,0,0,103,334,1,0,0,0,105,339,1,0,0,0,107,361,1,0,0,0,109,363,1,0,0,0,111,365,1,0,0,0,113,372,1,0,0,0,115,376,1,0,0,0,117,392,1,0,0,0,119,416,1,0,0,0,121,418,1,0,0,0,123,421,1,0,0,0,125,425,1,0,0,0,127,428,1,0,0,0,129,432,1,0,0,0,131,441,1,0,0,0,133,134,5,46,0,0,134,2,1,0,0,0,135,136,5,91,0,0,136,137,6,1,0,0,137,4,1,0,0,0,138,139,5,93,0,0,139,140,6,2,1,0,140,6,1,0,0,0,141,142,5,40,0,0,142,143,6,3,2,0,143,8,1,0,0,0,144,145,5,41,0,0,145,146,6,4,3,0,146,10,1,0,0,0,147,148,5,44,0,0,148,12,1,0,0,0,149,150,5,61,0,0,150,14,1,0,0,0,151,152,5,63,0,0,152,16,1,0,0,0,153,154,5,58,0,0,154,18,1,0,0,0,155,156,5,43,0,0,156,20,1,0,0,0,157,158,5,45,0,0,158,22,1,0,0,0,159,160,5,42,0,0,160,24,1,0,0,0,161,162,5,47,0,0,162,26,1,0,0,0,163,164,5,37,0,0,164,28,1,0,0,0,165,166,5,35,0,0,166,30,1,0,0,0,167,168,5,60,0,0,168,32,1,0,0,0,169,170,5,62,0,0,170,34,1,0,0,0,171,172,5,60,0,0,172,173,5,61,0,0,173,36,1,0,0,0,174,175,5,62,0,0,175,176,5,61,0,0,176,38,1,0,0,0,177,178,5,61,0,0,178,179,5,61,0,0,179,40,1,0,0,0,180,181,5,33,0,0,181,182,5,61,0,0,182,42,1,0,0,0,183,184,5,42,0,0,184,185,5,61,0,0,185,44,1,0,0,0,186,187,5,47,0,0,187,188,5,61,0,0,188,46,1,0,0,0,189,190,5,37,0,0,190,191,5,61,0,0,191,48,1,0,0,0,192,193,5,43,0,0,193,194,5,61,0,0,194,50,1,0,0,0,195,196,5,45,0,0,196,197,5,61,0,0,197,52,1,0,0,0,198,199,5,61,0,0,199,200,5,62,0,0,200,54,1,0,0,0,201,202,5,58,0,0,202,203,5,61,0,0,203,56,1,0,0,0,204,205,5,116,0,0,205,206,5,114,0,0,206,207,5,117,0,0,207,214,5,101,0,0,208,209,5,102,0,0,209,210,5,97,0,0,210,211,5,108,0,0,211,212,5,115,0,0,212,214,5,101,0,0,213,204,1,0,0,0,213,208,1,0,0,0,214,58,1,0,0,0,215,216,3,123,61,0,216,60,1,0,0,0,217,218,5,46,0,0,218,220,3,123,61,0,219,221,3,131,65,0,220,219,1,0,0,0,220,221,1,0,0,0,221,234,1,0,0,0,222,231,3,123,61,0,223,228,5,46,0,0,224,226,3,123,61,0,225,227,3,131,65,0,226,225,1,0,0,0,226,227,1,0,0,0,227,229,1,0,0,0,228,224,1,0,0,0,228,229,1,0,0,0,229,232,1,0,0,0,230,232,3,131,65,0,231,223,1,0,0,0,231,230,1,0,0,0,232,234,1,0,0,0,233,217,1,0,0,0,233,222,1,0,0,0,234,62,1,0,0,0,235,236,5,98,0,0,236,237,5,114,0,0,237,238,5,101,0,0,238,239,5,97,0,0,239,240,5,107,0,0,240,64,1,0,0,0,241,242,5,97,0,0,242,243,5,110,0,0,243,244,5,100,0,0,244,66,1,0,0,0,245,246,5,101,0,0,246,247,5,120,0,0,247,248,5,112,0,0,248,249,5,111,0,0,249,250,5,114,0,0,250,251,5,116,0,0,251,68,1,0,0,0,252,253,5,102,0,0,253,254,5,111,0,0,254,255,5,114,0,0,255,70,1,0,0,0,256,257,5,118,0,0,257,258,5,97,0,0,258,259,5,114,0,0,259,72,1,0,0,0,260,261,5,99,0,0,261,262,5,111,0,0,262,263,5,110,0,0,263,264,5,116,0,0,264,265,5,105,0,0,265,266,5,110,0,0,266,267,5,117,0,0,267,268,5,101,0,0,268,74,1,0,0,0,269,270,5,118,0,0,270,271,5,97,0,0,271,272,5,114,0,0,272,273,5,105,0,0,273,274,5,112,0,0,274,76,1,0,0,0,275,276,5,115,0,0,276,277,5,119,0,0,277,278,5,105,0,0,278,279,5,116,0,0,279,280,5,99,0,0,280,281,5,104,0,0,281,78,1,0,0,0,282,283,5,119,0,0,283,284,5,104,0,0,284,285,5,105,0,0,285,286,5,108,0,0,286,287,5,101,0,0,287,80,1,0,0,0,288,289,5,105,0,0,289,290,5,102,0,0,290,82,1,0,0,0,291,292,5,105,0,0,292,293,5,110,0,0,293,84,1,0,0,0,294,295,5,111,0,0,295,296,5,114,0,0,296,86,1,0,0,0,297,298,5,110,0,0,298,299,5,111,0,0,299,300,5,116,0,0,300,88,1,0,0,0,301,302,5,109,0,0,302,303,5,101,0,0,303,304,5,116,0,0,304,305,5,104,0,0,305,306,5,111,0,0,306,307,5,100,0,0,307,90,1,0,0,0,308,309,5,101,0,0,309,310,5,108,0,0,310,311,5,115,0,0,311,312,5,101,0,0,312,92,1,0,0,0,313,314,5,116,0,0,314,315,5,111,0,0,315,94,1,0,0,0,316,317,5,98,0,0,317,318,5,121,0,0,318,96,1,0,0,0,319,320,5,116,0,0,320,321,5,121,0,0,321,322,5,112,0,0,322,323,5,101,0,0,323,98,1,0,0,0,324,325,5,105,0,0,325,326,5,109,0,0,326,327,5,112,0,0,327,328,5,111,0,0,328,329,5,114,0,0,329,330,5,116,0,0,330,100,1,0,0,0,331,332,5,97,0,0,332,333,5,115,0,0,333,102,1,0,0,0,334,335,5,101,0,0,335,336,5,110,0,0,336,337,5,117,0,0,337,338,5,109,0,0,338,104,1,0,0,0,339,340,5,109,0,0,340,341,5,97,0,0,341,342,5,112,0,0,342,106,1,0,0,0,343,344,5,35,0,0,344,345,3,125,62,0,345,346,3,125,62,0,346,347,3,125,62,0,347,348,3,125,62,0,348,349,3,125,62,0,349,350,3,125,62,0,350,362,1,0,0,0,351,352,5,35,0,0,352,353,3,125,62,0,353,354,3,125,62,0,354,355,3,125,62,0,355,356,3,125,62,0,356,357,3,125,62,0,357,358,3,125,62,0,358,359,3,125,62,0,359,360,3,125,62,0,360,362,1,0,0,0,361,343,1,0,0,0,361,351,1,0,0,0,362,108,1,0,0,0,363,364,3,119,59,0,364,110,1,0,0,0,365,369,7,0,0,0,366,368,7,1,0,0,367,366,1,0,0,0,368,371,1,0,0,0,369,367,1,0,0,0,369,370,1,0,0,0,370,112,1,0,0,0,371,369,1,0,0,0,372,373,3,127,63,0,373,374,1,0,0,0,374,375,6,56,4,0,375,114,1,0,0,0,376,377,3,129,64,0,377,378,1,0,0,0,378,379,6,57,5,0,379,116,1,0,0,0,380,381,4,58,0,0,381,393,3,127,63,0,382,384,5,13,0,0,383,382,1,0,0,0,383,384,1,0,0,0,384,385,1,0,0,0,385,388,5,10,0,0,386,388,2,12,13,0,387,383,1,0,0,0,387,386,1,0,0,0,388,390,1,0,0,0,389,391,3,127,63,0,390,389,1,0,0,0,390,391,1,0,0,0,391,393,1,0,0,0,392,380,1,0,0,0,392,387,1,0,0,0,393,394,1,0,0,0,394,395,6,58,6,0,395,118,1,0,0,0,396,402,5,39,0,0,397,401,8,2,0,0,398,399,5,92,0,0,399,401,5,39,0,0,400,397,1,0,0,0,400,398,1,0,0,0,401,404,1,0,0,0,402,400,1,0,0,0,402,403,1,0,0,0,403,405,1,0,0,0,404,402,1,0,0,0,405,417,5,39,0,0,406,412,5,34,0,0,407,411,8,3,0,0,408,409,5,92,0,0,409,411,5,34,0,0,410,407,1,0,0,0,410,408,1,0,0,0,411,414,1,0,0,0,412,410,1,0,0,0,412,413,1,0,0,0,413,415,1,0,0,0,414,412,1,0,0,0,415,417,5,34,0,0,416,396,1,0,0,0,416,406,1,0,0,0,417,120,1,0,0,0,418,419,7,4,0,0,419,122,1,0,0,0,420,422,3,121,60,0,421,420,1,0,0,0,422,423,1,0,0,0,423,421,1,0,0,0,423,424,1,0,0,0,424,124,1,0,0,0,425,426,7,5,0,0,426,126,1,0,0,0,427,429,7,6,0,0,428,427,1,0,0,0,429,430,1,0,0,0,430,428,1,0,0,0,430,431,1,0,0,0,431,128,1,0,0,0,432,433,5,47,0,0,433,434,5,47,0,0,434,438,1,0,0,0,435,437,8,7,0,0,436,435,1,0,0,0,437,440,1,0,0,0,438,436,1,0,0,0,438,439,1,0,0,0,439,130,1,0,0,0,440,438,1,0,0,0,441,443,7,8,0,0,442,444,7,9,0,0,443,442,1,0,0,0,443,444,1,0,0,0,444,445,1,0,0,0,445,446,3,123,61,0,446,132,1,0,0,0,22,0,213,220,226,228,231,233,361,369,383,387,390,392,400,402,410,412,416,423,430,438,443,7,1,1,0,1,2,1,1,3,2,1,4,3,0,1,0,0,2,0,1,58,4]),k(we,"__ATN"),k(we,"DecisionsToDFA",we._ATN.decisionToState.map((e,n)=>new fp(e,n)));let El=we;var U=(t=>(t.BOOL="bool",t.INT="int",t.FLOAT="float",t.ARRAY="array",t.BOX="box",t.CHART_POINT="chart.point",t.COLOR="color",t.CONST="const",t.LABEL="label",t.LINE="line",t.LINEFILL="linefill",t.MAP="map",t.MATRIX="matrix",t.POLYLINE="polyline",t.SERIES="series",t.SIMPLE="simple",t.STRING="string",t.TABLE="table",t.UNDETERMINED="undetermined type",t.INPUT="input",t.NA="na",t.VOID="void",t.ENUM="enum",t))(U||{}),le=(t=>(t.FlowStmt="FlowStmt",t.DeclareAssign="DeclareAssign",t.VarBlockStmt="VarBlockStmt",t.VarSingle="VarSingle",t.VarMultiple="VarMultiple",t.ParenthesizedExpression="ParenthesizedExpression",t.AdditiveExpression="AdditiveExpression",t.RelationalExpression="RelationalExpression",t.EqualityExpression="EqualityExpression",t.TernaryExpression="TernaryExpression",t.UnaryExpression="UnaryExpression",t.NotExpression="NotExpression",t.MemberIndexExpression="MemberIndexExpression",t.MethodExpression="MethodExpression",t.LogicalAndExpression="LogicalAndExpression",t.LogicalOrExpression="LogicalOrExpression",t.MultiplicativeExpression="MultiplicativeExpression",t.Brackethesized="Brackethesized",t.IfStatement="IfStatement",t.ForToStatement="ForToStatement",t.ForInStatement="ForInStatement",t.SwitchStatement="SwitchStatement",t.CaseClause="CaseClause",t.DefaultCaluse="DefaultCaluse",t.WhileStatement="WhileStatement",t.ImportElement="ImportElement",t.Literal="Literal",t.ArrowFunction="ArrowFunction",t.ArrowMethod="ArrowMethod",t.TypeStatement="TypeStatement",t.Name="Name",t.AgainAssign="AgainAssign",t.EnumStatement="EnumStatement",t))(le||{}),Kt=(t=>(t.description="description",t.field="field",t.function="function",t.param="param",t.returns="returns",t.type="type",t.variable="variable",t.enum="enum",t))(Kt||{}),Ii=(t=>(t.library="library",t.indicator="indicator",t.strategy="strategy",t))(Ii||{});const de={onlyInLoop:"'$text' is only allowed inside loops",invalidType:"Invalid argument 'expr$index' in 'operator SQBR' call",typeUseError:"Cannot specify a type form '$text' without also specifying the type.",notTypeKeyword:"'$text' is not a valid type keyword in variable declaration",undeclared:"Undeclared identifier '$name'",repeatVar:"'$name' is already defined",typeRepeatErr:"$keyword '$name' is already defined.",typeMismatch:"Cannot call '$operator' with argument '$index'. An argument of '$typeE' type was used but a '$typeR' is expected.",assignTypeMismatch:"Cannot assign a value of the `$typeE` type to the '$name' variable. The variable is declared with the `$typeR` type.",voidNotVar:"Void expression cannot be assigned to a variable",declareTypeErr:"Declared type '$type' is not compatible with assigned type '$valueType'",mapKeyValErr:"Cannot put <$typeA, $typeB> pairs into a map containing `$typeC` keys and `$typeD` values. The maps passed into the `$name()` function must have the same key types and value types.",inputSourceErr:"Invalid value for the '$name' parameter of the '$funcName' function. Possible values: [open, high, low, close, hl2, hlc3, ohlc4, hlcc4, volume].",buildInUseErr:"Cannot use '$name' as the default value of a type's field. The default value cannot be a function, variable or calculation.",argsLenErr:"Too many arguments passed into the `$name()` function call. Passed $lenA arguments but expected $lenB.",requiredParamErr:"No value assigned to the `$argName` parameter in $name()",argsSyntaxErr:"Syntax error after the argument for `$argName`. Arguments without their parameter name cannot be used after arguments with parameter names.",requestArgsErr:"Type $type cannot be used in $name '$argName' argument",mapKeyErr:"Incorrect `key` type `$type` in the variable. The `key` type must be one of the following: int, float, string, bool, color.",templateErr:"Incorrect number of arguments for the template: $countA expected, $countB passed.",templateNoSupportErr:"The '$name()' function does not support templates",ifOrSwitchTypeErr:"Return type of one of the '$keyword' blocks is not compatible with return type of other block(s) ($types)",argsNameErr:"The '$name' function does not have an argument with the name '$argName'",noFiledErr:"Object has no field $name",methodNotExistErr:"Could not find method or method reference '$methodName' for '$name'",tupleVarErr:"Syntax error: The quantities of tuple elements on each side of the assignment operator do not match. The right side has $indexA but the left side has $indexB.",tupleLeftVarErr:"Invalid assignment. Cannot assign a tuple to a variable '$name'.",tupleRightVarErr:"Cannot assign a variable to a tuple. The right side must be a function call or structure ('if', 'switch', 'for', 'while') returning a tuple with the same number of elements.",tempateTypeErr:"Syntax error: Only templates for arrays and matrices consist of a single type identifier enclosed in angle brackets.",qualifierErr:"'$name' is not a valid type qualifier. Possible values: 'const', 'simple', 'series'",notFindFuncErr:"Could not find function or function reference '$name'",naVarErr:"Value with NA type cannot be assigned to a variable that was defined without type keyword",notHistoryErr:"Variable '$name' doesn't have history values",defaultValueErr:"The default value cannot be a function, variable or calculation.",defaultValueTypeErr:"Default value of type $typeE can not be assigned to an argument of type $typeR",typeFieldErr:"In a type declaration, all fields without a default value must be explicitly typified.",unaryErr:"Syntax error at input '$sign'",funcArgAssignErr:"Function arguments cannot be mutable ('$name')",declaredErr:"A variable declared with the '$prefix' keyword cannot accept values of the '$type' form. Assign a '$prefix' value to this variable or remove the '$prefix' keyword from its declaration.",globalFuncErr:"Cannot use '$name' in local scope",onlyStatementErr:"Scripts must contain one declaration statement: `indicator()`, `strategy()` or `library()`, Your script has $count.",modifyGlobalVarErr:"Cannot modify global variable '$name' in function",inputDefvalErr:"Arguments of input function must be of constant type, or 'source' builtin variables.",objectIsNaErr:"Cannot access the '$name' $type of an na object. The object is 'na'.",buidinAssignErr:"Cannot assign a new value to the built-in variable '$name'.",buidinVarErr:"Cannot shadow the built-in variable `$name` because it has already been used as a built-in.",useNaErr:"Cannot use an `na` value of an unspecified type in the `$name` function.",libraryTitleErr:"Invalid argument 'title' in 'library' call. It cannot contain spaces, special characters or begin with a digit.",exportFuncArgErr:"All exported functions args should be typified",indiRunErr:"An indicator must contain at least one of the following: any `plot*()` function, `barcolor()`, `bgcolor()`, `hline()`, `alertcondition()`, or any drawing (line, label, box, table, polyline).",libraryExportErr:"A library must contain at least one exported function, method, or type.",strategyRunErr:"A strategy must contain at least one of the following: any `strategy.*()` function that creates orders, any `plot*()` function, `barcolor()`, `bgcolor()`, `hline()`, or any drawing (line, label, box, table, polyline).",exportUseErr:"Only libraries can contain exported $type.",funcRepeatErr:"The '$name' function has overloads with the same parameters. The type of parameters must be different in overloaded versions of functions.",importMultipleErr:"Cannot import a library more than once",importNotExitErr:"The user '$username' does not have a published library titled '$libraryName'",importNameRepeatErr:"More than one import uses the same alias: $name. Previous usage at line: $line",exportFuncHasInputErr:"The exported function '$func' depends on the '$name' input variable, which is not allowed.",libraryTitleIsKeywordErr:"Invalid argument 'title' in 'library' call. Token: '$name' can't be used as library title.",exportFuncUseGlobalVarErr:"Cannot use global variables in exported functions. Function: $func",loopRuntimeErr:"Loop takes too long to execute (> 500 ms)",paramsErr:"Invalid value '$value' for '$param' parameter of the '$func' function. Possible values: $targetVal",displayErr:"Invalid argument 'display' in '$func' call. Possible values: $values",exportFuncUseReqErr:"Cannot use `request.*()` call in exported function `$name()`",requestExprErr:"Type series $type cannot be used in $name 'expression' argument",argDefaultErr:"The default value assigned to a parameter must be either a literal value (e.g., `5`) or a built-in variable (e.g., `close`)",overloadFuncErr:"Cannot use global variables or any values qualified as 'input' in the local scopes of overloaded functions or methods. Remove any global variables or inputs from the scopes of all '$name()' overloads.",againAssignErr:"Unable to determine the object for the field assignment. Try putting the object into a separate variable before assigning values to its fields.",requestUserInLoopErr:"Cannot use `request.*()` call within loops or conditional structures.",enumVarNameErr:"Invalid enum name '$name': `bool`, `int`, `float`, `string`, and `color` are not allowed.",enumVarNameBuiltinErr:"Invalid object name: $name. Namespaces of built-ins cannot be used.",typeNameErr:"Invalid user-defined type name '$name': `bool`, `int`, `float`, `string`, and `color` are not allowed.",enumUseErr:"Cannot use the '$name' as a value. Use one of the enum's fields instead.",conditionalErr:"'$name' conditional expression must be of a bool type!",fortoErr:'The value of the "for" loop must be a number.',indicatorUseStrategyFuncErr:"You cannot use strategy $type ($name) in indicator script.",arrEmptyErr:"Array must not be empty",arrLengthDiffErr:"Arrays have different lengths",arrTypeErr:"数组类型错误,array.$name方法只能使用$type类型数组!",inputOptErr:"input's defval should be in options, but '$defval' is not in [$args]",mathRandomErr:"min must be less than max",matrixRehapeErr:"New matrix must be of same area as original matrix",strategyExitErr:"strategy.exit must have at least one of the following parameters: 'profit', 'limit', 'loss', 'stop' or one of the following pairs: 'trail_offset' and 'trail_price' / 'trail_points'. To close the position at market price, use 'strategy.close'",arrLenErr:"Invalid array length",mergeCellErr:"error: start_column > end_column or start_row > end_row"},Dr={repeatVar:"Shadowing variable '$name' which exists in parent scope. Did you want to use the ':=' operator instead of '=' ?",typeMismatch:"The `$index` parameter of the `$operator` function accepts a '$type' argument. To avoid potential unexpected results, pass a '$type' value or expression to this parameter.",moreSameArg:"More than one '$arg' arguments are supplied. Only the first one will be used.",localScopeGetHistory:"The variable '$name' is declared in local scope, which may not be executed at every update. So, obtaining its historical values may lead to unexpected results",localScopeWarning:"The function '$name' should be called on each calculation for consistency. It is recommended to extract the call from this scope",strategyCalcTickWarn:"Strategies without `calc_on_every_tick = true` only calculate on confirmed chart bars. In this case, `barstate.islast` may not initially return `true` on realtime bars, as the last bar is unconfirmed until it closes. If you need to check whether a bar is the latest before it closes, enable `calc_on_every_tick` in the `strategy()` function.",conditionWarning:"The `condition` parameter of the `$name` accepts a 'bool' argument. To avoid potential unexpected results, pass a 'bool' value or expression to this parameter."},Pi=[U.SERIES,U.SIMPLE,U.INPUT,U.CONST],lu=[U.INT,U.FLOAT,U.BOOL,U.COLOR,U.STRING],Sl=["indicator","strategy","library"],Tl=["plot","plotbar","plotchar","plotarrow","plotshape","plotcandle","hline","alertcondition","barcolor","bgcolor","fill"],F_=[...Tl,"indicator","library","strategy","strategy.risk.max_drawdown","strategy.risk.allow_entry_in","strategy.risk.max_cons_loss_days","max_intraday_filled_orders","strategy.risk.max_intraday_loss","strategy.risk.max_position_size"],L_=[...Tl,"table.new","label.new","line.new","box.new","polyline.new","linefill.new"],M_=["strategy.entry","strategy.order","strategy.exit","strategy.close","strategy.cancel","strategy.close_all","strategy.cancel_all"],Ip=["strategy","input","table","color","line","linefill","label","box"],Al=["close","open","high","low","hl2","hlc3","hlcc4","ohlc4","volume"],B_=/^\/\/\s*@(description|field|function|param|returns|type|enum|variable)/,kn=["case","catch","default","delete","do","finally","function","instanceof","new","return","this","throw","try","typeof","void","with"],Pp=["session","ta","syminfo","timeframe","strategy","barstate","label","line","linefill","box","table","chart","earnings","polyline","math","adjustment","hline","position","size","plot","format","dayofweek","shape","location","scale","currency","barmerge","xloc","yloc","extend","display","text","font","order","alert","dividends","splits","color","input","str","request","ticker","array","matrix","runtime","log","map"];var Fp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},U_={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Fp,function(){var n=1e3,r=6e4,s=36e5,l="millisecond",h="second",m="minute",v="hour",S="day",C="week",A="month",R="quarter",B="year",M="date",b="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(ge){var re=["th","st","nd","rd"],pe=ge%100;return"["+ge+(re[(pe-20)%10]||re[pe]||re[0])+"]"}},w=function(ge,re,pe){var fe=String(ge);return!fe||fe.length>=re?ge:""+Array(re+1-fe.length).join(pe)+ge},D={s:w,z:function(ge){var re=-ge.utcOffset(),pe=Math.abs(re),fe=Math.floor(pe/60),Oe=pe%60;return(re<=0?"+":"-")+w(fe,2,"0")+":"+w(Oe,2,"0")},m:function ge(re,pe){if(re.date()<pe.date())return-ge(pe,re);var fe=12*(pe.year()-re.year())+(pe.month()-re.month()),Oe=re.clone().add(fe,A),Ie=pe-Oe<0,ve=re.clone().add(fe+(Ie?-1:1),A);return+(-(fe+(pe-Oe)/(Ie?Oe-ve:ve-Oe))||0)},a:function(ge){return ge<0?Math.ceil(ge)||0:Math.floor(ge)},p:function(ge){return{M:A,y:B,w:C,d:S,D:M,h:v,m,s:h,ms:l,Q:R}[ge]||String(ge||"").toLowerCase().replace(/s$/,"")},u:function(ge){return ge===void 0}},H="en",X={};X[H]=O;var ee="$isDayjsObject",z=function(ge){return ge instanceof Q||!(!ge||!ge[ee])},Y=function ge(re,pe,fe){var Oe;if(!re)return H;if(typeof re=="string"){var Ie=re.toLowerCase();X[Ie]&&(Oe=Ie),pe&&(X[Ie]=pe,Oe=Ie);var ve=re.split("-");if(!Oe&&ve.length>1)return ge(ve[0])}else{var Ue=re.name;X[Ue]=re,Oe=Ue}return!fe&&Oe&&(H=Oe),Oe||!fe&&H},V=function(ge,re){if(z(ge))return ge.clone();var pe=typeof re=="object"?re:{};return pe.date=ge,pe.args=arguments,new Q(pe)},ne=D;ne.l=Y,ne.i=z,ne.w=function(ge,re){return V(ge,{locale:re.$L,utc:re.$u,x:re.$x,$offset:re.$offset})};var Q=function(){function ge(pe){this.$L=Y(pe.locale,null,!0),this.parse(pe),this.$x=this.$x||pe.x||{},this[ee]=!0}var re=ge.prototype;return re.parse=function(pe){this.$d=function(fe){var Oe=fe.date,Ie=fe.utc;if(Oe===null)return new Date(NaN);if(ne.u(Oe))return new Date;if(Oe instanceof Date)return new Date(Oe);if(typeof Oe=="string"&&!/Z$/i.test(Oe)){var ve=Oe.match(y);if(ve){var Ue=ve[2]-1||0,J=(ve[7]||"0").substring(0,3);return Ie?new Date(Date.UTC(ve[1],Ue,ve[3]||1,ve[4]||0,ve[5]||0,ve[6]||0,J)):new Date(ve[1],Ue,ve[3]||1,ve[4]||0,ve[5]||0,ve[6]||0,J)}}return new Date(Oe)}(pe),this.init()},re.init=function(){var pe=this.$d;this.$y=pe.getFullYear(),this.$M=pe.getMonth(),this.$D=pe.getDate(),this.$W=pe.getDay(),this.$H=pe.getHours(),this.$m=pe.getMinutes(),this.$s=pe.getSeconds(),this.$ms=pe.getMilliseconds()},re.$utils=function(){return ne},re.isValid=function(){return this.$d.toString()!==b},re.isSame=function(pe,fe){var Oe=V(pe);return this.startOf(fe)<=Oe&&Oe<=this.endOf(fe)},re.isAfter=function(pe,fe){return V(pe)<this.startOf(fe)},re.isBefore=function(pe,fe){return this.endOf(fe)<V(pe)},re.$g=function(pe,fe,Oe){return ne.u(pe)?this[fe]:this.set(Oe,pe)},re.unix=function(){return Math.floor(this.valueOf()/1e3)},re.valueOf=function(){return this.$d.getTime()},re.startOf=function(pe,fe){var Oe=this,Ie=!!ne.u(fe)||fe,ve=ne.p(pe),Ue=function(Et,Mt){var gt=ne.w(Oe.$u?Date.UTC(Oe.$y,Mt,Et):new Date(Oe.$y,Mt,Et),Oe);return Ie?gt:gt.endOf(S)},J=function(Et,Mt){return ne.w(Oe.toDate()[Et].apply(Oe.toDate("s"),(Ie?[0,0,0,0]:[23,59,59,999]).slice(Mt)),Oe)},ie=this.$W,ue=this.$M,Ae=this.$D,be="set"+(this.$u?"UTC":"");switch(ve){case B:return Ie?Ue(1,0):Ue(31,11);case A:return Ie?Ue(1,ue):Ue(0,ue+1);case C:var At=this.$locale().weekStart||0,jt=(ie<At?ie+7:ie)-At;return Ue(Ie?Ae-jt:Ae+(6-jt),ue);case S:case M:return J(be+"Hours",0);case v:return J(be+"Minutes",1);case m:return J(be+"Seconds",2);case h:return J(be+"Milliseconds",3);default:return this.clone()}},re.endOf=function(pe){return this.startOf(pe,!1)},re.$set=function(pe,fe){var Oe,Ie=ne.p(pe),ve="set"+(this.$u?"UTC":""),Ue=(Oe={},Oe[S]=ve+"Date",Oe[M]=ve+"Date",Oe[A]=ve+"Month",Oe[B]=ve+"FullYear",Oe[v]=ve+"Hours",Oe[m]=ve+"Minutes",Oe[h]=ve+"Seconds",Oe[l]=ve+"Milliseconds",Oe)[Ie],J=Ie===S?this.$D+(fe-this.$W):fe;if(Ie===A||Ie===B){var ie=this.clone().set(M,1);ie.$d[Ue](J),ie.init(),this.$d=ie.set(M,Math.min(this.$D,ie.daysInMonth())).$d}else Ue&&this.$d[Ue](J);return this.init(),this},re.set=function(pe,fe){return this.clone().$set(pe,fe)},re.get=function(pe){return this[ne.p(pe)]()},re.add=function(pe,fe){var Oe,Ie=this;pe=Number(pe);var ve=ne.p(fe),Ue=function(ue){var Ae=V(Ie);return ne.w(Ae.date(Ae.date()+Math.round(ue*pe)),Ie)};if(ve===A)return this.set(A,this.$M+pe);if(ve===B)return this.set(B,this.$y+pe);if(ve===S)return Ue(1);if(ve===C)return Ue(7);var J=(Oe={},Oe[m]=r,Oe[v]=s,Oe[h]=n,Oe)[ve]||1,ie=this.$d.getTime()+pe*J;return ne.w(ie,this)},re.subtract=function(pe,fe){return this.add(-1*pe,fe)},re.format=function(pe){var fe=this,Oe=this.$locale();if(!this.isValid())return Oe.invalidDate||b;var Ie=pe||"YYYY-MM-DDTHH:mm:ssZ",ve=ne.z(this),Ue=this.$H,J=this.$m,ie=this.$M,ue=Oe.weekdays,Ae=Oe.months,be=Oe.meridiem,At=function(Mt,gt,Ot,Zt){return Mt&&(Mt[gt]||Mt(fe,Ie))||Ot[gt].slice(0,Zt)},jt=function(Mt){return ne.s(Ue%12||12,Mt,"0")},Et=be||function(Mt,gt,Ot){var Zt=Mt<12?"AM":"PM";return Ot?Zt.toLowerCase():Zt};return Ie.replace(g,function(Mt,gt){return gt||function(Ot){switch(Ot){case"YY":return String(fe.$y).slice(-2);case"YYYY":return ne.s(fe.$y,4,"0");case"M":return ie+1;case"MM":return ne.s(ie+1,2,"0");case"MMM":return At(Oe.monthsShort,ie,Ae,3);case"MMMM":return At(Ae,ie);case"D":return fe.$D;case"DD":return ne.s(fe.$D,2,"0");case"d":return String(fe.$W);case"dd":return At(Oe.weekdaysMin,fe.$W,ue,2);case"ddd":return At(Oe.weekdaysShort,fe.$W,ue,3);case"dddd":return ue[fe.$W];case"H":return String(Ue);case"HH":return ne.s(Ue,2,"0");case"h":return jt(1);case"hh":return jt(2);case"a":return Et(Ue,J,!0);case"A":return Et(Ue,J,!1);case"m":return String(J);case"mm":return ne.s(J,2,"0");case"s":return String(fe.$s);case"ss":return ne.s(fe.$s,2,"0");case"SSS":return ne.s(fe.$ms,3,"0");case"Z":return ve}return null}(Mt)||ve.replace(":","")})},re.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},re.diff=function(pe,fe,Oe){var Ie,ve=this,Ue=ne.p(fe),J=V(pe),ie=(J.utcOffset()-this.utcOffset())*r,ue=this-J,Ae=function(){return ne.m(ve,J)};switch(Ue){case B:Ie=Ae()/12;break;case A:Ie=Ae();break;case R:Ie=Ae()/3;break;case C:Ie=(ue-ie)/6048e5;break;case S:Ie=(ue-ie)/864e5;break;case v:Ie=ue/s;break;case m:Ie=ue/r;break;case h:Ie=ue/n;break;default:Ie=ue}return Oe?Ie:ne.a(Ie)},re.daysInMonth=function(){return this.endOf(A).$D},re.$locale=function(){return X[this.$L]},re.locale=function(pe,fe){if(!pe)return this.$L;var Oe=this.clone(),Ie=Y(pe,fe,!0);return Ie&&(Oe.$L=Ie),Oe},re.clone=function(){return ne.w(this.$d,this)},re.toDate=function(){return new Date(this.valueOf())},re.toJSON=function(){return this.isValid()?this.toISOString():null},re.toISOString=function(){return this.$d.toISOString()},re.toString=function(){return this.$d.toUTCString()},ge}(),_e=Q.prototype;return V.prototype=_e,[["$ms",l],["$s",h],["$m",m],["$H",v],["$W",S],["$M",A],["$y",B],["$D",M]].forEach(function(ge){_e[ge[1]]=function(re){return this.$g(re,ge[0],ge[1])}}),V.extend=function(ge,re){return ge.$i||(ge(re,Q,V),ge.$i=!0),V},V.locale=Y,V.isDayjs=z,V.unix=function(ge){return V(1e3*ge)},V.en=X[H],V.Ls=X,V.p={},V})})(U_);function ye(t,e){return t.replace(/\$(\w+)/g,(n,r)=>String(e[r])||n)}function Lp(t){var e=encodeURI(t),n=btoa(e);return n}class V_ extends c_{constructor(){super(...arguments);k(this,"visitProgram");k(this,"visitGlobalStmt");k(this,"visitBlockStmt");k(this,"visitStmt");k(this,"visitSimpleStmt");k(this,"visitFlowStmt");k(this,"visitBlock");k(this,"visitBlockLine");k(this,"visitVariableDeclarationStmt");k(this,"visitDeclareAssign");k(this,"visitAgainAssign");k(this,"visitVarModifier");k(this,"visitBlockSequence");k(this,"visitExpressionSequence");k(this,"visitExpressionBlockSequence");k(this,"visitVarBlockStmt");k(this,"visitVarSingle");k(this,"visitVarMultiple");k(this,"visitBlockExpression");k(this,"visitParenthesizedExpression");k(this,"visitAdditiveExpression");k(this,"visitRelationalExpression");k(this,"visitTernaryExpression");k(this,"visitLogicalAndExpression");k(this,"visitNameExpression");k(this,"visitLiteralExpression");k(this,"visitLogicalOrExpression");k(this,"visitUnaryExpression");k(this,"visitNotExpression");k(this,"visitMemberIndexExpression");k(this,"visitMethodExpression");k(this,"visitEqualityExpression");k(this,"visitMultiplicativeExpression");k(this,"visitBrackethesized");k(this,"visitArguments");k(this,"visitArgument");k(this,"visitIfStatement");k(this,"visitForToStatement");k(this,"visitForInStatement");k(this,"visitSwitchStatement");k(this,"visitCaseClause");k(this,"visitDefaultCaluse");k(this,"visitWhileStatement");k(this,"visitImportStmt");k(this,"visitImportElement");k(this,"visitLiteral");k(this,"visitMethodStmt");k(this,"visitMethodElement");k(this,"visitMethodName");k(this,"visitArrowFunction");k(this,"visitArrowFunctionParameters");k(this,"visitFormalParameterList");k(this,"visitFormalParameterArg");k(this,"visitArrowMethod");k(this,"visitArrowMethodParameters");k(this,"visitTypeStatement");k(this,"visitTypeElement");k(this,"visitAssignmentOperator");k(this,"visitTypeMap");k(this,"visitTypeSeries");k(this,"visitTypeArray");k(this,"visitTypeGather");k(this,"visitIdentifier");k(this,"visitTypeName");k(this,"visitName");k(this,"visitEnumStatement");k(this,"visitEnumElement")}}class j_ extends V_{constructor(n){super();k(this,"_buildinVariables");k(this,"_buildinTypes");k(this,"_buildinConstants");k(this,"_buildinMethods");k(this,"_buildinFunctions");this._buildinVariables=new Map,this._buildinConstants=new Map,this._buildinFunctions=new Map,this._buildinTypes=new Map,this._buildinMethods=new Map,this._buildinHandle(n)}_buildinHandle(n){for(const r in n){const s=new Map(Object.entries(n[r]));switch(r){case"constants":this._buildinConstants=s;break;case"functions":this._buildinFunctions=s;break;case"methods":this._buildinMethods=s;break;case"types":this._buildinTypes=s;break;case"variables":this._buildinVariables=s;break}}}_typeHandle(n=[],r){if(!n.length)return U.UNDETERMINED;if(n=n.filter(h=>!h.endsWith(U.NA)),!n.length)return`${U.SIMPLE} ${U.NA}`;let s=100,l="";for(const h of n){if(h===U.UNDETERMINED)return U.UNDETERMINED;h.startsWith(U.SERIES)?s=0:h.startsWith(U.SIMPLE)&&s>0?s=1:h.startsWith(U.INPUT)&&s>1?s=2:h.startsWith(U.CONST)&&s>2&&(s=3);const m=this._removePrefix(h);(m!==U.INT||!l)&&(l=m)}return s===100?l:`${Pi[s]} ${r||l}`}_returnTypesOtherHandle(n,r,s,l){if(!s.length||s[0].includes("<>")){const h=n.type;let m=h;if(!h||h===U.UNDETERMINED)return[U.UNDETERMINED];switch(r){case"series <type>":m=this._getArrayType(h),m||(m=this._removePrefix(h)),s=[this._typeAddSeries(m)];break;case"array<type>":case"matrix<type>":case"type[]":if(this._isMapType(h)){const v=this._getMapType(h)||[];l.includes("keys")?m=v[0]:m=v[1]}else m=this._getArrayType(h),m||(m=this._removePrefix(h));s=[this._typeReplace(r,m)];break;case"<matrix_type>":m=this._getArrayType(h),s=[this._typeAddSeries(m)];break;case"map<keyType, valueType>":s=[m];break;case"<value_type>":m=this._getMapType(h),s=[m[1]];break}}return s}_checkMethodThisType(n,r){if(!n||!n.length||n[0].includes("<>"))return!0;const s=r.replace("int","float");return n.some(l=>l===r||s===l||l.endsWith(r))}_priorityComparison(n,r){if(!n)return!1;if(this._isArrayType(n)||this._isMatrixType(n))return this._getArrayType(r)!==U.INT;{const s=this._getPrefix(n),l=this._getPrefix(r);return s===l?!!n.endsWith(U.INT):!(Pi.indexOf(s)<Pi.indexOf(l))}}_compareType(n,r){if(n===U.UNDETERMINED||r===U.UNDETERMINED)return!0;const s=[U.FLOAT,U.INT];if(this._isArrayType(n)||this._isMatrixType(n)){const l=this._getArrayType(n)||"",h=this._getArrayType(r)||"";return l===h||s.includes(l)&&s.includes(h)}else if(this._isMapType(n)){const l=this._getMapType(n)||[],h=this._getMapType(r)||[];return(l[0]===h[0]||s.includes(l[0])&&s.includes(h[0]))&&(l[1]===h[1]||s.includes(l[1])&&s.includes(h[1]))}else{const l=this._removePrefix(n),h=this._removePrefix(r);return l===U.NA||h===U.NA||l===h||s.includes(l)&&s.includes(h)}}_typeAddSeries(n){return this._buildinTypes.get(n)&&n!==U.CHART_POINT?`${U.SERIES} ${n}`:n}_typeAddConst(n){return lu.includes(n)?`${U.CONST} ${n}`:this._typeAddSeries(n)}_getOriginMethodName(n,r){let s="";return this._isArrayType(n)?s=`${U.ARRAY}.${r}`:this._isMatrixType(n)?s=`${U.MATRIX}.${r}`:this._isMapType(n)?s=`${U.MAP}.${r}`:s=`${this._removePrefix(n)}.${r}`,s}_returnedTypesParse(n){if(!n||!n.length)return[];const r=n[0];return/^\[.+\]$/.test(r)?r.replace(/[[\]]/g,"").split(",").map(s=>s.trim()):n}_removePrefix(n=""){return n.replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2")}_getPrefix(n){if(!n)return"";const r=n.replace(/(series|simple|const|input).+/,"$1");return Pi.includes(r)?r:""}_getArrayType(n){let r=/\w+<([\w\d.]+)>/.exec(n);return r||(r=/([\w\d.]+)\[\]/.exec(n)),r==null?void 0:r[1]}_getMapType(n){const r=/\w+<(\w+),\s*([\w\d.]+)>/.exec(n);return(r==null?void 0:r[1])&&(r==null?void 0:r[2])&&[r==null?void 0:r[1],r==null?void 0:r[2]]}_isMatrixType(n){return/^matrix<[\w\d.]+>$/.test(n)}_isArrayType(n){return/^array<[\w\d.]+>$/.test(n)||/^[\w\d.]+\[\]$/.test(n)}_isMapType(n){return/^map<\w+,\s*[\w\d.]+>$/.test(n)}_arrayTypeConvert(n){return!this._isArrayType(n)||!n.includes("<")?n:`${this._getArrayType(n)}[]`}_getMethodTypeName(n){return this._isArrayType(n)?U.ARRAY:this._isMapType(n)?U.MAP:this._isMatrixType(n)?U.MATRIX:this._removePrefix(n)}_typeReplace(n,r){return r===U.UNDETERMINED?r:(r=this._removePrefix(r),this._arrayTypeConvert(n.startsWith(U.SERIES)?n.replace("<type>",r):n.replace("type",r)))}}var Mn=(t=>(t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error",t))(Mn||{});class Mp extends j_{constructor(n,r,s){super(n);k(this,"_loopCount");k(this,"_errors");k(this,"_variables");k(this,"_functions");k(this,"_methods");k(this,"_types");k(this,"_enums");k(this,"_currentBlockVars");k(this,"_currentFuncParams");k(this,"_isNeedCalc");k(this,"_blockCount");k(this,"_isInFunc");k(this,"_currentExportFunc");k(this,"_onlyStatementsCount");k(this,"_blockRanges");k(this,"_overloadsFuncs");k(this,"_hasMemberIndex");k(this,"_isInLocalScop");k(this,"_comments");k(this,"_currentLine",0);k(this,"_hasDrawFunc",!1);k(this,"_hasCreateOrderFunc",!1);k(this,"_scriptType");k(this,"_exportFunctions");k(this,"_exportMethods");k(this,"_exportTypes");k(this,"_exportEnums");k(this,"_exportPositions");k(this,"_description","");k(this,"_endExport");k(this,"_importLibs");k(this,"_getImportLibraryFunc");k(this,"_isEndExpr");k(this,"_inputVarName");k(this,"_hasRequest");k(this,"_strategyFuncName");k(this,"_strategyVarName");k(this,"visitProgram",async n=>{const{children:r}=n;let s=0;const l=[];for(this._pushBlockRanges(n);s<r.length;s++){const h=r[s];h.ruleIndex===F.RULE_globalStmt&&l.push(await this.visit(h))}return this._onlyStatementsCount<=0?this._errors.push({startColumn:0,endColumn:0,startLineNumber:0,endLineNumber:0,type:Mn.Error,message:ye(de.onlyStatementErr,{count:this._onlyStatementsCount})}):this._scriptType===Ii.indicator&&(this._strategyFuncName?this._errorHandle(ye(de.indicatorUseStrategyFuncErr,{name:this._strategyFuncName.name,type:"functions"}),this._strategyFuncName.ctx):this._strategyVarName&&this._errorHandle(ye(de.indicatorUseStrategyFuncErr,{name:this._strategyVarName.name,type:"variables"}),this._strategyVarName.ctx)),l});k(this,"visitGlobalStmt",async n=>{const{children:r}=n;if(r&&r.length){const s=r[0],l=await this.visit(s);return s.ruleIndex===F.RULE_methodStmt&&Sl.includes(l.exprs[0].name)&&(this._onlyStatementsCount++,this._onlyStatementsCount>1?this._errorHandle(ye(de.onlyStatementErr,{count:this._onlyStatementsCount}),s):this._scriptType=l.exprs[0].name),l}return null});k(this,"visitBlockStmt",n=>{const{children:r}=n;let s=0;const l=[];for(;s<r.length;s++){const h=r[s];switch(h.ruleIndex){case F.RULE_variableDeclarationStmt:l.push(...this.visit(h));break;case F.RULE_varBlockStmt:l.push(this.visit(h));break;case F.RULE_blockExpression:l.push(this.visit(h));break}}return l});k(this,"visitStmt",n=>{const{children:r}=n;if(r&&r.length){const s=r[0];return this.visit(s)}return null});k(this,"visitSimpleStmt",n=>{const{children:r}=n;if(r&&r.length){const s=r[0];return this.visit(s)}return null});k(this,"visitFlowStmt",n=>{const{children:r}=n,{column:s,line:l,text:h}=r[0].symbol;if(this._currentLine=l,this._loopCount<=0){const m=s+1;this._errors.push({startColumn:m,endColumn:parseInt(m+h.length),startLineNumber:l,endLineNumber:l,message:ye(de.onlyInLoop,{text:h})})}return{ruleType:le.FlowStmt,value:h}});k(this,"visitBlock",n=>{const{children:r}=n;if(r&&r.length){const s=r[0];return s.ruleIndex===F.RULE_simpleStmt?this._inBlock(s):this.visit(s)}return null});k(this,"visitBlockLine",n=>{const{children:r}=n;if(!r)return null;let s=0;const l=[];this._blockCount++,this._pushBlockRanges(n);const h=this._isEndExpr;for(;s<r.length;s++){const m=r[s];m.ruleIndex===F.RULE_stmt&&(this._isInFunc&&(this._isEndExpr=r.length-2===s&&h),l.push(this.visit(m)))}return this._blockCount--,this._blockRanges.pop(),this._currentBlockVars.splice(this._blockCount+1),l});k(this,"visitDeclareAssign",n=>{var h;const{children:r}=n;let s=0;const l={ruleType:le.DeclareAssign};for(;s<r.length;s++){const m=r[s];switch(m.ruleIndex){case F.RULE_varArrayDeclaration:l.nameList=this.visit(m),this._inputVarName=(h=l.nameList)==null?void 0:h.name;break;case F.RULE_singleExpression:l.value=this.visit(m),this._inputVarName=void 0;break}}return this._variablesHandle(l,n),l});k(this,"visitAgainAssign",n=>{const{children:r,start:s}=n;if(this._currentLine=s.line,r.length>=3){const l=this.visit(r[0]);this._verifyGloablVar(l,r[0]);const h=this.visit(r[2]),m=this.visit(r[1]);return l.type?this._againAssignHandle([l,h],[r[0],r[2]],m):null}return null});k(this,"visitVarModifier",n=>{const{children:r}=n;return r[0].symbol.text});k(this,"visitExpressionSequence",n=>{const{children:r,start:s}=n;let l=0;const h=[];for(this._currentLine=s.line;l<r.length;l++){const m=r[l];if(m.ruleIndex===F.RULE_singleExpression){const v=this.visit(m);v&&(v.ctx=m,h.push(v))}}return h});k(this,"visitExpressionBlockSequence",n=>{const{children:r}=n;let s=0;const l=[];for(;s<r.length;s++){const h=r[s];switch(h.ruleIndex){case F.RULE_singleExpression:l.push(this.visit(h));break;case F.RULE_variableDeclarationList:l.push(this.visit(h));break;case F.RULE_blockExpression:l.push(this.visit(h));break;case F.RULE_varBlockStmt:l.push(this.visit(h));break}}return l});k(this,"visitBlockSequence",n=>{const{children:r}=n;let s=0;const l=[];for(;s<r.length;s++){const h=r[s];switch(h.ruleIndex){case F.RULE_variableDeclarationList:l.push(this.visit(h));break;case F.RULE_singleExpression:l.push(this.visit(h));break}}return l});k(this,"visitVariableDeclarationStmt",n=>{const{children:r}=n;let s=0;const l=[];for(;s<r.length;s++){const h=r[s];switch(h.ruleIndex){case F.RULE_variableDeclarationList:l.push(this.visit(h));break;case F.RULE_methodStmt:const m=this.visit(h);Sl.includes(m.exprs[0].name)&&(this._onlyStatementsCount++,this._onlyStatementsCount>1?this._errorHandle(ye(de.onlyStatementErr,{count:this._onlyStatementsCount}),h):this._scriptType=m.exprs[0].name),l.push(m);break}}return l});k(this,"visitVarBlockStmt",n=>{const{children:r}=n;let s=0;const l={ruleType:le.VarBlockStmt,ctx:n},h=[];for(;s<r.length;s++){const m=r[s];switch(m.ruleIndex){case F.RULE_varArrayDeclaration:l.nameList=this.visit(m);break;case F.RULE_assignmentOperator:l.operator=this.visit(m);break;case F.RULE_name:h.push(m),l.name=this.visit(m);break;case F.RULE_blockExpression:if(this._isNeedCalc=!0,l.value=this.visit(m),!l.value)break;h.push(m);const v=this._getBlockReturnTypes(l.value);v.length===1?l.value.type=v[0]:l.value.types=v,this._isNeedCalc=!1;break}}return l.name?this._againAssignHandle([l.name,l.value],h,l.operator):(this._variablesHandle(l,n),l)});k(this,"visitVarSingle",n=>{const{children:r,start:s}=n,l={ruleType:le.VarSingle};let h=0;const m=this._commentsParser(s.line,[Kt.variable]);l.desc=m==null?void 0:m[Kt.variable],this._currentLine=s.line;let v={lineNumber:0,column:0};for(;h<r.length;h++){const S=r[h];switch(S.ruleIndex){case F.RULE_varModifier:l.declare=this.visit(S);break;case F.RULE_typeGather:const C=this.visit(S);l.prefix=this._getPrefix(C),l.type=C&&this._typeAddConst(C);break;case F.RULE_identifier:const A=this.visit(S);this._repeatVarJudge(A,S),v={lineNumber:S.start.line,column:S.start.column},l.name=A,l.pos=v;break}}return l});k(this,"_commentsParser",(n,r,s=!1)=>{var S;const l=this._comments.filter(C=>C.line<n&&C.line>=this._currentLine),h={},m={line:0,key:"",secKey:""},v=[Kt.field,Kt.param];for(const C of l){const[A,R]=B_.exec(C.text)||[];if(R&&r.includes(R)){const B=C.text.replace(A,"").trim();if(Object.assign(m,{line:C.line,key:R}),v.includes(R)){const[M,...b]=B.split(" ");M&&(Object.assign(m,{secKey:M}),h[R]=Object.assign(h[R]||{},{[M]:b.join(" ").trim()}))}else h[R]=[B]}else if(s&&m.key){const B=C.text.replace("//","").trim();v.includes(m.key)?h[m.key][m.secKey]+=` ${B}`:(S=h[m.key])==null||S.push(B)}}return h});k(this,"visitVarMultiple",n=>{const{children:r,start:s}=n;let l=0;const h=[],m=[];for(this._currentLine=s.line;l<r.length;l++){const v=r[l];if(v.ruleIndex===F.RULE_identifier){const S=this.visit(v);this._repeatVarJudge(S,v),h.push(S),m.push({lineNumber:v.start.line,column:v.start.column})}}return{ruleType:le.VarMultiple,names:h,posList:m}});k(this,"visitBlockExpression",n=>{const{children:r,start:s}=n;if(this._currentLine=s.line,r&&r.length){const l=r[0];return this.visit(l)}return null});k(this,"visitParenthesizedExpression",n=>{const{children:r}=n,s=r[1],l=this.visit(s);return{ruleType:le.ParenthesizedExpression,type:l.type,ctx:n,exprs:l}});k(this,"visitAdditiveExpression",n=>{const{children:r}=n;let s=0,l="";const h=[];for(;s<r.length;s++){const v=r[s];v.ruleIndex===F.RULE_singleExpression?h.push(this.visit(v)):l=v.symbol.text}const m={ruleType:le.AdditiveExpression,operator:l,ctx:n,exprs:h};if(["+","-"].includes(l)){const v=[U.UNDETERMINED,U.INT,U.FLOAT];l==="+"&&v.push(U.STRING);const S=this._sameTypeJudge(h,[r[0],r[2]],l,v);m.type=this._typeHandle(S)}else{const v=this._calcTypeJudge(h[0],r[0],l),S=this._calcTypeJudge(h[1],r[2],l,1);m.type=this._typeHandle([v,S])}return m});k(this,"visitRelationalExpression",n=>{const{children:r}=n;let s=0,l="";const h=[];for(;s<r.length;s++){const S=r[s];S.ruleIndex===F.RULE_singleExpression?h.push(this.visit(S)):l=S.symbol.text}const m=this._calcTypeJudge(h[0],r[0],l),v=this._calcTypeJudge(h[1],r[2],l,1);return{ruleType:le.RelationalExpression,operator:l,ctx:n,type:this._typeHandle([m,v],U.BOOL),exprs:h}});k(this,"visitEqualityExpression",n=>{const{children:r}=n;let s=0,l="";const h=[];for(;s<r.length;s++){const v=r[s];v.ruleIndex===F.RULE_singleExpression?h.push(this.visit(v)):l=v.symbol.text}const m=this._sameTypeJudge(h,[r[0],r[2]],l,[U.UNDETERMINED,U.COLOR,U.STRING,U.BOOL,U.INT,U.FLOAT]);return{ruleType:le.EqualityExpression,operator:l,ctx:n,type:this._typeHandle(m,U.BOOL),exprs:h}});k(this,"visitTernaryExpression",n=>{const{children:r}=n;let s=0;const l=[];for(;s<r.length;s++){const m=r[s];m.ruleIndex===F.RULE_singleExpression&&l.push(this.visit(m))}let h=U.UNDETERMINED;if(l.length>=3){this._boolTypeJudge(l[0],r[0],"?:");const m=this._sameTypeJudge(l.slice(1),[r[2],r[4]],"?:",[]),v=this._getPrefix(l[0].type);h=this._typeHandle(m),v&&this._getPrefix(h)&&(h=this._typeHandle([h,`${v} ${this._removePrefix(h)}`]))}return{ruleType:le.TernaryExpression,type:h,ctx:n,exprs:l}});k(this,"visitNameExpression",n=>{const{children:r}=n;if(r&&r.length){const s=r[0];return this.visit(s)}return null});k(this,"visitLiteralExpression",n=>{const{children:r}=n;if(r&&r.length){const s=r[0];return this.visit(s)}return null});k(this,"visitUnaryExpression",n=>{var S;const{children:r}=n,[s,l]=r,h=[this.visit(l)],m=s.symbol.text,v=this._calcTypeJudge(h[0],l,m);return((S=h[0])==null?void 0:S.ruleType)===le.UnaryExpression&&this._errors.push({message:ye(de.unaryErr,{sign:m}),startColumn:s.symbol.column+1,startLineNumber:s.symbol.line,endColumn:s.symbol.column+2,endLineNumber:s.symbol.line}),{ruleType:le.UnaryExpression,operator:m,type:v,ctx:n,exprs:h}});k(this,"visitNotExpression",n=>{const{children:r}=n,s=r[1],l=[this.visit(s)],h=this._boolTypeJudge(l[0],s,"not");return{ruleType:le.NotExpression,ctx:n,type:this._typeHandle([h],U.BOOL),exprs:l}});k(this,"visitMemberIndexExpression",n=>{var h,m;const{children:r}=n;let s=0;const l=[];for(;s<r.length;s++){const v=r[s];v.ruleIndex===F.RULE_singleExpression&&l.push(this.visit(v))}if(this._memberIndexVerify(l[0],n),this._hasMemberIndex=!0,((h=l[0])==null?void 0:h.ruleType)===le.MemberIndexExpression){const v=r[1];this._errors.push({message:ye(de.unaryErr,{sign:"["}),startColumn:v.symbol.column+1,startLineNumber:v.symbol.line,endColumn:v.symbol.column+2,endLineNumber:v.symbol.line}),this._hasMemberIndex=!1}return{ruleType:le.MemberIndexExpression,type:(m=l[0])==null?void 0:m.type,ctx:n,isInFunc:this._isInFunc,exprs:l}});k(this,"visitMethodStmt",n=>{var C;const{children:r,start:s}=n;let l=0;const h=[],m=[],v=this._commentsParser(s.line,[Kt.description],!0);this._currentLine=s.line;let S;for(;l<r.length;l++){const A=r[l];A.ruleIndex===F.RULE_methodElement&&(h.push(this.visit(A)),m.push(A))}return((C=h[0])==null?void 0:C.name)===Ii.library&&v.description&&(this._description=v.description.join(`
11
+ `));this.indents.length;)this.emitToken(this.createDedent()),this.indents.pop();this.emitToken(this.commonToken(F.EOF,"<EOF>"))}const n=super.nextToken();return this.tokens.length?this.tokens.shift():n}createDedent(){return this.commonToken(F.DEDENT,"")}getCharIndex(){return this._input.index}commonToken(n,r){const s=this.getCharIndex()-1,l=r.length?s-r.length+1:s;return new n_([this,this._input],n,0,l,s)}getIndentationCount(n){let r=0;for(let s=0;s<n.length;s++)n[s]===" "?r+=4-r%4:r++;return r}atStartOfInput(){return this.getCharIndex()===0}openBrace(){this.opened++}closeBrace(){this.opened--}onNewLine(){const n=this.text.replace(/[^\r\n]+/g,""),r=this.text.replace(/[\r\n]+/g,""),s=this._input.LA(1),l=this._input.LA(2),h=this.getIndentationCount(r);if(this.opened>0||l!=-1&&(s===13||s===10||s===47&&l===47||h%4))this.skip();else{this.emitToken(this.commonToken(F.NEWLINE,n));const m=this.indents.length?this.indents[this.indents.length-1]:0;if(h===m)this.skip();else if(h>m)this.indents.push(h),this.emitToken(this.commonToken(F.INDENT,r));else for(;this.indents.length&&this.indents[this.indents.length-1]>h;)this.emitToken(this.createDedent()),this.indents.pop()}}}const we=class we extends P_{constructor(e){super(e),this._interp=new u_(this,we._ATN,we.DecisionsToDFA,new hp)}get grammarFileName(){return"tccScriptLexer.g4"}get literalNames(){return we.literalNames}get symbolicNames(){return we.symbolicNames}get ruleNames(){return we.ruleNames}get serializedATN(){return we._serializedATN}get channelNames(){return we.channelNames}get modeNames(){return we.modeNames}action(e,n,r){switch(n){case 1:this.OpenBracket_action(e,r);break;case 2:this.CloseBracket_action(e,r);break;case 3:this.OpenParen_action(e,r);break;case 4:this.CloseParen_action(e,r);break;case 58:this.NEWLINE_action(e,r);break}}OpenBracket_action(e,n){switch(n){case 0:this.openBrace();break}}CloseBracket_action(e,n){switch(n){case 1:this.closeBrace();break}}OpenParen_action(e,n){switch(n){case 2:this.openBrace();break}}CloseParen_action(e,n){switch(n){case 3:this.closeBrace();break}}NEWLINE_action(e,n){switch(n){case 4:this.onNewLine();break}}sempred(e,n,r){switch(n){case 58:return this.NEWLINE_sempred(e,r)}return!0}NEWLINE_sempred(e,n){switch(n){case 0:return this.atStartOfInput()}return!0}static get _ATN(){return we.__ATN||(we.__ATN=new lp().deserialize(we._serializedATN)),we.__ATN}};k(we,"INDENT",1),k(we,"DEDENT",2),k(we,"Point",3),k(we,"OpenBracket",4),k(we,"CloseBracket",5),k(we,"OpenParen",6),k(we,"CloseParen",7),k(we,"Comma",8),k(we,"Assign",9),k(we,"QuestionMark",10),k(we,"Colon",11),k(we,"Plus",12),k(we,"Minus",13),k(we,"Multiply",14),k(we,"Divide",15),k(we,"Modulus",16),k(we,"Hashtag",17),k(we,"LessThan",18),k(we,"MoreThan",19),k(we,"LessThanEquals",20),k(we,"GreaterThanEquals",21),k(we,"Equals_",22),k(we,"NotEquals",23),k(we,"MultiplyAssign",24),k(we,"DivideAssign",25),k(we,"ModulusAssign",26),k(we,"PlusAssign",27),k(we,"MinusAssign",28),k(we,"ARROW",29),k(we,"ColonEquals",30),k(we,"BooleanLiteral",31),k(we,"IntegerLiteral",32),k(we,"DecimalLiteral",33),k(we,"Break",34),k(we,"And",35),k(we,"Export",36),k(we,"For",37),k(we,"Var",38),k(we,"Continue",39),k(we,"Varip",40),k(we,"Switch",41),k(we,"While",42),k(we,"If",43),k(we,"In",44),k(we,"Or",45),k(we,"Not",46),k(we,"Method",47),k(we,"Else",48),k(we,"To",49),k(we,"By",50),k(we,"Type",51),k(we,"Import",52),k(we,"As",53),k(we,"Enum",54),k(we,"Map",55),k(we,"ColorLiteral",56),k(we,"StringLiteral",57),k(we,"Identifier",58),k(we,"HIDDEN_",59),k(we,"COMMENT_",60),k(we,"NEWLINE",61),k(we,"EOF",pp.EOF),k(we,"channelNames",["DEFAULT_TOKEN_CHANNEL","HIDDEN"]),k(we,"literalNames",[null,null,null,"'.'","'['","']'","'('","')'","','","'='","'?'","':'","'+'","'-'","'*'","'/'","'%'","'#'","'<'","'>'","'<='","'>='","'=='","'!='","'*='","'/='","'%='","'+='","'-='","'=>'","':='",null,null,null,"'break'","'and'","'export'","'for'","'var'","'continue'","'varip'","'switch'","'while'","'if'","'in'","'or'","'not'","'method'","'else'","'to'","'by'","'type'","'import'","'as'","'enum'","'map'"]),k(we,"symbolicNames",[null,"INDENT","DEDENT","Point","OpenBracket","CloseBracket","OpenParen","CloseParen","Comma","Assign","QuestionMark","Colon","Plus","Minus","Multiply","Divide","Modulus","Hashtag","LessThan","MoreThan","LessThanEquals","GreaterThanEquals","Equals_","NotEquals","MultiplyAssign","DivideAssign","ModulusAssign","PlusAssign","MinusAssign","ARROW","ColonEquals","BooleanLiteral","IntegerLiteral","DecimalLiteral","Break","And","Export","For","Var","Continue","Varip","Switch","While","If","In","Or","Not","Method","Else","To","By","Type","Import","As","Enum","Map","ColorLiteral","StringLiteral","Identifier","HIDDEN_","COMMENT_","NEWLINE"]),k(we,"modeNames",["DEFAULT_MODE"]),k(we,"ruleNames",["Point","OpenBracket","CloseBracket","OpenParen","CloseParen","Comma","Assign","QuestionMark","Colon","Plus","Minus","Multiply","Divide","Modulus","Hashtag","LessThan","MoreThan","LessThanEquals","GreaterThanEquals","Equals_","NotEquals","MultiplyAssign","DivideAssign","ModulusAssign","PlusAssign","MinusAssign","ARROW","ColonEquals","BooleanLiteral","IntegerLiteral","DecimalLiteral","Break","And","Export","For","Var","Continue","Varip","Switch","While","If","In","Or","Not","Method","Else","To","By","Type","Import","As","Enum","Map","ColorLiteral","StringLiteral","Identifier","HIDDEN_","COMMENT_","NEWLINE","SHORT_STRING","DIGIT","DIGITS","HEX_DIGIT","SPACES","COMMENT","EXP"]),k(we,"_serializedATN",[4,0,61,447,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,2,21,7,21,2,22,7,22,2,23,7,23,2,24,7,24,2,25,7,25,2,26,7,26,2,27,7,27,2,28,7,28,2,29,7,29,2,30,7,30,2,31,7,31,2,32,7,32,2,33,7,33,2,34,7,34,2,35,7,35,2,36,7,36,2,37,7,37,2,38,7,38,2,39,7,39,2,40,7,40,2,41,7,41,2,42,7,42,2,43,7,43,2,44,7,44,2,45,7,45,2,46,7,46,2,47,7,47,2,48,7,48,2,49,7,49,2,50,7,50,2,51,7,51,2,52,7,52,2,53,7,53,2,54,7,54,2,55,7,55,2,56,7,56,2,57,7,57,2,58,7,58,2,59,7,59,2,60,7,60,2,61,7,61,2,62,7,62,2,63,7,63,2,64,7,64,2,65,7,65,1,0,1,0,1,1,1,1,1,1,1,2,1,2,1,2,1,3,1,3,1,3,1,4,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,17,1,18,1,18,1,18,1,19,1,19,1,19,1,20,1,20,1,20,1,21,1,21,1,21,1,22,1,22,1,22,1,23,1,23,1,23,1,24,1,24,1,24,1,25,1,25,1,25,1,26,1,26,1,26,1,27,1,27,1,27,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,1,28,3,28,214,8,28,1,29,1,29,1,30,1,30,1,30,3,30,221,8,30,1,30,1,30,1,30,1,30,3,30,227,8,30,3,30,229,8,30,1,30,3,30,232,8,30,3,30,234,8,30,1,31,1,31,1,31,1,31,1,31,1,31,1,32,1,32,1,32,1,32,1,33,1,33,1,33,1,33,1,33,1,33,1,33,1,34,1,34,1,34,1,34,1,35,1,35,1,35,1,35,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,36,1,37,1,37,1,37,1,37,1,37,1,37,1,38,1,38,1,38,1,38,1,38,1,38,1,38,1,39,1,39,1,39,1,39,1,39,1,39,1,40,1,40,1,40,1,41,1,41,1,41,1,42,1,42,1,42,1,43,1,43,1,43,1,43,1,44,1,44,1,44,1,44,1,44,1,44,1,44,1,45,1,45,1,45,1,45,1,45,1,46,1,46,1,46,1,47,1,47,1,47,1,48,1,48,1,48,1,48,1,48,1,49,1,49,1,49,1,49,1,49,1,49,1,49,1,50,1,50,1,50,1,51,1,51,1,51,1,51,1,51,1,52,1,52,1,52,1,52,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,1,53,3,53,362,8,53,1,54,1,54,1,55,1,55,5,55,368,8,55,10,55,12,55,371,9,55,1,56,1,56,1,56,1,56,1,57,1,57,1,57,1,57,1,58,1,58,1,58,3,58,384,8,58,1,58,1,58,3,58,388,8,58,1,58,3,58,391,8,58,3,58,393,8,58,1,58,1,58,1,59,1,59,1,59,1,59,5,59,401,8,59,10,59,12,59,404,9,59,1,59,1,59,1,59,1,59,1,59,5,59,411,8,59,10,59,12,59,414,9,59,1,59,3,59,417,8,59,1,60,1,60,1,61,4,61,422,8,61,11,61,12,61,423,1,62,1,62,1,63,4,63,429,8,63,11,63,12,63,430,1,64,1,64,1,64,1,64,5,64,437,8,64,10,64,12,64,440,9,64,1,65,1,65,3,65,444,8,65,1,65,1,65,0,0,66,1,3,3,4,5,5,7,6,9,7,11,8,13,9,15,10,17,11,19,12,21,13,23,14,25,15,27,16,29,17,31,18,33,19,35,20,37,21,39,22,41,23,43,24,45,25,47,26,49,27,51,28,53,29,55,30,57,31,59,32,61,33,63,34,65,35,67,36,69,37,71,38,73,39,75,40,77,41,79,42,81,43,83,44,85,45,87,46,89,47,91,48,93,49,95,50,97,51,99,52,101,53,103,54,105,55,107,56,109,57,111,58,113,59,115,60,117,61,119,0,121,0,123,0,125,0,127,0,129,0,131,0,1,0,10,3,0,65,90,95,95,97,122,4,0,48,57,65,90,95,95,97,122,1,0,39,39,1,0,34,34,1,0,48,57,3,0,48,57,65,70,97,102,3,0,9,9,32,32,160,160,2,0,10,10,12,13,2,0,69,69,101,101,2,0,43,43,45,45,460,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,0,43,1,0,0,0,0,45,1,0,0,0,0,47,1,0,0,0,0,49,1,0,0,0,0,51,1,0,0,0,0,53,1,0,0,0,0,55,1,0,0,0,0,57,1,0,0,0,0,59,1,0,0,0,0,61,1,0,0,0,0,63,1,0,0,0,0,65,1,0,0,0,0,67,1,0,0,0,0,69,1,0,0,0,0,71,1,0,0,0,0,73,1,0,0,0,0,75,1,0,0,0,0,77,1,0,0,0,0,79,1,0,0,0,0,81,1,0,0,0,0,83,1,0,0,0,0,85,1,0,0,0,0,87,1,0,0,0,0,89,1,0,0,0,0,91,1,0,0,0,0,93,1,0,0,0,0,95,1,0,0,0,0,97,1,0,0,0,0,99,1,0,0,0,0,101,1,0,0,0,0,103,1,0,0,0,0,105,1,0,0,0,0,107,1,0,0,0,0,109,1,0,0,0,0,111,1,0,0,0,0,113,1,0,0,0,0,115,1,0,0,0,0,117,1,0,0,0,1,133,1,0,0,0,3,135,1,0,0,0,5,138,1,0,0,0,7,141,1,0,0,0,9,144,1,0,0,0,11,147,1,0,0,0,13,149,1,0,0,0,15,151,1,0,0,0,17,153,1,0,0,0,19,155,1,0,0,0,21,157,1,0,0,0,23,159,1,0,0,0,25,161,1,0,0,0,27,163,1,0,0,0,29,165,1,0,0,0,31,167,1,0,0,0,33,169,1,0,0,0,35,171,1,0,0,0,37,174,1,0,0,0,39,177,1,0,0,0,41,180,1,0,0,0,43,183,1,0,0,0,45,186,1,0,0,0,47,189,1,0,0,0,49,192,1,0,0,0,51,195,1,0,0,0,53,198,1,0,0,0,55,201,1,0,0,0,57,213,1,0,0,0,59,215,1,0,0,0,61,233,1,0,0,0,63,235,1,0,0,0,65,241,1,0,0,0,67,245,1,0,0,0,69,252,1,0,0,0,71,256,1,0,0,0,73,260,1,0,0,0,75,269,1,0,0,0,77,275,1,0,0,0,79,282,1,0,0,0,81,288,1,0,0,0,83,291,1,0,0,0,85,294,1,0,0,0,87,297,1,0,0,0,89,301,1,0,0,0,91,308,1,0,0,0,93,313,1,0,0,0,95,316,1,0,0,0,97,319,1,0,0,0,99,324,1,0,0,0,101,331,1,0,0,0,103,334,1,0,0,0,105,339,1,0,0,0,107,361,1,0,0,0,109,363,1,0,0,0,111,365,1,0,0,0,113,372,1,0,0,0,115,376,1,0,0,0,117,392,1,0,0,0,119,416,1,0,0,0,121,418,1,0,0,0,123,421,1,0,0,0,125,425,1,0,0,0,127,428,1,0,0,0,129,432,1,0,0,0,131,441,1,0,0,0,133,134,5,46,0,0,134,2,1,0,0,0,135,136,5,91,0,0,136,137,6,1,0,0,137,4,1,0,0,0,138,139,5,93,0,0,139,140,6,2,1,0,140,6,1,0,0,0,141,142,5,40,0,0,142,143,6,3,2,0,143,8,1,0,0,0,144,145,5,41,0,0,145,146,6,4,3,0,146,10,1,0,0,0,147,148,5,44,0,0,148,12,1,0,0,0,149,150,5,61,0,0,150,14,1,0,0,0,151,152,5,63,0,0,152,16,1,0,0,0,153,154,5,58,0,0,154,18,1,0,0,0,155,156,5,43,0,0,156,20,1,0,0,0,157,158,5,45,0,0,158,22,1,0,0,0,159,160,5,42,0,0,160,24,1,0,0,0,161,162,5,47,0,0,162,26,1,0,0,0,163,164,5,37,0,0,164,28,1,0,0,0,165,166,5,35,0,0,166,30,1,0,0,0,167,168,5,60,0,0,168,32,1,0,0,0,169,170,5,62,0,0,170,34,1,0,0,0,171,172,5,60,0,0,172,173,5,61,0,0,173,36,1,0,0,0,174,175,5,62,0,0,175,176,5,61,0,0,176,38,1,0,0,0,177,178,5,61,0,0,178,179,5,61,0,0,179,40,1,0,0,0,180,181,5,33,0,0,181,182,5,61,0,0,182,42,1,0,0,0,183,184,5,42,0,0,184,185,5,61,0,0,185,44,1,0,0,0,186,187,5,47,0,0,187,188,5,61,0,0,188,46,1,0,0,0,189,190,5,37,0,0,190,191,5,61,0,0,191,48,1,0,0,0,192,193,5,43,0,0,193,194,5,61,0,0,194,50,1,0,0,0,195,196,5,45,0,0,196,197,5,61,0,0,197,52,1,0,0,0,198,199,5,61,0,0,199,200,5,62,0,0,200,54,1,0,0,0,201,202,5,58,0,0,202,203,5,61,0,0,203,56,1,0,0,0,204,205,5,116,0,0,205,206,5,114,0,0,206,207,5,117,0,0,207,214,5,101,0,0,208,209,5,102,0,0,209,210,5,97,0,0,210,211,5,108,0,0,211,212,5,115,0,0,212,214,5,101,0,0,213,204,1,0,0,0,213,208,1,0,0,0,214,58,1,0,0,0,215,216,3,123,61,0,216,60,1,0,0,0,217,218,5,46,0,0,218,220,3,123,61,0,219,221,3,131,65,0,220,219,1,0,0,0,220,221,1,0,0,0,221,234,1,0,0,0,222,231,3,123,61,0,223,228,5,46,0,0,224,226,3,123,61,0,225,227,3,131,65,0,226,225,1,0,0,0,226,227,1,0,0,0,227,229,1,0,0,0,228,224,1,0,0,0,228,229,1,0,0,0,229,232,1,0,0,0,230,232,3,131,65,0,231,223,1,0,0,0,231,230,1,0,0,0,232,234,1,0,0,0,233,217,1,0,0,0,233,222,1,0,0,0,234,62,1,0,0,0,235,236,5,98,0,0,236,237,5,114,0,0,237,238,5,101,0,0,238,239,5,97,0,0,239,240,5,107,0,0,240,64,1,0,0,0,241,242,5,97,0,0,242,243,5,110,0,0,243,244,5,100,0,0,244,66,1,0,0,0,245,246,5,101,0,0,246,247,5,120,0,0,247,248,5,112,0,0,248,249,5,111,0,0,249,250,5,114,0,0,250,251,5,116,0,0,251,68,1,0,0,0,252,253,5,102,0,0,253,254,5,111,0,0,254,255,5,114,0,0,255,70,1,0,0,0,256,257,5,118,0,0,257,258,5,97,0,0,258,259,5,114,0,0,259,72,1,0,0,0,260,261,5,99,0,0,261,262,5,111,0,0,262,263,5,110,0,0,263,264,5,116,0,0,264,265,5,105,0,0,265,266,5,110,0,0,266,267,5,117,0,0,267,268,5,101,0,0,268,74,1,0,0,0,269,270,5,118,0,0,270,271,5,97,0,0,271,272,5,114,0,0,272,273,5,105,0,0,273,274,5,112,0,0,274,76,1,0,0,0,275,276,5,115,0,0,276,277,5,119,0,0,277,278,5,105,0,0,278,279,5,116,0,0,279,280,5,99,0,0,280,281,5,104,0,0,281,78,1,0,0,0,282,283,5,119,0,0,283,284,5,104,0,0,284,285,5,105,0,0,285,286,5,108,0,0,286,287,5,101,0,0,287,80,1,0,0,0,288,289,5,105,0,0,289,290,5,102,0,0,290,82,1,0,0,0,291,292,5,105,0,0,292,293,5,110,0,0,293,84,1,0,0,0,294,295,5,111,0,0,295,296,5,114,0,0,296,86,1,0,0,0,297,298,5,110,0,0,298,299,5,111,0,0,299,300,5,116,0,0,300,88,1,0,0,0,301,302,5,109,0,0,302,303,5,101,0,0,303,304,5,116,0,0,304,305,5,104,0,0,305,306,5,111,0,0,306,307,5,100,0,0,307,90,1,0,0,0,308,309,5,101,0,0,309,310,5,108,0,0,310,311,5,115,0,0,311,312,5,101,0,0,312,92,1,0,0,0,313,314,5,116,0,0,314,315,5,111,0,0,315,94,1,0,0,0,316,317,5,98,0,0,317,318,5,121,0,0,318,96,1,0,0,0,319,320,5,116,0,0,320,321,5,121,0,0,321,322,5,112,0,0,322,323,5,101,0,0,323,98,1,0,0,0,324,325,5,105,0,0,325,326,5,109,0,0,326,327,5,112,0,0,327,328,5,111,0,0,328,329,5,114,0,0,329,330,5,116,0,0,330,100,1,0,0,0,331,332,5,97,0,0,332,333,5,115,0,0,333,102,1,0,0,0,334,335,5,101,0,0,335,336,5,110,0,0,336,337,5,117,0,0,337,338,5,109,0,0,338,104,1,0,0,0,339,340,5,109,0,0,340,341,5,97,0,0,341,342,5,112,0,0,342,106,1,0,0,0,343,344,5,35,0,0,344,345,3,125,62,0,345,346,3,125,62,0,346,347,3,125,62,0,347,348,3,125,62,0,348,349,3,125,62,0,349,350,3,125,62,0,350,362,1,0,0,0,351,352,5,35,0,0,352,353,3,125,62,0,353,354,3,125,62,0,354,355,3,125,62,0,355,356,3,125,62,0,356,357,3,125,62,0,357,358,3,125,62,0,358,359,3,125,62,0,359,360,3,125,62,0,360,362,1,0,0,0,361,343,1,0,0,0,361,351,1,0,0,0,362,108,1,0,0,0,363,364,3,119,59,0,364,110,1,0,0,0,365,369,7,0,0,0,366,368,7,1,0,0,367,366,1,0,0,0,368,371,1,0,0,0,369,367,1,0,0,0,369,370,1,0,0,0,370,112,1,0,0,0,371,369,1,0,0,0,372,373,3,127,63,0,373,374,1,0,0,0,374,375,6,56,4,0,375,114,1,0,0,0,376,377,3,129,64,0,377,378,1,0,0,0,378,379,6,57,5,0,379,116,1,0,0,0,380,381,4,58,0,0,381,393,3,127,63,0,382,384,5,13,0,0,383,382,1,0,0,0,383,384,1,0,0,0,384,385,1,0,0,0,385,388,5,10,0,0,386,388,2,12,13,0,387,383,1,0,0,0,387,386,1,0,0,0,388,390,1,0,0,0,389,391,3,127,63,0,390,389,1,0,0,0,390,391,1,0,0,0,391,393,1,0,0,0,392,380,1,0,0,0,392,387,1,0,0,0,393,394,1,0,0,0,394,395,6,58,6,0,395,118,1,0,0,0,396,402,5,39,0,0,397,401,8,2,0,0,398,399,5,92,0,0,399,401,5,39,0,0,400,397,1,0,0,0,400,398,1,0,0,0,401,404,1,0,0,0,402,400,1,0,0,0,402,403,1,0,0,0,403,405,1,0,0,0,404,402,1,0,0,0,405,417,5,39,0,0,406,412,5,34,0,0,407,411,8,3,0,0,408,409,5,92,0,0,409,411,5,34,0,0,410,407,1,0,0,0,410,408,1,0,0,0,411,414,1,0,0,0,412,410,1,0,0,0,412,413,1,0,0,0,413,415,1,0,0,0,414,412,1,0,0,0,415,417,5,34,0,0,416,396,1,0,0,0,416,406,1,0,0,0,417,120,1,0,0,0,418,419,7,4,0,0,419,122,1,0,0,0,420,422,3,121,60,0,421,420,1,0,0,0,422,423,1,0,0,0,423,421,1,0,0,0,423,424,1,0,0,0,424,124,1,0,0,0,425,426,7,5,0,0,426,126,1,0,0,0,427,429,7,6,0,0,428,427,1,0,0,0,429,430,1,0,0,0,430,428,1,0,0,0,430,431,1,0,0,0,431,128,1,0,0,0,432,433,5,47,0,0,433,434,5,47,0,0,434,438,1,0,0,0,435,437,8,7,0,0,436,435,1,0,0,0,437,440,1,0,0,0,438,436,1,0,0,0,438,439,1,0,0,0,439,130,1,0,0,0,440,438,1,0,0,0,441,443,7,8,0,0,442,444,7,9,0,0,443,442,1,0,0,0,443,444,1,0,0,0,444,445,1,0,0,0,445,446,3,123,61,0,446,132,1,0,0,0,22,0,213,220,226,228,231,233,361,369,383,387,390,392,400,402,410,412,416,423,430,438,443,7,1,1,0,1,2,1,1,3,2,1,4,3,0,1,0,0,2,0,1,58,4]),k(we,"__ATN"),k(we,"DecisionsToDFA",we._ATN.decisionToState.map((e,n)=>new fp(e,n)));let El=we;var U=(t=>(t.BOOL="bool",t.INT="int",t.FLOAT="float",t.ARRAY="array",t.BOX="box",t.CHART_POINT="chart.point",t.COLOR="color",t.CONST="const",t.LABEL="label",t.LINE="line",t.LINEFILL="linefill",t.MAP="map",t.MATRIX="matrix",t.POLYLINE="polyline",t.SERIES="series",t.SIMPLE="simple",t.STRING="string",t.TABLE="table",t.UNDETERMINED="undetermined type",t.INPUT="input",t.NA="na",t.VOID="void",t.ENUM="enum",t))(U||{}),le=(t=>(t.FlowStmt="FlowStmt",t.DeclareAssign="DeclareAssign",t.VarBlockStmt="VarBlockStmt",t.VarSingle="VarSingle",t.VarMultiple="VarMultiple",t.ParenthesizedExpression="ParenthesizedExpression",t.AdditiveExpression="AdditiveExpression",t.RelationalExpression="RelationalExpression",t.EqualityExpression="EqualityExpression",t.TernaryExpression="TernaryExpression",t.UnaryExpression="UnaryExpression",t.NotExpression="NotExpression",t.MemberIndexExpression="MemberIndexExpression",t.MethodExpression="MethodExpression",t.LogicalAndExpression="LogicalAndExpression",t.LogicalOrExpression="LogicalOrExpression",t.MultiplicativeExpression="MultiplicativeExpression",t.Brackethesized="Brackethesized",t.IfStatement="IfStatement",t.ForToStatement="ForToStatement",t.ForInStatement="ForInStatement",t.SwitchStatement="SwitchStatement",t.CaseClause="CaseClause",t.DefaultCaluse="DefaultCaluse",t.WhileStatement="WhileStatement",t.ImportElement="ImportElement",t.Literal="Literal",t.ArrowFunction="ArrowFunction",t.ArrowMethod="ArrowMethod",t.TypeStatement="TypeStatement",t.Name="Name",t.AgainAssign="AgainAssign",t.EnumStatement="EnumStatement",t))(le||{}),Kt=(t=>(t.description="description",t.field="field",t.function="function",t.param="param",t.returns="returns",t.type="type",t.variable="variable",t.enum="enum",t))(Kt||{}),Ii=(t=>(t.library="library",t.indicator="indicator",t.strategy="strategy",t))(Ii||{});const de={onlyInLoop:"'$text' is only allowed inside loops",invalidType:"Invalid argument 'expr$index' in 'operator SQBR' call",typeUseError:"Cannot specify a type form '$text' without also specifying the type.",notTypeKeyword:"'$text' is not a valid type keyword in variable declaration",undeclared:"Undeclared identifier '$name'",repeatVar:"'$name' is already defined",typeRepeatErr:"$keyword '$name' is already defined.",typeMismatch:"Cannot call '$operator' with argument '$index'. An argument of '$typeE' type was used but a '$typeR' is expected.",assignTypeMismatch:"Cannot assign a value of the `$typeE` type to the '$name' variable. The variable is declared with the `$typeR` type.",voidNotVar:"Void expression cannot be assigned to a variable",declareTypeErr:"Declared type '$type' is not compatible with assigned type '$valueType'",mapKeyValErr:"Cannot put <$typeA, $typeB> pairs into a map containing `$typeC` keys and `$typeD` values. The maps passed into the `$name()` function must have the same key types and value types.",inputSourceErr:"Invalid value for the '$name' parameter of the '$funcName' function. Possible values: [open, high, low, close, hl2, hlc3, ohlc4, hlcc4, volume].",buildInUseErr:"Cannot use '$name' as the default value of a type's field. The default value cannot be a function, variable or calculation.",argsLenErr:"Too many arguments passed into the `$name()` function call. Passed $lenA arguments but expected $lenB.",requiredParamErr:"No value assigned to the `$argName` parameter in $name()",argsSyntaxErr:"Syntax error after the argument for `$argName`. Arguments without their parameter name cannot be used after arguments with parameter names.",requestArgsErr:"Type $type cannot be used in $name '$argName' argument",mapKeyErr:"Incorrect `key` type `$type` in the variable. The `key` type must be one of the following: int, float, string, bool, color.",templateErr:"Incorrect number of arguments for the template: $countA expected, $countB passed.",templateNoSupportErr:"The '$name()' function does not support templates",ifOrSwitchTypeErr:"Return type of one of the '$keyword' blocks is not compatible with return type of other block(s) ($types)",argsNameErr:"The '$name' function does not have an argument with the name '$argName'",noFiledErr:"Object has no field $name",methodNotExistErr:"Could not find method or method reference '$methodName' for '$name'",tupleVarErr:"Syntax error: The quantities of tuple elements on each side of the assignment operator do not match. The right side has $indexA but the left side has $indexB.",tupleLeftVarErr:"Invalid assignment. Cannot assign a tuple to a variable '$name'.",tupleRightVarErr:"Cannot assign a variable to a tuple. The right side must be a function call or structure ('if', 'switch', 'for', 'while') returning a tuple with the same number of elements.",tempateTypeErr:"Syntax error: Only templates for arrays and matrices consist of a single type identifier enclosed in angle brackets.",qualifierErr:"'$name' is not a valid type qualifier. Possible values: 'const', 'simple', 'series'",notFindFuncErr:"Could not find function or function reference '$name'",naVarErr:"Value with NA type cannot be assigned to a variable that was defined without type keyword",notHistoryErr:"Variable '$name' doesn't have history values",defaultValueErr:"The default value cannot be a function, variable or calculation.",defaultValueTypeErr:"Default value of type $typeE can not be assigned to an argument of type $typeR",typeFieldErr:"In a type declaration, all fields without a default value must be explicitly typified.",unaryErr:"Syntax error at input '$sign'",funcArgAssignErr:"Function arguments cannot be mutable ('$name')",declaredErr:"A variable declared with the '$prefix' keyword cannot accept values of the '$type' form. Assign a '$prefix' value to this variable or remove the '$prefix' keyword from its declaration.",globalFuncErr:"Cannot use '$name' in local scope",onlyStatementErr:"Scripts must contain one declaration statement: `indicator()`, `strategy()` or `library()`, Your script has $count.",modifyGlobalVarErr:"Cannot modify global variable '$name' in function",inputDefvalErr:"Arguments of input function must be of constant type, or 'source' builtin variables.",objectIsNaErr:"Cannot access the '$name' $type of an na object. The object is 'na'.",buidinAssignErr:"Cannot assign a new value to the built-in variable '$name'.",buidinVarErr:"Cannot shadow the built-in variable `$name` because it has already been used as a built-in.",useNaErr:"Cannot use an `na` value of an unspecified type in the `$name` function.",libraryTitleErr:"Invalid argument 'title' in 'library' call. It cannot contain spaces, special characters or begin with a digit.",exportFuncArgErr:"All exported functions args should be typified",indiRunErr:"An indicator must contain at least one of the following: any `plot*()` function, `barcolor()`, `bgcolor()`, `hline()`, `alertcondition()`, or any drawing (line, label, box, table, polyline).",libraryExportErr:"A library must contain at least one exported function, method, or type.",strategyRunErr:"A strategy must contain at least one of the following: any `strategy.*()` function that creates orders, any `plot*()` function, `barcolor()`, `bgcolor()`, `hline()`, or any drawing (line, label, box, table, polyline).",exportUseErr:"Only libraries can contain exported $type.",funcRepeatErr:"The '$name' function has overloads with the same parameters. The type of parameters must be different in overloaded versions of functions.",importMultipleErr:"Cannot import a library more than once",importNotExitErr:"The user '$username' does not have a published library titled '$libraryName'",importNameRepeatErr:"More than one import uses the same alias: $name. Previous usage at line: $line",exportFuncHasInputErr:"The exported function '$func' depends on the '$name' input variable, which is not allowed.",libraryTitleIsKeywordErr:"Invalid argument 'title' in 'library' call. Token: '$name' can't be used as library title.",exportFuncUseGlobalVarErr:"Cannot use global variables in exported functions. Function: $func",loopRuntimeErr:"Loop takes too long to execute (> 500 ms)",paramsErr:"Invalid value '$value' for '$param' parameter of the '$func' function. Possible values: $targetVal",displayErr:"Invalid argument 'display' in '$func' call. Possible values: $values",exportFuncUseReqErr:"Cannot use `request.*()` call in exported function `$name()`",requestExprErr:"Type series $type cannot be used in $name 'expression' argument",argDefaultErr:"The default value assigned to a parameter must be either a literal value (e.g., `5`) or a built-in variable (e.g., `close`)",overloadFuncErr:"Cannot use global variables or any values qualified as 'input' in the local scopes of overloaded functions or methods. Remove any global variables or inputs from the scopes of all '$name()' overloads.",againAssignErr:"Unable to determine the object for the field assignment. Try putting the object into a separate variable before assigning values to its fields.",requestUserInLoopErr:"Cannot use `request.*()` call within loops or conditional structures.",enumVarNameErr:"Invalid enum name '$name': `bool`, `int`, `float`, `string`, and `color` are not allowed.",enumVarNameBuiltinErr:"Invalid object name: $name. Namespaces of built-ins cannot be used.",typeNameErr:"Invalid user-defined type name '$name': `bool`, `int`, `float`, `string`, and `color` are not allowed.",enumUseErr:"Cannot use the '$name' as a value. Use one of the enum's fields instead.",conditionalErr:"'$name' conditional expression must be of a bool type!",fortoErr:'The value of the "for" loop must be a number.',indicatorUseStrategyFuncErr:"You cannot use strategy $type ($name) in indicator script.",arrEmptyErr:"Array must not be empty",arrLengthDiffErr:"Arrays have different lengths",arrTypeErr:"数组类型错误,array.$name方法只能使用$type类型数组!",inputOptErr:"input's defval should be in options, but '$defval' is not in [$args]",mathRandomErr:"min must be less than max",matrixRehapeErr:"New matrix must be of same area as original matrix",strategyExitErr:"strategy.exit must have at least one of the following parameters: 'profit', 'limit', 'loss', 'stop' or one of the following pairs: 'trail_offset' and 'trail_price' / 'trail_points'. To close the position at market price, use 'strategy.close'",arrLenErr:"Invalid array length",mergeCellErr:"error: start_column > end_column or start_row > end_row"},Dr={repeatVar:"Shadowing variable '$name' which exists in parent scope. Did you want to use the ':=' operator instead of '=' ?",typeMismatch:"The `$index` parameter of the `$operator` function accepts a '$type' argument. To avoid potential unexpected results, pass a '$type' value or expression to this parameter.",moreSameArg:"More than one '$arg' arguments are supplied. Only the first one will be used.",localScopeGetHistory:"The variable '$name' is declared in local scope, which may not be executed at every update. So, obtaining its historical values may lead to unexpected results",localScopeWarning:"The function '$name' should be called on each calculation for consistency. It is recommended to extract the call from this scope",strategyCalcTickWarn:"Strategies without `calc_on_every_tick = true` only calculate on confirmed chart bars. In this case, `barstate.islast` may not initially return `true` on realtime bars, as the last bar is unconfirmed until it closes. If you need to check whether a bar is the latest before it closes, enable `calc_on_every_tick` in the `strategy()` function.",conditionWarning:"The `condition` parameter of the `$name` accepts a 'bool' argument. To avoid potential unexpected results, pass a 'bool' value or expression to this parameter.",lineWidthWarning:"Passing a value below 1 to `linewidth` will be replaced with 1 during compilation."},Pi=[U.SERIES,U.SIMPLE,U.INPUT,U.CONST],lu=[U.INT,U.FLOAT,U.BOOL,U.COLOR,U.STRING],Sl=["indicator","strategy","library"],Tl=["plot","plotbar","plotchar","plotarrow","plotshape","plotcandle","hline","alertcondition","barcolor","bgcolor","fill"],F_=[...Tl,"indicator","library","strategy","strategy.risk.max_drawdown","strategy.risk.allow_entry_in","strategy.risk.max_cons_loss_days","max_intraday_filled_orders","strategy.risk.max_intraday_loss","strategy.risk.max_position_size"],L_=[...Tl,"table.new","label.new","line.new","box.new","polyline.new","linefill.new"],M_=["strategy.entry","strategy.order","strategy.exit","strategy.close","strategy.cancel","strategy.close_all","strategy.cancel_all"],Ip=["strategy","input","table","color","line","linefill","label","box"],Al=["close","open","high","low","hl2","hlc3","hlcc4","ohlc4","volume"],B_=/^\/\/\s*@(description|field|function|param|returns|type|enum|variable)/,kn=["case","catch","default","delete","do","finally","function","instanceof","new","return","this","throw","try","typeof","void","with"],Pp=["session","ta","syminfo","timeframe","strategy","barstate","label","line","linefill","box","table","chart","earnings","polyline","math","adjustment","hline","position","size","plot","format","dayofweek","shape","location","scale","currency","barmerge","xloc","yloc","extend","display","text","font","order","alert","dividends","splits","color","input","str","request","ticker","array","matrix","runtime","log","map"];var Fp=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},U_={exports:{}};(function(t,e){(function(n,r){t.exports=r()})(Fp,function(){var n=1e3,r=6e4,s=36e5,l="millisecond",h="second",m="minute",v="hour",S="day",C="week",A="month",R="quarter",B="year",M="date",b="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,g=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,O={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(ge){var re=["th","st","nd","rd"],pe=ge%100;return"["+ge+(re[(pe-20)%10]||re[pe]||re[0])+"]"}},w=function(ge,re,pe){var fe=String(ge);return!fe||fe.length>=re?ge:""+Array(re+1-fe.length).join(pe)+ge},D={s:w,z:function(ge){var re=-ge.utcOffset(),pe=Math.abs(re),fe=Math.floor(pe/60),Oe=pe%60;return(re<=0?"+":"-")+w(fe,2,"0")+":"+w(Oe,2,"0")},m:function ge(re,pe){if(re.date()<pe.date())return-ge(pe,re);var fe=12*(pe.year()-re.year())+(pe.month()-re.month()),Oe=re.clone().add(fe,A),Ie=pe-Oe<0,ve=re.clone().add(fe+(Ie?-1:1),A);return+(-(fe+(pe-Oe)/(Ie?Oe-ve:ve-Oe))||0)},a:function(ge){return ge<0?Math.ceil(ge)||0:Math.floor(ge)},p:function(ge){return{M:A,y:B,w:C,d:S,D:M,h:v,m,s:h,ms:l,Q:R}[ge]||String(ge||"").toLowerCase().replace(/s$/,"")},u:function(ge){return ge===void 0}},H="en",X={};X[H]=O;var ee="$isDayjsObject",z=function(ge){return ge instanceof Q||!(!ge||!ge[ee])},Y=function ge(re,pe,fe){var Oe;if(!re)return H;if(typeof re=="string"){var Ie=re.toLowerCase();X[Ie]&&(Oe=Ie),pe&&(X[Ie]=pe,Oe=Ie);var ve=re.split("-");if(!Oe&&ve.length>1)return ge(ve[0])}else{var Ue=re.name;X[Ue]=re,Oe=Ue}return!fe&&Oe&&(H=Oe),Oe||!fe&&H},V=function(ge,re){if(z(ge))return ge.clone();var pe=typeof re=="object"?re:{};return pe.date=ge,pe.args=arguments,new Q(pe)},ne=D;ne.l=Y,ne.i=z,ne.w=function(ge,re){return V(ge,{locale:re.$L,utc:re.$u,x:re.$x,$offset:re.$offset})};var Q=function(){function ge(pe){this.$L=Y(pe.locale,null,!0),this.parse(pe),this.$x=this.$x||pe.x||{},this[ee]=!0}var re=ge.prototype;return re.parse=function(pe){this.$d=function(fe){var Oe=fe.date,Ie=fe.utc;if(Oe===null)return new Date(NaN);if(ne.u(Oe))return new Date;if(Oe instanceof Date)return new Date(Oe);if(typeof Oe=="string"&&!/Z$/i.test(Oe)){var ve=Oe.match(y);if(ve){var Ue=ve[2]-1||0,J=(ve[7]||"0").substring(0,3);return Ie?new Date(Date.UTC(ve[1],Ue,ve[3]||1,ve[4]||0,ve[5]||0,ve[6]||0,J)):new Date(ve[1],Ue,ve[3]||1,ve[4]||0,ve[5]||0,ve[6]||0,J)}}return new Date(Oe)}(pe),this.init()},re.init=function(){var pe=this.$d;this.$y=pe.getFullYear(),this.$M=pe.getMonth(),this.$D=pe.getDate(),this.$W=pe.getDay(),this.$H=pe.getHours(),this.$m=pe.getMinutes(),this.$s=pe.getSeconds(),this.$ms=pe.getMilliseconds()},re.$utils=function(){return ne},re.isValid=function(){return this.$d.toString()!==b},re.isSame=function(pe,fe){var Oe=V(pe);return this.startOf(fe)<=Oe&&Oe<=this.endOf(fe)},re.isAfter=function(pe,fe){return V(pe)<this.startOf(fe)},re.isBefore=function(pe,fe){return this.endOf(fe)<V(pe)},re.$g=function(pe,fe,Oe){return ne.u(pe)?this[fe]:this.set(Oe,pe)},re.unix=function(){return Math.floor(this.valueOf()/1e3)},re.valueOf=function(){return this.$d.getTime()},re.startOf=function(pe,fe){var Oe=this,Ie=!!ne.u(fe)||fe,ve=ne.p(pe),Ue=function(Et,Mt){var gt=ne.w(Oe.$u?Date.UTC(Oe.$y,Mt,Et):new Date(Oe.$y,Mt,Et),Oe);return Ie?gt:gt.endOf(S)},J=function(Et,Mt){return ne.w(Oe.toDate()[Et].apply(Oe.toDate("s"),(Ie?[0,0,0,0]:[23,59,59,999]).slice(Mt)),Oe)},ie=this.$W,ue=this.$M,Ae=this.$D,be="set"+(this.$u?"UTC":"");switch(ve){case B:return Ie?Ue(1,0):Ue(31,11);case A:return Ie?Ue(1,ue):Ue(0,ue+1);case C:var At=this.$locale().weekStart||0,jt=(ie<At?ie+7:ie)-At;return Ue(Ie?Ae-jt:Ae+(6-jt),ue);case S:case M:return J(be+"Hours",0);case v:return J(be+"Minutes",1);case m:return J(be+"Seconds",2);case h:return J(be+"Milliseconds",3);default:return this.clone()}},re.endOf=function(pe){return this.startOf(pe,!1)},re.$set=function(pe,fe){var Oe,Ie=ne.p(pe),ve="set"+(this.$u?"UTC":""),Ue=(Oe={},Oe[S]=ve+"Date",Oe[M]=ve+"Date",Oe[A]=ve+"Month",Oe[B]=ve+"FullYear",Oe[v]=ve+"Hours",Oe[m]=ve+"Minutes",Oe[h]=ve+"Seconds",Oe[l]=ve+"Milliseconds",Oe)[Ie],J=Ie===S?this.$D+(fe-this.$W):fe;if(Ie===A||Ie===B){var ie=this.clone().set(M,1);ie.$d[Ue](J),ie.init(),this.$d=ie.set(M,Math.min(this.$D,ie.daysInMonth())).$d}else Ue&&this.$d[Ue](J);return this.init(),this},re.set=function(pe,fe){return this.clone().$set(pe,fe)},re.get=function(pe){return this[ne.p(pe)]()},re.add=function(pe,fe){var Oe,Ie=this;pe=Number(pe);var ve=ne.p(fe),Ue=function(ue){var Ae=V(Ie);return ne.w(Ae.date(Ae.date()+Math.round(ue*pe)),Ie)};if(ve===A)return this.set(A,this.$M+pe);if(ve===B)return this.set(B,this.$y+pe);if(ve===S)return Ue(1);if(ve===C)return Ue(7);var J=(Oe={},Oe[m]=r,Oe[v]=s,Oe[h]=n,Oe)[ve]||1,ie=this.$d.getTime()+pe*J;return ne.w(ie,this)},re.subtract=function(pe,fe){return this.add(-1*pe,fe)},re.format=function(pe){var fe=this,Oe=this.$locale();if(!this.isValid())return Oe.invalidDate||b;var Ie=pe||"YYYY-MM-DDTHH:mm:ssZ",ve=ne.z(this),Ue=this.$H,J=this.$m,ie=this.$M,ue=Oe.weekdays,Ae=Oe.months,be=Oe.meridiem,At=function(Mt,gt,Ot,Zt){return Mt&&(Mt[gt]||Mt(fe,Ie))||Ot[gt].slice(0,Zt)},jt=function(Mt){return ne.s(Ue%12||12,Mt,"0")},Et=be||function(Mt,gt,Ot){var Zt=Mt<12?"AM":"PM";return Ot?Zt.toLowerCase():Zt};return Ie.replace(g,function(Mt,gt){return gt||function(Ot){switch(Ot){case"YY":return String(fe.$y).slice(-2);case"YYYY":return ne.s(fe.$y,4,"0");case"M":return ie+1;case"MM":return ne.s(ie+1,2,"0");case"MMM":return At(Oe.monthsShort,ie,Ae,3);case"MMMM":return At(Ae,ie);case"D":return fe.$D;case"DD":return ne.s(fe.$D,2,"0");case"d":return String(fe.$W);case"dd":return At(Oe.weekdaysMin,fe.$W,ue,2);case"ddd":return At(Oe.weekdaysShort,fe.$W,ue,3);case"dddd":return ue[fe.$W];case"H":return String(Ue);case"HH":return ne.s(Ue,2,"0");case"h":return jt(1);case"hh":return jt(2);case"a":return Et(Ue,J,!0);case"A":return Et(Ue,J,!1);case"m":return String(J);case"mm":return ne.s(J,2,"0");case"s":return String(fe.$s);case"ss":return ne.s(fe.$s,2,"0");case"SSS":return ne.s(fe.$ms,3,"0");case"Z":return ve}return null}(Mt)||ve.replace(":","")})},re.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},re.diff=function(pe,fe,Oe){var Ie,ve=this,Ue=ne.p(fe),J=V(pe),ie=(J.utcOffset()-this.utcOffset())*r,ue=this-J,Ae=function(){return ne.m(ve,J)};switch(Ue){case B:Ie=Ae()/12;break;case A:Ie=Ae();break;case R:Ie=Ae()/3;break;case C:Ie=(ue-ie)/6048e5;break;case S:Ie=(ue-ie)/864e5;break;case v:Ie=ue/s;break;case m:Ie=ue/r;break;case h:Ie=ue/n;break;default:Ie=ue}return Oe?Ie:ne.a(Ie)},re.daysInMonth=function(){return this.endOf(A).$D},re.$locale=function(){return X[this.$L]},re.locale=function(pe,fe){if(!pe)return this.$L;var Oe=this.clone(),Ie=Y(pe,fe,!0);return Ie&&(Oe.$L=Ie),Oe},re.clone=function(){return ne.w(this.$d,this)},re.toDate=function(){return new Date(this.valueOf())},re.toJSON=function(){return this.isValid()?this.toISOString():null},re.toISOString=function(){return this.$d.toISOString()},re.toString=function(){return this.$d.toUTCString()},ge}(),_e=Q.prototype;return V.prototype=_e,[["$ms",l],["$s",h],["$m",m],["$H",v],["$W",S],["$M",A],["$y",B],["$D",M]].forEach(function(ge){_e[ge[1]]=function(re){return this.$g(re,ge[0],ge[1])}}),V.extend=function(ge,re){return ge.$i||(ge(re,Q,V),ge.$i=!0),V},V.locale=Y,V.isDayjs=z,V.unix=function(ge){return V(1e3*ge)},V.en=X[H],V.Ls=X,V.p={},V})})(U_);function ye(t,e){return t.replace(/\$(\w+)/g,(n,r)=>String(e[r])||n)}function Lp(t){var e=encodeURI(t),n=btoa(e);return n}class V_ extends c_{constructor(){super(...arguments);k(this,"visitProgram");k(this,"visitGlobalStmt");k(this,"visitBlockStmt");k(this,"visitStmt");k(this,"visitSimpleStmt");k(this,"visitFlowStmt");k(this,"visitBlock");k(this,"visitBlockLine");k(this,"visitVariableDeclarationStmt");k(this,"visitDeclareAssign");k(this,"visitAgainAssign");k(this,"visitVarModifier");k(this,"visitBlockSequence");k(this,"visitExpressionSequence");k(this,"visitExpressionBlockSequence");k(this,"visitVarBlockStmt");k(this,"visitVarSingle");k(this,"visitVarMultiple");k(this,"visitBlockExpression");k(this,"visitParenthesizedExpression");k(this,"visitAdditiveExpression");k(this,"visitRelationalExpression");k(this,"visitTernaryExpression");k(this,"visitLogicalAndExpression");k(this,"visitNameExpression");k(this,"visitLiteralExpression");k(this,"visitLogicalOrExpression");k(this,"visitUnaryExpression");k(this,"visitNotExpression");k(this,"visitMemberIndexExpression");k(this,"visitMethodExpression");k(this,"visitEqualityExpression");k(this,"visitMultiplicativeExpression");k(this,"visitBrackethesized");k(this,"visitArguments");k(this,"visitArgument");k(this,"visitIfStatement");k(this,"visitForToStatement");k(this,"visitForInStatement");k(this,"visitSwitchStatement");k(this,"visitCaseClause");k(this,"visitDefaultCaluse");k(this,"visitWhileStatement");k(this,"visitImportStmt");k(this,"visitImportElement");k(this,"visitLiteral");k(this,"visitMethodStmt");k(this,"visitMethodElement");k(this,"visitMethodName");k(this,"visitArrowFunction");k(this,"visitArrowFunctionParameters");k(this,"visitFormalParameterList");k(this,"visitFormalParameterArg");k(this,"visitArrowMethod");k(this,"visitArrowMethodParameters");k(this,"visitTypeStatement");k(this,"visitTypeElement");k(this,"visitAssignmentOperator");k(this,"visitTypeMap");k(this,"visitTypeSeries");k(this,"visitTypeArray");k(this,"visitTypeGather");k(this,"visitIdentifier");k(this,"visitTypeName");k(this,"visitName");k(this,"visitEnumStatement");k(this,"visitEnumElement")}}class j_ extends V_{constructor(n){super();k(this,"_buildinVariables");k(this,"_buildinTypes");k(this,"_buildinConstants");k(this,"_buildinMethods");k(this,"_buildinFunctions");this._buildinVariables=new Map,this._buildinConstants=new Map,this._buildinFunctions=new Map,this._buildinTypes=new Map,this._buildinMethods=new Map,this._buildinHandle(n)}_buildinHandle(n){for(const r in n){const s=new Map(Object.entries(n[r]));switch(r){case"constants":this._buildinConstants=s;break;case"functions":this._buildinFunctions=s;break;case"methods":this._buildinMethods=s;break;case"types":this._buildinTypes=s;break;case"variables":this._buildinVariables=s;break}}}_typeHandle(n=[],r){if(!n.length)return U.UNDETERMINED;if(n=n.filter(h=>!h.endsWith(U.NA)),!n.length)return`${U.SIMPLE} ${U.NA}`;let s=100,l="";for(const h of n){if(h===U.UNDETERMINED)return U.UNDETERMINED;h.startsWith(U.SERIES)?s=0:h.startsWith(U.SIMPLE)&&s>0?s=1:h.startsWith(U.INPUT)&&s>1?s=2:h.startsWith(U.CONST)&&s>2&&(s=3);const m=this._removePrefix(h);(m!==U.INT||!l)&&(l=m)}return s===100?l:`${Pi[s]} ${r||l}`}_returnTypesOtherHandle(n,r,s,l){if(!s.length||s[0].includes("<>")){const h=n.type;let m=h;if(!h||h===U.UNDETERMINED)return[U.UNDETERMINED];switch(r){case"series <type>":m=this._getArrayType(h),m||(m=this._removePrefix(h)),s=[this._typeAddSeries(m)];break;case"array<type>":case"matrix<type>":case"type[]":if(this._isMapType(h)){const v=this._getMapType(h)||[];l.includes("keys")?m=v[0]:m=v[1]}else m=this._getArrayType(h),m||(m=this._removePrefix(h));s=[this._typeReplace(r,m)];break;case"<matrix_type>":m=this._getArrayType(h),s=[this._typeAddSeries(m)];break;case"map<keyType, valueType>":s=[m];break;case"<value_type>":m=this._getMapType(h),s=[m[1]];break}}return s}_checkMethodThisType(n,r){if(!n||!n.length||n[0].includes("<>"))return!0;const s=r.replace("int","float");return n.some(l=>l===r||s===l||l.endsWith(r))}_priorityComparison(n,r){if(!n)return!1;if(this._isArrayType(n)||this._isMatrixType(n))return this._getArrayType(r)!==U.INT;{const s=this._getPrefix(n),l=this._getPrefix(r);return s===l?!!n.endsWith(U.INT):!(Pi.indexOf(s)<Pi.indexOf(l))}}_compareType(n,r){if(n===U.UNDETERMINED||r===U.UNDETERMINED)return!0;const s=[U.FLOAT,U.INT];if(this._isArrayType(n)||this._isMatrixType(n)){const l=this._getArrayType(n)||"",h=this._getArrayType(r)||"";return l===h||s.includes(l)&&s.includes(h)}else if(this._isMapType(n)){const l=this._getMapType(n)||[],h=this._getMapType(r)||[];return(l[0]===h[0]||s.includes(l[0])&&s.includes(h[0]))&&(l[1]===h[1]||s.includes(l[1])&&s.includes(h[1]))}else{const l=this._removePrefix(n),h=this._removePrefix(r);return l===U.NA||h===U.NA||l===h||s.includes(l)&&s.includes(h)}}_typeAddSeries(n){return this._buildinTypes.get(n)&&n!==U.CHART_POINT?`${U.SERIES} ${n}`:n}_typeAddConst(n){return lu.includes(n)?`${U.CONST} ${n}`:this._typeAddSeries(n)}_getOriginMethodName(n,r){let s="";return this._isArrayType(n)?s=`${U.ARRAY}.${r}`:this._isMatrixType(n)?s=`${U.MATRIX}.${r}`:this._isMapType(n)?s=`${U.MAP}.${r}`:s=`${this._removePrefix(n)}.${r}`,s}_returnedTypesParse(n){if(!n||!n.length)return[];const r=n[0];return/^\[.+\]$/.test(r)?r.replace(/[[\]]/g,"").split(",").map(s=>s.trim()):n}_removePrefix(n=""){return n.replace(/(series|simple|const|input)\s+([\w\d.]+)/,"$2")}_getPrefix(n){if(!n)return"";const r=n.replace(/(series|simple|const|input).+/,"$1");return Pi.includes(r)?r:""}_getArrayType(n){let r=/\w+<([\w\d.]+)>/.exec(n);return r||(r=/([\w\d.]+)\[\]/.exec(n)),r==null?void 0:r[1]}_getMapType(n){const r=/\w+<(\w+),\s*([\w\d.]+)>/.exec(n);return(r==null?void 0:r[1])&&(r==null?void 0:r[2])&&[r==null?void 0:r[1],r==null?void 0:r[2]]}_isMatrixType(n){return/^matrix<[\w\d.]+>$/.test(n)}_isArrayType(n){return/^array<[\w\d.]+>$/.test(n)||/^[\w\d.]+\[\]$/.test(n)}_isMapType(n){return/^map<\w+,\s*[\w\d.]+>$/.test(n)}_arrayTypeConvert(n){return!this._isArrayType(n)||!n.includes("<")?n:`${this._getArrayType(n)}[]`}_getMethodTypeName(n){return this._isArrayType(n)?U.ARRAY:this._isMapType(n)?U.MAP:this._isMatrixType(n)?U.MATRIX:this._removePrefix(n)}_typeReplace(n,r){return r===U.UNDETERMINED?r:(r=this._removePrefix(r),this._arrayTypeConvert(n.startsWith(U.SERIES)?n.replace("<type>",r):n.replace("type",r)))}}var Mn=(t=>(t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error",t))(Mn||{});class Mp extends j_{constructor(n,r,s){super(n);k(this,"_loopCount");k(this,"_errors");k(this,"_variables");k(this,"_functions");k(this,"_methods");k(this,"_types");k(this,"_enums");k(this,"_currentBlockVars");k(this,"_currentFuncParams");k(this,"_isNeedCalc");k(this,"_blockCount");k(this,"_isInFunc");k(this,"_currentExportFunc");k(this,"_onlyStatementsCount");k(this,"_blockRanges");k(this,"_overloadsFuncs");k(this,"_hasMemberIndex");k(this,"_isInLocalScop");k(this,"_comments");k(this,"_currentLine",0);k(this,"_hasDrawFunc",!1);k(this,"_hasCreateOrderFunc",!1);k(this,"_scriptType");k(this,"_exportFunctions");k(this,"_exportMethods");k(this,"_exportTypes");k(this,"_exportEnums");k(this,"_exportPositions");k(this,"_description","");k(this,"_endExport");k(this,"_importLibs");k(this,"_getImportLibraryFunc");k(this,"_isEndExpr");k(this,"_inputVarName");k(this,"_hasRequest");k(this,"_strategyFuncName");k(this,"_strategyVarName");k(this,"visitProgram",async n=>{const{children:r}=n;let s=0;const l=[];for(this._pushBlockRanges(n);s<r.length;s++){const h=r[s];h.ruleIndex===F.RULE_globalStmt&&l.push(await this.visit(h))}return this._onlyStatementsCount<=0?this._errors.push({startColumn:0,endColumn:0,startLineNumber:0,endLineNumber:0,type:Mn.Error,message:ye(de.onlyStatementErr,{count:this._onlyStatementsCount})}):this._scriptType===Ii.indicator&&(this._strategyFuncName?this._errorHandle(ye(de.indicatorUseStrategyFuncErr,{name:this._strategyFuncName.name,type:"functions"}),this._strategyFuncName.ctx):this._strategyVarName&&this._errorHandle(ye(de.indicatorUseStrategyFuncErr,{name:this._strategyVarName.name,type:"variables"}),this._strategyVarName.ctx)),l});k(this,"visitGlobalStmt",async n=>{const{children:r}=n;if(r&&r.length){const s=r[0],l=await this.visit(s);return s.ruleIndex===F.RULE_methodStmt&&Sl.includes(l.exprs[0].name)&&(this._onlyStatementsCount++,this._onlyStatementsCount>1?this._errorHandle(ye(de.onlyStatementErr,{count:this._onlyStatementsCount}),s):this._scriptType=l.exprs[0].name),l}return null});k(this,"visitBlockStmt",n=>{const{children:r}=n;let s=0;const l=[];for(;s<r.length;s++){const h=r[s];switch(h.ruleIndex){case F.RULE_variableDeclarationStmt:l.push(...this.visit(h));break;case F.RULE_varBlockStmt:l.push(this.visit(h));break;case F.RULE_blockExpression:l.push(this.visit(h));break}}return l});k(this,"visitStmt",n=>{const{children:r}=n;if(r&&r.length){const s=r[0];return this.visit(s)}return null});k(this,"visitSimpleStmt",n=>{const{children:r}=n;if(r&&r.length){const s=r[0];return this.visit(s)}return null});k(this,"visitFlowStmt",n=>{const{children:r}=n,{column:s,line:l,text:h}=r[0].symbol;if(this._currentLine=l,this._loopCount<=0){const m=s+1;this._errors.push({startColumn:m,endColumn:parseInt(m+h.length),startLineNumber:l,endLineNumber:l,message:ye(de.onlyInLoop,{text:h})})}return{ruleType:le.FlowStmt,value:h}});k(this,"visitBlock",n=>{const{children:r}=n;if(r&&r.length){const s=r[0];return s.ruleIndex===F.RULE_simpleStmt?this._inBlock(s):this.visit(s)}return null});k(this,"visitBlockLine",n=>{const{children:r}=n;if(!r)return null;let s=0;const l=[];this._blockCount++,this._pushBlockRanges(n);const h=this._isEndExpr;for(;s<r.length;s++){const m=r[s];m.ruleIndex===F.RULE_stmt&&(this._isInFunc&&(this._isEndExpr=r.length-2===s&&h),l.push(this.visit(m)))}return this._blockCount--,this._blockRanges.pop(),this._currentBlockVars.splice(this._blockCount+1),l});k(this,"visitDeclareAssign",n=>{var h;const{children:r}=n;let s=0;const l={ruleType:le.DeclareAssign};for(;s<r.length;s++){const m=r[s];switch(m.ruleIndex){case F.RULE_varArrayDeclaration:l.nameList=this.visit(m),this._inputVarName=(h=l.nameList)==null?void 0:h.name;break;case F.RULE_singleExpression:l.value=this.visit(m),this._inputVarName=void 0;break}}return this._variablesHandle(l,n),l});k(this,"visitAgainAssign",n=>{const{children:r,start:s}=n;if(this._currentLine=s.line,r.length>=3){const l=this.visit(r[0]);this._verifyGloablVar(l,r[0]);const h=this.visit(r[2]),m=this.visit(r[1]);return l.type?this._againAssignHandle([l,h],[r[0],r[2]],m):null}return null});k(this,"visitVarModifier",n=>{const{children:r}=n;return r[0].symbol.text});k(this,"visitExpressionSequence",n=>{const{children:r,start:s}=n;let l=0;const h=[];for(this._currentLine=s.line;l<r.length;l++){const m=r[l];if(m.ruleIndex===F.RULE_singleExpression){const v=this.visit(m);v&&(v.ctx=m,h.push(v))}}return h});k(this,"visitExpressionBlockSequence",n=>{const{children:r}=n;let s=0;const l=[];for(;s<r.length;s++){const h=r[s];switch(h.ruleIndex){case F.RULE_singleExpression:l.push(this.visit(h));break;case F.RULE_variableDeclarationList:l.push(this.visit(h));break;case F.RULE_blockExpression:l.push(this.visit(h));break;case F.RULE_varBlockStmt:l.push(this.visit(h));break}}return l});k(this,"visitBlockSequence",n=>{const{children:r}=n;let s=0;const l=[];for(;s<r.length;s++){const h=r[s];switch(h.ruleIndex){case F.RULE_variableDeclarationList:l.push(this.visit(h));break;case F.RULE_singleExpression:l.push(this.visit(h));break}}return l});k(this,"visitVariableDeclarationStmt",n=>{const{children:r}=n;let s=0;const l=[];for(;s<r.length;s++){const h=r[s];switch(h.ruleIndex){case F.RULE_variableDeclarationList:l.push(this.visit(h));break;case F.RULE_methodStmt:const m=this.visit(h);Sl.includes(m.exprs[0].name)&&(this._onlyStatementsCount++,this._onlyStatementsCount>1?this._errorHandle(ye(de.onlyStatementErr,{count:this._onlyStatementsCount}),h):this._scriptType=m.exprs[0].name),l.push(m);break}}return l});k(this,"visitVarBlockStmt",n=>{const{children:r}=n;let s=0;const l={ruleType:le.VarBlockStmt,ctx:n},h=[];for(;s<r.length;s++){const m=r[s];switch(m.ruleIndex){case F.RULE_varArrayDeclaration:l.nameList=this.visit(m);break;case F.RULE_assignmentOperator:l.operator=this.visit(m);break;case F.RULE_name:h.push(m),l.name=this.visit(m);break;case F.RULE_blockExpression:if(this._isNeedCalc=!0,l.value=this.visit(m),!l.value)break;h.push(m);const v=this._getBlockReturnTypes(l.value);v.length===1?l.value.type=v[0]:l.value.types=v,this._isNeedCalc=!1;break}}return l.name?this._againAssignHandle([l.name,l.value],h,l.operator):(this._variablesHandle(l,n),l)});k(this,"visitVarSingle",n=>{const{children:r,start:s}=n,l={ruleType:le.VarSingle};let h=0;const m=this._commentsParser(s.line,[Kt.variable]);l.desc=m==null?void 0:m[Kt.variable],this._currentLine=s.line;let v={lineNumber:0,column:0};for(;h<r.length;h++){const S=r[h];switch(S.ruleIndex){case F.RULE_varModifier:l.declare=this.visit(S);break;case F.RULE_typeGather:const C=this.visit(S);l.prefix=this._getPrefix(C),l.type=C&&this._typeAddConst(C);break;case F.RULE_identifier:const A=this.visit(S);this._repeatVarJudge(A,S),v={lineNumber:S.start.line,column:S.start.column},l.name=A,l.pos=v;break}}return l});k(this,"_commentsParser",(n,r,s=!1)=>{var S;const l=this._comments.filter(C=>C.line<n&&C.line>=this._currentLine),h={},m={line:0,key:"",secKey:""},v=[Kt.field,Kt.param];for(const C of l){const[A,R]=B_.exec(C.text)||[];if(R&&r.includes(R)){const B=C.text.replace(A,"").trim();if(Object.assign(m,{line:C.line,key:R}),v.includes(R)){const[M,...b]=B.split(" ");M&&(Object.assign(m,{secKey:M}),h[R]=Object.assign(h[R]||{},{[M]:b.join(" ").trim()}))}else h[R]=[B]}else if(s&&m.key){const B=C.text.replace("//","").trim();v.includes(m.key)?h[m.key][m.secKey]+=` ${B}`:(S=h[m.key])==null||S.push(B)}}return h});k(this,"visitVarMultiple",n=>{const{children:r,start:s}=n;let l=0;const h=[],m=[];for(this._currentLine=s.line;l<r.length;l++){const v=r[l];if(v.ruleIndex===F.RULE_identifier){const S=this.visit(v);this._repeatVarJudge(S,v),h.push(S),m.push({lineNumber:v.start.line,column:v.start.column})}}return{ruleType:le.VarMultiple,names:h,posList:m}});k(this,"visitBlockExpression",n=>{const{children:r,start:s}=n;if(this._currentLine=s.line,r&&r.length){const l=r[0];return this.visit(l)}return null});k(this,"visitParenthesizedExpression",n=>{const{children:r}=n,s=r[1],l=this.visit(s);return{ruleType:le.ParenthesizedExpression,type:l.type,ctx:n,exprs:l}});k(this,"visitAdditiveExpression",n=>{const{children:r}=n;let s=0,l="";const h=[];for(;s<r.length;s++){const v=r[s];v.ruleIndex===F.RULE_singleExpression?h.push(this.visit(v)):l=v.symbol.text}const m={ruleType:le.AdditiveExpression,operator:l,ctx:n,exprs:h};if(["+","-"].includes(l)){const v=[U.UNDETERMINED,U.INT,U.FLOAT];l==="+"&&v.push(U.STRING);const S=this._sameTypeJudge(h,[r[0],r[2]],l,v);m.type=this._typeHandle(S)}else{const v=this._calcTypeJudge(h[0],r[0],l),S=this._calcTypeJudge(h[1],r[2],l,1);m.type=this._typeHandle([v,S])}return m});k(this,"visitRelationalExpression",n=>{const{children:r}=n;let s=0,l="";const h=[];for(;s<r.length;s++){const S=r[s];S.ruleIndex===F.RULE_singleExpression?h.push(this.visit(S)):l=S.symbol.text}const m=this._calcTypeJudge(h[0],r[0],l),v=this._calcTypeJudge(h[1],r[2],l,1);return{ruleType:le.RelationalExpression,operator:l,ctx:n,type:this._typeHandle([m,v],U.BOOL),exprs:h}});k(this,"visitEqualityExpression",n=>{const{children:r}=n;let s=0,l="";const h=[];for(;s<r.length;s++){const v=r[s];v.ruleIndex===F.RULE_singleExpression?h.push(this.visit(v)):l=v.symbol.text}const m=this._sameTypeJudge(h,[r[0],r[2]],l,[U.UNDETERMINED,U.COLOR,U.STRING,U.BOOL,U.INT,U.FLOAT]);return{ruleType:le.EqualityExpression,operator:l,ctx:n,type:this._typeHandle(m,U.BOOL),exprs:h}});k(this,"visitTernaryExpression",n=>{const{children:r}=n;let s=0;const l=[];for(;s<r.length;s++){const m=r[s];m.ruleIndex===F.RULE_singleExpression&&l.push(this.visit(m))}let h=U.UNDETERMINED;if(l.length>=3){this._boolTypeJudge(l[0],r[0],"?:");const m=this._sameTypeJudge(l.slice(1),[r[2],r[4]],"?:",[]),v=this._getPrefix(l[0].type);h=this._typeHandle(m),v&&this._getPrefix(h)&&(h=this._typeHandle([h,`${v} ${this._removePrefix(h)}`]))}return{ruleType:le.TernaryExpression,type:h,ctx:n,exprs:l}});k(this,"visitNameExpression",n=>{const{children:r}=n;if(r&&r.length){const s=r[0];return this.visit(s)}return null});k(this,"visitLiteralExpression",n=>{const{children:r}=n;if(r&&r.length){const s=r[0];return this.visit(s)}return null});k(this,"visitUnaryExpression",n=>{var S;const{children:r}=n,[s,l]=r,h=[this.visit(l)],m=s.symbol.text,v=this._calcTypeJudge(h[0],l,m);return((S=h[0])==null?void 0:S.ruleType)===le.UnaryExpression&&this._errors.push({message:ye(de.unaryErr,{sign:m}),startColumn:s.symbol.column+1,startLineNumber:s.symbol.line,endColumn:s.symbol.column+2,endLineNumber:s.symbol.line}),{ruleType:le.UnaryExpression,operator:m,type:v,ctx:n,exprs:h}});k(this,"visitNotExpression",n=>{const{children:r}=n,s=r[1],l=[this.visit(s)],h=this._boolTypeJudge(l[0],s,"not");return{ruleType:le.NotExpression,ctx:n,type:this._typeHandle([h],U.BOOL),exprs:l}});k(this,"visitMemberIndexExpression",n=>{var h,m;const{children:r}=n;let s=0;const l=[];for(;s<r.length;s++){const v=r[s];v.ruleIndex===F.RULE_singleExpression&&l.push(this.visit(v))}if(this._memberIndexVerify(l[0],n),this._hasMemberIndex=!0,((h=l[0])==null?void 0:h.ruleType)===le.MemberIndexExpression){const v=r[1];this._errors.push({message:ye(de.unaryErr,{sign:"["}),startColumn:v.symbol.column+1,startLineNumber:v.symbol.line,endColumn:v.symbol.column+2,endLineNumber:v.symbol.line}),this._hasMemberIndex=!1}return{ruleType:le.MemberIndexExpression,type:(m=l[0])==null?void 0:m.type,ctx:n,isInFunc:this._isInFunc,exprs:l}});k(this,"visitMethodStmt",n=>{var C;const{children:r,start:s}=n;let l=0;const h=[],m=[],v=this._commentsParser(s.line,[Kt.description],!0);this._currentLine=s.line;let S;for(;l<r.length;l++){const A=r[l];A.ruleIndex===F.RULE_methodElement&&(h.push(this.visit(A)),m.push(A))}return((C=h[0])==null?void 0:C.name)===Ii.library&&v.description&&(this._description=v.description.join(`
12
12
  `)),S=this._getMethodTypes(h,m)||[],this._inputFuncTitleVerify(h,n),{ruleType:le.MethodExpression,types:S.length>1||S.isBrackethesized||S.isUnknown?S:void 0,ctx:n,type:S.length===1?S[0]:void 0,exprs:h}});k(this,"visitMethodExpression",n=>{const{children:r}=n;if(r&&r.length){const s=r[0];return this.visit(s)}return null});k(this,"visitLogicalAndExpression",n=>{const{children:r}=n;let s=0,l="";const h=[];for(;s<r.length;s++){const S=r[s];S.ruleIndex===F.RULE_singleExpression?h.push(this.visit(S)):l=S.symbol.text}const m=this._boolTypeJudge(h[0],r[0],l),v=this._boolTypeJudge(h[1],r[2],l,1);return{ruleType:le.LogicalAndExpression,type:this._typeHandle([m,v],U.BOOL),operator:l,ctx:n,exprs:h}});k(this,"visitLogicalOrExpression",n=>{const{children:r}=n;let s=0,l="";const h=[];for(;s<r.length;s++){const S=r[s];S.ruleIndex===F.RULE_singleExpression?h.push(this.visit(S)):l=S.symbol.text}const m=this._boolTypeJudge(h[0],r[0],l),v=this._boolTypeJudge(h[1],r[2],l,1);return{ruleType:le.LogicalOrExpression,operator:l,ctx:n,type:this._typeHandle([m,v],U.BOOL),exprs:h}});k(this,"visitMultiplicativeExpression",n=>{const{children:r}=n;let s=0,l="";const h=[];for(;s<r.length;s++){const S=r[s];S.ruleIndex===F.RULE_singleExpression?h.push(this.visit(S)):l=S.symbol.text}const m=this._calcTypeJudge(h[0],r[0],l),v=this._calcTypeJudge(h[1],r[2],l,1);return{ruleType:le.MultiplicativeExpression,operator:l,ctx:n,type:this._typeHandle([m,v]),exprs:h}});k(this,"visitBrackethesized",n=>{const{children:r,start:s}=n,l=r[1];return this._currentLine=s.line,{ruleType:le.Brackethesized,ctx:n,exprs:this.visit(l)}});k(this,"visitArguments",n=>{const{children:r}=n;let s=0;const l={params:[]};let h="";for(;s<r.length;s++){const m=r[s];if(m.ruleIndex===F.RULE_argument){const v=this.visit(m),S=v.paramKey;S?(h=S,l[S]?this._errorHandle(ye(Dr.moreSameArg,{arg:S}),n.parentCtx,Mn.Warning):(l[S]=v.param,l[S].ctx=m)):h?this._errorHandle(ye(de.argsSyntaxErr,{argName:h}),m):(v.ctx=m,l.params.push(v))}}return l});k(this,"visitArgument",n=>{const{children:r}=n;return r.length===1?this.visit(r[0]):{paramKey:this.visit(r[0]),param:this.visit(r[2])}});k(this,"visitIfStatement",n=>{const{children:r}=n;let s=0;const l={ruleType:le.IfStatement,condition:[],block:[],ctx:n,typeList:[]};for(;s<r.length;s++){const h=r[s];switch(h.ruleIndex){case F.RULE_singleExpression:const m=this.visit(h);if(!m)break;m.ctx=h,l.condition.push(m);break;case F.RULE_blockLine:const v=this._isInLocalScop;this._isInLocalScop=!0;const S=this.visit(h);l.typeList.push(this._getBlockReturnTypes(S)),l.block.push(S),this._isInLocalScop=v;break}}return this._verifyIf(l),l});k(this,"visitForToStatement",n=>{const{children:r}=n;let s=0;const l={ruleType:le.ForToStatement,numerical:[],ctx:n,block:[]};for(;s<r.length;s++){const h=r[s];switch(h.ruleIndex){case F.RULE_varModifier:l.declare=this.visit(h);break;case F.RULE_typeGather:const m=this.visit(h);l.type=m&&this._typeAddSeries(m);break;case F.RULE_identifier:l.name=this.visit(h);break;case F.RULE_singleExpression:const v=this.visit(h);v&&(v.ctx=h,l.numerical.push(v));break;case F.RULE_blockLine:if(this._blockCount++,this._pushBlockRanges(n),l.name){const C=l.numerical[0].type;this._variablesHandle({nameList:{name:l.name,isForVar:!0,type:l.type},value:{type:C||`${U.SERIES} ${U.INT}`}},n)}this._blockCount--,this._blockRanges.pop(),this._loopCount++;const S=this._isInLocalScop;this._isInLocalScop=!0,l.block=this.visit(h),this._loopCount--,this._isInLocalScop=S,l.returnedTypes=this._getBlockReturnTypes(l.block);break}}return this._verifyForTo(l),l});k(this,"visitForInStatement",n=>{const{children:r}=n;let s=0;const l={ruleType:le.ForInStatement,ctx:n,names:[]};for(;s<r.length;s++){const h=r[s];switch(h.ruleIndex){case F.RULE_identifier:const m=this.visit(h);l.names.push(m);break;case F.RULE_singleExpression:l.array=this.visit(h);const v=l.array.type;this._isArrayType(v)||this._isMatrixType(v)||v===U.UNDETERMINED||this._errorHandle(ye(de.typeMismatch,{operator:"foreach",index:"id",typeE:v,typeR:"array<fun_arg>"}),h);break;case F.RULE_blockLine:if(this._blockCount++,this._pushBlockRanges(n),l.names.length){let[C,A]=l.names;const R=l.array.type;A?this._variablesHandle({nameList:{name:C,isForVar:!0,type:`${U.SERIES} ${U.INT}`},value:{type:`${U.SERIES} ${U.INT}`}},n):A=C;const B=R===U.UNDETERMINED?R:this._isMatrixType(R)?`${this._getArrayType(R)}[]`:this._typeAddSeries(this._getArrayType(R));this._variablesHandle({nameList:{name:A,isForVar:!0,type:B},value:{type:B}},n)}this._blockCount--,this._blockRanges.pop(),this._loopCount++;const S=this._isInLocalScop;this._isInLocalScop=!0,l.block=this.visit(h),this._isInLocalScop=S,this._loopCount--,l.returnedTypes=this._getBlockReturnTypes(l.block);break}}return l});k(this,"visitSwitchStatement",n=>{const{children:r}=n;let s=0;const l={ruleType:le.SwitchStatement,condition:!0,ctx:n,cases:[],defaultCase:void 0};for(;s<r.length;s++){const h=r[s];switch(h.ruleIndex){case F.RULE_singleExpression:if(l.condition=this.visit(h),!h.children)break;l.condition.ctx=h;break;case F.RULE_caseClause:l.cases.push(this.visit(h));break;case F.RULE_defaultCaluse:l.defaultCase=this.visit(h);break}}return this._verifySwitch(l),l});k(this,"visitCaseClause",n=>{const{children:r}=n,s={ruleType:le.CaseClause},l=this._isInLocalScop;return this._isInLocalScop=!0,s.condition=this.visit(r[0]),s.condition&&(s.condition.ctx=r[0],s.block=this.visit(r[2]),this._isInLocalScop=l,s.returnedTypes=this._getBlockReturnTypes(s.block)),s});k(this,"visitDefaultCaluse",n=>{const{children:r}=n,s={ruleType:le.DefaultCaluse},l=this._isInLocalScop;return this._isInLocalScop=!0,s.block=this.visit(r[1]),this._isInLocalScop=l,s.returnedTypes=this._getBlockReturnTypes(s.block),s});k(this,"visitWhileStatement",n=>{const{children:r}=n,s={ruleType:le.WhileStatement,ctx:n};if(s.condition=this.visit(r[1]),!s.condition)return s;s.condition.ctx=r[1],this._loopCount++;const l=this._isInLocalScop;return this._isInLocalScop=!0,s.block=this.visit(r[2]),this._isInLocalScop=l,this._loopCount--,s.returnedTypes=this._getBlockReturnTypes(s.block),this._verifyWhile(s),s});k(this,"visitImportStmt",async n=>{const{children:r,start:s}=n;let l=0;const h=[];for(this._currentLine=s.line;l<r.length;l++){const m=r[l];if(m.ruleIndex===F.RULE_importElement){const v=await this.visit(m);v&&h.push(v)}}return h});k(this,"visitImportElement",async n=>{const{children:r}=n;if(!r||!r.length)return;let s=0;const l=[],h={ruleType:le.ImportElement,ctx:n};for(;s<r.length;s++){const m=r[s];m.ruleIndex===F.RULE_identifier?l.push(this.visit(m)):m.symbol&&m.symbol.type===F.IntegerLiteral&&(h.libraryVersion=m.symbol.text)}return h.username=l[0],h.libraryName=l[1],h.name=l[2],await this._importHandle(h,n),h});k(this,"visitLiteral",n=>{const{children:r}=n,s=r[0],{type:l,text:h}=s.symbol,m={ruleType:le.Literal,ctx:n,type:"",value:h};switch(l){case F.ColorLiteral:m.type=U.COLOR;break;case F.BooleanLiteral:m.type=U.BOOL;break;case F.StringLiteral:if(m.type=U.STRING,h.includes(`
13
13
  `)){const v=h.replace(/\s*(\n|\r)\s*/g," ");m.value=`\`${v.substring(1,v.length-1)}\``}break;case F.IntegerLiteral:m.type=U.INT;break;case F.DecimalLiteral:m.type=U.FLOAT;break}return m.type&&(m.type=`${U.CONST} ${m.type}`),m});k(this,"visitMethodElement",n=>{const{children:r}=n,[s,l]=r,[h,m,v]=this.visit(s),S=this.visit(l);return h.startsWith("request.")&&this._isInFunc&&(this._currentExportFunc&&this._errorHandle(ye(de.exportFuncUseReqErr,{name:h}),n),this._hasRequest=!0),{name:h,type:m,args:S,expr:v}});k(this,"visitMethodName",n=>{const{children:r}=n,s=[],l=[];let h=0,m=null;for(;h<r.length;h++){const S=r[h],C=S.ruleIndex,A=S.symbol;switch(C){case F.RULE_identifier:s.push(this.visit(S));break;case F.RULE_singleExpression:m=this.visit(S);break;case F.RULE_typeName:const R=this.visit(S);l.push(R),this._typeCheck(R,F.RULE_typeName,S);break;default:A&&A.text==="."&&s.push(".")}}const v=s.join("");return L_.includes(v)?this._hasDrawFunc=!0:M_.includes(v)&&(this._hasCreateOrderFunc=!0),[v,l,m]});k(this,"visitArrowFunction",n=>{const{children:r,start:s,stop:l}=n,h={ruleType:le.ArrowFunction,returnedTypes:[]};let m=0,v={lineNumber:0,column:0};const S=this._commentsParser(s.line,[Kt.function,Kt.param,Kt.returns],!0);Object.assign(h,{desc:S[Kt.function],paramsDesc:S[Kt.param],returnsDesc:S[Kt.returns]}),this._currentLine=s.line;let C=null;for(;m<r.length;m++){const A=r[m],R=A.ruleIndex,B=A.symbol;switch(R){case F.RULE_identifier:v={lineNumber:A.start.line,column:A.start.column},h.name=this.visit(A);break;case F.RULE_arrowFunctionParameters:h.params=this.visit(A),h.isExport&&this._exportArgsTypeVerify(h.params),this._setFuncParams(h,{endColumn:l.column,endLineNumber:l.line-1,startColumn:s.column,startLineNumber:s.line}),C=A;break;case F.RULE_block:this._isInFunc=!0,h.isExport&&(this._currentExportFunc=h.name),this._hasMemberIndex=!1,this._hasRequest=!1,h.block=this.visit(A),h.hasMemberIndex=this._hasMemberIndex,h.returnedTypes=this._getBlockReturnTypes(h.block),this._isInFunc=!1,this._currentExportFunc="";break;default:B&&B.type===F.Export&&(h.isExport=!0,this._addExportPos(B,"functions"))}}return h.hasRequest=this._hasRequest,this._setFunc(h,v,C,l.line-1),this._hasRequest=!1,this._currentFuncParams.clear(),h});k(this,"visitArrowFunctionParameters",n=>{const{children:r}=n;let s=0,l=[];for(;s<r.length;s++){const h=r[s];h.ruleIndex===F.RULE_formalParameterList&&(l=this.visit(h))}return l});k(this,"visitFormalParameterList",n=>{const{children:r}=n;let s=0;const l=[];for(;s<r.length;s++){const h=r[s];h.ruleIndex===F.RULE_formalParameterArg&&l.push(this.visit(h))}return l});k(this,"visitFormalParameterArg",n=>{const{children:r}=n;let s=0;const l={};for(;s<r.length;s++){const h=r[s];switch(h.ruleIndex){case F.RULE_typeGather:const m=this.visit(h);l.type=m&&this._typeAddSeries(m);break;case F.RULE_identifier:l.name=this.visit(h);break;case F.RULE_singleExpression:l.defaultValue=this.visit(h),delete l.defaultValue.ctx}}return l.ctx=n,this._verifyArgsDefaultValue(l,n),l.type=l.type||U.UNDETERMINED,l});k(this,"visitArrowMethod",n=>{const{children:r,start:s,stop:l}=n;let h=0;const m={ruleType:le.ArrowMethod,returnedTypes:[]};let v={lineNumber:0,column:0};const S=this._commentsParser(s.line,[Kt.function,Kt.param,Kt.returns],!0);Object.assign(m,{desc:S[Kt.function],paramsDesc:S[Kt.param],returnsDesc:S[Kt.returns]}),this._currentLine=s.line;let C=null;for(;h<r.length;h++){const A=r[h];switch(A.ruleIndex){case F.RULE_identifier:v={lineNumber:A.start.line,column:A.start.column},m.name=this.visit(A);break;case F.RULE_arrowMethodParameters:m.params=this.visit(A),m.isExport&&this._exportArgsTypeVerify(m.params),this._setFuncParams(m,{endColumn:l.column,endLineNumber:l.line-1,startColumn:s.column,startLineNumber:s.line}),C=A;break;case F.RULE_block:this._isInFunc=!0,m.isExport&&(this._currentExportFunc=m.name),this._hasMemberIndex=!1,this._hasRequest=!1,m.block=this.visit(A),m.hasMemberIndex=this._hasMemberIndex,m.returnedTypes=this._getBlockReturnTypes(m.block),this._isInFunc=!1,this._currentExportFunc="";break;default:A.symbol&&A.symbol.type===F.Export&&(m.isExport=!0,this._addExportPos(A.symbol,"methods"));break}}return m.hasRequest=this._hasRequest,this._setFunc(m,v,C,l.line-1),this._setMethod(m,v),this._hasRequest=!1,this._currentFuncParams.clear(),m});k(this,"visitArrowMethodParameters",n=>{const{children:r}=n;let s=0;const l={};let h=[];for(;s<r.length;s++){const m=r[s];switch(m.ruleIndex){case F.RULE_typeGather:const v=this.visit(m);l.type=v&&this._typeAddSeries(v);break;case F.RULE_identifier:l.ctx=m,l.name=this.visit(m);break;case F.RULE_formalParameterList:h=this.visit(m);break}}return[l,...h]});k(this,"visitTypeStatement",n=>{const{children:r,start:s,stop:l}=n;let h=0;const m={ruleType:le.TypeStatement,fields:[]},v=this._commentsParser(s.line,[Kt.type,Kt.field]);Object.assign(m,{desc:v[Kt.type],fieldsDesc:v[Kt.field]}),this._currentLine=s.line;let S={lineNumber:0,column:0},C=null;for(;h<r.length;h++){const A=r[h];switch(A.ruleIndex){case F.RULE_identifier:S={lineNumber:A.start.line,column:A.start.column},C=A,m.name=this.visit(A),this._verifyTypeName(m.name,A);break;case F.RULE_typeElement:m.fields.push(this.visit(A));break;default:A.symbol&&A.symbol.type===F.Export&&(m.isExport=!0,this._addExportPos(A.symbol,"types"));break}}if(m.isExport){const A=l.line-1,{line:R=0}=this._endExport;A>R&&(this._endExport={line:A,name:m.name})}return this._setUserType(m,S,C),this._setNewFunc(m,S),this._setCopyFunc(m,S),this._setCopyMethod(m,S),m});k(this,"visitTypeElement",n=>{const{children:r,start:s}=n;let l=0;const h={};let m=null,v=null;for(this._currentLine=s.line;l<r.length;l++){const S=r[l];switch(S.ruleIndex){case F.RULE_typeGather:const C=this.visit(S);if(S.children[0].ruleIndex===F.RULE_typeSeries){const{column:A,line:R,text:B}=S.start,M=A+1;this._errors.push({startColumn:M,endColumn:parseInt(M+B.length),startLineNumber:R,endLineNumber:R,message:ye(this._buildinTypes.has(B)?de.typeUseError:de.notTypeKeyword,{text:B})}),h.type=U.UNDETERMINED}else h.type=C&&this._typeAddSeries(C);break;case F.RULE_identifier:h.name=this.visit(S),v=S;break;case F.RULE_singleExpression:m=S,h.value=this.visit(S);break;default:S.symbol&&S.symbol.type===F.Varip&&(h.isVarip=!0);break}}return this._typeElementVerify(h,m,v),h});k(this,"visitAssignmentOperator",n=>{const{children:r}=n;return r&&r[0].symbol.text});k(this,"visitTypeMap",n=>{const{children:r}=n;let s=0;const l=[];for(;s<r.length;s++){const h=r[s];if(h.ruleIndex===F.RULE_typeName){const m=this.visit(h);l.push(m),this._typeCheck(m,F.RULE_typeName,h)}}return`map<${l[0]},${l[1]}>`});k(this,"visitTypeSeries",n=>{const{children:r}=n,[s,l]=r,h=this.visit(s),m=this.visit(l);return this._typeCheck(h,F.RULE_typeSeries,s),this._typeCheck(m,F.RULE_typeName,l),`${h} ${m}`});k(this,"visitTypeArray",n=>{const{children:r}=n,s=r[0];let l=this.visit(s),h=l;if(r.length===3)l=U.ARRAY;else{this._typeCheck(l,F.RULE_typeArray,s);let m=1;for(;m<r.length;m++){const v=r[m];v.ruleIndex===F.RULE_typeName&&(h=this.visit(v),this._typeCheck(h,F.RULE_typeName,v))}}return this._arrayTypeConvert(`${l}<${h}>`)});k(this,"visitTypeGather",n=>{const{children:r}=n;if(r&&r.length){const s=r[0],l=this.visit(s);return s.ruleIndex===F.RULE_typeName&&this._typeCheck(l,F.RULE_typeName,s),l}return null});k(this,"visitIdentifier",n=>n.children&&n.children[0].symbol.text);k(this,"visitTypeName",n=>{const{children:r}=n;let s=0,l="";for(;s<r.length;s++){const h=r[s];h.ruleIndex===F.RULE_identifier?l=`${l}${this.visit(h)}`:l=`${l}.`}return l});k(this,"visitEnumStatement",n=>{const{children:r,start:s,stop:l}=n;let h=0;const m={ruleType:le.EnumStatement,fields:[]},v=this._commentsParser(s.line,[Kt.enum,Kt.field]);Object.assign(m,{desc:v[Kt.enum],fieldsDesc:v[Kt.field]}),this._currentLine=s.line;let S={lineNumber:0,column:0},C=null;for(;h<r.length;h++){const A=r[h];switch(A.ruleIndex){case F.RULE_identifier:S={lineNumber:A.start.line,column:A.start.column},C=A,m.name=this.visit(A),this._verifyEnumName(m.name,A);break;case F.RULE_enumElement:m.fields.push(this.visit(A));break;default:A.symbol&&A.symbol.type===F.Export&&(m.isExport=!0,this._addExportPos(A.symbol,"enums"));break}}if(m.isExport){const A=l.line-1,{line:R=0}=this._endExport;A>R&&(this._endExport={line:A,name:m.name})}return this._setUserEnum(m,S,C),m});k(this,"visitEnumElement",n=>{const{children:r,start:s}=n;let l=0;const h={};for(this._currentLine=s.line;l<r.length;l++){const m=r[l];switch(m.ruleIndex){case F.RULE_identifier:h.name=this.visit(m);break;default:m.symbol&&m.symbol.type===F.StringLiteral&&(h.value=m.symbol.text);break}}return h});k(this,"visitName",n=>{const{children:r}=n;let s=0,l=!1;const h=[];let m=null;for(;s<r.length;s++){const v=r[s];switch(v.ruleIndex){case F.RULE_identifier:h.push(this.visit(v));break;case F.RULE_singleExpression:m=this.visit(v);break;case F.RULE_methodElement:l=!0;const S=this.visit(v);S.ctx=v,h.push(S);break}}return this._nameHandle(l,h,m,n)});this._loopCount=0,this._errors=[],this._variables=new Map,this._functions=new Map,this._methods=new Map,this._currentFuncParams=new Map,this._types=new Map,this._enums=new Map,this._currentBlockVars=[new Map],this._blockCount=0,this._isInFunc=!1,this._isNeedCalc=!1,this._blockRanges=[],this._overloadsFuncs=[],this._hasMemberIndex=!1,this._isInLocalScop=!1,this._onlyStatementsCount=0,this._comments=r,this._exportFunctions=[],this._exportMethods=[],this._exportTypes=[],this._exportEnums=[],this._exportPositions=[],this._endExport={},this._importLibs=new Map,this._getImportLibraryFunc=s}get overloadsFuncs(){return this._overloadsFuncs}get errors(){return this._errors}get userEnums(){return this._enums}get userTypes(){return this._types}get userFunctions(){return this._functions}get userVariables(){return this._variables}get userMethods(){return this._methods}get hasUseDrawFunc(){return this._hasDrawFunc}get hasUseCreateOrderFunc(){return this._hasCreateOrderFunc}get scriptType(){return this._scriptType}get exportLibs(){return{functions:[...this._exportFunctions],methods:[...this._exportMethods],types:[...this._exportTypes],enums:[...this._exportEnums]}}get description(){return this._description}get exportPositions(){return this._exportPositions}get endExport(){return this._endExport}get imports(){return this._importLibs}_verifyGloablVar(n,r){const{name:s,varPos:l,isBuiltIn:h}=n;if(h&&this._errorHandle(ye(de.buidinAssignErr,{name:s}),r),!l)return;const m=this._currentBlockVars[0].get(s);if(!m)return;const{column:v,lineNumber:S}=m.pos||{};this._isInFunc&&v===l.column&&S===l.lineNumber?this._errorHandle(ye(de.modifyGlobalVarErr,{name:s}),r):m.hasAssigned=!0}_inputFuncTitleVerify(n,r){if(!(n!=null&&n.length)||n.length>1)return;const{name:s,args:l,isBuiltIn:h}=n[0];if(h&&!this._strategyFuncName&&s.startsWith(Ii.strategy))this._strategyFuncName={ctx:r,name:s};else if(!s.startsWith(U.INPUT))return;this._inputVarName&&!(l.params.some(m=>m.originName==="title")||l.title)&&(l.title={value:`"${this._inputVarName}"`,ruleType:le.Literal,type:`${U.CONST} ${U.STRING}`})}_verifyIf(n){const{condition:r}=n;if(r!=null&&r.length)for(const s of r){const{type:l,ctx:h}=s;if(l===U.UNDETERMINED)continue;const m=this._removePrefix(l);[U.INT,U.FLOAT].includes(m)?this._errorHandle(ye(Dr.conditionWarning,{name:"if"}),h,Mn.Warning):m!==U.BOOL&&this._errorHandle(ye(de.conditionalErr,{name:"if"}),h)}}_verifyForTo(n){const{numerical:r}=n;if(r!=null&&r.length)for(const s of r){const{type:l,ctx:h}=s;if(l===U.UNDETERMINED)continue;const m=this._removePrefix(l);[U.INT,U.FLOAT].includes(m)||this._errorHandle(de.fortoErr,h)}}_verifySwitch(n){var r;if(n.cases){const s=(r=n.condition)==null?void 0:r.type;if(s===U.UNDETERMINED)return;if(s&&this._types.has(s)){this._errorHandle(ye(de.typeMismatch,{operator:"switch",index:"expr0",typeE:s,typeR:`${U.SIMPLE} ${U.STRING}`}),n.condition.ctx);return}for(const l of n.cases){const{condition:{type:h,ctx:m}}=l;if(h!==U.UNDETERMINED)if(this._types.has(h))this._errorHandle(ye(de.typeMismatch,{operator:"case",index:"expr1",typeE:h,typeR:`${U.SIMPLE} ${U.STRING}`}),m);else if(s){if(!this._compareType(s,h)){const v=this._removePrefix(s),S=this._removePrefix(h);v===U.BOOL&&[U.INT,U.FLOAT].includes(S)?this._errorHandle(ye(Dr.conditionWarning,{name:"switch"}),m,Mn.Warning):[U.INT,U.FLOAT].includes(v)&&S===U.BOOL?this._errorHandle(ye(Dr.conditionWarning,{name:"switch"}),n.condition.ctx,Mn.Warning):this._errorHandle(ye(de.typeMismatch,{operator:"case",index:"expr1",typeE:h,typeR:`${s}`}),m)}}else{const v=this._removePrefix(h);[U.INT,U.FLOAT].includes(v)?this._errorHandle(ye(Dr.conditionWarning,{name:"switch"}),m,Mn.Warning):v!==U.BOOL&&this._errorHandle(ye(de.conditionalErr,{name:"switch"}),m)}}}}_verifyWhile(n){const{condition:r}=n;if(r){const{type:s,ctx:l}=r;if(s===U.UNDETERMINED)return;const h=this._removePrefix(s);[U.INT,U.FLOAT].includes(h)?this._errorHandle(ye(Dr.conditionWarning,{name:"while"}),l,Mn.Warning):h!==U.BOOL&&this._errorHandle(ye(de.conditionalErr,{name:"while"}),l)}}async _importHandle(n,r){const{stop:s,start:l}=r,{username:h,libraryName:m,libraryVersion:v,name:S}=n,C=`${h}/${m}/${v}`;if(this._importLibs.has(C))return this._errorHandle(de.importMultipleErr,r),n;for(const[B,M]of this._importLibs)if(M.name&&M.name===S||!M.name&&!S&&M.libraryName===m)return this._errorHandle(ye(de.importNameRepeatErr,{name:S,line:M.startLine}),r),n;let A=S||m;const R=await this._getImportLibraryFunc({...n,libraryId:C,ctx:void 0,startLine:l.line,endLine:s.line,startColumn:l.column,endColumn:s.column+s.text.length+1});if(R){const{codeStr:B,description:M}=R;this._importLibs.set(C,{...n,libraryId:C,startLine:l.line,endLine:s.line,ctx:void 0,desc:M}),this._importDataHandle(R,A),kn.includes(A)&&(A=`$${A}`),n.code=B.replace("$name",A)}else this._errorHandle(ye(de.importNotExitErr,{username:h,libraryName:m}),r)}_importDataHandle(n,r){const{functions:s,methods:l,types:h}=n;for(const m of s){const{name:v}=m,S=`${r}.${v}`,C=this._functions.get(S)||[];C.push({...this._importTypeUpdate(m,h,r),name:S,isUser:void 0,isImport:!0}),this._functions.set(S,C)}for(const m of l){const v=this._importTypeUpdate(m,h,r),S=v.originalName||v.name,C=this._methods.get(S)||[];C.push({...v,isImport:!0,isUser:void 0}),this._methods.set(S,C)}for(const m of h){const v=`${r}.${m.name}`,S=this._types.get(v)||[];S.push({...this._importTypeUpdate(m,h,r),name:v,isImport:!0}),this._types.set(v,S)}}_importTypeUpdate(n,r,s){var B;let{args:l,returnedTypes:h,thisType:m,fields:v,name:S,originalName:C}=n,A="";if(l&&l.length&&(l=l.map(M=>{const{allowedTypeIDs:b,displayType:y,name:g}=M,O=y&&this._replaceTypeName(y,r,s);return A=A?`${A}, ${O} ${g}`:`${O} ${g}`,{...M,allowedTypeIDs:b==null?void 0:b.map(w=>this._replaceTypeName(w,r,s)),displayType:O}})),h!=null&&h.length&&(h=[this._replaceTypeName(h[0],r,s)]),m!=null&&m.length){const M=this._replaceTypeName(m[0],r,s);M!==m[0]&&(C=`${s}.${C||S}`),m=[M]}v!=null&&v.length&&(v=v.map(M=>{const{type:b}=M;return{...M,type:b&&this._replaceTypeName(b,r,s)}}));const R={...n,args:l,returnedTypes:h,thisType:m,fields:v,originalName:C};return(B=R.syntax)!=null&&B.length&&(R.syntax=[`${C||`${s}.${S}`}(${A}) → ${(h==null?void 0:h[0])||"void"}`]),R}_replaceTypeName(n,r,s){const l=r.find(h=>n.includes(h.name));return l?n.replace(l.name,`${s}.${l.name}`):n}_verifyArgsDefaultValue(n,r){const{defaultValue:s,type:l}=n;if(!s)return;const{ruleType:h,isBuiltIn:m,type:v}=s,S=this._removePrefix(v);if(h!==le.Literal&&!m)delete n.defaultValue,this._errorHandle(de.argDefaultErr,r);else if(l&&l!==U.UNDETERMINED&&v!==U.UNDETERMINED){const C=this._removePrefix(l);if(C===U.FLOAT&&S===U.INT)return;S!==C&&this._errorHandle(ye(de.defaultValueTypeErr,{typeE:v,typeR:l}),r)}else l||(n.type=this._typeAddSeries(S===U.INT?U.FLOAT:S))}_exportArgsTypeVerify(n){for(const r of n)(r.type===U.UNDETERMINED||!r.type)&&this._errorHandle(de.exportFuncArgErr,r.ctx)}_verifyTypeName(n,r){lu.includes(n)?this._errorHandle(ye(de.typeNameErr,{name:n}),r):Pp.includes(n)&&this._errorHandle(ye(de.enumVarNameBuiltinErr,{name:n}),r)}_addExportPos(n,r){const{line:s,column:l,text:h}=n;this._exportPositions.push({startLineNumber:s,startColumn:l,endLineNumber:s,endColumn:l+h.length+1,type:r})}_verifyEnumName(n,r){lu.includes(n)?this._errorHandle(ye(de.enumVarNameErr,{name:n}),r):Pp.includes(n)&&this._errorHandle(ye(de.enumVarNameBuiltinErr,{name:n}),r)}_nameHandle(n,r,s,l){var m,v;const h={ruleType:le.Name,hasMethod:n,exprs:r,expr:s};if(n){let S="";const C=[];for(const R of r)typeof R=="string"?S=S?`${S}.${R}`:R:(S&&(R.name=`${S}.${R.name}`),C.push(R),S="");h.exprs=[...C,S];const A=this._getMethodTypes(C,Array.from(C,()=>l));if(A&&A.length){const R=ye(de.noFiledErr,{name:S});A.length>1&&this._errorHandle(R,l),h.type=((v=this._nameCheck(this._getOriginMethodName(A[0],S),l,R))==null?void 0:v.type)||U.UNDETERMINED}}else{let S=r.join(".");if(s&&s.type&&s.type===U.UNDETERMINED)h.type=U.UNDETERMINED,S=`expr0.${S}`;else{s&&s.type&&(S=`${this._getMethodTypeName(s.type)}.${S}`);const C=this._nameCheck(S,l)||{};(m=C.title)!=null&&m.startsWith("built-in")&&(h.isBuiltIn=!0,h.isConst=C.isConst,!this._strategyVarName&&S.startsWith(Ii.strategy)&&(this._strategyVarName={ctx:l,name:S})),h.enumName=C.enumName,h.varPos=C.pos,h.varScope=C.scope,h.declare=C.declare,h.type=(C==null?void 0:C.type)||U.UNDETERMINED,C!=null&&C.isArg&&(h.arg=C),h.scope=this._blockCount,C.isEnum?this._errorHandle(ye(de.enumUseErr,{name:S}),l):this._isInFunc&&this._currentExportFunc&&(h.type.startsWith(U.INPUT)?this._errorHandle(ye(de.exportFuncHasInputErr,{name:S,func:this._currentExportFunc}),l):C.scope===0&&C.hasAssigned&&this._errorHandle(ye(de.exportFuncUseGlobalVarErr,{func:this._currentExportFunc}),l))}h.name=S}return h}_typeElementVerify(n,r,s){var v,S;const{type:l,value:h}=n;if(!h){l||this._errorHandle(de.typeFieldErr,s);return}if(![le.Literal,le.UnaryExpression].includes(h.ruleType)&&!h.isBuiltIn){this._errorHandle(de.defaultValueErr,r);return}else if(h.ruleType===le.UnaryExpression){const{exprs:C}=h;if(![le.Literal,le.UnaryExpression].includes((v=C[0])==null?void 0:v.ruleType)&&!((S=C[0])!=null&&S.isBuiltIn)){this._errorHandle(de.defaultValueErr,r);return}}if(!l){const C=h.type,A=this._getPrefix(C);n.type=A?this._typeAddSeries(this._removePrefix(C)):C;return}(!this._compareType(l,h.type)||l.endsWith(U.INT)&&h.type.endsWith(U.FLOAT))&&this._errorHandle(ye(de.defaultValueTypeErr,{typeE:h.type,typeR:l}),r)}_memberIndexVerify(n,r){if(n.ruleType===le.Name&&!n.hasMethod&&this._blockCount){const l=this._currentBlockVars[this._blockCount],h=l&&l.get(n.name);h&&(h.isForVar?this._errorHandle(ye(de.notHistoryErr,{name:n.name}),r):!(this._blockCount===1&&this._isInFunc)&&this._errorHandle(ye(Dr.localScopeGetHistory,{name:n.name}),r,Mn.Warning))}const s=n&&n.type;if(s){const l=this._removePrefix(s);!this._types.has(l)&&!this._buildinTypes.has(l)&&!this._isArrayType(l)&&!this._isMatrixType(l)&&!this._isMapType(l)&&l!==U.UNDETERMINED&&this._errorHandle(ye(de.invalidType,{index:0}),r)}}_setFuncParams(n,r){var s;for(const l of n.params){const h=(s=this._types.get(l.type))==null?void 0:s[0];if(l.scope=this._blockCount+1,h&&h.fields)for(const m of h.fields){const v=`${l.name}.${m.name}`;this._currentFuncParams.set(v,{...m,originName:v,varScope:l.scope})}delete l.ctx,l.range=r,this._setVariablesMap(l,!0),this._currentFuncParams.set(l.name,l)}}_pushBlockRanges(n){!n||!n.start||!n.stop||this._blockRanges.push({startColumn:n.start.column,endColumn:n.stop.column,startLineNumber:n.start.line,endLineNumber:n.stop.line})}_setUserEnum(n,r,s){const{fields:l,name:h,desc:m,fieldsDesc:v}=n,S={members:l.map(C=>({name:C.name,value:C.value,enumName:h,isEnumMember:!0,desc:v==null?void 0:v[C.name],type:`${U.CONST} ${h}`})),name:h,desc:m,pos:r};if(this._enums.has(h)){this._errorHandle(ye(de.typeRepeatErr,{name:h,keyword:Kt.enum}),s);return}else if(this._types.has(h)){this._errorHandle(ye(de.typeRepeatErr,{name:h,keyword:Kt.type}),s);return}n.isExport&&this._exportEnums.push(S),this._enums.set(h,[{...S}]),this._addEnumToMap(h,h,r)}_setUserType(n,r,s){const{fields:l,name:h,desc:m,fieldsDesc:v}=n,S={fields:l.map(C=>({name:C.name,desc:v==null?void 0:v[C.name],type:C.type})),name:h,desc:m,pos:r};if(this._enums.has(h)){this._errorHandle(ye(de.typeRepeatErr,{name:h,keyword:Kt.enum}),s);return}else if(this._types.has(h)){this._errorHandle(ye(de.typeRepeatErr,{name:h,keyword:Kt.type}),s);return}n.isExport&&this._exportTypes.push(S),this._types.set(h,[{...S}]),this._addVarToMap(h,h,r,!1,!1)}_againAssignHandle(n,r,s){const l=s!==":="?s.replace("=",""):s,h=s!==":="?[U.UNDETERMINED,U.INT,U.FLOAT]:[];l==="+"&&h.push(U.STRING);const[m,v]=n;m.arg&&!m.name.includes(".")&&this._errorHandle(ye(de.funcArgAssignErr,{name:m.name}),r[0]);const S=this._sameTypeJudge(n,r,l,h);let C=this._typeHandle(S);return this._updateUserVar(m.name,C,v.type),m.type=C,{ruleType:le.AgainAssign,name:m,operator:s,type:C,value:v}}_typeCheck(n,r,s){const l=[U.SERIES,U.SIMPLE,U.CONST];switch(r){case F.RULE_typeName:const h=this._buildinTypes.get(n);h&&![...l,U.ARRAY,U.MATRIX,U.MAP].includes(h[0].name)||this._types.get(n)||this._errorHandle(ye(de.notTypeKeyword,{text:n}),s);break;case F.RULE_typeArray:[U.ARRAY,U.MATRIX].includes(n)||this._errorHandle(de.tempateTypeErr,s);break;case F.RULE_typeSeries:l.includes(n)||this._errorHandle(ye(de.qualifierErr,{name:n}),s);break}}_getBuildVar(n){const r=this._buildinVariables.get(n);if(r&&r[0])return r[0];const s=this._buildinConstants.get(n);return s&&s[0]?Object.assign(s[0],{isConst:!0}):this._specialTreatmentChartPoint(n)}_specialTreatmentChartPoint(n){var r,s;if(n.startsWith("chart.point")){const l=n.split("."),h=l.pop(),m=l.join(".");return(((s=(r=this._buildinTypes.get(m))==null?void 0:r[0])==null?void 0:s.fields)||[]).find(S=>S.name===h)}}_verifyName(n,r){var l,h;const s=this._getBuildVar(n);if(s)return s;if(n.includes(".")){const m=n.split("."),v=m.pop(),S=m.join(".");let C=this._blockCount;for(;C>=0;){if(!this._currentBlockVars[C]){C--;continue}const R=this._currentBlockVars[C].get(S);if(r&&this._judgeGatherValue(v||"",r,R==null?void 0:R.valueType,!0),(R==null?void 0:R.type)==="chart.point"){const M=(((h=(l=this._buildinTypes.get(R.type))==null?void 0:l[0])==null?void 0:h.fields)||[]).find(b=>b.name===v);if(M)return Object.assign(M,{pos:R.pos})}C--}const A=this._specialTreatmentChartPoint(n);if(A)return A}return this._getUserVar(n)}_judgeGatherValue(n,r,s,l){return s!==`${U.SIMPLE} ${U.NA}`?!0:(l&&this._errorHandle(ye(de.objectIsNaErr,{name:n,type:"field"}),r),!1)}_nameCheck(n,r,s=ye(de.undeclared,{name:n})){const l=this._verifyName(n,r);return l||this._errorHandle(s,r),l}_inBlock(n){this._blockCount++,this._pushBlockRanges(n);const r=this.visit(n);return this._blockCount--,this._blockRanges.pop(),this._currentBlockVars.splice(this._blockCount+1),r}_errorHandle(n,r,s=Mn.Error){this._errors.push({message:n,startColumn:r.start.column+1,startLineNumber:r.start.line,endColumn:r.start.column+2+r.stop.stop-r.start.start,endLineNumber:r.stop.line,type:s})}_boolTypeJudge(n,r,s,l=0){return this._typeJudge(n,r,s,U.BOOL,[U.UNDETERMINED,U.INT,U.FLOAT,U.BOOL],l)}_calcTypeJudge(n,r,s,l=0){return this._typeJudge(n,r,s,"int/float",[U.UNDETERMINED,U.INT,U.FLOAT],l)}_typeJudge(n,r,s,l,h,m=0){const v=n&&n.type;if(v){const S=this._removePrefix(v);if(!h.includes(S)&&S!==U.NA)return this._errorHandle(ye(de.typeMismatch,{operator:`operator ${s}`,index:`expr${m}`,typeE:S,typeR:l}),r),U.UNDETERMINED;l===U.BOOL&&[U.INT,U.FLOAT].includes(S)&&this._errorHandle(ye(Dr.typeMismatch,{operator:`operator ${s}`,index:`expr${m}`,type:U.BOOL}),r,Mn.Warning)}return v||U.UNDETERMINED}_sameTypeJudge(n,r,s,l){let h="";const m=[],v=["plot_display","plot_simple_display"];["+","-","+=","-="].includes(s)&&(l=l.concat(v));for(const[S,C]of n.entries()){let A=C&&C.type||U.UNDETERMINED;const R=this._removePrefix(A);if(h||(h=R),!l.includes(R)&&l.length&&R!==U.NA){this._errorHandle(ye(de.typeMismatch,{operator:`operator ${s}`,index:`expr${S}`,typeE:A,typeR:l.slice(1).join("/")}),r[S]),h=U.UNDETERMINED,m.push(h);continue}if(h===U.UNDETERMINED||R===U.UNDETERMINED)A=h=U.UNDETERMINED;else if(h!==R&&h!==U.NA&&R!==U.NA&&(![U.INT,U.FLOAT].includes(h)||![U.INT,U.FLOAT].includes(R)))if(s===":=")this._errorHandle(ye(de.assignTypeMismatch,{typeE:R,name:n[0].name,typeR:h}),r[0]),A=h=U.UNDETERMINED;else if(["==","!=","?:"].includes(s)&&[U.INT,U.FLOAT,U.BOOL].includes(h)&&[U.INT,U.FLOAT,U.BOOL].includes(R))this._errorHandle(ye(Dr.typeMismatch,{operator:`operator ${s}`,index:`expr${S}`,type:h}),r[S],Mn.Warning),A=h=U.UNDETERMINED;else if(v.includes(h)&&v.includes(R)){if(h!==R){const B=this._getPrefix(A);m[S-1]=`${this._getPrefix(m[S-1])} ${v[0]}`,A=h=`${B} ${v[0]}`}}else this._errorHandle(ye(de.typeMismatch,{operator:`operator ${s}`,index:`expr${S}`,typeE:R,typeR:h}),r[S]),A=h=U.UNDETERMINED;m.push(A)}return m}_getUserVar(n,r=!1){for(let s=this._blockCount;s>=0;s--){const l=this._currentBlockVars[s];if(s<=0){const h=this._currentFuncParams.get(n);if(h)return h.isArg=!0,h}if(l){const h=l.get(n);if(h)return h}}if(n.includes(".")&&!r){let s=!1,l=null;if(n.split(".").reduce((h,m)=>{let v=h?`${h}.${m}`:m;const S=this._getUserVar(v,!0);return S!=null&&S.type?S.type===U.UNDETERMINED?s=!0:(v=S.type,l=S):l=null,v},""),s)return{name:n,type:U.UNDETERMINED};if(l)return l}return null}_repeatVarJudge(n,r){this._getBuildVar(n)&&this._errorHandle(ye(de.buidinVarErr,{name:n}),r);for(let l=0;l<=this._blockCount;l++){const h=this._currentBlockVars[l];if(h&&h.get(n)){if(this._blockCount===l)return this._errorHandle(ye(de.repeatVar,{name:n}),r),!0;this._errorHandle(ye(Dr.repeatVar,{name:n}),r,Mn.Warning)}}}_judgeVarBuildIn(n){for(let r=0;r<=this._blockCount;r++){const s=this._currentBlockVars[r];if(s&&s.get(n))return!0}return!1}_updateUserVar(n,r,s){for(let l=0;l<=this._blockCount;l++){const h=this._currentBlockVars[l];if(h){const m=h.get(n);if(m){m.type=r,m.valueType=s;return}}}}_variablesHandle(n,r){var h,m,v,S;if(!(n&&n.nameList))return;const s=n.nameList;if(s.name==="_")return;const l=n.value;if(s.ruleType===le.VarMultiple){s.types=[],this._checkVarMultiple(s.names,l,r);for(const[C,A]of s.names.entries()){const R=this._varTypeJudge("",((h=l==null?void 0:l.types)==null?void 0:h[C])||U.UNDETERMINED,r);s.types.push(R),this._addVarToMap(A,R,s.posList[C],!0)}}else{const C=(l==null?void 0:l.type)||((m=l==null?void 0:l.returnedTypes)==null?void 0:m[0]);((v=l==null?void 0:l.types)!=null&&v.isBrackethesized||(S=l==null?void 0:l.returnedTypes)!=null&&S.isBrackethesized)&&this._errorHandle(ye(de.tupleLeftVarErr,{name:s.name}),r),!s.type&&C===`${U.SIMPLE} ${U.NA}`&&this._errorHandle(de.naVarErr,r),s.prefix&&Pi.indexOf(s.prefix)>Pi.indexOf(this._getPrefix(C))&&this._errorHandle(ye(de.declaredErr,{prefix:s.prefix,type:C}),r);const A=this._varTypeJudge(s.type,C||U.UNDETERMINED,r);s.type=A,this._addVarToMap(s.name,A,s.pos,!0,s.isForVar,s.declare,l==null?void 0:l.type,s.desc)}}_checkVarMultiple(n,r,s){var S,C,A,R;const l=n.length,h=((r==null?void 0:r.types)||(r==null?void 0:r.returnedTypes)||[]).length,m=((S=r==null?void 0:r.types)==null?void 0:S.isBrackethesized)||((C=r==null?void 0:r.returnedTypes)==null?void 0:C.isBrackethesized);(A=r==null?void 0:r.types)!=null&&A.isUnknown||(R=r==null?void 0:r.returnedTypes)!=null&&R.isUnknown||(h===1&&!m||!h?this._errorHandle(de.tupleRightVarErr,s):l!==h&&this._errorHandle(ye(de.tupleVarErr,{indexA:h,indexB:l}),s))}_addEnumToMap(n,r,s){var v;const l=this._currentBlockVars[this._blockCount]||new Map,h=(v=this._enums.get(n))==null?void 0:v[0];if(h&&h.members)for(const S of h.members)l.set(`${n}.${S.name}`,S);const m={name:n,isEnum:!0,type:`${U.CONST} ${r}`,pos:s};l.set(n,m),this._currentBlockVars[this._blockCount]=l}_addVarToMap(n,r,s,l=!0,h=!1,m,v,S){var B;const C=this._currentBlockVars[this._blockCount]||new Map,A=(B=this._types.get(r))==null?void 0:B[0];if(A&&A.fields)for(const M of A.fields)C.set(`${n}.${M.name}`,M);const R={name:n,type:r,pos:s,valueType:v,desc:S};l&&this._setVariablesMap(R),C.set(n,Object.assign(R,{isForVar:h,declare:m})),this._currentBlockVars[this._blockCount]=C}_setVariablesMap(n,r=!1){const s=this._blockRanges[this._blockCount];r||(n.range=s,n.scope=this._blockCount);const l=this._variables.get(n.name)||[];l.push(n),this._variables.set(n.name,l)}_varTypeJudge(n,r,s){if(r===U.VOID)return this._errorHandle(de.voidNotVar,s),U.UNDETERMINED;if(n&&r!==U.UNDETERMINED){const l=this._removePrefix(n),h=this._removePrefix(r);return h!==l&&h!==U.NA&&!(l===U.FLOAT&&h===U.INT)?(this._errorHandle(ye(de.declareTypeErr,{type:n,valueType:r}),s),U.UNDETERMINED):this._typeHandle([n,r])}else if(r===U.UNDETERMINED)return U.UNDETERMINED;return n||r||U.UNDETERMINED}_getAllowTypes(n){const r=[];if(n===U.UNDETERMINED)return r;const s=this._getPrefix(n);if(s){const l=this._removePrefix(n);let h=-1;for(const[m,v]of Pi.entries())v===s&&(h=m),h>=0&&h<=m&&(l===U.FLOAT&&r.push(`${v} ${U.INT}`),r.push(`${v} ${l}`))}else n=this._arrayTypeConvert(n)||"",r.push(n),n.includes(U.FLOAT)&&r.push(n.replace(/float/,U.INT));return r}_setNewFunc(n,r){const s=`${n.name}.new`,l=[],h=[];for(const v of n.fields)l.push({name:v.name,required:!1,allowedTypeIDs:this._getAllowTypes(v.type),displayType:v.type}),h.push(`${v.type} ${v.name}`);const m={name:s,args:l,returnedTypes:[n.name],pos:r,syntax:[`${s}(${h.join(", ")}) → ${n.name}`]};n.isExport&&this._exportFunctions.push(m),this._functions.set(s,[{...m,isUser:!0}])}_setCopyFunc(n,r){const s=n.name,l=`${s}.copy`,h={name:l,args:[{name:"object",required:!0,allowedTypeIDs:[s],displayType:s}],returnedTypes:[s],pos:r,info:"The identifier of the object to be copied.",syntax:[`${l}(${s} object) → ${s}`]};n.isExport&&this._exportFunctions.push(h),this._functions.set(l,[{...h,isUser:!0}])}_setCopyMethod(n,r){const s=n.name,l=`${s}.copy`,h={name:l,originalName:l,args:[],returnedTypes:[s],thisType:[s],pos:r,syntax:[`${l}() → ${s}`]};n.isExport&&this._exportMethods.push(h),this._methods.set(l,[{...h,isUser:!0}])}_setFunc(n,r,s,l){const h=[],m=[],{desc:v,paramsDesc:S,returnsDesc:C,params:A,hasMemberIndex:R}=n;for(const O of A){const{type:w,name:D,defaultValue:H}=O;h.push({name:D,desc:S==null?void 0:S[D],required:!H,allowedTypeIDs:this._getAllowTypes(w),displayType:w}),m.push(`${w===U.UNDETERMINED?"":`${w} `}${D}`)}const{returnedTypes:B=[]}=n,M=n.name,b=B.length>1?`[${B.join(", ")}]`:B.toString(),y={name:M,desc:v,args:h,syntax:[`${M}(${m.join(", ")}) → ${b||"void"}`],hasMemberIndex:R,pos:r,isUser:!0,returnedTypes:B,returns:C,hasRequest:this._hasRequest};let g=this._functions.get(M);if(g){const O=g.length;y.index=O,n.index=O,this._verifyFuncRepeat(g,y,s),g.push(y),this._overloadsFuncs.push({name:M,index:O,line:r.lineNumber,startColumn:r.column+1,endColumn:r.column+M.length})}else g=[y];if(n.isExport){const{line:O=0}=this._endExport;l>O&&(this._endExport={line:l,name:M,index:y.index}),this._exportFunctions.push(y)}this._functions.set(M,g)}_setMethod(n,r){var w;const{name:s,returnedTypes:l,params:h,desc:m,paramsDesc:v,returnsDesc:S}=n,C=h[0].type,A=[],R=[];for(const D of h.slice(1)){const{type:H,name:X,defaultValue:ee}=D;A.push({name:X,desc:v==null?void 0:v[X],required:!ee,allowedTypeIDs:this._getAllowTypes(H),displayType:H}),R.push(`${H} ${X}`)}const B=l.length>1?`[${l.join(", ")}]`:l.toString(),M=this._getMethodTypeName(C),b=`${M}.${s}`;n.typeName=M;const y={name:s,args:A,desc:m,originalName:b,syntax:[`${s}(${R.join(", ")}) → ${B||"void"}`],returnedTypes:l,hasMemberIndex:n.hasMemberIndex,pos:r,thisType:[C],returns:S,hasRequest:this._hasRequest};let g=this._methods.get(b),O=this._functions.get(s);if(O){const D=O.filter(ee=>!ee.isImport).length,H=((w=g==null?void 0:g.filter(ee=>!ee.isImport))==null?void 0:w.length)||0;let X=D;D>H&&(X=D-1),y.index=X,n.index=X}g?g.push(y):g=[y],n.isExport&&this._exportMethods.push(y),this._methods.set(b,g)}_verifyFuncRepeat(n,r,s){const{args:l}=r;n.some(m=>{const{args:v}=m;return(v==null?void 0:v.length)!=(l==null?void 0:l.length)?!1:!(v!=null&&v.length)&&!(l!=null&&l.length)?!0:v==null?void 0:v.every((S,C)=>{var A;return S.displayType===((A=l==null?void 0:l[C])==null?void 0:A.displayType)})})&&this._errorHandle(ye(de.funcRepeatErr,{name:r.name}),s)}_getMethodTypes(n,r){let s;for(const[l,h]of n.entries()){const{type:m,expr:v,args:S}=h;let{name:C}=h;const A=r[l];if(v){if(v.type===U.UNDETERMINED)return[U.UNDETERMINED];C=`${this._getMethodTypeName(v.type)}${C}`,S.params.unshift(v)}if(s&&s.length>=1)if(s.length===1){const R=s[0];if(R===U.UNDETERMINED)return[U.UNDETERMINED];const B=this._getOriginMethodName(R,C);C.includes(".")?s=this._getOtherNamesMethodType(B,s,A,S,h):s=this._expandMethodHandle(B,A,S,{type:R},R,h)}else this._errorHandle(ye(de.noFiledErr,{name:C}),A);else{const[R,B]=this._tempFuncNameHandle(C,A,m);C=B;const M=this._buildinFunctions.get(R);if(M)this._globalFuncVerify(M[0],A),this._hasMemberIndexVerify(M[0],A,h),h.isBuiltIn=!0,s=this._getBuildInReturnTypes(M,S,C,A,void 0,m);else{const b=this._functions.get(C);if(b)if(b.length<=1){this._hasMemberIndexVerify(b[0],A,h),s=b[0].returnedTypes;const{hasErr:y}=this._checkArgs(S,b[0].args||[],C,A,s[0]);if(y)return[U.UNDETERMINED]}else{const y=this._overloadsFuncGetTypes(b,S,A,void 0,h);s=this._returnedTypesParse([y])}else s=this._getOtherNamesMethodType(C,s,A,S,h)}}h.returnTypes=s}return s===void 0&&this._errorHandle(ye(de.notFindFuncErr,{name:n[0].name}),r[0]),s}_globalFuncVerify(n,r){this._blockCount!==0&&F_.includes(n.name)&&this._errorHandle(ye(de.globalFuncErr,{name:n.name}),r)}_hasMemberIndexVerify(n,r,s){n.hasRequest&&(s.hasRequest=!0,this._hasRequest=!0),n.hasMemberIndex||n.name.startsWith("ta.")||n.name==="math.sum"?(this._hasMemberIndex=this._isInFunc,s.hasMemberIndex=!0,s.position=r.start.tokenIndex):n.name.startsWith("request.")&&this._isInLocalScop&&this._errorHandle(de.requestUserInLoopErr,r)}_tempFuncNameHandle(n,r,s){let l=n;if(s&&s.length>=1){const h=["array.new","matrix.new"].includes(n),m=n==="map.new";if(s.length===1)if(h)l=`${n}<type>`,n=`${n}<${s[0]}>`;else return m?this._errorHandle(ye(de.templateErr,{countA:2,countB:1}),r):this._errorHandle(ye(de.templateNoSupportErr,{name:n}),r),[U.UNDETERMINED];else{if(!m)return h?this._errorHandle(ye(de.templateErr,{countA:1,countB:2}),r):this._errorHandle(ye(de.templateNoSupportErr,{name:n}),r),[U.UNDETERMINED];if(!lu.includes(s[0]))return this._errorHandle(ye(de.mapKeyErr,{type:this._typeAddSeries(s[0])}),r),[U.UNDETERMINED];l=`${n}<type,type>`,n=`${n}<${s[0]},${s[1]}>`}}return[l,n]}_getOtherNamesMethodType(n,r,s,l,h){const m=n.split("."),v=m.length-1,S=m.slice(0,v).join("."),C=this._getUserVar(S);this._judgeGatherValue(m[v],s,C==null?void 0:C.valueType)||(h.name=`${S}?.${m[v]}`);const R=C==null?void 0:C.type;if(R){if(R===U.UNDETERMINED)return r=[U.UNDETERMINED],r.isUnknown=!0,r;const B=this._getOriginMethodName(R,m[v]);h.varScope=C.scope,r=this._expandMethodHandle(B,s,l,C,S,h)}else{let B="",M="",b="";for(const y of m.slice(0,v)){B?M=this._getOriginMethodName(B,y):M=M?`${M}.${y}`:y;const g=this._verifyName(M);if(g!=null&&g.type){if(B=g.type,b="",g.title.startsWith("built-in variable")){const O=this._getOriginMethodName(B,m[v]);r=this._expandMethodHandle(O,s,l,C,S,h),h.hasVarPrefix=!0}}else this._buildinTypes.get(M)?b=ye(de.methodNotExistErr,{name:M,methodName:m[v]}):b=ye(de.noFiledErr,{name:y})}b&&this._errorHandle(b,s)}return r}_expandMethodHandle(n,r,s,l,h,m){var C,A;let v;const S=this._buildinMethods.get(n);if(S)m.name=m.name.split(".").join("?."),v=this._getBuildInReturnTypes(S,s,n,r,l);else{const R=this._methods.get(n);if(R&&R.length)if(R.length<=1){const B=R[0],M=this._getMethodTypeName(((C=B.thisType)==null?void 0:C[0])||"");if(this._types.get(M))m.name=m.name.split(".").join("?.");else{const g=this._functions.get(B.name);g&&(m.selfArg=(A=g[B.index||0].args)==null?void 0:A[0])}m.funcName=B.name,m.index=B.index,this._hasMemberIndexVerify(B,r,m),v=B.returnedTypes;const{hasErr:y}=this._checkArgs(s,B.args||[],n,r,(v==null?void 0:v[0])||"");if(y)return[U.UNDETERMINED]}else{const B=this._overloadsFuncGetTypes(R,s,r,l,m);v=this._returnedTypesParse([B])}else this._errorHandle(ye(de.methodNotExistErr,{methodName:n.split(".").slice(-1)[0],name:h}),r)}return v}_getBuildInReturnTypes(n,r,s,l,h,m){var S;let v;if(n.length===1){const{returnedTypes:C,syntax:A,args:R=[],thisType:B}=n[0],M=A[0].split("→")[1].trim(),b=h||r.params[0]||((S=R[0])==null?void 0:S.name)&&r[R[0].name];b&&!this._checkMethodThisType(B,b.type)&&this._errorHandle(ye(de.typeMismatch,{operator:s,index:b.name||"id",typeE:b.type,typeR:B[0]}),l);const{hasErr:y,types:g}=this._checkArgs(r,R,s,l,M,b);if(y)return[U.UNDETERMINED];if(v=g.length&&g||this._returnedTypesParse(C),v.length>1)return v;(m==null?void 0:m.length)===1?v=[this._typeReplace(M,m[0])]:(m==null?void 0:m.length)===2&&(v=[`${U.MAP}<${m[0]},${m[1]}>`]),v=this._returnTypesOtherHandle(b,M,v,s)}else{const C=this._overloadsFuncGetTypes(n,r,l,h);v=this._returnedTypesParse([C])}return v}_overloadsFuncGetTypes(n,r,s,l,h){var M,b,y;let m="",v=[],S=[],C=0,A=0;for(const[g,O]of n.entries()){const{args:w,returnedTypes:D,name:H,thisType:X}=O,ee=l||r.params[0]||r[w[0].name],{errMsg:z,warnMsg:Y,matchCount:V}=this._overloadsCheckArgs(r,w,H,s,ee);V>A&&(C=g,A=V),ee&&!this._checkMethodThisType(X,ee.type)&&z.unshift({msg:ye(de.typeMismatch,{operator:H,index:ee.name||"id",typeE:ee.type,typeR:X[0]}),ctx:s}),g===0?(v=z,S=Y,!z.length&&(m=D[0])):z.length?((M=v[0])!=null&&M.isLenErr&&!((b=z[0])!=null&&b.isLenErr)||v.length>z.length)&&(v=z,S=Y,C=g):this._priorityComparison(m,D[0])||(D[0]===`${U.ARRAY}<>`?m=`${ee.type}[]`:m=D[0],v=z,S=Y,C=g)}for(const g of v)this._errorHandle(g.msg,g.ctx);for(const g of S)this._errorHandle(g.msg,g.ctx,Mn.Warning);const R=s.children[0],B=n[0].name;if(R&&this._overloadsFuncs.push({name:B,index:C,line:R.start.line,startColumn:R.start.column+1,endColumn:R.start.column+B.length}),h){const g=n[C],{thisType:O,name:w,index:D}=g;if(this._hasMemberIndexVerify(g,s,h),h.index=D||C,O){const H=this._getMethodTypeName((O==null?void 0:O[0])||"");if(this._types.get(H))h.name=h.name.split(".").join("?.");else{const ee=this._functions.get(w);ee&&(h.selfArg=(y=ee[0].args)==null?void 0:y[0])}}}return this._funcArgsAddOriginName(r,n[C].args,B),m||U.UNDETERMINED}_funcArgsAddOriginName(n,r,s){const l=n.params||[];for(const[h,m]of r.entries())h<l.length&&(l[h].originName=m.name);if(s==="input"){const h=l[0]||n.defval;Object.assign(n,{inputType:{name:`'${h!=null&&h.isSourceType?"source":this._removePrefix(h==null?void 0:h.type)}'`}})}}_overloadsCheckArgs(n,r,s,l,h){const m={...n},v=m.params;delete m.params;const S=Object.keys(m).length+v.length,C=r.length,A=[],R=[];let B=0;S>C&&(r.some(b=>["arg0, arg1, ...","number0, number1, ..."].includes(b.name))||A.push({msg:ye(de.argsLenErr,{name:s,lenA:S,lenB:C}),isLenErr:!0,ctx:l}));for(const[M,b]of r.entries()){let y=m[b.name];if(M<v.length&&(y&&R.push({msg:ye(Dr.moreSameArg,{arg:b.name}),ctx:l}),y=v[M]),!y)b.required&&A.push({msg:ye(de.requiredParamErr,{name:s,argName:b.name}),ctx:l});else{const g=y.type!==`${U.SIMPLE} na`?this._checkArg(y,b,s,h,y.ctx,!0,R):"";g?A.push({msg:g,ctx:y.ctx}):B++,delete m[b.name]}if(["arg0, arg1, ...","number0, number1, ..."].includes(b.name)&&v.length>M+1){const g=v.slice(M+1);let O=v[M];for(const w of g){O.type===`${U.SIMPLE} ${U.NA}`&&(O=w);const D=w.type!==`${U.SIMPLE} ${U.NA}`?this._checkArg(w,b,s,O,w.ctx,!0,R):"";D&&A.push({msg:D,ctx:w.ctx})}}}if(Object.keys(m).length)for(const M of Object.keys(m))A.push({msg:ye(de.argsNameErr,{name:s,argName:M}),ctx:m[M].ctx});return{errMsg:A,warnMsg:R,matchCount:B}}_checkArgs(n,r,s,l,h,m){var M;const v={...n},S=v.params;delete v.params;const C=Object.keys(v).length+S.length,A=r.length;let R=!1,B=[];if(C>A&&!r.some(y=>["arg0, arg1, ...","number0, number1, ..."].includes(y.name)))return this._errorHandle(ye(de.argsLenErr,{name:s,lenA:C,lenB:A}),l),R=!0,{hasErr:R,types:B};for(const[b,y]of r.entries()){let g=v[y.name];if(b<S.length&&(g&&this._errorHandle(ye(Dr.moreSameArg,{arg:y.name}),l,Mn.Warning),g=S[b],g.originName=y.name),!g)y.required&&(this._errorHandle(ye(de.requiredParamErr,{name:s,argName:y.name}),l),R=!0);else{const O=g.type!==`${U.SIMPLE} ${U.NA}`?this._checkArg(g,y,s,m,g.ctx):"";if(O)this._errorHandle(O,g.ctx),R=!0;else if(s.startsWith("request.")&&y.name==="expression")if(g.ruleType===le.Brackethesized)B=g.exprs.map(w=>this._typeReplace(h,w.type));else if((M=g.types||g.returnedTypes)!=null&&M.isBrackethesized)B=(g.types||g.returnedTypes).map(w=>this._typeReplace(h,w));else{const w=this._typeReplace(h,g.type);B.push(w)}else if(s==="input.enum"&&y.name==="defval"){const w=this._removePrefix(g.type);B.push(`${U.INPUT} ${w}`)}delete v[y.name]}}if(Object.keys(v).length)for(const b of Object.keys(v))this._errorHandle(ye(de.argsNameErr,{name:s,argName:b}),v[b].ctx),R=!0;return{hasErr:R,types:B}}_checkArg(n,r,s,l,h,m,v){var y,g;const{ruleType:S,exprs:C,name:A}=n;let R=n.type;S===le.Brackethesized&&(R=`[${C.map(O=>O.type).join(", ")}]`);const{allowedTypeIDs:B=[],displayType:M,name:b}=r;if(!(!R||R===U.UNDETERMINED||M===U.UNDETERMINED)){if(s==="input"&&b==="defval"&&!R.startsWith(U.CONST))if(Al.includes(A))n.isSourceType=!0;else return de.inputDefvalErr;if(!(this._checkMethodThisType(B,this._arrayTypeConvert(R))&&!(["input.source","input.enum"].includes(s)&&b==="defval"))){if(b==="condition"&&(M!=null&&M.endsWith(U.BOOL))){if(R.endsWith(U.INT)||R.endsWith(U.FLOAT)){const O=ye(Dr.typeMismatch,{index:b,operator:s,type:U.BOOL});h&&(v?v.push({ctx:h,msg:O}):this._errorHandle(O,h,Mn.Warning));return}}else if(s==="str.tostring"&&b==="value"){const O=this._removePrefix(R);if(this._enums.get(O))return}switch(M){case"tuple of const string values: [val1, val2, ...]":return this._tupleToCheck(n,r,[`${U.CONST} ${U.STRING}`],s,R);case"tuple of const int/float values: [val1, val2, ...]":return this._tupleToCheck(n,r,[`${U.CONST} ${U.FLOAT}`,`${U.CONST} ${U.INT}`],s,R);case"tuple of const int values: [val1, val2, ...]":return this._tupleToCheck(n,r,[`${U.CONST} ${U.INT}`],s,R);case"open/high/low/close/hl2/hlc3/ohlc4/hlcc4":if(!A||!Al.includes(A))return ye(de.inputSourceErr,{name:b,funcName:s});if(this._judgeVarBuildIn(A))return ye(de.buildInUseErr,{name:A});n.isSourceType=!0;break;case"<matrix_type>":case"<array_type>":const O=this._getArrayType(s)||"";if(!R.endsWith(O)&&!(R.endsWith(U.INT)&&O===U.FLOAT))return ye(de.typeMismatch,{operator:s,index:b,typeE:R,typeR:this._typeAddSeries(O)});break;case"any matrix type":if(this._isMatrixType(R)){if(b==="id2"){const V=this._getArrayType(l==null?void 0:l.type);if(!V)return;const ne=this._getArrayType(R)||"";if(V!==ne)return ye(de.typeMismatch,{operator:s,index:b,typeE:ne,typeR:V})}}else return ye(de.typeMismatch,{operator:s,index:b,typeE:R,typeR:"matrix<fun_arg>"});break;case"any array type":if(this._isArrayType(R)){if(b==="id2"){const V=this._getArrayType(l==null?void 0:l.type);if(!V)return;const ne=this._getArrayType(R)||"";if(V!==ne)return ye(de.typeMismatch,{operator:s,index:b,typeE:ne,typeR:V})}}else return ye(de.typeMismatch,{operator:s,index:b,typeE:R,typeR:"array<fun_arg>"});break;case"series <type of the matrix's elements>":case"series <type of the array's elements>":const w=this._getArrayType(l==null?void 0:l.type)||"";if(!R.endsWith(w)&&!(R.endsWith(U.INT)&&w===U.FLOAT))return ye(de.typeMismatch,{operator:s,index:b,typeE:R,typeR:this._typeAddSeries(w)});break;case"any map type":if(this._isMapType(R)){if(b==="id2"){const V=this._getMapType(l==null?void 0:l.type);if(!V)return;const ne=this._getMapType(R)||[];if(V[0]!==ne[0]||V[1]!==ne[1])return ye(de.mapKeyValErr,{typeA:this._typeAddSeries(ne[0]),typeB:this._typeAddSeries(ne[1]),typeC:this._typeAddSeries(V[0]),typeD:this._typeAddSeries(V[1]),name:s})}}else return ye(de.typeMismatch,{operator:s,index:b,typeE:R,typeR:"map<type, type>"});break;case"series <type of the map's elements>":const D=this._getMapType(l==null?void 0:l.type);if(!D)return;const H=b==="key"?0:1;if(!R.endsWith(D[H])&&!(R.endsWith(U.INT)&&D[H]===U.FLOAT))return ye(de.typeMismatch,{operator:s,index:b,typeE:R,typeR:this._typeAddSeries(D[H])});break;case"<arg_expr_type>":if(S===le.Brackethesized)return ye(de.typeMismatch,{operator:s,index:b,typeE:R,typeR:M||""});break;case"<arg_type>":case"variable, function, object, array or matrix of series int/float/bool/string/color, or a tuple of these":const X=this._removePrefix(R);if([U.BOX,U.LABEL,U.LINE,U.LINEFILL,U.POLYLINE,U.TABLE].includes(X))return ye(de.requestExprErr,{type:X,name:s});break;case"variable, object or function of series int/float/bool/string/color, or a tuple of these":if(S===le.Brackethesized){for(const V of C)if(!B.includes(V.type))return ye(de.requestArgsErr,{name:s,argName:b,type:V.type})}break;case"const int/float/bool/string/color or source-type built-ins":if(Al.includes(n.name)&&B[0].endsWith(this._removePrefix(R)))n.isSourceType=!0;else return ye(de.typeMismatch,{operator:s,index:b,typeE:R,typeR:"const int/float/bool/string/color"});break;case"<arg..._type>":if(S===le.Brackethesized||this._isArrayType(R)||this._isMapType(R)||this._isMatrixType(R))return ye(de.typeMismatch,{operator:s,index:b,typeE:R,typeR:`${U.SERIES} ${U.INT}`});if(R!==(l==null?void 0:l.type))return ye(de.typeMismatch,{operator:s,index:b,typeE:R,typeR:l==null?void 0:l.type});break;case"simple enum":const ee=this._removePrefix(R);if(!this._enums.has(ee))return ye(de.typeMismatch,{operator:s,index:b,typeE:R,typeR:"const enum"});break;case"tuple of enum fields: [enumName.field1, enumName.field2, ...]":const z=l==null?void 0:l.enumName;if(z&&!((y=n.exprs)==null?void 0:y.every(ne=>ne.enumName===z)))return ye(de.typeMismatch,{operator:s,index:b,typeE:`${n.exprs?`[${(g=n.exprs)==null?void 0:g.map(ne=>ne.type).join(", ")}]`:n.type}`,typeR:`[const ${z}...]`});break;default:const Y=this._removePrefix(n.type);if(n.arg&&n.arg.isArg&&!m){const V=B.find(ne=>ne.endsWith(Y));if(V){n.type=V,n.arg.type=V;return}}if(B.length===1&&this._removePrefix(B[0])===Y){const V=this._getPrefix(n.type),ne=this._getPrefix(B[0]);if(Pi.indexOf(V)>=Pi.indexOf(ne))return}if(M)return ye(de.typeMismatch,{operator:s,index:b,typeE:R,typeR:M})}}}}_tupleToCheck(n,r,s,l,h){var m,v;if(s.push(`${U.SIMPLE} ${U.NA}`),n.ruleType===le.Brackethesized){const S=[];let C=!1;for(const A of n.exprs)S.push(A.type),s.includes(A.type)||(C=!0);if(C)return ye(de.typeMismatch,{operator:l,index:r.name,typeE:`[${S.join(", ")}]`,typeR:((m=r.allowedTypeIDs)==null?void 0:m[0])||""})}else return ye(de.typeMismatch,{operator:l,index:r.name,typeE:h,typeR:((v=r.allowedTypeIDs)==null?void 0:v[0])||""})}_getBlockReturnTypes(n){var R,B;let r=n;if(Array.isArray(n)&&(r=n.slice(-1)[0],Array.isArray(r)&&(r=r.slice(-1)[0])),!r)return[U.UNDETERMINED];const{ruleType:s,type:l,types:h,returnedTypes:m,exprs:v,nameList:S,typeList:C,block:A}=r;if(h&&h.length)return h;if(m&&m.length)return m;if(l)return[l];switch(s){case le.Brackethesized:const M=v.map(ee=>ee.type);return M.isBrackethesized=!0,M;case le.VarBlockStmt:case le.DeclareAssign:return S?S.ruleType===le.VarMultiple?S.types:[S.type]:[((R=r.name)==null?void 0:R.type)||U.UNDETERMINED];case le.SwitchStatement:if(!this._isNeedCalc&&this._isInFunc&&this._isEndExpr===!1)return[U.UNDETERMINED];const b=[...r.cases];r.defaultCase&&b.push(r.defaultCase);let y=((B=b[0])==null?void 0:B.returnedTypes)||[],g=y.length<=1?y[0]:`[${y.join(", ")}]`,O=null;for(const ee of b.slice(1)){const z=ee.returnedTypes||[U.UNDETERMINED];g+=z.length<=1?`; ${z[0]}`:`; [${z.join(", ")}]`;const Y=Array.isArray(ee.block)?ee.block.slice(-1)[0]:ee.block;if(z.length!==y.length)O=Y.ctx;else for(const[V,ne]of y.entries())if(this._compareType(z[V],ne))(z[V].includes(U.FLOAT)&&!ne.includes(U.FLOAT)||y[V]===`${U.SIMPLE} ${U.NA}`||y[V]===U.UNDETERMINED)&&(y[V]=z[V]);else{O=Y.ctx;break}}return O&&(this._errorHandle(ye(de.ifOrSwitchTypeErr,{keyword:"switch",types:g}),O),y=y.map(()=>U.UNDETERMINED)),r.returnedTypes=y,y;case le.IfStatement:if(!this._isNeedCalc&&!this._isInFunc)return[U.UNDETERMINED];if(!C.filter(ee=>ee&&ee.length).length)return[U.UNDETERMINED];let w=C[0]||[],D=w.length<=1?w[0]:`[${w.join(", ")}]`,H=0,X=0;for(const ee of C.slice(1))if(ee)if(H++,D+=ee.length<=1?`; ${ee[0]}`:`; [${ee.join(", ")}]`,ee.length!==w.length)X=H;else for(const[z,Y]of w.entries())if(this._compareType(ee[z],Y))(ee[z].includes(U.FLOAT)&&!Y.includes(U.FLOAT)||w[z]===`${U.SIMPLE} ${U.NA}`)&&(w[z]=ee[z]);else{X=H;break}if(X){const ee=A[X].slice(-1)[0],z=Array.isArray(ee)?ee.slice(-1)[0]:ee;this._errorHandle(ye(de.ifOrSwitchTypeErr,{keyword:"if",types:D}),z.ctx),w=w.map(()=>U.UNDETERMINED)}return r.returnedTypes=w,w}return[U.UNDETERMINED]}}class $_{constructor(e){k(this,"_nameMap");k(this,"_prefixNameVar");k(this,"_prefixNameFunc");k(this,"_prefixNameConst");k(this,"_userTypes");k(this,"_isInFunc");k(this,"_currentFuncName");k(this,"_varlist");k(this,"_memberIndexList");k(this,"_blockCount");k(this,"_inputCount");k(this,"_count");k(this,"_isSwitch",!1);k(this,"_isInLoop",!1);k(this,"_codesCol");k(this,"_dependsObj");k(this,"_enums");k(this,"_preRunMembers");k(this,"_isInConditionalStmt",!1);k(this,"_preRunMembersFuncs");k(this,"_preRunMemberFuncsCount",0);this._nameMap=new Map,this._prefixNameVar=`${e}_var`,this._prefixNameFunc=`${e}_func`,this._prefixNameConst=`${e}_const`,this._userTypes=[],this._isInFunc=!1,this._varlist=[{}],this._memberIndexList=[{}],this._blockCount=0,this._inputCount=0,this._count=0,this._codesCol=[[]],this._dependsObj={},this._enums=new Map,this._preRunMembers=[],this._preRunMembersFuncs=[]}preParser(e){var r,s;const n=[];for(const l of e){if(!l)return;if(Array.isArray(l)){for(const h of l)if(n.push(this._parserStmt(h)),Sl.includes((s=(r=h.exprs)==null?void 0:r[0])==null?void 0:s.name))return n.join(`;
14
14
  `).replace(/;+/g,";")}else n.push(this._parserStmt(l))}return""}parser(e){const n=[];for(const s of e){if(!s)return;if(Array.isArray(s))for(const l of s)n.push(this._parserStmt(l));else n.push(this._parserStmt(s))}const r=this._memberIndexList[this._blockCount]||{};return n.push(...Object.values(r)),n.join(`;