@guihz/trading-vue-editor-tes 0.0.203 → 0.0.205

Sign up to get free protection for your applications and to get access to all the features.
@@ -10,7 +10,7 @@ var Zg=Object.defineProperty;var Qg=(po,pi,Or)=>pi in po?Zg(po,pi,{enumerable:!0
10
10
  In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var l,_=!0,o=!1;return{s:function(){m=m.call(f)},n:function(){var u=m.next();return _=u.done,u},e:function(u){o=!0,l=u},f:function(){try{_||m.return==null||m.return()}finally{if(o)throw l}}}}function Ym(f,i){(i==null||i>f.length)&&(i=f.length);for(var m=0,s=new Array(i);m<i;m++)s[m]=f[m];return s}function ru(f,i){if(!(f instanceof i))throw new TypeError("Cannot call a class as a function")}function Jm(f,i){for(var m=0;m<i.length;m++){var s=i[m];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(f,Zm(s.key),s)}}function iu(f,i,m){return i&&Jm(f.prototype,i),m&&Jm(f,m),Object.defineProperty(f,"prototype",{writable:!1}),f}function Zm(f){var i=function(m,s){if(ta(m)!=="object"||m===null)return m;var p=m[Symbol.toPrimitive];if(p!==void 0){var l=p.call(m,"string");if(ta(l)!=="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(m)}(f);return ta(i)==="symbol"?i:String(i)}Yi.EMPTY=new sp;var rl,il,lp,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,m){var s,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.DEFAULT_PROGRAM_NAME;s=typeof i=="number"?i:i.tokenIndex;var l=this.getProgram(p),_=new t_(this.tokens,s,l.length,m);l.push(_)}},{key:"insertBefore",value:function(i,m){var s,p=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.DEFAULT_PROGRAM_NAME;s=typeof i=="number"?i:i.tokenIndex;var l=this.getProgram(p),_=new ra(this.tokens,s,l.length,m);l.push(_)}},{key:"replaceSingle",value:function(i,m){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.DEFAULT_PROGRAM_NAME;this.replace(i,i,m,s)}},{key:"replace",value:function(i,m,s){var p=arguments.length>3&&arguments[3]!==void 0?arguments[3]:f.DEFAULT_PROGRAM_NAME;if(typeof i!="number"&&(i=i.tokenIndex),typeof m!="number"&&(m=m.tokenIndex),i>m||i<0||m<0||m>=this.tokens.size)throw new RangeError("replace: range invalid: ".concat(i,"..").concat(m,"(size=").concat(this.tokens.size,")"));var l=this.getProgram(p),_=new ol(this.tokens,i,m,l.length,s);l.push(_)}},{key:"delete",value:function(i,m){var s=arguments.length>2&&arguments[2]!==void 0?arguments[2]:f.DEFAULT_PROGRAM_NAME;m===void 0&&(m=i),this.replace(i,m,null,s)}},{key:"getProgram",value:function(i){var m=this.programs.get(i);return m==null&&(m=this.initializeProgram(i)),m}},{key:"initializeProgram",value:function(i){var m=[];return this.programs.set(i,m),m}},{key:"getText",value:function(i){var m,s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:f.DEFAULT_PROGRAM_NAME;m=i instanceof ve?i:new ve(0,this.tokens.size-1),typeof i=="string"&&(s=i);var p=this.programs.get(s),l=m.start,_=m.stop;if(_>this.tokens.size-1&&(_=this.tokens.size-1),l<0&&(l=0),p==null||p.length===0)return this.tokens.getText(new ve(l,_));for(var o=[],u=this.reduceToSingleOperationPerIndex(p),E=l;E<=_&&E<this.tokens.size;){var x=u.get(E);u.delete(E);var A=this.tokens.get(E);x==null?(A.type!==n.EOF&&o.push(String(A.text)),E++):E=x.execute(o)}if(_===this.tokens.size-1){var I,te=na(u.values());try{for(te.s();!(I=te.n()).done;){var we=I.value;we.index>=this.tokens.size-1&&o.push(we.text.toString())}}catch(ke){te.e(ke)}finally{te.f()}}return o.join("")}},{key:"reduceToSingleOperationPerIndex",value:function(i){for(var m=0;m<i.length;m++){var s=i[m];if(s!=null&&s instanceof ol){var p,l=s,_=na(this.getKindOfOps(i,ra,m));try{for(_.s();!(p=_.n()).done;){var o=p.value;o.index===l.index?(i[o.instructionIndex]=void 0,l.text=o.text.toString()+(l.text!=null?l.text.toString():"")):o.index>l.index&&o.index<=l.lastIndex&&(i[o.instructionIndex]=void 0)}}catch(Cr){_.e(Cr)}finally{_.f()}var u,E=na(this.getKindOfOps(i,ol,m));try{for(E.s();!(u=E.n()).done;){var x=u.value;if(x.index>=l.index&&x.lastIndex<=l.lastIndex)i[x.instructionIndex]=void 0;else{var A=x.lastIndex<l.index||x.index>l.lastIndex;if(x.text!=null||l.text!=null||A){if(!A)throw new Error("replace op boundaries of ".concat(l," overlap with previous ").concat(x))}else i[x.instructionIndex]=void 0,l.index=Math.min(x.index,l.index),l.lastIndex=Math.max(x.lastIndex,l.lastIndex)}}}catch(Cr){E.e(Cr)}finally{E.f()}}}for(var I=0;I<i.length;I++){var te=i[I];if(te!=null&&te instanceof ra){var we,ke=te,He=na(this.getKindOfOps(i,ra,I));try{for(He.s();!(we=He.n()).done;){var st=we.value;st.index===ke.index&&(st instanceof t_?(ke.text=this.catOpText(st.text,ke.text),i[st.instructionIndex]=void 0):st instanceof ra&&(ke.text=this.catOpText(ke.text,st.text),i[st.instructionIndex]=void 0))}}catch(Cr){He.e(Cr)}finally{He.f()}var ze,_n=na(this.getKindOfOps(i,ol,I));try{for(_n.s();!(ze=_n.n()).done;){var pn=ze.value;if(ke.index!==pn.index){if(ke.index>=pn.index&&ke.index<=pn.lastIndex)throw new Error("insert op ".concat(ke," within boundaries of previous ").concat(pn))}else pn.text=this.catOpText(ke.text,pn.text),i[I]=void 0}}catch(Cr){_n.e(Cr)}finally{_n.f()}}}var zn,$r=new Map,wi=na(i);try{for(wi.s();!(zn=wi.n()).done;){var Ri=zn.value;if(Ri!=null){if($r.get(Ri.index)!=null)throw new Error("should only be one op per index");$r.set(Ri.index,Ri)}}}catch(Cr){wi.e(Cr)}finally{wi.f()}return $r}},{key:"catOpText",value:function(i,m){var s="",p="";return i!=null&&(s=i.toString()),m!=null&&(p=m.toString()),s+p}},{key:"getKindOfOps",value:function(i,m,s){return i.slice(0,s).filter(function(p){return p&&p instanceof m})}}]),f}();rl=Qm,lp="default",(il=Zm(il="DEFAULT_PROGRAM_NAME"))in rl?Object.defineProperty(rl,il,{value:lp,enumerable:!0,configurable:!0,writable:!0}):rl[il]=lp;var e_=function(){function f(i,m,s,p){ru(this,f),this.tokens=i,this.instructionIndex=s,this.index=m,this.text=p===void 0?"":p}return iu(f,[{key:"toString",value:function(){var i=this.constructor.name,m=i.indexOf("$");return"<"+(i=i.substring(m+1,i.length))+"@"+this.tokens.get(this.index)+':"'+this.text+'">'}}]),f}(),ra=function(f){ap(m,f);var i=cp(m);function m(s,p,l,_){return ru(this,m),i.call(this,s,p,l,_)}return iu(m,[{key:"execute",value:function(s){return this.text&&s.push(this.text.toString()),this.tokens.get(this.index).type!==n.EOF&&s.push(String(this.tokens.get(this.index).text)),this.index+1}}]),m}(e_),t_=function(f){ap(m,f);var i=cp(m);function m(s,p,l,_){return ru(this,m),i.call(this,s,p+1,l,_)}return iu(m)}(ra),ol=function(f){ap(m,f);var i=cp(m);function m(s,p,l,_,o){var u;return ru(this,m),(u=i.call(this,s,p,_,o)).lastIndex=l,u}return iu(m,[{key:"execute",value:function(s){return this.text&&s.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+'">'}}]),m}(e_);const Jg={atn:Eg,dfa:xg,context:Cg,misc:Og,tree:Rg,error:Bg,Token:n,CommonToken:Ia,CharStreams:Gm,CharStream:tu,InputStream:tu,CommonTokenStream:Wm,Lexer:sr,Parser:np,ParserRuleContext:sp,Interval:ve,IntervalSet:ie,LL1Analyzer:Bo,Utils:Vg,TokenStreamRewriter:Qm}})();var kr=Dt.dx,fp=Dt.q2;Dt.FO,Dt.xf,Dt.Gy;var n_=Dt.s4,r_=Dt.c7,hp=Dt._7;Dt.gp;var i_=Dt.cK,o_=Dt.zs,s_=Dt.AV;Dt.Xp,Dt.VS,Dt.ul;var a_=Dt.hW,u_=Dt.x1,di=Dt.z5;Dt.oN;var c_=Dt.TB;Dt.u1;var l_=Dt._b,f_=Dt.$F,Ye=Dt._T,pp=Dt.db,h_=Dt.Zx,Je=Dt._x;Dt.r8,Dt.JI,Dt.TP;var dp=Dt.WU;Dt.Nj,Dt.ZP;const M=class M extends l_{get grammarFileName(){return"tccScriptParser.g4"}get literalNames(){return M.literalNames}get symbolicNames(){return M.symbolicNames}get ruleNames(){return M.ruleNames}get serializedATN(){return M._serializedATN}createFailedPredicateException(e,n){return new o_(this,e,n)}constructor(e){super(e),this._interp=new f_(this,M._ATN,M.DecisionsToDFA,new pp)}program(){let e=new p_(this,this._ctx,this.state);this.enterRule(e,0,M.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(M.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(M.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 sl(this,this._ctx,this.state);this.enterRule(e,2,M.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(M.Comma)),this.state=115,this.match(M.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 mp(this,this._ctx,this.state);this.enterRule(e,4,M.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!==kr.INVALID_ALT_NUMBER;)n===1&&(this.state=125,this.variableDeclarationStmt(),this.state=126,this.match(M.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 47: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 al(this,this._ctx,this.state);this.enterRule(e,6,M.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(M.Comma)),this.state=141,this.match(M.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 ul(this,this._ctx,this.state);this.enterRule(e,8,M.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 _p(this,this._ctx,this.state);this.enterRule(e,10,M.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 ia(this,this._ctx,this.state);this.enterRule(e,12,M.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 47: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(M.Comma)),this.state=158,this.match(M.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,M.RULE_blockLine);let n;try{this.enterOuterAlt(e,1);{this.state=163,this.match(M.NEWLINE),this.state=164,this.match(M.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&130600935);this.state=170,this.match(M.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,M.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!==kr.INVALID_ALT_NUMBER;){if(n===1)switch(this.state=176,this.match(M.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,M.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(M.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 cl(this,this._ctx,this.state);this.enterRule(e,20,M.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 yp(this,this._ctx,this.state);this.enterRule(e,22,M.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!==kr.INVALID_ALT_NUMBER;){if(n===1)switch(this.state=202,this.match(M.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 ll(this,this._ctx,this.state);this.enterRule(e,24,M.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!==kr.INVALID_ALT_NUMBER;)n===1&&(this.state=213,this.match(M.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 gp(this,this._ctx,this.state);this.enterRule(e,26,M.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!==kr.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(M.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 47: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 fl(this,this._ctx,this.state);this.enterRule(e,28,M.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(M.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 oa(this,this._ctx,this.state);this.enterRule(e,30,M.RULE_varArrayDeclaration);let n;try{switch(this.state=263,this._errHandler.sync(this),this._input.LA(1)){case 38:case 40:case 47: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(M.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(M.Comma),this.state=255,this.identifier(),this.state=260,this._errHandler.sync(this),n=this._input.LA(1);this.state=261,this.match(M.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 su(this,this._ctx,this.state);this.enterRule(e,32,M.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,a=new $e(this,this._ctx,r),c=a,h=34;this.enterRecursionRule(a,34,M.RULE_singleExpression,e);let d;try{let v;this.enterOuterAlt(a,1);{switch(this.state=283,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,29,this._ctx)){case 1:a=new D_(this,a),this._ctx=a,c=a,this.state=272,this.methodStmt();break;case 2:a=new C_(this,a),this._ctx=a,c=a,this.state=273,d=this._input.LA(1),d===12||d===13?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=274,this.singleExpression(12);break;case 3:a=new O_(this,a),this._ctx=a,c=a,this.state=275,this.match(M.Not),this.state=276,this.singleExpression(11);break;case 4:a=new T_(this,a),this._ctx=a,c=a,this.state=277,this.name();break;case 5:a=new A_(this,a),this._ctx=a,c=a,this.state=278,this.literal();break;case 6:a=new g_(this,a),this._ctx=a,c=a,this.state=279,this.match(M.OpenParen),this.state=280,this.singleExpression(0),this.state=281,this.match(M.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!==kr.INVALID_ALT_NUMBER;){if(v===1)switch(this._parseListeners!=null&&this.triggerExitRuleEvent(),c=a,this.state=314,this._errHandler.sync(this),this._interp.adaptivePredict(this._input,30,this._ctx)){case 1:{if(a=new R_(this,new $e(this,n,r)),this.pushNewRecursionContext(a,h,M.RULE_singleExpression),this.state=285,!this.precpred(this._ctx,10))throw this.createFailedPredicateException("this.precpred(this._ctx, 10)");this.state=286,d=this._input.LA(1),!(d&-32)&&1<<d&114688?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=287,this.singleExpression(11)}break;case 2:{if(a=new b_(this,new $e(this,n,r)),this.pushNewRecursionContext(a,h,M.RULE_singleExpression),this.state=288,!this.precpred(this._ctx,9))throw this.createFailedPredicateException("this.precpred(this._ctx, 9)");this.state=289,d=this._input.LA(1),d===12||d===13?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=290,this.singleExpression(10)}break;case 3:{if(a=new v_(this,new $e(this,n,r)),this.pushNewRecursionContext(a,h,M.RULE_singleExpression),this.state=291,!this.precpred(this._ctx,8))throw this.createFailedPredicateException("this.precpred(this._ctx, 8)");this.state=292,d=this._input.LA(1),!(d&-32)&&1<<d&3932160?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=293,this.singleExpression(9)}break;case 4:{if(a=new w_(this,new $e(this,n,r)),this.pushNewRecursionContext(a,h,M.RULE_singleExpression),this.state=294,!this.precpred(this._ctx,7))throw this.createFailedPredicateException("this.precpred(this._ctx, 7)");this.state=295,d=this._input.LA(1),d===22||d===23?(this._errHandler.reportMatch(this),this.consume()):this._errHandler.recoverInline(this),this.state=296,this.singleExpression(8)}break;case 5:{if(a=new S_(this,new $e(this,n,r)),this.pushNewRecursionContext(a,h,M.RULE_singleExpression),this.state=297,!this.precpred(this._ctx,6))throw this.createFailedPredicateException("this.precpred(this._ctx, 6)");this.state=298,this.match(M.And),this.state=299,this.singleExpression(7)}break;case 6:{if(a=new x_(this,new $e(this,n,r)),this.pushNewRecursionContext(a,h,M.RULE_singleExpression),this.state=300,!this.precpred(this._ctx,5))throw this.createFailedPredicateException("this.precpred(this._ctx, 5)");this.state=301,this.match(M.Or),this.state=302,this.singleExpression(6)}break;case 7:{if(a=new E_(this,new $e(this,n,r)),this.pushNewRecursionContext(a,h,M.RULE_singleExpression),this.state=303,!this.precpred(this._ctx,4))throw this.createFailedPredicateException("this.precpred(this._ctx, 4)");this.state=304,this.match(M.QuestionMark),this.state=305,this.singleExpression(0),this.state=306,this.match(M.Colon),this.state=307,this.singleExpression(4)}break;case 8:{if(a=new k_(this,new $e(this,n,r)),this.pushNewRecursionContext(a,h,M.RULE_singleExpression),this.state=309,!this.precpred(this._ctx,13))throw this.createFailedPredicateException("this.precpred(this._ctx, 13)");this.state=310,this.match(M.OpenBracket),this.state=311,this.singleExpression(0),this.state=312,this.match(M.CloseBracket)}break}this.state=318,this._errHandler.sync(this),v=this._interp.adaptivePredict(this._input,31,this._ctx)}}}catch(v){if(v instanceof Je)a.exception=v,this._errHandler.reportError(this,v),this._errHandler.recover(this,v);else throw v}finally{this.unrollRecursionContexts(n)}return a}brackethesized(){let e=new hl(this,this._ctx,this.state);this.enterRule(e,36,M.RULE_brackethesized);try{this.enterOuterAlt(e,1),this.state=319,this.match(M.OpenBracket),this.state=320,this.expressionSequence(),this.state=321,this.match(M.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 bp(this,this._ctx,this.state);this.enterRule(e,38,M.RULE_arguments);let n;try{let r;this.enterOuterAlt(e,1);{if(this.state=323,this.match(M.OpenParen),this.state=335,this._errHandler.sync(this),n=this._input.LA(1),!(n&-32)&&1<<n&2147496016||!(n-32&-32)&&1<<n-32&130596867){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!==kr.INVALID_ALT_NUMBER;)r===1&&(this.state=325,this.match(M.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(M.Comma))}this.state=337,this.match(M.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 pl(this,this._ctx,this.state);this.enterRule(e,40,M.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(M.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 47: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 vp(this,this._ctx,this.state);this.enterRule(e,42,M.RULE_ifStatement);let n;try{let r;this.enterOuterAlt(e,1);{for(this.state=348,this.match(M.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!==kr.INVALID_ALT_NUMBER;)r===1&&(this.state=351,this.match(M.Else),this.state=352,this.match(M.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(M.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 au(this,this._ctx,this.state);this.enterRule(e,44,M.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(M.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(M.Assign),this.state=374,this.singleExpression(0),this.state=375,this.match(M.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(M.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(M.For),this.state=391,this._errHandler.sync(this),this._input.LA(1)){case 47:case 51:case 54:case 55:case 58:this.state=384,this.identifier();break;case 4:this.state=385,this.match(M.OpenBracket),this.state=386,this.identifier(),this.state=387,this.match(M.Comma),this.state=388,this.identifier(),this.state=389,this.match(M.CloseBracket);break;default:throw new di(this)}this.state=393,this.match(M.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 Ep(this,this._ctx,this.state);this.enterRule(e,46,M.RULE_switchStatement);let n;try{this.enterOuterAlt(e,1);{switch(this.state=399,this.match(M.Switch),this.state=401,this._errHandler.sync(this),n=this._input.LA(1),(!(n&-32)&&1<<n&2147496e3||!(n-32&-32)&&1<<n-32&130596867)&&(this.state=400,this.singleExpression(0)),this.state=403,this.match(M.NEWLINE),this.state=404,this.match(M.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&130596867)}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&130596867;)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(M.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 dl(this,this._ctx,this.state);this.enterRule(e,48,M.RULE_caseClause);try{this.enterOuterAlt(e,1),this.state=421,this.singleExpression(0),this.state=422,this.match(M.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 Sp(this,this._ctx,this.state);this.enterRule(e,50,M.RULE_defaultCaluse);try{this.enterOuterAlt(e,1),this.state=425,this.match(M.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 Tp(this,this._ctx,this.state);this.enterRule(e,52,M.RULE_whileStatement);try{this.enterOuterAlt(e,1),this.state=428,this.match(M.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 Ap(this,this._ctx,this.state);this.enterRule(e,54,M.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!==kr.INVALID_ALT_NUMBER;)r===1&&(this.state=433,this.match(M.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(M.Comma)),this.state=443,this.match(M.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 ml(this,this._ctx,this.state);this.enterRule(e,56,M.RULE_importElement);let n;try{this.enterOuterAlt(e,1),this.state=445,this.match(M.Import),this.state=446,this.identifier(),this.state=447,this.match(M.Divide),this.state=448,this.identifier(),this.state=449,this.match(M.Divide),this.state=450,this.match(M.IntegerLiteral),this.state=453,this._errHandler.sync(this),n=this._input.LA(1),n===53&&(this.state=451,this.match(M.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 xp(this,this._ctx,this.state);this.enterRule(e,58,M.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,M.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!==kr.INVALID_ALT_NUMBER;)n===1&&(this.state=458,this.match(M.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 sa(this,this._ctx,this.state);this.enterRule(e,62,M.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 Cp(this,this._ctx,this.state);this.enterRule(e,64,M.RULE_methodName);let n;try{let r;this.enterOuterAlt(e,1);{switch(this.state=481,this._errHandler.sync(this),this._input.LA(1)){case 47: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!==kr.INVALID_ALT_NUMBER;)r===1&&(this.state=468,this.identifier(),this.state=469,this.match(M.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(M.OpenParen),this.state=477,this.singleExpression(0),this.state=478,this.match(M.CloseParen),this.state=479,this.match(M.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(M.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(M.Comma),this.state=487,this.typeName()),this.state=490,this.match(M.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 Op(this,this._ctx,this.state);this.enterRule(e,66,M.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(M.Export)),this.state=497,this.identifier(),this.state=498,this.arrowFunctionParameters(),this.state=499,this.match(M.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 kp(this,this._ctx,this.state);this.enterRule(e,68,M.RULE_arrowFunctionParameters);let n;try{this.enterOuterAlt(e,1),this.state=502,this.match(M.OpenParen),this.state=504,this._errHandler.sync(this),n=this._input.LA(1),!(n-47&-32)&&1<<n-47&2449&&(this.state=503,this.formalParameterList()),this.state=506,this.match(M.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 _l(this,this._ctx,this.state);this.enterRule(e,70,M.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(M.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 yl(this,this._ctx,this.state);this.enterRule(e,72,M.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(M.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,M.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(M.Export)),this.state=527,this.match(M.Method),this.state=528,this.identifier(),this.state=529,this.arrowMethodParameters(),this.state=530,this.match(M.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 wp(this,this._ctx,this.state);this.enterRule(e,76,M.RULE_arrowMethodParameters);let n;try{this.enterOuterAlt(e,1),this.state=533,this.match(M.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(M.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(M.Comma),this.state=541,this.formalParameterList()),this.state=544,this.match(M.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,M.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(M.Export)),this.state=549,this.match(M.Type),this.state=550,this.identifier(),this.state=551,this.match(M.NEWLINE),this.state=552,this.match(M.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&313473);this.state=558,this.match(M.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 gl(this,this._ctx,this.state);this.enterRule(e,80,M.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(M.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(M.Assign),this.state=568,this.singleExpression(0)),this.state=571,this.match(M.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 bl(this,this._ctx,this.state);this.enterRule(e,82,M.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 vl(this,this._ctx,this.state);this.enterRule(e,84,M.RULE_typeMap);try{this.enterOuterAlt(e,1),this.state=575,this.match(M.Map),this.state=576,this.match(M.LessThan),this.state=577,this.typeName(),this.state=578,this.match(M.Comma),this.state=579,this.typeName(),this.state=580,this.match(M.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 Np(this,this._ctx,this.state);this.enterRule(e,86,M.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 El(this,this._ctx,this.state);this.enterRule(e,88,M.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(M.LessThan),this.state=590,this.typeName(),this.state=591,this.match(M.MoreThan);break;case 2:this.enterOuterAlt(e,2),this.state=593,this.typeName(),this.state=594,this.match(M.OpenBracket),this.state=595,this.match(M.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 jo(this,this._ctx,this.state);this.enterRule(e,90,M.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,M.RULE_identifier);let n;try{this.enterOuterAlt(e,1),this.state=605,n=this._input.LA(1),!(n-47&-32)&&1<<n-47&2449?(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,M.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(M.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,M.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!==kr.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(M.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(M.OpenParen),this.state=625,this.singleExpression(0),this.state=626,this.match(M.CloseParen),this.state=629,this._errHandler.sync(this),n=1;do{switch(n){case 1:this.state=627,this.match(M.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!==kr.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 Ip(this,this._ctx,this.state);this.enterRule(e,98,M.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(M.Export)),this.state=638,this.match(M.Enum),this.state=639,this.identifier(),this.state=640,this.match(M.NEWLINE),this.state=641,this.match(M.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-47&-32)&&1<<n-47&2449);this.state=647,this.match(M.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 Sl(this,this._ctx,this.state);this.enterRule(e,100,M.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(M.Assign),this.state=651,this.match(M.StringLiteral)),this.state=654,this.match(M.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 M.__ATN||(M.__ATN=new fp().deserialize(M._serializedATN)),M.__ATN}};D(M,"INDENT",1),D(M,"DEDENT",2),D(M,"Point",3),D(M,"OpenBracket",4),D(M,"CloseBracket",5),D(M,"OpenParen",6),D(M,"CloseParen",7),D(M,"Comma",8),D(M,"Assign",9),D(M,"QuestionMark",10),D(M,"Colon",11),D(M,"Plus",12),D(M,"Minus",13),D(M,"Multiply",14),D(M,"Divide",15),D(M,"Modulus",16),D(M,"Hashtag",17),D(M,"LessThan",18),D(M,"MoreThan",19),D(M,"LessThanEquals",20),D(M,"GreaterThanEquals",21),D(M,"Equals_",22),D(M,"NotEquals",23),D(M,"MultiplyAssign",24),D(M,"DivideAssign",25),D(M,"ModulusAssign",26),D(M,"PlusAssign",27),D(M,"MinusAssign",28),D(M,"ARROW",29),D(M,"ColonEquals",30),D(M,"BooleanLiteral",31),D(M,"IntegerLiteral",32),D(M,"DecimalLiteral",33),D(M,"Break",34),D(M,"And",35),D(M,"Export",36),D(M,"For",37),D(M,"Var",38),D(M,"Continue",39),D(M,"Varip",40),D(M,"Switch",41),D(M,"While",42),D(M,"If",43),D(M,"In",44),D(M,"Or",45),D(M,"Not",46),D(M,"Method",47),D(M,"Else",48),D(M,"To",49),D(M,"By",50),D(M,"Type",51),D(M,"Import",52),D(M,"As",53),D(M,"Enum",54),D(M,"Map",55),D(M,"ColorLiteral",56),D(M,"StringLiteral",57),D(M,"Identifier",58),D(M,"HIDDEN_",59),D(M,"COMMENT_",60),D(M,"NEWLINE",61),D(M,"EOF",dp.EOF),D(M,"RULE_program",0),D(M,"RULE_globalStmt",1),D(M,"RULE_blockStmt",2),D(M,"RULE_stmt",3),D(M,"RULE_simpleStmt",4),D(M,"RULE_flowStmt",5),D(M,"RULE_block",6),D(M,"RULE_blockLine",7),D(M,"RULE_variableDeclarationStmt",8),D(M,"RULE_variableDeclarationList",9),D(M,"RULE_varModifier",10),D(M,"RULE_blockSequence",11),D(M,"RULE_expressionSequence",12),D(M,"RULE_expressionBlockSequence",13),D(M,"RULE_varBlockStmt",14),D(M,"RULE_varArrayDeclaration",15),D(M,"RULE_blockExpression",16),D(M,"RULE_singleExpression",17),D(M,"RULE_brackethesized",18),D(M,"RULE_arguments",19),D(M,"RULE_argument",20),D(M,"RULE_ifStatement",21),D(M,"RULE_forStatement",22),D(M,"RULE_switchStatement",23),D(M,"RULE_caseClause",24),D(M,"RULE_defaultCaluse",25),D(M,"RULE_whileStatement",26),D(M,"RULE_importStmt",27),D(M,"RULE_importElement",28),D(M,"RULE_literal",29),D(M,"RULE_methodStmt",30),D(M,"RULE_methodElement",31),D(M,"RULE_methodName",32),D(M,"RULE_arrowFunction",33),D(M,"RULE_arrowFunctionParameters",34),D(M,"RULE_formalParameterList",35),D(M,"RULE_formalParameterArg",36),D(M,"RULE_arrowMethod",37),D(M,"RULE_arrowMethodParameters",38),D(M,"RULE_typeStatement",39),D(M,"RULE_typeElement",40),D(M,"RULE_assignmentOperator",41),D(M,"RULE_typeMap",42),D(M,"RULE_typeSeries",43),D(M,"RULE_typeArray",44),D(M,"RULE_typeGather",45),D(M,"RULE_identifier",46),D(M,"RULE_typeName",47),D(M,"RULE_name",48),D(M,"RULE_enumStatement",49),D(M,"RULE_enumElement",50),D(M,"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'"]),D(M,"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"]),D(M,"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"]),D(M,"_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,4,0,47,47,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]),D(M,"__ATN"),D(M,"DecisionsToDFA",M._ATN.decisionToState.map((e,n)=>new hp(e,n)));let F=M;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(sl)}globalStmt(e){return this.getTypedRuleContext(sl,e)}get ruleIndex(){return F.RULE_program}accept(e){return e.visitProgram?e.visitProgram(this):e.visitChildren(this)}}class sl 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(mp,0)}importStmt(){return this.getTypedRuleContext(Ap,0)}arrowFunction(){return this.getTypedRuleContext(Op,0)}arrowMethod(){return this.getTypedRuleContext(Dp,0)}typeStatement(){return this.getTypedRuleContext(Rp,0)}enumStatement(){return this.getTypedRuleContext(Ip,0)}get ruleIndex(){return F.RULE_globalStmt}accept(e){return e.visitGlobalStmt?e.visitGlobalStmt(this):e.visitChildren(this)}}class mp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}varBlockStmt(){return this.getTypedRuleContext(fl,0)}blockExpression(){return this.getTypedRuleContext(su,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 al extends Ye{constructor(e,n,r){super(n,r),this.parser=e}simpleStmt(){return this.getTypedRuleContext(ul,0)}NEWLINE(){return this.getToken(F.NEWLINE,0)}Comma(){return this.getToken(F.Comma,0)}expressionBlockSequence(){return this.getTypedRuleContext(gp,0)}get ruleIndex(){return F.RULE_stmt}accept(e){return e.visitStmt?e.visitStmt(this):e.visitChildren(this)}}class ul extends Ye{constructor(e,n,r){super(n,r),this.parser=e}expressionSequence(){return this.getTypedRuleContext(ll,0)}blockSequence(){return this.getTypedRuleContext(yp,0)}brackethesized(){return this.getTypedRuleContext(hl,0)}flowStmt(){return this.getTypedRuleContext(_p,0)}get ruleIndex(){return F.RULE_simpleStmt}accept(e){return e.visitSimpleStmt?e.visitSimpleStmt(this):e.visitChildren(this)}}class _p 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 ia extends Ye{constructor(e,n,r){super(n,r),this.parser=e}simpleStmt(){return this.getTypedRuleContext(ul,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(al)}stmt(e){return this.getTypedRuleContext(al,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(bl,0)}singleExpression(){return this.getTypedRuleContext($e,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(oa,0)}Assign(){return this.getToken(F.Assign,0)}singleExpression(){return this.getTypedRuleContext($e,0)}accept(e){return e.visitDeclareAssign?e.visitDeclareAssign(this):e.visitChildren(this)}}class cl 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 yp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}singleExpression_list(){return this.getTypedRuleContexts($e)}singleExpression(e){return this.getTypedRuleContext($e,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 ll extends Ye{constructor(e,n,r){super(n,r),this.parser=e}singleExpression_list(){return this.getTypedRuleContexts($e)}singleExpression(e){return this.getTypedRuleContext($e,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 gp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}varBlockStmt(){return this.getTypedRuleContext(fl,0)}blockExpression(){return this.getTypedRuleContext(su,0)}Comma_list(){return this.getTokens(F.Comma)}Comma(e){return this.getToken(F.Comma,e)}singleExpression_list(){return this.getTypedRuleContexts($e)}singleExpression(e){return this.getTypedRuleContext($e,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 fl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}blockExpression(){return this.getTypedRuleContext(su,0)}varArrayDeclaration(){return this.getTypedRuleContext(oa,0)}Assign(){return this.getToken(F.Assign,0)}name(){return this.getTypedRuleContext(cu,0)}assignmentOperator(){return this.getTypedRuleContext(bl,0)}get ruleIndex(){return F.RULE_varBlockStmt}accept(e){return e.visitVarBlockStmt?e.visitVarBlockStmt(this):e.visitChildren(this)}}class oa 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 oa{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 oa{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}identifier(){return this.getTypedRuleContext(yn,0)}varModifier(){return this.getTypedRuleContext(cl,0)}typeGather(){return this.getTypedRuleContext(jo,0)}accept(e){return e.visitVarSingle?e.visitVarSingle(this):e.visitChildren(this)}}class su extends Ye{constructor(e,n,r){super(n,r),this.parser=e}ifStatement(){return this.getTypedRuleContext(vp,0)}forStatement(){return this.getTypedRuleContext(au,0)}whileStatement(){return this.getTypedRuleContext(Tp,0)}switchStatement(){return this.getTypedRuleContext(Ep,0)}get ruleIndex(){return F.RULE_blockExpression}accept(e){return e.visitBlockExpression?e.visitBlockExpression(this):e.visitChildren(this)}}class $e 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 $e{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}OpenParen(){return this.getToken(F.OpenParen,0)}singleExpression(){return this.getTypedRuleContext($e,0)}CloseParen(){return this.getToken(F.CloseParen,0)}accept(e){return e.visitParenthesizedExpression?e.visitParenthesizedExpression(this):e.visitChildren(this)}}class b_ extends $e{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts($e)}singleExpression(e){return this.getTypedRuleContext($e,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 $e{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts($e)}singleExpression(e){return this.getTypedRuleContext($e,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 $e{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts($e)}singleExpression(e){return this.getTypedRuleContext($e,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 $e{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts($e)}singleExpression(e){return this.getTypedRuleContext($e,e)}And(){return this.getToken(F.And,0)}accept(e){return e.visitLogicalAndExpression?e.visitLogicalAndExpression(this):e.visitChildren(this)}}class T_ extends $e{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 $e{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}literal(){return this.getTypedRuleContext(xp,0)}accept(e){return e.visitLiteralExpression?e.visitLiteralExpression(this):e.visitChildren(this)}}class x_ extends $e{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts($e)}singleExpression(e){return this.getTypedRuleContext($e,e)}Or(){return this.getToken(F.Or,0)}accept(e){return e.visitLogicalOrExpression?e.visitLogicalOrExpression(this):e.visitChildren(this)}}class C_ extends $e{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression(){return this.getTypedRuleContext($e,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 $e{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}Not(){return this.getToken(F.Not,0)}singleExpression(){return this.getTypedRuleContext($e,0)}accept(e){return e.visitNotExpression?e.visitNotExpression(this):e.visitChildren(this)}}class k_ extends $e{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts($e)}singleExpression(e){return this.getTypedRuleContext($e,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 D_ extends $e{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 w_ extends $e{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts($e)}singleExpression(e){return this.getTypedRuleContext($e,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 R_ extends $e{constructor(e,n){super(e,n.parentCtx,n.invokingState),super.copyFrom(n)}singleExpression_list(){return this.getTypedRuleContexts($e)}singleExpression(e){return this.getTypedRuleContext($e,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 hl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}OpenBracket(){return this.getToken(F.OpenBracket,0)}expressionSequence(){return this.getTypedRuleContext(ll,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 bp 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(pl)}argument(e){return this.getTypedRuleContext(pl,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 pl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}singleExpression(){return this.getTypedRuleContext($e,0)}brackethesized(){return this.getTypedRuleContext(hl,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 vp 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($e)}singleExpression(e){return this.getTypedRuleContext($e,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 au 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 au{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($e)}singleExpression(e){return this.getTypedRuleContext($e,e)}To(){return this.getToken(F.To,0)}blockLine(){return this.getTypedRuleContext(mo,0)}varModifier(){return this.getTypedRuleContext(cl,0)}typeGather(){return this.getTypedRuleContext(jo,0)}By(){return this.getToken(F.By,0)}accept(e){return e.visitForToStatement?e.visitForToStatement(this):e.visitChildren(this)}}class I_ extends au{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($e,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 Ep 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($e,0)}defaultCaluse(){return this.getTypedRuleContext(Sp,0)}caseClause_list(){return this.getTypedRuleContexts(dl)}caseClause(e){return this.getTypedRuleContext(dl,e)}get ruleIndex(){return F.RULE_switchStatement}accept(e){return e.visitSwitchStatement?e.visitSwitchStatement(this):e.visitChildren(this)}}class dl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}singleExpression(){return this.getTypedRuleContext($e,0)}ARROW(){return this.getToken(F.ARROW,0)}block(){return this.getTypedRuleContext(ia,0)}get ruleIndex(){return F.RULE_caseClause}accept(e){return e.visitCaseClause?e.visitCaseClause(this):e.visitChildren(this)}}class Sp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}ARROW(){return this.getToken(F.ARROW,0)}block(){return this.getTypedRuleContext(ia,0)}get ruleIndex(){return F.RULE_defaultCaluse}accept(e){return e.visitDefaultCaluse?e.visitDefaultCaluse(this):e.visitChildren(this)}}class Tp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}While(){return this.getToken(F.While,0)}singleExpression(){return this.getTypedRuleContext($e,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 Ap extends Ye{constructor(e,n,r){super(n,r),this.parser=e}importElement_list(){return this.getTypedRuleContexts(ml)}importElement(e){return this.getTypedRuleContext(ml,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 ml 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 xp 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(sa)}methodElement(e){return this.getTypedRuleContext(sa,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 sa extends Ye{constructor(e,n,r){super(n,r),this.parser=e}methodName(){return this.getTypedRuleContext(Cp,0)}arguments(){return this.getTypedRuleContext(bp,0)}get ruleIndex(){return F.RULE_methodElement}accept(e){return e.visitMethodElement?e.visitMethodElement(this):e.visitChildren(this)}}class Cp 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($e,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 Op extends Ye{constructor(e,n,r){super(n,r),this.parser=e}identifier(){return this.getTypedRuleContext(yn,0)}arrowFunctionParameters(){return this.getTypedRuleContext(kp,0)}ARROW(){return this.getToken(F.ARROW,0)}block(){return this.getTypedRuleContext(ia,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 kp 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(_l,0)}get ruleIndex(){return F.RULE_arrowFunctionParameters}accept(e){return e.visitArrowFunctionParameters?e.visitArrowFunctionParameters(this):e.visitChildren(this)}}class _l extends Ye{constructor(e,n,r){super(n,r),this.parser=e}formalParameterArg_list(){return this.getTypedRuleContexts(yl)}formalParameterArg(e){return this.getTypedRuleContext(yl,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 yl extends Ye{constructor(e,n,r){super(n,r),this.parser=e}identifier(){return this.getTypedRuleContext(yn,0)}typeGather(){return this.getTypedRuleContext(jo,0)}Assign(){return this.getToken(F.Assign,0)}singleExpression(){return this.getTypedRuleContext($e,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(wp,0)}ARROW(){return this.getToken(F.ARROW,0)}block(){return this.getTypedRuleContext(ia,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 wp extends Ye{constructor(e,n,r){super(n,r),this.parser=e}OpenParen(){return this.getToken(F.OpenParen,0)}typeGather(){return this.getTypedRuleContext(jo,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($e,0)}Comma(){return this.getToken(F.Comma,0)}formalParameterList(){return this.getTypedRuleContext(_l,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(gl)}typeElement(e){return this.getTypedRuleContext(gl,e)}get ruleIndex(){return F.RULE_typeStatement}accept(e){return e.visitTypeStatement?e.visitTypeStatement(this):e.visitChildren(this)}}class gl 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(jo,0)}Assign(){return this.getToken(F.Assign,0)}singleExpression(){return this.getTypedRuleContext($e,0)}get ruleIndex(){return F.RULE_typeElement}accept(e){return e.visitTypeElement?e.visitTypeElement(this):e.visitChildren(this)}}class bl 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 vl 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 Np 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(El,0)}typeMap(){return this.getTypedRuleContext(vl,0)}get ruleIndex(){return F.RULE_typeSeries}accept(e){return e.visitTypeSeries?e.visitTypeSeries(this):e.visitChildren(this)}}class El 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 jo extends Ye{constructor(e,n,r){super(n,r),this.parser=e}typeName(){return this.getTypedRuleContext(mi,0)}typeArray(){return this.getTypedRuleContext(El,0)}typeMap(){return this.getTypedRuleContext(vl,0)}typeSeries(){return this.getTypedRuleContext(Np,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)}Method(){return this.getToken(F.Method,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(sa)}methodElement(e){return this.getTypedRuleContext(sa,e)}OpenParen(){return this.getToken(F.OpenParen,0)}singleExpression(){return this.getTypedRuleContext($e,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 Ip 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(Sl)}enumElement(e){return this.getTypedRuleContext(Sl,e)}get ruleIndex(){return F.RULE_enumStatement}accept(e){return e.visitEnumStatement?e.visitEnumStatement(this):e.visitChildren(this)}}class Sl 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 a_{constructor(n){super(n);D(this,"tokens");D(this,"indents");D(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
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 a=this.getCharIndex()-1,c=r.length?a-r.length+1:a;return new n_([this,this._input],n,0,c,a)}getIndentationCount(n){let r=0;for(let a=0;a<n.length;a++)n[a]===" "?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,""),a=this._input.LA(1),c=this._input.LA(2),h=this.getIndentationCount(r);if(this.opened>0||c!=-1&&(a===13||a===10||a===47&&c===47||h%4))this.skip();else{this.emitToken(this.commonToken(F.NEWLINE,n));const d=this.indents.length?this.indents[this.indents.length-1]:0;if(h===d)this.skip();else if(h>d)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 Re=class Re extends P_{constructor(e){super(e),this._interp=new u_(this,Re._ATN,Re.DecisionsToDFA,new pp)}get grammarFileName(){return"tccScriptLexer.g4"}get literalNames(){return Re.literalNames}get symbolicNames(){return Re.symbolicNames}get ruleNames(){return Re.ruleNames}get serializedATN(){return Re._serializedATN}get channelNames(){return Re.channelNames}get modeNames(){return Re.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 Re.__ATN||(Re.__ATN=new fp().deserialize(Re._serializedATN)),Re.__ATN}};D(Re,"INDENT",1),D(Re,"DEDENT",2),D(Re,"Point",3),D(Re,"OpenBracket",4),D(Re,"CloseBracket",5),D(Re,"OpenParen",6),D(Re,"CloseParen",7),D(Re,"Comma",8),D(Re,"Assign",9),D(Re,"QuestionMark",10),D(Re,"Colon",11),D(Re,"Plus",12),D(Re,"Minus",13),D(Re,"Multiply",14),D(Re,"Divide",15),D(Re,"Modulus",16),D(Re,"Hashtag",17),D(Re,"LessThan",18),D(Re,"MoreThan",19),D(Re,"LessThanEquals",20),D(Re,"GreaterThanEquals",21),D(Re,"Equals_",22),D(Re,"NotEquals",23),D(Re,"MultiplyAssign",24),D(Re,"DivideAssign",25),D(Re,"ModulusAssign",26),D(Re,"PlusAssign",27),D(Re,"MinusAssign",28),D(Re,"ARROW",29),D(Re,"ColonEquals",30),D(Re,"BooleanLiteral",31),D(Re,"IntegerLiteral",32),D(Re,"DecimalLiteral",33),D(Re,"Break",34),D(Re,"And",35),D(Re,"Export",36),D(Re,"For",37),D(Re,"Var",38),D(Re,"Continue",39),D(Re,"Varip",40),D(Re,"Switch",41),D(Re,"While",42),D(Re,"If",43),D(Re,"In",44),D(Re,"Or",45),D(Re,"Not",46),D(Re,"Method",47),D(Re,"Else",48),D(Re,"To",49),D(Re,"By",50),D(Re,"Type",51),D(Re,"Import",52),D(Re,"As",53),D(Re,"Enum",54),D(Re,"Map",55),D(Re,"ColorLiteral",56),D(Re,"StringLiteral",57),D(Re,"Identifier",58),D(Re,"HIDDEN_",59),D(Re,"COMMENT_",60),D(Re,"NEWLINE",61),D(Re,"EOF",dp.EOF),D(Re,"channelNames",["DEFAULT_TOKEN_CHANNEL","HIDDEN"]),D(Re,"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'"]),D(Re,"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"]),D(Re,"modeNames",["DEFAULT_MODE"]),D(Re,"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"]),D(Re,"_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]),D(Re,"__ATN"),D(Re,"DecisionsToDFA",Re._ATN.decisionToState.map((e,n)=>new hp(e,n)));let Tl=Re;var V=(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))(V||{}),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 pe={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"},ar={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.",boolVarNumWarning:"The `$name` variable casts a numeric value to the 'bool' type. To avoid potential unexpected results, assign a 'bool' value to this variable."},Pi=[V.SERIES,V.SIMPLE,V.INPUT,V.CONST],lu=[V.INT,V.FLOAT,V.BOOL,V.COLOR,V.STRING],fu=["indicator","strategy","library"],Al=["plot","plotbar","plotchar","plotarrow","plotshape","plotcandle","hline","alertcondition","barcolor","bgcolor","fill"],F_=[...Al,"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_=[...Al,"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"],Pp=["strategy","input","table","color","line","linefill","label","box"],xl=["close","open","high","low","hl2","hlc3","hlcc4","ohlc4","volume"],B_=/^\/\/\s*@(description|field|function|param|returns|type|enum|variable)/,wn=["case","catch","default","delete","do","finally","function","instanceof","new","return","this","throw","try","typeof","void","with"],Fp=["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 Lp=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()})(Lp,function(){var n=1e3,r=6e4,a=36e5,c="millisecond",h="second",d="minute",v="hour",S="day",C="week",T="month",k="quarter",B="year",L="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"],de=ge%100;return"["+ge+(re[(de-20)%10]||re[de]||re[0])+"]"}},R=function(ge,re,de){var fe=String(ge);return!fe||fe.length>=re?ge:""+Array(re+1-fe.length).join(de)+ge},w={s:R,z:function(ge){var re=-ge.utcOffset(),de=Math.abs(re),fe=Math.floor(de/60),Oe=de%60;return(re<=0?"+":"-")+R(fe,2,"0")+":"+R(Oe,2,"0")},m:function ge(re,de){if(re.date()<de.date())return-ge(de,re);var fe=12*(de.year()-re.year())+(de.month()-re.month()),Oe=re.clone().add(fe,T),Ie=de-Oe<0,ve=re.clone().add(fe+(Ie?-1:1),T);return+(-(fe+(de-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:T,y:B,w:C,d:S,D:L,h:v,m:d,s:h,ms:c,Q:k}[ge]||String(ge||"").toLowerCase().replace(/s$/,"")},u:function(ge){return ge===void 0}},U="en",X={};X[U]=O;var ee="$isDayjsObject",z=function(ge){return ge instanceof Q||!(!ge||!ge[ee])},Y=function ge(re,de,fe){var Oe;if(!re)return U;if(typeof re=="string"){var Ie=re.toLowerCase();X[Ie]&&(Oe=Ie),de&&(X[Ie]=de,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&&(U=Oe),Oe||!fe&&U},$=function(ge,re){if(z(ge))return ge.clone();var de=typeof re=="object"?re:{};return de.date=ge,de.args=arguments,new Q(de)},ne=w;ne.l=Y,ne.i=z,ne.w=function(ge,re){return $(ge,{locale:re.$L,utc:re.$u,x:re.$x,$offset:re.$offset})};var Q=function(){function ge(de){this.$L=Y(de.locale,null,!0),this.parse(de),this.$x=this.$x||de.x||{},this[ee]=!0}var re=ge.prototype;return re.parse=function(de){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)}(de),this.init()},re.init=function(){var de=this.$d;this.$y=de.getFullYear(),this.$M=de.getMonth(),this.$D=de.getDate(),this.$W=de.getDay(),this.$H=de.getHours(),this.$m=de.getMinutes(),this.$s=de.getSeconds(),this.$ms=de.getMilliseconds()},re.$utils=function(){return ne},re.isValid=function(){return this.$d.toString()!==b},re.isSame=function(de,fe){var Oe=$(de);return this.startOf(fe)<=Oe&&Oe<=this.endOf(fe)},re.isAfter=function(de,fe){return $(de)<this.startOf(fe)},re.isBefore=function(de,fe){return this.endOf(fe)<$(de)},re.$g=function(de,fe,Oe){return ne.u(de)?this[fe]:this.set(Oe,de)},re.unix=function(){return Math.floor(this.valueOf()/1e3)},re.valueOf=function(){return this.$d.getTime()},re.startOf=function(de,fe){var Oe=this,Ie=!!ne.u(fe)||fe,ve=ne.p(de),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 T:return Ie?Ue(1,ue):Ue(0,ue+1);case C:var At=this.$locale().weekStart||0,Vt=(ie<At?ie+7:ie)-At;return Ue(Ie?Ae-Vt:Ae+(6-Vt),ue);case S:case L:return J(be+"Hours",0);case v:return J(be+"Minutes",1);case d:return J(be+"Seconds",2);case h:return J(be+"Milliseconds",3);default:return this.clone()}},re.endOf=function(de){return this.startOf(de,!1)},re.$set=function(de,fe){var Oe,Ie=ne.p(de),ve="set"+(this.$u?"UTC":""),Ue=(Oe={},Oe[S]=ve+"Date",Oe[L]=ve+"Date",Oe[T]=ve+"Month",Oe[B]=ve+"FullYear",Oe[v]=ve+"Hours",Oe[d]=ve+"Minutes",Oe[h]=ve+"Seconds",Oe[c]=ve+"Milliseconds",Oe)[Ie],J=Ie===S?this.$D+(fe-this.$W):fe;if(Ie===T||Ie===B){var ie=this.clone().set(L,1);ie.$d[Ue](J),ie.init(),this.$d=ie.set(L,Math.min(this.$D,ie.daysInMonth())).$d}else Ue&&this.$d[Ue](J);return this.init(),this},re.set=function(de,fe){return this.clone().$set(de,fe)},re.get=function(de){return this[ne.p(de)]()},re.add=function(de,fe){var Oe,Ie=this;de=Number(de);var ve=ne.p(fe),Ue=function(ue){var Ae=$(Ie);return ne.w(Ae.date(Ae.date()+Math.round(ue*de)),Ie)};if(ve===T)return this.set(T,this.$M+de);if(ve===B)return this.set(B,this.$y+de);if(ve===S)return Ue(1);if(ve===C)return Ue(7);var J=(Oe={},Oe[d]=r,Oe[v]=a,Oe[h]=n,Oe)[ve]||1,ie=this.$d.getTime()+de*J;return ne.w(ie,this)},re.subtract=function(de,fe){return this.add(-1*de,fe)},re.format=function(de){var fe=this,Oe=this.$locale();if(!this.isValid())return Oe.invalidDate||b;var Ie=de||"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)},Vt=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 Vt(1);case"hh":return Vt(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(de,fe,Oe){var Ie,ve=this,Ue=ne.p(fe),J=$(de),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 T:Ie=Ae();break;case k:Ie=Ae()/3;break;case C:Ie=(ue-ie)/6048e5;break;case S:Ie=(ue-ie)/864e5;break;case v:Ie=ue/a;break;case d: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(T).$D},re.$locale=function(){return X[this.$L]},re.locale=function(de,fe){if(!de)return this.$L;var Oe=this.clone(),Ie=Y(de,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 $.prototype=_e,[["$ms",c],["$s",h],["$m",d],["$H",v],["$W",S],["$M",T],["$y",B],["$D",L]].forEach(function(ge){_e[ge[1]]=function(re){return this.$g(re,ge[0],ge[1])}}),$.extend=function(ge,re){return ge.$i||(ge(re,Q,$),ge.$i=!0),$},$.locale=Y,$.isDayjs=z,$.unix=function(ge){return $(1e3*ge)},$.en=X[U],$.Ls=X,$.p={},$})})(U_);function ye(t,e){return t.replace(/\$(\w+)/g,(n,r)=>String(e[r])||n)}function hu(t){var e=encodeURI(t),n=btoa(e);return n}class $_ extends c_{constructor(){super(...arguments);D(this,"visitProgram");D(this,"visitGlobalStmt");D(this,"visitBlockStmt");D(this,"visitStmt");D(this,"visitSimpleStmt");D(this,"visitFlowStmt");D(this,"visitBlock");D(this,"visitBlockLine");D(this,"visitVariableDeclarationStmt");D(this,"visitDeclareAssign");D(this,"visitAgainAssign");D(this,"visitVarModifier");D(this,"visitBlockSequence");D(this,"visitExpressionSequence");D(this,"visitExpressionBlockSequence");D(this,"visitVarBlockStmt");D(this,"visitVarSingle");D(this,"visitVarMultiple");D(this,"visitBlockExpression");D(this,"visitParenthesizedExpression");D(this,"visitAdditiveExpression");D(this,"visitRelationalExpression");D(this,"visitTernaryExpression");D(this,"visitLogicalAndExpression");D(this,"visitNameExpression");D(this,"visitLiteralExpression");D(this,"visitLogicalOrExpression");D(this,"visitUnaryExpression");D(this,"visitNotExpression");D(this,"visitMemberIndexExpression");D(this,"visitMethodExpression");D(this,"visitEqualityExpression");D(this,"visitMultiplicativeExpression");D(this,"visitBrackethesized");D(this,"visitArguments");D(this,"visitArgument");D(this,"visitIfStatement");D(this,"visitForToStatement");D(this,"visitForInStatement");D(this,"visitSwitchStatement");D(this,"visitCaseClause");D(this,"visitDefaultCaluse");D(this,"visitWhileStatement");D(this,"visitImportStmt");D(this,"visitImportElement");D(this,"visitLiteral");D(this,"visitMethodStmt");D(this,"visitMethodElement");D(this,"visitMethodName");D(this,"visitArrowFunction");D(this,"visitArrowFunctionParameters");D(this,"visitFormalParameterList");D(this,"visitFormalParameterArg");D(this,"visitArrowMethod");D(this,"visitArrowMethodParameters");D(this,"visitTypeStatement");D(this,"visitTypeElement");D(this,"visitAssignmentOperator");D(this,"visitTypeMap");D(this,"visitTypeSeries");D(this,"visitTypeArray");D(this,"visitTypeGather");D(this,"visitIdentifier");D(this,"visitTypeName");D(this,"visitName");D(this,"visitEnumStatement");D(this,"visitEnumElement")}}class V_ extends $_{constructor(n){super();D(this,"_buildinVariables");D(this,"_buildinTypes");D(this,"_buildinConstants");D(this,"_buildinMethods");D(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 a=new Map(Object.entries(n[r]));switch(r){case"constants":this._buildinConstants=a;break;case"functions":this._buildinFunctions=a;break;case"methods":this._buildinMethods=a;break;case"types":this._buildinTypes=a;break;case"variables":this._buildinVariables=a;break}}}_typeHandle(n=[],r){if(!n.length)return V.UNDETERMINED;if(n=n.filter(h=>!h.endsWith(V.NA)),!n.length)return`${V.SIMPLE} ${V.NA}`;let a=100,c="";for(const h of n){if(h===V.UNDETERMINED)return V.UNDETERMINED;h.startsWith(V.SERIES)?a=0:h.startsWith(V.SIMPLE)&&a>0?a=1:h.startsWith(V.INPUT)&&a>1?a=2:h.startsWith(V.CONST)&&a>2&&(a=3);const d=this._removePrefix(h);(d!==V.INT||!c)&&(c=d)}return a===100?c:`${Pi[a]} ${r||c}`}_returnTypesOtherHandle(n,r,a,c){if(!a.length||a[0].includes("<>")){const h=n.type;let d=h;if(!h||h===V.UNDETERMINED)return[V.UNDETERMINED];switch(r){case"series <type>":d=this._getArrayType(h),d||(d=this._removePrefix(h)),a=[this._typeAddSeries(d)];break;case"array<type>":case"matrix<type>":case"type[]":if(this._isMapType(h)){const v=this._getMapType(h)||[];c.includes("keys")?d=v[0]:d=v[1]}else d=this._getArrayType(h),d||(d=this._removePrefix(h));a=[this._typeReplace(r,d)];break;case"<matrix_type>":d=this._getArrayType(h),a=[this._typeAddSeries(d)];break;case"map<keyType, valueType>":a=[d];break;case"<value_type>":d=this._getMapType(h),a=[d[1]];break}}return a}_checkMethodThisType(n,r){if(!n||!n.length||n[0].includes("<>"))return!0;const a=r.replace("int","float");return n.some(c=>c===r||a===c||c.endsWith(r))}_priorityComparison(n,r){if(!n)return!1;if(this._isArrayType(n)||this._isMatrixType(n))return this._getArrayType(r)!==V.INT;{const a=this._getPrefix(n),c=this._getPrefix(r);return a===c?!!n.endsWith(V.INT):!(Pi.indexOf(a)<Pi.indexOf(c))}}_compareType(n,r){if(n===V.UNDETERMINED||r===V.UNDETERMINED)return!0;const a=[V.FLOAT,V.INT];if(this._isArrayType(n)||this._isMatrixType(n)){const c=this._getArrayType(n)||"",h=this._getArrayType(r)||"";return c===h||a.includes(c)&&a.includes(h)}else if(this._isMapType(n)){const c=this._getMapType(n)||[],h=this._getMapType(r)||[];return(c[0]===h[0]||a.includes(c[0])&&a.includes(h[0]))&&(c[1]===h[1]||a.includes(c[1])&&a.includes(h[1]))}else{const c=this._removePrefix(n),h=this._removePrefix(r);return c===V.NA||h===V.NA||c===h||a.includes(c)&&a.includes(h)}}_typeAddSeries(n){return this._buildinTypes.get(n)&&n!==V.CHART_POINT?`${V.SERIES} ${n}`:n}_typeAddConst(n){return lu.includes(n)?`${V.CONST} ${n}`:this._typeAddSeries(n)}_getOriginMethodName(n,r){let a="";return this._isArrayType(n)?a=`${V.ARRAY}.${r}`:this._isMatrixType(n)?a=`${V.MATRIX}.${r}`:this._isMapType(n)?a=`${V.MAP}.${r}`:a=`${this._removePrefix(n)}.${r}`,a}_returnedTypesParse(n){if(!n||!n.length)return[];const r=n[0];return/^\[.+\]$/.test(r)?r.replace(/[[\]]/g,"").split(",").map(a=>a.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)?V.ARRAY:this._isMapType(n)?V.MAP:this._isMatrixType(n)?V.MATRIX:this._removePrefix(n)}_typeReplace(n,r){return r===V.UNDETERMINED?r:(r=this._removePrefix(r),this._arrayTypeConvert(n.startsWith(V.SERIES)?n.replace("<type>",r):n.replace("type",r)))}}var Sn=(t=>(t[t.Hint=1]="Hint",t[t.Info=2]="Info",t[t.Warning=4]="Warning",t[t.Error=8]="Error",t))(Sn||{});class Mp extends V_{constructor(n,r,a){super(n);D(this,"_loopCount");D(this,"_errors");D(this,"_variables");D(this,"_functions");D(this,"_methods");D(this,"_types");D(this,"_enums");D(this,"_currentBlockVars");D(this,"_currentFuncParams");D(this,"_isNeedCalc");D(this,"_blockCount");D(this,"_isInFunc");D(this,"_currentExportFunc");D(this,"_onlyStatementsCount");D(this,"_blockRanges");D(this,"_overloadsFuncs");D(this,"_hasMemberIndex");D(this,"_isInLocalScop");D(this,"_comments");D(this,"_currentLine",0);D(this,"_hasDrawFunc",!1);D(this,"_hasCreateOrderFunc",!1);D(this,"_scriptType");D(this,"_exportFunctions");D(this,"_exportMethods");D(this,"_exportTypes");D(this,"_exportEnums");D(this,"_exportPositions");D(this,"_description","");D(this,"_endExport");D(this,"_importLibs");D(this,"_getImportLibraryFunc");D(this,"_isEndExpr");D(this,"_inputVarName");D(this,"_hasRequest");D(this,"_strategyFuncName");D(this,"_strategyVarName");D(this,"visitProgram",async n=>{const{children:r}=n;let a=0;const c=[];for(this._pushBlockRanges(n);a<r.length;a++){const h=r[a];h.ruleIndex===F.RULE_globalStmt&&c.push(await this.visit(h))}return this._onlyStatementsCount<=0?this._errors.push({startColumn:0,endColumn:0,startLineNumber:0,endLineNumber:0,type:Sn.Error,message:ye(pe.onlyStatementErr,{count:this._onlyStatementsCount})}):this._scriptType===Ii.indicator&&(this._strategyFuncName?this._errorHandle(ye(pe.indicatorUseStrategyFuncErr,{name:this._strategyFuncName.name,type:"functions"}),this._strategyFuncName.ctx):this._strategyVarName&&this._errorHandle(ye(pe.indicatorUseStrategyFuncErr,{name:this._strategyVarName.name,type:"variables"}),this._strategyVarName.ctx)),c});D(this,"visitGlobalStmt",async n=>{const{children:r}=n;if(r&&r.length){const a=r[0],c=await this.visit(a);return a.ruleIndex===F.RULE_methodStmt&&fu.includes(c.exprs[0].name)&&(this._onlyStatementsCount++,this._onlyStatementsCount>1?this._errorHandle(ye(pe.onlyStatementErr,{count:this._onlyStatementsCount}),a):this._scriptType=c.exprs[0].name),c}return null});D(this,"visitBlockStmt",n=>{const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const h=r[a];switch(h.ruleIndex){case F.RULE_variableDeclarationStmt:c.push(...this.visit(h));break;case F.RULE_varBlockStmt:c.push(this.visit(h));break;case F.RULE_blockExpression:c.push(this.visit(h));break}}return c});D(this,"visitStmt",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return this.visit(a)}return null});D(this,"visitSimpleStmt",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return this.visit(a)}return null});D(this,"visitFlowStmt",n=>{const{children:r}=n,{column:a,line:c,text:h}=r[0].symbol;if(this._currentLine=c,this._loopCount<=0){const d=a+1;this._errors.push({startColumn:d,endColumn:parseInt(d+h.length),startLineNumber:c,endLineNumber:c,message:ye(pe.onlyInLoop,{text:h})})}return{ruleType:le.FlowStmt,value:h}});D(this,"visitBlock",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return a.ruleIndex===F.RULE_simpleStmt?this._inBlock(a):this.visit(a)}return null});D(this,"visitBlockLine",n=>{const{children:r}=n;if(!r)return null;let a=0;const c=[];this._blockCount++,this._pushBlockRanges(n);const h=this._isEndExpr;for(;a<r.length;a++){const d=r[a];d.ruleIndex===F.RULE_stmt&&(this._isInFunc&&(this._isEndExpr=r.length-2===a&&h),c.push(this.visit(d)))}return this._blockCount--,this._blockRanges.pop(),this._currentBlockVars.splice(this._blockCount+1),c});D(this,"visitDeclareAssign",n=>{var h;const{children:r}=n;let a=0;const c={ruleType:le.DeclareAssign};for(;a<r.length;a++){const d=r[a];switch(d.ruleIndex){case F.RULE_varArrayDeclaration:c.nameList=this.visit(d),this._inputVarName=(h=c.nameList)==null?void 0:h.name;break;case F.RULE_singleExpression:c.value=this.visit(d),this._inputVarName=void 0;break}}return this._variablesHandle(c,n),c});D(this,"visitAgainAssign",n=>{const{children:r,start:a}=n;if(this._currentLine=a.line,r.length>=3){const c=this.visit(r[0]);this._verifyGloablVar(c,r[0]);const h=this.visit(r[2]),d=this.visit(r[1]);return c.type?this._againAssignHandle([c,h],[r[0],r[2]],d):null}return null});D(this,"visitVarModifier",n=>{const{children:r}=n;return r[0].symbol.text});D(this,"visitExpressionSequence",n=>{const{children:r,start:a}=n;let c=0;const h=[];for(this._currentLine=a.line;c<r.length;c++){const d=r[c];if(d.ruleIndex===F.RULE_singleExpression){const v=this.visit(d);v&&(v.ctx=d,h.push(v))}}return h});D(this,"visitExpressionBlockSequence",n=>{const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const h=r[a];switch(h.ruleIndex){case F.RULE_singleExpression:c.push(this.visit(h));break;case F.RULE_variableDeclarationList:c.push(this.visit(h));break;case F.RULE_blockExpression:c.push(this.visit(h));break;case F.RULE_varBlockStmt:c.push(this.visit(h));break}}return c});D(this,"visitBlockSequence",n=>{const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const h=r[a];switch(h.ruleIndex){case F.RULE_variableDeclarationList:c.push(this.visit(h));break;case F.RULE_singleExpression:c.push(this.visit(h));break}}return c});D(this,"visitVariableDeclarationStmt",n=>{const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const h=r[a];switch(h.ruleIndex){case F.RULE_variableDeclarationList:c.push(this.visit(h));break;case F.RULE_methodStmt:const d=this.visit(h);fu.includes(d.exprs[0].name)&&(this._onlyStatementsCount++,this._onlyStatementsCount>1?this._errorHandle(ye(pe.onlyStatementErr,{count:this._onlyStatementsCount}),h):this._scriptType=d.exprs[0].name),c.push(d);break}}return c});D(this,"visitVarBlockStmt",n=>{const{children:r}=n;let a=0;const c={ruleType:le.VarBlockStmt,ctx:n},h=[];for(;a<r.length;a++){const d=r[a];switch(d.ruleIndex){case F.RULE_varArrayDeclaration:c.nameList=this.visit(d);break;case F.RULE_assignmentOperator:c.operator=this.visit(d);break;case F.RULE_name:h.push(d),c.name=this.visit(d);break;case F.RULE_blockExpression:if(this._isNeedCalc=!0,c.value=this.visit(d),!c.value)break;h.push(d);const v=this._getBlockReturnTypes(c.value);v.length===1?c.value.type=v[0]:c.value.types=v,this._isNeedCalc=!1;break}}return c.name?this._againAssignHandle([c.name,c.value],h,c.operator):(this._variablesHandle(c,n),c)});D(this,"visitVarSingle",n=>{const{children:r,start:a}=n,c={ruleType:le.VarSingle};let h=0;const d=this._commentsParser(a.line,[Kt.variable]);c.desc=d==null?void 0:d[Kt.variable],this._currentLine=a.line;let v={lineNumber:0,column:0};for(;h<r.length;h++){const S=r[h];switch(S.ruleIndex){case F.RULE_varModifier:c.declare=this.visit(S);break;case F.RULE_typeGather:const C=this.visit(S);c.prefix=this._getPrefix(C),c.type=C&&this._typeAddConst(C);break;case F.RULE_identifier:const T=this.visit(S);v={lineNumber:S.start.line,column:S.start.column},this._repeatVarJudge(T,S,v),c.name=T,c.pos=v;break}}return c});D(this,"_commentsParser",(n,r,a=!1)=>{var S;const c=this._comments.filter(C=>C.line<n&&C.line>=this._currentLine),h={},d={line:0,key:"",secKey:""},v=[Kt.field,Kt.param];for(const C of c){const[T,k]=B_.exec(C.text)||[];if(k&&r.includes(k)){const B=C.text.replace(T,"").trim();if(Object.assign(d,{line:C.line,key:k}),v.includes(k)){const[L,...b]=B.split(" ");L&&(Object.assign(d,{secKey:L}),h[k]=Object.assign(h[k]||{},{[L]:b.join(" ").trim()}))}else h[k]=[B]}else if(a&&d.key){const B=C.text.replace("//","").trim();v.includes(d.key)?h[d.key][d.secKey]+=` ${B}`:(S=h[d.key])==null||S.push(B)}}return h});D(this,"visitVarMultiple",n=>{const{children:r,start:a}=n;let c=0;const h=[],d=[];for(this._currentLine=a.line;c<r.length;c++){const v=r[c];if(v.ruleIndex===F.RULE_identifier){const S=this.visit(v),C={lineNumber:v.start.line,column:v.start.column};this._repeatVarJudge(S,v,C,h),h.push(S),d.push(C)}}return{ruleType:le.VarMultiple,names:h,posList:d}});D(this,"visitBlockExpression",n=>{const{children:r,start:a}=n;if(this._currentLine=a.line,r&&r.length){const c=r[0];return this.visit(c)}return null});D(this,"visitParenthesizedExpression",n=>{const{children:r}=n,a=r[1],c=this.visit(a);return{ruleType:le.ParenthesizedExpression,type:c.type,ctx:n,exprs:c}});D(this,"visitAdditiveExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const v=r[a];v.ruleIndex===F.RULE_singleExpression?h.push(this.visit(v)):c=v.symbol.text}const d={ruleType:le.AdditiveExpression,operator:c,ctx:n,exprs:h};if(["+","-"].includes(c)){const v=[V.UNDETERMINED,V.INT,V.FLOAT];c==="+"&&v.push(V.STRING);const S=this._sameTypeJudge(h,[r[0],r[2]],c,v);d.type=this._typeHandle(S)}else{const v=this._calcTypeJudge(h[0],r[0],c),S=this._calcTypeJudge(h[1],r[2],c,1);d.type=this._typeHandle([v,S])}return d});D(this,"visitRelationalExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const S=r[a];S.ruleIndex===F.RULE_singleExpression?h.push(this.visit(S)):c=S.symbol.text}const d=this._calcTypeJudge(h[0],r[0],c),v=this._calcTypeJudge(h[1],r[2],c,1);return{ruleType:le.RelationalExpression,operator:c,ctx:n,type:this._typeHandle([d,v],V.BOOL),exprs:h}});D(this,"visitEqualityExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const v=r[a];v.ruleIndex===F.RULE_singleExpression?h.push(this.visit(v)):c=v.symbol.text}const d=this._sameTypeJudge(h,[r[0],r[2]],c,[]);return{ruleType:le.EqualityExpression,operator:c,ctx:n,type:this._typeHandle(d,V.BOOL),exprs:h}});D(this,"visitTernaryExpression",n=>{const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const d=r[a];d.ruleIndex===F.RULE_singleExpression&&c.push(this.visit(d))}let h=V.UNDETERMINED;if(c.length>=3){this._boolTypeJudge(c[0],r[0],"?:");const d=this._sameTypeJudge(c.slice(1),[r[2],r[4]],"?:",[]),v=this._getPrefix(c[0].type);h=this._typeHandle(d),v&&this._getPrefix(h)&&(h=this._typeHandle([h,`${v} ${this._removePrefix(h)}`]))}return{ruleType:le.TernaryExpression,type:h,ctx:n,exprs:c}});D(this,"visitNameExpression",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return this.visit(a)}return null});D(this,"visitLiteralExpression",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return this.visit(a)}return null});D(this,"visitUnaryExpression",n=>{var S;const{children:r}=n,[a,c]=r,h=[this.visit(c)],d=a.symbol.text,v=this._calcTypeJudge(h[0],c,d);return((S=h[0])==null?void 0:S.ruleType)===le.UnaryExpression&&this._errors.push({message:ye(pe.unaryErr,{sign:d}),startColumn:a.symbol.column+1,startLineNumber:a.symbol.line,endColumn:a.symbol.column+2,endLineNumber:a.symbol.line}),{ruleType:le.UnaryExpression,operator:d,type:v,ctx:n,exprs:h}});D(this,"visitNotExpression",n=>{const{children:r}=n,a=r[1],c=[this.visit(a)],h=this._boolTypeJudge(c[0],a,"not");return{ruleType:le.NotExpression,ctx:n,type:this._typeHandle([h],V.BOOL),exprs:c}});D(this,"visitMemberIndexExpression",n=>{var h,d;const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const v=r[a];v.ruleIndex===F.RULE_singleExpression&&c.push(this.visit(v))}if(this._memberIndexVerify(c[0],n),this._hasMemberIndex=!0,((h=c[0])==null?void 0:h.ruleType)===le.MemberIndexExpression){const v=r[1];this._errors.push({message:ye(pe.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:(d=c[0])==null?void 0:d.type,ctx:n,isInFunc:this._isInFunc,exprs:c}});D(this,"visitMethodStmt",n=>{var C;const{children:r,start:a}=n;let c=0;const h=[],d=[],v=this._commentsParser(a.line,[Kt.description],!0);this._currentLine=a.line;let S;for(;c<r.length;c++){const T=r[c];T.ruleIndex===F.RULE_methodElement&&(h.push(this.visit(T)),d.push(T))}return((C=h[0])==null?void 0:C.name)===Ii.library&&v.description&&(this._description=v.description.join(`
12
12
  `)),S=this._getMethodTypes(h,d)||[],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}});D(this,"visitMethodExpression",n=>{const{children:r}=n;if(r&&r.length){const a=r[0];return this.visit(a)}return null});D(this,"visitLogicalAndExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const S=r[a];S.ruleIndex===F.RULE_singleExpression?h.push(this.visit(S)):c=S.symbol.text}const d=this._boolTypeJudge(h[0],r[0],c),v=this._boolTypeJudge(h[1],r[2],c,1);return{ruleType:le.LogicalAndExpression,type:this._typeHandle([d,v],V.BOOL),operator:c,ctx:n,exprs:h}});D(this,"visitLogicalOrExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const S=r[a];S.ruleIndex===F.RULE_singleExpression?h.push(this.visit(S)):c=S.symbol.text}const d=this._boolTypeJudge(h[0],r[0],c),v=this._boolTypeJudge(h[1],r[2],c,1);return{ruleType:le.LogicalOrExpression,operator:c,ctx:n,type:this._typeHandle([d,v],V.BOOL),exprs:h}});D(this,"visitMultiplicativeExpression",n=>{const{children:r}=n;let a=0,c="";const h=[];for(;a<r.length;a++){const S=r[a];S.ruleIndex===F.RULE_singleExpression?h.push(this.visit(S)):c=S.symbol.text}const d=this._calcTypeJudge(h[0],r[0],c),v=this._calcTypeJudge(h[1],r[2],c,1);return{ruleType:le.MultiplicativeExpression,operator:c,ctx:n,type:this._typeHandle([d,v]),exprs:h}});D(this,"visitBrackethesized",n=>{const{children:r,start:a}=n,c=r[1];return this._currentLine=a.line,{ruleType:le.Brackethesized,ctx:n,exprs:this.visit(c)}});D(this,"visitArguments",n=>{const{children:r}=n;let a=0;const c={params:[]};let h="";for(;a<r.length;a++){const d=r[a];if(d.ruleIndex===F.RULE_argument){const v=this.visit(d),S=v.paramKey;S?(h=S,c[S]?this._errorHandle(ye(ar.moreSameArg,{arg:S}),n.parentCtx,Sn.Warning):(c[S]=v.param,c[S].ctx=d)):h?this._errorHandle(ye(pe.argsSyntaxErr,{argName:h}),d):(v.ctx=d,c.params.push(v))}}return c});D(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])}});D(this,"visitIfStatement",n=>{const{children:r}=n;let a=0;const c={ruleType:le.IfStatement,condition:[],block:[],ctx:n,typeList:[]};for(;a<r.length;a++){const h=r[a];switch(h.ruleIndex){case F.RULE_singleExpression:const d=this.visit(h);if(!d)break;d.ctx=h,c.condition.push(d);break;case F.RULE_blockLine:const v=this._isInLocalScop;this._isInLocalScop=!0;const S=this.visit(h);c.typeList.push(this._getBlockReturnTypes(S)),c.block.push(S),this._isInLocalScop=v;break}}return this._verifyIf(c),c});D(this,"visitForToStatement",n=>{const{children:r}=n;let a=0;const c={ruleType:le.ForToStatement,numerical:[],ctx:n,block:[]};for(;a<r.length;a++){const h=r[a];switch(h.ruleIndex){case F.RULE_varModifier:c.declare=this.visit(h);break;case F.RULE_typeGather:const d=this.visit(h);c.type=d&&this._typeAddSeries(d);break;case F.RULE_identifier:c.name=this.visit(h);break;case F.RULE_singleExpression:this._blockCount++,this._forToNameHandle(c,n);const v=this.visit(h);v&&(v.ctx=h,c.numerical.push(v)),this._blockCount--;break;case F.RULE_blockLine:this._loopCount++;const S=this._isInLocalScop;this._isInLocalScop=!0,c.block=this.visit(h),this._loopCount--,this._isInLocalScop=S,c.returnedTypes=this._getBlockReturnTypes(c.block);break}}return this._verifyForTo(c),c});D(this,"visitForInStatement",n=>{const{children:r}=n;let a=0;const c={ruleType:le.ForInStatement,ctx:n,names:[]};for(;a<r.length;a++){const h=r[a];switch(h.ruleIndex){case F.RULE_identifier:const d=this.visit(h);c.names.push(d);break;case F.RULE_singleExpression:this._blockCount++,c.array=this.visit(h);const v=c.array.type;this._forInNameHandle(c,n),this._isArrayType(v)||this._isMatrixType(v)||v===V.UNDETERMINED||this._errorHandle(ye(pe.typeMismatch,{operator:"foreach",index:"id",typeE:v,typeR:"array<fun_arg>"}),h),this._blockCount--;break;case F.RULE_blockLine:this._loopCount++;const S=this._isInLocalScop;this._isInLocalScop=!0,c.block=this.visit(h),this._isInLocalScop=S,this._loopCount--,c.returnedTypes=this._getBlockReturnTypes(c.block);break}}return c});D(this,"visitSwitchStatement",n=>{const{children:r}=n;let a=0;const c={ruleType:le.SwitchStatement,condition:!0,ctx:n,cases:[],defaultCase:void 0};for(;a<r.length;a++){const h=r[a];switch(h.ruleIndex){case F.RULE_singleExpression:if(c.condition=this.visit(h),!h.children)break;c.condition.ctx=h;break;case F.RULE_caseClause:c.cases.push(this.visit(h));break;case F.RULE_defaultCaluse:c.defaultCase=this.visit(h);break}}return this._verifySwitch(c),c});D(this,"visitCaseClause",n=>{const{children:r}=n,a={ruleType:le.CaseClause},c=this._isInLocalScop;return this._isInLocalScop=!0,a.condition=this.visit(r[0]),a.condition&&(a.condition.ctx=r[0],a.block=this.visit(r[2]),this._isInLocalScop=c,a.returnedTypes=this._getBlockReturnTypes(a.block)),a});D(this,"visitDefaultCaluse",n=>{const{children:r}=n,a={ruleType:le.DefaultCaluse},c=this._isInLocalScop;return this._isInLocalScop=!0,a.block=this.visit(r[1]),this._isInLocalScop=c,a.returnedTypes=this._getBlockReturnTypes(a.block),a});D(this,"visitWhileStatement",n=>{const{children:r}=n,a={ruleType:le.WhileStatement,ctx:n};if(a.condition=this.visit(r[1]),!a.condition)return a;a.condition.ctx=r[1],this._loopCount++;const c=this._isInLocalScop;return this._isInLocalScop=!0,a.block=this.visit(r[2]),this._isInLocalScop=c,this._loopCount--,a.returnedTypes=this._getBlockReturnTypes(a.block),this._verifyWhile(a),a});D(this,"visitImportStmt",async n=>{const{children:r,start:a}=n;let c=0;const h=[];for(this._currentLine=a.line;c<r.length;c++){const d=r[c];if(d.ruleIndex===F.RULE_importElement){const v=await this.visit(d);v&&h.push(v)}}return h});D(this,"visitImportElement",async n=>{const{children:r}=n;if(!r||!r.length)return;let a=0;const c=[],h={ruleType:le.ImportElement,ctx:n};for(;a<r.length;a++){const d=r[a];d.ruleIndex===F.RULE_identifier?c.push(this.visit(d)):d.symbol&&d.symbol.type===F.IntegerLiteral&&(h.libraryVersion=d.symbol.text)}return h.username=c[0],h.libraryName=c[1],h.name=c[2],await this._importHandle(h,n),h});D(this,"visitLiteral",n=>{const{children:r}=n,a=r[0],{type:c,text:h}=a.symbol,d={ruleType:le.Literal,ctx:n,type:"",value:h};switch(c){case F.ColorLiteral:d.type=V.COLOR;break;case F.BooleanLiteral:d.type=V.BOOL;break;case F.StringLiteral:if(d.type=V.STRING,h.includes(`
13
- `)){const v=h.replace(/\s*(\n|\r)\s*/g," ");d.value=`\`${v.substring(1,v.length-1)}\``}break;case F.IntegerLiteral:d.type=V.INT;break;case F.DecimalLiteral:d.type=V.FLOAT;break}return d.type&&(d.type=`${V.CONST} ${d.type}`),d});D(this,"visitMethodElement",n=>{const{children:r}=n,[a,c]=r,[h,d,v]=this.visit(a),S=this.visit(c);return h.startsWith("request.")&&this._isInFunc&&(this._currentExportFunc&&this._errorHandle(ye(pe.exportFuncUseReqErr,{name:h}),n),this._hasRequest=!0),{name:h,type:d,args:S,expr:v}});D(this,"visitMethodName",n=>{const{children:r}=n,a=[],c=[];let h=0,d=null;for(;h<r.length;h++){const S=r[h],C=S.ruleIndex,T=S.symbol;switch(C){case F.RULE_identifier:a.push(this.visit(S));break;case F.RULE_singleExpression:d=this.visit(S);break;case F.RULE_typeName:const k=this.visit(S);c.push(k),this._typeCheck(k,F.RULE_typeName,S);break;default:T&&T.text==="."&&a.push(".")}}const v=a.join("");return L_.includes(v)?this._hasDrawFunc=!0:M_.includes(v)&&(this._hasCreateOrderFunc=!0),[v,c,d]});D(this,"visitArrowFunction",n=>{const{children:r,start:a,stop:c}=n,h={ruleType:le.ArrowFunction,returnedTypes:[]};let d=0,v={lineNumber:0,column:0};const S=this._commentsParser(a.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=a.line;let C=null;for(;d<r.length;d++){const T=r[d],k=T.ruleIndex,B=T.symbol;switch(k){case F.RULE_identifier:v={lineNumber:T.start.line,column:T.start.column},h.name=this.visit(T);break;case F.RULE_arrowFunctionParameters:h.params=this.visit(T),h.isExport&&this._exportArgsTypeVerify(h.params),this._setFuncParams(h,{endColumn:c.column,endLineNumber:c.line-1,startColumn:a.column,startLineNumber:a.line}),C=T;break;case F.RULE_block:this._isInFunc=!0,h.isExport&&(this._currentExportFunc=h.name),this._hasMemberIndex=!1,this._hasRequest=!1,h.block=this.visit(T),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,c.line-1),this._hasRequest=!1,this._currentFuncParams.clear(),h});D(this,"visitArrowFunctionParameters",n=>{const{children:r}=n;let a=0,c=[];for(;a<r.length;a++){const h=r[a];h.ruleIndex===F.RULE_formalParameterList&&(c=this.visit(h))}return c});D(this,"visitFormalParameterList",n=>{const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const h=r[a];h.ruleIndex===F.RULE_formalParameterArg&&c.push(this.visit(h))}return c});D(this,"visitFormalParameterArg",n=>{const{children:r}=n;let a=0;const c={};for(;a<r.length;a++){const h=r[a];switch(h.ruleIndex){case F.RULE_typeGather:const d=this.visit(h);c.type=d&&this._typeAddSeries(d);break;case F.RULE_identifier:c.name=this.visit(h);break;case F.RULE_singleExpression:c.defaultValue=this.visit(h),delete c.defaultValue.ctx}}return c.ctx=n,this._verifyArgsDefaultValue(c,n),c.type=c.type||V.UNDETERMINED,c});D(this,"visitArrowMethod",n=>{const{children:r,start:a,stop:c}=n;let h=0;const d={ruleType:le.ArrowMethod,returnedTypes:[]};let v={lineNumber:0,column:0};const S=this._commentsParser(a.line,[Kt.function,Kt.param,Kt.returns],!0);Object.assign(d,{desc:S[Kt.function],paramsDesc:S[Kt.param],returnsDesc:S[Kt.returns]}),this._currentLine=a.line;let C=null;for(;h<r.length;h++){const T=r[h];switch(T.ruleIndex){case F.RULE_identifier:v={lineNumber:T.start.line,column:T.start.column},d.name=this.visit(T);break;case F.RULE_arrowMethodParameters:d.params=this.visit(T),d.isExport&&this._exportArgsTypeVerify(d.params),this._setFuncParams(d,{endColumn:c.column,endLineNumber:c.line-1,startColumn:a.column,startLineNumber:a.line}),C=T;break;case F.RULE_block:this._isInFunc=!0,d.isExport&&(this._currentExportFunc=d.name),this._hasMemberIndex=!1,this._hasRequest=!1,d.block=this.visit(T),d.hasMemberIndex=this._hasMemberIndex,d.returnedTypes=this._getBlockReturnTypes(d.block),this._isInFunc=!1,this._currentExportFunc="";break;default:T.symbol&&T.symbol.type===F.Export&&(d.isExport=!0,this._addExportPos(T.symbol,"methods"));break}}return d.hasRequest=this._hasRequest,this._setFunc(d,v,C,c.line-1),this._setMethod(d,v),this._hasRequest=!1,this._currentFuncParams.clear(),d});D(this,"visitArrowMethodParameters",n=>{const{children:r}=n;if(!r)return;let a=0;const c={};let h=[];for(;a<r.length;a++){const d=r[a];switch(d.ruleIndex){case F.RULE_typeGather:const v=this.visit(d);c.type=v&&this._typeAddSeries(v);break;case F.RULE_identifier:c.ctx=d,c.name=this.visit(d);break;case F.RULE_formalParameterList:h=this.visit(d);break}}return[c,...h]});D(this,"visitTypeStatement",n=>{const{children:r,start:a,stop:c}=n;let h=0;const d={ruleType:le.TypeStatement,fields:[]},v=this._commentsParser(a.line,[Kt.type,Kt.field]);Object.assign(d,{desc:v[Kt.type],fieldsDesc:v[Kt.field]}),this._currentLine=a.line;let S={lineNumber:0,column:0},C=null;for(;h<r.length;h++){const T=r[h];switch(T.ruleIndex){case F.RULE_identifier:S={lineNumber:T.start.line,column:T.start.column},C=T,d.name=this.visit(T),this._verifyTypeName(d.name,T);break;case F.RULE_typeElement:d.fields.push(this.visit(T));break;default:T.symbol&&T.symbol.type===F.Export&&(d.isExport=!0,this._addExportPos(T.symbol,"types"));break}}if(d.isExport){const T=c.line-1,{line:k=0}=this._endExport;T>k&&(this._endExport={line:T,name:d.name})}return this._setUserType(d,S,C),this._setNewFunc(d,S),this._setCopyFunc(d,S),this._setCopyMethod(d,S),d});D(this,"visitTypeElement",n=>{const{children:r,start:a}=n;let c=0;const h={};let d=null,v=null;for(this._currentLine=a.line;c<r.length;c++){const S=r[c];switch(S.ruleIndex){case F.RULE_typeGather:const C=this.visit(S);if(S.children[0].ruleIndex===F.RULE_typeSeries){const{column:T,line:k,text:B}=S.start,L=T+1;this._errors.push({startColumn:L,endColumn:parseInt(L+B.length),startLineNumber:k,endLineNumber:k,message:ye(this._buildinTypes.has(B)?pe.typeUseError:pe.notTypeKeyword,{text:B})}),h.type=V.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:d=S,h.value=this.visit(S);break;default:S.symbol&&S.symbol.type===F.Varip&&(h.isVarip=!0);break}}return this._typeElementVerify(h,d,v),h});D(this,"visitAssignmentOperator",n=>{const{children:r}=n;return r&&r[0].symbol.text});D(this,"visitTypeMap",n=>{const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const h=r[a];if(h.ruleIndex===F.RULE_typeName){const d=this.visit(h);c.push(d),this._typeCheck(d,F.RULE_typeName,h)}}return`map<${c[0]},${c[1]}>`});D(this,"visitTypeSeries",n=>{const{children:r}=n,[a,c]=r,h=this.visit(a),d=this.visit(c);return this._typeCheck(h,F.RULE_typeSeries,a),this._typeCheck(d,F.RULE_typeName,c),`${h} ${d}`});D(this,"visitTypeArray",n=>{const{children:r}=n,a=r[0];let c=this.visit(a),h=c;if(r.length===3)c=V.ARRAY;else{this._typeCheck(c,F.RULE_typeArray,a);let d=1;for(;d<r.length;d++){const v=r[d];v.ruleIndex===F.RULE_typeName&&(h=this.visit(v),this._typeCheck(h,F.RULE_typeName,v))}}return this._arrayTypeConvert(`${c}<${h}>`)});D(this,"visitTypeGather",n=>{const{children:r}=n;if(r&&r.length){const a=r[0],c=this.visit(a);return a.ruleIndex===F.RULE_typeName&&this._typeCheck(c,F.RULE_typeName,a),c}return null});D(this,"visitIdentifier",n=>n.children&&n.children[0].symbol.text);D(this,"visitTypeName",n=>{const{children:r}=n;let a=0,c="";for(;a<r.length;a++){const h=r[a];h.ruleIndex===F.RULE_identifier?c=`${c}${this.visit(h)}`:c=`${c}.`}return c});D(this,"visitEnumStatement",n=>{const{children:r,start:a,stop:c}=n;let h=0;const d={ruleType:le.EnumStatement,fields:[]},v=this._commentsParser(a.line,[Kt.enum,Kt.field]);Object.assign(d,{desc:v[Kt.enum],fieldsDesc:v[Kt.field]}),this._currentLine=a.line;let S={lineNumber:0,column:0},C=null;for(;h<r.length;h++){const T=r[h];switch(T.ruleIndex){case F.RULE_identifier:S={lineNumber:T.start.line,column:T.start.column},C=T,d.name=this.visit(T),this._verifyEnumName(d.name,T);break;case F.RULE_enumElement:d.fields.push(this.visit(T));break;default:T.symbol&&T.symbol.type===F.Export&&(d.isExport=!0,this._addExportPos(T.symbol,"enums"));break}}if(d.isExport){const T=c.line-1,{line:k=0}=this._endExport;T>k&&(this._endExport={line:T,name:d.name})}return this._setUserEnum(d,S,C),d});D(this,"visitEnumElement",n=>{const{children:r,start:a}=n;let c=0;const h={};for(this._currentLine=a.line;c<r.length;c++){const d=r[c];switch(d.ruleIndex){case F.RULE_identifier:h.name=this.visit(d);break;default:d.symbol&&d.symbol.type===F.StringLiteral&&(h.value=d.symbol.text);break}}return h});D(this,"visitName",n=>{const{children:r}=n;let a=0,c=!1;const h=[];let d=null;for(;a<r.length;a++){const v=r[a];switch(v.ruleIndex){case F.RULE_identifier:h.push(this.visit(v));break;case F.RULE_singleExpression:d=this.visit(v);break;case F.RULE_methodElement:c=!0;const S=this.visit(v);S.ctx=v,h.push(S);break}}return this._nameHandle(c,h,d,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=a}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:a,varPos:c,isBuiltIn:h}=n;if(h&&this._errorHandle(ye(pe.buidinAssignErr,{name:a}),r),!c)return;const d=this._currentBlockVars[0].get(a);if(!d)return;const{column:v,lineNumber:S}=d.pos||{};this._isInFunc&&v===c.column&&S===c.lineNumber?this._errorHandle(ye(pe.modifyGlobalVarErr,{name:a}),r):d.hasAssigned=!0}_inputFuncTitleVerify(n,r){if(!(n!=null&&n.length)||n.length>1)return;const{name:a,args:c,isBuiltIn:h}=n[0];if(h&&!this._strategyFuncName&&a.startsWith(Ii.strategy))this._strategyFuncName={ctx:r,name:a};else if(!a.startsWith(V.INPUT))return;this._inputVarName&&!(c.params.some(d=>d.originName==="title")||c.title)&&(c.title={value:`"${this._inputVarName}"`,ruleType:le.Literal,type:`${V.CONST} ${V.STRING}`})}_verifyIf(n){const{condition:r}=n;if(r!=null&&r.length)for(const a of r){const{type:c,ctx:h}=a;if(c===V.UNDETERMINED)continue;const d=this._removePrefix(c);[V.INT,V.FLOAT].includes(d)?this._errorHandle(ye(ar.conditionWarning,{name:"if"}),h,Sn.Warning):d!==V.BOOL&&this._errorHandle(ye(pe.conditionalErr,{name:"if"}),h)}}_forToNameHandle(n,r){if(n.name&&n.numerical.length===1){this._pushBlockRanges(r);const a=n.numerical[0].type;this._variablesHandle({nameList:{name:n.name,isForVar:!0,type:n.type},value:{type:a||`${V.SERIES} ${V.INT}`}},r),this._blockRanges.pop()}}_verifyForTo(n){const{numerical:r}=n;if(r!=null&&r.length)for(const a of r){const{type:c,ctx:h}=a;if(c===V.UNDETERMINED)continue;const d=this._removePrefix(c);[V.INT,V.FLOAT].includes(d)||this._errorHandle(pe.fortoErr,h)}}_forInNameHandle(n,r){if(this._pushBlockRanges(r),n.names.length){let[a,c]=n.names;const h=n.array.type;c?this._variablesHandle({nameList:{name:a,isForVar:!0,type:`${V.SERIES} ${V.INT}`},value:{type:`${V.SERIES} ${V.INT}`}},r):c=a;const d=h===V.UNDETERMINED?h:this._isMatrixType(h)?`${this._getArrayType(h)}[]`:this._typeAddSeries(this._getArrayType(h));this._variablesHandle({nameList:{name:c,isForVar:!0,type:d},value:{type:d}},r)}this._blockRanges.pop()}_verifySwitch(n){var r;if(n.cases){const a=(r=n.condition)==null?void 0:r.type;if(a===V.UNDETERMINED)return;if(a&&this._types.has(a)){this._errorHandle(ye(pe.typeMismatch,{operator:"switch",index:"expr0",typeE:a,typeR:`${V.SIMPLE} ${V.STRING}`}),n.condition.ctx);return}for(const c of n.cases){const{condition:{type:h,ctx:d}}=c;if(h!==V.UNDETERMINED)if(this._types.has(h))this._errorHandle(ye(pe.typeMismatch,{operator:"case",index:"expr1",typeE:h,typeR:`${V.SIMPLE} ${V.STRING}`}),d);else if(a){if(!this._compareType(a,h)){const v=this._removePrefix(a),S=this._removePrefix(h);v===V.BOOL&&[V.INT,V.FLOAT].includes(S)?this._errorHandle(ye(ar.conditionWarning,{name:"switch"}),d,Sn.Warning):[V.INT,V.FLOAT].includes(v)&&S===V.BOOL?this._errorHandle(ye(ar.conditionWarning,{name:"switch"}),n.condition.ctx,Sn.Warning):this._errorHandle(ye(pe.typeMismatch,{operator:"case",index:"expr1",typeE:h,typeR:`${a}`}),d)}}else{const v=this._removePrefix(h);[V.INT,V.FLOAT].includes(v)?this._errorHandle(ye(ar.conditionWarning,{name:"switch"}),d,Sn.Warning):v!==V.BOOL&&this._errorHandle(ye(pe.conditionalErr,{name:"switch"}),d)}}}}_verifyWhile(n){const{condition:r}=n;if(r){const{type:a,ctx:c}=r;if(a===V.UNDETERMINED)return;const h=this._removePrefix(a);[V.INT,V.FLOAT].includes(h)?this._errorHandle(ye(ar.conditionWarning,{name:"while"}),c,Sn.Warning):h!==V.BOOL&&this._errorHandle(ye(pe.conditionalErr,{name:"while"}),c)}}async _importHandle(n,r){const{stop:a,start:c}=r,{username:h,libraryName:d,libraryVersion:v,name:S}=n,C=`${h}/${d}/${v}`;if(this._importLibs.has(C))return this._errorHandle(pe.importMultipleErr,r),n;for(const[B,L]of this._importLibs)if(L.name&&L.name===S||!L.name&&!S&&L.libraryName===d)return this._errorHandle(ye(pe.importNameRepeatErr,{name:S,line:L.startLine}),r),n;let T=S||d;const k=await this._getImportLibraryFunc({...n,libraryId:C,ctx:void 0,startLine:c.line,endLine:a.line,startColumn:c.column,endColumn:a.column+a.text.length+1});if(k){const{codeStr:B,description:L}=k;this._importLibs.set(C,{...n,libraryId:C,startLine:c.line,endLine:a.line,ctx:void 0,desc:L}),this._importDataHandle(k,T),wn.includes(T)&&(T=`$${T}`),n.code=B.replace("$name",T)}else this._errorHandle(ye(pe.importNotExitErr,{username:h,libraryName:d}),r)}_importDataHandle(n,r){const{functions:a,methods:c,types:h}=n;for(const d of a){const{name:v}=d,S=`${r}.${v}`,C=this._functions.get(S)||[];C.push({...this._importTypeUpdate(d,h,r),name:S,isUser:void 0,isImport:!0}),this._functions.set(S,C)}for(const d of c){const v=this._importTypeUpdate(d,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 d of h){const v=`${r}.${d.name}`,S=this._types.get(v)||[];S.push({...this._importTypeUpdate(d,h,r),name:v,isImport:!0}),this._types.set(v,S)}}_importTypeUpdate(n,r,a){var B;let{args:c,returnedTypes:h,thisType:d,fields:v,name:S,originalName:C}=n,T="";if(c&&c.length&&(c=c.map(L=>{const{allowedTypeIDs:b,displayType:y,name:g}=L,O=y&&this._replaceTypeName(y,r,a);return T=T?`${T}, ${O} ${g}`:`${O} ${g}`,{...L,allowedTypeIDs:b==null?void 0:b.map(R=>this._replaceTypeName(R,r,a)),displayType:O}})),h!=null&&h.length&&(h=[this._replaceTypeName(h[0],r,a)]),d!=null&&d.length){const L=this._replaceTypeName(d[0],r,a);L!==d[0]&&(C=`${a}.${C||S}`),d=[L]}v!=null&&v.length&&(v=v.map(L=>{const{type:b}=L;return{...L,type:b&&this._replaceTypeName(b,r,a)}}));const k={...n,args:c,returnedTypes:h,thisType:d,fields:v,originalName:C};return(B=k.syntax)!=null&&B.length&&(k.syntax=[`${C||`${a}.${S}`}(${T}) → ${(h==null?void 0:h[0])||"void"}`]),k}_replaceTypeName(n,r,a){const c=r.find(h=>n.includes(h.name));return c?n.replace(c.name,`${a}.${c.name}`):n}_verifyArgsDefaultValue(n,r){const{defaultValue:a,type:c}=n;if(!a)return;const{ruleType:h,isBuiltIn:d,type:v}=a,S=this._removePrefix(v);if(h!==le.Literal&&!d)delete n.defaultValue,this._errorHandle(pe.argDefaultErr,r);else if(c&&c!==V.UNDETERMINED&&v!==V.UNDETERMINED){const C=this._removePrefix(c);if(C===V.FLOAT&&S===V.INT)return;S!==C&&this._errorHandle(ye(pe.defaultValueTypeErr,{typeE:v,typeR:c}),r)}else c||(n.type=this._typeAddSeries(S===V.INT?V.FLOAT:S))}_exportArgsTypeVerify(n){for(const r of n)(r.type===V.UNDETERMINED||!r.type)&&this._errorHandle(pe.exportFuncArgErr,r.ctx)}_verifyTypeName(n,r){lu.includes(n)?this._errorHandle(ye(pe.typeNameErr,{name:n}),r):Fp.includes(n)&&this._errorHandle(ye(pe.enumVarNameBuiltinErr,{name:n}),r)}_addExportPos(n,r){const{line:a,column:c,text:h}=n;this._exportPositions.push({startLineNumber:a,startColumn:c,endLineNumber:a,endColumn:c+h.length+1,type:r})}_verifyEnumName(n,r){lu.includes(n)?this._errorHandle(ye(pe.enumVarNameErr,{name:n}),r):Fp.includes(n)&&this._errorHandle(ye(pe.enumVarNameBuiltinErr,{name:n}),r)}_nameHandle(n,r,a,c){var d,v;const h={ruleType:le.Name,hasMethod:n,exprs:r,expr:a};if(n){let S="";const C=[];for(const k of r)typeof k=="string"?S=S?`${S}.${k}`:k:(S&&(k.name=`${S}.${k.name}`),C.push(k),S="");h.exprs=[...C,S];const T=this._getMethodTypes(C,Array.from(C,()=>c));if(T&&T.length){const k=ye(pe.noFiledErr,{name:S});T.length>1&&this._errorHandle(k,c),h.type=((v=this._nameCheck(this._getOriginMethodName(T[0],S),c,k))==null?void 0:v.type)||V.UNDETERMINED}}else{let S=r.join(".");if(a&&a.type&&a.type===V.UNDETERMINED)h.type=V.UNDETERMINED,S=`expr0.${S}`;else{a&&a.type&&(S=`${this._getMethodTypeName(a.type)}.${S}`);const C=this._nameCheck(S,c)||{};(d=C.title)!=null&&d.startsWith("built-in")&&(h.isBuiltIn=!0,h.isConst=C.isConst,!this._strategyVarName&&S.startsWith(Ii.strategy)&&(this._strategyVarName={ctx:c,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)||V.UNDETERMINED,C!=null&&C.isArg&&(h.arg=C),h.scope=this._blockCount,C.isEnum?this._errorHandle(ye(pe.enumUseErr,{name:S}),c):this._isInFunc&&this._currentExportFunc&&(h.type.startsWith(V.INPUT)?this._errorHandle(ye(pe.exportFuncHasInputErr,{name:S,func:this._currentExportFunc}),c):C.scope===0&&C.hasAssigned&&this._errorHandle(ye(pe.exportFuncUseGlobalVarErr,{func:this._currentExportFunc}),c))}h.name=S}return h}_typeElementVerify(n,r,a){var v,S;const{type:c,value:h}=n;if(!h){c||this._errorHandle(pe.typeFieldErr,a);return}if(![le.Literal,le.UnaryExpression].includes(h.ruleType)&&!h.isBuiltIn){this._errorHandle(pe.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(pe.defaultValueErr,r);return}}if(!c){const C=h.type,T=this._getPrefix(C);n.type=T?this._typeAddSeries(this._removePrefix(C)):C;return}(!this._compareType(c,h.type)||c.endsWith(V.INT)&&h.type.endsWith(V.FLOAT))&&this._errorHandle(ye(pe.defaultValueTypeErr,{typeE:h.type,typeR:c}),r)}_memberIndexVerify(n,r){if(n.ruleType===le.Name&&!n.hasMethod&&this._blockCount){const c=this._currentBlockVars[this._blockCount],h=c&&c.get(n.name);h&&(h.isForVar?this._errorHandle(ye(pe.notHistoryErr,{name:n.name}),r):!(this._blockCount===1&&this._isInFunc)&&this._errorHandle(ye(ar.localScopeGetHistory,{name:n.name}),r,Sn.Warning))}const a=n&&n.type;if(a){const c=this._removePrefix(a);!this._types.has(c)&&!this._buildinTypes.has(c)&&!this._isArrayType(c)&&!this._isMatrixType(c)&&!this._isMapType(c)&&c!==V.UNDETERMINED&&this._errorHandle(ye(pe.invalidType,{index:0}),r)}}_setFuncParams(n,r){var a;for(const c of n.params){const h=(a=this._types.get(c.type))==null?void 0:a[0];if(c.scope=this._blockCount+1,h&&h.fields)for(const d of h.fields){const v=`${c.name}.${d.name}`;this._currentFuncParams.set(v,{...d,originName:v,varScope:c.scope})}delete c.ctx,c.range=r,this._setVariablesMap(c,!0),this._currentFuncParams.set(c.name,c)}}_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,a){const{fields:c,name:h,desc:d,fieldsDesc:v}=n,S={members:c.map(C=>({name:C.name,value:C.value,enumName:h,isEnumMember:!0,desc:v==null?void 0:v[C.name],type:`${V.CONST} ${h}`})),name:h,desc:d,pos:r};if(this._enums.has(h)){this._errorHandle(ye(pe.typeRepeatErr,{name:h,keyword:Kt.enum}),a);return}else if(this._types.has(h)){this._errorHandle(ye(pe.typeRepeatErr,{name:h,keyword:Kt.type}),a);return}n.isExport&&this._exportEnums.push(S),this._enums.set(h,[{...S}]),this._addEnumToMap(h,h,r)}_setUserType(n,r,a){const{fields:c,name:h,desc:d,fieldsDesc:v}=n,S={fields:c.map(C=>({name:C.name,desc:v==null?void 0:v[C.name],type:C.type})),name:h,desc:d,pos:r};if(this._enums.has(h)){this._errorHandle(ye(pe.typeRepeatErr,{name:h,keyword:Kt.enum}),a);return}else if(this._types.has(h)){this._errorHandle(ye(pe.typeRepeatErr,{name:h,keyword:Kt.type}),a);return}n.isExport&&this._exportTypes.push(S),this._types.set(h,[{...S}]),this._addVarToMap(h,h,r,!1,!1)}_againAssignHandle(n,r,a){const c=a!==":="?a.replace("=",""):a,h=a!==":="?[V.UNDETERMINED,V.INT,V.FLOAT]:[];c==="+"&&h.push(V.STRING);const[d,v]=n;d.arg&&!d.name.includes(".")&&this._errorHandle(ye(pe.funcArgAssignErr,{name:d.name}),r[0]);const S=this._sameTypeJudge(n,r,c,h);let C=this._typeHandle(S);return this._updateUserVar(d.name,C,v.type),d.type=C,{ruleType:le.AgainAssign,name:d,operator:a,type:C,value:v}}_typeCheck(n,r,a){const c=[V.SERIES,V.SIMPLE,V.CONST];switch(r){case F.RULE_typeName:const h=this._buildinTypes.get(n);h&&![...c,V.ARRAY,V.MATRIX,V.MAP].includes(h[0].name)||this._types.get(n)||this._errorHandle(ye(pe.notTypeKeyword,{text:n}),a);break;case F.RULE_typeArray:[V.ARRAY,V.MATRIX].includes(n)||this._errorHandle(pe.tempateTypeErr,a);break;case F.RULE_typeSeries:c.includes(n)||this._errorHandle(ye(pe.qualifierErr,{name:n}),a);break}}_getBuildVar(n){const r=this._buildinVariables.get(n);if(r&&r[0])return r[0];const a=this._buildinConstants.get(n);return a&&a[0]?Object.assign(a[0],{isConst:!0}):this._specialTreatmentChartPoint(n)}_specialTreatmentChartPoint(n){var r,a;if(n.startsWith("chart.point")){const c=n.split("."),h=c.pop(),d=c.join(".");return(((a=(r=this._buildinTypes.get(d))==null?void 0:r[0])==null?void 0:a.fields)||[]).find(S=>S.name===h)}}_verifyName(n,r){var c,h;const a=this._getBuildVar(n);if(a)return a;if(n.includes(".")){const d=n.split("."),v=d.pop(),S=d.join(".");let C=this._blockCount;for(;C>=0;){if(!this._currentBlockVars[C]){C--;continue}const k=this._currentBlockVars[C].get(S);if(r&&this._judgeGatherValue(v||"",r,k==null?void 0:k.valueType,!0),(k==null?void 0:k.type)==="chart.point"){const L=(((h=(c=this._buildinTypes.get(k.type))==null?void 0:c[0])==null?void 0:h.fields)||[]).find(b=>b.name===v);if(L)return Object.assign(L,{pos:k.pos})}C--}const T=this._specialTreatmentChartPoint(n);if(T)return T}return this._getUserVar(n)}_judgeGatherValue(n,r,a,c){return a!==`${V.SIMPLE} ${V.NA}`?!0:(c&&this._errorHandle(ye(pe.objectIsNaErr,{name:n,type:"field"}),r),!1)}_nameCheck(n,r,a=ye(pe.undeclared,{name:n})){const c=this._verifyName(n,r);return c||this._errorHandle(a,r),c}_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,a=Sn.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:a})}_boolTypeJudge(n,r,a,c=0){return this._typeJudge(n,r,a,V.BOOL,[V.UNDETERMINED,V.INT,V.FLOAT,V.BOOL],c)}_calcTypeJudge(n,r,a,c=0){return this._typeJudge(n,r,a,"int/float",[V.UNDETERMINED,V.INT,V.FLOAT],c)}_typeJudge(n,r,a,c,h,d=0){const v=n&&n.type;if(v){const S=this._removePrefix(v);if(!h.includes(S)&&S!==V.NA)return this._errorHandle(ye(pe.typeMismatch,{operator:`operator ${a}`,index:`expr${d}`,typeE:S,typeR:c}),r),V.UNDETERMINED;c===V.BOOL&&[V.INT,V.FLOAT].includes(S)&&this._errorHandle(ye(ar.typeMismatch,{operator:`operator ${a}`,index:`expr${d}`,type:V.BOOL}),r,Sn.Warning)}return v||V.UNDETERMINED}_sameTypeJudge(n,r,a,c){let h="";const d=[],v=["plot_display","plot_simple_display"];["+","-","+=","-="].includes(a)&&(c=c.concat(v));for(const[S,C]of n.entries()){let T=C&&C.type||V.UNDETERMINED;const k=this._removePrefix(T);if(!c.includes(k)&&c.length&&k!==V.NA){this._errorHandle(ye(pe.typeMismatch,{operator:`operator ${a}`,index:`expr${S}`,typeE:T,typeR:c.slice(1).join("/")}),r[S]),h=V.UNDETERMINED,d.push(h);continue}if(!h){h=k,d.push(T);continue}if(h===V.UNDETERMINED||k===V.UNDETERMINED)T=h=V.UNDETERMINED;else if(h!==k&&h!==V.NA&&k!==V.NA&&(![V.INT,V.FLOAT].includes(h)||![V.INT,V.FLOAT].includes(k)))if(a===":="){if(h===V.BOOL&&[V.INT,V.FLOAT].includes(k)){this._errorHandle(ye(ar.boolVarNumWarning,{name:n[0].name}),r[0],Sn.Warning),d.push(T);continue}this._errorHandle(ye(pe.assignTypeMismatch,{typeE:k,name:n[0].name,typeR:h}),r[0]),T=h=V.UNDETERMINED}else if(["==","!=","?:"].includes(a)&&[V.INT,V.FLOAT,V.BOOL].includes(h)&&[V.INT,V.FLOAT,V.BOOL].includes(k))this._errorHandle(ye(ar.typeMismatch,{operator:`operator ${a}`,index:`expr${S}`,type:h}),r[S],Sn.Warning),T=h=V.UNDETERMINED;else if(v.includes(h)&&v.includes(k)){if(h!==k){const B=this._getPrefix(T);d[S-1]=`${this._getPrefix(d[S-1])} ${v[0]}`,T=h=`${B} ${v[0]}`}}else this._errorHandle(ye(pe.typeMismatch,{operator:`operator ${a}`,index:`expr${S}`,typeE:k,typeR:h}),r[S]),T=h=V.UNDETERMINED;d.push(T)}return d}_getUserVar(n,r=!1){for(let a=this._blockCount;a>=0;a--){const c=this._currentBlockVars[a];if(a<=0){const h=this._currentFuncParams.get(n);if(h)return h.isArg=!0,h}if(c){const h=c.get(n);if(h)return h}}if(n.includes(".")&&!r){let a=!1,c=null;if(n.split(".").reduce((h,d)=>{let v=h?`${h}.${d}`:d;const S=this._getUserVar(v,!0);return S!=null&&S.type?S.type===V.UNDETERMINED?a=!0:(v=S.type,c=S):c=null,v},""),a)return{name:n,type:V.UNDETERMINED};if(c)return c}return null}_repeatVarJudge(n,r,a,c){this._getBuildVar(n)&&this._errorHandle(ye(pe.buidinVarErr,{name:n}),r);for(let d=0;d<=this._blockCount;d++){const v=this._currentBlockVars[d];if(v&&v.get(n)){if(this._blockCount===d)return this._errorHandle(ye(pe.repeatVar,{name:n}),r),!0;a.reName=`$_${n}__${this._blockCount}`,this._errorHandle(ye(ar.repeatVar,{name:n}),r,Sn.Warning)}}c!=null&&c.some(d=>d===n&&n!=="_")&&this._errorHandle(ye(pe.repeatVar,{name:n}),r)}_judgeVarBuildIn(n){for(let r=0;r<=this._blockCount;r++){const a=this._currentBlockVars[r];if(a&&a.get(n))return!0}return!1}_updateUserVar(n,r,a){for(let c=0;c<=this._blockCount;c++){const h=this._currentBlockVars[c];if(h){const d=h.get(n);if(d){d.type=r,d.valueType=a;return}}}}_variablesHandle(n,r){var h,d,v,S;if(!(n&&n.nameList))return;const a=n.nameList;if(a.name==="_")return;const c=n.value;if(a.ruleType===le.VarMultiple){a.types=[],this._checkVarMultiple(a.names,c,r);for(const[C,T]of a.names.entries()){if(T==="_")continue;const k=this._varTypeJudge("",((h=c==null?void 0:c.types)==null?void 0:h[C])||V.UNDETERMINED,T,r);a.types.push(k),this._addVarToMap(T,k,a.posList[C],!0)}}else{const C=(c==null?void 0:c.type)||((d=c==null?void 0:c.returnedTypes)==null?void 0:d[0]);((v=c==null?void 0:c.types)!=null&&v.isBrackethesized||(S=c==null?void 0:c.returnedTypes)!=null&&S.isBrackethesized)&&this._errorHandle(ye(pe.tupleLeftVarErr,{name:a.name}),r),!a.type&&C===`${V.SIMPLE} ${V.NA}`&&this._errorHandle(pe.naVarErr,r),a.prefix&&Pi.indexOf(a.prefix)>Pi.indexOf(this._getPrefix(C))&&this._errorHandle(ye(pe.declaredErr,{prefix:a.prefix,type:C}),r);const T=this._varTypeJudge(a.type,C||V.UNDETERMINED,a.name,r);a.type=T,this._addVarToMap(a.name,T,a.pos,!0,a.isForVar,a.declare,c==null?void 0:c.type,a.desc)}}_checkVarMultiple(n,r,a){var S,C,T,k;const c=n.length,h=((r==null?void 0:r.types)||(r==null?void 0:r.returnedTypes)||[]).length,d=((S=r==null?void 0:r.types)==null?void 0:S.isBrackethesized)||((C=r==null?void 0:r.returnedTypes)==null?void 0:C.isBrackethesized);(T=r==null?void 0:r.types)!=null&&T.isUnknown||(k=r==null?void 0:r.returnedTypes)!=null&&k.isUnknown||(h===1&&!d||!h?this._errorHandle(pe.tupleRightVarErr,a):c!==h&&this._errorHandle(ye(pe.tupleVarErr,{indexA:h,indexB:c}),a))}_addEnumToMap(n,r,a){var v;const c=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)c.set(`${n}.${S.name}`,S);const d={name:n,isEnum:!0,type:`${V.CONST} ${r}`,pos:a};c.set(n,d),this._currentBlockVars[this._blockCount]=c}_addVarToMap(n,r,a,c=!0,h=!1,d,v,S){var B;const C=this._currentBlockVars[this._blockCount]||new Map,T=(B=this._types.get(r))==null?void 0:B[0];if(T&&T.fields)for(const L of T.fields)C.set(`${n}.${L.name}`,L);const k={name:n,type:r,pos:a,valueType:v,desc:S};c&&this._setVariablesMap(k),C.set(n,Object.assign(k,{isForVar:h,declare:d})),this._currentBlockVars[this._blockCount]=C}_setVariablesMap(n,r=!1){const a=this._blockRanges[this._blockCount];r||(n.range=a,n.scope=this._blockCount);const c=this._variables.get(n.name)||[];c.push(n),this._variables.set(n.name,c)}_varTypeJudge(n,r,a,c){if(r===V.VOID)return this._errorHandle(pe.voidNotVar,c),V.UNDETERMINED;if(n&&r!==V.UNDETERMINED){const h=this._removePrefix(n),d=this._removePrefix(r);return d!==h&&d!==V.NA&&!(h===V.FLOAT&&d===V.INT)?h===V.BOOL&&[V.FLOAT,V.INT].includes(d)?(this._errorHandle(ye(ar.boolVarNumWarning,{name:a}),c,Sn.Warning),n):(this._errorHandle(ye(pe.declareTypeErr,{type:n,valueType:r}),c),V.UNDETERMINED):this._typeHandle([n,r])}else if(r===V.UNDETERMINED)return V.UNDETERMINED;return n||r||V.UNDETERMINED}_getAllowTypes(n){const r=[];if(n===V.UNDETERMINED)return r;const a=this._getPrefix(n);if(a){const c=this._removePrefix(n);let h=-1;for(const[d,v]of Pi.entries())v===a&&(h=d),h>=0&&h<=d&&(c===V.FLOAT&&r.push(`${v} ${V.INT}`),r.push(`${v} ${c}`))}else n=this._arrayTypeConvert(n)||"",r.push(n),n.includes(V.FLOAT)&&r.push(n.replace(/float/,V.INT));return r}_setNewFunc(n,r){const a=`${n.name}.new`,c=[],h=[];for(const v of n.fields)c.push({name:v.name,required:!1,allowedTypeIDs:this._getAllowTypes(v.type),displayType:v.type}),h.push(`${v.type} ${v.name}`);const d={name:a,args:c,returnedTypes:[n.name],pos:r,syntax:[`${a}(${h.join(", ")}) → ${n.name}`]};n.isExport&&this._exportFunctions.push(d),this._functions.set(a,[{...d,isUser:!0}])}_setCopyFunc(n,r){const a=n.name,c=`${a}.copy`,h={name:c,args:[{name:"object",required:!0,allowedTypeIDs:[a],displayType:a}],returnedTypes:[a],pos:r,info:"The identifier of the object to be copied.",syntax:[`${c}(${a} object) → ${a}`]};n.isExport&&this._exportFunctions.push(h),this._functions.set(c,[{...h,isUser:!0}])}_setCopyMethod(n,r){const a=n.name,c=`${a}.copy`,h={name:c,originalName:c,args:[],returnedTypes:[a],thisType:[a],pos:r,syntax:[`${c}() → ${a}`]};n.isExport&&this._exportMethods.push(h),this._methods.set(c,[{...h,isUser:!0}])}_setFunc(n,r,a,c){const h=[],d=[],{desc:v,paramsDesc:S,returnsDesc:C,params:T,hasMemberIndex:k}=n;for(const O of T){const{type:R,name:w,defaultValue:U}=O;h.push({name:w,desc:S==null?void 0:S[w],required:!U,allowedTypeIDs:this._getAllowTypes(R),displayType:R}),d.push(`${R===V.UNDETERMINED?"":`${R} `}${w}`)}const{returnedTypes:B=[]}=n,L=n.name,b=B.length>1?`[${B.join(", ")}]`:B.toString(),y={name:L,desc:v,args:h,syntax:[`${L}(${d.join(", ")}) → ${b||"void"}`],hasMemberIndex:k,pos:r,isUser:!0,returnedTypes:B,returns:C,hasRequest:this._hasRequest};let g=this._functions.get(L);if(g){const O=g.length;y.index=O,n.index=O,this._verifyFuncRepeat(g,y,a),g.push(y),this._overloadsFuncs.push({name:L,index:O,line:r.lineNumber,startColumn:r.column+1,endColumn:r.column+L.length})}else g=[y];if(n.isExport){const{line:O=0}=this._endExport;c>O&&(this._endExport={line:c,name:L,index:y.index}),this._exportFunctions.push(y)}this._functions.set(L,g)}_setMethod(n,r){var R;const{name:a,returnedTypes:c,params:h,desc:d,paramsDesc:v,returnsDesc:S}=n,C=h[0].type,T=[],k=[];for(const w of h.slice(1)){const{type:U,name:X,defaultValue:ee}=w;T.push({name:X,desc:v==null?void 0:v[X],required:!ee,allowedTypeIDs:this._getAllowTypes(U),displayType:U}),k.push(`${U} ${X}`)}const B=c.length>1?`[${c.join(", ")}]`:c.toString(),L=this._getMethodTypeName(C),b=`${L}.${a}`;n.typeName=L;const y={name:a,args:T,desc:d,originalName:b,syntax:[`${a}(${k.join(", ")}) → ${B||"void"}`],returnedTypes:c,hasMemberIndex:n.hasMemberIndex,pos:r,thisType:[C],returns:S,hasRequest:this._hasRequest};let g=this._methods.get(b),O=this._functions.get(a);if(O){const w=O.filter(ee=>!ee.isImport).length,U=((R=g==null?void 0:g.filter(ee=>!ee.isImport))==null?void 0:R.length)||0;let X=w;w>U&&(X=w-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,a){const{args:c}=r;n.some(d=>{const{args:v}=d;return(v==null?void 0:v.length)!=(c==null?void 0:c.length)?!1:!(v!=null&&v.length)&&!(c!=null&&c.length)?!0:v==null?void 0:v.every((S,C)=>{var T;return S.displayType===((T=c==null?void 0:c[C])==null?void 0:T.displayType)})})&&this._errorHandle(ye(pe.funcRepeatErr,{name:r.name}),a)}_getMethodTypes(n,r){let a;for(const[c,h]of n.entries()){const{type:d,expr:v,args:S}=h;let{name:C}=h;const T=r[c];if(v){if(v.type===V.UNDETERMINED)return[V.UNDETERMINED];C=`${this._getMethodTypeName(v.type)}${C}`,S.params.unshift(v)}if(a&&a.length>=1)if(a.length===1){const k=a[0];if(k===V.UNDETERMINED)return[V.UNDETERMINED];const B=this._getOriginMethodName(k,C);C.includes(".")?a=this._getOtherNamesMethodType(B,a,T,S,h):a=this._expandMethodHandle(B,T,S,{type:k},k,h)}else this._errorHandle(ye(pe.noFiledErr,{name:C}),T);else{const[k,B]=this._tempFuncNameHandle(C,T,d);C=B;const L=this._buildinFunctions.get(k);if(L)this._globalFuncVerify(L[0],T),this._hasMemberIndexVerify(L[0],T,h),h.isBuiltIn=!0,a=this._getBuildInReturnTypes(L,S,C,T,void 0,d);else{const b=this._functions.get(C);if(b)if(b.length<=1){this._hasMemberIndexVerify(b[0],T,h),a=b[0].returnedTypes;const{hasErr:y}=this._checkArgs(S,b[0].args||[],C,T,a[0]);if(y)return[V.UNDETERMINED]}else{const y=this._overloadsFuncGetTypes(b,S,T,void 0,h);a=this._returnedTypesParse([y])}else a=this._getOtherNamesMethodType(C,a,T,S,h)}}h.returnTypes=a}return a===void 0&&this._errorHandle(ye(pe.notFindFuncErr,{name:n[0].name}),r[0]),a}_globalFuncVerify(n,r){this._blockCount!==0&&F_.includes(n.name)&&this._errorHandle(ye(pe.globalFuncErr,{name:n.name}),r)}_hasMemberIndexVerify(n,r,a){n.hasRequest&&(a.hasRequest=!0,this._hasRequest=!0),n.hasMemberIndex||n.name.startsWith("ta.")||n.name==="math.sum"?(this._hasMemberIndex=this._isInFunc,a.hasMemberIndex=!0,a.position=r.start.tokenIndex):n.name.startsWith("request.")&&this._isInLocalScop&&this._errorHandle(pe.requestUserInLoopErr,r)}_tempFuncNameHandle(n,r,a){let c=n;if(a&&a.length>=1){const h=["array.new","matrix.new"].includes(n),d=n==="map.new";if(a.length===1)if(h)c=`${n}<type>`,n=`${n}<${a[0]}>`;else return d?this._errorHandle(ye(pe.templateErr,{countA:2,countB:1}),r):this._errorHandle(ye(pe.templateNoSupportErr,{name:n}),r),[V.UNDETERMINED];else{if(!d)return h?this._errorHandle(ye(pe.templateErr,{countA:1,countB:2}),r):this._errorHandle(ye(pe.templateNoSupportErr,{name:n}),r),[V.UNDETERMINED];if(!lu.includes(a[0]))return this._errorHandle(ye(pe.mapKeyErr,{type:this._typeAddSeries(a[0])}),r),[V.UNDETERMINED];c=`${n}<type,type>`,n=`${n}<${a[0]},${a[1]}>`}}return[c,n]}_getOtherNamesMethodType(n,r,a,c,h){const d=n.split("."),v=d.length-1,S=d.slice(0,v).join("."),C=this._getUserVar(S);this._judgeGatherValue(d[v],a,C==null?void 0:C.valueType)||(h.name=`${S}?.${d[v]}`);const k=C==null?void 0:C.type;if(k){if(k===V.UNDETERMINED)return r=[V.UNDETERMINED],r.isUnknown=!0,r;const B=this._getOriginMethodName(k,d[v]);h.varScope=C.scope,r=this._expandMethodHandle(B,a,c,C,S,h)}else{let B="",L="",b="";for(const y of d.slice(0,v)){B?L=this._getOriginMethodName(B,y):L=L?`${L}.${y}`:y;const g=this._verifyName(L);if(g!=null&&g.type){if(B=g.type,b="",g.title.startsWith("built-in variable")){const O=this._getOriginMethodName(B,d[v]);r=this._expandMethodHandle(O,a,c,C,S,h),h.hasVarPrefix=!0}}else this._buildinTypes.get(L)?b=ye(pe.methodNotExistErr,{name:L,methodName:d[v]}):b=ye(pe.noFiledErr,{name:y})}b&&this._errorHandle(b,a)}return r}_expandMethodHandle(n,r,a,c,h,d){var C,T;let v;const S=this._buildinMethods.get(n);if(S)d.name=d.name.split(".").join("?.").replace("??","?"),v=this._getBuildInReturnTypes(S,a,n,r,c);else{const k=this._methods.get(n);if(k&&k.length)if(k.length<=1){const B=k[0],L=this._getMethodTypeName(((C=B.thisType)==null?void 0:C[0])||"");if(this._types.get(L))d.name=d.name.split(".").join("?.").replace("??","?");else{const g=this._functions.get(B.name);g&&(d.selfArg=(T=g[B.index||0].args)==null?void 0:T[0])}d.funcName=B.name,d.index=B.index,this._hasMemberIndexVerify(B,r,d),v=B.returnedTypes;const{hasErr:y}=this._checkArgs(a,B.args||[],n,r,(v==null?void 0:v[0])||"");if(y)return[V.UNDETERMINED]}else{const B=this._overloadsFuncGetTypes(k,a,r,c,d);v=this._returnedTypesParse([B])}else this._errorHandle(ye(pe.methodNotExistErr,{methodName:n.split(".").slice(-1)[0],name:h}),r)}return v}_getBuildInReturnTypes(n,r,a,c,h,d){var S;let v;if(n.length===1){const{returnedTypes:C,syntax:T,args:k=[],thisType:B}=n[0],L=T[0].split("→")[1].trim(),b=h||r.params[0]||((S=k[0])==null?void 0:S.name)&&r[k[0].name];b&&!this._checkMethodThisType(B,b.type)&&this._errorHandle(ye(pe.typeMismatch,{operator:a,index:b.name||"id",typeE:b.type,typeR:B[0]}),c);const{hasErr:y,types:g}=this._checkArgs(r,k,a,c,L,b);if(y)return[V.UNDETERMINED];if(v=g.length&&g||this._returnedTypesParse(C),v.length>1)return v;(d==null?void 0:d.length)===1?v=[this._typeReplace(L,d[0])]:(d==null?void 0:d.length)===2&&(v=[`${V.MAP}<${d[0]},${d[1]}>`]),v=this._returnTypesOtherHandle(b,L,v,a)}else{const C=this._overloadsFuncGetTypes(n,r,c,h);v=this._returnedTypesParse([C])}return v}_overloadsFuncGetTypes(n,r,a,c,h){var L,b,y;let d="",v=[],S=[],C=0,T=0;for(const[g,O]of n.entries()){const{args:R,returnedTypes:w,name:U,thisType:X}=O,ee=c||r.params[0]||r[R[0].name],{errMsg:z,warnMsg:Y,matchCount:$}=this._overloadsCheckArgs(r,R,U,a,ee);$>T&&(C=g,T=$),ee&&!this._checkMethodThisType(X,ee.type)&&z.unshift({msg:ye(pe.typeMismatch,{operator:U,index:ee.name||"id",typeE:ee.type,typeR:X[0]}),ctx:a}),g===0?(v=z,S=Y,!z.length&&(d=w[0])):z.length?((L=v[0])!=null&&L.isLenErr&&!((b=z[0])!=null&&b.isLenErr)||v.length>z.length)&&(v=z,S=Y,C=g):this._priorityComparison(d,w[0])||(w[0]===`${V.ARRAY}<>`?d=`${ee.type}[]`:d=w[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,Sn.Warning);const k=a.children[0],B=n[0].name;if(k&&this._overloadsFuncs.push({name:B,index:C,line:k.start.line,startColumn:k.start.column+1,endColumn:k.start.column+B.length}),h){const g=n[C],{thisType:O,name:R,index:w}=g;if(this._hasMemberIndexVerify(g,a,h),h.index=w||C,O){const U=this._getMethodTypeName((O==null?void 0:O[0])||"");if(this._types.get(U))h.name=h.name.split(".").join("?.").replace("??","?");else{const ee=this._functions.get(R);ee&&(h.selfArg=(y=ee[0].args)==null?void 0:y[0])}}}return this._funcArgsAddOriginName(r,n[C].args,B),d||V.UNDETERMINED}_funcArgsAddOriginName(n,r,a){const c=n.params||[];for(const[h,d]of r.entries())h<c.length&&(c[h].originName=d.name);if(a==="input"){const h=c[0]||n.defval;Object.assign(n,{inputType:{name:`'${h!=null&&h.isSourceType?"source":this._removePrefix(h==null?void 0:h.type)}'`}})}}_overloadsCheckArgs(n,r,a,c,h){const d={...n},v=d.params;delete d.params;const S=Object.keys(d).length+v.length,C=r.length,T=[],k=[];let B=0;S>C&&(r.some(b=>["arg0, arg1, ...","number0, number1, ..."].includes(b.name))||T.push({msg:ye(pe.argsLenErr,{name:a,lenA:S,lenB:C}),isLenErr:!0,ctx:c}));for(const[L,b]of r.entries()){let y=d[b.name];if(L<v.length&&(y&&T.push({msg:ye(ar.moreSameArg,{arg:b.name}),ctx:c}),y=v[L]),!y)b.required&&T.push({msg:ye(pe.requiredParamErr,{name:a,argName:b.name}),ctx:c});else{const g=y.type!==`${V.SIMPLE} na`?this._checkArg(y,b,a,h,y.ctx,!0,k):"";g?T.push({msg:g,ctx:y.ctx}):B++,delete d[b.name]}if(["arg0, arg1, ...","number0, number1, ..."].includes(b.name)&&v.length>L+1){const g=v.slice(L+1);let O=v[L];for(const R of g){O.type===`${V.SIMPLE} ${V.NA}`&&(O=R);const w=R.type!==`${V.SIMPLE} ${V.NA}`?this._checkArg(R,b,a,O,R.ctx,!0,k):"";w&&T.push({msg:w,ctx:R.ctx})}}}if(Object.keys(d).length)for(const L of Object.keys(d))T.push({msg:ye(pe.argsNameErr,{name:a,argName:L}),ctx:d[L].ctx});return{errMsg:T,warnMsg:k,matchCount:B}}_checkArgs(n,r,a,c,h,d){var L;const v={...n},S=v.params;delete v.params;const C=Object.keys(v).length+S.length,T=r.length;let k=!1,B=[];if(C>T&&!r.some(y=>["arg0, arg1, ...","number0, number1, ..."].includes(y.name)))return this._errorHandle(ye(pe.argsLenErr,{name:a,lenA:C,lenB:T}),c),k=!0,{hasErr:k,types:B};for(const[b,y]of r.entries()){let g=v[y.name];if(b<S.length&&(g&&this._errorHandle(ye(ar.moreSameArg,{arg:y.name}),c,Sn.Warning),g=S[b],g.originName=y.name),!g)y.required&&(this._errorHandle(ye(pe.requiredParamErr,{name:a,argName:y.name}),c),k=!0);else{const O=g.type!==`${V.SIMPLE} ${V.NA}`?this._checkArg(g,y,a,d,g.ctx):"";if(O)this._errorHandle(O,g.ctx),k=!0;else if(a.startsWith("request.")&&y.name==="expression")if(g.ruleType===le.Brackethesized)B=g.exprs.map(R=>this._typeReplace(h,R.type));else if((L=g.types||g.returnedTypes)!=null&&L.isBrackethesized)B=(g.types||g.returnedTypes).map(R=>this._typeReplace(h,R));else{const R=this._typeReplace(h,g.type);B.push(R)}else if(a==="input.enum"&&y.name==="defval"){const R=this._removePrefix(g.type);B.push(`${V.INPUT} ${R}`)}delete v[y.name]}}if(Object.keys(v).length)for(const b of Object.keys(v))this._errorHandle(ye(pe.argsNameErr,{name:a,argName:b}),v[b].ctx),k=!0;return{hasErr:k,types:B}}_checkArg(n,r,a,c,h,d,v){var y,g;const{ruleType:S,exprs:C,name:T}=n;let k=n.type;S===le.Brackethesized&&(k=`[${C.map(O=>O.type).join(", ")}]`);const{allowedTypeIDs:B=[],displayType:L,name:b}=r;if(!(!k||k===V.UNDETERMINED||L===V.UNDETERMINED)){if(a==="input"&&b==="defval"&&!k.startsWith(V.CONST))if(xl.includes(T))n.isSourceType=!0;else return pe.inputDefvalErr;if(!(this._checkMethodThisType(B,this._arrayTypeConvert(k))&&!(["input.source","input.enum"].includes(a)&&b==="defval"))){if(b==="condition"&&(L!=null&&L.endsWith(V.BOOL))){if(k.endsWith(V.INT)||k.endsWith(V.FLOAT)){const O=ye(ar.typeMismatch,{index:b,operator:a,type:V.BOOL});h&&(v?v.push({ctx:h,msg:O}):this._errorHandle(O,h,Sn.Warning));return}}else if(a==="str.tostring"&&b==="value"){const O=this._removePrefix(k);if(this._enums.get(O))return}switch(L){case"tuple of const string values: [val1, val2, ...]":return this._tupleToCheck(n,r,[`${V.CONST} ${V.STRING}`],a,k);case"tuple of const int/float values: [val1, val2, ...]":return this._tupleToCheck(n,r,[`${V.CONST} ${V.FLOAT}`,`${V.CONST} ${V.INT}`],a,k);case"tuple of const int values: [val1, val2, ...]":return this._tupleToCheck(n,r,[`${V.CONST} ${V.INT}`],a,k);case"open/high/low/close/hl2/hlc3/ohlc4/hlcc4":if(!T||!xl.includes(T))return ye(pe.inputSourceErr,{name:b,funcName:a});if(this._judgeVarBuildIn(T))return ye(pe.buildInUseErr,{name:T});n.isSourceType=!0;break;case"<matrix_type>":case"<array_type>":const O=this._getArrayType(a)||"";if(!k.endsWith(O)&&!(k.endsWith(V.INT)&&O===V.FLOAT))return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:this._typeAddSeries(O)});break;case"any matrix type":if(this._isMatrixType(k)){if(b==="id2"){const $=this._getArrayType(c==null?void 0:c.type);if(!$)return;const ne=this._getArrayType(k)||"";if($!==ne)return ye(pe.typeMismatch,{operator:a,index:b,typeE:ne,typeR:$})}}else return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:"matrix<fun_arg>"});break;case"any array type":if(this._isArrayType(k)){if(b==="id2"){const $=this._getArrayType(c==null?void 0:c.type);if(!$)return;const ne=this._getArrayType(k)||"";if($!==ne)return ye(pe.typeMismatch,{operator:a,index:b,typeE:ne,typeR:$})}}else return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:"array<fun_arg>"});break;case"series <type of the matrix's elements>":case"series <type of the array's elements>":const R=this._getArrayType(c==null?void 0:c.type)||"";if(!k.endsWith(R)&&!(k.endsWith(V.INT)&&R===V.FLOAT))return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:this._typeAddSeries(R)});break;case"any map type":if(this._isMapType(k)){if(b==="id2"){const $=this._getMapType(c==null?void 0:c.type);if(!$)return;const ne=this._getMapType(k)||[];if($[0]!==ne[0]||$[1]!==ne[1])return ye(pe.mapKeyValErr,{typeA:this._typeAddSeries(ne[0]),typeB:this._typeAddSeries(ne[1]),typeC:this._typeAddSeries($[0]),typeD:this._typeAddSeries($[1]),name:a})}}else return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:"map<type, type>"});break;case"series <type of the map's elements>":const w=this._getMapType(c==null?void 0:c.type);if(!w)return;const U=b==="key"?0:1;if(!k.endsWith(w[U])&&!(k.endsWith(V.INT)&&w[U]===V.FLOAT))return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:this._typeAddSeries(w[U])});break;case"<arg_expr_type>":if(S===le.Brackethesized)return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:L||""});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(k);if([V.BOX,V.LABEL,V.LINE,V.LINEFILL,V.POLYLINE,V.TABLE].includes(X))return ye(pe.requestExprErr,{type:X,name:a});break;case"variable, object or function of series int/float/bool/string/color, or a tuple of these":if(S===le.Brackethesized){for(const $ of C)if(!B.includes($.type))return ye(pe.requestArgsErr,{name:a,argName:b,type:$.type})}break;case"const int/float/bool/string/color or source-type built-ins":if(xl.includes(n.name)&&B[0].endsWith(this._removePrefix(k)))n.isSourceType=!0;else return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:"const int/float/bool/string/color"});break;case"<arg..._type>":if(S===le.Brackethesized||this._isArrayType(k)||this._isMapType(k)||this._isMatrixType(k))return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:`${V.SERIES} ${V.INT}`});if(k!==(c==null?void 0:c.type))return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:c==null?void 0:c.type});break;case"simple enum":const ee=this._removePrefix(k);if(!this._enums.has(ee))return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:"const enum"});break;case"tuple of enum fields: [enumName.field1, enumName.field2, ...]":const z=c==null?void 0:c.enumName;if(z&&!((y=n.exprs)==null?void 0:y.every(ne=>ne.enumName===z)))return ye(pe.typeMismatch,{operator:a,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&&!d){const $=B.find(ne=>ne.endsWith(Y));if($){n.type=$,n.arg.type=$;return}}if(B.length===1&&this._removePrefix(B[0])===Y){const $=this._getPrefix(n.type),ne=this._getPrefix(B[0]);if(Pi.indexOf($)>=Pi.indexOf(ne))return}if(L)return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:L})}}}}_tupleToCheck(n,r,a,c,h){var d,v;if(a.push(`${V.SIMPLE} ${V.NA}`),n.ruleType===le.Brackethesized){const S=[];let C=!1;for(const T of n.exprs)S.push(T.type),a.includes(T.type)||(C=!0);if(C)return ye(pe.typeMismatch,{operator:c,index:r.name,typeE:`[${S.join(", ")}]`,typeR:((d=r.allowedTypeIDs)==null?void 0:d[0])||""})}else return ye(pe.typeMismatch,{operator:c,index:r.name,typeE:h,typeR:((v=r.allowedTypeIDs)==null?void 0:v[0])||""})}_getBlockReturnTypes(n){var k,B;let r=n;if(Array.isArray(n)&&(r=n.slice(-1)[0],Array.isArray(r)&&(r=r.slice(-1)[0])),!r)return[V.UNDETERMINED];const{ruleType:a,type:c,types:h,returnedTypes:d,exprs:v,nameList:S,typeList:C,block:T}=r;if(h&&h.length)return h;if(d&&d.length)return d;if(c)return[c];switch(a){case le.Brackethesized:const L=v.map(ee=>ee.type);return L.isBrackethesized=!0,L;case le.VarBlockStmt:case le.DeclareAssign:return S?S.ruleType===le.VarMultiple?S.types:[S.type]:[((k=r.name)==null?void 0:k.type)||V.UNDETERMINED];case le.SwitchStatement:if(!this._isNeedCalc&&this._isInFunc&&this._isEndExpr===!1)return[V.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||[V.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[$,ne]of y.entries())if(this._compareType(z[$],ne))(z[$].includes(V.FLOAT)&&!ne.includes(V.FLOAT)||y[$]===`${V.SIMPLE} ${V.NA}`||y[$]===V.UNDETERMINED)&&(y[$]=z[$]);else{O=Y.ctx;break}}return O&&(this._errorHandle(ye(pe.ifOrSwitchTypeErr,{keyword:"switch",types:g}),O),y=y.map(()=>V.UNDETERMINED)),r.returnedTypes=y,y;case le.IfStatement:if(!this._isNeedCalc&&!this._isInFunc)return[V.UNDETERMINED];if(!C.filter(ee=>ee&&ee.length).length)return[V.UNDETERMINED];let R=C[0]||[],w=R.length<=1?R[0]:`[${R.join(", ")}]`,U=0,X=0;for(const ee of C.slice(1))if(ee)if(U++,w+=ee.length<=1?`; ${ee[0]}`:`; [${ee.join(", ")}]`,ee.length!==R.length)X=U;else for(const[z,Y]of R.entries())if(this._compareType(ee[z],Y))(ee[z].includes(V.FLOAT)&&!Y.includes(V.FLOAT)||R[z]===`${V.SIMPLE} ${V.NA}`)&&(R[z]=ee[z]);else{X=U;break}if(X){const ee=T[X].slice(-1)[0],z=Array.isArray(ee)?ee.slice(-1)[0]:ee;this._errorHandle(ye(pe.ifOrSwitchTypeErr,{keyword:"if",types:w}),z.ctx),R=R.map(()=>V.UNDETERMINED)}return r.returnedTypes=R,R}return[V.UNDETERMINED]}}class j_{constructor(e){D(this,"_nameMap");D(this,"_prefixNameVar");D(this,"_prefixNameFunc");D(this,"_prefixNameConst");D(this,"_userTypes");D(this,"_isInFunc");D(this,"_currentFuncName");D(this,"_varlist");D(this,"_memberIndexList");D(this,"_blockCount");D(this,"_inputCount");D(this,"_count");D(this,"_isSwitch",!1);D(this,"_isInLoop",!1);D(this,"_codesCol");D(this,"_dependsObj");D(this,"_enums");D(this,"_preRunMembers");D(this,"_isInConditionalStmt",!1);D(this,"_preRunMembersFuncs");D(this,"_preRunMemberFuncsCount",0);D(this,"__count",0);D(this,"preParseCode","");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,a;const n=[];for(const c of e){if(!c)return;if(Array.isArray(c)){for(const h of c)if(n.push(this._parserStmt(h)),fu.includes((a=(r=h.exprs)==null?void 0:r[0])==null?void 0:a.name))return n.join(`;
13
+ `)){const v=h.replace(/\s*(\n|\r)\s*/g," ");d.value=`\`${v.substring(1,v.length-1)}\``}break;case F.IntegerLiteral:d.type=V.INT;break;case F.DecimalLiteral:d.type=V.FLOAT;break}return d.type&&(d.type=`${V.CONST} ${d.type}`),d});D(this,"visitMethodElement",n=>{const{children:r}=n,[a,c]=r,[h,d,v]=this.visit(a),S=this.visit(c);return h.startsWith("request.")&&this._isInFunc&&(this._currentExportFunc&&this._errorHandle(ye(pe.exportFuncUseReqErr,{name:h}),n),this._hasRequest=!0),{name:h,type:d,args:S,expr:v}});D(this,"visitMethodName",n=>{const{children:r}=n,a=[],c=[];let h=0,d=null;for(;h<r.length;h++){const S=r[h],C=S.ruleIndex,T=S.symbol;switch(C){case F.RULE_identifier:a.push(this.visit(S));break;case F.RULE_singleExpression:d=this.visit(S);break;case F.RULE_typeName:const k=this.visit(S);c.push(k),this._typeCheck(k,F.RULE_typeName,S);break;default:T&&T.text==="."&&a.push(".")}}const v=a.join("");return L_.includes(v)?this._hasDrawFunc=!0:M_.includes(v)&&(this._hasCreateOrderFunc=!0),[v,c,d]});D(this,"visitArrowFunction",n=>{const{children:r,start:a,stop:c}=n,h={ruleType:le.ArrowFunction,returnedTypes:[]};let d=0,v={lineNumber:0,column:0};const S=this._commentsParser(a.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=a.line;let C=null;for(;d<r.length;d++){const T=r[d],k=T.ruleIndex,B=T.symbol;switch(k){case F.RULE_identifier:v={lineNumber:T.start.line,column:T.start.column},h.name=this.visit(T);break;case F.RULE_arrowFunctionParameters:h.params=this.visit(T),h.isExport&&this._exportArgsTypeVerify(h.params),this._setFuncParams(h,{endColumn:c.column,endLineNumber:c.line-1,startColumn:a.column,startLineNumber:a.line}),C=T;break;case F.RULE_block:this._isInFunc=!0,h.isExport&&(this._currentExportFunc=h.name),this._hasMemberIndex=!1,this._hasRequest=!1,h.block=this.visit(T),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,c.line-1),this._hasRequest=!1,this._currentFuncParams.clear(),h});D(this,"visitArrowFunctionParameters",n=>{const{children:r}=n;let a=0,c=[];for(;a<r.length;a++){const h=r[a];h.ruleIndex===F.RULE_formalParameterList&&(c=this.visit(h))}return c});D(this,"visitFormalParameterList",n=>{const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const h=r[a];h.ruleIndex===F.RULE_formalParameterArg&&c.push(this.visit(h))}return c});D(this,"visitFormalParameterArg",n=>{const{children:r}=n;let a=0;const c={};for(;a<r.length;a++){const h=r[a];switch(h.ruleIndex){case F.RULE_typeGather:const d=this.visit(h);c.type=d&&this._typeAddSeries(d);break;case F.RULE_identifier:c.name=this.visit(h);break;case F.RULE_singleExpression:c.defaultValue=this.visit(h),delete c.defaultValue.ctx}}return c.ctx=n,this._verifyArgsDefaultValue(c,n),c.type=c.type||V.UNDETERMINED,c});D(this,"visitArrowMethod",n=>{const{children:r,start:a,stop:c}=n;let h=0;const d={ruleType:le.ArrowMethod,returnedTypes:[]};let v={lineNumber:0,column:0};const S=this._commentsParser(a.line,[Kt.function,Kt.param,Kt.returns],!0);Object.assign(d,{desc:S[Kt.function],paramsDesc:S[Kt.param],returnsDesc:S[Kt.returns]}),this._currentLine=a.line;let C=null;for(;h<r.length;h++){const T=r[h];switch(T.ruleIndex){case F.RULE_identifier:v={lineNumber:T.start.line,column:T.start.column},d.name=this.visit(T);break;case F.RULE_arrowMethodParameters:d.params=this.visit(T),d.isExport&&this._exportArgsTypeVerify(d.params),this._setFuncParams(d,{endColumn:c.column,endLineNumber:c.line-1,startColumn:a.column,startLineNumber:a.line}),C=T;break;case F.RULE_block:this._isInFunc=!0,d.isExport&&(this._currentExportFunc=d.name),this._hasMemberIndex=!1,this._hasRequest=!1,d.block=this.visit(T),d.hasMemberIndex=this._hasMemberIndex,d.returnedTypes=this._getBlockReturnTypes(d.block),this._isInFunc=!1,this._currentExportFunc="";break;default:T.symbol&&T.symbol.type===F.Export&&(d.isExport=!0,this._addExportPos(T.symbol,"methods"));break}}return d.hasRequest=this._hasRequest,this._setFunc(d,v,C,c.line-1),this._setMethod(d,v),this._hasRequest=!1,this._currentFuncParams.clear(),d});D(this,"visitArrowMethodParameters",n=>{const{children:r}=n;if(!r)return;let a=0;const c={};let h=[];for(;a<r.length;a++){const d=r[a];switch(d.ruleIndex){case F.RULE_typeGather:const v=this.visit(d);c.type=v&&this._typeAddSeries(v);break;case F.RULE_identifier:c.ctx=d,c.name=this.visit(d);break;case F.RULE_formalParameterList:h=this.visit(d);break}}return[c,...h]});D(this,"visitTypeStatement",n=>{const{children:r,start:a,stop:c}=n;let h=0;const d={ruleType:le.TypeStatement,fields:[]},v=this._commentsParser(a.line,[Kt.type,Kt.field]);Object.assign(d,{desc:v[Kt.type],fieldsDesc:v[Kt.field]}),this._currentLine=a.line;let S={lineNumber:0,column:0},C=null;for(;h<r.length;h++){const T=r[h];switch(T.ruleIndex){case F.RULE_identifier:S={lineNumber:T.start.line,column:T.start.column},C=T,d.name=this.visit(T),this._verifyTypeName(d.name,T);break;case F.RULE_typeElement:d.fields.push(this.visit(T));break;default:T.symbol&&T.symbol.type===F.Export&&(d.isExport=!0,this._addExportPos(T.symbol,"types"));break}}if(d.isExport){const T=c.line-1,{line:k=0}=this._endExport;T>k&&(this._endExport={line:T,name:d.name})}return this._setUserType(d,S,C),this._setNewFunc(d,S),this._setCopyFunc(d,S),this._setCopyMethod(d,S),d});D(this,"visitTypeElement",n=>{const{children:r,start:a}=n;let c=0;const h={};let d=null,v=null;for(this._currentLine=a.line;c<r.length;c++){const S=r[c];switch(S.ruleIndex){case F.RULE_typeGather:const C=this.visit(S);if(S.children[0].ruleIndex===F.RULE_typeSeries){const{column:T,line:k,text:B}=S.start,L=T+1;this._errors.push({startColumn:L,endColumn:parseInt(L+B.length),startLineNumber:k,endLineNumber:k,message:ye(this._buildinTypes.has(B)?pe.typeUseError:pe.notTypeKeyword,{text:B})}),h.type=V.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:d=S,h.value=this.visit(S);break;default:S.symbol&&S.symbol.type===F.Varip&&(h.isVarip=!0);break}}return this._typeElementVerify(h,d,v),h});D(this,"visitAssignmentOperator",n=>{const{children:r}=n;return r&&r[0].symbol.text});D(this,"visitTypeMap",n=>{const{children:r}=n;let a=0;const c=[];for(;a<r.length;a++){const h=r[a];if(h.ruleIndex===F.RULE_typeName){const d=this.visit(h);c.push(d),this._typeCheck(d,F.RULE_typeName,h)}}return`map<${c[0]},${c[1]}>`});D(this,"visitTypeSeries",n=>{const{children:r}=n,[a,c]=r,h=this.visit(a),d=this.visit(c);return this._typeCheck(h,F.RULE_typeSeries,a),this._typeCheck(d,F.RULE_typeName,c),`${h} ${d}`});D(this,"visitTypeArray",n=>{const{children:r}=n,a=r[0];let c=this.visit(a),h=c;if(r.length===3)c=V.ARRAY;else{this._typeCheck(c,F.RULE_typeArray,a);let d=1;for(;d<r.length;d++){const v=r[d];v.ruleIndex===F.RULE_typeName&&(h=this.visit(v),this._typeCheck(h,F.RULE_typeName,v))}}return this._arrayTypeConvert(`${c}<${h}>`)});D(this,"visitTypeGather",n=>{const{children:r}=n;if(r&&r.length){const a=r[0],c=this.visit(a);return a.ruleIndex===F.RULE_typeName&&this._typeCheck(c,F.RULE_typeName,a),c}return null});D(this,"visitIdentifier",n=>n.children&&n.children[0].symbol.text);D(this,"visitTypeName",n=>{const{children:r}=n;let a=0,c="";for(;a<r.length;a++){const h=r[a];h.ruleIndex===F.RULE_identifier?c=`${c}${this.visit(h)}`:c=`${c}.`}return c});D(this,"visitEnumStatement",n=>{const{children:r,start:a,stop:c}=n;let h=0;const d={ruleType:le.EnumStatement,fields:[]},v=this._commentsParser(a.line,[Kt.enum,Kt.field]);Object.assign(d,{desc:v[Kt.enum],fieldsDesc:v[Kt.field]}),this._currentLine=a.line;let S={lineNumber:0,column:0},C=null;for(;h<r.length;h++){const T=r[h];switch(T.ruleIndex){case F.RULE_identifier:S={lineNumber:T.start.line,column:T.start.column},C=T,d.name=this.visit(T),this._verifyEnumName(d.name,T);break;case F.RULE_enumElement:d.fields.push(this.visit(T));break;default:T.symbol&&T.symbol.type===F.Export&&(d.isExport=!0,this._addExportPos(T.symbol,"enums"));break}}if(d.isExport){const T=c.line-1,{line:k=0}=this._endExport;T>k&&(this._endExport={line:T,name:d.name})}return this._setUserEnum(d,S,C),d});D(this,"visitEnumElement",n=>{const{children:r,start:a}=n;let c=0;const h={};for(this._currentLine=a.line;c<r.length;c++){const d=r[c];switch(d.ruleIndex){case F.RULE_identifier:h.name=this.visit(d);break;default:d.symbol&&d.symbol.type===F.StringLiteral&&(h.value=d.symbol.text);break}}return h});D(this,"visitName",n=>{const{children:r}=n;let a=0,c=!1;const h=[];let d=null;for(;a<r.length;a++){const v=r[a];switch(v.ruleIndex){case F.RULE_identifier:h.push(this.visit(v));break;case F.RULE_singleExpression:d=this.visit(v);break;case F.RULE_methodElement:c=!0;const S=this.visit(v);S.ctx=v,h.push(S);break}}return this._nameHandle(c,h,d,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=a}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:a,varPos:c,isBuiltIn:h}=n;if(h&&this._errorHandle(ye(pe.buidinAssignErr,{name:a}),r),!c)return;const d=this._currentBlockVars[0].get(a);if(!d)return;const{column:v,lineNumber:S}=d.pos||{};this._isInFunc&&v===c.column&&S===c.lineNumber?this._errorHandle(ye(pe.modifyGlobalVarErr,{name:a}),r):d.hasAssigned=!0}_inputFuncTitleVerify(n,r){if(!(n!=null&&n.length)||n.length>1)return;const{name:a,args:c,isBuiltIn:h}=n[0];if(h&&!this._strategyFuncName&&a.startsWith(Ii.strategy))this._strategyFuncName={ctx:r,name:a};else if(!a.startsWith(V.INPUT))return;this._inputVarName&&!(c.params.some(d=>d.originName==="title")||c.title)&&(c.title={value:`"${this._inputVarName}"`,ruleType:le.Literal,type:`${V.CONST} ${V.STRING}`})}_verifyIf(n){const{condition:r}=n;if(r!=null&&r.length)for(const a of r){const{type:c,ctx:h}=a;if(c===V.UNDETERMINED)continue;const d=this._removePrefix(c);[V.INT,V.FLOAT].includes(d)?this._errorHandle(ye(ar.conditionWarning,{name:"if"}),h,Sn.Warning):d!==V.BOOL&&this._errorHandle(ye(pe.conditionalErr,{name:"if"}),h)}}_forToNameHandle(n,r){if(n.name&&n.numerical.length===1){this._pushBlockRanges(r);const a=n.numerical[0].type;this._variablesHandle({nameList:{name:n.name,isForVar:!0,type:n.type},value:{type:a||`${V.SERIES} ${V.INT}`}},r),this._blockRanges.pop()}}_verifyForTo(n){const{numerical:r}=n;if(r!=null&&r.length)for(const a of r){const{type:c,ctx:h}=a;if(c===V.UNDETERMINED)continue;const d=this._removePrefix(c);[V.INT,V.FLOAT].includes(d)||this._errorHandle(pe.fortoErr,h)}}_forInNameHandle(n,r){if(this._pushBlockRanges(r),n.names.length){let[a,c]=n.names;const h=n.array.type;c?this._variablesHandle({nameList:{name:a,isForVar:!0,type:`${V.SERIES} ${V.INT}`},value:{type:`${V.SERIES} ${V.INT}`}},r):c=a;const d=h===V.UNDETERMINED?h:this._isMatrixType(h)?`${this._getArrayType(h)}[]`:this._typeAddSeries(this._getArrayType(h));this._variablesHandle({nameList:{name:c,isForVar:!0,type:d},value:{type:d}},r)}this._blockRanges.pop()}_verifySwitch(n){var r;if(n.cases){const a=(r=n.condition)==null?void 0:r.type;if(a===V.UNDETERMINED)return;if(a&&this._types.has(a)){this._errorHandle(ye(pe.typeMismatch,{operator:"switch",index:"expr0",typeE:a,typeR:`${V.SIMPLE} ${V.STRING}`}),n.condition.ctx);return}for(const c of n.cases){const{condition:{type:h,ctx:d}}=c;if(h!==V.UNDETERMINED)if(this._types.has(h))this._errorHandle(ye(pe.typeMismatch,{operator:"case",index:"expr1",typeE:h,typeR:`${V.SIMPLE} ${V.STRING}`}),d);else if(a){if(!this._compareType(a,h)){const v=this._removePrefix(a),S=this._removePrefix(h);v===V.BOOL&&[V.INT,V.FLOAT].includes(S)?this._errorHandle(ye(ar.conditionWarning,{name:"switch"}),d,Sn.Warning):[V.INT,V.FLOAT].includes(v)&&S===V.BOOL?this._errorHandle(ye(ar.conditionWarning,{name:"switch"}),n.condition.ctx,Sn.Warning):this._errorHandle(ye(pe.typeMismatch,{operator:"case",index:"expr1",typeE:h,typeR:`${a}`}),d)}}else{const v=this._removePrefix(h);[V.INT,V.FLOAT].includes(v)?this._errorHandle(ye(ar.conditionWarning,{name:"switch"}),d,Sn.Warning):v!==V.BOOL&&this._errorHandle(ye(pe.conditionalErr,{name:"switch"}),d)}}}}_verifyWhile(n){const{condition:r}=n;if(r){const{type:a,ctx:c}=r;if(a===V.UNDETERMINED)return;const h=this._removePrefix(a);[V.INT,V.FLOAT].includes(h)?this._errorHandle(ye(ar.conditionWarning,{name:"while"}),c,Sn.Warning):h!==V.BOOL&&this._errorHandle(ye(pe.conditionalErr,{name:"while"}),c)}}async _importHandle(n,r){const{stop:a,start:c}=r,{username:h,libraryName:d,libraryVersion:v,name:S}=n,C=`${h}/${d}/${v}`;if(this._importLibs.has(C))return this._errorHandle(pe.importMultipleErr,r),n;for(const[B,L]of this._importLibs)if(L.name&&L.name===S||!L.name&&!S&&L.libraryName===d)return this._errorHandle(ye(pe.importNameRepeatErr,{name:S,line:L.startLine}),r),n;let T=S||d;const k=await this._getImportLibraryFunc({...n,libraryId:C,ctx:void 0,startLine:c.line,endLine:a.line,startColumn:c.column,endColumn:a.column+a.text.length+1});if(k){const{codeStr:B,description:L}=k;this._importLibs.set(C,{...n,libraryId:C,startLine:c.line,endLine:a.line,ctx:void 0,desc:L}),this._importDataHandle(k,T),wn.includes(T)&&(T=`$${T}`),n.code=B.replace("$name",T)}else this._errorHandle(ye(pe.importNotExitErr,{username:h,libraryName:d}),r)}_importDataHandle(n,r){const{functions:a,methods:c,types:h}=n;for(const d of a){const{name:v}=d,S=`${r}.${v}`,C=this._functions.get(S)||[];C.push({...this._importTypeUpdate(d,h,r),name:S,isUser:void 0,isImport:!0}),this._functions.set(S,C)}for(const d of c){const v=this._importTypeUpdate(d,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 d of h){const v=`${r}.${d.name}`,S=this._types.get(v)||[];S.push({...this._importTypeUpdate(d,h,r),name:v,isImport:!0}),this._types.set(v,S)}}_importTypeUpdate(n,r,a){var B;let{args:c,returnedTypes:h,thisType:d,fields:v,name:S,originalName:C}=n,T="";if(c&&c.length&&(c=c.map(L=>{const{allowedTypeIDs:b,displayType:y,name:g}=L,O=y&&this._replaceTypeName(y,r,a);return T=T?`${T}, ${O} ${g}`:`${O} ${g}`,{...L,allowedTypeIDs:b==null?void 0:b.map(R=>this._replaceTypeName(R,r,a)),displayType:O}})),h!=null&&h.length&&(h=[this._replaceTypeName(h[0],r,a)]),d!=null&&d.length){const L=this._replaceTypeName(d[0],r,a);L!==d[0]&&(C=`${a}.${C||S}`),d=[L]}v!=null&&v.length&&(v=v.map(L=>{const{type:b}=L;return{...L,type:b&&this._replaceTypeName(b,r,a)}}));const k={...n,args:c,returnedTypes:h,thisType:d,fields:v,originalName:C};return(B=k.syntax)!=null&&B.length&&(k.syntax=[`${C||`${a}.${S}`}(${T}) → ${(h==null?void 0:h[0])||"void"}`]),k}_replaceTypeName(n,r,a){const c=r.find(h=>n.includes(h.name));return c?n.replace(c.name,`${a}.${c.name}`):n}_verifyArgsDefaultValue(n,r){const{defaultValue:a,type:c}=n;if(!a)return;const{ruleType:h,isBuiltIn:d,type:v}=a,S=this._removePrefix(v);if(h!==le.Literal&&!d)delete n.defaultValue,this._errorHandle(pe.argDefaultErr,r);else if(c&&c!==V.UNDETERMINED&&v!==V.UNDETERMINED){const C=this._removePrefix(c);if(C===V.FLOAT&&S===V.INT)return;S!==C&&this._errorHandle(ye(pe.defaultValueTypeErr,{typeE:v,typeR:c}),r)}else c||(n.type=this._typeAddSeries(S===V.INT?V.FLOAT:S))}_exportArgsTypeVerify(n){for(const r of n)(r.type===V.UNDETERMINED||!r.type)&&this._errorHandle(pe.exportFuncArgErr,r.ctx)}_verifyTypeName(n,r){lu.includes(n)?this._errorHandle(ye(pe.typeNameErr,{name:n}),r):Fp.includes(n)&&this._errorHandle(ye(pe.enumVarNameBuiltinErr,{name:n}),r)}_addExportPos(n,r){const{line:a,column:c,text:h}=n;this._exportPositions.push({startLineNumber:a,startColumn:c,endLineNumber:a,endColumn:c+h.length+1,type:r})}_verifyEnumName(n,r){lu.includes(n)?this._errorHandle(ye(pe.enumVarNameErr,{name:n}),r):Fp.includes(n)&&this._errorHandle(ye(pe.enumVarNameBuiltinErr,{name:n}),r)}_nameHandle(n,r,a,c){var d,v;const h={ruleType:le.Name,hasMethod:n,exprs:r,expr:a};if(n){let S="";const C=[];for(const k of r)typeof k=="string"?S=S?`${S}.${k}`:k:(S&&(k.name=`${S}.${k.name}`),C.push(k),S="");h.exprs=[...C,S];const T=this._getMethodTypes(C,Array.from(C,()=>c));if(T&&T.length){const k=ye(pe.noFiledErr,{name:S});T.length>1&&this._errorHandle(k,c),h.type=((v=this._nameCheck(this._getOriginMethodName(T[0],S),c,k))==null?void 0:v.type)||V.UNDETERMINED}}else{let S=r.join(".");if(a&&a.type&&a.type===V.UNDETERMINED)h.type=V.UNDETERMINED,S=`expr0.${S}`;else{a&&a.type&&(S=`${this._getMethodTypeName(a.type)}.${S}`);const C=this._nameCheck(S,c)||{};(d=C.title)!=null&&d.startsWith("built-in")&&(h.isBuiltIn=!0,h.isConst=C.isConst,!this._strategyVarName&&S.startsWith(Ii.strategy)&&(this._strategyVarName={ctx:c,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)||V.UNDETERMINED,C!=null&&C.isArg&&(h.arg=C),h.scope=this._blockCount,C.isEnum?this._errorHandle(ye(pe.enumUseErr,{name:S}),c):this._isInFunc&&this._currentExportFunc&&(h.type.startsWith(V.INPUT)?this._errorHandle(ye(pe.exportFuncHasInputErr,{name:S,func:this._currentExportFunc}),c):C.scope===0&&C.hasAssigned&&this._errorHandle(ye(pe.exportFuncUseGlobalVarErr,{func:this._currentExportFunc}),c))}h.name=S}return h}_typeElementVerify(n,r,a){var v,S;const{type:c,value:h}=n;if(!h){c||this._errorHandle(pe.typeFieldErr,a);return}if(![le.Literal,le.UnaryExpression].includes(h.ruleType)&&!h.isBuiltIn){this._errorHandle(pe.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(pe.defaultValueErr,r);return}}if(!c){const C=h.type,T=this._getPrefix(C);n.type=T?this._typeAddSeries(this._removePrefix(C)):C;return}(!this._compareType(c,h.type)||c.endsWith(V.INT)&&h.type.endsWith(V.FLOAT))&&this._errorHandle(ye(pe.defaultValueTypeErr,{typeE:h.type,typeR:c}),r)}_memberIndexVerify(n,r){if(n.ruleType===le.Name&&!n.hasMethod&&this._blockCount){const c=this._currentBlockVars[this._blockCount],h=c&&c.get(n.name);h&&(h.isForVar?this._errorHandle(ye(pe.notHistoryErr,{name:n.name}),r):!(this._blockCount===1&&this._isInFunc)&&this._errorHandle(ye(ar.localScopeGetHistory,{name:n.name}),r,Sn.Warning))}const a=n&&n.type;if(a){const c=this._removePrefix(a);!this._types.has(c)&&!this._buildinTypes.has(c)&&!this._isArrayType(c)&&!this._isMatrixType(c)&&!this._isMapType(c)&&c!==V.UNDETERMINED&&this._errorHandle(ye(pe.invalidType,{index:0}),r)}}_setFuncParams(n,r){var a;for(const c of n.params){const h=(a=this._types.get(c.type))==null?void 0:a[0];if(c.scope=this._blockCount+1,h&&h.fields)for(const d of h.fields){const v=`${c.name}.${d.name}`;this._currentFuncParams.set(v,{...d,originName:v,varScope:c.scope})}delete c.ctx,c.range=r,this._setVariablesMap(c,!0),this._currentFuncParams.set(c.name,c)}}_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,a){const{fields:c,name:h,desc:d,fieldsDesc:v}=n,S={members:c.map(C=>({name:C.name,value:C.value,enumName:h,isEnumMember:!0,desc:v==null?void 0:v[C.name],type:`${V.CONST} ${h}`})),name:h,desc:d,pos:r};if(this._enums.has(h)){this._errorHandle(ye(pe.typeRepeatErr,{name:h,keyword:Kt.enum}),a);return}else if(this._types.has(h)){this._errorHandle(ye(pe.typeRepeatErr,{name:h,keyword:Kt.type}),a);return}n.isExport&&this._exportEnums.push(S),this._enums.set(h,[{...S}]),this._addEnumToMap(h,h,r)}_setUserType(n,r,a){const{fields:c,name:h,desc:d,fieldsDesc:v}=n,S={fields:c.map(C=>({name:C.name,desc:v==null?void 0:v[C.name],type:C.type})),name:h,desc:d,pos:r};if(this._enums.has(h)){this._errorHandle(ye(pe.typeRepeatErr,{name:h,keyword:Kt.enum}),a);return}else if(this._types.has(h)){this._errorHandle(ye(pe.typeRepeatErr,{name:h,keyword:Kt.type}),a);return}n.isExport&&this._exportTypes.push(S),this._types.set(h,[{...S}]),this._addVarToMap(h,h,r,!1,!1)}_againAssignHandle(n,r,a){const c=a!==":="?a.replace("=",""):a,h=a!==":="?[V.UNDETERMINED,V.INT,V.FLOAT]:[];c==="+"&&h.push(V.STRING);const[d,v]=n;d.arg&&!d.name.includes(".")&&this._errorHandle(ye(pe.funcArgAssignErr,{name:d.name}),r[0]);const S=this._sameTypeJudge(n,r,c,h);let C=this._typeHandle(S);return this._updateUserVar(d.name,C,v.type),d.type=C,{ruleType:le.AgainAssign,name:d,operator:a,type:C,value:v}}_typeCheck(n,r,a){const c=[V.SERIES,V.SIMPLE,V.CONST];switch(r){case F.RULE_typeName:const h=this._buildinTypes.get(n);h&&![...c,V.ARRAY,V.MATRIX,V.MAP].includes(h[0].name)||this._types.get(n)||this._errorHandle(ye(pe.notTypeKeyword,{text:n}),a);break;case F.RULE_typeArray:[V.ARRAY,V.MATRIX].includes(n)||this._errorHandle(pe.tempateTypeErr,a);break;case F.RULE_typeSeries:c.includes(n)||this._errorHandle(ye(pe.qualifierErr,{name:n}),a);break}}_getBuildVar(n){const r=this._buildinVariables.get(n);if(r&&r[0])return r[0];const a=this._buildinConstants.get(n);return a&&a[0]?Object.assign(a[0],{isConst:!0}):this._specialTreatmentChartPoint(n)}_specialTreatmentChartPoint(n){var r,a;if(n.startsWith("chart.point")){const c=n.split("."),h=c.pop(),d=c.join(".");return(((a=(r=this._buildinTypes.get(d))==null?void 0:r[0])==null?void 0:a.fields)||[]).find(S=>S.name===h)}}_verifyName(n,r){var c,h;const a=this._getBuildVar(n);if(a)return a;if(n.includes(".")){const d=n.split("."),v=d.pop(),S=d.join(".");let C=this._blockCount;for(;C>=0;){if(!this._currentBlockVars[C]){C--;continue}const k=this._currentBlockVars[C].get(S);if(r&&this._judgeGatherValue(v||"",r,k==null?void 0:k.valueType,!0),(k==null?void 0:k.type)==="chart.point"){const L=(((h=(c=this._buildinTypes.get(k.type))==null?void 0:c[0])==null?void 0:h.fields)||[]).find(b=>b.name===v);if(L)return Object.assign(L,{pos:k.pos})}C--}const T=this._specialTreatmentChartPoint(n);if(T)return T}return this._getUserVar(n)}_judgeGatherValue(n,r,a,c){return a!==`${V.SIMPLE} ${V.NA}`?!0:(c&&this._errorHandle(ye(pe.objectIsNaErr,{name:n,type:"field"}),r),!1)}_nameCheck(n,r,a=ye(pe.undeclared,{name:n})){const c=this._verifyName(n,r);return c||this._errorHandle(a,r),c}_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,a=Sn.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:a})}_boolTypeJudge(n,r,a,c=0){return this._typeJudge(n,r,a,V.BOOL,[V.UNDETERMINED,V.INT,V.FLOAT,V.BOOL],c)}_calcTypeJudge(n,r,a,c=0){return this._typeJudge(n,r,a,"int/float",[V.UNDETERMINED,V.INT,V.FLOAT],c)}_typeJudge(n,r,a,c,h,d=0){const v=n&&n.type;if(v){const S=this._removePrefix(v);if(!h.includes(S)&&S!==V.NA)return this._errorHandle(ye(pe.typeMismatch,{operator:`operator ${a}`,index:`expr${d}`,typeE:S,typeR:c}),r),V.UNDETERMINED;c===V.BOOL&&[V.INT,V.FLOAT].includes(S)&&this._errorHandle(ye(ar.typeMismatch,{operator:`operator ${a}`,index:`expr${d}`,type:V.BOOL}),r,Sn.Warning)}return v||V.UNDETERMINED}_sameTypeJudge(n,r,a,c){let h="";const d=[],v=["plot_display","plot_simple_display"];["+","-","+=","-="].includes(a)&&(c=c.concat(v));for(const[S,C]of n.entries()){let T=C&&C.type||V.UNDETERMINED;const k=this._removePrefix(T);if(!c.includes(k)&&c.length&&k!==V.NA){this._errorHandle(ye(pe.typeMismatch,{operator:`operator ${a}`,index:`expr${S}`,typeE:T,typeR:c.slice(1).join("/")}),r[S]),h=V.UNDETERMINED,d.push(h);continue}if(!h){h=k,d.push(T);continue}if(h===V.UNDETERMINED||k===V.UNDETERMINED)T=h=V.UNDETERMINED;else if(h!==k&&h!==V.NA&&k!==V.NA&&(![V.INT,V.FLOAT].includes(h)||![V.INT,V.FLOAT].includes(k)))if(a===":="){if(h===V.BOOL&&[V.INT,V.FLOAT].includes(k)){this._errorHandle(ye(ar.boolVarNumWarning,{name:n[0].name}),r[0],Sn.Warning),d.push(T);continue}this._errorHandle(ye(pe.assignTypeMismatch,{typeE:k,name:n[0].name,typeR:h}),r[0]),T=h=V.UNDETERMINED}else if(["==","!=","?:"].includes(a)&&[V.INT,V.FLOAT,V.BOOL].includes(h)&&[V.INT,V.FLOAT,V.BOOL].includes(k))this._errorHandle(ye(ar.typeMismatch,{operator:`operator ${a}`,index:`expr${S}`,type:h}),r[S],Sn.Warning),T=h=V.UNDETERMINED;else if(v.includes(h)&&v.includes(k)){if(h!==k){const B=this._getPrefix(T);d[S-1]=`${this._getPrefix(d[S-1])} ${v[0]}`,T=h=`${B} ${v[0]}`}}else this._errorHandle(ye(pe.typeMismatch,{operator:`operator ${a}`,index:`expr${S}`,typeE:k,typeR:h}),r[S]),T=h=V.UNDETERMINED;d.push(T)}return d}_getUserVar(n,r=!1){for(let a=this._blockCount;a>=0;a--){const c=this._currentBlockVars[a];if(a<=0){const h=this._currentFuncParams.get(n);if(h)return h.isArg=!0,h}if(c){const h=c.get(n);if(h)return h}}if(n.includes(".")&&!r){let a=!1,c=null;if(n.split(".").reduce((h,d)=>{let v=h?`${h}.${d}`:d;const S=this._getUserVar(v,!0);return S!=null&&S.type?S.type===V.UNDETERMINED?a=!0:(v=S.type,c=S):c=null,v},""),a)return{name:n,type:V.UNDETERMINED};if(c)return c}return null}_repeatVarJudge(n,r,a,c){this._getBuildVar(n)&&this._errorHandle(ye(pe.buidinVarErr,{name:n}),r);for(let d=0;d<=this._blockCount;d++){const v=this._currentBlockVars[d];if(v&&v.get(n)){if(this._blockCount===d)return this._errorHandle(ye(pe.repeatVar,{name:n}),r),!0;a.reName=`$_${n}__${this._blockCount}`,this._errorHandle(ye(ar.repeatVar,{name:n}),r,Sn.Warning)}}c!=null&&c.some(d=>d===n&&n!=="_")&&this._errorHandle(ye(pe.repeatVar,{name:n}),r)}_judgeVarBuildIn(n){for(let r=0;r<=this._blockCount;r++){const a=this._currentBlockVars[r];if(a&&a.get(n))return!0}return!1}_updateUserVar(n,r,a){for(let c=0;c<=this._blockCount;c++){const h=this._currentBlockVars[c];if(h){const d=h.get(n);if(d){d.type=r,d.valueType=a;return}}}}_variablesHandle(n,r){var h,d,v,S,C;if(!(n&&n.nameList))return;const a=n.nameList;if(a.name==="_")return;const c=n.value;if(a.ruleType===le.VarMultiple){a.types=[],this._checkVarMultiple(a.names,c,r);for(const[T,k]of a.names.entries()){if(k==="_")continue;const B=this._varTypeJudge("",((h=c==null?void 0:c.types)==null?void 0:h[T])||V.UNDETERMINED,k,r);a.types.push(B),this._addVarToMap(k,B,a.posList[T],!0)}}else{const T=(c==null?void 0:c.type)||((d=c==null?void 0:c.returnedTypes)==null?void 0:d[0]);((v=c==null?void 0:c.types)!=null&&v.isBrackethesized||(S=c==null?void 0:c.returnedTypes)!=null&&S.isBrackethesized||(C=c==null?void 0:c.types)!=null&&C.length)&&this._errorHandle(ye(pe.tupleLeftVarErr,{name:a.name}),r),!a.type&&T===`${V.SIMPLE} ${V.NA}`&&this._errorHandle(pe.naVarErr,r),a.prefix&&Pi.indexOf(a.prefix)>Pi.indexOf(this._getPrefix(T))&&this._errorHandle(ye(pe.declaredErr,{prefix:a.prefix,type:T}),r);const k=this._varTypeJudge(a.type,T||V.UNDETERMINED,a.name,r);a.type=k,this._addVarToMap(a.name,k,a.pos,!0,a.isForVar,a.declare,c==null?void 0:c.type,a.desc)}}_checkVarMultiple(n,r,a){var S,C,T,k;const c=n.length,h=((r==null?void 0:r.types)||(r==null?void 0:r.returnedTypes)||[]).length,d=((S=r==null?void 0:r.types)==null?void 0:S.isBrackethesized)||((C=r==null?void 0:r.returnedTypes)==null?void 0:C.isBrackethesized);(T=r==null?void 0:r.types)!=null&&T.isUnknown||(k=r==null?void 0:r.returnedTypes)!=null&&k.isUnknown||(h===1&&!d||!h?this._errorHandle(pe.tupleRightVarErr,a):c!==h&&this._errorHandle(ye(pe.tupleVarErr,{indexA:h,indexB:c}),a))}_addEnumToMap(n,r,a){var v;const c=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)c.set(`${n}.${S.name}`,S);const d={name:n,isEnum:!0,type:`${V.CONST} ${r}`,pos:a};c.set(n,d),this._currentBlockVars[this._blockCount]=c}_addVarToMap(n,r,a,c=!0,h=!1,d,v,S){var B;const C=this._currentBlockVars[this._blockCount]||new Map,T=(B=this._types.get(r))==null?void 0:B[0];if(T&&T.fields)for(const L of T.fields)C.set(`${n}.${L.name}`,L);const k={name:n,type:r,pos:a,valueType:v,desc:S};c&&this._setVariablesMap(k),C.set(n,Object.assign(k,{isForVar:h,declare:d})),this._currentBlockVars[this._blockCount]=C}_setVariablesMap(n,r=!1){const a=this._blockRanges[this._blockCount];r||(n.range=a,n.scope=this._blockCount);const c=this._variables.get(n.name)||[];c.push(n),this._variables.set(n.name,c)}_varTypeJudge(n,r,a,c){if(r===V.VOID)return this._errorHandle(pe.voidNotVar,c),V.UNDETERMINED;if(n&&r!==V.UNDETERMINED){const h=this._removePrefix(n),d=this._removePrefix(r);return d!==h&&d!==V.NA&&!(h===V.FLOAT&&d===V.INT)?h===V.BOOL&&[V.FLOAT,V.INT].includes(d)?(this._errorHandle(ye(ar.boolVarNumWarning,{name:a}),c,Sn.Warning),n):(this._errorHandle(ye(pe.declareTypeErr,{type:n,valueType:r}),c),V.UNDETERMINED):this._typeHandle([n,r])}else if(r===V.UNDETERMINED)return V.UNDETERMINED;return n||r||V.UNDETERMINED}_getAllowTypes(n){const r=[];if(n===V.UNDETERMINED)return r;const a=this._getPrefix(n);if(a){const c=this._removePrefix(n);let h=-1;for(const[d,v]of Pi.entries())v===a&&(h=d),h>=0&&h<=d&&(c===V.FLOAT&&r.push(`${v} ${V.INT}`),r.push(`${v} ${c}`))}else n=this._arrayTypeConvert(n)||"",r.push(n),n.includes(V.FLOAT)&&r.push(n.replace(/float/,V.INT));return r}_setNewFunc(n,r){const a=`${n.name}.new`,c=[],h=[];for(const v of n.fields)c.push({name:v.name,required:!1,allowedTypeIDs:this._getAllowTypes(v.type),displayType:v.type}),h.push(`${v.type} ${v.name}`);const d={name:a,args:c,returnedTypes:[n.name],pos:r,syntax:[`${a}(${h.join(", ")}) → ${n.name}`]};n.isExport&&this._exportFunctions.push(d),this._functions.set(a,[{...d,isUser:!0}])}_setCopyFunc(n,r){const a=n.name,c=`${a}.copy`,h={name:c,args:[{name:"object",required:!0,allowedTypeIDs:[a],displayType:a}],returnedTypes:[a],pos:r,info:"The identifier of the object to be copied.",syntax:[`${c}(${a} object) → ${a}`]};n.isExport&&this._exportFunctions.push(h),this._functions.set(c,[{...h,isUser:!0}])}_setCopyMethod(n,r){const a=n.name,c=`${a}.copy`,h={name:c,originalName:c,args:[],returnedTypes:[a],thisType:[a],pos:r,syntax:[`${c}() → ${a}`]};n.isExport&&this._exportMethods.push(h),this._methods.set(c,[{...h,isUser:!0}])}_setFunc(n,r,a,c){const h=[],d=[],{desc:v,paramsDesc:S,returnsDesc:C,params:T,hasMemberIndex:k}=n;for(const O of T){const{type:R,name:w,defaultValue:U}=O;h.push({name:w,desc:S==null?void 0:S[w],required:!U,allowedTypeIDs:this._getAllowTypes(R),displayType:R}),d.push(`${R===V.UNDETERMINED?"":`${R} `}${w}`)}const{returnedTypes:B=[]}=n,L=n.name,b=B.length>1||B.isBrackethesized?`[${B.join(", ")}]`:B.toString(),y={name:L,desc:v,args:h,syntax:[`${L}(${d.join(", ")}) → ${b||"void"}`],hasMemberIndex:k,pos:r,isUser:!0,returnedTypes:B,returns:C,hasRequest:this._hasRequest};let g=this._functions.get(L);if(g){const O=g.length;y.index=O,n.index=O,this._verifyFuncRepeat(g,y,a),g.push(y),this._overloadsFuncs.push({name:L,index:O,line:r.lineNumber,startColumn:r.column+1,endColumn:r.column+L.length})}else g=[y];if(n.isExport){const{line:O=0}=this._endExport;c>O&&(this._endExport={line:c,name:L,index:y.index}),this._exportFunctions.push(y)}this._functions.set(L,g)}_setMethod(n,r){var R;const{name:a,returnedTypes:c,params:h,desc:d,paramsDesc:v,returnsDesc:S}=n,C=h[0].type,T=[],k=[];for(const w of h.slice(1)){const{type:U,name:X,defaultValue:ee}=w;T.push({name:X,desc:v==null?void 0:v[X],required:!ee,allowedTypeIDs:this._getAllowTypes(U),displayType:U}),k.push(`${U} ${X}`)}const B=c.length>1||c.isBrackethesized?`[${c.join(", ")}]`:c.toString(),L=this._getMethodTypeName(C),b=`${L}.${a}`;n.typeName=L;const y={name:a,args:T,desc:d,originalName:b,syntax:[`${a}(${k.join(", ")}) → ${B||"void"}`],returnedTypes:c,hasMemberIndex:n.hasMemberIndex,pos:r,thisType:[C],returns:S,hasRequest:this._hasRequest};let g=this._methods.get(b),O=this._functions.get(a);if(O){const w=O.filter(ee=>!ee.isImport).length,U=((R=g==null?void 0:g.filter(ee=>!ee.isImport))==null?void 0:R.length)||0;let X=w;w>U&&(X=w-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,a){const{args:c}=r;n.some(d=>{const{args:v}=d;return(v==null?void 0:v.length)!=(c==null?void 0:c.length)?!1:!(v!=null&&v.length)&&!(c!=null&&c.length)?!0:v==null?void 0:v.every((S,C)=>{var T;return S.displayType===((T=c==null?void 0:c[C])==null?void 0:T.displayType)})})&&this._errorHandle(ye(pe.funcRepeatErr,{name:r.name}),a)}_getMethodTypes(n,r){let a;for(const[c,h]of n.entries()){const{type:d,expr:v,args:S}=h;let{name:C}=h;const T=r[c];if(v){if(v.type===V.UNDETERMINED)return[V.UNDETERMINED];C=`${this._getMethodTypeName(v.type)}${C}`,S.params.unshift(v)}if(a&&a.length>=1)if(a.length===1){const k=a[0];if(k===V.UNDETERMINED)return[V.UNDETERMINED];const B=this._getOriginMethodName(k,C);C.includes(".")?a=this._getOtherNamesMethodType(B,a,T,S,h):a=this._expandMethodHandle(B,T,S,{type:k},k,h)}else this._errorHandle(ye(pe.noFiledErr,{name:C}),T);else{const[k,B]=this._tempFuncNameHandle(C,T,d);C=B;const L=this._buildinFunctions.get(k);if(L)this._globalFuncVerify(L[0],T),this._hasMemberIndexVerify(L[0],T,h),h.isBuiltIn=!0,a=this._getBuildInReturnTypes(L,S,C,T,void 0,d);else{const b=this._functions.get(C);if(b)if(b.length<=1){this._hasMemberIndexVerify(b[0],T,h),a=b[0].returnedTypes;const{hasErr:y}=this._checkArgs(S,b[0].args||[],C,T,a[0]);if(y)return[V.UNDETERMINED]}else{const y=this._overloadsFuncGetTypes(b,S,T,void 0,h);a=this._returnedTypesParse([y])}else a=this._getOtherNamesMethodType(C,a,T,S,h)}}h.returnTypes=a}return a===void 0&&this._errorHandle(ye(pe.notFindFuncErr,{name:n[0].name}),r[0]),a}_globalFuncVerify(n,r){this._blockCount!==0&&F_.includes(n.name)&&this._errorHandle(ye(pe.globalFuncErr,{name:n.name}),r)}_hasMemberIndexVerify(n,r,a){n.hasRequest&&(a.hasRequest=!0,this._hasRequest=!0),n.hasMemberIndex||n.name.startsWith("ta.")||n.name==="math.sum"?(this._hasMemberIndex=this._isInFunc,a.hasMemberIndex=!0,a.position=r.start.tokenIndex):n.name.startsWith("request.")&&this._isInLocalScop&&this._errorHandle(pe.requestUserInLoopErr,r)}_tempFuncNameHandle(n,r,a){let c=n;if(a&&a.length>=1){const h=["array.new","matrix.new"].includes(n),d=n==="map.new";if(a.length===1)if(h)c=`${n}<type>`,n=`${n}<${a[0]}>`;else return d?this._errorHandle(ye(pe.templateErr,{countA:2,countB:1}),r):this._errorHandle(ye(pe.templateNoSupportErr,{name:n}),r),[V.UNDETERMINED];else{if(!d)return h?this._errorHandle(ye(pe.templateErr,{countA:1,countB:2}),r):this._errorHandle(ye(pe.templateNoSupportErr,{name:n}),r),[V.UNDETERMINED];if(!lu.includes(a[0]))return this._errorHandle(ye(pe.mapKeyErr,{type:this._typeAddSeries(a[0])}),r),[V.UNDETERMINED];c=`${n}<type,type>`,n=`${n}<${a[0]},${a[1]}>`}}return[c,n]}_getOtherNamesMethodType(n,r,a,c,h){const d=n.split("."),v=d.length-1,S=d.slice(0,v).join("."),C=this._getUserVar(S);this._judgeGatherValue(d[v],a,C==null?void 0:C.valueType)||(h.name=`${S}?.${d[v]}`);const k=C==null?void 0:C.type;if(k){if(k===V.UNDETERMINED)return r=[V.UNDETERMINED],r.isUnknown=!0,r;const B=this._getOriginMethodName(k,d[v]);h.varScope=C.scope,r=this._expandMethodHandle(B,a,c,C,S,h)}else{let B="",L="",b="";for(const y of d.slice(0,v)){B?L=this._getOriginMethodName(B,y):L=L?`${L}.${y}`:y;const g=this._verifyName(L);if(g!=null&&g.type){if(B=g.type,b="",g.title.startsWith("built-in variable")){const O=this._getOriginMethodName(B,d[v]);r=this._expandMethodHandle(O,a,c,C,S,h),h.hasVarPrefix=!0}}else this._buildinTypes.get(L)?b=ye(pe.methodNotExistErr,{name:L,methodName:d[v]}):b=ye(pe.noFiledErr,{name:y})}b&&this._errorHandle(b,a)}return r}_expandMethodHandle(n,r,a,c,h,d){var C,T;let v;const S=this._buildinMethods.get(n);if(S)d.name=d.name.split(".").join("?.").replace("??","?"),v=this._getBuildInReturnTypes(S,a,n,r,c);else{const k=this._methods.get(n);if(k&&k.length)if(k.length<=1){const B=k[0],L=this._getMethodTypeName(((C=B.thisType)==null?void 0:C[0])||"");if(this._types.get(L))d.name=d.name.split(".").join("?.").replace("??","?");else{const g=this._functions.get(B.name);g&&(d.selfArg=(T=g[B.index||0].args)==null?void 0:T[0])}d.funcName=B.name,d.index=B.index,this._hasMemberIndexVerify(B,r,d),v=B.returnedTypes;const{hasErr:y}=this._checkArgs(a,B.args||[],n,r,(v==null?void 0:v[0])||"");if(y)return[V.UNDETERMINED]}else{const B=this._overloadsFuncGetTypes(k,a,r,c,d);v=this._returnedTypesParse([B])}else this._errorHandle(ye(pe.methodNotExistErr,{methodName:n.split(".").slice(-1)[0],name:h}),r)}return v}_getBuildInReturnTypes(n,r,a,c,h,d){var S;let v;if(n.length===1){const{returnedTypes:C,syntax:T,args:k=[],thisType:B}=n[0],L=T[0].split("→")[1].trim(),b=h||r.params[0]||((S=k[0])==null?void 0:S.name)&&r[k[0].name];b&&!this._checkMethodThisType(B,b.type)&&this._errorHandle(ye(pe.typeMismatch,{operator:a,index:b.name||"id",typeE:b.type,typeR:B[0]}),c);const{hasErr:y,types:g}=this._checkArgs(r,k,a,c,L,b);if(y)return[V.UNDETERMINED];if(v=g.length&&g||this._returnedTypesParse(C),v.length>1||v.isBrackethesized)return v;(d==null?void 0:d.length)===1?v=[this._typeReplace(L,d[0])]:(d==null?void 0:d.length)===2&&(v=[`${V.MAP}<${d[0]},${d[1]}>`]),v=this._returnTypesOtherHandle(b,L,v,a)}else{const C=this._overloadsFuncGetTypes(n,r,c,h);v=this._returnedTypesParse([C])}return v}_overloadsFuncGetTypes(n,r,a,c,h){var L,b,y;let d="",v=[],S=[],C=0,T=0;for(const[g,O]of n.entries()){const{args:R,returnedTypes:w,name:U,thisType:X}=O,ee=c||r.params[0]||r[R[0].name],{errMsg:z,warnMsg:Y,matchCount:$}=this._overloadsCheckArgs(r,R,U,a,ee);$>T&&(C=g,T=$),ee&&!this._checkMethodThisType(X,ee.type)&&z.unshift({msg:ye(pe.typeMismatch,{operator:U,index:ee.name||"id",typeE:ee.type,typeR:X[0]}),ctx:a}),g===0?(v=z,S=Y,!z.length&&(d=w[0])):z.length?((L=v[0])!=null&&L.isLenErr&&!((b=z[0])!=null&&b.isLenErr)||v.length>z.length)&&(v=z,S=Y,C=g):this._priorityComparison(d,w[0])||(w[0]===`${V.ARRAY}<>`?d=`${ee.type}[]`:d=w[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,Sn.Warning);const k=a.children[0],B=n[0].name;if(k&&this._overloadsFuncs.push({name:B,index:C,line:k.start.line,startColumn:k.start.column+1,endColumn:k.start.column+B.length}),h){const g=n[C],{thisType:O,name:R,index:w}=g;if(this._hasMemberIndexVerify(g,a,h),h.index=w||C,O){const U=this._getMethodTypeName((O==null?void 0:O[0])||"");if(this._types.get(U))h.name=h.name.split(".").join("?.").replace("??","?");else{const ee=this._functions.get(R);ee&&(h.selfArg=(y=ee[0].args)==null?void 0:y[0])}}}return this._funcArgsAddOriginName(r,n[C].args,B),d||V.UNDETERMINED}_funcArgsAddOriginName(n,r,a){const c=n.params||[];for(const[h,d]of r.entries())h<c.length&&(c[h].originName=d.name);if(a==="input"){const h=c[0]||n.defval;Object.assign(n,{inputType:{name:`'${h!=null&&h.isSourceType?"source":this._removePrefix(h==null?void 0:h.type)}'`}})}}_overloadsCheckArgs(n,r,a,c,h){const d={...n},v=d.params;delete d.params;const S=Object.keys(d).length+v.length,C=r.length,T=[],k=[];let B=0;S>C&&(r.some(b=>["arg0, arg1, ...","number0, number1, ..."].includes(b.name))||T.push({msg:ye(pe.argsLenErr,{name:a,lenA:S,lenB:C}),isLenErr:!0,ctx:c}));for(const[L,b]of r.entries()){let y=d[b.name];if(L<v.length&&(y&&T.push({msg:ye(ar.moreSameArg,{arg:b.name}),ctx:c}),y=v[L]),!y)b.required&&T.push({msg:ye(pe.requiredParamErr,{name:a,argName:b.name}),ctx:c});else{const g=y.type!==`${V.SIMPLE} na`?this._checkArg(y,b,a,h,y.ctx,!0,k):"";g?T.push({msg:g,ctx:y.ctx}):B++,delete d[b.name]}if(["arg0, arg1, ...","number0, number1, ..."].includes(b.name)&&v.length>L+1){const g=v.slice(L+1);let O=v[L];for(const R of g){O.type===`${V.SIMPLE} ${V.NA}`&&(O=R);const w=R.type!==`${V.SIMPLE} ${V.NA}`?this._checkArg(R,b,a,O,R.ctx,!0,k):"";w&&T.push({msg:w,ctx:R.ctx})}}}if(Object.keys(d).length)for(const L of Object.keys(d))T.push({msg:ye(pe.argsNameErr,{name:a,argName:L}),ctx:d[L].ctx});return{errMsg:T,warnMsg:k,matchCount:B}}_checkArgs(n,r,a,c,h,d){var L,b;const v={...n},S=v.params;delete v.params;const C=Object.keys(v).length+S.length,T=r.length;let k=!1,B=[];if(C>T&&!r.some(g=>["arg0, arg1, ...","number0, number1, ..."].includes(g.name)))return this._errorHandle(ye(pe.argsLenErr,{name:a,lenA:C,lenB:T}),c),k=!0,{hasErr:k,types:B};for(const[y,g]of r.entries()){let O=v[g.name];if(y<S.length&&(O&&this._errorHandle(ye(ar.moreSameArg,{arg:g.name}),c,Sn.Warning),O=S[y],O.originName=g.name),!O)g.required&&(this._errorHandle(ye(pe.requiredParamErr,{name:a,argName:g.name}),c),k=!0);else{const R=O.type!==`${V.SIMPLE} ${V.NA}`?this._checkArg(O,g,a,d,O.ctx):"";if(R)this._errorHandle(R,O.ctx),k=!0;else if(a.startsWith("request.")&&g.name==="expression")if(O.ruleType===le.Brackethesized)B=O.exprs.map(w=>this._typeReplace(h,w.type));else if((L=O.types||O.returnedTypes)!=null&&L.length)B=(O.types||O.returnedTypes).map(w=>this._typeReplace(h,w)),(b=O.types||O.returnedTypes)!=null&&b.isBrackethesized&&Object.assign(B,{isBrackethesized:!0});else{const w=this._typeReplace(h,O.type);B.push(w)}else if(a==="input.enum"&&g.name==="defval"){const w=this._removePrefix(O.type);B.push(`${V.INPUT} ${w}`)}delete v[g.name]}}if(Object.keys(v).length)for(const y of Object.keys(v))this._errorHandle(ye(pe.argsNameErr,{name:a,argName:y}),v[y].ctx),k=!0;return{hasErr:k,types:B}}_checkArg(n,r,a,c,h,d,v){var y,g;const{ruleType:S,exprs:C,name:T}=n;let k=n.type;S===le.Brackethesized&&(k=`[${C.map(O=>O.type).join(", ")}]`);const{allowedTypeIDs:B=[],displayType:L,name:b}=r;if(!(!k||k===V.UNDETERMINED||L===V.UNDETERMINED)){if(a==="input"&&b==="defval"&&!k.startsWith(V.CONST))if(xl.includes(T))n.isSourceType=!0;else return pe.inputDefvalErr;if(!(this._checkMethodThisType(B,this._arrayTypeConvert(k))&&!(["input.source","input.enum"].includes(a)&&b==="defval"))){if(b==="condition"&&(L!=null&&L.endsWith(V.BOOL))){if(k.endsWith(V.INT)||k.endsWith(V.FLOAT)){const O=ye(ar.typeMismatch,{index:b,operator:a,type:V.BOOL});h&&(v?v.push({ctx:h,msg:O}):this._errorHandle(O,h,Sn.Warning));return}}else if(a==="str.tostring"&&b==="value"){const O=this._removePrefix(k);if(this._enums.get(O))return}switch(L){case"tuple of const string values: [val1, val2, ...]":return this._tupleToCheck(n,r,[`${V.CONST} ${V.STRING}`],a,k);case"tuple of const int/float values: [val1, val2, ...]":return this._tupleToCheck(n,r,[`${V.CONST} ${V.FLOAT}`,`${V.CONST} ${V.INT}`],a,k);case"tuple of const int values: [val1, val2, ...]":return this._tupleToCheck(n,r,[`${V.CONST} ${V.INT}`],a,k);case"open/high/low/close/hl2/hlc3/ohlc4/hlcc4":if(!T||!xl.includes(T))return ye(pe.inputSourceErr,{name:b,funcName:a});if(this._judgeVarBuildIn(T))return ye(pe.buildInUseErr,{name:T});n.isSourceType=!0;break;case"<matrix_type>":case"<array_type>":const O=this._getArrayType(a)||"";if(!k.endsWith(O)&&!(k.endsWith(V.INT)&&O===V.FLOAT))return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:this._typeAddSeries(O)});break;case"any matrix type":if(this._isMatrixType(k)){if(b==="id2"){const $=this._getArrayType(c==null?void 0:c.type);if(!$)return;const ne=this._getArrayType(k)||"";if($!==ne)return ye(pe.typeMismatch,{operator:a,index:b,typeE:ne,typeR:$})}}else return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:"matrix<fun_arg>"});break;case"any array type":if(this._isArrayType(k)){if(b==="id2"){const $=this._getArrayType(c==null?void 0:c.type);if(!$)return;const ne=this._getArrayType(k)||"";if($!==ne)return ye(pe.typeMismatch,{operator:a,index:b,typeE:ne,typeR:$})}}else return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:"array<fun_arg>"});break;case"series <type of the matrix's elements>":case"series <type of the array's elements>":const R=this._getArrayType(c==null?void 0:c.type)||"";if(!k.endsWith(R)&&!(k.endsWith(V.INT)&&R===V.FLOAT))return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:this._typeAddSeries(R)});break;case"any map type":if(this._isMapType(k)){if(b==="id2"){const $=this._getMapType(c==null?void 0:c.type);if(!$)return;const ne=this._getMapType(k)||[];if($[0]!==ne[0]||$[1]!==ne[1])return ye(pe.mapKeyValErr,{typeA:this._typeAddSeries(ne[0]),typeB:this._typeAddSeries(ne[1]),typeC:this._typeAddSeries($[0]),typeD:this._typeAddSeries($[1]),name:a})}}else return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:"map<type, type>"});break;case"series <type of the map's elements>":const w=this._getMapType(c==null?void 0:c.type);if(!w)return;const U=b==="key"?0:1;if(!k.endsWith(w[U])&&!(k.endsWith(V.INT)&&w[U]===V.FLOAT))return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:this._typeAddSeries(w[U])});break;case"<arg_expr_type>":if(S===le.Brackethesized)return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:L||""});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(k);if([V.BOX,V.LABEL,V.LINE,V.LINEFILL,V.POLYLINE,V.TABLE].includes(X))return ye(pe.requestExprErr,{type:X,name:a});break;case"variable, object or function of series int/float/bool/string/color, or a tuple of these":if(S===le.Brackethesized){for(const $ of C)if(!B.includes($.type))return ye(pe.requestArgsErr,{name:a,argName:b,type:$.type})}break;case"const int/float/bool/string/color or source-type built-ins":if(xl.includes(n.name)&&B[0].endsWith(this._removePrefix(k)))n.isSourceType=!0;else return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:"const int/float/bool/string/color"});break;case"<arg..._type>":if(S===le.Brackethesized||this._isArrayType(k)||this._isMapType(k)||this._isMatrixType(k))return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:`${V.SERIES} ${V.INT}`});if(k!==(c==null?void 0:c.type))return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:c==null?void 0:c.type});break;case"simple enum":const ee=this._removePrefix(k);if(!this._enums.has(ee))return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:"const enum"});break;case"tuple of enum fields: [enumName.field1, enumName.field2, ...]":const z=c==null?void 0:c.enumName;if(z&&!((y=n.exprs)==null?void 0:y.every(ne=>ne.enumName===z)))return ye(pe.typeMismatch,{operator:a,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&&!d){const $=B.find(ne=>ne.endsWith(Y));if($){n.type=$,n.arg.type=$;return}}if(B.length===1&&this._removePrefix(B[0])===Y){const $=this._getPrefix(n.type),ne=this._getPrefix(B[0]);if(Pi.indexOf($)>=Pi.indexOf(ne))return}if(L)return ye(pe.typeMismatch,{operator:a,index:b,typeE:k,typeR:L})}}}}_tupleToCheck(n,r,a,c,h){var d,v;if(a.push(`${V.SIMPLE} ${V.NA}`),n.ruleType===le.Brackethesized){const S=[];let C=!1;for(const T of n.exprs)S.push(T.type),a.includes(T.type)||(C=!0);if(C)return ye(pe.typeMismatch,{operator:c,index:r.name,typeE:`[${S.join(", ")}]`,typeR:((d=r.allowedTypeIDs)==null?void 0:d[0])||""})}else return ye(pe.typeMismatch,{operator:c,index:r.name,typeE:h,typeR:((v=r.allowedTypeIDs)==null?void 0:v[0])||""})}_getBlockReturnTypes(n){var k,B;let r=n;if(Array.isArray(n)&&(r=n.slice(-1)[0],Array.isArray(r)&&(r=r.slice(-1)[0])),!r)return[V.UNDETERMINED];const{ruleType:a,type:c,types:h,returnedTypes:d,exprs:v,nameList:S,typeList:C,block:T}=r;if(h&&h.length)return h;if(d&&d.length)return d;if(c)return[c];switch(a){case le.Brackethesized:const L=v.map(ee=>ee.type);return L.isBrackethesized=!0,L;case le.VarBlockStmt:case le.DeclareAssign:return S?S.ruleType===le.VarMultiple?S.types:[S.type]:[((k=r.name)==null?void 0:k.type)||V.UNDETERMINED];case le.SwitchStatement:if(!this._isNeedCalc&&this._isInFunc&&this._isEndExpr===!1)return[V.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||[V.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[$,ne]of y.entries())if(this._compareType(z[$],ne))(z[$].includes(V.FLOAT)&&!ne.includes(V.FLOAT)||y[$]===`${V.SIMPLE} ${V.NA}`||y[$]===V.UNDETERMINED)&&(y[$]=z[$]);else{O=Y.ctx;break}}return O&&(this._errorHandle(ye(pe.ifOrSwitchTypeErr,{keyword:"switch",types:g}),O),y=y.map(()=>V.UNDETERMINED)),r.returnedTypes=y,y;case le.IfStatement:if(!this._isNeedCalc&&!this._isInFunc)return[V.UNDETERMINED];if(!C.filter(ee=>ee&&ee.length).length)return[V.UNDETERMINED];let R=C[0]||[],w=R.length<=1?R[0]:`[${R.join(", ")}]`,U=0,X=0;for(const ee of C.slice(1))if(ee)if(U++,w+=ee.length<=1?`; ${ee[0]}`:`; [${ee.join(", ")}]`,ee.length!==R.length)X=U;else for(const[z,Y]of R.entries())if(this._compareType(ee[z],Y))(ee[z].includes(V.FLOAT)&&!Y.includes(V.FLOAT)||R[z]===`${V.SIMPLE} ${V.NA}`)&&(R[z]=ee[z]);else{X=U;break}if(X){const ee=T[X].slice(-1)[0],z=Array.isArray(ee)?ee.slice(-1)[0]:ee;this._errorHandle(ye(pe.ifOrSwitchTypeErr,{keyword:"if",types:w}),z.ctx),R=R.map(()=>V.UNDETERMINED)}return r.returnedTypes=R,R}return[V.UNDETERMINED]}}class j_{constructor(e){D(this,"_nameMap");D(this,"_prefixNameVar");D(this,"_prefixNameFunc");D(this,"_prefixNameConst");D(this,"_userTypes");D(this,"_isInFunc");D(this,"_currentFuncName");D(this,"_varlist");D(this,"_memberIndexList");D(this,"_blockCount");D(this,"_inputCount");D(this,"_count");D(this,"_isSwitch",!1);D(this,"_isInLoop",!1);D(this,"_codesCol");D(this,"_dependsObj");D(this,"_enums");D(this,"_preRunMembers");D(this,"_isInConditionalStmt",!1);D(this,"_preRunMembersFuncs");D(this,"_preRunMemberFuncsCount",0);D(this,"__count",0);D(this,"preParseCode","");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,a;const n=[];for(const c of e){if(!c)return;if(Array.isArray(c)){for(const h of c)if(n.push(this._parserStmt(h)),fu.includes((a=(r=h.exprs)==null?void 0:r[0])==null?void 0:a.name))return n.join(`;
14
14
  `).replace(/;+/g,";")}else n.push(this._parserStmt(c))}return""}parser(e){var a,c;const n=[];for(const h of e){if(!h)return;if(Array.isArray(h))for(const d of h)n.push(this._parserStmt(d)),!this.preParseCode&&fu.includes((c=(a=d.exprs)==null?void 0:a[0])==null?void 0:c.name)&&(this.preParseCode=n.join(`;
15
15
  `).replace(/;+/g,";"));else n.push(this._parserStmt(h))}const r=this._memberIndexList[this._blockCount]||{};return n.push(...Object.values(r)),n.join(`;
16
16
  `).replace(/;+/g,";")}_parserStmt(e,n=!1){let r="";switch(e==null?void 0:e.ruleType){case le.DeclareAssign:r=this._parserDeclareAssign(e);break;case le.MethodExpression:r=`${this._parserMethodExpression(e)}`;break;case le.ArrowFunction:r=this._parserArrowFunction(e);break;case le.ArrowMethod:r=this._parserArrowMethod(e);break;case le.IfStatement:r=this._parserIfStatement(e,n);break;case le.WhileStatement:r=this._parserWhileStatement(e,n);break;case le.SwitchStatement:r=this._parserSwitchStatement(e,n);break;case le.ForInStatement:r=this._parserForInStatement(e,n);break;case le.ForToStatement:r=this._parserForToStatement(e,n);break;case le.AgainAssign:r=this._parserAgainAssign(e);break;case le.ImportElement:r=e.code||"";break;case le.TypeStatement:r=this._parserTypeStatement(e);break;case le.VarBlockStmt:r=this._parserVarBlockStmt(e);break;case le.FlowStmt:if(this._isSwitch&&e.value==="break"){if(this._isInLoop){r="$$isBreak = true;";break}r="";break}r=`${e.value};`;break;case le.Brackethesized:r=this._parserBrackethesized(e);break;case le.EnumStatement:r=this._parserEnumStatement(e);break;default:r=this._parserSingleExpression(e);break}let a="";const c=this._preRunMembersFuncs[this._blockCount];c!=null&&c.length&&(a=c.join(`;